/* ===== SHARED SITE HEADER =====
   One source of truth for the slim header used by index.html and order.html.
   Constant height (no shrink-on-scroll); assets/header.js measures it into
   --header-h so sticky offsets (order page) stay exact, including the wrapped
   mobile layout.

   Relies on tokens defined by the host page: --sage --red --cream --body-font.
   Nav uses brand --red; the host page lightens --sage so red clears the 3:1
   large-text/UI contrast bar.

   Layout: logo left, nav right (flex space-between) — the conventional pattern,
   robust at every width instead of centering + absolute positioning. */

.header-spacer {
    height: var(--header-h, 92px);
}

.site-header {
    background: var(--sage);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-header .logo {
    height: 60px;
    width: auto;
    display: block;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-nav-link {
    font-family: var(--body-font);
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
    /* Nav text is small, so it uses a slightly deeper red (#BA121B, ~5:1 on the
       lightened sage) to clear the 4.5:1 small-text bar. Border/fills stay the
       brand --red (3:1 is fine for UI). */
    color: #BA121B;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.4rem 1rem;
    border: 2px solid var(--red);
    border-radius: 3px;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    background: none;
}

.header-nav-link:hover,
.header-nav-link:focus-visible {
    background: var(--red);
    color: var(--cream);
}

.header-nav-link:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

/* The link for the page you're already on (set via aria-current="page"). */
.header-nav-link[aria-current="page"] {
    background: var(--red);
    color: var(--cream);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    /* Stack: logo on top, a full-width row of equal, finger-sized nav buttons
       below. Replaces the old 24px-tall tap targets. */
    .site-header {
        flex-wrap: wrap;
        padding: 0.6rem 1rem;
        gap: 0.5rem;
        justify-content: center;
    }

    .site-header .logo {
        height: 46px;
    }

    .header-nav {
        width: 100%;
        gap: 0.4rem;
        flex-wrap: nowrap;
        justify-content: stretch;
    }

    .header-nav-link {
        flex: 1 1 0;
        min-height: 44px;
        padding: 0.5rem 0.3rem;
        font-size: 0.72rem;
        letter-spacing: 0.02em;
        text-align: center;
    }
}
