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

/* Transparent over the hero; turns solid once scrolled (toggled in main.js).
   .is-solid forces the solid look on non-hero pages (auth, errors). */
.site-header.is-scrolled,
.site-header.is-solid {
    background-color: oklch(from var(--cream) l c h / 0.88);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--hairline);
    box-shadow: var(--shadow-sm);
}

/* Spacer so content on solid-header pages clears the fixed bar */
.header-spacer { height: var(--header-height); }

.site-header__inner {
    width: 100%;
    max-width: var(--container-wide);
    margin-inline: auto;
    padding-inline: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
    color: var(--cream);
    text-decoration: none;
    transition: color 0.4s var(--ease);
}

.brand__name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.brand__sub {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-top: 2px;
}

.brand:hover { color: var(--cream); }

/* Legibility for cream chrome while transparent over the hero photo */
.site-header:not(.is-scrolled):not(.is-solid) .brand,
.site-header:not(.is-scrolled):not(.is-solid) .site-nav a {
    text-shadow: 0 1px 16px oklch(from var(--olive) calc(l - 0.05) c h / 0.6);
}

.is-scrolled .brand,
.is-solid .brand { color: var(--olive); }
.is-scrolled .brand:hover,
.is-solid .brand:hover { color: var(--color-primary); }

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.site-nav a {
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    position: relative;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s var(--ease);
}

.site-nav a:hover::after { width: 100%; }

.is-scrolled .site-nav a,
.is-solid .site-nav a { color: var(--text-secondary); }
.is-scrolled .site-nav a:hover,
.is-solid .site-nav a:hover { color: var(--color-primary); }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    color: var(--cream);
    font-size: 1.6rem;
    line-height: 1;
}
.is-scrolled .nav-toggle,
.is-solid .nav-toggle { color: var(--olive); }

@media (max-width: 760px) {
    .nav-toggle { display: block; }

    .site-nav {
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        gap: var(--space-xl);
        background-color: var(--olive);
        transform: translateX(100%);
        transition: transform 0.45s var(--ease);
    }

    .site-nav.is-open { transform: translateX(0); }

    .site-nav a,
    .is-scrolled .site-nav a {
        color: var(--cream);
        font-size: var(--fs-lg);
    }

    .nav-toggle { z-index: 60; }
}
