/* layout.css — header, navigation, footer.
   Keeps every hook header.js relies on: .header-wrapper, .header,
   .floating, .header-hidden, .mobile-menu-btn, .nav-links(.active). */

/* =========================== HEADER =========================== */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform var(--t-med);
}
.header-wrapper.header-hidden { transform: translateY(-110%); }

.header {
    background: rgba(6, 13, 31, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid transparent;
    transition: border-color var(--t-med), background var(--t-med);
}
.header.floating {
    background: rgba(6, 13, 31, 0.88);
    border-bottom-color: var(--line);
}

/* the nav spans the full viewport like the design, rather than being
   pinned to the 1240px content container */
.header > .container {
    max-width: none;
    padding-inline: clamp(1.25rem, 3vw, 40px);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: var(--header-h);
}

/* ---- logo ---- */
.logo {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--text-hi);
    margin-right: 0.5rem;
}
.logo-tsmg {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.14em;
}
.logo-serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 15px;
    color: var(--text-low);
    white-space: nowrap;
}
.logo:hover .logo-tsmg { color: var(--gold); }

/* ---- nav links ---- */
/* values taken directly from the design's <nav> */
.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
    margin: 0 auto;
}
.nav-links > a {
    position: relative;
    padding: 0;
    color: #C6D0E4;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.04em;
}
.nav-links > a:hover { color: var(--gold); background: none; }
.nav-links > a.active {
    color: var(--text-hi);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 3px;
}

/* ---- right actions ---- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.auth-buttons-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-signin {
    padding: 9px 16px;
    border: none;                  /* design has no outline on Sign in */
    border-radius: 999px;
    color: #C6D0E4;
    font-weight: 400;
    font-size: 14px;
    transition: color var(--t-fast);
}
.btn-signin:hover { color: var(--gold); }
.btn-signup {
    padding: 9px 20px;
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink-950);
    font-weight: 500;
    font-size: 14px;
    transition: all var(--t-fast);
}
.btn-signup:hover {
    background: var(--gold);
    color: var(--ink-950);
}

/* not in the design (it has no cart) — kept minimal so it reads as part of
   the same row rather than a competing button */
.profile-icon-link,
.cart-icon-link {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: none;
    color: #C6D0E4;
    font-size: 15px;
    transition: color var(--t-fast);
}
.profile-icon-link:hover,
.cart-icon-link:hover { color: var(--gold); }
.cart-item-count {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--gold-ink);
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ink-950);
}

/* ---- mobile menu button ---- */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0 9px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
}
.mobile-menu-btn span {
    display: block;
    height: 2px;
    border-radius: 1px;
    background: var(--text-hi);
    transition: transform var(--t-fast), opacity var(--t-fast);
}

/* push page content below the fixed header */
body { padding-top: var(--header-h); }

/* mobile auth buttons live inside the dropdown only */
.mobile-auth-buttons { display: none; }

/* =========================== MOBILE NAV =========================== */
@media (max-width: 900px) {
    .nav { gap: 1rem; }
    .mobile-menu-btn { display: flex; }
    .auth-buttons-group { display: none; }

    .nav-links {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        margin: 0;
        padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
        background: rgba(6, 13, 31, 0.97);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--line);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: all var(--t-med);
    }
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .nav-links > a { padding: 0.85rem 1rem; font-size: 1.05rem; }
    .nav-links > a.active::after { display: none; }
    .nav-links > a.active { background: rgba(240, 172, 63, 0.1); color: var(--gold); }

    .mobile-auth-buttons {
        display: flex;
        gap: 0.75rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--line);
    }
    .mobile-auth-buttons .btn-signin,
    .mobile-auth-buttons .btn-signup {
        flex: 1;
        text-align: center;
        padding: 0.8rem 1rem;
    }
}

/* =========================== FOOTER =========================== */
.site-footer {
    margin-top: 6rem;
    border-top: 1px solid var(--line);
    background: var(--ink-900);
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}
.footer-brand .footer-logo {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--text-hi);
    margin-bottom: 1.1rem;
}
.footer-brand .logo-tsmg { font-size: 17px; }
.footer-brand .logo-serif { font-size: 14px; }
.footer-brand p {
    color: var(--text-low);
    font-size: 0.95rem;
    max-width: 340px;
}
.footer-col { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col h4 {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--text-faint);
    margin-bottom: 0.35rem;
}
.footer-col a {
    color: var(--text-mid);
    font-size: 0.95rem;
    width: fit-content;
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}
.footer-bottom p {
    color: var(--text-low);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.25rem; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------- signed-in account block in the nav ----------------
   From Dashboard.dc.html: the first name with the ice-blue underline. Sign out
   is on the dashboard rather than here — beside the cart it only crowded the
   nav. The header previously showed a bare profile icon with no name at all. */
.account-name {
    font-size: 14px;
    color: var(--text-hi);
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--gold);
    white-space: nowrap;
}
.account-name:hover { color: var(--gold); }
