:root {
    --site-header-height: 60px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--site-header-height);
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: none;
    padding: 0 24px;
}

.site-header__brand {
    text-decoration: none;
    color: inherit;
}

.site-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #E8EEF7;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease;
}

.site-header__toggle:hover,
.site-header__toggle:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

.site-header__toggle-icon {
    display: block;
    width: 18px;
    height: 12px;
    position: relative;
}

.site-header__toggle-icon span {
    position: absolute;
    left: 0;
    right: 0;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.site-header__toggle-icon span:nth-child(1) { top: 0; }
.site-header__toggle-icon span:nth-child(2) { top: 5.25px; }
.site-header__toggle-icon span:nth-child(3) { top: 10.5px; }

.site-header.is-nav-open .site-header__toggle-icon span:nth-child(1) {
    top: 5.25px;
    transform: rotate(45deg);
}

.site-header.is-nav-open .site-header__toggle-icon span:nth-child(2) {
    opacity: 0;
}

.site-header.is-nav-open .site-header__toggle-icon span:nth-child(3) {
    top: 5.25px;
    transform: rotate(-45deg);
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.site-header__link {
    color: rgba(232, 238, 247, 0.62);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-header__link:hover {
    color: #E8EEF7;
    background: rgba(255, 255, 255, 0.04);
}

.site-header__link[aria-current="page"] {
    color: #E8EEF7;
}

.site-header a.site-header__cta,
.site-header a.site-header__cta:link,
.site-header a.site-header__cta:visited {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(232, 238, 247, 0.22);
    background: #E8EEF7;
    color: #070A0F;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-header a.site-header__cta:hover {
    background: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    color: #070A0F;
    text-decoration: none;
}

.site-header a.site-header__cta:focus-visible {
    outline: 2px solid rgba(232, 238, 247, 0.7);
    outline-offset: 3px;
}

.site-header.is-scrolled,
.site-header.is-nav-open {
    background: rgba(7, 10, 15, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .site-header__toggle-icon span {
        transition: none;
    }
}

@media (max-width: 768px) {
    :root {
        --site-header-height: 52px;
    }

    /* 备案精简顶栏：仅品牌 + App Store，无主导航与汉堡菜单 */
    .site-header--minimal-nav .site-header__toggle {
        display: none !important;
    }

    .site-header--minimal-nav a.site-header__cta,
    .site-header--minimal-nav a.site-header__cta:link,
    .site-header--minimal-nav a.site-header__cta:visited {
        margin-left: auto;
        padding: 8px 14px;
        border-radius: 999px;
        border: 1px solid rgba(232, 238, 247, 0.22);
        background: #E8EEF7;
        color: #070A0F;
        font-size: 13px;
        font-weight: 600;
        justify-content: center;
        width: auto;
    }

    .site-header--minimal-nav a.site-header__cta:hover {
        background: #fff;
        border-color: rgba(255, 255, 255, 0.4);
        color: #070A0F;
    }

    .site-header__inner {
        padding: 0 16px 0 20px;
        gap: 12px;
        position: relative;
    }

    .site-header .nav-brand-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .site-header .nav-brand.product-title {
        font-size: 1.125rem;
    }

    .site-header__toggle {
        display: inline-flex;
    }

    .site-header__nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 16px;
        left: auto;
        margin: 0;
        min-width: 196px;
        padding: 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        border-radius: 14px;
        background: rgba(12, 16, 24, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .site-header.is-nav-open .site-header__nav {
        display: flex;
    }

    .site-header__link {
        padding: 12px 14px;
        border-radius: 10px;
        color: rgba(232, 238, 247, 0.82);
    }

    .site-header__link:hover,
    .site-header__link[aria-current="page"] {
        color: #E8EEF7;
        background: rgba(255, 255, 255, 0.06);
    }

    .site-header a.site-header__cta,
    .site-header a.site-header__cta:link,
    .site-header a.site-header__cta:visited {
        margin: 0;
        width: auto;
        padding: 12px 14px;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: rgba(232, 238, 247, 0.82);
        font-size: 14px;
        font-weight: 500;
        justify-content: flex-start;
    }

    .site-header a.site-header__cta:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #E8EEF7;
        text-decoration: none;
    }
}

@media (min-width: 900px) {
    .site-header__inner {
        padding: 0 48px;
    }
}

@media (min-width: 1200px) {
    .site-header__inner {
        padding: 0 56px;
    }
}
