/**
 * Shared site header — utility strip + main nav + mobile drawer.
 *
 * Single source of truth for the header on every NON-front-page template:
 * header.php renders template-parts/homepage/header.php, and the front page
 * styles that identical markup from assets/css/homepage.css instead (where
 * wmb-main / this file are not loaded). The homepage design tokens the header
 * relies on are redeclared below, SCOPED to .utility/.nav/.drawer, so the
 * header renders identically to the front page without depending on — or
 * leaking into — style.css's global token set (which uses different values).
 *
 * @package wmb-2026
 */

/* Homepage header tokens, confined to the header subtree. */
.utility, .nav, .drawer, .marquee {
  --black:        #000000;
  --border:       #1a1a1a;
  --border-2:     #2a2a2a;
  --white:        #ffffff;
  --text-muted:   #888888;
  --text-muted-2: #555555;
  --red:          #c8102e;
  --red-2:        #e63946;
  --f-display: "Latin CT", "Roboto Slab", "Bree Serif", Georgia, serif;
  --f-ui:      "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter:    18px;
  --ease-out:  cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-fast:  120ms;
}
@media (min-width: 768px)  { .utility, .nav, .drawer { --gutter: 24px; } }
@media (min-width: 1024px) { .utility, .nav, .drawer { --gutter: 32px; } }
@media (min-width: 1280px) { .utility, .nav, .drawer { --gutter: 40px; } }

@keyframes pulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.8); }
}

/* -----------------------------------------------------------------------------
   UTILITY STRIP
   --------------------------------------------------------------------------- */
.utility {
  position: relative;
  z-index: 60;
  background: #050505;
  border-bottom: 1px solid var(--border);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.utility__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 36px;
  gap: 12px;
}
.utility__live { display: flex; align-items: center; gap: 10px; color: var(--white); }
.utility__dot {
  width: 7px; height: 7px; background: var(--red);
  animation: pulse 1.6s var(--ease-out) infinite;
}
.utility__right { display: flex; align-items: center; gap: 16px; color: var(--text-muted); }
.utility__right a { color: var(--text-muted); transition: color var(--dur-fast); }
.utility__right a:hover { color: var(--red-2); }
/* Social icons, moved into the utility strip in front of "Promoters Portal".
   Own responsive display (not .desktop-only, which forces display:inline). */
.utility__social { display: none; list-style: none; margin: 0; padding: 0; align-items: center; gap: 12px; }
.utility__social-link { display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); transition: color var(--dur-fast); }
.utility__social-link:hover { color: var(--red-2); }
.utility__social svg { display: block; width: 14px; height: 14px; }
@media (min-width: 768px) { .utility__social { display: inline-flex; } }
.utility__right .desktop-only { display: none; }
@media (min-width: 768px) {
  .utility { font-size: 11px; }
  .utility__inner { min-height: 38px; }
  .utility__right .desktop-only { display: inline; }
  .utility__right .sep { color: var(--border-2); }
}
@media (max-width: 767px) {
  .utility__inner { min-height: 32px; }
}

/* -----------------------------------------------------------------------------
   NAV  — Mobile: logo center, burger right.  Desktop: logo left, links center.
   --------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--black);
  border-bottom: 1px solid var(--border);
  overflow: visible;
}
.nav__inner {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 60px;
  gap: 8px;
  overflow: visible;
  position: relative;
}
.nav__burger {
  grid-column: 3;
  justify-self: end;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border-2);
  border-radius: 0;
}
.nav__burger:hover { border-color: var(--white); }
.nav__burger svg { width: 18px; height: 18px; }
.nav__logo {
  grid-column: 2;
  justify-self: center;
  display: flex; align-items: center; justify-content: center;
  min-width: 0;
  position: relative;
  z-index: 200;
  height: 60px;
  overflow: visible;
}
.nav__logo img {
  height: 160px;
  width: auto;
  max-width: none; /* logo is height-driven; never let the global img max-width:100% squish it */
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
  margin: -50px 0;
  position: relative;
}
.nav__links { display: none; }

@media (min-width: 1024px) {
  .nav__inner {
    /* logo left · empty centre · burger right (until the menu fits at >=1440) */
    grid-template-columns: 1fr auto 1fr;
    min-height: 76px;
    gap: 24px;
  }
  .nav__logo { grid-column: 1; justify-self: start; height: 76px; }
  .nav__logo img { height: 200px; margin: -62px 0; }
}
@media (min-width: 1440px) {
  /* Wide enough to seat the full inline menu beside the logo without overlap.
     Below this, the burger + drawer handle navigation. */
  .nav__burger { display: none; }
  .nav__links {
    grid-column: 2;
    justify-self: center;
    display: flex; align-items: center;
    gap: 0;
  }
  .nav__link {
    padding: 14px 14px;
    font-family: var(--f-ui);
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: color var(--dur-fast), border-color var(--dur-fast);
  }
  .nav__link:hover { color: var(--white); }
  .nav__link--active { color: var(--white); border-bottom-color: var(--red); }
}
@media (max-width: 599px) {
  .nav__inner { min-height: 56px; gap: 6px; }
  .nav__logo { height: 56px; }
  .nav__logo img { height: 150px; margin: -47px 0; }
  .utility { font-size: 9.5px; letter-spacing: 0.18em; }
  .utility__inner { min-height: 30px; gap: 10px; }
  .utility__live { gap: 8px; }
  .utility__dot { width: 6px; height: 6px; }
}

/* -----------------------------------------------------------------------------
   MOBILE DRAWER
   --------------------------------------------------------------------------- */
.drawer {
  position: fixed; inset: 0;
  z-index: 100;
  background: var(--black);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 300ms var(--ease-out);
  visibility: hidden;
}
.drawer.is-open { transform: translateX(0); visibility: visible; }
/* Drawer CONTENT (.menu-head / .v2-list / .v2-item / .menu-foot) is styled in
   assets/css/drawer.css — single source of truth, loaded on every page. */

@media (min-width: 1440px) {
  .drawer { display: none; }
}
