/* =====================================================================
   Block Lane landing page
   Design tokens first. Colors are sampled from the game itself.
   ===================================================================== */
:root {
  --night: #0b1238;
  --indigo: #130c52;
  --violet: #3a1fa8;
  --panel: #4a2bcf;
  --panel-lift: #5d3fe2;
  --panel-edge: #7c5cf0;
  --deep: #1d0f6b;
  --ink: #23136f;
  --paper: #fffbef;
  --white: #ffffff;
  --mist: #d9d2ff;
  --gold: #ffcc33;
  --gold-deep: #f08a00;
  --go: #52d943;
  --go-deep: #1b8f27;
  --red: #e8273b;
  --blue: #1e9bf0;
  --yellow: #ffd21f;
  --green: #3cc83c;
  --magenta: #ef3fa0;
  --cyan: #29c7e8;

  --display: "Pally", ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 30px;
  --snap: 160ms;
  --ease: cubic-bezier(0.2, 0.9, 0.3, 1.2);

  --grain: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --stud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='16'%3E%3Crect x='13' y='0' width='38' height='26' rx='8'/%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--white);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }

:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: 12px; top: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r-s);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}

/* Headings use the outlined toy lettering of the game. */
h1, h2 {
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.01em;
  -webkit-text-stroke: 0.14em var(--deep);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--deep);
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 1.2rem + 3.2vw, 3.6rem); }
h2 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.7rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); font-weight: 700; line-height: 1.15; }

.lede {
  max-width: 56ch;
  margin-top: 1.1em;
  color: var(--mist);
  font-size: 1.08em;
}

/* The stud edge: every plate of the page carries a row of brick studs on top. */
.studs { position: relative; --plate: var(--indigo); background-color: var(--plate); }
.studs::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: calc(100% - 1px);
  height: 16px;
  background: var(--plate);
  -webkit-mask: var(--stud) repeat-x center bottom / 64px 16px;
          mask: var(--stud) repeat-x center bottom / 64px 16px;
  pointer-events: none;
  z-index: 3;
}

/* Speech bubble, same as the mascots use in the game. */
.bubble {
  position: relative;
  padding: 0.7em 1em;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 20px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 4px 0 rgba(20, 8, 80, 0.35);
}
.bubble::after {
  content: "";
  position: absolute;
  left: 24%; top: 100%;
  width: 18px; height: 18px;
  background: var(--paper);
  border: solid var(--ink);
  border-width: 0 3px 3px 0;
  transform: translateY(-9px) rotate(45deg) skew(12deg, 12deg);
}
.bubble--left::after {
  left: -1px; top: 50%;
  border-width: 0 0 3px 3px;
  transform: translate(-9px, -50%) rotate(45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  border: 0;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.btn--go {
  min-height: 64px;
  padding: 0 1.5em;
  border-radius: 22px;
  background: linear-gradient(#74ea58, var(--go) 48%, #2fb831);
  color: var(--white);
  font-size: 1.35em;
  -webkit-text-stroke: 5px var(--go-deep);
  paint-order: stroke fill;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 7px 0 var(--go-deep);
  transition: transform var(--snap), box-shadow var(--snap), filter var(--snap);
}
.btn--go svg { width: 1em; height: 1em; fill: var(--white); stroke: var(--go-deep); stroke-width: 2.5; paint-order: stroke fill; transition: transform var(--snap) var(--ease); }
.btn--go:hover { filter: brightness(1.08) saturate(1.1); }
.btn--go:hover svg { transform: translateX(4px) scale(1.12); }
.btn--go:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 2px 0 var(--go-deep); }
.btn--small { min-height: 52px; font-size: 1.1em; border-radius: 18px; -webkit-text-stroke-width: 4px; }
.btn--go i {
  font-style: normal;
  padding: 0 0.45em;
  border-radius: 10px;
  background: rgba(10, 70, 20, 0.45);
  -webkit-text-stroke: 0;
}

/* =====================================================================
   Navigation: a brick plate that floats over the page
   ===================================================================== */
.nav {
  position: fixed;
  inset: max(10px, env(safe-area-inset-top)) 0 auto 0;
  z-index: 50;
  pointer-events: none;
}
.nav__plate {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100% - 20px, 1040px);
  min-height: 58px;
  margin-inline: auto;
  padding: 6px 10px 10px 116px;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 6px 0 var(--deep);
}
.nav__plate::before {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: calc(100% - 1px);
  height: 10px;
  background: var(--panel-lift);
  -webkit-mask: var(--stud) repeat-x center bottom / 40px 10px;
          mask: var(--stud) repeat-x center bottom / 40px 10px;
}
.nav__brand {
  position: absolute;
  left: 8px; top: 50%;
  width: 100px;
  transform: translateY(-46%) rotate(-4deg);
  transition: transform 260ms var(--ease);
}
.nav__brand:hover { transform: translateY(-46%) rotate(3deg) scale(1.06); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.nav__links a {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: background var(--snap), transform var(--snap);
}
.nav__links a:hover { background: rgba(255, 255, 255, 0.14); }
.nav__links a:active { transform: scale(0.95); }
.nav__links .nav__get {
  margin-left: 6px;
  background: linear-gradient(#ffe067, var(--gold) 55%, #ffb21a);
  color: #4a2400;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 4px 0 var(--gold-deep);
}
.nav__links .nav__get:hover { background: linear-gradient(#fff08f, #ffd84f 55%, #ffb21a); }
.nav__links .nav__get:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-deep); }

/* Scroll progress: a small red brick travels along the lane under the links. */
.nav__lane {
  position: absolute;
  left: 118px; right: 14px; bottom: 4px;
  height: 4px;
  border-radius: 4px;
  background: rgba(10, 4, 60, 0.45);
}
.nav__lane i {
  position: absolute;
  inset: 0 18px 0 0;
  transform: translateX(calc(var(--p, 0) * 100%));
}
.nav__lane i::before {
  content: "";
  position: absolute;
  left: 0; top: -3px;
  width: 18px; height: 10px;
  border-radius: 3px;
  background: var(--red);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.nav__toggle {
  display: none;
  margin-left: auto;
  width: 48px; height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(10, 4, 60, 0.35);
}
.nav__bars { display: grid; gap: 4px; justify-items: center; }
.nav__bars i {
  width: 22px; height: 6px;
  border-radius: 3px;
  background: var(--gold);
  transition: transform 220ms var(--ease), background var(--snap);
}
.nav__bars i:nth-child(2) { background: var(--red); }
.nav__bars i:nth-child(3) { background: var(--cyan); }
.nav__toggle[aria-expanded="true"] .nav__bars i:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars i:nth-child(2) { transform: scaleX(0); }
.nav__toggle[aria-expanded="true"] .nav__bars i:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav__plate { padding-left: 104px; }
  .nav__brand { width: 88px; }
  .nav__toggle { display: grid; place-items: center; }
  .nav__lane { left: 106px; }
  .nav__links {
    position: absolute;
    left: 0; right: 0; top: calc(100% + 12px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 12px;
    background: var(--panel);
    border-radius: 18px;
    box-shadow: 0 6px 0 var(--deep);
    visibility: hidden;
    transform: translateY(-10px) scale(0.97);
    transform-origin: top center;
    transition: transform 200ms var(--ease), visibility 0s 200ms;
  }
  .nav__links.is-open { visibility: visible; transform: none; transition-delay: 0s; }
  .nav__links a { padding: 12px 14px; background: rgba(10, 4, 60, 0.3); }
  .nav__links li:last-child { grid-column: 1 / -1; }
  .nav__links .nav__get { margin-left: 0; text-align: center; }
}

/* =====================================================================
   Hero: the home screen of the game, opened up to a full viewport
   ===================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: max(100vh, 680px);
  height: max(100svh, 680px);
  overflow: hidden;
  background: #f0b98a;
}
.hero__art { position: absolute; inset: -4% 0 0 0; z-index: -3; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.hero__ray {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(214deg, rgba(255, 226, 150, 0.5) 0%, rgba(255, 196, 110, 0.16) 28%, rgba(255, 196, 110, 0) 52%),
    linear-gradient(0deg, rgba(19, 12, 82, 0.55) 0%, rgba(19, 12, 82, 0) 34%);
}

.hero__stage {
  position: relative;
  z-index: 4;
  min-height: 0;
  container-type: size;
  display: grid;
  place-items: end center;
  padding: 84px 16px 0;
}
.hero__pile {
  position: relative;
  width: min(92cqw, 104cqh, 760px);
  aspect-ratio: 1;
  margin-bottom: -40px;
}
.hero__logo {
  width: 100%;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 12px 0 rgba(48, 16, 110, 0.3));
  animation: breathe 4.2s ease-in-out infinite;
}
.hero__bubble {
  position: absolute;
  right: -20%; top: 6%;
  z-index: 2;
  max-width: 40%;
  font-size: clamp(0.72rem, 0.6rem + 0.5vw, 1.05rem);
  transform: rotate(3deg);
}
.hero__bubble::after { left: 16%; }
@keyframes breathe {
  0%, 100% { scale: 1 1; }
  50% { scale: 1.014 0.984; }
}

.drift {
  position: absolute;
  z-index: -1;
  width: clamp(64px, 11vw, 170px);
  filter: drop-shadow(0 8px 0 rgba(60, 20, 110, 0.22));
  will-change: transform;
}
.drift--a { left: 3%; top: 20%; rotate: -18deg; }
.drift--b { right: 4%; top: 15%; rotate: 14deg; }
.drift--c { left: -2%; top: 52%; rotate: 24deg; width: clamp(80px, 14vw, 220px); }
.drift--d { right: 9%; top: 47%; rotate: -12deg; width: clamp(40px, 6vw, 96px); }
.drift--e { right: -1%; top: 64%; rotate: 32deg; z-index: 4; }

.hero__dock { --plate: var(--indigo); z-index: 3; background-image: var(--grain); }
.dock {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 24px clamp(24px, 5vw, 72px);
  padding-block: 52px clamp(26px, 3.4vw, 40px);
}
.dock__copy p { max-width: 72ch; margin-top: 0.8em; color: var(--mist); }
.dock__go { display: grid; justify-items: center; gap: 14px; }
.dock__stores { color: var(--mist); font-size: 0.95em; text-align: center; }
.dock__stores a { color: var(--gold); font-weight: 700; text-underline-offset: 3px; }
.dock__stores a:hover { color: var(--white); }

@media (max-width: 899px) {
  .hero__bubble { right: -2%; top: -4%; max-width: 46%; }
  .dock { grid-template-columns: 1fr; }
  .dock__go { justify-items: stretch; }
  .hero { height: auto; min-height: 100svh; grid-template-rows: minmax(52svh, 1fr) auto; }
  .drift--c, .drift--e { display: none; }
}

/* =====================================================================
   Play: the working board
   ===================================================================== */
.play {
  background: var(--indigo) var(--grain);
  padding-block: clamp(40px, 7vw, 96px) clamp(72px, 9vw, 130px);
}
.play__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.lanes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6em; }
.lane {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px 0 8px;
  border: 0;
  border-radius: 14px;
  background: var(--panel);
  font-weight: 700;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 5px 0 var(--deep);
  transition: transform var(--snap), box-shadow var(--snap), background var(--snap);
}
.lane b {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--deep);
  color: var(--gold);
}
.lane:hover { background: var(--panel-lift); }
.lane:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--deep); }
.lane.is-on { background: linear-gradient(#ffe067, var(--gold) 55%, #ffb21a); color: #4a2400; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 5px 0 var(--gold-deep); }
.lane.is-on b { background: #4a2400; }

.coach {
  display: grid;
  grid-template-columns: clamp(84px, 12vw, 130px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 2em;
}
.coach img { transform-origin: 50% 100%; animation: breathe 3.6s ease-in-out infinite; }

.play__table { display: grid; justify-items: center; gap: 14px; }
.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: min(100%, 520px);
}
.hud__pill, .hud__again {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 21px;
  background: var(--deep);
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(124, 92, 240, 0.55);
}
.hud__pill i { font-style: normal; opacity: 0.6; }
.hud__pill b { color: var(--gold); min-width: 1ch; }
.hud__again svg { width: 20px; height: 20px; fill: var(--white); transition: transform 300ms var(--ease); }
.hud__again:hover svg { transform: rotate(-200deg); }
.hud__again:active { transform: scale(0.94); }
.hud__stars { display: inline-flex; gap: 3px; }
.hud__stars svg { width: 30px; height: 30px; fill: var(--gold); stroke: var(--gold-deep); stroke-width: 1.5; transition: fill 240ms, transform 240ms var(--ease); }
.hud__stars svg.is-off { fill: #2a1a86; stroke: #1a0f5c; transform: scale(0.84) rotate(-12deg); }

.board-well {
  position: relative;
  width: min(100%, 540px);
  padding: 30px clamp(50px, 13vw, 72px) clamp(54px, 13vw, 74px);
}
.board {
  --cols: 4; --rows: 4;
  --u: calc(100cqw / var(--cols));
  position: relative;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: var(--cols) / var(--rows);
  border-radius: 14px;
  background: #3b22b8;
  box-shadow: 0 0 0 12px var(--panel-edge), 0 0 0 15px #5a3be0, 0 12px 0 15px var(--deep);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.board__cells {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  border-radius: 14px;
  overflow: hidden;
}
.board__cells i { background: url("../img/cell.webp") center / 100% 100% no-repeat; }
.board__nojs { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; }

.gate {
  position: absolute;
  background: var(--tone);
  border-radius: 5px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.gate img { position: absolute; width: clamp(38px, 12cqw, 58px); max-width: none; }
.gate[data-edge="right"] { left: 100%; top: calc(var(--s) * var(--u) + 4px); width: 12px; height: calc(var(--l) * var(--u) - 8px); }
.gate[data-edge="left"] { right: 100%; top: calc(var(--s) * var(--u) + 4px); width: 12px; height: calc(var(--l) * var(--u) - 8px); }
.gate[data-edge="top"] { bottom: 100%; left: calc(var(--s) * var(--u) + 4px); height: 12px; width: calc(var(--l) * var(--u) - 8px); }
.gate[data-edge="bottom"] { top: 100%; left: calc(var(--s) * var(--u) + 4px); height: 12px; width: calc(var(--l) * var(--u) - 8px); }
.gate[data-edge="right"] img { left: 100%; top: 50%; transform: translate(0, -50%); }
.gate[data-edge="left"] img { right: 100%; top: 50%; transform: translate(0, -50%); }
.gate[data-edge="top"] img { bottom: 100%; left: 50%; transform: translate(-50%, 0); }
.gate[data-edge="bottom"] img { top: 100%; left: 50%; transform: translate(-50%, 0); }
.gate.is-open img { animation: gate-pop 420ms var(--ease); }
@keyframes gate-pop {
  0% { scale: 1; }
  40% { scale: 1.35; }
  100% { scale: 1; }
}

.block {
  position: absolute;
  left: 0; top: 0;
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  padding: 0;
  border: 0;
  background: none;
  transform: translate(calc(var(--x) * var(--u)), calc(var(--y) * var(--u)));
  transition: transform 90ms ease-out;
  cursor: grab;
  touch-action: none;
  filter: drop-shadow(0 4px 0 rgba(15, 6, 70, 0.45));
}
.block span {
  position: absolute;
  left: calc(var(--cx) * var(--u));
  top: calc(var(--cy) * var(--u));
  width: var(--u);
  height: var(--u);
  background: center / 100% 100% no-repeat;
  pointer-events: auto;
}
.block.is-held { cursor: grabbing; z-index: 5; filter: drop-shadow(0 9px 0 rgba(15, 6, 70, 0.4)) brightness(1.08); }
.block.is-held span { scale: 1.04; }
.block.is-stuck { animation: nudge 220ms ease-out; }
.block.is-gone { transition: transform 260ms ease-in, opacity 260ms ease-in; opacity: 0; }
.block:focus-visible { outline: none; }
.block:focus-visible span { box-shadow: 0 0 0 4px var(--gold); border-radius: 12%; }
@keyframes nudge {
  0%, 100% { rotate: 0deg; }
  30% { rotate: -2.5deg; }
  70% { rotate: 2.5deg; }
}

.won {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 8;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(86%, 320px);
  padding: 14px 18px 20px;
  background: var(--panel);
  border-radius: var(--r-l);
  box-shadow: inset 0 0 0 4px var(--panel-edge), 0 8px 0 var(--deep);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: won-in 420ms var(--ease);
}
.won[hidden] { display: none; }
.won img { width: 42%; margin-top: -22%; }
.won__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  -webkit-text-stroke: 6px #7a3a00;
  paint-order: stroke fill;
}
.won__line { color: var(--mist); margin-bottom: 8px; }
@keyframes won-in {
  from { transform: translate(-50%, -50%) scale(0.7) rotate(-4deg); }
  to { transform: translate(-50%, -50%) scale(1) rotate(0); }
}
.bit {
  position: absolute;
  left: 50%; top: 40%;
  z-index: 7;
  width: 22px; height: 22px;
  background: center / contain no-repeat;
  pointer-events: none;
  animation: bit 900ms cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}
@keyframes bit {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}
.play__hint { max-width: 44ch; text-align: center; color: var(--mist); font-size: 0.92em; }

@media (max-width: 899px) {
  .play__grid { grid-template-columns: 1fr; }
}
@media (max-width: 479px) {
  .hud { flex-wrap: nowrap; gap: 6px; }
  .hud__pill { padding-inline: 12px; }
  .hud__again { width: 44px; padding: 0; justify-content: center; }
  .hud__again span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .hud__stars svg { width: 26px; height: 26px; }
}

/* =====================================================================
   Twists
   ===================================================================== */
.twists {
  position: relative;
  padding-block: clamp(56px, 8vw, 110px) clamp(72px, 9vw, 130px);
  background: var(--violet) var(--grain);
}
.twists::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: calc(100% - 1px);
  height: 16px;
  background: var(--violet);
  -webkit-mask: var(--stud) repeat-x center bottom / 64px 16px;
          mask: var(--stud) repeat-x center bottom / 64px 16px;
}
.twists__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 34px);
  margin-top: clamp(32px, 5vw, 64px);
}
.twist h3 { margin-top: 18px; }
.twist p { margin-top: 6px; color: var(--mist); font-size: 0.96em; }
.twist__art { position: relative; height: 96px; display: flex; align-items: flex-end; }
.twist__art span { display: block; position: relative; }

.twist__art--arrow span {
  width: 86px; height: 84px;
  background: url("../img/brick-cyan.webp") center / contain no-repeat;
  filter: drop-shadow(0 6px 0 rgba(15, 6, 70, 0.4));
  animation: slide-x 2.4s ease-in-out infinite;
}
.twist__art--arrow span::before,
.twist__art--arrow span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 16px; height: 16px;
  border: solid var(--white);
  border-width: 5px 5px 0 0;
  border-radius: 3px;
}
.twist__art--arrow span::before { left: 22%; transform: translateY(-50%) rotate(-135deg); }
.twist__art--arrow span::after { right: 22%; transform: translateY(-50%) rotate(45deg); }
@keyframes slide-x {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(34px); }
}

.twist__art--pad span {
  width: 86px; height: 86px;
  border-radius: 14px;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 12px, #5a2fd0 12px 24px);
  box-shadow: inset 0 0 0 5px var(--deep), 0 6px 0 var(--deep);
}
.twist__art--pad span::after {
  content: "";
  position: absolute;
  inset: 12px;
  background: url("../img/brick-magenta.webp") center / contain no-repeat;
  animation: drop 2.6s cubic-bezier(0.3, 1.4, 0.5, 1) infinite;
}
@keyframes drop {
  0% { transform: translateY(-70px) scale(0.7); }
  22%, 78% { transform: none; }
  100% { transform: translateX(80px) scale(0.7); }
}

.twist__art--lift span {
  width: 96px; height: 20px;
  border-radius: 8px;
  background: linear-gradient(#b9c4ff, #7f8df0);
  box-shadow: 0 5px 0 var(--deep);
  animation: lift 3s ease-in-out infinite;
}
.twist__art--lift span::before {
  content: "";
  position: absolute;
  left: 22px; bottom: 100%;
  width: 52px; height: 50px;
  background: url("../img/brick-yellow.webp") center bottom / contain no-repeat;
}
.twist__art--lift::before {
  content: "";
  position: absolute;
  left: 44px; top: 0; bottom: 0;
  width: 8px;
  border-radius: 4px;
  background: repeating-linear-gradient(var(--deep) 0 8px, transparent 8px 14px);
}
@keyframes lift {
  0%, 15%, 100% { transform: translateY(0); }
  50%, 65% { transform: translateY(-26px); }
}

.twist__art--clock span {
  padding: 8px 18px 8px 54px;
  border-radius: 26px;
  background: var(--deep);
  box-shadow: inset 0 0 0 3px var(--panel-edge);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.twist__art--clock span::before {
  content: "";
  position: absolute;
  left: -6px; top: 50%;
  width: 56px; height: 56px;
  background: url("../img/booster-clock.webp") center / contain no-repeat;
  transform: translateY(-50%);
  animation: tick 1s steps(2) infinite;
}
@keyframes tick {
  50% { transform: translateY(-50%) rotate(8deg); }
}

.twist__art--hard span {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--red);
  box-shadow: inset 0 0 0 3px #ffd9de, 0 5px 0 #8f0f1f;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: rotate(-7deg);
  transform-origin: left bottom;
}

@media (max-width: 899px) {
  .twists__row { grid-template-columns: 1fr; gap: 26px; }
  .twist { display: grid; grid-template-columns: 124px minmax(0, 1fr); column-gap: 14px; align-items: end; }
  .twist__art { grid-row: span 2; align-self: center; }
  .twist h3 { margin-top: 0; align-self: end; }
  .twist p { align-self: start; }
}

/* =====================================================================
   Boosters
   ===================================================================== */
.boost {
  --plate: var(--indigo);
  background-image: var(--grain);
  padding-block: clamp(56px, 8vw, 110px) clamp(72px, 9vw, 130px);
}
.boost__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.boost__picks { display: grid; gap: 12px; margin-top: 1.8em; }
.pick {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 8px 18px 8px 8px;
  border: 0;
  border-radius: var(--r-m);
  background: var(--panel);
  text-align: left;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 6px 0 var(--deep);
  transition: transform var(--snap), box-shadow var(--snap), background var(--snap);
}
.pick img { transition: transform 300ms var(--ease); }
.pick span { color: var(--mist); }
.pick b { display: block; color: var(--white); font-size: 1.2em; }
.pick:hover { background: var(--panel-lift); }
.pick:hover img { transform: rotate(-8deg) scale(1.08); }
.pick:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--deep); }
.pick.is-on { box-shadow: inset 0 0 0 4px var(--gold), 0 6px 0 var(--deep); }

.boost__stage {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--r-l);
  background: url("../img/night.webp") center / cover;
  box-shadow: inset 0 0 0 5px var(--panel-edge), 0 10px 0 var(--deep);
  overflow: hidden;
}
.boost__timer {
  position: absolute;
  left: 50%; top: 9%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  border-radius: 30px;
  background: var(--deep);
  box-shadow: inset 0 0 0 3px var(--panel-edge);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}
.boost__timer em {
  font-style: normal;
  color: var(--go);
  transform: scale(0);
  transition: transform 300ms var(--ease);
}
.boost__stage.is-run[data-show="clock"] .boost__timer em { transform: scale(1); }
.boost__stage.is-run[data-show="clock"] .boost__timer { animation: timer-pop 500ms var(--ease); }
@keyframes timer-pop {
  40% { transform: translateX(-50%) scale(1.14); }
}
.boost__row {
  position: absolute;
  left: 6%; right: 6%; bottom: 12%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2%;
}
.boost__row img { transition: transform 700ms cubic-bezier(0.5, 0, 0.3, 1), opacity 300ms 400ms; filter: drop-shadow(0 5px 0 rgba(15, 6, 70, 0.5)); }
.boost__flyer {
  position: absolute;
  width: 24%;
  transition: transform 700ms cubic-bezier(0.5, 0, 0.3, 1);
}
.boost__flyer--rocket { left: 23.6%; bottom: -34%; transform: translateY(0); }
.boost__flyer--ufo { left: 38%; top: -40%; }
.boost__stage.is-run[data-show="rocket"] .boost__flyer--rocket { transform: translateY(-420%) rotate(6deg); transition-duration: 900ms; }
.boost__stage.is-run[data-show="rocket"] .boost__row img[data-c="blue"] { transform: translateY(-520%) rotate(20deg); opacity: 0; transition-duration: 900ms; transition-delay: 120ms, 600ms; }
.boost__stage.is-run[data-show="ufo"] .boost__flyer--ufo { transform: translateY(232%); }
.boost__stage.is-run[data-show="ufo"] .boost__row img[data-c="red"] { transform: translateY(-190%) scale(0.4); opacity: 0; transition-delay: 500ms, 900ms; }

@media (max-width: 899px) {
  .boost__grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Worlds
   ===================================================================== */
.worlds {
  position: relative;
  padding-block: clamp(56px, 8vw, 110px) clamp(72px, 9vw, 130px);
  background: var(--night) var(--grain);
}
.worlds::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -15px;
  height: 16px;
  background: var(--night);
  -webkit-mask: var(--stud) repeat-x center bottom / 64px 16px;
          mask: var(--stud) repeat-x center bottom / 64px 16px;
}
.tally {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(26px, 4vw, 48px);
}
.tally div { display: flex; flex-direction: column; }
.tally dd { order: -1; }
.tally dt { color: var(--mist); max-width: 18ch; line-height: 1.25; }
.tally dd {
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  -webkit-text-stroke: 0.1em #7a3a00;
  paint-order: stroke fill;
  font-variant-numeric: tabular-nums;
}
.reel {
  display: grid;
  gap: 18px;
  margin-top: clamp(32px, 5vw, 64px);
  overflow-x: auto;
  padding-block: 8px 14px;
  scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }
.has-gsap .reel { overflow: hidden; }
.reel__track { display: flex; gap: 18px; width: max-content; padding-inline: var(--gutter); will-change: transform; }
.reel__track--b { margin-left: clamp(-260px, -18vw, -80px); }
.reel__track li {
  position: relative;
  width: clamp(150px, 22vw, 230px);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--panel-edge), 0 8px 0 4px var(--deep);
}
.reel__track li:nth-child(odd) { rotate: -1.5deg; }
.reel__track li:nth-child(even) { rotate: 1.5deg; translate: 0 10px; }
.reel__track img { width: 100%; aspect-ratio: 420 / 640; object-fit: cover; }
.reel__track span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
  font-size: clamp(1rem, 0.8rem + 0.9vw, 1.45rem);
  font-weight: 700;
  line-height: 1.05;
  -webkit-text-stroke: 5px rgba(12, 6, 60, 0.9);
  paint-order: stroke fill;
}
.worlds__note { max-width: 62ch; margin-top: clamp(28px, 4vw, 48px); color: var(--mist); }

@media (max-width: 699px) {
  .tally { grid-template-columns: 1fr 1fr; gap: 22px 14px; }
}

/* =====================================================================
   Town
   ===================================================================== */
.town {
  --plate: var(--violet);
  background-image: var(--grain);
  padding-block: clamp(56px, 8vw, 110px) clamp(72px, 9vw, 130px);
}
.town__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.town__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 1.8em; }
.town__bricks {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px 0 10px;
  border-radius: 26px;
  background: var(--deep);
  box-shadow: inset 0 0 0 3px var(--panel-edge);
  font-size: 1.3em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.town__bricks img { width: 40px; }
.town__pips { display: flex; gap: 8px; margin-top: 18px; }
.town__pips li { width: 16px; height: 16px; border-radius: 5px; background: var(--deep); transition: background 240ms, transform 300ms var(--ease); }
.town__pips li.is-up { background: var(--gold); transform: scale(1.15); }

.town__scene {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: 0 0 0 5px var(--panel-edge), 0 10px 0 5px var(--deep);
  background: #e9cf8e;
}
.town__base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.lot {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  aspect-ratio: 1;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 6px 4px rgba(60, 40, 10, 0.35));
}
.lot[hidden] { display: none; }
.lot img { width: 100%; pointer-events: none; }
.lot--1 { left: 10%; bottom: 42%; width: 34%; }
.lot--2 { left: 56%; bottom: 42%; width: 34%; }
.lot--3 { left: 2%; bottom: 22%; width: 38%; }
.lot--4 { left: 60%; bottom: 22%; width: 38%; }
.lot--5 { left: 28%; bottom: 5%; width: 44%; }
.lot.is-rising { animation: rise 620ms var(--ease); }
@keyframes rise {
  0% { transform: scale(0.5, 0.2); }
  60% { transform: scale(1.06, 1.1); }
  100% { transform: none; }
}
.town__guide {
  position: absolute;
  left: 8px; top: 8px; right: 8px;
  display: grid;
  grid-template-columns: clamp(52px, 14%, 76px) minmax(0, auto);
  justify-content: start;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.town__guide .bubble { font-size: 0.92em; }

@media (max-width: 899px) {
  .town__grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   The week
   ===================================================================== */
.week {
  position: relative;
  padding-block: clamp(56px, 8vw, 110px) clamp(72px, 9vw, 130px);
  background: var(--indigo) var(--grain);
}
.week::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -15px;
  height: 16px;
  background: var(--indigo);
  -webkit-mask: var(--stud) repeat-x center bottom / 64px 16px;
          mask: var(--stud) repeat-x center bottom / 64px 16px;
}
.week__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin-top: clamp(32px, 5vw, 60px);
}
.slab {
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--r-l);
  background: var(--panel);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 3px rgba(124, 92, 240, 0.7), 0 8px 0 var(--deep);
}
.slab p { margin-top: 6px; color: var(--mist); }
.slab--pass { grid-column: span 7; padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.slab--league { grid-column: span 5; }
.slab--event { grid-column: span 5; }
.slab--crew { grid-column: span 4; }
.slab--missions { grid-column: span 3; display: grid; align-content: center; justify-items: start; gap: 12px; }
.slab--missions img { width: clamp(72px, 9vw, 110px); rotate: -6deg; }

.slab__banner { position: relative; aspect-ratio: 16 / 8; overflow: hidden; }
.slab__banner img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.slab__banner img.is-swap { transform: scale(1.08) rotate(0.6deg); }
.slab__body { padding: clamp(18px, 2.4vw, 28px); }
.seasons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.seasons button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--deep);
  font-weight: 700;
  transition: transform var(--snap), background var(--snap);
}
.seasons button:hover { background: #2a1890; }
.seasons button:active { transform: scale(0.95); }
.seasons button.is-on { background: var(--gold); color: #4a2400; }

.ladder { display: flex; align-items: flex-end; gap: 4px; margin-top: 18px; }
.ladder li { flex: 1; display: grid; justify-items: center; gap: 4px; font-size: 0.82em; font-weight: 700; }
.ladder li:nth-child(1) { padding-bottom: 0; }
.ladder li:nth-child(2) { padding-bottom: 12px; }
.ladder li:nth-child(3) { padding-bottom: 24px; }
.ladder li:nth-child(4) { padding-bottom: 36px; }
.ladder li:nth-child(5) { padding-bottom: 48px; }
.ladder img { width: 100%; max-width: 84px; transition: transform 300ms var(--ease); }
.ladder li:hover img { transform: scale(1.14) rotate(-5deg); }

.events { display: grid; gap: 12px; margin-top: 16px; }
.events li { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 12px; color: var(--mist); line-height: 1.3; }
.events b { display: block; color: var(--white); }

.crews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.crews button {
  padding: 6px;
  border: 0;
  border-radius: 18px;
  background: none;
  transition: transform 260ms var(--ease), background var(--snap);
}
.crews button:hover { transform: scale(1.08) rotate(-4deg); }
.crews button:active { transform: scale(0.94); }
.crews button.is-on { background: var(--deep); box-shadow: inset 0 0 0 3px var(--gold); }
.crews__name { margin-top: 12px; color: var(--gold); font-weight: 700; font-size: 1.2em; text-align: center; }
.week__note { margin-top: 26px; color: var(--mist); font-size: 0.92em; max-width: 70ch; }

@media (max-width: 999px) {
  .slab--pass, .slab--league, .slab--event, .slab--crew, .slab--missions { grid-column: 1 / -1; }
  .slab--missions { grid-template-columns: auto 1fr; align-items: center; }
  .crews { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 519px) {
  .crews { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================================
   Screenshots
   ===================================================================== */
.screens {
  --plate: var(--violet);
  background-image: var(--grain);
  padding-block: clamp(56px, 8vw, 110px) clamp(72px, 9vw, 130px);
}
.screens__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.screens__nav { display: flex; gap: 10px; }
.screens__nav button {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--deep);
  box-shadow: 0 5px 0 #120848;
  transition: transform var(--snap), box-shadow var(--snap), background var(--snap);
}
.screens__nav svg { width: 24px; height: 24px; stroke: var(--gold); }
.screens__nav button:hover { background: #2a1890; }
.screens__nav button:active { transform: translateY(4px); box-shadow: 0 1px 0 #120848; }
.shots {
  display: flex;
  gap: clamp(16px, 2.4vw, 30px);
  margin-top: clamp(28px, 4vw, 52px);
  padding: 16px max(var(--gutter), calc((100vw - var(--wrap)) / 2)) 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots li { flex: 0 0 clamp(190px, 52vw, 264px); scroll-snap-align: start; transition: transform 320ms var(--ease); }
.shots li:nth-child(odd) { transform: rotate(-2deg); }
.shots li:nth-child(even) { transform: rotate(2deg) translateY(14px); }
.shots li:hover { transform: rotate(0) scale(1.03); }
.shots img {
  width: 100%;
  border-radius: 30px;
  border: 7px solid #0d0740;
  box-shadow: 0 0 0 2px var(--panel-edge), 0 10px 0 #1a0d63;
  background: var(--night);
}
.shots figcaption { margin-top: 18px; text-align: center; font-weight: 700; color: var(--mist); }

/* =====================================================================
   Facts and FAQ
   ===================================================================== */
.facts {
  position: relative;
  padding-block: clamp(56px, 8vw, 110px) clamp(40px, 6vw, 80px);
  background: var(--night) var(--grain);
}
.facts::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -15px;
  height: 16px;
  background: var(--night);
  -webkit-mask: var(--stud) repeat-x center bottom / 64px 16px;
          mask: var(--stud) repeat-x center bottom / 64px 16px;
}
.facts__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.facts h2 { font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.7rem); }
.facts__card dl { margin-top: 26px; }
.facts__card dl div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 2px dashed rgba(124, 92, 240, 0.4); }
.facts__card dt { color: var(--gold); font-weight: 700; }
.facts__card a { color: var(--white); font-weight: 700; text-underline-offset: 3px; }

.faq details {
  margin-top: 12px;
  border-radius: var(--r-m);
  background: var(--indigo);
  box-shadow: inset 0 0 0 2px rgba(124, 92, 240, 0.45);
}
.faq h2 + details { margin-top: 26px; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 1.08em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 26px; height: 26px;
  border-radius: 8px;
  background:
    linear-gradient(var(--deep), var(--deep)) center / 14px 4px no-repeat,
    linear-gradient(var(--deep), var(--deep)) center / 4px 14px no-repeat,
    var(--gold);
  transition: transform 260ms var(--ease), background-size 200ms;
}
.faq details[open] summary::after {
  transform: rotate(180deg);
  background-size: 14px 4px, 4px 0, auto;
}
.faq details p { padding: 0 18px 18px; color: var(--mist); max-width: 64ch; }

@media (max-width: 899px) {
  .facts__grid { grid-template-columns: 1fr; }
  .facts__card dl div { grid-template-columns: 1fr; gap: 2px; }
}

/* =====================================================================
   Final scene and footer
   ===================================================================== */
.final {
  position: relative;
  isolation: isolate;
  min-height: 116vh;
  display: grid;
  align-content: end;
  padding-block: 26vh clamp(90px, 14vh, 170px);
  background: var(--night);
  overflow: hidden;
}
.final__sky { position: absolute; inset: 0; z-index: -2; }
.final__sky img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.04) 5%, rgba(0,0,0,.14) 10%, rgba(0,0,0,.3) 15%, rgba(0,0,0,.52) 20%, rgba(0,0,0,.76) 25%, #000 31%, #000 68%, rgba(0,0,0,.76) 75%, rgba(0,0,0,.52) 80%, rgba(0,0,0,.3) 85%, rgba(0,0,0,.14) 90%, rgba(0,0,0,.04) 95%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.04) 5%, rgba(0,0,0,.14) 10%, rgba(0,0,0,.3) 15%, rgba(0,0,0,.52) 20%, rgba(0,0,0,.76) 25%, #000 31%, #000 68%, rgba(0,0,0,.76) 75%, rgba(0,0,0,.52) 80%, rgba(0,0,0,.3) 85%, rgba(0,0,0,.14) 90%, rgba(0,0,0,.04) 95%, transparent 100%);
}
.final__rocket {
  position: absolute;
  right: clamp(-40px, 4vw, 90px); top: 24vh;
  z-index: -1;
  width: clamp(250px, 46vw, 620px);
  filter: drop-shadow(0 14px 0 rgba(20, 30, 120, 0.25));
  will-change: transform;
}
.final__copy { display: grid; justify-items: start; }
.final__plate {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 16px;
  max-width: 600px;
  padding: clamp(22px, 3.4vw, 36px);
  border-radius: var(--r-l);
  background: var(--indigo) var(--grain);
  box-shadow: inset 0 0 0 3px rgba(124, 92, 240, 0.7), 0 10px 0 rgba(11, 18, 56, 0.75);
}
.final__plate::before {
  content: "";
  position: absolute;
  left: 26px; right: 26px; bottom: calc(100% - 1px);
  height: 12px;
  background: var(--panel-edge);
  -webkit-mask: var(--stud) repeat-x left bottom / 48px 12px;
          mask: var(--stud) repeat-x left bottom / 48px 12px;
}
.final__plate p { max-width: 40ch; color: var(--mist); font-size: 1.1em; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.store {
  display: grid;
  min-width: 190px;
  padding: 10px 22px 12px;
  border-radius: 18px;
  background: var(--night);
  box-shadow: inset 0 0 0 3px var(--gold), 0 6px 0 rgba(11, 18, 56, 0.7);
  text-decoration: none;
  line-height: 1.15;
  scroll-margin-top: 40vh;
}
.store small { color: var(--mist); font-size: 0.8em; }
.store b { font-size: 1.5em; color: var(--gold); }
.store[aria-disabled="true"] { cursor: default; }
.store:not([aria-disabled="true"]):hover { background: #16206a; }
.store:target { animation: nudge 300ms ease-out 2; }
.final__again { color: var(--white); font-weight: 700; text-underline-offset: 4px; }
.final__again:hover { color: var(--gold); }

@media (max-width: 699px) {
  .final__rocket { right: -6vw; top: 16vh; width: 82vw; }
  .final { padding-top: 62vh; }
}

.foot {
  position: relative;
  padding-top: 34px;
  background: var(--night) var(--grain);
  overflow: hidden;
}
.foot__row { position: relative; z-index: 1; display: grid; gap: 14px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 700; }
.foot__links a { display: inline-block; padding: 8px 0; text-decoration: none; }
.foot__links a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.foot__fine { max-width: 70ch; color: #a9a2e0; font-size: 0.86em; }
.foot__up { justify-self: start; color: var(--gold); font-weight: 700; padding: 8px 0; text-underline-offset: 4px; }
.foot__word {
  margin: 10px 0 -0.19em;
  font-size: 18.6vw;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: center;
  color: var(--violet);
  -webkit-text-stroke: 0.035em var(--panel-edge);
  paint-order: stroke fill;
  user-select: none;
}

.nojs { margin: 0; padding: 14px var(--gutter); background: var(--gold); color: #4a2400; font-weight: 700; text-align: center; }

/* Arrival: transform only, so nothing is ever hidden while it waits. */
.pop-in {
  animation: pop-in 640ms var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes pop-in {
  from { transform: translateY(48px) scale(0.92) rotate(var(--tilt, 0deg)); }
}

/* =====================================================================
   Reduced motion: keep every state change, drop the travel
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
