/* Pill Navbar Styles - Vitreous System */
.pill-nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 20, 0.7);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.15); /* Light hit from above */
    border-radius: 80px;
    padding: 0.8rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    z-index: 2000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.02);
    width: auto;
    max-width: 95%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-top {
    display: none;
    /* Hidden on desktop */
}

.mobile-fab-container {
    display: none;
    /* Hidden on desktop */
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 45px;
    /* Slightly larger logo */
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 1.1rem;
    /* Larger font */
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--ka-accent);
    box-shadow: 0 0 12px var(--ka-accent);
}

.nav-cta {
    background: var(--ka-accent);
    color: #000;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: 1px solid transparent;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
    filter: brightness(1.1);
}

/* Vitreous Footer Styles */
.krash-footer {
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(var(--ka-blur));
    -webkit-backdrop-filter: blur(var(--ka-blur));
    color: var(--ka-text);
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-main);
    position: relative;
    overflow: hidden;
    margin-top: 5rem;
}

/* Section specific overrides removed for Aura Unification */


/* =========================================
   MOBILE ADVANCED NAVIGATION (FADER SYSTEM)
   ========================================= */
@media (max-width: 768px) {

    /* Hide Desktop Nav */
    .desktop-nav {
        display: none;
    }

    /* Show Mobile Top Pill */
    .mobile-nav-top {
        display: flex;
        top: 1.5rem;
        padding: 0.5rem 1.5rem;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .mobile-nav-top .nav-logo-img {
        height: 35px;
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.4));
    }

    /* Container for the whole Fader UI and Menu */
    .mobile-fab-container {
        display: block;
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 0;
        /* Let children impose size */
        z-index: 2000;
        overflow: visible;
    }

    /* Glass Overlay */
    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(15px);
        z-index: 1999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        overscroll-behavior: contain;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

    /* --- FADER SYSTEM WRAPPER --- */
    .fader-system {
        position: fixed;
        right: 1.5rem;
        bottom: 2rem;
        width: 60px;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        z-index: 2005;
        pointer-events: none;
    }

    /* FADER TRACK (Static Yellow Line) */
    .fader-track {
        position: absolute;
        bottom: 80px;
        width: 6px;
        height: 200px;
        background: rgba(17, 17, 17, 0.8);
        border: 1px solid #333;
        border-radius: 4px;
        z-index: 2000;
        transition: all 0.3s ease;
        opacity: 0;
        pointer-events: none;
    }

    /* Active Track Glow */
    .fader-system:has(.fab-toggle.active) .fader-track {
        opacity: 1;
        /* Show when active */
        background: rgba(0, 0, 0, 0.5);
        /* Darker so meter shines */
        border-color: var(--ka-accent);
        box-shadow: 0 0 10px var(--ka-accent);
        /* Yellow Glow wrapper */
    }

    /* VU METER (Integrated into line) */
    .vu-meter {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 82px;
        width: 4px;
        height: 196px;
        background: transparent;
        border-radius: 2px;
        overflow: hidden;
        opacity: 0;
        z-index: 2001;
        border: none;
    }

    .fader-system:has(.fab-toggle.active) .vu-meter {
        opacity: 1;
    }

    .meter-bar {
        width: 100%;
        height: 100%;
        background: linear-gradient(to top, rgba(255, 204, 0, 0.4) 0%, rgba(255, 204, 0, 0.8) 60%, #ffc107 60%, #ff9800 85%, #ff5722 85%, #ff5722 100%);
        transform-origin: bottom;
        transform: scaleY(0);
    }

    .fader-system:has(.fab-toggle.active) .meter-bar {
        animation: signalBounce 0.15s infinite alternate ease-in-out;
        /* Faster, audio-like rate */
    }

    @keyframes signalBounce {
        0% {
            transform: scaleY(0.3);
        }

        /* Keep some signal floor */
        25% {
            transform: scaleY(0.6);
        }

        50% {
            transform: scaleY(0.4);
        }

        75% {
            transform: scaleY(0.85);
        }

        100% {
            transform: scaleY(0.95);
        }
    }

    /* --- FAB BUTTON --- */
    .fab-toggle {
        width: 44px;
        height: 70px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px) saturate(150%);
        -webkit-backdrop-filter: blur(20px) saturate(150%);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        border-left: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.05);
        cursor: pointer;
        position: relative;
        z-index: 2002;
        transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
        pointer-events: auto;
    }

    .fab-toggle::before {
        content: 'MENU';
        color: rgba(255, 255, 255, 0.8);
        font-family: var(--font-main);
        font-size: 0.6rem;
        font-weight: 700;
        letter-spacing: 1px;
        margin-top: -2px;
        /* Adjust spacing to make it fit nicely above the line */
        transition: opacity 0.3s ease;
    }

    .fab-toggle::after {
        content: '';
        position: relative;
        width: 70%;
        height: 2px;
        background: rgba(255, 255, 255, 0.8);
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
        border-radius: 2px;
        top: 0;
        left: 0;
        /* Override absolute positioning */
    }

    /* Active State - 75% Height */
    .fab-toggle.active {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(25px) saturate(180%);
        -webkit-backdrop-filter: blur(25px) saturate(180%);
        box-shadow: 0 10px 40px rgba(255, 204, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.1);
        border-color: var(--ka-accent);
        transform: scale(1.05);
    }

    .fab-toggle.active::before {
        opacity: 0;
        /* Hide text when active so it cleans up the fader look */
    }

    .fab-toggle.active::after {
        background: #fff;
        box-shadow: 0 0 10px #fff, 0 0 5px var(--ka-accent);
    }

    /* --- MENU ITEMS --- */
    .mobile-menu-grid {
        position: fixed;
        bottom: 2rem;
        right: 5rem;
        /* Closer now that meter is inside line */
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        gap: 0.8rem;
        pointer-events: none;
        z-index: 2002;
        align-items: flex-end;
        padding-bottom: 20px;
    }

    /* .mobile-menu-grid.active removed as it is empty. Clicks pass through by default due to base class pointer-events: none */

    .menu-item {
        background: transparent;
        border: none;
        padding: 0.2rem 0;
        text-align: right;
        font-family: var(--font-heading, sans-serif);
        font-size: 1.8rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.3);
        text-transform: uppercase;
        letter-spacing: -0.5px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
        text-shadow: none;
        pointer-events: none;
        /* Not clickable when hidden */
    }

    .mobile-menu-grid.active .menu-item {
        opacity: 1;
        transform: translateY(0);
        color: #fff;
        pointer-events: auto;
        /* Clickable when visible */
    }

    .menu-item:hover {
        color: var(--ka-accent);
        text-shadow: 0 0 15px var(--ka-accent);
        transform: translateX(-5px);
    }

    /* Delays */
    .mobile-menu-grid.active .item-4 {
        transition-delay: 0.3s;
    }

    .mobile-menu-grid.active .item-3 {
        transition-delay: 0.35s;
    }

    .mobile-menu-grid.active .item-2 {
        transition-delay: 0.4s;
    }

    .mobile-menu-grid.active .item-1 {
        transition-delay: 0.45s;
    }
}