/* ============================================================
   CHESS-PONG — main.css
   Design tokens → Reset → Layout → Typography → Components
   → Sections → WOW layer → RWD
   ============================================================ */

/* ── TOKENS ────────────────────────────────────────────────── */
:root {
  /* Palette */
  --bg:           #0d0d0d;
  --bg-2:         #121212;
  --bg-card:      #18181899;
  --bg-card-alt:  #1e1e1e99;
  --border:       rgba(255,255,255,.07);
  --border-hover: rgba(255,255,255,.18);
  --text:         #e8e8e8;
  --text-muted:   #888;
  --text-dim:     #555;
  --accent:       #c9a84c;   /* gold — chess */
  --accent-glow:  rgba(201,168,76,.25);
  --accent-2:     #4ca8c9;   /* ping-pong teal */
  --danger:       #e05c5c;
  --ok:           #5ce07c;

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --sp-xs:  .4rem;
  --sp-sm:  .8rem;
  --sp-md:  1.6rem;
  --sp-lg:  3rem;
  --sp-xl:  5rem;
  --sp-2xl: 8rem;

  /* Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  /* Transitions */
  --t-fast:   150ms ease;
  --t-normal: 300ms ease;
  --t-slow:   600ms cubic-bezier(.16,1,.3,1);

  /* Misc */
  --nav-h:      68px;
  --max-w:      960px;
  --max-w-wide: 1200px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100dvh;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── CANVAS / GRAIN OVERLAY — inside .hero only ─────────────── */
#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .65;
}
#grain-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: .04;
}

/* ── LAYOUT HELPERS ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.container--wide { max-width: var(--max-w-wide); }

/* ── TYPOGRAPHY SCALE ───────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.1; font-weight: 700; }
h1 { font-size: clamp(3.5rem, 11vw, 9rem); font-family: var(--font-display); letter-spacing: .04em; }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-family: var(--font-display); letter-spacing: .03em; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
p  { font-size: clamp(.95rem, 1.5vw, 1.05rem); color: var(--text-muted); line-height: 1.75; }
strong { color: var(--text); }
em { font-style: italic; color: var(--accent); }

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

/* ── NAVIGATION ─────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  height: var(--nav-h);
  max-width: var(--max-w-wide);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: .06em;
  color: var(--text);
  flex-shrink: 0;
  transition: color var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.1;
  text-decoration: none;
}
.nav-logo:hover { color: var(--accent); }
.nav-logo__stack {
  display: grid;
  justify-items: start;
  grid-template-columns: 1fr;
  row-gap: 1px;
}
.nav-logo__valley {
  font-family: var(--font-body);
  font-size: clamp(0.52rem, 1.05vw, 0.64rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.15;
}
.nav-logo__title {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.logo-chess { font-size: 1.2em; }
.logo-ping  { color: var(--accent-2); font-size: .9em; }

#nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .05rem;
  list-style: none;
  margin-inline-start: auto;
  align-items: center;
}
.nav-link {
  padding: .35rem .65rem;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: .65rem; right: .65rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-normal);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link--active { color: var(--accent); }
.nav-link--active::after { transform: scaleX(1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  margin-inline-start: auto;
  z-index: 10;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t-normal), opacity var(--t-normal);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .04em;
  transition: transform var(--t-normal), box-shadow var(--t-normal), background var(--t-normal), border-color var(--t-normal);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 20px rgba(201,168,76,.2);
}
.btn--primary:hover { box-shadow: 0 6px 30px rgba(201,168,76,.45); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  transition: border-color var(--t-normal), box-shadow var(--t-normal), transform var(--t-slow);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  transform: translateY(-3px);
}
.card__icon {
  font-size: 1.8rem;
  margin-bottom: var(--sp-sm);
  filter: grayscale(.3);
}
.card h3 { margin-bottom: .5rem; color: var(--text); }
.card p  { color: var(--text-muted); }

.card--ok     { border-color: rgba(92,224,124,.2); }
.card--ok .card__label { color: var(--ok); }
.card--changed { border-color: rgba(201,168,76,.25); }
.card__label   { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .4rem; color: var(--text-dim); }
.card__label--changed { color: var(--accent); }

.card--crazy .card__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--border-hover);
  line-height: 1;
  margin-bottom: .4rem;
}
.card--party { border-color: rgba(76,168,201,.2); }
.card--party .card__icon { filter: none; }

/* Card grids */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: var(--sp-md);
  margin-top: var(--sp-lg);
}
.cards--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }

/* Crazy page: fixed 2 columns (not 3/4 like other .cards--wide grids) */
.section--crazy .cards.cards--wide {
  grid-template-columns: repeat(2, 1fr);
}

/* ── CALLOUT ────────────────────────────────────────────────── */
.callout {
  background: var(--bg-card-alt);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  margin-top: var(--sp-lg);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.65;
}
.callout--warning { border-color: var(--danger); }
.callout--warning strong { color: var(--danger); }
.callout--party { border-color: var(--accent-2); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-md); justify-content: space-between; }
.callout--cta   { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-md); }

/* ── SECTIONS (shared) ──────────────────────────────────────── */
.section {
  padding-block: var(--sp-2xl);
  position: relative;
}
.section__title { margin-bottom: .75rem; }
.section__lead  { font-size: clamp(1.1rem, 2.5vw, 1.3rem); color: var(--text-muted); max-width: 60ch; margin-bottom: var(--sp-lg); }
.subsection-title { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: .04em; margin-block: var(--sp-lg) var(--sp-md); color: var(--text); }

/* Separator between sections */
.section + .section::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--border);
  margin-bottom: var(--sp-2xl);
  position: absolute;
  top: 0; left: clamp(1rem,4vw,2.5rem); right: clamp(1rem,4vw,2.5rem);
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-block: var(--sp-xl);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* When 3D canvas is off (no WebGL), subtle depth behind grain + vignette */
.hero.hero--static-bg {
  background:
    radial-gradient(ellipse 90% 75% at 18% 38%, rgba(76, 168, 201, 0.14) 0%, transparent 52%),
    radial-gradient(ellipse 55% 45% at 82% 58%, rgba(201, 168, 76, 0.1) 0%, transparent 48%),
    linear-gradient(168deg, var(--bg-2) 0%, var(--bg) 42%, #0a1622 100%);
}
/* canvas z-index: 0, grain: 1, vignette: 2, inner content: 3 */
.hero__inner { position: relative; z-index: 3; }
.hero__brand {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: start;
  row-gap: 0.35rem;
  margin-bottom: var(--sp-md);
}
.hero__brand-valley {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: left;
  line-height: 1.2;
}
.hero__title {
  margin: 0;
  padding: 0;
  margin-left: 0;
  padding-left: 0;
  line-height: .9;
  color: #fff;
  text-shadow: 0 0 80px rgba(201,168,76,.15);
}
.hero__brand-tag {
  margin: 0;
  padding: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--text-dim);
  text-align: left;
  line-height: 1.4;
}
.hero__dash { color: var(--accent-2); margin-inline: .05em; }
.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  letter-spacing: .06em;
  color: var(--text-muted);
  line-height: 1.2;
  margin-bottom: var(--sp-md);
}
.hero__subtitle em { font-style: normal; color: var(--danger); }
.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: var(--sp-lg);
  line-height: 1.65;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.hero__scroll-hint {
  position: absolute;
  bottom: -60px;
  left: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  color: var(--text-dim);
  letter-spacing: .1em;
}
.scroll-arrow { animation: bounce 1.6s ease-in-out infinite; display: inline-block; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, transparent 30%, rgba(13,13,13,.85) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ── IDEA ────────────────────────────────────────────────────── */
.idea-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-sm);
  margin-block: var(--sp-lg);
}
.idea-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  text-align: center;
  min-width: 130px;
  flex: 1 1 130px;
  max-width: 200px;
  transition: border-color var(--t-normal), transform var(--t-slow);
}
.idea-step:hover { border-color: var(--accent); transform: translateY(-3px); }
.idea-step__icon { font-size: 2rem; margin-bottom: .5rem; }
.idea-step p { font-size: .9rem; color: var(--text-muted); margin: 0; line-height: 1.4; }
.idea-step__arrow { font-size: 1.5rem; color: var(--accent); flex-shrink: 0; }
.idea-bonus {
  background: linear-gradient(135deg, rgba(76,168,201,.08), rgba(201,168,76,.06));
  border: 1px solid rgba(76,168,201,.25);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  margin-top: var(--sp-lg);
}
.idea-bonus h3 { color: var(--accent-2); margin-bottom: .5rem; }
.idea-bonus p  { color: var(--text-muted); }

/* ── STEPS (turn / start) ───────────────────────────────────── */
.steps { list-style: none; display: flex; flex-direction: column; gap: var(--sp-md); margin-top: var(--sp-lg); }
.step {
  display: flex;
  gap: var(--sp-md);
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  transition: border-color var(--t-normal);
}
.step:hover { border-color: var(--border-hover); }
.step__num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 2.5rem;
}
.step__body h3, .step__body h4 { color: var(--text); margin-bottom: .3rem; }
.step__body p { margin: 0; color: var(--text-muted); }

/* ── TURN EXAMPLE TABLE ─────────────────────────────────────── */
.turn-example { margin-top: var(--sp-xl); }
.turn-example h3 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: var(--sp-md); letter-spacing: .04em; }
.example-table { display: flex; flex-direction: column; gap: 2px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.example-row {
  display: grid;
  grid-template-columns: 60px 130px 1fr;
  gap: var(--sp-sm);
  padding: .75rem var(--sp-md);
  background: var(--bg-card);
  font-size: .9rem;
}
.example-row--header { background: var(--bg-card-alt); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); font-weight: 600; }
.example-row--highlight { background: rgba(201,168,76,.07); border-left: 3px solid var(--accent); }

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; margin-top: var(--sp-lg); position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 20px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
}
.timeline__item {
  display: flex;
  gap: var(--sp-md);
  padding-bottom: var(--sp-lg);
  position: relative;
}
.timeline__marker {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
  z-index: 1;
  position: relative;
}
.timeline__marker--a { background: var(--accent); color: #000; }
.timeline__marker--b { background: var(--accent-2); color: #000; }
.timeline__body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  flex: 1;
}
.timeline__body h3 { color: var(--text); margin-bottom: .5rem; }
.timeline__body p  { color: var(--text-muted); margin-bottom: .5rem; }
.timeline__highlight { color: var(--accent) !important; font-weight: 600; font-size: .9rem; }
.timeline__result    { color: var(--ok) !important; font-weight: 700; }

/* ── PARTY ───────────────────────────────────────────────────── */
.party-hero {
  background: linear-gradient(135deg, rgba(76,168,201,.1), rgba(201,168,76,.07));
  border: 1px solid rgba(76,168,201,.3);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  margin-top: var(--sp-lg);
  position: relative;
}
.party-badge {
  display: inline-flex;
  background: var(--accent-2);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border-radius: 100px;
  margin-bottom: var(--sp-sm);
}
.party-hero h3 { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--text); margin-bottom: .75rem; }
.party-hero p  { color: var(--text-muted); max-width: 65ch; }

.party-extension {
  background: linear-gradient(135deg, rgba(201,76,76,.12), rgba(201,168,76,.08));
  border: 1px solid rgba(201,76,76,.35);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  margin-top: var(--sp-xl);
  position: relative;
}
.party-extension h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); color: var(--text); margin-bottom: .75rem; }
.party-extension p  { color: var(--text-muted); max-width: 65ch; }
.party-extension p + p { margin-top: .75rem; }
.party-extension__note { font-size: .88rem; opacity: .75; }
.party-badge--shot {
  background: linear-gradient(90deg, #c94c4c, #c9a84c);
  color: #fff;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}
.scenario {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
  font-size: .9rem;
  color: var(--text-muted);
  transition: border-color var(--t-normal), transform var(--t-slow);
}
.scenario:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.scenario__icon { font-size: 1.8rem; }

/* ── CHECKLIST ───────────────────────────────────────────────── */
.checklist { margin-top: var(--sp-lg); }
.checklist h3 { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: .04em; margin-bottom: var(--sp-md); }
.checklist ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-md); }
.checklist__item {
  display: flex;
  gap: var(--sp-md);
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
}
.checklist__check {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(92,224,124,.15);
  border: 1px solid rgba(92,224,124,.4);
  color: var(--ok);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.checklist__check--star {
  background: rgba(201,168,76,.15);
  border-color: rgba(201,168,76,.4);
  color: var(--accent);
}
.checklist__item strong { color: var(--text); display: block; margin-bottom: .2rem; }
.checklist__item p { color: var(--text-muted); font-size: .9rem; margin: 0; }

.start-steps { margin-top: var(--sp-xl); }
.start-steps h3 { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: .04em; margin-bottom: var(--sp-md); }

/* ── SCORE LIST ──────────────────────────────────────────────── */
.score-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; margin-top: .75rem; }
.score-list li { font-size: .95rem; color: var(--text-muted); }
.score-list strong { color: var(--accent); font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .04em; }

/* ── SITE MAP ────────────────────────────────────────────────── */
.sitemap-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; margin-top: var(--sp-lg); }
.sitemap-item { border-bottom: 1px solid var(--border); }
.sitemap-link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-md);
  padding: .9rem .5rem;
  transition: color var(--t-fast);
}
.sitemap-link:hover { color: var(--accent); }
.sitemap-nav  { font-weight: 600; color: var(--text); white-space: nowrap; min-width: 160px; }
.sitemap-desc { font-size: .9rem; color: var(--text-dim); }

/* ── FOOTER ──────────────────────────────────────────────────── */
#site-footer {
  padding-block: var(--sp-xl);
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-muted);
  letter-spacing: .1em;
  margin-bottom: var(--sp-md);
}
.footer-nav  { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem var(--sp-md); margin-bottom: var(--sp-md); }
.footer-nav a { font-size: .85rem; color: var(--text-dim); transition: color var(--t-fast); }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: .8rem; color: var(--text-dim); }

/* ── WOW: SCROLL REVEAL ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal--delay-1 { transition-delay: .05s; }
.reveal--delay-2 { transition-delay: .12s; }
.reveal--delay-3 { transition-delay: .22s; }
.reveal--delay-4 { transition-delay: .34s; }
.reveal--delay-5 { transition-delay: .48s; }
.reveal--delay-6 { transition-delay: .65s; }
.reveal--delay-7 { transition-delay: .82s; }
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children */
.stagger-children.is-visible > * { opacity: 1; transform: translateY(0); }
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.stagger-children.is-visible > *:nth-child(1)  { transition-delay: .05s; }
.stagger-children.is-visible > *:nth-child(2)  { transition-delay: .13s; }
.stagger-children.is-visible > *:nth-child(3)  { transition-delay: .21s; }
.stagger-children.is-visible > *:nth-child(4)  { transition-delay: .29s; }
.stagger-children.is-visible > *:nth-child(5)  { transition-delay: .37s; }
.stagger-children.is-visible > *:nth-child(6)  { transition-delay: .45s; }
.stagger-children.is-visible > *:nth-child(7)  { transition-delay: .53s; }
.stagger-children.is-visible > *:nth-child(8)  { transition-delay: .61s; }

/* ── PJAX TRANSITION ─────────────────────────────────────────── */
#main-content {
  transition: opacity 220ms ease, transform 220ms ease;
}
#main-content.pjax-out {
  opacity: 0;
  transform: translateY(10px);
}
#main-content.pjax-in  {
  opacity: 0;
  transform: translateY(-6px);
}

/* Fixed centered OG art behind main on all pages except home (slug hero) */
body:not([data-slug="hero"]) #main-content {
  position: relative;
  isolation: isolate;
}
body:not([data-slug="hero"]) #main-content::before {
  content: '';
  position: fixed;
  z-index: 0;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(180deg, rgba(13, 13, 13, 0.82) 0%, rgba(13, 13, 13, 0.9) 100%),
    url('../img/bg.webp') center center / cover no-repeat;
  pointer-events: none;
}
body:not([data-slug="hero"]) #main-content > * {
  position: relative;
  z-index: 1;
}

/* ── REDUCED MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal, .stagger-children > * { opacity: 1; transform: none; }
}

/* ── RWD ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  #nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(13,13,13,.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--sp-md);
    border-bottom: 1px solid var(--border);
    gap: .25rem;
  }
  #nav-menu.is-open { display: flex; }
  .nav-link { font-size: .9rem; padding: .6rem 1rem; display: block; }
  #gt-element { margin-inline-start: 0; padding: .5rem 1rem; }
}

@media (max-width: 640px) {
  .section--crazy .cards.cards--wide { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .idea-flow { flex-direction: column; align-items: stretch; }
  .idea-step { max-width: 100%; }
  .idea-step__arrow { transform: rotate(90deg); align-self: center; }
  .example-row { grid-template-columns: 50px 1fr; }
  .example-row span:last-child { grid-column: 1/-1; color: var(--text-muted); font-size: .82rem; }
  .timeline::before { left: 16px; }
  .callout--party, .callout--cta { flex-direction: column; align-items: flex-start; }
  .callout--cta .btn { width: 100%; justify-content: center; }
}

@media (min-width: 1400px) {
  .cards--wide { grid-template-columns: repeat(3, 1fr); }
  .section--crazy .cards.cards--wide { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1900px) {
  .cards--wide { grid-template-columns: repeat(4, 1fr); }
  .section--crazy .cards.cards--wide { grid-template-columns: repeat(2, 1fr); }
}
