/* ==========================================================================
   Tempest — tempest.o08.net
   Dark, deep-blue. Motion is subtle by policy: nothing moves faster than
   the eye can rest on, and everything honours prefers-reduced-motion.
   ========================================================================== */

:root {
  --bg:          #04060c;
  --bg-2:        #070b14;
  --panel:       rgba(140, 175, 255, 0.035);
  --panel-2:     rgba(140, 175, 255, 0.055);
  --line:        rgba(130, 170, 255, 0.10);
  --line-2:      rgba(130, 170, 255, 0.18);

  --ink:         #e8eefb;
  --ink-2:       #a6b4cd;
  --ink-3:       #6c7c99;

  --blue:        #4da3ff;
  --blue-bright: #8ed3ff;
  --blue-deep:   #1a4d9e;
  --cyan:        #7fe3ff;
  --rose:        #ff7a92;
  --amber:       #ffc96b;

  --glow:        0 0 42px rgba(77, 163, 255, 0.20);
  --radius:      18px;
  --radius-sm:   12px;

  --max:         1200px;
  --gut:         clamp(20px, 5vw, 48px);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- ambient background ------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient::after {                     /* film grain */
  content: "";
  position: absolute;
  inset: -100%;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora--1 {
  width: 62vw; height: 62vw; left: -14vw; top: -12vw;
  background: radial-gradient(circle, rgba(26,77,158,0.55), transparent 68%);
  animation: drift1 34s var(--ease) infinite alternate;
}
.aurora--2 {
  width: 54vw; height: 54vw; right: -16vw; top: 22vh;
  background: radial-gradient(circle, rgba(20,60,130,0.45), transparent 70%);
  animation: drift2 44s var(--ease) infinite alternate;
}
.aurora--3 {
  width: 70vw; height: 70vw; left: 12vw; bottom: -30vh;
  background: radial-gradient(circle, rgba(14,44,104,0.42), transparent 72%);
  animation: drift3 52s var(--ease) infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(10vw, 8vh, 0) scale(1.18); } }
@keyframes drift2 { to { transform: translate3d(-12vw, -6vh, 0) scale(1.12); } }
@keyframes drift3 { to { transform: translate3d(6vw, -10vh, 0) scale(0.9); } }

/* --- layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
  position: relative;
  z-index: 1;
}

section { position: relative; z-index: 1; padding-block: clamp(72px, 11vw, 132px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue));
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; font-weight: 600; }
h2 { font-size: clamp(32.5px, 4.6vw, 50px); }
h3 { font-size: clamp(21.5px, 2.2vw, 25px); letter-spacing: -0.015em; }

.lede {
  font-size: clamp(19px, 1.9vw, 22.5px);
  color: var(--ink-2);
  max-width: 66ch;
  margin: 22px 0 0;
}

.section-head { margin-bottom: clamp(38px, 5vw, 60px); }

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

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(4, 6, 12, 0.62);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(4, 6, 12, 0.86);
}
.nav__in {
  display: flex; align-items: center; gap: 28px;
  height: 66px;
}
.nav__brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
  font-size: 19px;
  margin-right: auto;
}
.nav__brand img { width: 30px; height: 30px; display: block; }
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  color: var(--ink-2); text-decoration: none; font-size: 16px;
  position: relative; transition: color 0.25s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: var(--blue);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 16px; font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line-2);
  color: var(--ink);
  background: var(--panel);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease), box-shadow 0.4s;
  white-space: nowrap;
}
.btn:hover {
  border-color: rgba(120, 190, 255, 0.5);
  background: rgba(77, 163, 255, 0.10);
  transform: translateY(-1px);
  box-shadow: var(--glow);
}
.btn--primary {
  background: linear-gradient(180deg, rgba(77,163,255,0.22), rgba(77,163,255,0.08));
  border-color: rgba(120, 190, 255, 0.42);
}
.btn--lg { padding: 13px 24px; font-size: 17.5px; }

.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #43e08a;
  box-shadow: 0 0 0 0 rgba(67, 224, 138, 0.6);
  animation: pulse 2.4s infinite;
  flex: none;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(67, 224, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 224, 138, 0); }
}

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

.hero {
  position: relative;
  min-height: min(92vh, 880px);
  display: flex; align-items: center;
  padding-block: clamp(60px, 9vw, 110px);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("../assets/hero-bg.png") center/cover no-repeat;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 85% 75% at 55% 45%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 55% 45%, #000 25%, transparent 78%);
  animation: heroFloat 26s ease-in-out infinite alternate;
}
@keyframes heroFloat { to { transform: scale(1.08) translateY(-2%); } }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; }
.hero__in { position: relative; z-index: 2; width: 100%; }

.hero__mark {
  width: clamp(74px, 9vw, 104px);
  filter: drop-shadow(0 0 34px rgba(77, 163, 255, 0.45));
  animation: markIn 1.5s var(--ease) both, markBreathe 7s ease-in-out 1.5s infinite alternate;
}
@keyframes markIn { from { opacity: 0; transform: translateY(22px) scale(0.9); } }
@keyframes markBreathe { to { filter: drop-shadow(0 0 52px rgba(77, 163, 255, 0.72)); } }

.hero h1 {
  font-size: clamp(56px, 12.5vw, 148px);
  font-weight: 600;
  letter-spacing: -0.05em;
  margin: 22px 0 0;
  background: linear-gradient(178deg, #ffffff 12%, #a9c8f2 52%, #436ba8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 span { display: inline-block; animation: charIn 1s var(--ease) backwards; }

/* The `to` state must be written out: the blur composites each span, which
   would otherwise strip the h1's background-clip:text and leave the title
   invisible once the animation settles. */
@keyframes charIn {
  from { opacity: 0; transform: translateY(0.4em) rotateX(-45deg); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

.hero__tag {
  font-size: clamp(19px, 2.2vw, 24.5px);
  color: var(--ink-2);
  max-width: 60ch;
  margin: 8px 0 0;
  animation: riseIn 1s var(--ease) 0.75s both;
}
.hero__tag b { color: var(--ink); font-weight: 500; }

.hero__cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 34px;
  animation: riseIn 1s var(--ease) 0.95s both;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1px;
  margin-top: 52px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  animation: riseIn 1.1s var(--ease) 1.15s both;
}
.hero__stat {
  background: rgba(6, 9, 17, 0.72);
  padding: 18px 20px;
  transition: background 0.35s;
}
.hero__stat:hover { background: rgba(77, 163, 255, 0.07); }
.hero__stat b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(25px, 3vw, 32.5px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--blue-bright);
}
.hero__stat span {
  display: block;
  font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 3px;
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px;
  transform: translateX(-50%);
  width: 1px; height: 46px;
  background: linear-gradient(180deg, transparent, var(--line-2), transparent);
  z-index: 2;
}
.scroll-hint::after {
  content: ""; position: absolute; left: -1.5px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--blue);
  animation: fall 2.6s ease-in-out infinite;
}
@keyframes fall { 0% { top: 0; opacity: 0; } 30% { opacity: 1; } 100% { top: 42px; opacity: 0; } }

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

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* --- panels / cards ----------------------------------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  position: relative;
  padding: 26px 26px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
}
.card::before {                                  /* cursor-tracked sheen */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%),
              rgba(77, 163, 255, 0.11), transparent 62%);
  opacity: 0;
  transition: opacity 0.45s;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); background: var(--panel-2); }
.card:hover::before { opacity: 1; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-2); margin: 0; font-size: 17.5px; line-height: 1.68; }

.card__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(77,163,255,0.20), rgba(77,163,255,0.04));
  border: 1px solid rgba(120, 190, 255, 0.22);
  margin-bottom: 16px;
  color: var(--blue-bright);
}
.card__icon svg { width: 20px; height: 20px; }

/* --- proof strip -------------------------------------------------------- */

.proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 46px;
}
.proof__cell { background: rgba(6, 9, 17, 0.7); padding: 24px 22px; }
.proof__n {
  font-family: var(--mono); font-size: clamp(23.5px, 2.6vw, 29px);
  color: var(--blue-bright); letter-spacing: -0.03em;
}
.proof__l { font-size: 16px; color: var(--ink); margin-top: 4px; }
.proof__s { font-size: 15px; color: var(--ink-3); margin-top: 2px; }

/* --- chart -------------------------------------------------------------- */

.chart-shell { padding: clamp(20px, 3vw, 34px); }

.chart-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-family: var(--mono); font-size: 14.5px; letter-spacing: 0.06em;
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent; color: var(--ink-3);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  display: inline-flex; align-items: center; gap: 8px;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chip:hover { color: var(--ink-2); border-color: var(--line-2); }
.chip.is-on { color: var(--ink); border-color: rgba(120,190,255,0.4); background: rgba(77,163,255,0.10); }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-line { stroke: rgba(130, 170, 255, 0.09); stroke-width: 1; }
.chart .axis-txt { fill: var(--ink-3); font-family: var(--mono); font-size: 13.5px; }
.chart .series-line {
  fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 2.4s var(--ease), opacity 0.4s;
  filter: drop-shadow(0 0 7px currentColor);
}
.chart.is-drawn .series-line { stroke-dashoffset: 0; }
.chart .series-area { transition: opacity 0.6s 0.5s; opacity: 0; }
.chart.is-drawn .series-area { opacity: 1; }
.chart .series.is-off { opacity: 0.08; }
.chart .dot { transition: opacity 0.5s 1.6s; opacity: 0; }
.chart.is-drawn .dot { opacity: 1; }

.chart-note { color: var(--ink-3); font-size: 15.5px; margin-top: 18px; }

/* --- bars (cohort) ------------------------------------------------------ */

.bars { display: grid; gap: 20px; }
.bar__top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 16px; margin-bottom: 8px; gap: 14px;
}
.bar__top span { color: var(--ink-2); }
.bar__top b { font-family: var(--mono); color: var(--ink); font-weight: 500; }
.bar__track {
  position: relative; height: 8px; border-radius: 99px;
  background: rgba(130, 170, 255, 0.09);
  overflow: visible;
}
.bar__fill {
  position: absolute; inset: 0 auto 0 0; height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue));
  width: 0;
  transition: width 1.5s var(--ease);
  box-shadow: 0 0 16px rgba(77, 163, 255, 0.4);
}
.bar__exp {
  position: absolute; top: -5px; width: 2px; height: 18px;
  background: var(--amber); border-radius: 2px;
  opacity: 0; transition: opacity 0.6s 1.2s;
}
.is-in .bar__exp { opacity: 0.85; }
.bar__exp::after {
  content: attr(data-l);
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 13px; color: var(--amber);
  white-space: nowrap;
}

/* --- gains list --------------------------------------------------------- */

.gains { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.gain {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: rgba(6, 9, 17, 0.7); padding: 15px 20px;
  font-size: 17px;
}
.gain b { font-family: var(--mono); color: #6ee7a8; font-weight: 500; }
.gain small { color: var(--ink-3); font-family: var(--mono); font-size: 13.5px; }

/* --- timeline ----------------------------------------------------------- */

.timeline { position: relative; margin-top: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-2) 8%, var(--line-2) 92%, transparent);
}
.tl {
  position: relative;
  padding: 0 0 30px 40px;
}
.tl::before {
  content: ""; position: absolute; left: 3px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--blue);
  transition: box-shadow 0.5s, background 0.5s;
}
.tl:hover::before { background: var(--blue); box-shadow: 0 0 14px var(--blue); }
.tl__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.tl__date { font-family: var(--mono); font-size: 14px; color: var(--ink-3); letter-spacing: 0.05em; }
.tag {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 5px;
  border: 1px solid currentColor;
}
.tag--feat { color: #6ee7a8; }
.tag--fix  { color: var(--amber); }
.tag--perf { color: var(--cyan); }
.tag--test { color: #b39cff; }
.tl h3 { font-size: 19.5px; font-weight: 500; letter-spacing: -0.01em; }
.tl p { margin: 5px 0 0; color: var(--ink-2); font-size: 17px; max-width: 68ch; }

.tl-more { margin-top: 6px; }

/* --- games -------------------------------------------------------------- */

.games-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.games-layout > * { min-width: 0; }

.board-panel { padding: clamp(16px, 2.4vw, 26px); }

.board-head { margin-bottom: 18px; }
.board-head h3 { font-size: 21.5px; margin-bottom: 6px; }
.board-head p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; }

.players { display: grid; gap: 7px; margin-bottom: 16px; }
.player {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(130, 170, 255, 0.045);
  border: 1px solid transparent;
  transition: border-color 0.3s;
}
.player.is-us { border-color: rgba(120, 190, 255, 0.30); background: rgba(77, 163, 255, 0.09); }
.player__swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; border: 1px solid rgba(255,255,255,0.25); }
.player__swatch--w { background: #dfe7f5; }
.player__swatch--b { background: #101823; }
.player__name { font-weight: 500; }
.player__elo { font-family: var(--mono); font-size: 15px; color: var(--ink-3); margin-left: auto; }
.player__res {
  font-family: var(--mono); font-size: 14px; padding: 1px 7px; border-radius: 5px;
  background: rgba(130,170,255,0.1); color: var(--ink-2);
}

/* board */
.board {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line);
  user-select: none;
}
.board__squares { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); }
.sq { position: relative; }
/* Light enough that the near-black pieces read against the dark squares. */
.sq--l { background: #6d81a8; }
.sq--d { background: #4c5d85; }
.sq__c {
  position: absolute; font-family: var(--mono); font-size: 10px;
  color: rgba(12,18,30,0.5); pointer-events: none;
}
.sq__c--f { right: 3px; bottom: 1px; }
.sq__c--r { left: 3px; top: 1px; }

.board__marks { position: absolute; inset: 0; pointer-events: none; }
.mark {
  position: absolute; width: 12.5%; height: 12.5%;
  /* Warm, because a blue highlight disappears on a blue board. */
  background: rgba(255, 196, 92, 0.34);
  box-shadow: inset 0 0 0 2px rgba(255, 214, 138, 0.62);
  transition: left 0.34s var(--ease), top 0.34s var(--ease), opacity 0.3s;
}
.mark--check {
  background: radial-gradient(circle, rgba(255, 90, 120, 0.55), transparent 70%);
  box-shadow: none;
}

.board__pieces { position: absolute; inset: 0; }
.pc {
  position: absolute;
  width: 12.5%; height: 12.5%;
  display: grid; place-items: center;
  font-size: min(8.2vw, 4.4vh);
  line-height: 1;
  transition: left 0.34s var(--ease), top 0.34s var(--ease), opacity 0.2s, transform 0.34s var(--ease);
  will-change: left, top;
}
.board-panel .pc { font-size: 6.2cqw; }
.pc--w { color: #f2f6fc; text-shadow: 0 1px 0 #0c1119, 0 0 1px #0c1119, 0 0 2px #0c1119, 0 3px 9px rgba(0,0,0,0.6); }
/* The light halo this used to carry was there to lift the piece off a near-black
   board; on the lighter squares it only blurs the edge, so it goes dark. */
.pc--b { color: #0a1018; text-shadow: 0 1px 0 rgba(255,255,255,0.16), 0 2px 7px rgba(0,0,0,0.45); }
.pc.is-gone { opacity: 0; transform: scale(0.6); }

.board-wrap { container-type: inline-size; }

/* controls */
.controls { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ctrl {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.28s var(--ease);
}
.ctrl:hover { color: var(--ink); border-color: var(--line-2); background: rgba(77,163,255,0.10); }
.ctrl svg { width: 16px; height: 16px; }
.ctrl--play { width: 44px; height: 44px; background: rgba(77,163,255,0.14); border-color: rgba(120,190,255,0.35); color: var(--ink); }

.ply {
  font-family: var(--mono); font-size: 15px; color: var(--ink-3);
  margin-left: auto;
}
.scrub {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; margin-top: 16px;
  background: rgba(130,170,255,0.14); border-radius: 99px; outline: none; cursor: pointer;
}
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 12px rgba(77,163,255,0.75); cursor: pointer;
}
.scrub::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 12px rgba(77,163,255,0.75); cursor: pointer;
}

/* move list */
.moves {
  margin-top: 18px;
  max-height: 176px; overflow-y: auto;
  font-family: var(--mono); font-size: 15px;
  line-height: 1.9;
  color: var(--ink-3);
  scrollbar-width: thin;
  scrollbar-color: rgba(130,170,255,0.25) transparent;
}
.moves::-webkit-scrollbar { width: 6px; }
.moves::-webkit-scrollbar-thumb { background: rgba(130,170,255,0.22); border-radius: 99px; }
.moves i { color: var(--ink-3); font-style: normal; opacity: 0.55; margin-left: 6px; }
.moves b {
  font-weight: 400; color: var(--ink-2); cursor: pointer; padding: 0 4px;
  border-radius: 4px; transition: background 0.2s, color 0.2s;
}
.moves b:hover { color: var(--ink); background: rgba(130,170,255,0.10); }
.moves b.is-now { background: var(--blue); color: #04060c; }

/* game selector */
.game-list { display: grid; gap: 8px; padding-right: 4px; scrollbar-width: thin; }
.game-list::-webkit-scrollbar { width: 6px; }
.game-list::-webkit-scrollbar-thumb { background: rgba(130,170,255,0.22); border-radius: 99px; }
.gitem {
  text-align: left; width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  display: block;
}
.gitem:hover { border-color: var(--line-2); background: var(--panel-2); transform: translateX(3px); }
.gitem.is-on { border-color: rgba(120,190,255,0.45); background: rgba(77,163,255,0.11); }
.gitem__t { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.gitem__m {
  display: flex; align-items: center; gap: 8px; margin-top: 5px;
  font-family: var(--mono); font-size: 13.5px; color: var(--ink-3);
}
.pill {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 7px; border-radius: 4px; border: 1px solid currentColor;
}
.pill--win { color: #6ee7a8; }
.pill--loss { color: var(--rose); }

.list-head {
  font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 18px 0 10px;
}
.list-head:first-child { margin-top: 0; }

/* --- nemesis ------------------------------------------------------------ */

.nemesis-band {
  position: relative;
  overflow: hidden;
}
.nemesis-band::before {
  content: "";
  position: absolute; inset: 0;
  background: url("../assets/storm-board.png") center 30%/cover no-repeat;
  opacity: 0.20;
  mask-image: linear-gradient(180deg, transparent, #000 32%, #000 68%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 32%, #000 68%, transparent);
}
.nemesis-band::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg), transparent 22%, transparent 78%, var(--bg));
}

.nem {
  padding: 24px 24px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 122, 146, 0.16);
  background: linear-gradient(165deg, rgba(255, 122, 146, 0.06), rgba(6, 9, 17, 0.7));
  transition: transform 0.5s var(--ease), border-color 0.4s;
}
.nem:hover { transform: translateY(-4px); border-color: rgba(255, 122, 146, 0.34); }
.nem__top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.nem__name { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.nem__elo { font-family: var(--mono); font-size: 14.5px; color: var(--ink-3); margin-left: auto; }
.nem__wdl { display: flex; gap: 5px; margin-bottom: 14px; }
.wdl {
  flex: 1;
  text-align: center;
  padding: 9px 4px;
  border-radius: 9px;
  font-family: var(--mono);
  background: rgba(130,170,255,0.05);
}
.wdl b { display: block; font-size: 21.5px; font-weight: 500; }
.wdl span { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.wdl--w b { color: #6ee7a8; }
.wdl--d b { color: var(--ink-2); }
.wdl--l b { color: var(--rose); }
.wdl--zero b { color: var(--rose); }
.nem p { margin: 0; font-size: 16px; color: var(--ink-2); line-height: 1.65; }

.prey { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.prey__row {
  display: flex; align-items: center; gap: 14px;
  background: rgba(6,9,17,0.7); padding: 13px 18px;
  font-size: 16px;
}
.prey__row b { font-weight: 500; }
.prey__row .elo { font-family: var(--mono); font-size: 14.5px; color: var(--ink-3); }
.prey__row .rec { margin-left: auto; font-family: var(--mono); font-size: 15px; color: #6ee7a8; }

/* --- roadmap ------------------------------------------------------------ */

.phase-head {
  display: flex; align-items: center; gap: 14px;
  margin: 44px 0 20px;
}
.phase-head:first-of-type { margin-top: 0; }
.phase-head h3 {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue); font-weight: 400;
}
.phase-head hr { flex: 1; border: none; border-top: 1px solid var(--line); margin: 0; }

.road { padding: 26px 26px 28px; }
.road__top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.road h3 { flex: 1; min-width: 200px; }
.road p { color: var(--ink-2); font-size: 17.5px; margin: 0; line-height: 1.68; }
.size {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 5px;
  border: 1px solid var(--line-2); color: var(--ink-3);
}
.size--Moonshot { color: #b39cff; border-color: rgba(179,156,255,0.4); }
.size--Large { color: var(--amber); border-color: rgba(255,201,107,0.35); }
.size--Medium { color: var(--blue); border-color: rgba(77,163,255,0.35); }
.size--Small { color: #6ee7a8; border-color: rgba(110,231,168,0.32); }
.road__tags { display: flex; gap: 7px; margin-top: 16px; flex-wrap: wrap; }
.ttag {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
  color: var(--ink-3); padding: 2px 9px; border-radius: 99px;
  background: rgba(130,170,255,0.07);
}

/* --- callout ------------------------------------------------------------ */

.callout {
  padding: 28px 30px;
  border-left: 2px solid var(--blue);
  background: linear-gradient(90deg, rgba(77,163,255,0.08), transparent 70%);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 40px;
}
.callout p { margin: 0; color: var(--ink-2); font-size: 18px; }
.callout p + p { margin-top: 12px; }
.callout b { color: var(--ink); font-weight: 500; }

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

.footer {
  border-top: 1px solid var(--line);
  padding-block: 52px 62px;
  position: relative; z-index: 1;
}
.footer__in { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.footer__brand img { width: 36px; height: 36px; opacity: 0.85; }
.footer__brand div b { display: block; font-weight: 600; letter-spacing: -0.02em; }
.footer__brand div span { font-size: 15.5px; color: var(--ink-3); }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { color: var(--ink-2); text-decoration: none; font-size: 16px; transition: color 0.25s; }
.footer__links a:hover { color: var(--blue-bright); }
.footer__note { width: 100%; color: var(--ink-3); font-size: 15px; margin-top: 8px; }

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

@media (max-width: 900px) {
  .games-layout { grid-template-columns: minmax(0, 1fr); }
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 18px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .chart .series-line { stroke-dashoffset: 0; }
  .chart .dot, .chart .series-area { opacity: 1; }
}
