/* ===== Theme tokens ===== */
:root {
  --bg: #eeeef2;
  --ink: #111;
  --white: #fff;
  --orange: #f47a1f;
  --marquee: #f28bd0;

  --peach: #fdc79f;
  --yellow: #fbef8a;
  --lilac: #c9a8f0;
  --salmon: #f7a193;
  --mint: #a8ecc6;
  --sky: #9cc9ff;
  --rose: #f2c0c6;

  --border: 2px solid var(--ink);
  --shadow: 0 3px 0 var(--ink);
  --shadow-lg: 0 6px 0 var(--ink);
  --radius: 10px;

  --font-display: "Luckiest Guy", "Fredoka", system-ui, sans-serif;
  --font-body: "Fredoka", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-synthesis: style; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Mobile browsers ignore body overflow-x, so clip at the root too (clip keeps sticky elements working) */
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; }

/* ===== Preloader / splash ===== */
html.is-loading { overflow: hidden; }
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: linear-gradient(#bfe0ff 0%, #d9e8ff 45%, #f6c9e6 100%);
  transition: transform .6s cubic-bezier(.7, 0, .3, 1), opacity .6s;
}
.preloader.is-done { transform: translateY(-100%); opacity: .9; pointer-events: none; }
.pre-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pre-cloud { position: absolute; left: 0; width: 180px; animation: pre-drift 18s linear infinite; }
.pre-cloud--1 { top: 8%; }
.pre-cloud--2 { top: 30%; width: 140px; animation-duration: 24s; animation-delay: -10s; }
.pre-cloud--3 { top: 62%; width: 220px; animation-duration: 30s; animation-delay: -5s; }
.pre-cloud--4 { top: 80%; width: 160px; animation-duration: 22s; animation-delay: -16s; }
@keyframes pre-drift { from { transform: translateX(-25vw); } to { transform: translateX(110vw); } }
.pre-scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, .35) 50%);
  background-size: 100% 4px;
  opacity: .08;
}

.pre-stack {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(14px, 2.8vh, 28px);
  width: 100%; max-width: 720px;
  margin: auto 0;
}
.pre-wordmark {
  background: var(--white);
  border: 3px solid var(--ink); border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 14px 26px;
}
.pre-wordmark h1 {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(22px, 4.2vw, 38px); line-height: 1; letter-spacing: .02em; text-align: center;
}
.pre-hero { display: flex; flex-direction: column; align-items: center; }
.pre-hero img {
  width: min(260px, 60vw, 30vh); height: auto; aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid var(--ink); border-radius: 50%;
  box-shadow: 0 8px 0 var(--ink);
  animation: pre-bob 3s ease-in-out infinite;
}
.pre-hero__shadow {
  width: min(180px, 42vw, 21vh); height: 16px; margin-top: 14px;
  background: rgba(0, 0, 0, .18); border-radius: 50%;
  animation: pre-shadow 3s ease-in-out infinite;
}
@keyframes pre-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(4deg); } }
@keyframes pre-shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.8); opacity: .6; } }

.pre-tagline { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pre-shout {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(22px, 3.6vw, 34px); letter-spacing: .12em;
  color: var(--white);
  -webkit-text-stroke: 1.5px var(--ink);
  text-shadow: 4px 4px 0 var(--ink);
}
.pre-sub { font-style: italic; font-weight: 800; font-size: clamp(11px, 1.3vw, 13px); text-transform: uppercase; letter-spacing: .04em; }
.pre-badge {
  background: var(--white);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 14px;
  font-style: italic; font-weight: 800; font-size: 12px; text-transform: uppercase; color: #d9272e;
}
.pre-ca { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pre-ca > * {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 10px;
  font-weight: 800; font-size: 12px; text-transform: uppercase;
}
.pre-ca__copy { cursor: pointer; font-family: inherit; color: inherit; }
.pre-ca__label { color: #d9272e; font-style: italic; }
.pre-ca__value { font-family: "JetBrains Mono", monospace; text-transform: none; font-weight: 500; }
.pre-ca__copy b { background: var(--mint); border: 1.5px solid var(--ink); border-radius: 5px; padding: 0 6px; font-size: 10px; }
.pre-ca .pre-ca__mc { background: var(--yellow); }
.pre-ca .pre-ca__link { background: var(--sky); }
.pre-ca__link:hover, .pre-ca__copy:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }

.pre-actions {
  width: 100%;
  background: #fff8e7;
  border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: clamp(16px, 3vh, 24px);
  min-height: 110px;
  display: flex; flex-direction: column; justify-content: center;
}
.pre-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.pre-buttons[hidden], .pre-loading[hidden] { display: none; }
.pre-enter {
  padding: 14px 40px;
  background: var(--orange);
  border: 3px solid var(--ink); border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  font-style: italic; font-weight: 900; font-size: clamp(16px, 2vw, 20px); letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
  animation: pre-pulse 1.6s ease-in-out infinite;
}
.pre-enter--alt { background: var(--mint); animation: none; }
.pre-enter:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
.pre-enter:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }
@keyframes pre-pulse { 50% { filter: brightness(1.12); } }
.pre-bar {
  height: 32px; padding: 4px;
  background: var(--white);
  border: 3px solid var(--ink); border-radius: 10px;
  margin-bottom: 12px;
}
.pre-bar__fill {
  width: 0; height: 100%;
  border-radius: 6px;
  background: repeating-linear-gradient(-45deg, #e8766b 0 8px, #f3aaa3 8px 14px);
  animation: pre-stripes .5s linear infinite;
}
@keyframes pre-stripes { to { background-position: 20px 0; } }
.pre-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-style: italic; font-weight: 800; font-size: 12px; text-transform: uppercase;
}
.pre-status { color: #d9272e; white-space: nowrap; }
.pre-version {
  position: absolute; right: 14px; bottom: 10px; z-index: 1;
  font-style: italic; font-weight: 800; font-size: 11px; text-transform: uppercase; opacity: .45;
}
@media (max-width: 560px) {
  .pre-wordmark { padding: 12px 18px; }
  .pre-enter { padding: 12px 24px; }
  .pre-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pre-version { display: none; }
}

/* ===== Video preloader: fullscreen video on black, sits over the splash ===== */
.vloader {
  position: fixed; inset: 0; z-index: 1001;
  background: #030303;
  touch-action: none; overscroll-behavior: contain;
  transition: opacity .6s ease; /* keep in sync with FADE_MS in index.html */
}
.vloader.is-done { opacity: 0; pointer-events: none; }
.vloader__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity .5s ease;
}
.vloader.is-playing .vloader__video { opacity: 1; }
.vloader.is-fallback .vloader__video { display: none; }
/* soft shade so the wordmark and countdown stay readable over the footage */
.vloader::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(3, 3, 3, .82) 0%, rgba(3, 3, 3, .38) 30%, transparent 56%);
}
.vloader__hud {
  position: absolute; z-index: 1;
  left: 50%; bottom: clamp(20px, 5vh, 56px); transform: translateX(-50%); /* centred along the bottom */
  width: max-content; max-width: calc(100% - 32px);
  --vl-gap: clamp(16px, 2.4vw, 26px);
  display: flex; flex-direction: column; align-items: center; gap: var(--vl-gap);
  text-align: center;
  padding: clamp(18px, 2.6vw, 32px) clamp(20px, 3.2vw, 44px);
  /* frosted glass panel */
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03));
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .18);
  overflow: hidden; /* the light streak stops at the panel edge */
  animation: vl-in 1s ease .15s both;
}
/* browsers without backdrop blur get a darker panel so the text stays readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .vloader__hud { background: rgba(12, 12, 14, .72); }
}
@keyframes vl-in { from { opacity: 0; } to { opacity: 1; } }

/* ROADSTER wordmark: wide italic letters in champagne metal, with a slow sheen */
.vloader__brand { position: relative; max-width: 100%; }
.vloader__word {
  display: block;
  padding-right: .18em; /* room for the italic slant inside the gradient box */
  font-family: "Michroma", "Arial Black", sans-serif; font-weight: 400; font-style: italic;
  font-size: clamp(28px, 8.6vw, 58px); line-height: 1.1; letter-spacing: .02em; text-transform: uppercase;
  white-space: nowrap;
  color: #e7d8b1;
  background:
    linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .85) 50%, transparent 58%) 130% 0 / 260% 100% no-repeat,
    linear-gradient(180deg, #ffffff 0%, #f3ead2 22%, #e7d8b1 52%, #bba477 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .03em #dccba0; /* Michroma has one weight; this gives the wordmark its heft */
  animation: vl-sheen 5.5s ease-in-out 1.2s infinite;
}
@keyframes vl-sheen { 0% { background-position: 130% 0, 0 0; } 45%, 100% { background-position: -30% 0, 0 0; } }
/* narrow light streak running off the right of the wordmark: flares once, then settles */
.vloader__brand::after {
  content: ""; position: absolute; left: 96%; top: 44%;
  width: clamp(60px, 16vw, 200px); height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .8), rgba(231, 216, 177, .35) 35%, transparent);
  filter: blur(1px);
  transform-origin: left center;
  opacity: .28;
  animation: vl-streak 2.8s ease-out .9s both;
}
@keyframes vl-streak {
  0% { opacity: 0; transform: scaleX(.2); }
  30% { opacity: .9; transform: scaleX(1); }
  100% { opacity: .28; transform: scaleX(1); }
}

/* supporting lines: small spaced capitals above the wordmark and under the countdown */
.vloader__eyebrow, .vloader__copy {
  font-family: "Michroma", "Arial Black", sans-serif; font-weight: 400; text-transform: uppercase; line-height: 1.5;
}
.vloader__eyebrow {
  margin-bottom: calc(8px - var(--vl-gap)); /* sits tight on the wordmark */
  font-size: clamp(9px, 1vw, 12px); letter-spacing: .5em; color: #c5a46d;
  padding-left: .5em; /* balances the trailing letter-spacing so it centres */
}
.vloader__copy {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 100%; padding-top: var(--vl-gap);
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.vloader__tag { font-size: clamp(10px, 1.1vw, 13px); letter-spacing: .34em; color: #e7d8b1; padding-left: .34em; }
.vloader__sub { font-size: clamp(8px, .8vw, 10px); letter-spacing: .2em; color: rgba(245, 245, 245, .62); }
.vloader__sub span { white-space: nowrap; } /* breaks between the two phrases, never inside one */

/* Enter / Play Game: dark rectangular buttons side by side, brighten slightly on hover */
.vloader__actions { display: flex; justify-content: center; gap: 12px; width: 100%; }
.vloader__enter {
  flex: 0 1 180px; min-width: 0; padding: 14px 12px; white-space: nowrap;
  background: rgba(17, 17, 17, .88);
  border: 1px solid #292929; border-radius: 2px;
  font-family: "Michroma", "Arial Black", sans-serif; font-size: clamp(9px, 2.6vw, 12px); letter-spacing: .18em; text-transform: uppercase;
  color: #fff; cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}
.vloader__enter:hover, .vloader__enter:focus-visible { background: rgba(28, 28, 28, .92); border-color: #5a5546; }
.vloader__enter:focus-visible { outline: 1px solid #c5a46d; outline-offset: 3px; }
.vloader__enter:disabled { opacity: .55; cursor: default; }

/* countdown: plain white technical digits, champagne separators, no boxes or glow */
.vloader__timer {
  display: flex; align-items: baseline; gap: .42em;
  font-family: "Michroma", "JetBrains Mono", ui-monospace, monospace; font-weight: 400;
  font-size: clamp(20px, 2.3vw, 28px); line-height: 1; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: #f5f5f5;
}
.vloader__timer span { display: inline-flex; }
.vloader__timer b { display: inline-block; width: .92em; text-align: center; font-weight: inherit; }
.vloader__timer i { font-style: normal; color: #c5a46d; }
@media (prefers-reduced-motion: reduce) {
  .vloader, .vloader__video { transition: none; }
  .vloader__hud, .vloader__word, .vloader__brand::after { animation: none; }
  .vloader__enter { transition: none; }
}

/* ===== Marquee ===== */
.marquee {
  background: var(--marquee);
  border-bottom: var(--border);
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--marquee-dur, 30s) linear infinite;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
}
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 28px; padding-right: 28px; flex-shrink: 0; }
.marquee__ca {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 2px solid var(--ink); border-radius: 7px;
  padding: 2px 3px 2px 10px;
  font: inherit; letter-spacing: inherit; color: inherit;
  cursor: pointer;
}
.marquee__ca code { font-family: "JetBrains Mono", ui-monospace, monospace; font-style: normal; font-weight: 500; font-size: 13px; letter-spacing: 0; }
.marquee__ca b {
  background: var(--mint); border: 1.5px solid var(--ink); border-radius: 5px;
  padding: 1px 8px; font-size: 11px; text-transform: uppercase;
}
.marquee__ca:hover b { background: var(--yellow); }
.marquee__ca.is-copied b { background: var(--yellow); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Header ===== */
.header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 20;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo__badge {
  width: 44px; height: 44px;
  object-fit: cover;
  background: #9cc9ff;
  border: var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
}
.logo__text {
  display: flex; flex-direction: column;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: .95;
  font-size: 18px;
  color: #d9272e;
  -webkit-text-stroke: .5px var(--ink);
}
.logo__text em { font-style: normal; color: var(--orange); }

.nav { display: flex; flex-wrap: wrap; gap: 12px; }

/* Pastel pill buttons */
.pill {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border: var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .02em;
  transition: transform .12s, box-shadow .12s;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.pill:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.pill .dot {
  position: absolute; top: -5px; right: -5px;
  width: 10px; height: 10px;
  background: #d8222a; border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.pill--peach { background: var(--peach); }
.pill--yellow { background: var(--yellow); }
.pill--lilac { background: var(--lilac); }
.pill--salmon { background: var(--salmon); }
.pill--mint { background: var(--mint); }
.pill--sky { background: var(--sky); }
.pill--rose { background: var(--rose); }

.menu-toggle {
  display: none;
  width: 46px; height: 42px;
  background: var(--yellow);
  border: var(--border); border-radius: 8px;
  box-shadow: var(--shadow);
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.menu-toggle span { width: 20px; height: 2.5px; background: var(--ink); border-radius: 2px; }

/* ===== Hero ===== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 5;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(40px, min(6.2vw, 10vh), 112px);
  max-width: 1150px;
  line-height: 1.02;
  letter-spacing: -.01em;
}
.hero__faces { display: inline-flex; vertical-align: middle; margin-right: 10px; transform: translateY(-6px); }
.face {
  width: clamp(40px, min(5.4vw, 8.6vh), 96px); height: clamp(40px, min(5.4vw, 8.6vh), 96px);
  display: grid; place-items: center;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  font-size: clamp(22px, 3vw, 54px);
  margin-right: -10px;
  overflow: hidden;
}
.face img { width: 100%; height: 100%; object-fit: cover; }
.face--pink { background: #f7a6d8; }
.face--yellow { background: #ffe066; }
.face--blue { background: #a9d4ff; }

.ca {
  margin-top: clamp(20px, 3.5vh, 52px);
  display: flex; align-items: center; gap: 10px;
  width: fit-content; max-width: 100%;
  background: var(--white);
  border: var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 8px 8px 8px 10px;
}
.ca__label {
  flex-shrink: 0;
  background: var(--yellow); border: var(--border); border-radius: 6px;
  padding: 4px 8px;
  font-style: italic; font-weight: 800; font-size: 13px;
}
.ca__addr {
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(13px, 1.25vw, 18px);
}
.ca__copy {
  flex-shrink: 0;
  background: var(--mint); border: var(--border); border-radius: 8px; box-shadow: var(--shadow);
  padding: 8px 16px;
  font-style: italic; font-weight: 800; font-size: 13px; text-transform: uppercase;
  transition: transform .12s, box-shadow .12s;
}
.ca__copy:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.ca__copy:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ca--wide { margin-top: 28px; }

.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.hero__cta .btn-orange { margin-top: 0; }
.pill--lg { padding: 12px 22px; font-size: 14px; }

/* ===== Card base ===== */
.card {
  background: var(--white);
  border: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.card--yellow { background: var(--yellow); }
.card--peach { background: var(--peach); }
.card--mint { background: var(--mint); }
.card--sky { background: var(--sky); }
.card--lilac { background: var(--lilac); }
.card--salmon { background: var(--salmon); }

/* ===== Buttons ===== */
.btn-orange {
  display: block; width: 100%;
  padding: 13px 16px;
  background: var(--orange);
  border: var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  font-style: italic; font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  text-align: center;
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn-orange:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn-orange:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn-orange--inline { display: inline-block; width: auto; margin-top: 8px; padding: 12px 26px; }

/* ===== Scene ===== */
.landing {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.landing > .header, .landing > .hero { width: 100%; }
.landing { position: relative; isolation: isolate; }

/* Hero background video — covers the whole first screen (sized/cropped by script.js).
   Only shown once hero.mp4 loads; otherwise the hero keeps its plain background. */
.hero-video { position: absolute; inset: 0; z-index: -1; overflow: hidden; display: none; }
.landing.has-video .hero-video { display: block; }
.hero-video__frame { position: absolute; inset: 0; }
.hero-video video { position: absolute; display: block; max-width: none; }
.hero-video::after {
  /* light fade behind the text so the title and cards stay readable */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(238, 238, 242, .92) 0%, rgba(238, 238, 242, .7) 38%, rgba(238, 238, 242, 0) 68%);
}
@media (max-width: 860px) {
  .hero-video::after { background: linear-gradient(rgba(238, 238, 242, .94) 0%, rgba(238, 238, 242, .8) 45%, rgba(238, 238, 242, 0) 72%); }
}
.scene {
  position: relative;
  flex: 1 0 auto;
  min-height: clamp(280px, 36vh, 380px);
  margin-top: 0;
  overflow: hidden;
  pointer-events: none;
}
.cloud { position: absolute; width: 160px; animation: drift 14s ease-in-out infinite alternate; }
.cloud--1 { left: 4%; top: 60px; width: 150px; }
.cloud--2 { left: 55%; top: 50px; width: 130px; animation-delay: -4s; }
.cloud--3 { right: 6%; top: 30px; width: 220px; animation-delay: -8s; }
@keyframes drift { to { transform: translateX(40px); } }

.sun { position: absolute; left: 6%; top: 50px; width: 90px; z-index: -1; animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.signpost { position: absolute; left: 2%; bottom: 60px; width: 180px; z-index: 3; }
.signpost__pole { position: absolute; left: 110px; bottom: 0; width: 8px; height: 280px; background: #333; border: 2px solid var(--ink); }
.sign {
  position: relative;
  white-space: nowrap;
  background: #1d1d1d; color: #fff;
  border: 2px solid #fff; outline: 2px solid var(--ink);
  font-family: Georgia, serif; font-style: italic; font-size: 12px;
  padding: 3px 10px;
  margin-bottom: 10px;
  display: flex; justify-content: space-between;
  width: 130px;
}
.sign--moon { width: 90px; margin-left: 100px; transform: rotate(-22deg); margin-bottom: 70px; }

.palm { position: absolute; right: 16%; bottom: 60px; width: 180px; z-index: 1; transform-origin: bottom center; animation: sway 5s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }

.flower { position: absolute; bottom: 60px; width: 4px; height: 70px; background: #2f9a45; z-index: 2; }
.flower::before {
  content: ""; position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle, #ffd23f 0 5px, transparent 6px),
    conic-gradient(var(--c) 0 12%, transparent 12% 20%, var(--c) 20% 32%, transparent 32% 40%, var(--c) 40% 52%, transparent 52% 60%, var(--c) 60% 72%, transparent 72% 80%, var(--c) 80% 92%, transparent 92%);
}
.flower--pink { left: 3%; --c: #f28bd0; }
.flower--orange { left: 22%; --c: #ff9b3d; height: 50px; }
.flower--r { left: auto; right: 12%; height: 90px; }

.car-wrap { position: absolute; left: 50%; bottom: 40px; width: min(600px, 92vw, 60vh); transform: translateX(-35%); z-index: 4; }
.car { position: relative; width: 100%; animation: fly 2.4s ease-in-out infinite alternate; }
@keyframes fly { from { transform: translateY(-40px) rotate(-3deg); } to { transform: translateY(-70px) rotate(-6deg); } }
.car-shadow {
  position: absolute; left: 20%; right: 8%; bottom: 0; height: 18px;
  background: rgba(0,0,0,.25); border-radius: 50%;
  animation: shadow 2.4s ease-in-out infinite alternate;
}
@keyframes shadow { to { transform: scaleX(.8); opacity: .6; } }
.wheel { animation: spin .8s linear infinite; }
.flame { transform-origin: 24px 196px; animation: flame .15s ease-in-out infinite alternate; }
@keyframes flame { to { transform: scaleX(1.25) scaleY(.9); } }
.speed { animation: speed .6s linear infinite; }
@keyframes speed { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-40px); opacity: 0; } }

.grass {
  position: absolute; left: 0; right: 0; bottom: 50px; height: 40px; z-index: 2;
  background:
    radial-gradient(ellipse 22px 34px at 20px 100%, #2fb34a 98%, transparent) 0 0 / 60px 40px repeat-x,
    radial-gradient(ellipse 14px 26px at 45px 100%, #58c24a 98%, transparent) 0 0 / 60px 40px repeat-x;
}
.road {
  position: absolute; left: 0; right: 0; bottom: 0; height: 60px; z-index: 3;
  background: #222; border-top: 3px solid var(--ink);
  overflow: hidden;
}
.road__lines {
  position: absolute; top: 50%; left: 0; width: 200%; height: 4px;
  background: repeating-linear-gradient(90deg, #eee 0 50px, transparent 50px 110px);
  animation: road 1.2s linear infinite;
}
@keyframes road { to { transform: translateX(-110px); } }

/* ===== Sections ===== */
.section { max-width: 1200px; margin: 0 auto; padding: 90px 24px 10px; scroll-margin-top: 20px; }
.section__head { margin-bottom: 34px; }
.section__head h2 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  margin-top: 14px;
  max-width: 800px;
}
.tag {
  display: inline-block;
  padding: 6px 14px;
  border: var(--border); border-radius: 8px; box-shadow: var(--shadow);
  font-style: italic; font-weight: 800; font-size: 12px; text-transform: uppercase;
}
.tag--peach { background: var(--peach); }
.tag--yellow { background: var(--yellow); }
.tag--lilac { background: var(--lilac); }
.tag--salmon { background: var(--salmon); }
.tag--mint { background: var(--mint); }

/* About: full-width animated roadster scene under the cards */
.scene--about {
  flex: none;
  height: clamp(300px, 42vh, 420px);
  min-height: 0;
  width: 100vw;
  margin: 60px 0 0 calc(50% - 50vw);
}

/* About */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.about__text { padding: 28px; font-size: 17px; line-height: 1.6; }
.about__text p { margin-bottom: 14px; }
.about__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini { padding: 18px; transition: transform .15s; }
.mini:hover { transform: rotate(-1.5deg) translateY(-3px); }
.mini span { font-size: 30px; }
.mini h3 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 18px; margin: 6px 0 4px; }
.mini p { font-size: 14px; }

/* Stake */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 22px; }
.stat small { display: block; font-weight: 700; font-style: italic; text-transform: uppercase; font-size: 12px; }
.stat strong { font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 4vw, 44px); }

/* Chart */
.chart {
  margin-top: 20px; overflow: hidden; padding: 0; background: var(--white);
  --chart-line: var(--ink); --chart-fill: var(--orange); --chart-grid: rgba(17, 17, 17, .1); --chart-muted: rgba(17, 17, 17, .55);
}
.chart__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 16px 20px; border-bottom: var(--border);
}
.chart__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-right: auto; }
.chart__title small { width: 100%; font-weight: 700; font-style: italic; text-transform: uppercase; font-size: 12px; }
.chart__title strong { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 3vw, 32px); line-height: 1; }
.chart__delta { font-weight: 700; font-size: 15px; }
.chart__delta.is-up { color: #138a4b; }
.chart__delta.is-down { color: #c8322b; }
.chart__ranges { display: flex; gap: 6px; }
.chart__ranges button, .chart__more {
  padding: 6px 12px; border: var(--border); border-radius: 999px; background: var(--white);
  font-weight: 700; font-size: 14px; color: inherit; box-shadow: var(--shadow);
}
.chart__ranges button[aria-pressed="true"] { background: var(--yellow); }
.chart__ranges button:active, .chart__more:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.chart__plot { position: relative; height: clamp(400px, 64vh, 640px); touch-action: pan-y; }
.chart__svg { width: 100%; height: 100%; overflow: visible; }
.chart__svg text { font-family: var(--font-body); font-size: 12px; fill: var(--chart-muted); }
.chart__svg .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart__svg .line { fill: none; stroke: var(--chart-line); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__svg .cross { stroke: var(--chart-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart__svg .dot { fill: var(--chart-fill); stroke: var(--chart-line); stroke-width: 2.5; }
.chart__tip {
  position: absolute; top: 10px; z-index: 1; pointer-events: none;
  padding: 6px 10px; border: var(--border); border-radius: 8px; background: var(--white); box-shadow: var(--shadow);
  font-size: 13px; white-space: nowrap;
}
.chart__tip b { display: block; font-size: 15px; }
.chart__status { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; color: var(--chart-muted); }
.chart__status[hidden] { display: none; }
@media (max-width: 560px) {
  .chart__bar { padding: 14px; }
  .chart__more { display: none; }
}

/* Game + leaderboard */
.arcade {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: stretch;
  overflow: hidden;
  /* the whole play card (and the game inside it) is ~85% of the screen height */
  height: 85vh; height: 85svh;
  min-height: 460px;
}
.launch {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  text-align: center;
  padding: 36px 24px;
  background: var(--yellow);
  border-right: var(--border);
}
.launch__img {
  width: 120px; height: 120px; object-fit: cover;
  border: 3px solid var(--ink); border-radius: 50%; box-shadow: var(--shadow-lg);
  animation: bobble 2.4s ease-in-out infinite alternate;
}
@keyframes bobble { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-10px) rotate(4deg); } }
.launch h3 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 3vw, 40px); margin: 22px 0 8px; }
.launch p { line-height: 1.5; max-width: 340px; }
.launch__btn { width: auto; margin: 22px 0 14px; padding: 16px 40px; font-size: 18px; }
.launch__best { font-weight: 600; }

/* Game — loads inside the play card */
.arena {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  background: linear-gradient(#cfe7ff, #eeeef2);
}
.arena[hidden] { display: none; }
.arena__close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 44px; height: 44px;
  background: var(--salmon); border: var(--border); border-radius: 10px; box-shadow: var(--shadow);
  font-size: 18px; font-weight: 900;
}
.arena__close:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }

.game {
  position: relative; overflow: hidden; padding: 0;
  /* canvas size is set by game.js to fill the card */
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.game canvas { display: block; cursor: pointer; touch-action: none; }
.game__actions { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.game__actions .btn-orange { margin: 0; }
.game__actions .pill { cursor: pointer; }
.game__overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(17, 17, 17, .25);
  padding: 12px;
}
.game__overlay[hidden] { display: none; }
.game__panel {
  width: min(100%, 340px);
  max-height: 100%; overflow: auto;
  background: var(--white);
  border: var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: clamp(14px, 3vh, 24px) clamp(14px, 3vw, 22px);
  text-align: center;
}
.game__panel[hidden] { display: none; }
.game__panel h3 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 4vh, 28px); margin-bottom: 8px; }
.game__panel p { line-height: 1.5; margin-bottom: 16px; }
.game__panel kbd { font-family: "JetBrains Mono", monospace; font-size: 12px; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 4px; padding: 1px 6px; }
.game__panel .btn-orange { margin-top: 4px; }
.game__scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 16px; }
.game__scores div { background: var(--yellow); border: var(--border); border-radius: 10px; padding: 8px; }
.game__scores div + div { background: var(--lilac); }
.game__scores small { display: block; font-style: italic; font-weight: 800; font-size: 11px; text-transform: uppercase; }
.game__scores b { font-family: var(--font-display); font-weight: 900; font-size: clamp(24px, 4.5vh, 32px); }
.game__form { display: flex; gap: 8px; }
.game__form[hidden] { display: none; }
.game__form input {
  flex: 1; min-width: 0;
  border: var(--border); border-radius: 8px;
  padding: 9px 12px;
  font: 600 15px var(--font-body);
  outline: none;
}
.game__form input:focus { box-shadow: 0 0 0 3px var(--sky); }
.game__form .pill { cursor: pointer; }
.game__form .pill:disabled { opacity: .5; cursor: default; }
.game__msg { min-height: 1.5em; font-size: 14px; font-weight: 600; margin: 10px 0 6px !important; }

.board { padding: 28px; overflow-y: auto; }
.board__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.board__head h3 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 2.4vw, 30px); }
.board__mode {
  background: var(--mint); border: var(--border); border-radius: 6px; box-shadow: var(--shadow);
  padding: 3px 10px;
  font-style: italic; font-weight: 800; font-size: 11px; text-transform: uppercase; white-space: nowrap;
}
.board__mode.is-local { background: var(--yellow); }
.board__list { list-style: none; display: grid; gap: 8px; }
.board__list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border: var(--border); border-radius: 10px;
  font-weight: 600;
}
.board__list li:nth-child(1) { background: var(--yellow); }
.board__list li:nth-child(2) { background: #e6e6ee; }
.board__list li:nth-child(3) { background: var(--peach); }
.board__rank { width: 28px; text-align: center; font-family: var(--font-display); font-weight: 900; }
.board__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board__list b { font-family: var(--font-display); font-weight: 900; font-size: 20px; }
.board__list .board__empty { justify-content: center; border-style: dashed; color: #555; font-weight: 500; }
.board__note { margin-top: 16px; font-size: 14px; color: #555; }

/* How to buy */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { padding: 22px; }
.step__n {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--white); border: var(--border); border-radius: 50%; box-shadow: var(--shadow);
  font-family: var(--font-display); font-weight: 900; font-size: 20px;
}
.step h3 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 20px; margin: 14px 0 6px; }
.step p { line-height: 1.5; }
.step a, .faq a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.faq code { font-family: "JetBrains Mono", monospace; font-size: .9em; word-break: break-all; background: var(--yellow); padding: 1px 5px; border-radius: 4px; }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.phase { padding: 22px; position: relative; }
.phase:nth-child(odd) { transform: rotate(-1deg); }
.phase:nth-child(even) { transform: rotate(1deg); }
.phase__n { font-style: italic; font-weight: 800; font-size: 12px; text-transform: uppercase; }
.phase h3 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 26px; margin: 4px 0 12px; }
.phase ul { padding-left: 18px; line-height: 1.8; font-weight: 500; }
.phase__done, .phase__live {
  position: absolute; top: 14px; right: 14px;
  font-style: normal; font-size: 11px; font-weight: 800;
  padding: 3px 8px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--white);
}
.phase__live { color: #d8222a; }

/* FAQ */
.faq { display: grid; gap: 14px; max-width: 860px; }
.faq details { padding: 0; overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex-shrink: 0;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--mint); border: var(--border); border-radius: 6px;
  font-weight: 900; transition: transform .2s;
}
.faq details[open] summary::after { content: "–"; background: var(--salmon); }
.faq details p { padding: 0 22px 20px; line-height: 1.6; }

/* Footer */
.footer { margin-top: 100px; background: var(--ink); color: #fff; padding: 40px 24px 28px; }
.footer__inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer .pill { color: var(--ink); box-shadow: 0 3px 0 #555; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.footer__legal { max-width: 1200px; margin: 28px auto 0; font-size: 12px; color: #aaa; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1100;
  transform: translate(-50%, 140%);
  background: var(--yellow); border: var(--border); border-radius: 10px; box-shadow: var(--shadow);
  padding: 12px 20px; font-weight: 700;
  visibility: hidden; opacity: 0;
  transition: transform .3s, opacity .3s, visibility .3s;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; opacity: 1; }

/* ===== Scroll reveal animations (set up by script.js) ===== */
/* Uses the individual translate/scale/rotate properties so it never fights the
   elements' own transform (tilted roadmap cards, hover lifts, etc.). */
.reveal-ready [data-reveal] {
  opacity: 0;
  transition:
    opacity .7s ease var(--reveal-delay, 0ms),
    translate .8s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms),
    scale .8s cubic-bezier(.3, 1.4, .5, 1) var(--reveal-delay, 0ms),
    rotate .8s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms),
    transform .15s, box-shadow .15s, filter .15s;
}
.reveal-ready [data-reveal="up"] { translate: 0 48px; }
.reveal-ready [data-reveal="down"] { translate: 0 -28px; }
.reveal-ready [data-reveal="left"] { translate: -70px 0; }
.reveal-ready [data-reveal="right"] { translate: 70px 0; }
.reveal-ready [data-reveal="pop"] { scale: .7; }
.reveal-ready [data-reveal="tilt"] { translate: 0 40px; rotate: -6deg; }
.reveal-ready [data-reveal].is-visible { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; }

/* ===== Flying objects — a different one in every section (added by script.js) ===== */
.section { position: relative; }
.section > *:not(.section-car) { position: relative; z-index: 1; }
.section-car {
  position: absolute; z-index: 0;
  top: 6px; left: calc(50% - 50vw);
  width: 100vw; height: 96px;
  overflow: hidden;
  pointer-events: none;
}
.section-car__ship {
  position: absolute; left: 0; top: 14px;
  width: 150px;
  opacity: 0;
  animation-timing-function: cubic-bezier(.45, .05, .55, .95);
  animation-iteration-count: infinite;
  animation-delay: var(--car-delay, 0s);
  animation-play-state: paused;
}
.section-car.is-on .section-car__ship,
.section-car.is-on .section-car__ship * { animation-play-state: running; }
.section-car__ship svg { display: block; width: 100%; overflow: visible; }
.section-car__ship * { animation-play-state: paused; }

/* shared little helpers */
.fc-flame { transform-origin: -32px 6px; animation: fc-flame .12s linear infinite alternate; }
@keyframes fc-flame { to { transform: scaleX(1.45) scaleY(.9); } }
.fc-puff { animation: fc-puff .9s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.fc-puff:nth-of-type(2) { animation-delay: .3s; }
.fc-puff:nth-of-type(3) { animation-delay: .6s; }
@keyframes fc-puff { from { opacity: .9; transform: translateX(0) scale(.6); } to { opacity: 0; transform: translateX(-26px) scale(1.4); } }
.fc-bob { animation: fc-bob .3s ease-in-out infinite alternate; }
@keyframes fc-bob { to { transform: translateY(-2px); } }
.fc-blink { animation: fc-blink .5s steps(2) infinite; }
@keyframes fc-blink { 50% { opacity: .15; } }

/* 🚗 About — roadster swoops left → right */
.fly-car { animation-name: fly-car; animation-duration: 10s; }
@keyframes fly-car {
  0%   { opacity: 1; transform: translateX(-170px) translateY(24px) rotate(-3deg); }
  11%  { transform: translateX(calc(50vw - 75px)) translateY(-6px) rotate(-9deg); }
  22%  { opacity: 1; transform: translateX(calc(100vw + 40px)) translateY(14px) rotate(-4deg); }
  22.1%, 100% { opacity: 0; transform: translateX(calc(100vw + 40px)); }
}

/* 🚀 Chart — rocket climbs left → right */
.fly-rocket { width: 42px; top: 20px; animation-name: fly-rocket; animation-duration: 9s; animation-timing-function: cubic-bezier(.5, 0, .75, 1); }
@keyframes fly-rocket {
  0%   { opacity: 1; transform: translateX(-100px) translateY(40px) rotate(62deg); }
  20%  { opacity: 1; transform: translateX(calc(100vw + 40px)) translateY(-10px) rotate(70deg); }
  20.1%, 100% { opacity: 0; transform: translateX(calc(100vw + 40px)); }
}

/* 🛸 Play — UFO hovers right → left, stopping to beam */
.fly-ufo { width: 120px; top: 4px; animation-name: fly-ufo; animation-duration: 13s; animation-timing-function: ease-in-out; }
@keyframes fly-ufo {
  0%   { opacity: 1; transform: translateX(calc(100vw + 40px)) translateY(8px); }
  7%   { transform: translateX(72vw) translateY(-2px) rotate(-6deg); }
  11%  { transform: translateX(72vw) translateY(6px) rotate(0); }
  18%  { transform: translateX(38vw) translateY(-2px) rotate(-6deg); }
  22%  { transform: translateX(38vw) translateY(6px) rotate(0); }
  30%  { opacity: 1; transform: translateX(-160px) translateY(0) rotate(-8deg); }
  30.1%, 100% { opacity: 0; transform: translateX(-160px); }
}
.fly-ufo .ufo-beam { animation: ufo-beam .8s ease-in-out infinite alternate; transform-origin: 50% 0; transform-box: fill-box; }
@keyframes ufo-beam { from { opacity: .15; transform: scaleX(.7); } to { opacity: .55; transform: scaleX(1); } }

/* 🧑‍🚀 How to buy — astronaut tumbles slowly left → right */
.fly-astro { width: 64px; animation-name: fly-astro; animation-duration: 16s; animation-timing-function: linear; }
@keyframes fly-astro {
  0%   { opacity: 1; transform: translateX(-90px) translateY(10px) rotate(0); }
  20%  { transform: translateX(28vw) translateY(-4px) rotate(140deg); }
  40%  { opacity: 1; transform: translateX(calc(100vw + 40px)) translateY(12px) rotate(360deg); }
  40.1%, 100% { opacity: 0; transform: translateX(calc(100vw + 40px)); }
}

/* 🪙 Tokenomics — $FTR coin bounces right → left, flipping */
.fly-coin { width: 58px; top: 0; animation-name: fly-coin; animation-duration: 9s; animation-timing-function: linear; }
@keyframes fly-coin {
  0%   { opacity: 1; transform: translateX(calc(100vw + 40px)); }
  26%  { opacity: 1; transform: translateX(-80px); }
  26.1%, 100% { opacity: 0; transform: translateX(-80px); }
}
.fly-coin .coin-bounce { animation: coin-bounce .55s cubic-bezier(.3, 0, .7, 1) infinite alternate; }
@keyframes coin-bounce { from { transform: translateY(0); } to { transform: translateY(30px); } }
.fly-coin svg { animation: coin-flip .7s linear infinite; }
@keyframes coin-flip { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.12); } }

/* ☄️ Roadmap — comet streaks diagonally */
.fly-comet { width: 170px; top: 0; animation-name: fly-comet; animation-duration: 7s; animation-timing-function: cubic-bezier(.3, .2, .7, 1); }
@keyframes fly-comet {
  0%   { opacity: 1; transform: translateX(-200px) translateY(-10px) rotate(14deg); }
  15%  { opacity: 1; transform: translateX(calc(100vw + 60px)) translateY(56px) rotate(14deg); }
  15.1%, 100% { opacity: 0; transform: translateX(calc(100vw + 60px)); }
}
.fly-comet .comet-glow { animation: comet-glow .25s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes comet-glow { to { transform: scale(1.25); opacity: .6; } }

/* 🛰️ FAQ — satellite drifts right → left */
.fly-sat { width: 110px; animation-name: fly-sat; animation-duration: 18s; animation-timing-function: linear; }
@keyframes fly-sat {
  0%   { opacity: 1; transform: translateX(calc(100vw + 40px)) translateY(10px) rotate(-12deg); }
  22%  { transform: translateX(50vw) translateY(0) rotate(8deg); }
  44%  { opacity: 1; transform: translateX(-140px) translateY(12px) rotate(-10deg); }
  44.1%, 100% { opacity: 0; transform: translateX(-140px); }
}

@media (max-width: 560px) {
  .section-car { height: 76px; top: 2px; }
  .section-car__ship { scale: .7; transform-origin: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .section-car { display: none; }
}

/* ===== Extra reveal styles (each section enters differently) ===== */
.about__cards, #tokenomics .stats, .steps { perspective: 1000px; }
.reveal-ready [data-reveal="flip"] { rotate: y 85deg; }
.reveal-ready [data-reveal="flipx"] { rotate: x -85deg; }
.reveal-ready [data-reveal="drop"] { translate: 0 -90px; }
.reveal-ready [data-reveal="swing"] { rotate: -14deg; translate: 0 50px; transform-origin: 0 0; }
.reveal-ready [data-reveal="zoom"] { scale: .82; filter: blur(12px); }
.reveal-ready [data-reveal="unfold"] { clip-path: inset(0 100% 0 0); }
.reveal-ready [data-reveal="drop"] {
  transition-timing-function: ease, cubic-bezier(.3, 1.6, .5, 1), ease, ease, ease, ease, ease;
}
.reveal-ready [data-reveal="zoom"],
.reveal-ready [data-reveal="unfold"] {
  transition:
    opacity .7s ease var(--reveal-delay, 0ms),
    scale .9s cubic-bezier(.2, .8, .2, 1) var(--reveal-delay, 0ms),
    filter .9s ease var(--reveal-delay, 0ms),
    clip-path 1s cubic-bezier(.7, 0, .2, 1) var(--reveal-delay, 0ms),
    transform .15s, box-shadow .15s;
}
.reveal-ready [data-reveal="zoom"].is-visible { filter: none; }
/* negative inset so the finished card keeps its hard drop shadow */
.reveal-ready [data-reveal="unfold"].is-visible { clip-path: inset(-30px); }
.reveal-ready [data-reveal="unfold"] { opacity: 1; }

/* ===== Hover effects — different per container ===== */
/* About cards: 3D tilt that follows the pointer (script.js sets --rx/--ry) */
.mini { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .15s; }
.mini:hover { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); }
/* Stats tiles: playful wiggle */
.stat:hover { animation: tile-wiggle .5s ease-in-out; }
@keyframes tile-wiggle { 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 60% { transform: rotate(-2deg); } 80% { transform: rotate(1deg); } }
/* How-to steps: lift, number spins */
.step:hover { transform: translateY(-6px); box-shadow: 0 10px 0 var(--ink); }
.step__n { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.step:hover .step__n { transform: rotate(360deg) scale(1.15); }
/* Roadmap cards: straighten and lift */
.phase:nth-child(odd):hover, .phase:nth-child(even):hover { transform: rotate(0) translateY(-8px); box-shadow: 0 12px 0 var(--ink); }
/* FAQ: nudge sideways */
.faq details:hover { transform: translateX(8px); }
.faq details[open]:hover { transform: none; }

/* ===== Marquee bands between sections (added by script.js) ===== */
.band {
  position: relative; z-index: 2;
  width: 106vw; margin: 48px 0 0 -3vw;
  overflow: hidden;
  background: var(--band-bg, var(--yellow));
  color: var(--band-ink, var(--ink));
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  rotate: var(--band-tilt, -1.5deg);
  padding: 12px 0;
  user-select: none;
}
.band__track {
  display: flex; width: max-content;
  animation: marquee var(--band-dur, 30s) linear infinite;
}
.band--rev .band__track { animation-direction: reverse; }
.band__group { display: flex; align-items: center; gap: 26px; padding-right: 26px; flex-shrink: 0; }
.band__item {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(18px, 2.2vw, 28px); letter-spacing: .02em; white-space: nowrap;
}
.band__sep { font-size: clamp(16px, 1.8vw, 24px); }
.band:hover .band__track { animation-play-state: paused; }
.band--yellow { --band-bg: var(--yellow); }
.band--mint   { --band-bg: var(--mint); --band-tilt: 1.5deg; }
.band--lilac  { --band-bg: var(--lilac); }
.band--peach  { --band-bg: var(--peach); --band-tilt: 1.5deg; }
.band--sky    { --band-bg: var(--sky); }
.band--salmon { --band-bg: var(--salmon); --band-tilt: 1.5deg; }
.band--pink   { --band-bg: var(--marquee); }
.band--dark   { --band-bg: var(--ink); --band-ink: #fff; --band-tilt: 1.5deg; box-shadow: 0 6px 0 var(--orange); }
@media (max-width: 560px) {
  .band { margin-top: 36px; padding: 9px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .band { rotate: 0deg; }
}

/* ===== Alternate sections get a soft full-width tint ===== */
.section--tint {
  background: var(--tint);
  box-shadow: 0 0 0 100vmax var(--tint);
  clip-path: inset(0 -100vmax);
  padding-bottom: 90px;
  margin-top: 0;
}
#chart { --tint: #e8f6ee; }
#how { --tint: #f1eafc; }
#roadmap { --tint: #fdeeea; }

/* bands sit flush against a tinted section; keep the footer close to its band */
.section--tint + .band { margin-top: 0; }
.band--dark + .footer { margin-top: 40px; }

/* ===== Background pictures ===== */
/* doodle wallpaper behind the whole page */
body { background: url("img/bg-doodles.svg") 0 0 / 360px repeat, var(--bg); }

/* tinted sections: full-width colour layer (with the doodles on top of the tint) */
.section--tint {
  background: none; box-shadow: none; clip-path: none;
  isolation: isolate;
  padding-bottom: 90px;
}
.section--tint::before {
  content: ""; position: absolute; z-index: -1;
  top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw;
  background: url("img/bg-doodles.svg") 0 0 / 360px repeat, var(--tint);
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
}

/* big floating planets, a different one per section */
.section::after {
  content: ""; position: absolute; z-index: 0;
  width: var(--planet-w, 220px); aspect-ratio: var(--planet-ratio, 1);
  background: var(--planet) center / contain no-repeat;
  pointer-events: none;
  animation: planet-float 7s ease-in-out infinite;
}
.section:not(#about):not(#chart):not(#play):not(#how):not(#tokenomics):not(#roadmap):not(#faq)::after { display: none; }
@keyframes planet-float { 50% { translate: 0 -16px; } }
@keyframes planet-spin { to { rotate: 360deg; } }

#about::after      { --planet: url("img/planet-ringed.svg"); --planet-w: 280px; --planet-ratio: 1.4; top: 60px; right: -170px; rotate: 8deg; }
#chart::after      { --planet: url("img/planet-moon.svg"); --planet-w: 200px; bottom: 30px; left: -150px; animation-duration: 9s; }
#play::after       { --planet: url("img/planet-earth.svg"); --planet-w: 210px; top: 40px; right: -150px; animation-duration: 8s; }
#how::after        { --planet: url("img/planet-moon.svg"); --planet-w: 150px; bottom: 40px; right: -110px; animation-duration: 6s; }
#tokenomics::after { --planet: url("img/planet-ringed.svg"); --planet-w: 230px; --planet-ratio: 1.4; top: 40px; right: -60px; scale: -1 1; rotate: -10deg; }
#roadmap::after    {
  --planet: url("img/planet-mars.svg"); --planet-w: 300px; top: 20px; right: -190px;
  animation: planet-float 8s ease-in-out infinite, planet-spin 90s linear infinite;
}
#faq::after        { --planet: url("img/planet-earth.svg"); --planet-w: 240px; top: 180px; right: -40px; animation-duration: 10s; }

@media (max-width: 1180px) {
  #faq::after { right: -140px; }
}
@media (max-width: 860px) {
  .section::after { --planet-w: 120px !important; opacity: .85; }
  #about::after, #play::after, #how::after, #roadmap::after, #faq::after { right: -50px; left: auto; top: 30px; bottom: auto; }
  #chart::after { left: -50px; right: auto; top: 30px; bottom: auto; }
  #tokenomics::after { right: -50px; left: auto; top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .section::after { animation: none; }
}

/* starry footer */
.footer {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 12% 30%, #fff 0 1.6px, transparent 2.4px),
    radial-gradient(circle at 38% 72%, #fbef8a 0 1.8px, transparent 2.6px),
    radial-gradient(circle at 63% 18%, #fff 0 1.2px, transparent 2px),
    radial-gradient(circle at 86% 58%, #9cc9ff 0 1.6px, transparent 2.4px),
    radial-gradient(circle at 50% 45%, #fff 0 1px, transparent 1.8px),
    var(--ink);
  background-size: 240px 160px, 300px 200px, 180px 140px, 260px 180px, 120px 90px, auto;
}
.footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 25% 40%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 75% 25%, #f28bd0 0 2px, transparent 3px);
  background-size: 340px 220px, 280px 190px;
  animation: twinkle 2.4s ease-in-out infinite alternate;
}
.footer > * { position: relative; }
@keyframes twinkle { from { opacity: .15; } to { opacity: 1; } }

/* ===== Splash background: doodles + planets ===== */
.preloader {
  background:
    url("img/bg-doodles.svg") 0 0 / 360px repeat,
    linear-gradient(#bfe0ff 0%, #d9e8ff 45%, #f6c9e6 100%);
}
.pre-planets { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pre-planet { position: absolute; height: auto; animation: planet-float 7s ease-in-out infinite; }
.pre-planet--mars { width: min(340px, 34vw); left: -90px; bottom: -80px; animation: planet-float 8s ease-in-out infinite, planet-spin 80s linear infinite; }
.pre-planet--ringed { width: min(300px, 30vw); right: -60px; top: 6%; rotate: 10deg; animation-duration: 9s; }
.pre-planet--moon { width: min(130px, 14vw); left: 6%; top: 8%; animation-duration: 6s; }
.pre-planet--earth { width: min(190px, 20vw); right: 4%; bottom: 6%; animation-duration: 10s; }
@media (max-width: 700px) {
  .pre-planet--mars { width: 170px; left: -70px; bottom: -60px; }
  .pre-planet--ringed { width: 150px; right: -50px; top: 2%; }
  .pre-planet--moon { width: 70px; left: 4%; top: 3%; }
  .pre-planet--earth { width: 90px; right: -20px; bottom: 2%; }
}

/* splash sound toggle */
.pre-sound {
  position: fixed; top: 16px; right: 16px; z-index: 2; /* fixed = the preloader's corner (it fills the viewport) */
  background: var(--white);
  border: 3px solid var(--ink); border-radius: 10px; box-shadow: 4px 4px 0 var(--ink);
  padding: 8px 14px;
  font-style: italic; font-weight: 700; font-size: 13px; text-transform: uppercase;
  cursor: pointer;
}
.pre-sound[aria-pressed="false"] { background: #e6e6ee; color: #666; }
.pre-sound:hover { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
@media (max-width: 560px) { .pre-sound { position: static; } } /* phones: sits under the wordmark */

/* floating music button */
.sound-btn {
  position: fixed; left: 18px; bottom: 18px; z-index: 900;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--yellow);
  border: var(--border); border-radius: 50%; box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.sound-btn:hover { transform: translateY(-2px) rotate(-8deg); box-shadow: 0 5px 0 var(--ink); }
.sound-btn.is-off { background: #e6e6ee; }
.sound-btn__bars { display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.sound-btn__bars i { width: 4px; height: 6px; background: var(--ink); border-radius: 2px; }
.sound-btn.is-playing .sound-btn__bars i { animation: eq .8s ease-in-out infinite alternate; }
.sound-btn.is-playing .sound-btn__bars i:nth-child(2) { animation-delay: -.3s; }
.sound-btn.is-playing .sound-btn__bars i:nth-child(3) { animation-delay: -.6s; }
.sound-btn.is-playing .sound-btn__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 4px; } to { height: 20px; } }
.sound-btn.is-off .sound-btn__bars { position: relative; }
.sound-btn.is-off .sound-btn__bars::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 3px;
  background: #d9272e; rotate: -35deg; border-radius: 2px;
}
@media (max-width: 560px) { .sound-btn { width: 46px; height: 46px; left: 12px; bottom: 12px; } }

/* ===== How to buy — bento card ===== */
.buy-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden; padding: 0;
  min-height: 420px;
}
.buy-hero {
  position: relative;
  background: var(--orange);
  border-right: var(--border);
  padding: clamp(24px, 4vw, 44px);
  display: flex; align-items: center;
  overflow: hidden;
  /* halftone dots */
  background-image: radial-gradient(rgba(0, 0, 0, .12) 1.5px, transparent 2px);
  background-size: 14px 14px;
}
.buy-hero__title {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(56px, 8vw, 110px); line-height: .92;
  color: var(--white);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 6px 0 var(--ink);
  rotate: -4deg;
}
.buy-hero__mascot {
  position: absolute; right: -4%; bottom: 6%;
  width: min(62%, 340px);
  animation: planet-float 3s ease-in-out infinite;
}
.buy-hero__mascot svg { display: block; width: 100%; overflow: visible; rotate: -8deg; }
.buy-hero__bubble {
  position: absolute; right: 8%; top: -34%;
  background: var(--white);
  border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 8px 14px;
  font-family: var(--font-display); font-size: clamp(16px, 1.8vw, 22px);
  rotate: 6deg;
  white-space: nowrap;
}
.buy-hero__bubble::after {
  content: ""; position: absolute; left: 26%; bottom: -13px;
  width: 18px; height: 18px;
  background: var(--white);
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  rotate: 45deg; skew: 10deg 10deg;
}

.buy-cells { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, auto); }
.buy-cell {
  position: relative;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: clamp(16px, 2.2vw, 26px);
  border-bottom: var(--border);
  transition: filter .15s, background-color .15s;
}
.buy-cell:last-child { border-bottom: 0; }
a.buy-cell:hover { filter: brightness(.95) saturate(1.1); }
.buy-cell--how { grid-column: 1 / -1; background: var(--peach); }
.buy-cell--pump { background: var(--mint); border-right: var(--border); }
.buy-cell--jup { background: #f7c6e3; }
.buy-cell--dex { grid-column: 1 / -1; background: var(--sky); }
.buy-cell--ca { grid-column: 1 / -1; background: var(--white); flex-direction: row; align-items: center; gap: 10px; }
.buy-cell__name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1;
  display: flex; align-items: center; gap: 10px;
}
.buy-cell__name i {
  font-style: normal; font-size: .6em; align-self: flex-start;
  transition: translate .2s;
}
a.buy-cell:hover .buy-cell__name i { translate: 3px -3px; }
.buy-cell__ico { font-size: .85em; transition: rotate .3s cubic-bezier(.3, 1.6, .5, 1); }
a.buy-cell:hover .buy-cell__ico { rotate: -14deg; }
.buy-cell__sub { font-size: 14px; font-weight: 500; }
.buy-cell__label {
  flex-shrink: 0;
  background: var(--yellow); border: var(--border); border-radius: 6px;
  padding: 4px 8px; font-style: italic; font-weight: 700; font-size: 13px;
}
.buy-cell--ca code {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: "JetBrains Mono", monospace; font-size: clamp(12px, 1.1vw, 15px);
}

@media (max-width: 860px) {
  .buy-grid { grid-template-columns: minmax(0, 1fr); }
  .buy-hero { border-right: 0; border-bottom: var(--border); min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .buy-hero__mascot { animation: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 16px; right: 16px;
    flex-direction: column;
    background: var(--white); border: var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
    padding: 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav .pill { justify-content: center; }
  .stats, .roadmap, .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0,1fr); }
  .scene--about { margin-top: 40px; height: 320px; }
  .about { grid-template-columns: 1fr; }
  .arcade { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 85vh; min-height: 85svh; }
  .arcade.is-playing { height: 85vh; height: 85svh; }
  .launch { border-right: 0; border-bottom: var(--border); }
  .palm { right: 4%; width: 140px; }
  .car-wrap { transform: translateX(-50%); }
}

@media (max-width: 560px) {
  .header, .hero, .section { padding-left: 16px; padding-right: 16px; }
  .roadmap, .steps, .about__cards { grid-template-columns: 1fr; }
  .arena__close { top: 10px; right: 10px; width: 40px; height: 40px; }
  .stats { gap: 12px; }
  .stat { padding: 16px; }
  .ca__copy { padding: 8px 12px; }
  .signpost { transform: scale(.75); transform-origin: bottom left; }
  .car-wrap { transform: translateX(-50%); }
  .cloud--2 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }}

