/* D22-soso — Brood War command archive */
:root {
  --bg: #0a0a0a;
  --surface: #0f0f0f;
  --surface-2: #121212;
  --border: #2a2a2e;
  --text: #e8e6e3;
  --muted: #b0aca6;
  --violet: #8b5cf6;
  --violet-dim: #5b21b6;
  --gold: #d4af37;
  --gold-dim: #8a7020;
  --teal: #2dd4bf;
  --phosphor: #39ff14;
  --ember: #f59e0b;
  --felt: #0d2818;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 64px;
  --pad-x: clamp(1rem, 3vw, 1.75rem);
  --section-y: clamp(3rem, 8vw, 5.5rem);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --theme-accent: var(--violet);
  --theme-accent-2: var(--gold);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  /* clip (not hidden) — overflow-x:hidden forces overflow-y to auto and
     creates a body scrollport that swallows scrollIntoView without moving the page */
  overflow-x: clip;
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow: visible;
  padding-top: var(--header-h);
  padding-bottom: calc(2rem + var(--safe-bottom));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Themed text selection — tracks active theater accent */
::selection {
  background: color-mix(in srgb, var(--theme-accent) 45%, transparent);
  color: var(--text);
}

/* Page scrollbar — thin dark bar that picks up theme accent */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--theme-accent) 35%, var(--border));
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--theme-accent) 55%, var(--border));
  background-clip: padding-box;
}

/* Keyboard skip — visible on focus only */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.7rem 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #0a0a0a;
  background: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 70%, #fff);
  border-radius: 3px;
}

.skip-link:focus {
  left: max(0.75rem, var(--safe-left));
  top: max(0.75rem, var(--safe-top));
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

/* Fixed theme stage — opacity-crossfaded on scroll (GPU-friendly) */
#bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #0a0a0a;
}

/* Shared Three.js WebGL layer (fleets + fog scout) */
#webgl-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  display: block;
}

/* Vignette overlay for text readability over icon fleets */
#bg-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 55% at 50% 50%, transparent 0%, rgba(6, 6, 10, 0.55) 70%, rgba(4, 4, 8, 0.85) 100%),
    linear-gradient(180deg, rgba(6, 6, 10, 0.35) 0%, transparent 20%, transparent 80%, rgba(6, 6, 10, 0.5) 100%);
}

.bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.85s cubic-bezier(0.33, 0.05, 0.2, 1);
  will-change: opacity;
  z-index: 1;
}

.bg-layer.is-active {
  opacity: 1;
}

/* Hero — Cosmic Violet void + StarCraft icons only (no photo) */
.bg-layer[data-bg="hero"] {
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(232, 230, 255, 0.55), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(200, 190, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 63% 18%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 81% 44%, rgba(168, 230, 255, 0.3), transparent),
    radial-gradient(1px 1px at 45% 82%, rgba(212, 175, 55, 0.28), transparent),
    radial-gradient(1px 1px at 91% 76%, rgba(220, 210, 255, 0.25), transparent),
    radial-gradient(ellipse 90% 60% at 50% -5%, rgba(139, 92, 246, 0.42), transparent 58%),
    radial-gradient(ellipse 50% 40% at 90% 75%, rgba(45, 212, 191, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 35% at 10% 65%, rgba(212, 175, 55, 0.1), transparent 50%),
    repeating-linear-gradient(
      118deg,
      transparent 0 46px,
      rgba(139, 92, 246, 0.025) 46px 47px
    ),
    linear-gradient(180deg, #0b0618 0%, #100c1c 45%, #0a0a0e 100%);
}

/* StarCraft — Cosmic Violet: free nebula stock */
.bg-layer[data-bg="starcraft"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(11, 6, 24, 0.5) 55%, rgba(10, 10, 14, 0.9) 100%),
    linear-gradient(180deg, rgba(11, 6, 24, 0.5) 0%, rgba(16, 12, 28, 0.3) 40%, rgba(10, 10, 14, 0.86) 100%),
    radial-gradient(ellipse 90% 60% at 50% -5%, rgba(139, 92, 246, 0.35), transparent 58%),
    image-set(
      url("assets/img/bg-starcraft.avif") type("image/avif"),
      url("assets/img/bg-starcraft.webp") type("image/webp"),
      url("assets/img/bg-starcraft.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #0b0618 0%, #100c1c 45%, #0a0a0e 100%);
}

/* StarCraft — Protoss Teal: free crystal stock */
.bg-layer[data-bg="starcraft-v2"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(4, 12, 16, 0.55) 55%, rgba(10, 10, 10, 0.92) 100%),
    linear-gradient(180deg, rgba(4, 12, 16, 0.55) 0%, rgba(7, 20, 22, 0.35) 40%, rgba(10, 10, 10, 0.88) 100%),
    repeating-linear-gradient(
      135deg,
      transparent 0 11px,
      rgba(168, 230, 255, 0.035) 11px 12px
    ),
    radial-gradient(ellipse 85% 55% at 48% -8%, rgba(45, 212, 191, 0.28), transparent 56%),
    image-set(
      url("assets/img/bg-starcraft-v2.avif") type("image/avif"),
      url("assets/img/bg-starcraft-v2.webp") type("image/webp"),
      url("assets/img/bg-starcraft-v2.jpg") type("image/jpeg")) center 35% / cover no-repeat,
    linear-gradient(180deg, #040c10 0%, #071416 42%, #0a0a0a 100%);
}

/* StarCraft — Amber Dusk: free desert dusk stock */
.bg-layer[data-bg="starcraft-v3"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(20, 8, 2, 0.55) 55%, rgba(10, 8, 6, 0.92) 100%),
    linear-gradient(180deg, rgba(20, 8, 2, 0.5) 0%, rgba(24, 12, 6, 0.35) 40%, rgba(10, 8, 6, 0.88) 100%),
    radial-gradient(ellipse 88% 58% at 50% -6%, rgba(234, 88, 12, 0.3), transparent 58%),
    image-set(
      url("assets/img/bg-starcraft-v3.avif") type("image/avif"),
      url("assets/img/bg-starcraft-v3.webp") type("image/webp"),
      url("assets/img/bg-starcraft-v3.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #140802 0%, #1a0e08 45%, #0a0806 100%);
}

/* About — deep archive violet */
.bg-layer[data-bg="about"] {
  background:
    radial-gradient(ellipse 75% 55% at 15% 15%, rgba(109, 40, 217, 0.5), transparent 55%),
    radial-gradient(ellipse 55% 45% at 90% 55%, rgba(139, 92, 246, 0.28), transparent 50%),
    radial-gradient(ellipse 45% 35% at 50% 100%, rgba(212, 175, 55, 0.12), transparent 45%),
    linear-gradient(165deg, #0a0614 0%, #160e28 50%, #0a0a10 100%);
}

/* C&C — Phosphor CRT: green CRT war room */
.bg-layer[data-bg="cnc"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, transparent 0%, rgba(2, 5, 2, 0.55) 55%, rgba(2, 5, 2, 0.92) 100%),
    linear-gradient(180deg, rgba(2, 5, 2, 0.55) 0%, rgba(10, 18, 8, 0.35) 45%, rgba(2, 5, 2, 0.9) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 70% 50% at 25% 25%, rgba(57, 255, 20, 0.2), transparent 55%),
    image-set(
      url("assets/img/bg-cnc.avif") type("image/avif"),
      url("assets/img/bg-cnc.webp") type("image/webp"),
      url("assets/img/bg-cnc.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #020502 0%, #0a1208 100%);
}

/* C&C — Nod Crimson: IR stealth corridor */
.bg-layer[data-bg="cnc-v2"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, transparent 0%, rgba(6, 2, 3, 0.6) 55%, rgba(10, 12, 14, 0.94) 100%),
    linear-gradient(180deg, rgba(6, 2, 3, 0.55) 0%, rgba(16, 8, 8, 0.4) 45%, rgba(10, 12, 14, 0.92) 100%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(180, 35, 24, 0.04) 2px 4px),
    radial-gradient(ellipse 65% 55% at 18% 20%, rgba(180, 35, 24, 0.28), transparent 58%),
    image-set(
      url("assets/img/bg-cnc-v2.avif") type("image/avif"),
      url("assets/img/bg-cnc-v2.webp") type("image/webp"),
      url("assets/img/bg-cnc-v2.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #060203 0%, #100808 48%, #0a0c0e 100%);
}

/* C&C — GDI Brass: military map room */
.bg-layer[data-bg="cnc-v3"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, transparent 0%, rgba(5, 7, 10, 0.58) 55%, rgba(10, 12, 14, 0.94) 100%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.55) 0%, rgba(12, 16, 20, 0.4) 45%, rgba(10, 12, 14, 0.92) 100%),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(109, 127, 140, 0.05) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(196, 160, 53, 0.04) 47px 48px),
    radial-gradient(ellipse 60% 45% at 72% 18%, rgba(196, 160, 53, 0.18), transparent 55%),
    image-set(
      url("assets/img/bg-cnc-v3.avif") type("image/avif"),
      url("assets/img/bg-cnc-v3.webp") type("image/webp"),
      url("assets/img/bg-cnc-v3.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #05070a 0%, #0c1014 50%, #0a0c0e 100%);
}

/* Warcraft — Parchment Night: candlelit keep */
.bg-layer[data-bg="warcraft"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(18, 14, 10, 0.55) 55%, rgba(12, 10, 8, 0.92) 100%),
    linear-gradient(180deg, rgba(18, 14, 10, 0.55) 0%, rgba(26, 20, 16, 0.35) 45%, rgba(12, 10, 8, 0.9) 100%),
    radial-gradient(ellipse 70% 55% at 50% 5%, rgba(96, 165, 250, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 45% at 12% 80%, rgba(251, 191, 36, 0.14), transparent 50%),
    image-set(
      url("assets/img/bg-warcraft.avif") type("image/avif"),
      url("assets/img/bg-warcraft.webp") type("image/webp"),
      url("assets/img/bg-warcraft.jpg") type("image/jpeg")) center 35% / cover no-repeat,
    linear-gradient(180deg, #120e0a 0%, #1a1410 55%, #0c0a08 100%);
}

/* Warcraft — Alliance Banner: heraldic hall */
.bg-layer[data-bg="warcraft-v2"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(10, 16, 28, 0.55) 55%, rgba(8, 10, 14, 0.92) 100%),
    linear-gradient(180deg, rgba(10, 16, 28, 0.5) 0%, rgba(16, 24, 40, 0.35) 45%, rgba(8, 10, 14, 0.9) 100%),
    repeating-linear-gradient(0deg, transparent 0 36px, rgba(59, 130, 246, 0.04) 36px 37px),
    radial-gradient(ellipse 72% 52% at 48% 0%, rgba(59, 130, 246, 0.24), transparent 56%),
    radial-gradient(ellipse 40% 35% at 85% 80%, rgba(212, 175, 55, 0.14), transparent 50%),
    image-set(
      url("assets/img/bg-warcraft-v2.avif") type("image/avif"),
      url("assets/img/bg-warcraft-v2.webp") type("image/webp"),
      url("assets/img/bg-warcraft-v2.jpg") type("image/jpeg")) center 30% / cover no-repeat,
    linear-gradient(180deg, #0a1220 0%, #121a28 52%, #080a0e 100%);
}

/* Warcraft — Horde Ember: forge fire */
.bg-layer[data-bg="warcraft-v3"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(18, 4, 4, 0.58) 55%, rgba(8, 6, 4, 0.94) 100%),
    linear-gradient(180deg, rgba(18, 4, 4, 0.55) 0%, rgba(20, 12, 6, 0.4) 45%, rgba(8, 6, 4, 0.92) 100%),
    radial-gradient(ellipse 68% 50% at 50% 8%, rgba(185, 28, 28, 0.3), transparent 55%),
    radial-gradient(ellipse 45% 40% at 15% 80%, rgba(132, 204, 22, 0.12), transparent 50%),
    image-set(
      url("assets/img/bg-warcraft-v3.avif") type("image/avif"),
      url("assets/img/bg-warcraft-v3.webp") type("image/webp"),
      url("assets/img/bg-warcraft-v3.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #140404 0%, #1a0c08 55%, #0a0604 100%);
}

/* MTG — Lacquer Magenta: foil satin */
.bg-layer[data-bg="mtg"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(24, 8, 28, 0.55) 55%, rgba(14, 8, 16, 0.92) 100%),
    linear-gradient(180deg, rgba(24, 8, 28, 0.55) 0%, rgba(32, 12, 36, 0.35) 45%, rgba(14, 8, 16, 0.9) 100%),
    linear-gradient(125deg, transparent 40%, rgba(255, 255, 255, 0.05) 48%, transparent 56%),
    radial-gradient(ellipse 60% 50% at 75% 20%, rgba(232, 121, 249, 0.28), transparent 55%),
    image-set(
      url("assets/img/bg-mtg.avif") type("image/avif"),
      url("assets/img/bg-mtg.webp") type("image/webp"),
      url("assets/img/bg-mtg.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(145deg, #18081c 0%, #221028 50%, #0e0810 100%);
}

/* MTG — Swamp Ink: wetland mist */
.bg-layer[data-bg="mtg-v2"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(5, 7, 6, 0.62) 55%, rgba(3, 4, 3, 0.95) 100%),
    linear-gradient(180deg, rgba(5, 7, 6, 0.6) 0%, rgba(10, 14, 12, 0.4) 45%, rgba(3, 4, 3, 0.94) 100%),
    radial-gradient(ellipse 55% 45% at 20% 25%, rgba(134, 239, 172, 0.12), transparent 55%),
    image-set(
      url("assets/img/bg-mtg-v2.avif") type("image/avif"),
      url("assets/img/bg-mtg-v2.webp") type("image/webp"),
      url("assets/img/bg-mtg-v2.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(160deg, #050706 0%, #0a0e0c 45%, #030403 100%);
}

/* MTG — Plains Gold: golden fields */
.bg-layer[data-bg="mtg-v3"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(20, 17, 10, 0.58) 55%, rgba(12, 10, 8, 0.94) 100%),
    linear-gradient(180deg, rgba(20, 17, 10, 0.55) 0%, rgba(28, 24, 16, 0.4) 45%, rgba(12, 10, 8, 0.92) 100%),
    radial-gradient(ellipse 70% 50% at 50% -8%, rgba(245, 240, 225, 0.2), transparent 55%),
    image-set(
      url("assets/img/bg-mtg-v3.avif") type("image/avif"),
      url("assets/img/bg-mtg-v3.webp") type("image/webp"),
      url("assets/img/bg-mtg-v3.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(155deg, #14110a 0%, #1c1810 50%, #0c0a08 100%);
}

/* Hearthstone — Tavern Ember: hearth fire */
.bg-layer[data-bg="hearthstone"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(26, 12, 4, 0.55) 55%, rgba(16, 10, 8, 0.92) 100%),
    linear-gradient(180deg, rgba(26, 12, 4, 0.55) 0%, rgba(32, 18, 8, 0.35) 45%, rgba(16, 10, 8, 0.9) 100%),
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(245, 158, 11, 0.28), transparent 55%),
    image-set(
      url("assets/img/bg-hearthstone.avif") type("image/avif"),
      url("assets/img/bg-hearthstone.webp") type("image/webp"),
      url("assets/img/bg-hearthstone.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #1a0c04 0%, #201208 50%, #100a08 100%);
}

/* Hearthstone — Frost Legend: ice crystal */
.bg-layer[data-bg="hearthstone-v2"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(4, 14, 20, 0.58) 55%, rgba(4, 8, 12, 0.94) 100%),
    linear-gradient(180deg, rgba(4, 14, 20, 0.55) 0%, rgba(8, 22, 28, 0.4) 45%, rgba(4, 8, 12, 0.92) 100%),
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(240, 249, 255, 0.04) 9px 10px),
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(103, 232, 249, 0.24), transparent 55%),
    image-set(
      url("assets/img/bg-hearthstone-v2.avif") type("image/avif"),
      url("assets/img/bg-hearthstone-v2.webp") type("image/webp"),
      url("assets/img/bg-hearthstone-v2.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #040e14 0%, #08161c 50%, #04080c 100%);
}

/* Hearthstone — Midnight Inn: empty bar night */
.bg-layer[data-bg="hearthstone-v3"] {
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, transparent 0%, rgba(8, 10, 14, 0.62) 55%, rgba(4, 5, 8, 0.95) 100%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.6) 0%, rgba(15, 18, 24, 0.4) 45%, rgba(4, 5, 8, 0.94) 100%),
    radial-gradient(ellipse 35% 25% at 78% 12%, rgba(203, 213, 225, 0.1), transparent 60%),
    image-set(
      url("assets/img/bg-hearthstone-v3.avif") type("image/avif"),
      url("assets/img/bg-hearthstone-v3.webp") type("image/webp"),
      url("assets/img/bg-hearthstone-v3.jpg") type("image/jpeg")) center 40% / cover no-repeat,
    linear-gradient(180deg, #080a0e 0%, #0f1218 50%, #040508 100%);
}

/* Poker — rich felt green casino */
.bg-layer[data-bg="poker"] {
  background:
    radial-gradient(ellipse 90% 60% at 50% -5%, rgba(74, 222, 128, 0.32), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 70%, rgba(212, 175, 55, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 45% at 8% 55%, rgba(20, 83, 45, 0.75), transparent 55%),
    linear-gradient(180deg, #04140c 0%, #0f2618 40%, #081610 100%);
}

/* Betting on Yourself — editorial ink & gold */
.bg-layer[data-bg="book"] {
  background:
    radial-gradient(ellipse 75% 55% at 25% 20%, rgba(212, 175, 55, 0.3), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 70%, rgba(167, 139, 250, 0.22), transparent 50%),
    radial-gradient(ellipse 45% 40% at 55% 100%, rgba(120, 90, 40, 0.28), transparent 50%),
    linear-gradient(165deg, #140f06 0%, #1a1410 50%, #0c0a08 100%);
}

/* 2 Hand Hold'em — cool dual-hand blue/rose */
.bg-layer[data-bg="2hh"] {
  background:
    radial-gradient(ellipse 70% 50% at 20% 25%, rgba(56, 189, 248, 0.38), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 70%, rgba(251, 113, 133, 0.28), transparent 50%),
    linear-gradient(180deg, #041018 0%, #0c1a28 45%, #0a0e14 100%);
}

/* Badugi — ice lowball slate */
.bg-layer[data-bg="badugi"] {
  background:
    radial-gradient(ellipse 70% 55% at 50% 15%, rgba(148, 163, 184, 0.32), transparent 55%),
    radial-gradient(ellipse 50% 45% at 15% 80%, rgba(186, 230, 253, 0.18), transparent 50%),
    linear-gradient(180deg, #0a1018 0%, #121a24 55%, #0a0c10 100%);
}

/* Contact — soft violet closeout */
.bg-layer[data-bg="contact"] {
  background:
    radial-gradient(ellipse 80% 55% at 50% 35%, rgba(139, 92, 246, 0.36), transparent 55%),
    radial-gradient(ellipse 45% 35% at 75% 90%, rgba(212, 175, 55, 0.16), transparent 50%),
    linear-gradient(180deg, #0c0a14 0%, #140e22 55%, #0a0a0e 100%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--theme-accent);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.gold {
  color: var(--gold);
}

.accent-gradient,
.accent-violet {
  color: var(--violet);
}

/* Scroll progress (scanner strip) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 70;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--gold), var(--teal));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.55);
  transform-origin: left center;
  transition: width 0.08s linear;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  background: rgba(8, 8, 10, 0.94);
}

/* Reveal-on-scroll — enter + exit (JS toggles .is-inview / data-exit) */
html.reveal-on [data-reveal]:not(.is-inview) {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  filter: blur(2px);
  /* Keep controls clickable near the viewport edge (Launch / theme panels / poker) */
}

html.reveal-on [data-reveal] {
  transition:
    opacity 0.55s ease,
    transform 0.7s var(--ease-spring),
    filter 0.55s ease;
  will-change: opacity, transform;
}

html.reveal-on [data-reveal].is-inview {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Directional exits — opposite of the enter path */
html.reveal-on [data-reveal][data-exit="up"]:not(.is-inview) {
  transform: translate3d(0, -40px, 0);
  filter: blur(3px);
}

html.reveal-on [data-reveal][data-exit="down"]:not(.is-inview) {
  transform: translate3d(0, 40px, 0);
  filter: blur(3px);
}

/* StarCraft — warp in from left; exit flies the other way */
html.reveal-on [data-reveal="warp"]:not(.is-inview):not([data-exit]) {
  transform: translate3d(-48px, 18px, 0) scale(0.96);
  filter: blur(4px) saturate(0.6);
}
html.reveal-on [data-reveal="warp"][data-exit="up"]:not(.is-inview) {
  transform: translate3d(52px, -28px, 0) scale(0.94);
  filter: blur(5px) saturate(0.5);
}
html.reveal-on [data-reveal="warp"][data-exit="down"]:not(.is-inview) {
  transform: translate3d(-52px, 32px, 0) scale(0.94);
  filter: blur(5px) saturate(0.5);
}

/* C&C — CRT scan-in / scan-out */
html.reveal-on [data-reveal="scan"]:not(.is-inview):not([data-exit]) {
  transform: translate3d(0, 12px, 0) scaleY(1.04);
  filter: brightness(1.4) saturate(1.6);
}
html.reveal-on [data-reveal="scan"][data-exit]:not(.is-inview) {
  transform: translate3d(0, 0, 0) scaleY(0.04);
  filter: brightness(1.8) saturate(2);
  opacity: 0;
}

/* Warcraft — banner drop in; lift away on exit */
html.reveal-on [data-reveal="drop"]:not(.is-inview):not([data-exit]) {
  transform: translate3d(0, -42px, 0) rotate(-1.2deg);
}
html.reveal-on [data-reveal="drop"][data-exit="up"]:not(.is-inview) {
  transform: translate3d(0, -56px, 0) rotate(1.5deg);
}
html.reveal-on [data-reveal="drop"][data-exit="down"]:not(.is-inview) {
  transform: translate3d(0, 48px, 0) rotate(-2deg);
}

/* MTG — deal in from right; discard the other way */
html.reveal-on [data-reveal="deal"]:not(.is-inview):not([data-exit]) {
  transform: translate3d(56px, 8px, 0) rotate(3deg);
}
html.reveal-on [data-reveal="deal"][data-exit="up"]:not(.is-inview) {
  transform: translate3d(-64px, -20px, 0) rotate(-6deg);
}
html.reveal-on [data-reveal="deal"][data-exit="down"]:not(.is-inview) {
  transform: translate3d(64px, 24px, 0) rotate(8deg);
}

/* Hearthstone — float up in; drift away on exit */
html.reveal-on [data-reveal="float"]:not(.is-inview):not([data-exit]) {
  transform: translate3d(0, 36px, 0) scale(0.97);
}
html.reveal-on [data-reveal="float"][data-exit="up"]:not(.is-inview) {
  transform: translate3d(0, -44px, 0) scale(0.96);
}
html.reveal-on [data-reveal="float"][data-exit="down"]:not(.is-inview) {
  transform: translate3d(0, 44px, 0) scale(0.96);
}

/* Poker — slide across the felt; exit the other rail */
html.reveal-on [data-reveal="felt"]:not(.is-inview):not([data-exit]) {
  transform: translate3d(-40px, 20px, 0);
}
html.reveal-on [data-reveal="felt"][data-exit="up"]:not(.is-inview) {
  transform: translate3d(48px, -28px, 0);
}
html.reveal-on [data-reveal="felt"][data-exit="down"]:not(.is-inview) {
  transform: translate3d(-48px, 32px, 0);
}

/* Book — page lift in; close/flip away */
html.reveal-on [data-reveal="page"]:not(.is-inview):not([data-exit]) {
  transform: translate3d(0, 24px, 0) rotateX(8deg);
  transform-origin: 50% 100%;
}
html.reveal-on [data-reveal="page"][data-exit]:not(.is-inview) {
  transform: translate3d(0, -16px, 0) rotateX(-10deg);
  transform-origin: 50% 0%;
}

/* Casino / 2HH — chip pop in; stack collapses out */
html.reveal-on [data-reveal="chip"]:not(.is-inview):not([data-exit]) {
  transform: translate3d(0, 30px, 0) scale(0.92);
}
html.reveal-on [data-reveal="chip"][data-exit="up"]:not(.is-inview) {
  transform: translate3d(0, -24px, 0) scale(0.88);
}
html.reveal-on [data-reveal="chip"][data-exit="down"]:not(.is-inview) {
  transform: translate3d(0, 36px, 0) scale(0.85);
}

/* Text boxes — twist in (3D yaw) */
html.reveal-on [data-reveal="twist"] {
  transform-origin: 30% 50%;
}
html.reveal-on [data-reveal="twist"]:not(.is-inview):not([data-exit]) {
  opacity: 0;
  transform: perspective(900px) rotateY(-32deg) rotateZ(-3deg) translate3d(-28px, 12px, 0);
  filter: blur(2px);
}
html.reveal-on [data-reveal="twist"][data-exit="up"]:not(.is-inview) {
  transform: perspective(900px) rotateY(28deg) rotateZ(4deg) translate3d(24px, -28px, 0);
  filter: blur(3px);
}
html.reveal-on [data-reveal="twist"][data-exit="down"]:not(.is-inview) {
  transform: perspective(900px) rotateY(-28deg) rotateZ(-4deg) translate3d(-24px, 32px, 0);
  filter: blur(3px);
}

/* Text boxes — jump in (springy pop) */
html.reveal-on [data-reveal="jump"]:not(.is-inview):not([data-exit]) {
  opacity: 0;
  transform: translate3d(0, 64px, 0) scale(0.78);
  filter: none;
}
html.reveal-on [data-reveal="jump"][data-exit="up"]:not(.is-inview) {
  transform: translate3d(0, -48px, 0) scale(0.86);
}
html.reveal-on [data-reveal="jump"][data-exit="down"]:not(.is-inview) {
  transform: translate3d(0, 56px, 0) scale(0.84);
}
html.reveal-on [data-reveal="jump"] {
  transition:
    opacity 0.4s ease,
    transform 0.75s var(--ease-spring),
    filter 0.4s ease;
}

/* Text boxes — soft fade in */
html.reveal-on [data-reveal="fade"]:not(.is-inview):not([data-exit]) {
  opacity: 0;
  transform: none;
  filter: blur(6px);
}
html.reveal-on [data-reveal="fade"][data-exit]:not(.is-inview) {
  opacity: 0;
  transform: none;
  filter: blur(8px);
}
html.reveal-on [data-reveal="fade"] {
  transition:
    opacity 0.85s ease,
    filter 0.85s ease,
    transform 0.85s ease;
}

/* Staggered hero/cards — mix twist / jump / fade per child */
html.reveal-on [data-reveal="stagger"]:not(.is-inview) .reveal-item {
  opacity: 0;
}

html.reveal-on [data-reveal="stagger"]:not(.is-inview):not([data-exit]) .reveal-item:nth-child(3n + 1) {
  transform: perspective(800px) rotateY(-24deg) translate3d(-18px, 8px, 0);
  filter: blur(2px);
}

html.reveal-on [data-reveal="stagger"]:not(.is-inview):not([data-exit]) .reveal-item:nth-child(3n + 2) {
  transform: translate3d(0, 48px, 0) scale(0.84);
  filter: none;
}

html.reveal-on [data-reveal="stagger"]:not(.is-inview):not([data-exit]) .reveal-item:nth-child(3n) {
  transform: none;
  filter: blur(7px);
}

html.reveal-on [data-reveal="stagger"][data-exit="up"]:not(.is-inview) .reveal-item:nth-child(3n + 1) {
  transform: perspective(800px) rotateY(20deg) translate3d(16px, -24px, 0);
}
html.reveal-on [data-reveal="stagger"][data-exit="up"]:not(.is-inview) .reveal-item:nth-child(3n + 2) {
  transform: translate3d(0, -40px, 0) scale(0.9);
}
html.reveal-on [data-reveal="stagger"][data-exit="up"]:not(.is-inview) .reveal-item:nth-child(3n) {
  transform: none;
  filter: blur(8px);
}

html.reveal-on [data-reveal="stagger"][data-exit="down"]:not(.is-inview) .reveal-item:nth-child(3n + 1) {
  transform: perspective(800px) rotateY(-20deg) translate3d(-16px, 28px, 0);
}
html.reveal-on [data-reveal="stagger"][data-exit="down"]:not(.is-inview) .reveal-item:nth-child(3n + 2) {
  transform: translate3d(0, 44px, 0) scale(0.9);
}
html.reveal-on [data-reveal="stagger"][data-exit="down"]:not(.is-inview) .reveal-item:nth-child(3n) {
  transform: none;
  filter: blur(8px);
}

html.reveal-on [data-reveal="stagger"] .reveal-item {
  transition:
    opacity 0.45s ease,
    transform 0.7s var(--ease-spring),
    filter 0.5s ease;
}

html.reveal-on [data-reveal="stagger"].is-inview .reveal-item {
  opacity: 1;
  transform: none;
  filter: none;
}

html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(1) { transition-delay: 0.04s; }
html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(2) { transition-delay: 0.1s; }
html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(3) { transition-delay: 0.16s; }
html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(4) { transition-delay: 0.22s; }
html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(5) { transition-delay: 0.28s; }
html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(6) { transition-delay: 0.34s; }
html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(7) { transition-delay: 0.4s; }
html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(8) { transition-delay: 0.46s; }
html.reveal-on [data-reveal="stagger"].is-inview .reveal-item:nth-child(9) { transition-delay: 0.52s; }

/* Exit: reverse stagger so trailing items leave first */
html.reveal-on [data-reveal="stagger"]:not(.is-inview) .reveal-item:nth-child(1) { transition-delay: 0.28s; }
html.reveal-on [data-reveal="stagger"]:not(.is-inview) .reveal-item:nth-child(2) { transition-delay: 0.22s; }
html.reveal-on [data-reveal="stagger"]:not(.is-inview) .reveal-item:nth-child(3) { transition-delay: 0.16s; }
html.reveal-on [data-reveal="stagger"]:not(.is-inview) .reveal-item:nth-child(4) { transition-delay: 0.1s; }
html.reveal-on [data-reveal="stagger"]:not(.is-inview) .reveal-item:nth-child(5) { transition-delay: 0.06s; }
html.reveal-on [data-reveal="stagger"]:not(.is-inview) .reveal-item:nth-child(6) { transition-delay: 0.03s; }
html.reveal-on [data-reveal="stagger"]:not(.is-inview) .reveal-item:nth-child(7) { transition-delay: 0s; }

/* Idle float after reveal — light game atmosphere (skip parallax hosts) */
html.reveal-on [data-reveal="float"].is-inview:not([data-parallax]),
html.reveal-on [data-reveal="warp"].is-inview .panel-media,
html.reveal-on [data-reveal="deal"].is-inview .panel-media,
html.reveal-on [data-reveal="drop"].is-inview .heraldic-plate {
  animation: sectionFloat 7s ease-in-out infinite;
}

html.reveal-on [data-reveal="scan"].is-inview .dossier {
  animation: scanPulse 5.5s ease-in-out infinite;
}

@keyframes sectionFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -6px, 0); }
}

@keyframes scanPulse {
  0%, 100% { box-shadow: inset 0 0 40px rgba(57, 255, 20, 0.06); }
  50% { box-shadow: inset 0 0 52px rgba(57, 255, 20, 0.14); }
}

[data-parallax] {
  will-change: transform;
}

/* Theme accents — kept distinct across theaters (no shared primary hexes) */
body[data-theme="starcraft"] { --theme-accent: var(--violet); --theme-accent-2: var(--gold); }
body[data-theme="starcraft-v2"] { --theme-accent: #2dd4bf; --theme-accent-2: #a8e6ff; }
body[data-theme="starcraft-v3"] { --theme-accent: #ea580c; --theme-accent-2: #b45309; }
body[data-theme="cnc"] { --theme-accent: var(--phosphor); --theme-accent-2: #c4a35a; }
body[data-theme="cnc-v2"] { --theme-accent: #b42318; --theme-accent-2: #7a868c; }
body[data-theme="cnc-v3"] { --theme-accent: #c4a035; --theme-accent-2: #7a8b99; }
body[data-theme="warcraft"] { --theme-accent: #60a5fa; --theme-accent-2: #fbbf24; }
body[data-theme="warcraft-v2"] { --theme-accent: #3b82f6; --theme-accent-2: #d4af37; }
body[data-theme="warcraft-v3"] { --theme-accent: #b91c1c; --theme-accent-2: #84cc16; }
body[data-theme="mtg"] { --theme-accent: #e879f9; --theme-accent-2: #fbbf24; }
body[data-theme="mtg-v2"] { --theme-accent: #86efac; --theme-accent-2: #a8a29e; }
body[data-theme="mtg-v3"] { --theme-accent: #f5f0e1; --theme-accent-2: #eab308; }
body[data-theme="hearthstone"] { --theme-accent: var(--ember); --theme-accent-2: #fde68a; }
body[data-theme="hearthstone-v2"] { --theme-accent: #67e8f9; --theme-accent-2: #f0f9ff; }
body[data-theme="hearthstone-v3"] { --theme-accent: #94a3b8; --theme-accent-2: #cbd5e1; }
body[data-theme="poker"] { --theme-accent: #4ade80; --theme-accent-2: var(--gold); }
body[data-theme="book"] { --theme-accent: #d4af37; --theme-accent-2: #a78bfa; }
body[data-theme="2hh"] { --theme-accent: #38bdf8; --theme-accent-2: #fb7185; }
body[data-theme="badugi"] { --theme-accent: #94a3b8; --theme-accent-2: #e0f2fe; }

/* Dim fleets when photo backdrops are active (hero stays full-strength icons) */
body[data-bg="starcraft"] #webgl-bg,
body[data-bg="starcraft-v2"] #webgl-bg,
body[data-bg="starcraft-v3"] #webgl-bg,
body[data-bg^="cnc"] #webgl-bg,
body[data-bg^="warcraft"] #webgl-bg,
body[data-bg^="mtg"] #webgl-bg,
body[data-bg^="hearthstone"] #webgl-bg {
  opacity: 0.42;
}


/* Current-section indicator (replaces the minimap radar) */
.section-indicator {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(14px, var(--safe-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 40%, var(--border));
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.section-indicator .si-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 10px var(--theme-accent);
  animation: dotPulse 2.2s ease-in-out infinite;
}

.section-indicator .si-text {
  display: grid;
  line-height: 1.1;
}

.section-indicator .si-kicker {
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.section-indicator .si-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--theme-accent);
  transition: color 0.4s ease;
}

/* Header — fixed so nav stays clickable above transformed sections */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  height: auto;
  padding-top: calc(0.55rem + var(--safe-top));
  padding-bottom: 0.55rem;
  padding-left: max(var(--pad-x), var(--safe-left));
  padding-right: max(var(--pad-x), var(--safe-right));
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  pointer-events: auto;
  isolation: isolate;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.brand-mark {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--violet);
  color: var(--violet);
  box-shadow: inset 0 0 12px rgba(139, 92, 246, 0.25);
}

/* Scrollable section links + pinned IG (never clipped by overflow) */
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
  margin-inline-start: auto;
  justify-content: flex-end;
}

.command-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 0.75rem;
  padding-inline: 0.1rem 0.35rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
}

/* End spacer so item 8 / Comms can fully clear the scroll edge */
.command-nav::after {
  content: "";
  flex: 0 0 1.25rem;
}

.command-nav::-webkit-scrollbar {
  height: 3px;
}

.command-nav::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--theme-accent) 45%, transparent);
  border-radius: 2px;
}

.command-nav a,
.nav-ig {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.55rem;
  min-height: 40px;
  font-size: 0.76rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 3px;
  white-space: nowrap;
  touch-action: manipulation;
  cursor: pointer;
  pointer-events: auto;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.command-nav a.pulse {
  border-color: var(--theme-accent);
  color: var(--text);
  background: color-mix(in srgb, var(--theme-accent) 14%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--theme-accent) 28%, transparent);
}

.nav-ig {
  flex-shrink: 0;
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  gap: 0.4rem;
  text-decoration: none;
}

.nav-ig:hover,
.nav-ig:focus-visible {
  color: #0a0a0a;
  border-color: var(--gold);
  background: linear-gradient(135deg, #f0d060, #e8a0a8);
}

.nav-ig-handle {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.nav-social {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.nav-social-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.55rem;
  min-height: 40px;
  min-width: 40px;
  font-size: 0.76rem;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 35%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.nav-social-link:hover,
.nav-social-link:focus-visible {
  color: var(--text);
  border-color: var(--theme-accent);
  background: color-mix(in srgb, var(--theme-accent) 18%, transparent);
}

@media (max-width: 1100px) {
  .nav-ig-handle {
    display: none;
  }
}

/* Drop hotkey digits earlier so 1–8 labels fit without clipping Comms */
@media (max-width: 1280px) {
  .command-nav .hk {
    display: none;
  }
}

.command-nav a:hover,
.command-nav a:focus-visible {
  color: var(--text);
  border-color: var(--theme-accent);
  background: rgba(139, 92, 246, 0.08);
}

.command-nav .hk {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--theme-accent);
  opacity: 0.85;
}

.hint-touch {
  display: none;
}

.break-sm {
  display: none;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-y) max(var(--pad-x), var(--safe-right)) var(--section-y) max(var(--pad-x), var(--safe-left));
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
  max-width: 42rem;
}

.section-head .eyebrow-badge {
  margin-bottom: 1rem;
}

.section-head h2 {
  position: relative;
  padding-bottom: 0.85rem;
}

.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-2));
  border-radius: 1px;
  transition: width 0.7s var(--ease-spring) 0.15s;
}

/* Grow underline when section-head reveals (data-reveal lives on .section-head) */
html.reveal-on .section-head:not(.is-inview) h2::after {
  width: 0;
}

.section-play .section-head h2::after,
.contact .section-head h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--theme-accent);
  margin: 0 0 0.75rem;
}

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  margin: 0 0 0.85rem;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  margin: 0 0 0.75rem;
}

.lede {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.65;
  margin: 0;
  max-width: 36rem;
}

.section-play .lede,
.contact .lede {
  margin-left: auto;
  margin-right: auto;
}

/* Hero */
.hero {
  max-width: none;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem) max(var(--pad-x), var(--safe-right)) clamp(3rem, 7vw, 4.5rem) max(var(--pad-x), var(--safe-left));
}

.hero-fog {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 40%, rgba(139, 92, 246, 0.15), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(45, 212, 191, 0.08), transparent 35%);
  pointer-events: none;
  z-index: -1;
}

/* Drifting ambient orbs behind the hero */
.hero-fog::before,
.hero-fog::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}

.hero-fog::before {
  width: 420px;
  height: 420px;
  top: -10%;
  left: -8%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 65%);
  animation: orbDrift 18s ease-in-out infinite alternate;
}

.hero-fog::after {
  width: 360px;
  height: 360px;
  bottom: -12%;
  right: -6%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.14), transparent 65%);
  animation: orbDrift 22s ease-in-out infinite alternate-reverse;
}

@keyframes orbDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vw, 4vh, 0) scale(1.15); }
}

.hero-grid {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

/* Eyebrow badge chip with live-status dot */
.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-accent);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 8px var(--theme-accent);
  animation: dotPulse 2.2s ease-in-out infinite;
}

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

.brand-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 0 0 1.15rem;
}

/* Callsign stays one unit — never wrap mid “D22-soso” */
.brand-callsign {
  display: block;
  font-size: clamp(2.75rem, 7.2vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 700;
  white-space: nowrap;
}

.brand-legal {
  display: block;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  text-transform: none;
}

.accent-gradient {
  background: linear-gradient(100deg, var(--violet) 10%, var(--teal) 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Championship title — the grand beat of the hero */
.hero-crown {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 0.15rem;
  margin: 0 0 1.35rem;
  padding: 1rem 0 1.15rem;
  max-width: 34rem;
  border-top: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--gold) 12%, transparent),
      transparent 70%
    );
}

.hero-crown-mark {
  position: absolute;
  top: 0.85rem;
  right: 0.15rem;
  font-size: 1.1rem;
  color: var(--gold);
  opacity: 0.85;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.55);
}

.hero-crown-year {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 6.5vw, 3.75rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #f5e6a8 0%, var(--gold) 42%, #8a7020 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.28));
}

.hero-crown-title {
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 92%, var(--gold));
}

.hero-crown-sub {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--gold) 70%, var(--muted));
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 32rem;
  margin: 0 0 1.25rem;
}

.hero-sub strong {
  color: var(--text);
  font-weight: 600;
}

.transmission {
  margin: 0 0 1.35rem;
  padding: 0.85rem 1.1rem 0.85rem 1.15rem;
  border-left: 3px solid var(--theme-accent);
  border-radius: 0 4px 4px 0;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--theme-accent) 14%, transparent),
    transparent 85%
  );
  color: var(--text);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.6;
  max-width: 32rem;
}

/* Hero credibility stat strip */
.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0;
  margin: 0 0 1rem;
}

.hero-stats li {
  display: grid;
  gap: 0.1rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.25s var(--ease-spring), border-color 0.2s, background 0.2s;
}

.hero-stats li:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.06);
}

.hero-stats strong {
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0;
}

.hero-stats span {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.35rem;
  min-height: 48px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 3px;
  border: 1px solid transparent;
  touch-action: manipulation;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.2s, background 0.2s;
}

/* Shine sweep on hover */
.btn:not(.btn-soon)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}

.btn:not(.btn-soon):hover::after,
.btn:not(.btn-soon):focus-visible::after {
  left: 145%;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn:active {
  transform: translateY(-1px) scale(0.99);
}

.btn:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.btn .arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease-spring);
}

.btn:hover .arrow,
.btn:focus-visible .arrow {
  transform: translateX(4px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  color: #fff;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 6px 32px rgba(139, 92, 246, 0.5);
}

.btn-gold {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

.btn-gold:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
}

/* Instagram — gold/rose accent (avoid default IG purple gradient) */
.btn-ig {
  color: #0a0a0a;
  background: linear-gradient(135deg, #f0d060 0%, #e8a0a8 45%, #d4af37 100%);
  border-color: color-mix(in srgb, var(--gold) 70%, #e8a0a8);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.28);
  font-weight: 600;
}

.btn-ig:hover {
  color: #0a0a0a;
  background: linear-gradient(135deg, #f5db78 0%, #f0b4ba 45%, #e0bc4a 100%);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.4);
}

.btn-ig .mono {
  font-size: 0.85em;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.ig-inline {
  color: var(--gold);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  font-weight: 600;
}

.ig-inline:hover {
  color: #f0d060;
  border-bottom-color: #f0d060;
}

.btn-lg {
  padding: 1.1rem 1.75rem;
  font-size: 1rem;
}

.hint {
  font-size: 0.75rem;
  color: var(--muted);
}

kbd {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface-2);
}

.hero-stage {
  display: grid;
  gap: 1rem;
}

.race-console {
  display: grid;
  gap: 0.5rem;
}

.race-console-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

#race-canvas {
  width: 100%;
  max-width: min(420px, 42svh);
  height: auto;
  aspect-ratio: 420 / 280;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #08080c;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
  transition: border-color 0.25s, box-shadow 0.25s;
}

#race-canvas:hover {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.28);
}

.hero-portrait {
  margin: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 6px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(139, 92, 246, 0.12);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.hero-portrait.is-gallery {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  perspective: 900px;
}

.hero-portrait.is-gallery:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.hero-portrait:hover {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(212, 175, 55, 0.15);
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 4/5;
  max-height: min(46svh, 460px);
  object-fit: cover;
  /* Crop excess headroom; keep face + trophy in frame */
  object-position: 48% 36%;
  filter: contrast(1.05) saturate(0.9);
  transform-origin: center center;
  transition: transform 0.6s ease, filter 0.6s ease;
  will-change: transform, opacity, filter;
}

.hero-portrait.is-flipping img,
.hero-portrait img.is-flip-out,
.hero-portrait img.is-flip-in {
  transition: none;
}

.hero-portrait:hover img:not(.is-flip-out):not(.is-flip-in) {
  transform: scale(1.03);
  filter: contrast(1.08) saturate(1);
}

/* Small archive-card flip when cycling photos */
.hero-portrait img.is-flip-out {
  animation: heroGalleryFlipOut 0.28s cubic-bezier(0.4, 0, 0.7, 1) forwards;
}

.hero-portrait img.is-flip-in {
  animation: heroGalleryFlipIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-portrait.is-flipping .portrait-badge,
.hero-portrait.is-flipping .hero-gallery-count,
.hero-portrait.is-flipping figcaption {
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

@keyframes heroGalleryFlipOut {
  0% {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
    filter: contrast(1.05) saturate(0.9) brightness(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.94) rotateY(-14deg);
    filter: contrast(1.05) saturate(0.9) brightness(0.7);
  }
}

@keyframes heroGalleryFlipIn {
  0% {
    opacity: 0;
    transform: scale(0.94) rotateY(14deg);
    filter: contrast(1.05) saturate(0.9) brightness(0.7);
  }
  60% {
    opacity: 1;
    filter: contrast(1.08) saturate(1) brightness(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
    filter: contrast(1.05) saturate(0.9) brightness(1);
  }
}

.portrait-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-radius: 3px;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(6px);
  z-index: 2;
  transition: opacity 0.25s ease;
}

.hero-gallery-cue {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  padding: 0.35rem 0.55rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 45%, transparent);
  border-radius: 3px;
  background: rgba(10, 10, 12, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0.85;
  pointer-events: none;
}

.hero-gallery-cue .cue-tap {
  display: none;
}

@media (hover: none), (pointer: coarse) {
  .hero-gallery-cue .cue-click {
    display: none;
  }

  .hero-gallery-cue .cue-tap {
    display: inline;
  }
}

.hero-portrait:hover .hero-gallery-cue,
.hero-portrait:focus-visible .hero-gallery-cue {
  opacity: 1;
  border-color: var(--gold);
  color: var(--gold);
}

.hero-gallery-count {
  position: absolute;
  right: 0.85rem;
  bottom: 2.4rem;
  z-index: 2;
  padding: 0.25rem 0.45rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(10, 10, 12, 0.72);
  border-radius: 3px;
  pointer-events: none;
}

.hero-portrait figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.65rem 0.85rem;
  font-size: 0.7rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: var(--gold);
  transition: opacity 0.25s ease;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  transition: color 0.2s;
}

.scroll-cue:hover {
  color: var(--theme-accent);
}

.scroll-cue-chevron {
  font-size: 1rem;
  animation: cueBounce 1.8s ease-in-out infinite;
}

@keyframes cueBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* About */
.section-about {
  max-width: none;
  background: transparent;
}

.section-about .section-head {
  max-width: 48rem;
}

.about-layout {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.about-prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.about-prose h3 {
  margin: 2rem 0 0.85rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--text);
}

.about-prose h3:first-child {
  margin-top: 0;
}

.about-prose p {
  margin: 0 0 1.1rem;
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
  font-size: 1.02rem;
  line-height: 1.75;
}

.about-prose p:last-child {
  margin-bottom: 0;
}

.about-prose .transmission {
  margin: 1.25rem 0 1.5rem;
}

.about-prose cite {
  font-style: italic;
  color: var(--gold);
}

.about-tldr {
  margin: 0 0 1.25rem !important;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem !important;
  color: color-mix(in srgb, var(--text) 95%, var(--muted)) !important;
}

/* Collapsible full-story */
.about-more {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.about-more[open] {
  padding-bottom: 0.5rem;
}

.about-more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-accent);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.about-more summary::-webkit-details-marker {
  display: none;
}

.about-more summary:hover,
.about-more summary:focus-visible {
  background: color-mix(in srgb, var(--theme-accent) 14%, transparent);
  border-color: var(--theme-accent);
  color: var(--text);
  transform: translateY(-1px);
}

.about-more summary:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.about-more-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid currentColor;
}

.about-more-chevron {
  font-size: 0.7rem;
  line-height: 1;
  transition: transform 0.35s var(--ease-spring);
}

.about-more[open] .about-more-chevron {
  transform: rotate(180deg);
}

.about-more-content {
  margin-top: 1.25rem;
  transform-origin: top center;
}

/* JS-driven height expand; CSS handles the soft reveal */
.about-more.is-animating .about-more-content {
  overflow: hidden;
}

.about-more.is-opening .about-more-content {
  animation: aboutMoreReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.about-more.is-opening .about-more-content > * {
  animation: aboutMoreItemIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.about-more.is-opening .about-more-content > *:nth-child(1) { animation-delay: 0.06s; }
.about-more.is-opening .about-more-content > *:nth-child(2) { animation-delay: 0.1s; }
.about-more.is-opening .about-more-content > *:nth-child(3) { animation-delay: 0.14s; }
.about-more.is-opening .about-more-content > *:nth-child(4) { animation-delay: 0.18s; }
.about-more.is-opening .about-more-content > *:nth-child(5) { animation-delay: 0.22s; }
.about-more.is-opening .about-more-content > *:nth-child(n + 6) { animation-delay: 0.26s; }

@keyframes aboutMoreReveal {
  from {
    opacity: 0.35;
    filter: blur(1px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes aboutMoreItemIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Progressive enhancement where ::details-content interpolates */
@supports (interpolate-size: allow-keywords) {
  html {
    interpolate-size: allow-keywords;
  }

  .about-more:not(.is-js-collapse)::details-content {
    overflow: hidden;
    height: 0;
    transition:
      height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
      content-visibility 0.5s allow-discrete;
  }

  .about-more[open]:not(.is-js-collapse)::details-content {
    height: auto;
  }
}

.about-more-content h3:first-child {
  margin-top: 0;
}

.about-aside {
  display: grid;
  gap: 1.25rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.about-portrait {
  margin: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.about-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 360px;
  object-fit: cover;
  /* Subject is centered; bias slightly down past headroom */
  object-position: 50% 40%;
  filter: contrast(1.05) saturate(0.92);
  transition: transform 0.55s ease;
}

.about-portrait:hover img {
  transform: scale(1.03);
}

.about-portrait figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.68rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: var(--gold);
}

.about-timeline {
  padding: 1.15rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.about-aside-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.career-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.career-timeline li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.career-timeline li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.career-timeline li:hover {
  color: var(--text);
}

.career-timeline time {
  color: var(--theme-accent);
  font-variant-numeric: tabular-nums;
}

.about-ctas {
  margin-bottom: 0;
}

.about-ctas .btn {
  flex: 1 1 auto;
}

/* Book — Betting on Yourself */
.section-book {
  max-width: none;
  background: transparent;
}

.section-book .section-head {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-book .section-head h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-book .lede {
  margin-left: auto;
  margin-right: auto;
}

.book-layout {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* 3D book cover (pure CSS) */
.book-showcase {
  display: grid;
  place-items: center;
  perspective: 1400px;
}

.book-3d {
  position: relative;
  width: min(260px, 70vw);
  aspect-ratio: 5 / 7;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(6deg);
  transition: transform 0.6s var(--ease-spring);
}

.book-showcase:hover .book-3d {
  transform: rotateY(-12deg) rotateX(3deg) translateY(-6px);
}

.book-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.6rem 1.4rem;
  border-radius: 3px 8px 8px 3px;
  background:
    radial-gradient(ellipse 120% 80% at 20% 10%, rgba(212, 175, 55, 0.25), transparent 60%),
    linear-gradient(145deg, #1a1206 0%, #241a0c 45%, #12100a 100%);
  border: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 40px rgba(212, 175, 55, 0.08),
    inset 3px 0 0 rgba(255, 255, 255, 0.06);
  transform: translateZ(18px);
}

.book-cover-kicker {
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  opacity: 0.85;
}

.book-cover-title {
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #f4e9c8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.book-cover-sub {
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  color: #c9b47a;
  text-transform: uppercase;
}

.book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 36px;
  transform: rotateY(90deg) translateZ(-18px) translateX(-18px);
  transform-origin: left center;
  background: linear-gradient(90deg, #0c0a06, #1a1206);
  border-radius: 3px 0 0 3px;
}

.book-copy .plaque {
  margin-bottom: 1.1rem;
}

.book-copy p {
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
  line-height: 1.7;
  margin: 0 0 1.1rem;
}

.book-copy cite {
  font-style: italic;
  color: var(--gold);
}

.book-points {
  list-style: none;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.book-points li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.book-points span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.02));
}

.book-ctas {
  margin-bottom: 0;
}

/* Game theaters — each esports game is its own scrollable section */
.game-section + .game-section {
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

/* Nested theater beat (e.g. Cube Draft under Magic) */
.game-subsection {
  padding-top: clamp(0.75rem, 2vw, 1.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.game-subsection .game-panel {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--theme-accent) 35%, var(--border));
}

.game-subsection .game-tag {
  letter-spacing: 0.06em;
}

.game-panel {
  position: relative;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--theme-accent) 6%, var(--surface)), var(--surface) 42%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-spring);
  overflow: hidden;
  cursor: pointer;
}

.game-panel:focus-visible {
  overflow: visible;
}

.game-panel:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.game-panel.is-theme-active {
  border-color: color-mix(in srgb, var(--theme-accent) 45%, var(--border));
}

/* Corner brackets — tactical HUD framing */
.game-panel::before,
.game-panel::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid color-mix(in srgb, var(--theme-accent) 55%, transparent);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.3s, border-color 0.3s;
}

.game-panel::before {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}

.game-panel::after {
  right: 10px;
  bottom: 10px;
  border-left: 0;
  border-top: 0;
}

.game-panel:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 35%, var(--border));
}

.game-panel:hover::before,
.game-panel:hover::after {
  opacity: 1;
  border-color: var(--theme-accent);
}

.game-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--theme-accent);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
}

.theme-pips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.35rem;
}

.theme-pip {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 45%, transparent);
  background: transparent;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.theme-pip.is-active {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--theme-accent) 45%, transparent);
}

/* Panel materials scoped to each panel's own data-theme (not body — avoids painting every theater) */
.game-panel[data-theme="starcraft"] {
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(232, 230, 255, 0.2), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(139, 92, 246, 0.15), transparent),
    linear-gradient(145deg, color-mix(in srgb, #8b5cf6 7%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(139, 92, 246, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 40px rgba(139, 92, 246, 0.04);
}

.game-panel[data-theme="starcraft-v2"] {
  background-image:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(168, 230, 255, 0.04) 10px 11px),
    linear-gradient(145deg, color-mix(in srgb, #2dd4bf 8%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(168, 230, 255, 0.18),
    inset 0 -1px 0 rgba(14, 116, 144, 0.25),
    inset 0 0 28px rgba(45, 212, 191, 0.05);
}

.game-panel[data-theme="starcraft-v3"] {
  background-image:
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(234, 88, 12, 0.03) 6px 7px),
    linear-gradient(145deg, color-mix(in srgb, #ea580c 8%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(180, 83, 9, 0.2),
    inset 0 -12px 28px rgba(234, 88, 12, 0.1);
}

.game-panel[data-theme="cnc"] {
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px),
    linear-gradient(145deg, color-mix(in srgb, #39ff14 6%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 0 0 2px rgba(10, 18, 8, 0.9),
    inset 0 0 0 3px rgba(57, 255, 20, 0.12),
    inset 0 1px 0 rgba(57, 255, 20, 0.15);
}

.game-panel[data-theme="cnc-v2"] {
  background-image:
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(122, 134, 140, 0.05) 26px 27px),
    linear-gradient(145deg, color-mix(in srgb, #b42318 7%, var(--surface)), var(--surface) 42%);
  border-left-color: color-mix(in srgb, #b42318 55%, var(--border));
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 3px 0 12px rgba(180, 35, 24, 0.1),
    inset 0 1px 0 rgba(122, 134, 140, 0.12);
}

.game-panel[data-theme="cnc-v3"] {
  background-image:
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(122, 139, 153, 0.05) 31px 32px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(196, 160, 53, 0.04) 31px 32px),
    linear-gradient(145deg, color-mix(in srgb, #c4a035 7%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 2px 0 rgba(196, 160, 53, 0.2),
    inset 0 0 0 1px rgba(122, 139, 153, 0.22);
}

.game-panel[data-theme="warcraft"] {
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(96, 165, 250, 0.06), transparent 50%),
    linear-gradient(145deg, color-mix(in srgb, #3a2a18 18%, var(--surface)), var(--surface) 50%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(146, 90, 40, 0.25),
    inset 0 1px 0 rgba(251, 191, 36, 0.1);
}

.game-panel[data-theme="warcraft-v2"] {
  background-image:
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(59, 130, 246, 0.05) 28px 29px),
    linear-gradient(145deg, color-mix(in srgb, #3b82f6 8%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 2px 0 rgba(212, 175, 55, 0.2),
    inset 0 -2px 0 rgba(37, 99, 235, 0.28);
}

.game-panel[data-theme="warcraft-v3"] {
  background-image:
    repeating-linear-gradient(95deg, transparent 0 16px, rgba(40, 8, 8, 0.12) 16px 18px),
    linear-gradient(145deg, color-mix(in srgb, #b91c1c 9%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(185, 28, 28, 0.28),
    inset 0 0 32px rgba(132, 204, 22, 0.06);
}

.game-panel[data-theme="mtg"] {
  background-image:
    linear-gradient(125deg, transparent 40%, rgba(255, 255, 255, 0.05) 48%, transparent 56%),
    linear-gradient(145deg, color-mix(in srgb, #e879f9 8%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(232, 121, 249, 0.28),
    0 0 0 2px rgba(251, 191, 36, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.game-panel[data-theme="mtg-v2"] {
  background-image:
    linear-gradient(90deg, rgba(6, 20, 12, 0.35) 0%, transparent 18%, transparent 82%, rgba(6, 20, 12, 0.3) 100%),
    linear-gradient(145deg, color-mix(in srgb, #86efac 5%, #0a0e0c), var(--surface) 50%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 40px rgba(6, 20, 12, 0.45),
    inset 0 1px 0 rgba(134, 239, 172, 0.08);
}

.game-panel[data-theme="mtg-v3"] {
  background-image:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(245, 240, 225, 0.08), transparent 55%),
    linear-gradient(145deg, color-mix(in srgb, #eab308 10%, var(--surface)), var(--surface) 45%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(245, 240, 225, 0.18),
    inset 0 0 0 2px rgba(234, 179, 8, 0.12);
}

.game-panel[data-theme="hearthstone"] {
  background-image:
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(80, 40, 12, 0.07) 12px 13px),
    linear-gradient(145deg, color-mix(in srgb, #f59e0b 9%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.38),
    inset 0 2px 0 rgba(253, 230, 138, 0.15),
    inset 0 -10px 24px rgba(194, 65, 12, 0.08);
}

.game-panel[data-theme="hearthstone-v2"] {
  background-image:
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(240, 249, 255, 0.05) 8px 9px),
    linear-gradient(115deg, transparent 42%, rgba(103, 232, 249, 0.07) 50%, transparent 58%),
    linear-gradient(145deg, color-mix(in srgb, #67e8f9 7%, var(--surface)), var(--surface) 42%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(103, 232, 249, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.game-panel[data-theme="hearthstone-v3"] {
  background-image:
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(30, 41, 59, 0.18) 20px 22px),
    linear-gradient(145deg, color-mix(in srgb, #94a3b8 6%, #0a0c10), var(--surface) 48%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(148, 163, 184, 0.2),
    inset 0 0 36px rgba(15, 18, 24, 0.55);
}

/* Hover/active: border only — never replace material box-shadow */
.game-panel[data-theme]:hover,
.game-panel[data-theme].is-theme-active {
  border-color: color-mix(in srgb, var(--theme-accent) 45%, var(--border));
}

/* Tabs */
.tablist-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.tablist-wrap:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 35%, var(--border));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.4),
    0 0 40px color-mix(in srgb, var(--theme-accent) 12%, transparent);
}

.tablist {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #161618, var(--surface-2));
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
}

.tablist [role="tab"] {
  position: relative;
  flex: 0 0 auto;
  padding: 0.95rem 1.2rem;
  min-height: 48px;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.25s var(--ease-spring);
}

.tablist [role="tab"]:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.tablist [role="tab"]:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: -2px;
}

.tablist [role="tab"][aria-selected="true"] {
  color: var(--theme-accent);
  border-bottom-color: var(--theme-accent);
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
  text-shadow: 0 0 20px color-mix(in srgb, var(--theme-accent) 40%, transparent);
}

.tab-panel {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.15rem, 2.5vw, 1.75rem);
  animation: panelIn 0.35s ease;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  align-items: start;
}

.panel-grid > div > p {
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  line-height: 1.7;
}

.interview-cite {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 1rem 1.15rem;
  align-items: start;
  margin: 1.35rem 0 0.25rem;
  padding: 0 0 0 0.9rem;
  border-left: 2px solid color-mix(in srgb, var(--theme-accent) 55%, transparent);
}

.interview-cite-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0a0a;
  outline: 1px solid color-mix(in srgb, var(--theme-accent) 28%, transparent);
  transition: outline-color 0.2s ease, transform 0.25s var(--ease-spring);
}

.interview-cite-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
  transition: transform 0.35s ease, filter 0.25s ease;
}

.interview-cite-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.interview-cite-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 0.15rem;
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.9rem;
  border-color: transparent transparent transparent
    color-mix(in srgb, #fff 92%, var(--theme-accent));
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.interview-cite-thumb:hover,
.interview-cite-thumb:focus-visible {
  outline-color: color-mix(in srgb, var(--theme-accent) 70%, transparent);
  transform: translateY(-1px);
}

.interview-cite-thumb:hover img,
.interview-cite-thumb:focus-visible img {
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.08);
}

.interview-cite-body {
  min-width: 0;
}

.interview-cite-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--theme-accent) 75%, var(--muted));
}

.interview-cite-summary {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  max-width: 40rem;
}

.interview-cite-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--theme-accent);
  border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 40%, transparent);
}

.interview-cite-link:hover,
.interview-cite-link:focus-visible {
  color: var(--theme-accent-2, var(--gold));
  border-bottom-color: var(--theme-accent-2, var(--gold));
}

@media (max-width: 560px) {
  .interview-cite {
    grid-template-columns: 1fr;
  }

  .interview-cite-thumb {
    max-width: 280px;
  }
}

.plaque {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.plaque:hover {
  border-color: var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(212, 175, 55, 0.12);
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  font-size: 0.8rem;
}

.stat-list li {
  display: grid;
  grid-template-columns: minmax(5rem, 6.5rem) 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0.35rem;
  margin: 0 -0.35rem;
  border-bottom: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.stat-list li:hover {
  background: color-mix(in srgb, var(--theme-accent) 6%, transparent);
  color: var(--text);
  transform: translateX(2px);
}

.stat-list span {
  color: var(--theme-accent);
}

.archive-links {
  margin-top: 1rem;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--muted);
}

.archive-links a {
  color: var(--theme-accent);
  border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 35%, transparent);
  text-decoration: none;
}

.archive-links a:hover,
.archive-links a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--theme-accent);
}

.panel-media {
  position: relative;
  display: grid;
  gap: 1rem;
}

.panel-img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: cover;
  object-position: center;
  max-height: 280px;
  justify-self: center;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.45s ease;
}

.panel-img:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 45%, var(--border));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.panel-img.card-ratio {
  aspect-ratio: 2.5 / 3.5;
  max-height: 320px;
  object-fit: cover;
  width: min(100%, 240px);
  justify-self: center;
}

/* Screenshots / UI captures — keep the full frame, centered */
.panel-img--screenshot {
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  object-position: center;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(255, 255, 255, 0.03), transparent 70%),
    #08080c;
}

/* Non-photo assets (documents, wide promo graphics, diagrams):
   show the whole image, centered, without cover-cropping the subject */
.panel-img--contain {
  object-fit: contain;
  object-position: center;
  width: 100%;
  height: auto;
  max-height: 300px;
  max-width: 100%;
  justify-self: center;
  margin-inline: auto;
  padding: 0.75rem;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(255, 255, 255, 0.03), transparent 70%),
    #08080c;
}

/* Tall archive screenshots (old ladder pages, diagrams) */
.panel-img--contain.panel-img--tall {
  max-height: 360px;
  aspect-ratio: 9 / 14;
}

#battle-canvas,
#cards-2hh,
#cards-badugi {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 480 / 300;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 28%, var(--border));
  border-radius: 6px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, color-mix(in srgb, var(--theme-accent) 12%, #08080c), #08080c);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.35s var(--ease-spring);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 0 24px color-mix(in srgb, var(--theme-accent) 8%, transparent);
}

#cards-2hh,
#cards-badugi {
  min-height: 220px;
  box-shadow:
    inset 0 0 48px rgba(0, 0, 0, 0.42),
    0 12px 36px rgba(0, 0, 0, 0.28),
    0 0 28px color-mix(in srgb, var(--theme-accent) 14%, transparent);
}

#battle-canvas:hover,
#cards-2hh:hover,
#cards-badugi:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 50%, var(--border));
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.3),
    0 0 36px color-mix(in srgb, var(--theme-accent) 22%, transparent);
  transform: translateY(-2px);
}

.panel-media::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--theme-accent) 35%, transparent),
    transparent 40%,
    transparent 60%,
    color-mix(in srgb, var(--theme-accent-2) 28%, transparent)
  );
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.panel-media > * {
  position: relative;
  z-index: 1;
}

.logo-inline {
  display: block;
  max-width: 180px;
  width: auto;
  height: auto;
  margin: 0.5rem auto 0;
  object-fit: contain;
  object-position: center;
  transition: transform 0.25s var(--ease-spring), opacity 0.25s;
}

.panel-media .logo-inline {
  justify-self: center;
}

.felt-card .logo-inline {
  margin-left: auto;
  margin-right: auto;
}

.logo-inline:hover {
  transform: scale(1.03);
  opacity: 0.95;
}

/* C&C dossier */
.dossier {
  border: 1px solid var(--phosphor);
  background: #050805;
  padding: 1.25rem;
  box-shadow: inset 0 0 40px rgba(57, 255, 20, 0.06);
}

.dossier-meta {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.dossier-meta div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.5rem;
  font-size: 0.8rem;
  border-bottom: 1px dashed rgba(57, 255, 20, 0.25);
  padding-bottom: 0.5rem;
}

.dossier-meta dt {
  color: var(--phosphor);
  margin: 0;
}

.dossier-meta dd {
  margin: 0;
  color: #c8f5c0;
}

/* Warcraft heraldry */
.heraldry {
  display: grid;
  place-items: center;
  min-height: 220px;
  background:
    radial-gradient(circle at 50% 40%, rgba(96, 165, 250, 0.12), transparent 60%),
    linear-gradient(180deg, #14110c, #0a0a0a);
  border: 1px solid #3d3424;
  border-radius: 4px;
}

.heraldic-plate {
  text-align: center;
  padding: 1.5rem 2rem;
  border: 2px solid var(--gold);
  background: linear-gradient(160deg, #1a1610, #0e0c09);
  box-shadow: 0 0 0 4px #2a2418, inset 0 0 30px rgba(212, 175, 55, 0.15);
}

.heraldic-plate span {
  display: block;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.heraldic-plate strong {
  display: block;
  font-size: 1.1rem;
}

.heraldic-plate em {
  display: block;
  font-size: 0.75rem;
  font-style: normal;
  color: var(--muted);
  margin-top: 0.5rem;
  font-family: var(--mono);
}

/* Poker */
.section-poker {
  max-width: none;
  background: transparent;
}

.section-poker .section-head,
.poker-grid {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.poker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.lower-third {
  grid-column: 1 / -1;
  padding: 1.35rem 1.6rem;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(13, 40, 24, 0.72));
  border-left: 4px solid var(--gold);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.lower-third:hover {
  border-left-color: #f0d060;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.3),
    0 0 28px rgba(212, 175, 55, 0.08);
}

.lt-label {
  display: block;
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.lower-third strong {
  display: block;
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  margin-bottom: 0.5rem;
}

.lower-third p {
  margin: 0;
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
  line-height: 1.65;
  max-width: 52rem;
}

.poker-photo {
  position: relative;
  margin: 0;
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 6px;
  overflow: hidden;
  /* Locked frame so landscape swaps (Advantage Play) can't resize the grid */
  aspect-ratio: 3 / 4;
  min-height: 280px;
  max-height: 520px;
  background: #0a120e;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.poker-photo:hover {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 36px rgba(74, 222, 128, 0.1);
}

.poker-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transition: transform 0.55s ease, filter 0.55s ease, opacity 0.2s ease;
}

.poker-photo:hover img {
  transform: scale(1.03);
  filter: contrast(1.04) saturate(1.05);
}

/* Gallery crossfade state — keep layout stable while src changes */
.poker-photo img.is-swapping {
  opacity: 0.35;
}

.poker-photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.85rem;
  font-size: 0.68rem;
  color: var(--gold);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  pointer-events: none;
}

/* Interactive poker blocks get an affordance */
.poker-grid [data-swap-img] {
  cursor: pointer;
}

.poker-grid [data-swap-img]:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 3px;
}

.press-strip {
  margin: 2.5rem auto 0;
  max-width: 1100px;
  padding: 1.25rem 1.35rem;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 28%, var(--border));
  border-radius: 4px;
  background: color-mix(in srgb, var(--theme-accent) 6%, rgba(0, 0, 0, 0.35));
}

.press-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.press-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.press-strip-list a {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.press-strip-list a:hover,
.press-strip-list a:focus-visible {
  border-color: color-mix(in srgb, var(--theme-accent) 40%, transparent);
  background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
}

.press-outlet {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.press-title {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text);
}

@media (min-width: 900px) {
  .press-strip-list {
    grid-template-columns: 1fr 1fr;
  }
}

.poker-cards {
  display: grid;
  gap: 1rem;
}

.felt-card {
  padding: 1.25rem;
  background: linear-gradient(160deg, #12261a, #0a120e);
  border: 1px solid #1f3d2a;
  border-radius: 4px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--ease-spring), border-color 0.25s, box-shadow 0.25s;
}

.felt-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Swap cards: no lift — translateY makes the pointer slip off and flicker the gallery */
.poker-cards .felt-card[data-swap-img]:hover,
.poker-cards .felt-card[data-swap-img]:focus-visible {
  transform: none;
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(74, 222, 128, 0.12);
}

.felt-card h3 {
  color: var(--gold);
  font-size: 1.05rem;
}

.felt-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Play 2HH */
.section-play {
  max-width: none;
  background: transparent;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.section-play .section-head {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  transition: opacity 0.35s ease, max-height 0.4s ease, margin 0.35s ease;
}

.play-panel {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, #38bdf8 25%, var(--border));
  border-radius: 8px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(56, 189, 248, 0.06);
}

.play-panel-wide {
  max-width: min(1100px, 100%);
  padding: 1.25rem;
}

.play-frame-wrap {
  --play-chrome: calc(var(--header-h) + 9.5rem);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 360px;
  max-height: min(78svh, 720px);
  margin: 0 auto 1.25rem;
  border: 1px solid color-mix(in srgb, #38bdf8 30%, var(--border));
  border-radius: 6px;
  overflow: hidden;
  background: #071018;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(56, 189, 248, 0.08);
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
  scroll-margin-bottom: 1.5rem;
}

/* Locked viewport fit — no internal scroll, sized to the site chrome */
.play-frame-wrap.is-live {
  width: min(100%, 1120px);
  height: min(calc(100dvh - var(--play-chrome)), 720px);
  max-height: min(calc(100dvh - var(--play-chrome)), 720px);
  min-height: 0;
  aspect-ratio: auto;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

@supports not (height: 100dvh) {
  .play-frame-wrap.is-live {
    height: min(calc(100svh - var(--play-chrome)), 720px);
    max-height: min(calc(100svh - var(--play-chrome)), 720px);
  }
}

/* Live table: tighten chrome so the app can sit centered in view */
.section-play.is-playing {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.section-play.is-playing .section-head {
  display: none;
}

.section-play.is-playing .play-panel-wide {
  max-width: min(1160px, 100%);
  padding: 0.35rem;
}

.section-play.is-playing .play-credit,
.section-play.is-playing .play-credit-line {
  display: none;
}

.section-play.is-playing .play-frame-wrap {
  margin-bottom: 0.45rem;
}

.section-play.is-playing .play-ctas {
  margin-bottom: 0;
  margin-top: 0;
}

/* Keep play CTAs as a compact single row so the table keeps height */
@media (max-width: 768px) {
  .section-play.is-playing .play-ctas {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .section-play.is-playing .play-ctas::-webkit-scrollbar {
    display: none;
  }

  .section-play.is-playing .play-ctas .btn,
  .section-play.is-playing .play-ctas .btn-soon {
    width: auto;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.45rem 0.7rem;
    font-size: 0.72rem;
  }
}

.play-center-btn {
  display: none;
}

.section-play.is-playing .play-center-btn {
  display: inline-flex;
}

body.play-2hh-live #section-indicator,
body.play-2hh-immersive #section-indicator {
  opacity: 0;
  visibility: hidden;
}

/* iOS / no-Fullscreen API: expand table to the viewport */
.play-frame-wrap.is-immersive {
  position: fixed;
  inset: 0;
  z-index: 220;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

body.play-2hh-immersive {
  overflow: hidden;
}

body.play-2hh-immersive .site-header,
body.play-2hh-immersive .play-ctas {
  visibility: hidden;
  pointer-events: none;
}

.play-immersive-exit {
  position: absolute;
  top: max(0.75rem, var(--safe-top));
  right: max(0.75rem, var(--safe-right));
  z-index: 5;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.play-immersive-exit[hidden] {
  display: none !important;
}

.play-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0a0a;
  margin: 0 auto;
  overflow: hidden;
  overscroll-behavior: none;
}

.play-frame-wrap.is-live iframe {
  /* Lock the embed to the frame — no nested scrolling in the host page */
  pointer-events: auto;
  max-width: 100%;
  max-height: 100%;
}

.play-frame-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(56, 189, 248, 0.12), transparent 55%),
    rgba(7, 12, 18, 0.92);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.play-frame-wrap.is-live .play-frame-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-frame-overlay .play-logo {
  margin-bottom: 0.25rem;
}

.play-logo {
  display: block;
  max-width: 220px;
  width: auto;
  height: auto;
  margin: 0 auto 1.5rem;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 768px) {
  .play-frame-wrap {
    --play-chrome: calc(var(--header-h) + 8rem);
    min-height: 280px;
    aspect-ratio: 4 / 5;
    max-height: 70svh;
  }

  .play-frame-wrap.is-live {
    width: 100%;
    height: min(calc(100dvh - var(--play-chrome)), 640px);
    max-height: min(calc(100dvh - var(--play-chrome)), 640px);
  }

  @supports not (height: 100dvh) {
    .play-frame-wrap.is-live {
      height: min(calc(100svh - var(--play-chrome)), 640px);
      max-height: min(calc(100svh - var(--play-chrome)), 640px);
    }
  }
}

.play-ctas {
  justify-content: center;
  margin-bottom: 1.5rem;
}

.btn-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.35rem;
  border: 1px dashed var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: default;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
}

.play-credit {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.play-credit-line {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.play-credit-line a {
  color: var(--text);
  border-bottom: 1px solid rgba(56, 189, 248, 0.45);
}

.play-credit-line a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer-meta a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.footer-meta a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Contact */
.contact {
  text-align: center;
  padding-bottom: 6rem;
}

.contact .section-head {
  margin-left: auto;
  margin-right: auto;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto;
  max-width: 56rem;
}

.contact .btn-lg {
  flex-direction: column;
  gap: 0.35rem;
  min-width: min(100%, 20rem);
  flex: 1 1 18rem;
}

.contact-email,
.contact-ig {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.88;
}

.contact-ig {
  display: block;
  margin-top: 0.15rem;
  letter-spacing: 0.06em;
}

.footer-meta {
  margin-top: 2.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.7;
}

.footer-meta .ig-inline {
  font-size: 0.78rem;
}

/* ========== Responsive breakpoints ========== */

/* Large desktop */
@media (min-width: 1400px) {
  .hero-grid,
  .section,
  .section-poker .section-head,
  .poker-grid,
  .about-layout {
    max-width: 1200px;
  }
}

/* Ultrawide — keep composition centered, avoid stretched text lines */
@media (min-width: 1800px) {
  :root {
    --pad-x: clamp(1.5rem, 4vw, 2.5rem);
  }

  .hero-grid,
  .section,
  .section-poker .section-head,
  .poker-grid,
  .about-layout {
    max-width: 1320px;
  }

  .play-panel-wide {
    max-width: min(1240px, 100%);
  }
}

/* Tablet & below: single-column content grids */
@media (max-width: 1023px) {
  .hero-grid,
  .panel-grid,
  .poker-grid,
  .about-layout,
  .book-layout {
    grid-template-columns: 1fr;
  }

  .book-showcase {
    order: -1;
  }

  .about-aside {
    position: static;
  }

  .about-portrait img {
    max-height: 320px;
  }

  .hero {
    min-height: auto;
    align-items: flex-start;
  }

  /* Copy stays first so the brand + CTAs land above the fold */
  .hero-stage {
    max-width: 480px;
    margin-inline: auto;
    width: 100%;
  }

  .brand-callsign {
    font-size: clamp(2.4rem, 11vw, 3.5rem);
  }

  .hero-portrait,
  .about-portrait {
    margin-inline: auto;
    max-width: 420px;
  }

  .scroll-cue {
    display: none;
  }

  .lower-third {
    grid-column: auto;
  }

  .poker-photo {
    min-height: 220px;
    max-height: 360px;
    aspect-ratio: 4 / 5;
  }
}

/* Small tablet / large phone */
@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  .brand-text {
    font-size: 0.92rem;
  }

  .command-nav .hk {
    display: none;
  }

  .command-nav a {
    padding: 0.45rem 0.55rem;
    font-size: 0.74rem;
  }

  .tab-panel {
    padding: 1.35rem 1rem;
  }

  .stat-list li,
  .career-timeline li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .stat-list span {
    font-size: 0.7rem;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn,
  .play-ctas .btn-soon {
    width: 100%;
  }

  .hint-desktop {
    display: none;
  }

  .hint-touch {
    display: inline;
  }

  .transmission {
    font-size: 0.98rem;
  }

  .contact .btn-lg {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .break-sm {
    display: block;
  }
}

/* Very narrow phones */
@media (max-width: 359px) {
  :root {
    --header-h: 52px;
    --pad-x: 0.7rem;
    --section-y: clamp(2.25rem, 7vw, 3.5rem);
  }

  .brand-text {
    font-size: 0.82rem;
  }

  .command-nav a {
    padding: 0.5rem 0.65rem;
    font-size: 0.7rem;
  }

  .hero-stats {
    gap: 0.55rem;
  }

  .btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .play-frame-wrap {
    min-height: 240px;
  }
}

/* Stack menu under brand; keep IG pinned top-right */
@media (max-width: 900px) {
  :root {
    /* Two-row header before JS measures — avoid content under nav on first paint */
    --header-h: 104px;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .brand {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-tools {
    display: contents;
  }

  .command-nav {
    order: 3;
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
  }

  .nav-social {
    order: 2;
    margin-left: auto;
  }
}

/* Phone */
@media (max-width: 480px) {


  .hero-portrait img {
    max-height: 48svh;
    aspect-ratio: 3 / 4;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-sub {
    font-size: 0.98rem;
  }

  .eyebrow,
  .eyebrow-badge {
    font-size: 0.65rem;
    line-height: 1.4;
  }

  .tablist [role="tab"] {
    padding: 0.85rem 0.9rem;
    font-size: 0.68rem;
  }

  .panel-img {
    max-height: 220px;
  }
}

/* Landscape phones: keep content usable */
@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
  }

  .hero-portrait img {
    max-height: 55svh;
  }
}

/* Touch / coarse pointer: prefer tap feedback over hover lift */
@media (hover: none), (pointer: coarse) {
  .command-nav a:hover,
  .nav-ig:hover,
  .nav-social-link:hover,
  .btn:hover,
  .hero-stats li:hover,
  .felt-card:hover,
  .panel-img:hover,
  .stat-list li:hover,
  .poker-photo:hover img,
  .logo-inline:hover {
    transform: none;
  }

  .command-nav a:active,
  .nav-ig:active,
  .nav-social-link:active,
  .btn:active,
  .tablist [role="tab"]:active {
    transform: scale(0.98);
  }

  .hint-desktop {
    display: none;
  }

  .hint-touch {
    display: inline;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #webgl-bg { display: none; }

  html.reveal-on [data-reveal],
  html.reveal-on [data-reveal="stagger"] .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
    pointer-events: auto !important;
  }

  html.reveal-on [data-reveal="float"].is-inview:not([data-parallax]),
  html.reveal-on [data-reveal="warp"].is-inview .panel-media,
  html.reveal-on [data-reveal="deal"].is-inview .panel-media,
  html.reveal-on [data-reveal="drop"].is-inview .heraldic-plate,
  html.reveal-on [data-reveal="scan"].is-inview .dossier {
    animation: none !important;
  }

  .scroll-progress-bar {
    transition: none;
  }

  [data-parallax] {
    transform: none !important;
  }

  .hero-fog::before,
  .hero-fog::after,
  .badge-dot,
  .scroll-cue-chevron {
    animation: none !important;
  }
}

/* Print: strip HUD chrome */
@media print {
  #webgl-bg,
  #section-indicator,
  #bg-stage,
  .site-header {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    padding: 0;
  }

  .section {
    break-inside: avoid;
  }
}
