/* ==========================================================================
   2026 Redesign — Marketing chrome
   --------------------------------------------------------------------------
   Loaded after responsive.css so its rules override legacy components.css
   styling for .site-header / .site-footer / .site-nav.
   --------------------------------------------------------------------------
   Per-page styles (Home, About, How It Works, etc.) get added in subsequent
   redesign PRs. This file is the foundation chrome only.
   ========================================================================== */


/* --- Shared body baseline ----------------------------------------------- */

body {
    /* Inter is already the default; ensure new pages get the redesign baseline. */
    font-family: var(--font-body);
    background-color: var(--sand-3);
    color: var(--ink);
}


/* --- Header (dark, sticky, dark-on-night) ------------------------------ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(11, 13, 26, 0.92), rgba(11, 13, 26, 0));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: none;
    box-shadow: none;
    transition: background-color 200ms ease;
}

.site-header.site-header--scrolled {
    background: rgba(11, 13, 26, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header > .container {
    max-width: none;
    padding-left: 48px;
    padding-right: 48px;
}

.site-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
    padding: 20px 0;
    color: #fff;
}


/* Brand */

.site-brand {
    display: flex;
    align-items: center;
}

.site-brand__name,
.site-brand a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.01em;
    color: #fff;
    text-decoration: none;
    line-height: 1;
}

.site-brand__name em,
.site-brand a em {
    font-style: italic;
    font-weight: 400;
    color: var(--sun);
}


/* Desktop nav */

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
    color: rgba(255, 255, 255, 0.7);
}

.site-nav .nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-family: var(--font-body);
}

.site-nav .nav-menu li {
    margin: 0;
}

.site-nav .nav-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 150ms ease;
    padding: 8px 0;
    line-height: 1;
}

.site-nav .nav-menu a:hover,
.site-nav .nav-menu .current-menu-item > a,
.site-nav .nav-menu .current_page_item > a {
    color: #fff;
}


/* Primary CTA in nav */

.nav-cta {
    background: var(--sun);
    color: var(--night);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    box-shadow: none;
    transition: background-color 150ms ease, transform 150ms ease;
    text-decoration: none;
    line-height: 1;
}

.nav-cta:hover {
    background: #fff;
    color: var(--night);
    transform: translateY(-1px);
}


/* Account link / dropdown */

.nav-account-link {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
    font-size: 13px;
    text-decoration: none;
    transition: color 150ms ease;
}

.nav-account-link:hover {
    color: #fff;
}

.nav-account__trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-account__avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ember), var(--sun));
    color: var(--night);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-account__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--dune);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    z-index: 110;
}

.nav-account[aria-expanded="true"] .nav-account__dropdown,
.nav-account__trigger[aria-expanded="true"] + .nav-account__dropdown {
    display: block;
}

.nav-account__dropdown a {
    display: block;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    text-decoration: none;
    border-radius: 8px;
    font-family: var(--font-body);
}

.nav-account__dropdown a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.nav-account {
    position: relative;
}


/* Mobile toggle */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 200ms ease, opacity 200ms ease;
}


/* Mobile drawer */

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    background: var(--night);
    color: #fff;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateX(100%);
    transition: transform 250ms ease;
    z-index: 120;
    overflow-y: auto;
}

.mobile-nav[aria-hidden="false"],
body.mobile-nav-open .mobile-nav {
    transform: translateX(0);
}

.mobile-nav__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 80px 32px 32px;
}

.mobile-nav__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav__menu a {
    display: block;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -0.01em;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav__menu a:hover {
    color: var(--sun);
}

.mobile-nav__account {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav__account a {
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 8px 0;
    text-decoration: none;
}

.mobile-nav__cta {
    margin-top: 12px;
    align-self: flex-start;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 110;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

body.mobile-nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
}


/* Push body content below the fixed header on legacy (un-migrated) pages.
   Migrated redesign pages opt out via .redesign-2026 — their heroes already
   have explicit top padding calibrated to the fixed nav (≈160px).
   Dashboard pages run on a standalone HTML doc with its own chrome and
   must opt out via .ok-dashboard so this 80px doesn't bleed in. */

body:not(.redesign-2026):not(.ok-dashboard) {
    padding-top: 80px;
}


/* --- Footer (dark, brand block + 4 cols + bottom bar) ------------------ */

.site-footer {
    background: #07080F;
    color: rgba(255, 255, 255, 0.6);
    padding: 80px 0 40px;
    border-top: 1px solid var(--line);
}

.site-footer > .container {
    max-width: 1340px;
    padding-left: 48px;
    padding-right: 48px;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.site-footer .footer-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-footer .footer-col__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    margin: 0 0 18px;
    letter-spacing: 0.02em;
}

.site-footer .footer-col__text {
    font-size: 13.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.6);
    max-width: 38ch;
    margin: 0;
}

/* Brand-column tag line ("Stay young · Stay visible") */

.site-footer .footer-brand-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sun);
    margin-bottom: 20px;
}

.site-footer .footer-brand-mark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 30px;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1;
}

.site-footer .footer-brand-mark em {
    font-style: italic;
    font-weight: 400;
    color: var(--sun);
}

/* Menus inside columns */

.site-footer .footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .footer-menu li {
    padding: 6px 0;
    font-size: 13.5px;
}

.site-footer .footer-menu a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 150ms ease;
}

.site-footer .footer-menu a:hover {
    color: #fff;
}

/* Social row */

.site-footer .footer-social {
    display: flex;
    gap: 14px;
    margin-top: 24px;
}

.site-footer .footer-social__link {
    color: rgba(255, 255, 255, 0.5);
    transition: color 150ms ease;
}

.site-footer .footer-social__link:hover {
    color: var(--sun);
}

/* Bottom bar */

.site-footer .footer-bottom {
    max-width: 1340px;
    margin: 0;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    /* Mockups use --stacks-fg-2 here, but on #07080F it falls to 3.26:1 —
       below WCAG AA body (4.5). Bumping to --stacks-fg gives ≈5.4:1. */
    color: var(--stacks-fg);
}

.site-footer .footer-bottom p {
    margin: 0;
}


/* --- Shared CTA buttons (used by every redesigned page's closing block) - */

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: transform 150ms ease, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--sun);
    color: var(--night);
}

.btn-primary:hover {
    background: #fff;
    color: var(--night);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}


/* --- Mobile breakpoints for chrome ------------------------------------- */

@media (max-width: 880px) {
    .site-header > .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .site-header__inner {
        grid-template-columns: auto auto;
        justify-content: space-between;
        gap: 16px;
        padding: 16px 0;
    }

    .site-nav {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .site-footer > .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 28px;
    }

    .site-footer .footer-grid .footer-col:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}
