:root {
    --site-nav-height: 64px;
}

/* ensure the root html element matches the page background so overscroll or safe
   area regions never flash white on mobile */
html {
    background: linear-gradient(180deg, rgba(8, 8, 8, 1) 0%, rgba(0, 0, 0, 1) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100%;
}

body {
    background: transparent;
    /* inherit same gradient for consistency */
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* add extra top padding to respect the safe-area (notch/status bar) */
    padding: calc(16px + env(safe-area-inset-top)) 40px 16px;
    /* increase height so content stays vertically centered when inset is nonzero */
    height: calc(var(--site-nav-height) + env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-header,
.hero {
    margin-top: calc(-1 * var(--site-nav-height));
    padding-top: calc(var(--site-nav-height) + 24px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 18px;
}

.nav-brand span {
    font-family: 'Bank Gothic', 'BankGothic', 'BankGothicMdBT', 'Agency FB', 'Arial Black', sans-serif;
    font-style: italic;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.4px;
}

.nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.nav-brand img.site-logo {
    width: 72px;
    height: 72px;
    border-radius: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 980px;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: #000;
    background: #F09E41;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}

.site-nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    padding: 12px 20px;
    gap: 8px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }


    .site-nav {
        padding: 8px 20px;
        min-height: 64px;
        height: 64px;
        align-items: center;
        /* make opaque on mobile to avoid backdrop-filter showing skeleton shimmer
           and creating the 'white glow' behind the bar */
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: none;
    }


    .page-header,
    .hero {
        margin-top: calc(-1 * var(--site-nav-height));
        padding-top: calc(var(--site-nav-height) + 24px);
    }

    .nav-toggle {
        display: inline-flex;
        width: 48px;
        height: 48px;
        padding: 0;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        border-radius: 8px;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.95);
        cursor: pointer;
        touch-action: manipulation;
    }


    /* keep nav fixed on small screens as well; previously relative caused it
       to drop below the status bar and leave a white gap on some devices */
    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    .site-nav .nav-toggle {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1200;
    }

    .site-nav .nav-brand {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 1100;
    }

    .site-nav .nav-brand img {
        width: 48px;
        height: 48px;
        display: block;
    }

    .site-nav .nav-brand img.site-logo {
        width: 96px;
        height: 96px;
        border-radius: 0;
        display: block;
    }


    .site-nav .nav-end {
        display: flex;
        gap: 8px;
        align-items: center;
        z-index: 1300;
    }


    .site-nav .nav-links {
        display: flex;

        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.98);
        padding: 0 12px;
        gap: 12px;
        overflow: hidden;
        transform-origin: top center;
        transform: scaleY(0);
        opacity: 0;
        transition: transform 360ms cubic-bezier(.22, .9, .39, 1), opacity 280ms ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        z-index: 1050;
        will-change: transform, opacity;
        pointer-events: none;
        align-items: stretch;

    }

    .site-nav.open .nav-links {
        transform: scaleY(1);
        opacity: 1;
        padding-top: 12px;
        padding-bottom: 12px;
        pointer-events: auto;
        transition-delay: 30ms;

    }

    .site-nav .nav-links a {
        padding: 14px 18px;
        border-radius: 8px;
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 260ms ease, transform 320ms cubic-bezier(.22, .9, .39, 1);
        display: block;
        width: 100%;
        text-align: left;

        box-sizing: border-box;
        line-height: 20px;
    }


    .site-nav.open .nav-links a {
        opacity: 1;
        transform: translateY(0);
    }

    .site-nav.open .nav-links a:nth-child(1) {
        transition-delay: 70ms;
    }

    .site-nav.open .nav-links a:nth-child(2) {
        transition-delay: 110ms;
    }

    .site-nav.open .nav-links a:nth-child(3) {
        transition-delay: 150ms;
    }

    .site-nav.open .nav-links a:nth-child(4) {
        transition-delay: 190ms;
    }

    .site-nav.open .nav-links a:nth-child(5) {
        transition-delay: 230ms;
    }

    .site-nav.open .nav-links a:nth-child(6) {
        transition-delay: 270ms;
    }

    .site-nav.open .nav-links a:nth-child(7) {
        transition-delay: 310ms;
    }
}

.is-mobile .nav-links {
    display: none;
}

.nav-signin-mobile {
    display: none;
}

.is-mobile .nav-signin-mobile {
    display: block;
}

.is-mobile .site-nav {
    padding: 12px 14px;
}

.is-mobile .nav-toggle {
    display: inline-flex;
}

.nav-end {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 980px;
    transition: all 0.2s;
}

.nav-user:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.nav-user-dropdown {
    position: relative;
}

.nav-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 980px;
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-user-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-user-trigger img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.nav-dropdown-icon {
    font-size: 20px;
    transition: transform 0.2s;
}

.nav-user-dropdown.open .nav-dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(10, 10, 10, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1400;
}

.nav-user-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-dropdown-item .material-symbols-outlined {
    font-size: 20px;
    opacity: 0.7;
}

.nav-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}

.btn-nav-outline {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
}

.btn-nav-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-nav-primary {
    background: #F09E41;
    color: #000;
}

.btn-nav-primary:hover {
    background: #e8923a;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .site-nav {
        padding: 16px 20px;
    }


    .is-mobile .nav-signin-mobile {
        display: block;
    }

    .is-mobile .nav-signin-mobile .btn-nav {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
        border-radius: 8px;

        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.04);
    }

    .nav-signin-mobile .btn-nav:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}