/* ==========================================================================
   TEAM 7415 JAGUAR ROBOTICS — 2026 TECHNICAL BINDER
   Black / red theme. No build step — plain CSS.
   ========================================================================== */

:root {
  --bg: #0a0a0b;
  --bg-soft: #101012;
  --panel: #141416;
  --panel-2: #1a1a1d;
  --line: #232328;
  --line-soft: #1b1b1f;
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --faint: #6b6b74;
  --red: #e10600;
  --red-bright: #ff2e26;
  --red-dim: rgba(225, 6, 0, 0.14);
  --red-line: rgba(225, 6, 0, 0.4);
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
li::marker { color: var(--red); }

body {
  background:
    radial-gradient(1200px 600px at 70% -200px, rgba(225, 6, 0, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--red); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2c2c32; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; padding: 10px 18px; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------- type --- */

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-transform: none;
  text-wrap: balance;
  margin: 14px 0 10px;
}
.section-title::after {
  content: "."; color: var(--red); font-style: italic;
  text-shadow: 0 0 18px rgba(225, 6, 0, 0.65);
}

.lede { color: var(--muted); font-size: 1.06rem; max-width: 56ch; text-wrap: pretty; }

/* spec values (ratios, sizes, speeds) get the mono treatment via JS */
.spec {
  font-family: var(--font-mono); font-size: 0.88em; font-weight: 600;
  color: #ffb4b0;
}

/* ---------------------------------------------------------------- nav --- */

#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--red), var(--red-bright));
  z-index: 120;
  transition: width 80ms linear;
}

.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  background: transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 11, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav-inner { display: flex; align-items: center; gap: 28px; width: min(1380px, 100% - 48px); margin-inline: auto; }

.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand-name {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: 1.12rem; letter-spacing: 0.02em;
}
.brand-name em { font-style: italic; color: var(--red-bright); }
.brand-sub {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.3em;
  color: var(--muted); text-transform: uppercase;
  border-left: 1px solid var(--line); padding-left: 12px;
}
.brand-sub b { color: var(--red-bright); font-weight: 600; }

.nav-links { display: flex; gap: 4px; margin-left: auto; list-style: none; }
.nav-links a, .nav-links .navbtn {
  position: relative; display: block; padding: 8px 13px;
  font-size: 0.85rem; font-weight: 600; color: var(--muted);
  text-decoration: none; letter-spacing: 0.02em;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  transition: color 0.2s;
}
.nav-links a::after, .nav-links .navbtn::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a.active, .nav-links .navbtn:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after, .nav-links .navbtn:hover::after { transform: scaleX(1); }
.nav-links .pdf { color: var(--red-bright); }
.nav-links .navbtn.pdf:hover { color: var(--red-bright); }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s, top 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* --------------------------------------------------------------- hero --- */

.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 28px) 0 40px;
  position: relative;
}

.hero-head { text-align: center; }
.hero-team {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.42em; text-transform: uppercase; color: var(--red-bright);
}
.hero-name {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: clamp(3.2rem, 9.5vw, 7.2rem); line-height: 1;
  letter-spacing: -0.01em; text-transform: uppercase;
  margin-top: 10px;
}
.hero-name .dot { color: var(--red); text-shadow: 0 0 24px rgba(225, 6, 0, 0.7); }

.hero-sub {
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--faint);
}

.hero-stage-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(420px, 760px) 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 8px;
}

.hero-stage { position: relative; aspect-ratio: 4 / 3; }
.hero-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
/* isolation layers crossfade into each other with a slight scale morph */
.hero-stage .iso-layer {
  opacity: 0; transform: scale(1.025);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}
.hero-stage .iso-layer.show { opacity: 1; transform: scale(1); }
#hero-base { transition: opacity 0.5s var(--ease); }
.hero-stage.isolating #hero-base { opacity: 0.12; }

/* entrance animation (skipped for reduced-motion users) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes riseIn {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
  }
  .hero-team { animation: riseIn 0.8s var(--ease) 0.05s both; }
  .hero-name { animation: riseIn 0.9s var(--ease) 0.18s both; }
  .hero-stage { animation: riseIn 1s var(--ease) 0.32s both; }
  .hero-col .callout { animation: riseIn 0.7s var(--ease) both; }
  .hero-col .callout:nth-of-type(1) { animation-delay: 0.55s; }
  .hero-col .callout:nth-of-type(2) { animation-delay: 0.7s; }
  .hero-col .callout:nth-of-type(3) { animation-delay: 0.85s; }
}

/* dots over the render */
.hero-dot {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  pointer-events: none;
}
.hero-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: ping 2.8s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  70%, 100% { transform: scale(2); opacity: 0; }
}
.hero-dot.near {
  background: var(--red-bright);
  box-shadow: 0 0 0 4px rgba(225, 6, 0, 0.2), 0 0 14px rgba(225, 6, 0, 0.5);
}
.hero-dot.active {
  background: var(--red-bright);
  box-shadow: 0 0 0 6px rgba(225, 6, 0, 0.25), 0 0 22px rgba(225, 6, 0, 0.8);
  transform: scale(1.25);
}
.hero-dot.active::after { border-color: rgba(225, 6, 0, 0.7); }

/* countdown ring while the auto-showcase holds a subsystem
   (duration must match STEP_MS in main.js) */
@property --dial {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}
.hero-dot.auto::before {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  background: conic-gradient(var(--red-bright) var(--dial), rgba(255, 255, 255, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
  animation: dial 2.4s linear forwards;
}
@keyframes dial { from { --dial: 0%; } to { --dial: 100%; } }

.callout-lines {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}
.callout-lines line {
  stroke: #3a3a41; stroke-width: 1;
  transition: stroke 0.2s;
}
.callout-lines line.active { stroke: var(--red-bright); stroke-width: 1.5; }

.hero-col { display: flex; flex-direction: column; gap: 34px; z-index: 2; }
.hero-col.left { align-items: flex-end; text-align: right; }
.hero-col.right { align-items: flex-start; text-align: left; }

.callout {
  background: none; border: 0; cursor: pointer; color: inherit;
  font: inherit; text-align: inherit; max-width: 240px;
  padding: 6px 2px;
  transition: opacity 0.35s var(--ease);
}
/* funnel attention to the isolated subsystem */
.hero-stage-wrap.has-active .callout:not(.active) { opacity: 0.45; }
.callout .c-label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint);
  transition: color 0.2s;
}
.callout .c-desc {
  margin-top: 6px; font-size: 0.86rem; line-height: 1.5; color: var(--muted);
  transition: color 0.2s 0.08s; /* label lights up first, description follows */
}
.callout:hover .c-label, .callout:focus-visible .c-label,
.callout.active .c-label { color: var(--red-bright); }
.callout:hover .c-desc, .callout:focus-visible .c-desc,
.callout.active .c-desc { color: var(--text); }
.callout:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 4px; }

.hero-scroll {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted);
  display: grid; place-items: center; text-decoration: none;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
  animation: bob 2.6s ease-in-out infinite;
}
.hero-scroll:hover { color: var(--red-bright); border-color: var(--red-line); }
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

/* -------------------------------------------------------------- stats --- */

.stats { border-block: 1px solid var(--line-soft); background: var(--bg-soft); }
.stats-row {
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.stat {
  padding: 34px 18px; text-align: center;
  border-left: 1px solid var(--line-soft);
}
.stat:first-child { border-left: 0; }
.stat .n {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat .n b { color: var(--red-bright); font-weight: 900; }
.stat .l {
  margin-top: 8px; font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--faint);
}

/* ----------------------------------------------------------- contents --- */

.contents { padding: 110px 0 90px; }
.contents-head { display: flex; align-items: baseline; gap: 24px; }
.contents-head .rule { flex: 1; height: 1px; background: var(--line); }
.contents-head .kicker { white-space: nowrap; }

.toc-group { margin-top: 52px; }
.toc-group > .kicker { display: block; margin-bottom: 6px; }
.toc { list-style: none; }
.toc a {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center;
  gap: 18px; padding: 19px 6px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  transition: padding-left 0.25s var(--ease), background 0.25s;
}
.toc li:first-child a { border-top: 1px solid var(--line-soft); }
.toc .num {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint);
  transition: transform 0.25s var(--ease), color 0.25s;
}
.toc a:hover .num { transform: translateX(-4px); }
.toc .name { font-size: 1.18rem; font-weight: 650; letter-spacing: 0.01em; }
.toc .go {
  font-family: var(--font-mono); color: var(--red-bright); opacity: 0;
  transform: translateX(-8px); transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toc a:hover { padding-left: 18px; background: linear-gradient(90deg, var(--red-dim), transparent 55%); }
.toc a:hover .go { opacity: 1; transform: none; }
.toc a:hover .num { color: var(--red-bright); }

/* ------------------------------------------------------------ section --- */

.section { padding: 110px 0; scroll-margin-top: calc(var(--nav-h) + 24px); }
.section.alt {
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(225, 6, 0, 0.05), transparent 60%),
    var(--bg-soft);
  border-block: 1px solid var(--line-soft);
}

.back-toc {
  display: block; width: fit-content; margin: 56px 0 0 auto;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--faint); text-decoration: none;
  transition: color 0.2s;
}
.back-toc:hover { color: var(--red-bright); }

.split {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 76px); align-items: start;
}
.split .media { position: sticky; top: calc(var(--nav-h) + 26px); }
.split.flip .media { order: 2; }

.media-frame {
  position: relative; border: 1px solid var(--line-soft); border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 40%),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: border-color 0.25s;
}
.media-frame:hover { border-color: var(--red-line); }
.media-frame::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.media-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; transition: opacity 0.1s ease; }
.media-frame img.swapping { opacity: 0; }

/* frames with view toggles run two stacked layers that crossfade/morph */
.media-frame.xfade { aspect-ratio: 4 / 3; }
.media-frame.xfade img {
  position: absolute; inset: 0; height: 100%; aspect-ratio: auto;
  opacity: 1; transform: scale(1);
  transition: opacity 0.45s var(--ease), transform 0.65s var(--ease);
}
.media-frame.xfade img.out { opacity: 0; transform: scale(1.03); pointer-events: none; }

.media-caption {
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; line-height: 1.6; color: var(--faint);
}

.views {
  display: inline-flex; gap: 4px; margin-top: 16px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 999px;
}
.views button {
  border: 0; cursor: pointer; border-radius: 999px;
  background: transparent; color: var(--muted);
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  padding: 9px 18px;
  transition: background 0.2s, color 0.2s;
}
.views button:hover { color: var(--text); }
.views button.active { background: var(--red); color: #fff; }

.sec-num { display: flex; align-items: center; gap: 14px; }
.sec-num .rule {
  width: 44px; height: 1px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease) 0.25s;
}
.sec-num.reveal.in .rule { transform: scaleX(1); }

.features-label {
  margin: 34px 0 4px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint);
  padding-bottom: 12px; border-bottom: 1px solid var(--line-soft);
}

.features { list-style: none; }
.features > li { padding: 18px 0 2px; }
/* feature rows cascade in one-by-one */
.features.reveal > li {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.features.reveal.in > li { opacity: 1; transform: none; }
.features.reveal.in > li:nth-child(2) { transition-delay: 0.06s; }
.features.reveal.in > li:nth-child(3) { transition-delay: 0.12s; }
.features.reveal.in > li:nth-child(4) { transition-delay: 0.18s; }
.features.reveal.in > li:nth-child(5) { transition-delay: 0.24s; }
.features.reveal.in > li:nth-child(6) { transition-delay: 0.3s; }
.features.reveal.in > li:nth-child(7) { transition-delay: 0.36s; }
.features.reveal.in > li:nth-child(8) { transition-delay: 0.42s; }
.features > li > .f {
  position: relative; padding-left: 24px; font-weight: 650; font-size: 1.02rem;
}
.features > li > .f::before {
  content: ""; position: absolute; left: 2px; top: 0.52em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 10px rgba(225, 6, 0, 0.7);
}
.features .sub { list-style: none; margin: 8px 0 4px 24px; }
.features .sub li {
  position: relative; padding: 4px 0 4px 20px;
  color: var(--muted); font-size: 0.95rem;
}
.features .sub li::before {
  content: ""; position: absolute; left: 0; top: 0.95em;
  width: 10px; height: 1.5px; background: #4a4a52;
}

/* robot goals scorecard */
.g-intro { margin-top: 14px; color: var(--muted); font-size: 0.98rem; max-width: 62ch; }
.g-legend {
  display: flex; gap: 24px; margin: 14px 0 4px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase;
}
.g-legend .k-hit { color: var(--red-bright); }
.g-legend .k-miss { color: var(--faint); }

.goal-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px;
}
.g-card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 22px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.g-card:hover {
  transform: translateY(-4px); border-color: var(--red-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px -22px rgba(225, 6, 0, 0.35);
}
.g-card h4 {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: 1.08rem; margin-bottom: 10px;
}
.g-card h4::after { content: "."; color: var(--red); }
.g-card ul { list-style: none; }
.g-card li {
  position: relative; padding: 5px 0 5px 22px; font-size: 0.89rem; color: var(--muted);
}
.g-card li::before {
  position: absolute; left: 0; font-family: var(--font-mono); font-weight: 700;
}
.g-card li.hit::before { content: "✓"; color: var(--red-bright); }
.g-card li.miss { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(225, 6, 0, 0.45); }
.g-card li.miss::before { content: "✗"; color: var(--faint); }
.g-card .g-note {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-soft);
  font-size: 0.82rem; color: var(--faint);
}
.g-card.cut { border-style: dashed; opacity: 0.8; }
.g-card.cut h4 { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

/* impact initiative tags */
.i-tag {
  display: inline-block; margin-bottom: 10px;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--red-bright); border: 1px solid var(--red-line);
  border-radius: 999px; padding: 4px 11px;
}

/* --------------------------------------------------------- game analysis */

.ga-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(36px, 5vw, 72px); margin-top: 48px; }
.ga-block + .ga-block { margin-top: 40px; }
.ga-block h3 {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint);
  padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px;
}
.goals { list-style: none; }
.goals li {
  display: flex; gap: 14px; align-items: baseline; padding: 12px 0;
  border-bottom: 1px dashed var(--line-soft); font-weight: 600;
}
.goals .tick { font-family: var(--font-mono); color: var(--red-bright); font-size: 0.8rem; }
.goals .tag {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.2em; color: var(--faint); text-transform: uppercase;
}

.req-table { width: 100%; border-collapse: collapse; }
.req-table th {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--faint);
  text-align: left; padding: 0 14px 12px; border-bottom: 1px solid var(--line);
}
.req-table td {
  padding: 15px 14px; vertical-align: top; border-bottom: 1px solid var(--line-soft);
  font-size: 0.94rem;
}
.req-table td:first-child {
  font-weight: 700; white-space: nowrap; width: 1%;
  border-left: 2px solid transparent; transition: border-color 0.2s;
}
.req-table td:last-child { color: var(--muted); }
.req-table tr:hover td:first-child { border-left-color: var(--red); }
.req-table tr:hover td { background: rgba(255, 255, 255, 0.012); }

.strategy-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px;
}
.strategy-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.strategy-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.s-card.dead h4 { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.s-card.dead { opacity: 0.85; }
.s-card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 24px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.s-card:hover {
  transform: translateY(-4px); border-color: var(--red-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px -22px rgba(225, 6, 0, 0.35);
}
.s-card h4 {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: 1.12rem; margin-bottom: 10px;
}
.s-card h4::after { content: "."; color: var(--red); }
.s-card ul { list-style: none; }
.s-card li {
  position: relative; padding: 5px 0 5px 16px; color: var(--muted); font-size: 0.89rem;
}
.s-card li::before {
  content: ""; position: absolute; left: 0; top: 0.92em;
  width: 7px; height: 1.5px; background: var(--red);
}

/* ----------------------------------------------------------- software --- */

.sw-banner {
  margin-top: 44px; padding: 30px 34px; border-radius: 14px;
  border: 1px solid var(--red-line);
  background: linear-gradient(120deg, var(--red-dim), transparent 55%), var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex; flex-wrap: wrap; gap: 14px 34px; align-items: center;
}
.sw-banner .big {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
}
.sw-banner .big b { color: var(--red-bright); }
.sw-banner p { color: var(--muted); font-size: 0.95rem; max-width: 52ch; }

.sw-banner.stack { flex-direction: column; align-items: flex-start; }
.sw-col { margin-top: 84px; }

.fsm-chip {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--red-bright);
  border: 1px solid var(--red-line); border-radius: 999px; padding: 7px 14px;
  white-space: nowrap;
}

/* controller map */
.ctrl-map { list-style: none; margin-top: 10px; }
.ctrl-map li {
  display: flex; align-items: center; gap: 18px; padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.key {
  flex: 0 0 132px; text-align: center;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 8px;
  padding: 9px 10px;
  transition: border-color 0.2s, color 0.2s, transform 0.12s ease, border-bottom-width 0.12s ease;
}
.ctrl-map li:hover .key {
  border-color: var(--red); color: var(--red-bright);
  transform: translateY(1px); border-bottom-width: 2px; /* keycap press */
}
.ctrl-map .does { font-size: 0.97rem; color: var(--muted); }
.ctrl-map .does b { color: var(--text); font-weight: 650; }

/* --------------------------------------------------------- iterations --- */

.iter-tabs {
  display: flex; align-items: center; margin: 54px 0 0; position: relative;
}
.iter-tabs::before {
  content: ""; position: absolute; left: 30px; right: 30px; top: 50%; height: 1px;
  background: var(--line);
}
/* red progress fill up to the selected version (--fillf set from JS, 0..1) */
.iter-tabs::after {
  content: ""; position: absolute; left: 30px; top: 50%; height: 2px; margin-top: -1px;
  background: linear-gradient(90deg, var(--red), var(--red-bright));
  width: calc((100% - 60px) * var(--fillf, 0));
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.5);
  transition: width 0.45s var(--ease);
}
.iter-tab {
  position: relative; z-index: 1; flex: 1; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.iter-tab .pin {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line);
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: 1rem; color: var(--muted);
  transition: all 0.25s var(--ease);
}
.iter-tab:hover .pin { border-color: var(--red-line); color: var(--text); }
.iter-tab[aria-selected="true"] .pin {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 0 0 7px var(--red-dim), 0 8px 30px -8px rgba(225, 6, 0, 0.7);
  transform: scale(1.08);
  animation: pinPop 0.35s var(--ease);
}
@keyframes pinPop {
  0% { transform: scale(1); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1.08); }
}
.iter-tab .when {
  margin-top: 10px; font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint);
}

.iter-panel { display: none; margin-top: 44px; }
.iter-panel.active { display: grid; animation: fadeUp 0.45s var(--ease); }
.iter-panel {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 60px); align-items: start;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.delta h4, .probs h4 {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px;
}
.delta h4 { color: var(--text); }
.probs { margin-top: 30px; }
.probs h4 { color: var(--red-bright); border-bottom-color: var(--red-line); }
.delta ul, .probs ul { list-style: none; }
.delta li, .probs li { position: relative; padding: 7px 0 7px 20px; color: var(--muted); font-size: 0.95rem; }
.delta li::before {
  content: "+"; position: absolute; left: 0; color: var(--red-bright);
  font-family: var(--font-mono); font-weight: 700;
}
.probs li::before {
  content: "×"; position: absolute; left: 0; color: var(--red-bright);
  font-family: var(--font-mono); font-weight: 700;
}
.iter-note {
  margin-top: 30px; padding: 16px 20px; border-left: 2px solid var(--red);
  background: var(--red-dim); border-radius: 0 10px 10px 0;
  font-size: 0.93rem; color: var(--text);
}

/* ---------------------------------------------------------- evolution --- */

.evo-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(310px, 1fr);
  gap: 20px; margin-top: 56px;
  overflow-x: auto; padding: 26px 4px 26px;
  scroll-snap-type: x mandatory;
  position: relative;
}
.evo-rail::-webkit-scrollbar { height: 6px; }

.evo-card {
  scroll-snap-align: start;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px;
  padding: 26px 24px; position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.evo-card:hover {
  transform: translateY(-6px); border-color: var(--red-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 24px 50px -26px rgba(225, 6, 0, 0.4);
}
.evo-card.ghost { border-style: dashed; opacity: 0.75; }
.evo-step {
  position: absolute; top: -13px; left: 22px;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: #fff; background: var(--red); border-radius: 999px; padding: 5px 12px;
}
.evo-card.ghost .evo-step { background: var(--panel-2); color: var(--faint); border: 1px dashed var(--line); }
.evo-card h3 {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: 1.45rem; margin: 8px 0 2px;
}
.evo-card h3::after { content: "."; color: var(--red); }
.evo-when { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint); }
.evo-card .media-frame { margin: 18px 0; }
.evo-card .media-frame img { aspect-ratio: 4 / 3; }
.evo-card h5 {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--faint);
  margin: 16px 0 4px;
}
.evo-card h5.bad { color: var(--red-bright); }
.evo-card ul { list-style: none; }
.evo-card li { position: relative; padding: 3px 0 3px 16px; color: var(--muted); font-size: 0.87rem; }
.evo-card h5:not(.bad) + ul li::before {
  content: "+"; position: absolute; left: 0; color: var(--red-bright); font-family: var(--font-mono);
}
.evo-card h5.bad + ul li::before {
  content: "×"; position: absolute; left: 0; color: var(--red-bright); font-family: var(--font-mono);
}

/* ----------------------------------------------------------- thank you -- */

.win .win-head { text-align: center; }
.win .lede { margin-inline: auto; }
.win-photo {
  margin: 48px 0 0; position: relative;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: 0 40px 90px -50px rgba(225, 6, 0, 0.45);
}
.win-photo img {
  width: 100%; display: block; cursor: zoom-in;
  transition: transform 0.6s var(--ease);
}
.win-photo:hover img { transform: scale(1.015); }
.win-photo figcaption {
  position: absolute; inset: auto 0 0 0; padding: 38px 26px 18px;
  display: flex; justify-content: space-between; gap: 16px;
  background: linear-gradient(transparent, rgba(5, 5, 6, 0.82));
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: #fff;
  pointer-events: none;
}

/* ------------------------------------------------------------ marquee --- */

.marquee {
  overflow: hidden; padding: 22px 0;
  border-block: 1px solid var(--line-soft); background: var(--bg-soft);
}
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee span {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: clamp(1.2rem, 2.6vw, 1.9rem); letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px #4a4a52;
}
.marquee b { color: var(--red); -webkit-text-stroke: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ----------------------------------------------------- lightbox / misc -- */

.media-frame img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 3000; cursor: zoom-out;
  background:
    radial-gradient(1000px 600px at 50% 40%, rgba(225, 6, 0, 0.06), transparent 65%),
    rgba(9, 5, 5, 0.93);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(1400px, 94vw); max-height: 90vh; object-fit: contain; }
/* FLIP zoom from the clicked frame (transform set from JS) */
.lightbox img.flipping { transition: transform 0.38s var(--ease); }
.lightbox img.stepping { transition: opacity 0.16s ease; }

.confetti { position: fixed; inset: 0; z-index: 4000; pointer-events: none; }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); color: var(--muted);
  background: rgba(16, 16, 18, 0.85);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease), color 0.2s, border-color 0.2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--red-bright); border-color: var(--red-line); }

/* film grain over everything (very subtle) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 150; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.toc .name small {
  font-family: var(--font-mono); font-size: 0.6em; font-weight: 600;
  color: var(--faint); letter-spacing: 0.16em; text-transform: uppercase;
  margin-left: 10px;
}

/* ------------------------------------------------------------- footer --- */

.footer { border-top: 1px solid var(--line-soft); background: var(--bg-soft); }
.footer-inner { padding: 80px 0 40px; }
.footer-big {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: clamp(2.4rem, 7vw, 5rem); line-height: 0.95; text-transform: uppercase;
  letter-spacing: -0.01em;
}
.footer-big em { color: var(--red-bright); font-style: italic; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-top: 50px;
}
.footer h6 {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
}
.footer ul { list-style: none; }
.footer li { padding: 5px 0; }
.footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--red-bright); }
.footer ul a {
  position: relative; display: inline-block;
  transition: color 0.2s, padding-left 0.25s var(--ease);
}
.footer ul a::before {
  content: "→"; position: absolute; left: -6px; opacity: 0;
  color: var(--red-bright);
  transition: left 0.25s var(--ease), opacity 0.2s;
}
.footer ul a:hover { padding-left: 20px; }
.footer ul a:hover::before { left: 0; opacity: 1; }
.footer p { color: var(--muted); font-size: 0.92rem; max-width: 46ch; }
.footer-meta {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em;
  color: var(--faint); text-transform: uppercase;
}

/* ------------------------------------------------------------- reveal --- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal > li { opacity: 1; transform: none; }
  .sec-num .rule { transform: none; }
}

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 1180px) {
  .hero-stage-wrap { grid-template-columns: 1fr minmax(360px, 640px) 1fr; }
}

@media (max-width: 980px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0; padding: 10px 24px 24px;
    background: #0c0c0e;
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.25s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a, .nav-links .navbtn { padding: 14px 4px; font-size: 1rem; text-align: left; width: 100%; }
  .nav-toggle { display: block; }

  .hero { min-height: 0; padding-bottom: 70px; }
  .hero-stage-wrap { grid-template-columns: 1fr; }
  .callout-lines, .hero-dot { display: none; }
  .hero-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero-col.left, .hero-col.right { align-items: stretch; text-align: left; }
  .hero-col.left { order: 2; }
  .hero-col.right { order: 3; }
  .callout {
    max-width: none; border: 1px solid var(--line-soft); border-radius: 10px;
    padding: 14px; background: var(--panel);
  }
  .callout.active { border-color: var(--red-line); }
  .hero-scroll { display: none; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--line-soft); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line-soft); }
  .stat:nth-child(5) { grid-column: 1 / -1; }

  .split, .iter-panel, .ga-grid { grid-template-columns: 1fr; }
  .split .media { position: static; }
  .split.flip .media { order: 0; }
  .strategy-cards, .strategy-cards.cols-3, .strategy-cards.cols-2 { grid-template-columns: 1fr 1fr; }
  .goal-cards { grid-template-columns: 1fr 1fr; }
  .sw-col { margin-top: 36px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 80px 0; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 36px); }
  .hero-name { letter-spacing: -0.025em; }
  .hero-col { grid-template-columns: 1fr; }
  .strategy-cards, .strategy-cards.cols-3, .strategy-cards.cols-2 { grid-template-columns: 1fr; }
  .goal-cards { grid-template-columns: 1fr; }
  .req-table td:first-child { white-space: normal; }
  .key { flex-basis: 104px; }
  .brand-sub { display: none; }
}

/* -------------------------------------------------------------- print --- */

@media print {
  :root {
    --bg: #fff; --bg-soft: #fff; --panel: #fff; --panel-2: #f3f3f3;
    --text: #111; --muted: #444; --faint: #666;
    --line: #ccc; --line-soft: #ddd;
  }
  body { background: #fff; color: #111; font-size: 12px; }
  body::after { display: none; }
  .nav, #progress, .hero-scroll, .views, .nav-toggle, .marquee, .to-top,
  .lightbox, .callout-lines, .hero-dot, .skip-link { display: none !important; }
  * { animation: none !important; transition: none !important; }
  .reveal, .reveal > li, .callout, .hero-team, .hero-name, .hero-stage, .hero-stage-wrap,
  .sec-num .rule {
    opacity: 1 !important; transform: none !important;
  }

  /* cover page */
  .hero { min-height: 0; padding: 20px 0 0; page-break-after: always; }
  .hero-stage {
    background: #0d0d0f; border-radius: 14px;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .hero-stage.isolating #hero-base { opacity: 1; }
  .iso-layer { display: none; }
  .callout { background: none; border: 0; padding: 6px 2px; }
  .callout .c-label { color: #b00500; }
  .callout .c-desc { color: #444; }

  .section { padding: 26px 0; }
  .section.alt { background: #fff; border: 0; }
  .split .media { position: static; }
  .split, .iter-panel, .ga-grid { break-inside: avoid-page; }

  /* renders stay on their dark plate so transparent PNGs and the blueprint
     placeholders remain legible */
  .media-frame {
    background: #0d0d0f !important; border-color: #bbb;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .media-frame img { cursor: default; }

  .s-card, .evo-card, .sw-banner, .iter-note { border-color: #ccc; box-shadow: none; background: #fff; }
  .iter-note { background: #f6f6f6; border-left-color: #b00500; }
  .sw-banner { background: #f6f6f6; }
  .stat .n, .stat .n b { color: #111; }
  .stat .n b { color: #b00500; }

  /* iteration sliders: print every version, labeled */
  .iter-tabs { display: none; }
  .iter-panel { display: grid !important; margin-top: 26px; page-break-inside: avoid; }
  .iter-panel::before {
    content: attr(data-print-title);
    grid-column: 1 / -1;
    font-family: var(--font-display); font-style: italic; font-weight: 900;
    font-size: 1.25rem; color: #111;
    border-bottom: 2px solid #b00500; padding-bottom: 6px;
  }

  .evo-rail { grid-auto-flow: row; grid-auto-columns: unset; grid-template-columns: 1fr 1fr; overflow: visible; }
  .evo-card { page-break-inside: avoid; }
  .evo-step { background: #b00500; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  .footer { border: 0; }
  a[href]::after { content: none !important; }
}
