/* ==========================================================================
   SIMWAR — Navbar
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(6, 11, 31, 0.74);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition:
        background-color 0.3s var(--ease),
        box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
    background: rgba(6, 11, 31, 0.96);
    box-shadow: 0 16px 40px -26px rgba(0, 0, 0, 0.9);
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-height);
}

.nav .brand {
    flex: 0 0 auto;
}

.nav__panel {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: var(--radius-pill);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.81rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.4;
    transition:
        color 0.22s var(--ease),
        background-color 0.22s var(--ease);
}

.nav__link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.nav__link.is-active {
    background: rgba(255, 255, 255, 0.07);
    color: var(--white);
}

.nav__link.is-active::after {
    content: "";
    width: 4px;
    height: 4px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--cyan-400);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.9);
}

.nav__panel-footer {
    display: none;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: 6px;
}

.nav__cta {
    min-height: 40px;
    padding: 9px 17px;
    font-size: 0.8rem;
}

.nav__toggle {
    display: none;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    transition:
        background-color 0.2s var(--ease),
        border-color 0.2s var(--ease);
}

.nav__toggle:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.nav__toggle-icon {
    display: grid;
    place-items: center;
}

.nav__toggle [data-nav-toggle-close] {
    display: none;
}

.nav__toggle[aria-expanded="true"] [data-nav-toggle-open] {
    display: none;
}

.nav__toggle[aria-expanded="true"] [data-nav-toggle-close] {
    display: grid;
}

@media (max-width: 1080px) {
    .nav__link {
        padding-inline: 9px;
        font-size: 0.78rem;
    }

    .nav__actions {
        margin-left: 0;
    }
}

@media (max-width: 960px) {
    .nav {
        gap: 14px;
    }

    .nav__panel {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        max-height: calc(100dvh - var(--header-height));
        padding: 14px var(--gutter) 26px;
        overflow-y: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(6, 11, 31, 0.98);
        box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition:
            opacity 0.22s var(--ease),
            transform 0.22s var(--ease),
            visibility 0.22s;
    }

    .nav__panel.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav__link {
        display: flex;
        padding: 15px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 0;
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.95rem;
    }

    .nav__link:hover,
    .nav__link.is-active {
        background: transparent;
        color: var(--white);
    }

    .nav__link.is-active::after {
        margin-left: auto;
    }

    .nav__panel-footer {
        display: grid;
        gap: 8px;
        margin-top: 20px;
    }

    .nav__panel-note {
        color: rgba(255, 255, 255, 0.38);
        font-size: 0.68rem;
        text-align: center;
    }

    .nav__toggle {
        display: grid;
    }

    .nav__actions {
        margin-left: auto;
    }
}

@media (max-width: 560px) {
    :root {
        --header-height: 68px;
    }

    .nav {
        gap: 10px;
    }

    .nav__cta {
        width: 42px;
        min-height: 42px;
        padding: 0;
    }

    .nav__cta span {
        display: none;
    }

    .nav__toggle {
        width: 42px;
        height: 42px;
    }

    .brand__mark {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .brand__mark svg {
        width: 21px;
        height: 21px;
    }

    .brand__name {
        font-size: 0.96rem;
    }

    .brand__sub {
        font-size: 0.52rem;
    }
}

@media (max-width: 380px) {
    .brand__sub {
        display: none;
    }
}
