/* ══════════════════════════════════════════
   HEADER
   Layout: sign (left) · serif nav · wordmark (center) · serif nav (right)
   ══════════════════════════════════════════ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 0;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
    transition: background-color 0.4s, backdrop-filter 0.4s, border-color 0.4s;
}
.header.scroll {
    background-color: rgba(17, 16, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.header.open {
    background: #141212 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ── Desktop grid ── */
.header_desktop { padding: 0; }
/* Full-width bar so the sign/socials sit near the page edges, not the 1432px gutter */
.header_desktop .container {
    max-width: none;
    padding: 0 40px;
}
.header_grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 72px;
    gap: 44px;
}

/* Left cell: sign pinned far-left, primary nav hugging the centre wordmark */
.header_left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.header_sign {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.header_sign img {
    height: 36px;
    width: auto;
    display: block;
}

/* Center cell: wordmark */
.header_wordmark {
    display: flex;
    align-items: center;
    justify-self: center;
}
.header_wordmark img {
    height: 27px;
    width: auto;
    display: block;
}

/* ── Serif nav (both sides) ── */
.header_nav > ul {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
    /* Drop the nav so its text baseline is flush with the bottom of the
       (larger) AURELIUS wordmark rather than its top */
    position: relative;
    top: 3px;
}
/* Right cell: nav hugs the centre, socials pinned to the far right */
.header_right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    min-width: 0;
}
.header_socials {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.header_socials .footer_social {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}
.header_nav a {
    position: relative;
    font-family: 'Forum', Georgia, serif;
    font-size: 18px;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    transition: color 0.25s;
    padding: 4px 0;
    text-decoration: none;
    white-space: nowrap;
}
.header_nav a:hover { color: #FFFFFF; }
/* Gold hairline underline that wipes in left→right on hover / active page */
.header_nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -2px;
    height: 1px;
    background: #C8A96E;
    transition: right 0.35s cubic-bezier(.16, 1, .3, 1);
}
.header_nav a:hover::after,
.header_nav li.active > a::after {
    right: 0;
}
.header_nav li.active > a { color: #C8A96E; }

.header_nav .nav-divider {
    color: rgba(232, 224, 212, 0.22);
    font-size: 16px;
    user-select: none;
    pointer-events: none;
}

/* "Coming Soon" tooltip for nav items */
.coming_soon {
    position: relative;
}
.coming_soon a {
    pointer-events: none;
}
.coming_soon::after {
    content: 'coming soon';
    /* Hidden at every size; revealed on hover (desktop) or tap
       (mobile, .cs-open toggled by header.js) */
    display: none;
    position: absolute;
    color: #fff;
    font-size: 12px;
    background-color: #000;
    padding: 8px 12px;
    border-radius: 16px;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 2;
}
.coming_soon:hover::after,
.coming_soon.cs-open::after {
    display: block;
}
.coming_soon.v2 a {
    pointer-events: all;
}
.coming_soon.v2::after {
    content: 'coming soon';
}

/* ── About dropdown ── */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.nav-dropdown-arrow {
    transition: transform 0.2s;
}
.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown.open .nav-dropdown-arrow {
    transform: rotate(180deg);
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 14px;
    min-width: 220px;
    list-style: none;
    margin: 0;
    z-index: 60;
}
.nav-dropdown-menu::before {
    content: '';
    display: block;
    background: rgba(20, 18, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}
.nav-dropdown-menu li {
    position: relative;
    z-index: 1;
}
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}
.nav-dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: #FFFFFF !important;
    font-family: 'Source Sans 3', system-ui, sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    letter-spacing: 0;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}
.nav-dropdown-menu li a::after { display: none; }
.nav-dropdown-menu li a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
}

/* ── Social buttons (shared with mobile menu) ── */
.footer_social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    transition: background-color 0.25s, border-color 0.25s, transform 0.25s;
}
.footer_social:hover {
    background: rgba(200, 169, 110, 0.15);
    border-color: rgba(200, 169, 110, 0.45);
    transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   MOBILE HEADER
   ══════════════════════════════════════════ */
.header_mobile { display: none; padding: 0; }
.header_mobile_top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 48px;
    position: relative;
    z-index: 45;
}
.header_mobile_brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}
.header_mobile_sign {
    height: 30px;
    width: auto;
    display: block;
    flex-shrink: 0;
}
.header_mobile_wordmark {
    height: 18px;
    width: auto;
    display: block;
}
.header_burger, .header_burger_close {
    width: 32px;
    height: 32px;
    background-color: transparent;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
}
.header_burger_close { display: none; }
.header.open .header_burger { display: none; }
.header.open .header_burger_close { display: flex; }
.header_burger img, .header_burger_close img {
    filter: brightness(0) saturate(100%) invert(92%) sepia(12%) saturate(31%) hue-rotate(73deg) brightness(106%) contrast(108%);
}
.header_mobile_body {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background-color: #141212;
    transition: max-height 0.4s ease, visibility 0s 0.4s;
}
.header_mobile_body.active {
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    visibility: visible;
    transition: max-height 0.4s ease, visibility 0s 0s;
}
.header_mobile_body .header_nav_list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.header_mobile_body .header_nav_list a {
    color: #fff;
    font-family: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    display: block;
    text-decoration: none;
}
.header_mobile_body .nav-divider { color: rgba(255, 255, 255, 0.25); }

/* ══════════════════════════════════════════
   HEADER RESPONSIVE
   ══════════════════════════════════════════ */

/* Compact desktop — tighten spacing, keep the three-part layout */
@media (max-width: 1080px) {
    .header_desktop .container { padding: 0 24px; }
    .header_grid { height: 64px; gap: 24px; }
    .header_right { gap: 24px; }
    .header_nav > ul { gap: 20px; top: 2px; }
    .header_nav a { font-size: 16px; }
    .header_sign img { height: 30px; }
    .header_wordmark img { height: 22px; }
}

/* Mobile — hamburger menu */
@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: static;
        transform: none;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-radius: 0;
        padding: 4px 0 0 16px;
        min-width: 0;
    }
    .nav-dropdown-menu::before { display: none; }
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }
    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }
    .nav-dropdown-menu li a {
        padding: 6px 0 !important;
        font-size: 16px !important;
        color: #fff !important;
    }
    .header { padding: 0; }
    .header.scroll {
        background-color: rgba(17, 16, 15, 0.95);
    }
    .header_desktop { display: none; }
    .header_mobile { display: block; }
    .header_mobile_top { min-height: 48px; }
    .footer_top .coming_soon::after { left: 0; transform: translateX(0); }
}
