/* Snakey website: the game's design language (chunky outlined cards, bouncy 3D buttons, Fredoka, a sunny
   garden) for a scrolling site. Tokens follow the game's src/ui/styles/base.css. */

@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: swap; src: url(/fonts/fredoka-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap; src: url(/fonts/fredoka-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url(/fonts/fredoka-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url(/fonts/fredoka-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: swap; src: url(/fonts/fredoka-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url(/fonts/fredoka-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url(/fonts/fredoka-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #2b2d5c;
  --ink-soft: #5b5f95;
  --ink-faint: rgba(43, 45, 92, .14);
  --shadow: rgba(43, 45, 92, .28);
  --paper: #fffdf6;
  --paper-2: #fff4dc;
  --paper-edge: #e6d6ae;
  --line: #efe4c8;
  --accent: #ff8a3d;
  --accent-dark: #d4612a;
  --accent-light: #ffc59e;
  --go: #5bd16a;
  --go-dark: #2f9a4a;
  --blue: #4fb3ff;
  --blue-dark: #2a7fcc;
  --gold: #ffc93c;
  --gold-dark: #d6950f;
  --berry: #ff5a7a;
  --berry-dark: #c93a5a;
  --plum: #a47cff;
  --plum-dark: #7150d0;
  --sky-top: #7fd4ff;
  --sky-bottom: #c9f2ff;
  --grass: #7ccf5a;
  --grass-dark: #3f9a52;
  --forest: #1f5130;
  --font: 'Fredoka', 'Baloo 2', 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 14px;
  --r: 22px;
  --r-lg: 30px;
  --outline: 3px;
  --pop: 0 5px 0 var(--shadow);
  --pop-lg: 0 8px 0 var(--shadow), 0 18px 30px rgba(20, 20, 60, .18);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --spring-soft: cubic-bezier(.22, 1.25, .36, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --wrap: 1120px;
  --top: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 12px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--blue-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 12px; background: var(--paper); border: 3px solid var(--ink); font-weight: 600; color: var(--ink); text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.muted { color: var(--ink-soft); }

/* ---------- outlined title text (the game's .title-pop) ---------- */

.section-title, .title-pop {
  font-weight: 700;
  color: #fff;
  font-size: clamp(30px, 5.2vw, 50px);
  line-height: 1.08;
  letter-spacing: .005em;
  -webkit-text-stroke: 7px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
}
.section-title .w { display: inline-block; transform-origin: 50% 90%; }
.section-title.is-in .w { animation: word-bob .7s var(--spring) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes word-bob { 0% { transform: translateY(26px) scale(.7) rotate(-6deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.section-lead { max-width: 62ch; margin-top: 14px; font-size: clamp(17px, 2vw, 19px); color: var(--ink-soft); font-weight: 500; }
.section-lead.light { color: #fff; text-shadow: 0 2px 0 rgba(20, 40, 30, .35); }
.kicker { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 14px; color: var(--gold); margin-bottom: 8px; }

/* ---------- buttons (the game's chunky 3D buttons) ---------- */

.btn {
  --c: var(--paper);
  --c-top: #fff;
  --c-edge: var(--paper-edge);
  --c-text: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  min-height: 48px;
  padding: 0 20px 3px;
  border: var(--outline) solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--c-top) 0%, var(--c) 58%);
  color: var(--c-text);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  --drop: drop-shadow(0 4px 0 var(--ink)) drop-shadow(0 5px 8px rgba(20, 20, 60, .2));
  box-shadow: inset 0 -5px 0 var(--c-edge);
  filter: var(--drop);
  transform: translateY(0);
  transition: transform .18s var(--spring), box-shadow .18s var(--spring), filter .18s var(--spring);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.btn::after {
  content: '';
  position: absolute;
  left: 12%; right: 12%; top: 4px; height: 34%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn-label { position: relative; }
@media (hover: hover) { .btn:hover { filter: var(--drop) brightness(1.05) saturate(1.05); transform: translateY(-2px) rotate(-.6deg); } }
.btn:active, .btn.is-pressed {
  transform: translateY(4px) scale(1.02, .96);
  --drop: drop-shadow(0 0 0 var(--ink)) drop-shadow(0 3px 3px rgba(20, 20, 60, .2));
  box-shadow: inset 0 -3px 0 var(--c-edge);
  transition-duration: .06s;
}
.btn:disabled, .btn[aria-disabled='true'] { filter: var(--drop) grayscale(.6) opacity(.6); pointer-events: none; }
.btn-go, .btn-accent, .btn-blue, .btn-berry, .btn-plum { --c-text: #fff; }
.btn-go { --c: var(--go); --c-top: #8ff07f; --c-edge: var(--go-dark); }
.btn-accent { --c: var(--accent); --c-top: var(--accent-light); --c-edge: var(--accent-dark); }
.btn-blue { --c: var(--blue); --c-top: #95d6ff; --c-edge: var(--blue-dark); }
.btn-gold { --c: var(--gold); --c-top: #fff09a; --c-edge: var(--gold-dark); }
.btn-berry { --c: var(--berry); --c-top: #ff9fb2; --c-edge: var(--berry-dark); }
.btn-plum { --c: var(--plum); --c-top: #cdb5ff; --c-edge: var(--plum-dark); }
.btn-go .btn-label, .btn-accent .btn-label, .btn-blue .btn-label, .btn-berry .btn-label, .btn-plum .btn-label {
  -webkit-text-stroke: 3.5px rgba(30, 30, 80, .6);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 rgba(30, 30, 80, .45);
}
.btn-sm { min-height: 42px; padding: 0 14px 3px; font-size: 16px; border-radius: 14px; }
.btn-lg { min-height: 58px; padding: 0 24px 4px; font-size: 20px; border-radius: 20px; }
.btn-round { width: 52px; height: 52px; min-height: 0; padding: 0 0 3px; border-radius: 50%; flex: none; }
.btn-round::after { left: 20%; right: 20%; top: 4px; height: 30%; }
.btn .ico, .btn svg { width: 1.3em; height: 1.3em; flex: none; }

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

.card { background: var(--paper); border: var(--outline) solid var(--ink); border-radius: var(--r); box-shadow: var(--pop); }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; margin-bottom: 12px; }

/* ---------- header ---------- */

.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: calc(var(--top) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .25s ease, box-shadow .25s ease, transform .3s var(--out);
}
.topbar.is-solid { background: rgba(255, 253, 246, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 3px 0 var(--ink-faint); }
.topbar-inner { height: var(--top); width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mascot { width: 44px; height: 44px; transition: transform .35s var(--spring); }
.brand-mascot svg { width: 100%; height: 100%; }
.brand:hover .brand-mascot { transform: rotate(-10deg) scale(1.12); }
.brand-word {
  font-weight: 700; font-size: 27px; color: #ffd23f; letter-spacing: .01em;
  -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink);
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a:not(.btn) {
  position: relative; padding: 8px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px;
  transition: transform .2s var(--spring), background .2s;
}
.nav > a:not(.btn):hover { background: rgba(255, 255, 255, .6); transform: translateY(-2px) rotate(-2deg); }
.nav > a[aria-current='page']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 4px; border-radius: 4px; background: var(--accent); }
.nav-get { margin-left: 8px; }
.nav-toggle { display: none; width: 48px; height: 48px; border: 3px solid var(--ink); border-radius: 14px; background: var(--paper); box-shadow: 0 3px 0 var(--ink); padding: 0; }
.burger { display: grid; gap: 4px; justify-items: center; }
.burger i { display: block; width: 20px; height: 3px; border-radius: 3px; background: var(--ink); transition: transform .3s var(--spring), opacity .2s; }
.nav-toggle[aria-expanded='true'] .burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .burger i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] .burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    position: fixed; left: var(--gutter); right: var(--gutter); top: calc(var(--top) + env(safe-area-inset-top, 0px) + 6px);
    flex-direction: column; align-items: stretch; gap: 6px; padding: 14px;
    background: var(--paper); border: 3px solid var(--ink); border-radius: var(--r); box-shadow: var(--pop-lg);
    transform-origin: 90% 0; transform: scale(.6) translateY(-20px); opacity: 0; visibility: hidden;
    transition: transform .35s var(--spring), opacity .2s, visibility .35s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav > a:not(.btn) { padding: 12px 14px; font-size: 19px; }
  .nav-get { margin: 6px 0 0; }
  .brand-word { font-size: 24px; }
}

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

.hero {
  position: relative;
  min-height: min(100svh, 980px);
  padding: calc(var(--top) + env(safe-area-inset-top, 0px) + 18px) 0 70px;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 70%);
  overflow: hidden;
  isolation: isolate;
}
.scenery { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.clouds { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.clouds i {
  position: absolute; width: 150px; height: 46px; border-radius: 50px; background: #fff; opacity: .9;
  box-shadow: 40px -22px 0 4px #fff, 85px -6px 0 -4px #fff;
  animation: drift linear infinite;
}
.clouds i:nth-child(1) { top: 16%; animation-duration: 70s; animation-delay: -10s; transform: scale(.9); }
.clouds i:nth-child(2) { top: 7%; animation-duration: 95s; animation-delay: -60s; transform: scale(.6); opacity: .7; }
.clouds i:nth-child(3) { top: 28%; animation-duration: 120s; animation-delay: -30s; transform: scale(.5); opacity: .6; }
.clouds i:nth-child(4) { top: 11%; animation-duration: 82s; animation-delay: -45s; transform: scale(.75); }
@keyframes drift { from { left: -260px; } to { left: 110%; } }
.hero-inner {
  width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 32px; align-items: center;
}
.hero-logo { width: min(100%, 520px); margin: 0 0 4px -10px; min-height: 140px; }
.logo { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 10px 14px rgba(20, 20, 60, .25)); }
/* The home page stacks the logo's letters and head over it, one SVG each (layerLogo in home.js). */
.logo-stack { position: relative; }
.logo-layer { position: absolute; left: 0; top: 0; width: 100%; height: auto; overflow: visible; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(20, 20, 60, .25)); }
.logo-layer > g { pointer-events: auto; }
.logo-layer.logo-letter { transform-box: border-box; will-change: transform; }
.logo text, .logo-layer text { font-family: var(--font); font-weight: 700; font-size: 100px; text-anchor: middle; }
.logo-extrude { fill: var(--ink); stroke: var(--ink); stroke-width: 14px; stroke-linejoin: round; }
.logo-face { stroke: var(--ink); stroke-width: 12px; stroke-linejoin: round; paint-order: stroke fill; }
.logo-shine { pointer-events: none; }
.logo-letter {
  transform-box: fill-box; transform-origin: 50% 100%; transform: rotate(var(--r)); cursor: pointer;
  animation: letter-drop .7s var(--spring) calc(var(--i) * 70ms) both, letter-bob 2.8s ease-in-out calc(.8s + var(--i) * 160ms) infinite;
}
.logo-letter.is-boing { animation: letter-boing .6s var(--spring) both; }
@keyframes letter-drop { from { transform: translateY(-120px) rotate(var(--r)) scale(.6); opacity: 0; } }
@keyframes letter-bob { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-7px) rotate(calc(var(--r) * -.6)) scale(1.03); } }
@keyframes letter-boing { 0% { transform: rotate(var(--r)); } 30% { transform: translateY(-34px) rotate(calc(var(--r) * -2)) scale(1.18, .88); } 60% { transform: translateY(4px) scale(1.12, .86); } 100% { transform: rotate(var(--r)); } }
.logo-snake { animation: snake-in .9s var(--out) .25s both; }
@keyframes snake-in { from { opacity: 0; transform: translateX(-30px); } }
.logo-spots { animation: slither 1.6s linear infinite; }
@keyframes slither { to { stroke-dashoffset: -44; } }
.logo-head { transform-box: fill-box; transform-origin: 30% 70%; animation: head-pop .7s var(--spring) .55s both, head-bob 3.2s ease-in-out 1.3s infinite; }
@keyframes head-pop { from { transform: scale(0) rotate(-30deg); } }
@keyframes head-bob { 50% { transform: rotate(-6deg) translateY(-3px); } }
.logo-eyes, .mascot-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 3.8s 2s infinite; }
.logo-tongue { transform-box: fill-box; transform-origin: 50% 0; animation: tongue-y 2.2s ease-in-out 1.4s infinite; }
@keyframes tongue-y { 0%, 60%, 100% { transform: scaleY(0); } 68%, 86% { transform: scaleY(1); } }
.mascot-tongue { transform-box: fill-box; transform-origin: 50% 0; animation: tongue 2.4s ease-in-out infinite; }
@keyframes tongue { 0%, 70%, 100% { transform: scaleY(0); } 78%, 92% { transform: scaleY(1); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }

.hero-tagline {
  font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; line-height: 1.15; color: #fff;
  -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink);
  animation: fade-up .6s var(--out) .5s both;
}
.hero-text { margin-top: 14px; max-width: 52ch; font-size: 18px; font-weight: 500; color: var(--ink); text-shadow: 0 0 10px rgba(255, 255, 255, .95), 0 0 3px #fff; animation: fade-up .6s var(--out) .65s both; }
.hero-get { margin-top: 22px; display: grid; gap: 16px; justify-items: start; animation: fade-up .6s var(--out) .8s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }

.price-tag {
  position: relative; display: inline-flex; align-items: baseline; gap: 10px; padding: 8px 18px 10px 22px;
  background: linear-gradient(180deg, #fff6c8, #ffe27a); border: 3px solid var(--ink); border-radius: 16px 999px 999px 16px; box-shadow: var(--pop);
  transform-origin: 6px 50%; transform: rotate(-3deg); transition: transform .4s var(--spring);
}
.price-tag::before { content: ''; position: absolute; left: 8px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ink); }
.price-tag:hover { transform: rotate(4deg) scale(1.05); }
.price-tag.is-swing { animation: swing 1.2s var(--spring); }
@keyframes swing { 20% { transform: rotate(10deg); } 45% { transform: rotate(-9deg); } 70% { transform: rotate(4deg); } 100% { transform: rotate(-3deg); } }
.price-amount { font-size: 32px; font-weight: 700; line-height: 1; }
.price-note { font-size: 15px; font-weight: 600; color: var(--ink-soft); }

.stores { display: flex; flex-wrap: wrap; gap: 14px 12px; align-items: center; }
.store {
  position: relative; display: inline-flex; align-items: center; gap: 12px; min-width: 214px; min-height: 64px; padding: 8px 22px 8px 16px;
  border: 3px solid var(--ink); border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #3a3d6b, #17182e 62%); color: #fff; text-decoration: none; text-align: left;
  box-shadow: 0 5px 0 var(--ink), 0 12px 22px rgba(20, 20, 60, .25);
  transition: transform .2s var(--spring), box-shadow .2s var(--spring);
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.store::before { content: ''; position: absolute; inset: 0 0 auto; height: 48%; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)); pointer-events: none; }
@media (hover: hover) { .store:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ink), 0 16px 26px rgba(20, 20, 60, .3); } }
.store:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink), 0 4px 8px rgba(20, 20, 60, .2); transition-duration: .06s; }
.store:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.store-ico { width: 32px; height: 32px; flex: none; }
.store-ios .store-ico { margin-top: -3px; }
.store-text { display: grid; gap: 2px; line-height: 1.05; }
.store-text small { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .78); }
.store-text b { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.store-soon { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.soon-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 6px 5px 11px; border: 2px solid rgba(43, 45, 92, .16); border-radius: 999px;
  font-weight: 600; font-size: 15px; color: var(--ink); background: rgba(255, 255, 255, .75);
}
.soon-chip svg { width: 18px; height: 18px; color: var(--ink-soft); }
.soon-chip em { font-style: normal; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: var(--gold); color: var(--ink); border-radius: 999px; padding: 1px 7px; }

/* the phone with the live demo */
.hero-phone { position: relative; justify-self: center; width: min(360px, 100%); animation: phone-in .9s var(--spring) .35s both; }
@keyframes phone-in { from { opacity: 0; transform: translateY(60px) rotate(8deg) scale(.85); } }
.phone {
  position: relative; padding: 14px; border-radius: 46px; background: linear-gradient(160deg, #3b3f7a, #23254d);
  border: 4px solid var(--ink); box-shadow: 0 10px 0 var(--ink), 0 30px 50px rgba(20, 20, 60, .35);
  transform: rotate(3deg); transition: transform .5s var(--spring);
}
.phone:hover { transform: rotate(0deg) scale(1.02); }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; width: 70px; height: 9px; margin-left: -35px; border-radius: 9px; background: #15163a; z-index: 2; }
.phone-screen {
  position: relative; border-radius: 34px; overflow: hidden; aspect-ratio: 9 / 16.5;
  background: linear-gradient(180deg, var(--sky-top), #b9ecff 45%, #5aa84f 45.2%, #3f8d45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 10px 18px;
}
.demo-board { width: 100%; aspect-ratio: 1; }
.demo-hud { display: flex; gap: 8px; }
.demo-chip { padding: 3px 12px; border-radius: 999px; background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.demo-chip.is-bump { animation: chip-pop .3s var(--out); }
.demo-streak { background: linear-gradient(180deg, #fff6c8, #ffe27a); }
/* A small, straight pulse when points come in: the number stays readable (no tilt, no big zoom). */
@keyframes chip-pop { 35% { transform: scale(1.08); } }
.hero-mascot { position: absolute; left: -46px; bottom: -18px; width: 120px; cursor: pointer; animation: bob 2.6s ease-in-out infinite; z-index: 3; }
.hero-mascot svg, [data-mascot] svg { width: 100%; height: auto; }
.hero-mascot.is-hop { animation: hop .6s var(--spring); }
@keyframes hop { 30% { transform: translateY(-40px) rotate(-8deg) scale(1.05, .95); } 60% { transform: translateY(0) scale(1.12, .88); } }
.speech {
  position: absolute; left: 30px; bottom: 112px; z-index: 4; max-width: 220px; padding: 10px 14px; border-radius: 18px;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: var(--pop); font-weight: 600; font-size: 16px; line-height: 1.25;
  animation: bubble-in .4s var(--spring) both;
}
.speech::after { content: ''; position: absolute; left: 22px; bottom: -12px; width: 18px; height: 18px; background: var(--paper); border: 3px solid var(--ink); border-top: 0; border-left: 0; transform: rotate(45deg); }
@keyframes bubble-in { from { transform: translateY(14px) scale(.5); opacity: 0; } }
.scroll-hint { position: absolute; left: 50%; bottom: 18px; width: 30px; height: 46px; margin-left: -15px; border: 3px solid var(--ink); border-radius: 20px; background: rgba(255, 255, 255, .6); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 6px; height: 10px; margin-left: -3px; border-radius: 3px; background: var(--ink); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 40px; }
  .hero-logo { margin: 0 auto; }
  .hero-text { margin-inline: auto; }
  .hero-get { justify-items: center; }
  .stores { justify-content: center; }
  .store-soon { justify-content: center; }
  .hero-phone { width: min(320px, 82vw); }
  .hero-mascot { left: -30px; width: 96px; }
}

/* ---------- bands ---------- */

.band { position: relative; padding: clamp(64px, 9vw, 110px) 0; }
.band-cream { background: var(--paper-2); }
.band-cream::before, .band-sky::before, .band-grass::before, .band-retro::before, .band-get::before {
  /* a scalloped edge, like grass tufts or a cloud line */
  content: ''; position: absolute; left: 0; right: 0; top: -22px; height: 24px; pointer-events: none;
  background: radial-gradient(circle at 22px 24px, var(--band-c) 21px, transparent 22px) 0 0 / 44px 24px repeat-x;
}
.band-cream { --band-c: var(--paper-2); }
.band-sky { --band-c: #d9f4ff; background: linear-gradient(180deg, #d9f4ff, #bfe9ff); }
.band-grass { --band-c: #6cc65a; background: linear-gradient(180deg, #6cc65a, #3f9a52); }
.band-retro { --band-c: #2a73dc; background: linear-gradient(180deg, #2a73dc, #1d4fa8); color: #fff; }
.band-get { --band-c: #ffe9a8; background: radial-gradient(circle at 50% 0, #fff6c8, #ffe9a8 60%); text-align: center; }

/* pop-in on scroll */
.pop { opacity: 0; transform: translateY(30px) scale(.94); transition: opacity .5s ease, transform .7s var(--spring); transition-delay: var(--d, 0ms); }
.pop.is-in { opacity: 1; transform: none; }
.no-js .pop { opacity: 1; transform: none; }

/* how it plays */
.how-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.how-card { padding: 22px 22px 24px; display: grid; gap: 8px; align-content: start; transition: transform .35s var(--spring), box-shadow .35s; }
.how-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: var(--pop-lg); }
.how-card:nth-child(2):hover { transform: translateY(-6px) rotate(1deg); }
.how-card h3 { font-size: 23px; }
.how-card p { color: var(--ink-soft); }
.how-art { height: 110px; margin-bottom: 8px; border-radius: 16px; background: linear-gradient(180deg, #8fdc6a, #6cc65a); border: 3px solid var(--ink); position: relative; overflow: hidden; }
.how-swipe .swipe-dot { position: absolute; left: 22%; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: rgba(255, 255, 255, .9); border: 3px solid var(--ink); animation: tut-swipe 2.4s ease-in-out infinite; }
.how-swipe .swipe-trail { position: absolute; left: 22%; top: 50%; width: 52%; height: 10px; margin-top: -5px; border-radius: 10px; background: rgba(255, 255, 255, .5); transform-origin: 0 50%; animation: tut-trail 2.4s ease-in-out infinite; }
@keyframes tut-swipe { 0% { transform: translateX(0); opacity: 0; } 10%, 18% { transform: translateX(0); opacity: 1; } 62%, 88% { transform: translateX(min(160px, 40vw)); opacity: 1; } 100% { transform: translateX(min(160px, 40vw)); opacity: 0; } }
@keyframes tut-trail { 0%, 18% { transform: scaleX(0); opacity: 1; } 62%, 88% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.how-fruit { display: flex; align-items: center; justify-content: center; gap: 10px; }
.fruit-btn { position: relative; width: 58px; height: 58px; padding: 0; border: 0; background: none; transition: transform .3s var(--spring); }
.fruit-btn svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 0 rgba(30, 30, 80, .35)); }
.fruit-btn:hover { transform: translateY(-6px) rotate(-8deg) scale(1.1); }
.fruit-btn:nth-child(2) { animation: bob 2.2s ease-in-out .3s infinite; }
.fruit-btn:nth-child(1) { animation: bob 2.6s ease-in-out infinite; }
.fruit-btn:nth-child(3) { animation: bob 2.4s ease-in-out .6s infinite; }
.fruit-btn.is-eaten { animation: munch .45s var(--spring) forwards; pointer-events: none; }
@keyframes munch { 40% { transform: scale(1.35, .7); } 100% { transform: scale(0) rotate(30deg); opacity: 0; } }
.fruit-btn.is-back { animation: pop-back .5s var(--spring) both; }
@keyframes pop-back { from { transform: scale(0); } }
.points-pop { position: fixed; z-index: 90; pointer-events: none; font-weight: 700; font-size: 26px; color: #ffd23f; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; animation: points-up .9s var(--out) forwards; }
@keyframes points-up { 0% { transform: translate(-50%, 0) scale(.4); opacity: 0; } 25% { transform: translate(-50%, -18px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -70px) scale(1); opacity: 0; } }
.how-mega { display: grid; place-content: center; text-align: center; background: radial-gradient(circle, #fff6c8, #ffc93c 70%); cursor: default; }
.mega-word, .mega-bonus { display: block; font-weight: 700; color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; line-height: .95; }
.mega-word { font-size: 40px; animation: mega 2.4s var(--spring) infinite; }
.mega-bonus { font-size: 26px; color: #ff5a7a; animation: mega 2.4s var(--spring) .12s infinite; }
@keyframes mega { 0%, 60%, 100% { transform: none; } 70% { transform: scale(1.25) rotate(-6deg); } 80% { transform: scale(.95) rotate(3deg); } }
.hint-tap { margin-top: 18px; text-align: center; font-weight: 600; color: var(--ink-soft); font-size: 15px; }

/* screenshots */
.shots-band .wrap { text-align: center; }
.shots-band .section-lead { margin-inline: auto; }
/* Room above for a screen lifted on hover (the scroller clips what sticks out); no scrollbar: swipe
   on phones, the arrows (or the keyboard) on desktop. */
.shots-frame { position: relative; margin-top: 10px; }
.shots {
  display: flex; gap: 22px; overflow-x: auto; padding: 34px max(var(--gutter), calc((100vw - var(--wrap)) / 2)) 34px;
  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-arrow {
  position: absolute; top: calc(50% - 40px); z-index: 2; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 50%; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: var(--pop);
  transition: transform .3s var(--spring), opacity .2s ease;
}
.shots-arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.shots-arrow:hover { transform: scale(1.08); }
.shots-arrow:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--shadow); }
.shots-arrow:disabled { opacity: 0; pointer-events: none; }
.shots-prev { left: max(10px, calc((100vw - var(--wrap)) / 2 - 70px)); }
.shots-next { right: max(10px, calc((100vw - var(--wrap)) / 2 - 70px)); }
@media (hover: none) { .shots-arrow { display: none; } }
.shot { flex: none; width: min(250px, 66vw); scroll-snap-align: start; text-align: center; }
.shot img {
  width: 100%; height: auto; border-radius: 30px; border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink), 0 18px 30px rgba(20, 20, 60, .2);
  background: #c9f2ff; transition: transform .45s var(--spring);
}
.shot:nth-child(odd) img { transform: rotate(-2deg); }
.shot:nth-child(even) img { transform: rotate(2deg); }
.shot:hover img { transform: translateY(-10px) rotate(0) scale(1.03); }
.shot figcaption { margin-top: 16px; font-weight: 700; font-size: 18px; }

/* worlds */
.band-grass .section-title { text-shadow: 0 5px 0 var(--ink); }
.worlds { margin-top: 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
/* Four to a row, the last row centred (seven worlds); one to a row on phones. */
.worlds > * { flex: 0 1 calc((100% - 3 * 22px) / 4); min-width: min(250px, 100%); }
.world {
  --wa: #ff8a3d; --wsky: #7fd4ff; --wsky2: #c9f2ff;
  position: relative; padding: 14px 14px 18px; border-radius: var(--r); border: 3px solid var(--ink); box-shadow: var(--pop);
  background: linear-gradient(180deg, var(--wsky), var(--wsky2)); overflow: hidden; transition: transform .4s var(--spring), box-shadow .4s;
}
.world:hover { transform: translateY(-8px) rotate(-1.2deg); box-shadow: var(--pop-lg); }
.world:nth-child(even):hover { transform: translateY(-8px) rotate(1.2deg); }
.world canvas { width: 100%; aspect-ratio: 1; }
.world-num { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 2px 11px; border-radius: 999px; background: var(--paper); border: 2.5px solid var(--ink); font-weight: 700; font-size: 14px; }
.world h3 { margin-top: 10px; font-size: 22px; color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.world p { font-size: 15px; color: var(--ink); font-weight: 500; }
.worlds > .world-skeleton { flex-basis: 100%; min-height: 320px; border-radius: var(--r); background: rgba(255, 255, 255, .2); }

/* power-ups */
.powerups { margin-top: 34px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 18px; }
.pu { padding: 18px 18px 20px; text-align: center; display: grid; justify-items: center; gap: 6px; align-content: start; cursor: pointer; transition: transform .35s var(--spring); }
.pu canvas { width: 92px; height: 92px; transition: transform .45s var(--spring); }
.pu:hover canvas, .pu.is-wiggle canvas { transform: scale(1.18) rotate(-10deg); }
.is-wiggle { animation: wiggle .5s var(--spring); }
@keyframes wiggle { 25% { transform: rotate(-4deg) scale(1.04); } 60% { transform: rotate(3deg); } }
.pu h3 { font-size: 20px; }
.pu p { font-size: 15px; color: var(--ink-soft); }
.pu-secret { background: repeating-linear-gradient(-45deg, var(--paper) 0 14px, var(--paper-2) 14px 28px); }
.pu-mystery { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: var(--plum); color: #fff; font-size: 56px; font-weight: 700; border: 3px solid var(--ink); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; animation: bob 2.2s ease-in-out infinite; }

/* leaders teaser */
.leaders { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: center; }
.leaders-copy .btn { margin-top: 22px; }
.leaders-card { padding: 20px; }
.mini-board { display: grid; gap: 8px; }
.mini-board li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 14px; background: var(--paper-2); font-weight: 600; }
.mini-board li:nth-child(1) { background: linear-gradient(180deg, #fff6c8, #ffe27a); }
.mini-board .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-board .who small { display: block; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.mini-board .pts { font-variant-numeric: tabular-nums; font-weight: 700; }
.mini-board .watch { width: 36px; height: 36px; min-height: 0; padding: 0 0 2px; border-radius: 12px; }
.empty-board { padding: 20px 4px; }
@media (max-width: 820px) { .leaders { grid-template-columns: 1fr; } }

/* medals (also the leaderboards) */
.medal { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--ink); font-weight: 700; font-size: 15px; background: var(--paper); }
.medal-1 { background: radial-gradient(circle at 35% 30%, #fff6a8, #ffc93c 60%, #d6950f); }
.medal-2 { background: radial-gradient(circle at 35% 30%, #fff, #cfd6e4 60%, #96a0b5); }
.medal-3 { background: radial-gradient(circle at 35% 30%, #ffe0c2, #e59a5c 60%, #b2672c); }

/* retro teaser */
.retro-teaser { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.retro-shot { position: relative; min-height: 200px; transform: rotate(-2.5deg); transition: transform .5s var(--spring); }
.retro-shot:hover { transform: rotate(0) scale(1.02); }
.retro-shot > .xp-window { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.retro-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 820px) { .retro-teaser { grid-template-columns: 1fr; } }

/* get */
.get .section-lead { margin-inline: auto; }
.get .stores { justify-content: center; margin-top: 26px; }
.get .store-soon { justify-content: center; }
.get-mascot { width: 130px; margin: 0 auto 12px; animation: bob 2.6s ease-in-out infinite; cursor: pointer; }

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

.footer { position: relative; background: var(--forest); color: #dff5d2; padding: 54px 0 calc(34px + env(safe-area-inset-bottom, 0px)); }
.footer-grass { position: absolute; left: 0; right: 0; top: -22px; height: 24px; background: radial-gradient(circle at 22px 24px, var(--forest) 21px, transparent 22px) 0 0 / 44px 24px repeat-x; }
.footer-inner { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; display: grid; gap: 22px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-mascot { width: 70px; flex: none; }
.footer-title { font-weight: 700; font-size: 28px; color: #ffd23f; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.footer-sub { color: #bfe6ad; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: #fff; font-weight: 600; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { font-size: 14px; color: #9fcf8c; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 95; display: inline-flex; align-items: center; gap: 10px;
  max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 999px; background: var(--paper); border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--shadow), 0 10px 22px rgba(0, 0, 0, .18); font-weight: 600;
  transform: translate(-50%, 30px) scale(.7); opacity: 0; transition: transform .42s var(--spring), opacity .2s;
}
.toast.is-in { transform: translate(-50%, 0); opacity: 1; }

/* confetti */
.confetti { position: fixed; z-index: 96; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; }

/* desktop-only bits */
html.is-touch [data-desktop-only] { display: none !important; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pop { opacity: 1; transform: none; }
  .clouds { display: none; }
}

/* ---------- phones ---------- */

@media (max-width: 760px) {
  .how-grid { grid-template-columns: 1fr; gap: 16px; }
  .how-art { height: 96px; }
  .band { padding: 58px 0; }
  .scroll-hint { display: none; }
  .hero { min-height: 0; padding-bottom: 48px; }
  .shot { width: min(220px, 62vw); }
  .worlds > * { flex-basis: 100%; }
  .retro-shot { transform: none; }
  .get-mascot { width: 104px; }
}
@media (max-width: 760px) {
  .powerups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pu { padding: 14px 10px 16px; }
  .pu canvas, .pu-mystery { width: 72px; height: 72px; }
  .pu h3 { font-size: 18px; }
  .pu p { font-size: 14px; }
}
