/* =========================================================
   VMRA SHARED SHELL · nav + mobile menu + footer
   Lifted from homepage so every page wears the same chrome.
   Load AFTER each page's own <style> block so these rules win.
   ========================================================= */

/* --- Design tokens — complete palette + base reset -------
   The static site defines these inline in each page's <style>
   block; in the WP theme we consolidate them here so every
   template (incl. Gutenberg pages) gets the dark editorial
   canvas without needing its own <style> block. ------------ */
:root {
  /* Neutral stack */
  --asphalt:      #0e0e10;
  --asphalt-2:    #17171a;
  --asphalt-3:    #212126;
  --grease:       #2a2a30;
  --chalk:        #f4ede1;
  --chalk-dim:    #c9c0ae;

  /* Signal colors */
  --race-red:     #d11a2a;
  --race-red-hot: #ff2a3c;
  --sodium:       #ffb319;
  --sodium-hot:   #ffd060;
  --engine-blue:  #2a5d8f;
  --rust:         #9a3b1e;

  /* Editorial accent palette */
  --oxblood:      #1a0508;
  --oxblood-deep: #0a0204;
  --oxblood-edge: #3d0a14;
  --bone:         #f1e6d3;
  --bone-dim:     #b8ad97;
  --gold-line:    rgba(255,179,25,0.30);
  --gold-rule:    rgba(255,179,25,0.55);
  --gold-dim:     #8a7333;
}

/* Base reset — matches the static site's per-page reset. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  background: var(--asphalt) !important;
  color: var(--chalk);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* --- GLOBAL OVERLAYS — grain + scanlines on every page ---- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 199;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(0,0,0,0.05) 3px 4px
  );
}

/* --- NAV — editorial / broadcast control room ------------- */
nav.main {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,8,10,0.86);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  border-bottom: 1px solid var(--gold-line);
  padding: 0;
}
nav.main::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-rule) 28%, var(--gold-rule) 72%, transparent 100%);
  pointer-events: none;
}
nav.main .nav-inner {
  max-width: 1480px; margin: 0 auto;
  padding: 16px 5vw;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
}
nav.main .logo-lockup {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit;
}
nav.main .logo-mark {
  width: 40px; height: 40px;
  border: 1px solid var(--gold-rule);
  display: grid; place-items: center;
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.9rem;
  color: var(--bone);
  letter-spacing: 0.04em;
  position: relative;
  background: rgba(0,0,0,0.4);
}
nav.main .logo-mark::before {
  content: ""; position: absolute; inset: 3px;
  border: 1px solid rgba(255,179,25,0.16);
  pointer-events: none;
}
nav.main .logo-mark::after {
  content: ""; position: absolute;
  top: -1px; left: -1px;
  width: 6px; height: 6px;
  border-top: 1px solid var(--sodium);
  border-left: 1px solid var(--sodium);
}
nav.main .logo-text {
  font-family: 'Anton', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--bone);
  text-transform: uppercase;
}
nav.main .logo-text small {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.54rem;
  letter-spacing: 0.32em;
  color: var(--gold-dim);
  margin-top: 6px;
  font-weight: 500;
}
nav.main .nav-links {
  display: flex; gap: 30px; list-style: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  justify-self: center;
  padding: 0; margin: 0;
  border-bottom: 0;
}
nav.main .nav-links a {
  color: var(--bone-dim);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
  border-bottom: 0;
}
nav.main .nav-links a::after {
  content: ""; position: absolute;
  left: 50%; right: 50%; bottom: -4px;
  height: 1px;
  background: var(--race-red);
  transition: left 0.25s ease, right 0.25s ease;
}
nav.main .nav-links a:hover,
nav.main .nav-links a.active { color: var(--bone); }
nav.main .nav-links a:hover::after,
nav.main .nav-links a.active::after { left: -3px; right: -3px; }

nav.main .nav-right {
  display: flex; align-items: center; gap: 14px;
  justify-self: end;
}
nav.main .nav-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sodium);
  background: transparent;
  border: 1px solid var(--gold-rule);
  padding: 11px 18px 10px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  position: relative;
}
nav.main .nav-cta::before {
  content: ""; position: absolute; inset: 3px;
  border: 1px solid rgba(255,179,25,0.10);
  pointer-events: none;
  transition: border-color 0.2s;
}
nav.main .nav-cta:hover {
  color: var(--asphalt);
  background: var(--sodium);
  border-color: var(--sodium);
}
nav.main .nav-cta:hover::before { border-color: rgba(0,0,0,0.18); }
nav.main .nav-cta .arr {
  font-family: 'Anton', sans-serif;
  font-size: 1rem; line-height: 0.7;
}
nav.main .nav-toggle{
  display: none; width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--grease);
  cursor: pointer; flex-direction: column;
  justify-content: center; align-items: center;
  gap: 5px; padding: 0; border-radius: 2px;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s; margin-left: 12px;
}
nav.main .nav-toggle:hover,
nav.main .nav-toggle:focus { border-color: var(--sodium); outline: none; }
nav.main .nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--chalk);
  transition: transform .25s ease, opacity .2s ease;
}
nav.main .nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
nav.main .nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
nav.main .nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  nav.main .nav-inner { gap: 24px; }
  nav.main .nav-links { gap: 22px; }
}
@media (max-width: 1000px) {
  nav.main .nav-toggle { display: flex; }
  nav.main .nav-links, nav.main .nav-cta { display: none !important; }
  nav.main .nav-inner { grid-template-columns: 1fr auto; gap: 16px; }
}

/* --- MOBILE MENU ------------------------------------------ */
.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(14,14,16,.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: none; overflow-y: auto;
  padding: 90px 5vw 60px;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu[aria-hidden="false"] { display: block; animation: mmFade .2s ease; }
@keyframes mmFade { from{opacity:0} to{opacity:1} }
.mobile-menu-inner {
  max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; z-index: 1;
}
.mm-link {
  display: block; padding: 18px 22px;
  font-family: 'Anton', sans-serif;
  font-size: 1.5rem; letter-spacing: .04em;
  color: var(--chalk); text-decoration: none;
  border: 1px solid var(--grease); background: var(--asphalt-2);
  transition: all .15s; text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
}
.mm-link:hover, .mm-link:active {
  background: var(--race-red); border-color: var(--race-red);
  color: var(--chalk);
}
.mm-divider { height: 1px; background: var(--grease); margin: 20px 0 8px; }
.mm-secondary {
  display: block; padding: 14px 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; letter-spacing: .08em;
  color: var(--chalk-dim); text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.mm-secondary:hover, .mm-secondary:active { color: var(--sodium); }

/* --- 40TH ANNIVERSARY BANNER ------------------------------ */
.anniversary-banner {
  background: #050507;
  padding: 22px 5vw 26px;
  text-align: center;
  border-bottom: 1px solid var(--grease);
  position: relative;
  overflow: hidden;
}
.anniversary-banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 100% at center, rgba(209,26,42,.18) 0%, rgba(42,93,143,.08) 35%, transparent 70%);
  pointer-events: none;
}
.anniversary-banner::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--race-red) 30%, var(--race-red) 70%, transparent);
  opacity: .6;
}
.ab-link {
  display: inline-block;
  max-width: 1100px;
  width: 100%;
  position: relative; z-index: 1;
  transition: transform .35s ease;
  line-height: 0;
}
.ab-link:hover { transform: scale(1.015); }
.ab-link:active { transform: scale(.99); }
.ab-link img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 6px 18px rgba(209,26,42,.28));
}
@media (max-width: 720px) {
  .anniversary-banner { padding: 14px 4vw 18px; }
}

/* --- FOOTER — 4-column editorial --------------------------- */
footer.shell {
  background: var(--asphalt);
  padding: 80px 5vw 40px;
  border-top: 3px solid var(--race-red);
  color: var(--chalk);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: normal;
  text-align: left;
}
footer.shell .foot-inner {
  max-width: 1400px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
footer.shell .foot-brand { max-width: 380px; }
footer.shell .foot-brand p {
  margin-top: 16px;
  color: var(--chalk-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}
footer.shell .logo-lockup {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit;
}
footer.shell .logo-mark {
  width: 40px; height: 40px;
  border: 1px solid var(--gold-rule);
  display: grid; place-items: center;
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.9rem;
  color: var(--bone);
  letter-spacing: 0.04em;
  position: relative;
  background: rgba(0,0,0,0.4);
}
footer.shell .logo-mark::before {
  content: ""; position: absolute; inset: 3px;
  border: 1px solid rgba(255,179,25,0.16);
  pointer-events: none;
}
footer.shell .logo-text {
  font-family: 'Anton', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--bone);
  text-transform: uppercase;
}
footer.shell .logo-text small {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.54rem;
  letter-spacing: 0.32em;
  color: var(--gold-dim);
  margin-top: 6px;
  font-weight: 500;
}
footer.shell h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sodium);
  margin-bottom: 16px;
}
footer.shell ul { list-style: none; padding: 0; margin: 0; }
footer.shell ul li { margin-bottom: 8px; }
footer.shell ul a {
  color: var(--chalk-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  border-bottom: 0;
}
footer.shell ul a:hover { color: var(--chalk); }
footer.shell .foot-bottom {
  max-width: 1400px; margin: 0 auto;
  border-top: 1px solid var(--grease);
  padding-top: 24px;
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
footer.shell .foot-bottom .chk {
  display: inline-block;
  width: 16px; height: 16px;
  background-image:
    linear-gradient(45deg, var(--chalk) 25%, transparent 25%),
    linear-gradient(-45deg, var(--chalk) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--chalk) 75%),
    linear-gradient(-45deg, transparent 75%, var(--chalk) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  margin-right: 8px;
  vertical-align: middle;
}

@media (max-width: 900px) {
  footer.shell .foot-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  footer.shell .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  footer.shell .foot-inner { grid-template-columns: 1fr; }
}

/* =========================================================
   ACCESSIBILITY — skip link, focus states, reduced motion
   ========================================================= */

/* Skip-to-main link — visually hidden until focused. Always first tab stop. */
.skip-to-main {
  position: absolute;
  top: -64px;
  left: 0;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--race-red, #d11a2a);
  color: var(--chalk, #f5f2ed);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 700;
  transition: top 0.15s ease-out;
}
.skip-to-main:focus {
  top: 0;
  outline: 3px solid var(--sodium, #ffb02e);
  outline-offset: -3px;
}

/* Focus-visible rings — only show for keyboard users, not mouse clicks. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--sodium, #ffb02e);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Nav toggle + CTAs get a stronger ring for visibility on dark backgrounds. */
.nav-toggle:focus-visible,
.nav-cta:focus-visible,
.hero-link:focus-visible,
.hero-cta:focus-visible,
.submit-btn:focus-visible,
.milestone-btn:focus-visible,
.btn-media-kit:focus-visible {
  outline: 3px solid var(--sodium, #ffb02e);
  outline-offset: 3px;
}

/* aria-current — highlight the current page in the nav.
   Also matches WordPress's default .current-menu-item class. */
.nav-links a[aria-current="page"],
.nav-links li.current-menu-item > a,
.mm-link[aria-current="page"],
.mm-menu li.current-menu-item > a {
  color: var(--sodium, #ffb02e);
  border-bottom: 2px solid var(--race-red, #d11a2a);
}

/* Reduced motion — kill animations for users who request it. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-grain,
  .ticker-track,
  .pulse {
    animation: none !important;
  }
}
