/* =========================================================
   Tuvlo — tuvlo.app
   Brand tokens mirror the app (Tuvlo/Theme/CartoonTheme.swift)
   ========================================================= */
:root {
  --aqua: #007996;
  --aqua-2: #12b0c2;
  --aqua-3: #7fdbe6;
  --sky: #e8f8fa;
  --cream: #fff8ec;
  --gold: #f5b318;
  --gold-2: #ffd45c;
  --green: #3fae2a;
  --coral: #ff6b57;
  --plum: #8e6cf0;
  --ink: #0b2a33;
  --ink-2: #33525c;
  --muted: #5f7a83;
  --line: rgba(11, 42, 51, 0.1);
  --bg: #fbfdfd;
  --card: #ffffff;
  --r-sm: 14px;
  --r: 28px;
  --r-lg: 40px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --display: "Bricolage Grotesque", "Fredoka", ui-rounded, system-ui, sans-serif;
  --body: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-1: 0 1px 2px rgba(11,42,51,.06), 0 8px 24px -12px rgba(11,42,51,.18);
  --shadow-2: 0 2px 4px rgba(11,42,51,.05), 0 30px 60px -28px rgba(0,79,99,.45);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--aqua); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--gold-2); color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; margin: 0; }
p { margin: 0; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header (floating pill) ---------- */
.site-header { position: fixed; inset: 14px 0 auto; z-index: 50; pointer-events: none; }
.site-header .container {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1080px; height: 60px; padding: 0 10px 0 14px;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 999px;
  box-shadow: 0 10px 30px -18px rgba(0,60,80,.4), inset 0 0 0 1px rgba(11,42,51,.04);
  transition: transform .5s var(--ease), background .3s;
}
.site-header.is-hidden .container { transform: translateY(calc(-100% - 40px)); box-shadow: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.nav { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: .95rem; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 9px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sky); color: var(--aqua); }
.nav a.nav-cta { background: var(--ink); color: #fff; }
.nav a.nav-cta:hover { background: var(--aqua); color: #fff; }
@media (max-width: 700px) { .nav .hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.btn-store {
  --b: #0b0d0e;
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  background: var(--b); color: #fff; text-decoration: none;
  padding: 12px 24px 12px 18px; border-radius: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 14px 30px -14px rgba(0,0,0,.6);
  transition: transform .4s var(--spring), box-shadow .3s;
}
.btn-store:hover { color: #fff; transform: translateY(-3px) scale(1.02); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 22px 40px -18px rgba(0,0,0,.6); }
.btn-store svg { width: 28px; height: 28px; flex: none; }
.btn-store small { display: block; font-size: .72rem; line-height: 1.1; opacity: .8; letter-spacing: .03em; font-weight: 700; }
.btn-store strong { display: block; font-family: var(--display); font-size: 1.25rem; line-height: 1.1; letter-spacing: -.02em; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; padding: 14px 20px; border-radius: 18px; transition: background .2s; }
.btn-ghost:hover { background: rgba(11,42,51,.06); color: var(--ink); }
.btn-ghost .arrow { transition: transform .3s var(--spring); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* ---------- Sprite / Rive slots ---------- */
.anim { position: relative; display: inline-block; width: var(--size, 120px); aspect-ratio: 1; flex: none; }
.anim .sprite { position: absolute; inset: 0; background-repeat: no-repeat; background-size: 800% 100%; background-position: 0 0; }
.anim canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.kid { position: relative; width: var(--size, 120px); aspect-ratio: 1; background-repeat: no-repeat; background-size: 800% 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  padding: 150px 0 0;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(127,219,230,.55), transparent 70%),
    radial-gradient(40% 40% at 90% 30%, rgba(255,212,92,.35), transparent 70%),
    radial-gradient(40% 40% at 8% 40%, rgba(142,108,240,.16), transparent 70%),
    linear-gradient(180deg, #f2fbfc 0%, var(--bg) 100%);
  overflow: clip;
}
.hero::after { content: ""; position: absolute; inset: 0; background: var(--grain); mix-blend-mode: multiply; opacity: .35; pointer-events: none; z-index: -1; }
.hero-copy { text-align: center; position: relative; z-index: 2; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255,255,255,.75); border: 1px solid rgba(11,42,51,.08);
  font-weight: 800; font-size: .88rem; color: var(--ink-2);
  box-shadow: var(--shadow-1);
}
.pill b { background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: .78rem; letter-spacing: .02em; }
.hero h1 {
  font-size: clamp(3rem, 9.4vw, 8.4rem);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .92;
  margin: 26px auto 26px;
  max-width: 12ch;
}
.hero h1 .w { display: inline-block; overflow: clip; vertical-align: bottom; padding-bottom: .06em; }
.hero h1 .w > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 120ms); }
.hero h1 .hl { background: linear-gradient(100deg, var(--aqua) 10%, var(--aqua-2) 50%, var(--green) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .gold { color: var(--gold); -webkit-text-stroke: 0; }
@keyframes rise { to { transform: none; } }
.hero .lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--ink-2); max-width: 36rem; margin: 0 auto 34px; opacity: 0; animation: fadeUp 1s var(--ease) .7s forwards; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; opacity: 0; animation: fadeUp 1s var(--ease) .85s forwards; }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--muted); font-weight: 700; opacity: 0; animation: fadeUp 1s var(--ease) 1s forwards; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px; }
.hero-note span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Floating collectibles */
.floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.floater { position: absolute; transform: translate3d(calc(var(--mx, 0) * var(--d, 20px)), calc(var(--my, 0) * var(--d, 20px)), 0); transition: transform 1.2s var(--ease); }
.floater > .bob { animation: bob 6s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.floater .anim { filter: drop-shadow(0 18px 24px rgba(0,60,80,.25)); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-16px) rotate(calc(var(--rot, 0deg) * -1)); } }
.f1 { top: 22%; left: 6%; --d: 26px; --rot: -8deg; }
.f2 { top: 9%; right: 5%; --d: -22px; --rot: 6deg; --delay: -2s; }
.f3 { top: 56%; left: 12%; --d: 34px; --rot: 5deg; --delay: -4s; }
.f4 { top: 52%; right: 10%; --d: -30px; --rot: -6deg; --delay: -1s; }
@media (max-width: 900px) { .f1, .f3 { left: -4%; } .f2, .f4 { right: -4%; } .floater .anim { --size: 84px !important; } .f3, .f4 { top: 70%; } }

/* Phone stage */
.stage { position: relative; z-index: 2; margin-top: 64px; display: grid; place-items: center; perspective: 1600px; }
.stage::before { content: ""; position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: min(1100px, 120vw); aspect-ratio: 2.2; border-radius: 50% 50% 0 0; background: linear-gradient(180deg, #bdeef3, #e9fafb 60%, var(--bg)); z-index: -1; }
.phone {
  width: min(340px, 82vw); aspect-ratio: 9 / 19.3;
  border-radius: 56px; padding: 11px;
  background: linear-gradient(145deg, #2a3b42, #0e171b 40%, #26363c);
  box-shadow: 0 0 0 1.5px #3c4f56 inset, 0 0 0 6px #0c1418 inset, var(--shadow-2), 0 80px 120px -60px rgba(0,60,80,.6);
  position: relative;
  transform: rotateX(calc(var(--tilt, 1) * 14deg)) translateY(calc(var(--tilt, 1) * 40px));
  transform-origin: 50% 100%;
  transition: transform .2s linear;
  margin-bottom: -120px;
}
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 100px; height: 30px; border-radius: 20px; background: #000; z-index: 3; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 46px; overflow: hidden; background: linear-gradient(180deg, #e9f9fb 0%, #fff 40%); font-size: 14px; }

/* In-phone app UI (mirrors the app's Today screen) */
.app { position: absolute; inset: 0; padding: 62px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.app-top { display: flex; align-items: center; justify-content: space-between; }
.app-who { display: flex; align-items: center; gap: 8px; }
.app-who .kid { --size: 42px; border-radius: 50%; background-color: #ffe5dd; box-shadow: 0 0 0 2px #fff; background-position: 0 0; background-size: 800% 100%; }
.app-who b { font-family: var(--display); font-size: 1.15rem; letter-spacing: -.03em; display: block; line-height: 1; }
.app-who small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.wallet { display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 999px; padding: 4px 10px 4px 4px; font-family: var(--display); font-weight: 800; font-size: 1.05rem; box-shadow: var(--shadow-1); }
.wallet .anim { --size: 30px; }
.wallet.bump { animation: bump .6s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); } }
.app-hero { border-radius: 22px; overflow: hidden; position: relative; height: 128px; background: url("/assets/adventure-island.webp") center 40% / cover; box-shadow: var(--shadow-1); }
.app-hero span { position: absolute; left: 12px; bottom: 10px; color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.05rem; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.app-hero .bar { position: absolute; left: 12px; right: 12px; top: 12px; height: 8px; border-radius: 8px; background: rgba(255,255,255,.55); overflow: hidden; }
.app-hero .bar i { display: block; height: 100%; width: var(--p, 33%); background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 8px; transition: width .8s var(--ease); }
.app h5 { margin: 4px 2px 0; font-family: var(--display); font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.mission { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 8px 10px 8px 8px; box-shadow: var(--shadow-1); position: relative; transition: transform .4s var(--spring), background .3s; }
.mission img { width: 44px; height: 44px; border-radius: 12px; background: var(--sky); }
.mission div { flex: 1; min-width: 0; }
.mission b { display: block; font-weight: 800; font-size: .92rem; line-height: 1.2; }
.mission small { color: var(--muted); font-weight: 700; font-size: .76rem; }
.mission .state { font-weight: 800; font-size: .74rem; padding: 6px 10px; border-radius: 999px; background: var(--ink); color: #fff; white-space: nowrap; transition: background .3s; }
.mission.pending .state { background: #fff3d0; color: #8a5a00; }
.mission.done { background: #effbea; }
.mission.done .state { background: var(--green); }
.mission.tap { transform: scale(.96); }
.mission .anim { position: absolute; left: 0; top: 50%; translate: 0 -50%; --size: 60px; pointer-events: none; opacity: 0; }
.mission .anim.on { opacity: 1; }
.toast { position: absolute; left: 50%; bottom: 18px; translate: -50% 140%; background: var(--ink); color: #fff; font-weight: 800; font-size: .82rem; padding: 10px 14px; border-radius: 16px; display: flex; align-items: center; gap: 8px; transition: translate .6s var(--spring); white-space: nowrap; box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); }
.toast.show { translate: -50% 0; }
.toast .anim { --size: 26px; }

/* ---------- Generic section ---------- */
section { position: relative; }
.section { padding: clamp(96px, 12vw, 160px) 0; }
.kicker { display: inline-block; font-weight: 900; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--aqua); margin-bottom: 18px; }
.h2 { font-size: clamp(2.4rem, 6vw, 4.8rem); font-weight: 800; letter-spacing: -.05em; }
.h2 em { font-style: normal; color: var(--aqua); }
.sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 38rem; margin-top: 20px; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--delay, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Marquee ---------- */
.marquee { padding: 170px 0 30px; overflow: clip; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.chip { display: flex; align-items: center; gap: 10px; padding: 8px 20px 8px 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 800; white-space: nowrap; box-shadow: var(--shadow-1); }
.chip img { width: 40px; height: 40px; border-radius: 50%; background: var(--sky); }
.chip .c { font-family: var(--display); color: #a06d00; background: #fff3d0; padding: 2px 9px; border-radius: 999px; font-size: .85rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- The loop (interactive) ---------- */
.loop { background: var(--ink); color: #fff; border-radius: var(--r-lg); margin: 0 16px; overflow: clip; isolation: isolate; }
.loop::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 75% 40%, rgba(18,176,194,.35), transparent 70%), radial-gradient(40% 50% at 10% 100%, rgba(245,179,24,.18), transparent 70%); z-index: -1; }
.loop::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .25; mix-blend-mode: overlay; pointer-events: none; }
.loop .kicker { color: var(--aqua-3); }
.loop .h2 em { color: var(--gold-2); }
.loop .sub { color: rgba(255,255,255,.72); }
.loop-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; margin-top: 64px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; padding: 20px; border-radius: 24px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); transition: background .5s var(--ease), border-color .5s, transform .5s var(--ease); cursor: pointer; }
.steps li.active { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); transform: translateX(8px); }
.steps .num { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.3rem; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); transition: background .4s, color .4s; }
.steps li.active .num { background: var(--c); color: var(--ink); }
.steps h3 { font-size: 1.5rem; letter-spacing: -.03em; margin-bottom: 4px; }
.steps p { color: rgba(255,255,255,.66); font-size: 1rem; }
.loop-stage { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; border-radius: 48px; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.14), rgba(255,255,255,.02) 60%); border: 1px solid rgba(255,255,255,.1); display: grid; place-items: center; }
.loop-stage .ring { position: absolute; inset: 12%; border-radius: 50%; border: 1px dashed rgba(255,255,255,.18); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.loop-stage .slot { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.7); transition: opacity .5s var(--ease), transform .7s var(--spring); }
.loop-stage .slot.on { opacity: 1; transform: none; }
.loop-stage .slot .anim { --size: min(62%, 300px); width: var(--size); }
.loop-caption { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 10px; }
.loop-btn { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 900; font-size: 1.05rem; padding: 14px 26px; border-radius: 999px; background: var(--c, var(--gold)); color: var(--ink); box-shadow: 0 12px 30px -10px var(--c, var(--gold)); transition: transform .3s var(--spring), background .3s; }
.loop-btn:hover { transform: translateY(-2px) scale(1.04); }
.loop-btn:active { transform: scale(.96); }
.coins-badge { position: absolute; top: 24px; right: 24px; display: flex; align-items: center; gap: 4px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.1); font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.coins-badge .anim { --size: 34px; }
.plus { position: absolute; font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--gold-2); pointer-events: none; animation: plus 1.2s var(--ease) forwards; }
@keyframes plus { from { opacity: 0; transform: translateY(20px) scale(.6); } 25% { opacity: 1; transform: translateY(0) scale(1.1); } to { opacity: 0; transform: translateY(-60px) scale(1); } }
@media (max-width: 900px) { .loop-grid { grid-template-columns: minmax(0, 1fr); } .loop-stage { order: -1; } .loop { margin: 0 8px; border-radius: 32px; } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(240px, auto); gap: 18px; margin-top: 64px; }
.tile { position: relative; overflow: clip; isolation: isolate; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); padding: 30px; box-shadow: var(--shadow-1); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tile h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.04em; margin-bottom: 8px; }
.tile p { color: var(--ink-2); max-width: 30ch; }
.tile .tag { display: inline-block; font-weight: 900; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--aqua); margin-bottom: 12px; }
.t-quest { grid-column: span 4; grid-row: span 2; background: linear-gradient(180deg, #e6f8fb, #fff); min-height: 520px; }
.t-streak { grid-column: span 2; background: linear-gradient(160deg, #fff4e3, #fff); }
.t-crown { grid-column: span 2; background: linear-gradient(160deg, #f3efff, #fff); }
.t-store { grid-column: span 3; background: var(--cream); }
.t-kids { grid-column: span 3; }
.t-sync { grid-column: span 3; background: linear-gradient(160deg, #e9fbf0, #fff); }
.t-pin { grid-column: span 3; background: var(--ink); color: #fff; border-color: transparent; }
.t-pin p { color: rgba(255,255,255,.7); }
.t-pin .tag { color: var(--aqua-3); }
.tile .corner { position: absolute; right: 18px; bottom: 12px; }
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-quest { grid-column: span 2; grid-row: auto; min-height: 520px; }
  .t-streak, .t-crown { grid-column: span 1; }
  .t-store, .t-kids, .t-sync, .t-pin { grid-column: span 2; }
}
@media (max-width: 560px) { .bento { grid-template-columns: minmax(0, 1fr); } .kid-row .kid { --size: 76px; margin-left: -20px; } .t-streak, .t-crown { grid-column: auto; } .t-quest, .t-store, .t-kids, .t-sync, .t-pin { grid-column: auto; } .tile { padding: 24px; } }

/* Quest path */
.quest { position: absolute; left: 0; right: 0; bottom: 0; height: 74%; }
.quest svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.quest .path-bg { fill: none; stroke: #fff; stroke-width: 30; stroke-linecap: round; filter: drop-shadow(0 6px 10px rgba(0,79,99,.12)); }
.quest .path-dash { fill: none; stroke: var(--aqua-3); stroke-width: 4; stroke-dasharray: 2 14; stroke-linecap: round; }
.quest .path-done { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; }
.quest .node { position: absolute; translate: -50% -60%; }
.quest .node .anim { --size: 74px; }
.quest .node.end .anim { --size: 92px; }
.quest .walker { position: absolute; left: 0; top: 0; translate: -50% -86%; will-change: transform; }
.quest .walker .kid { --size: 108px; }
.quest .walker.flip .kid { transform: scaleX(-1); }

.streak-row { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 18px; }
.streak-num { font-family: var(--display); font-weight: 800; font-size: 4.2rem; letter-spacing: -.06em; line-height: .9; color: var(--coral); }
.streak-num small { font-size: 1rem; letter-spacing: 0; color: var(--muted); display: block; font-weight: 800; }
.week { display: flex; gap: 6px; margin-top: 16px; }
.week i { flex: 1; height: 10px; border-radius: 6px; background: #ffe2c7; }
.week i.on { background: linear-gradient(90deg, var(--coral), var(--gold)); }

.store-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.prize { background: #fff; border-radius: 18px; padding: 12px; text-align: center; box-shadow: var(--shadow-1); transition: transform .4s var(--spring); }
.prize:hover { transform: translateY(-4px) rotate(-1.5deg); }
.prize img { width: 64px; height: 64px; margin: 0 auto; }
.prize b { display: block; font-size: .86rem; margin-top: 4px; }
.prize span { display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; font-family: var(--display); font-weight: 800; font-size: .85rem; color: #a06d00; background: #fff3d0; padding: 2px 8px 2px 4px; border-radius: 999px; }
.prize span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe58a, var(--gold) 60%, #c98a00); }

.kid-row { display: flex; margin-top: 18px; padding-left: 8px; }
.kid-row .kid { --size: 92px; margin-left: -24px; background-position: 0 0; transition: transform .5s var(--spring); }
.kid-row .kid:hover { transform: translateY(-10px) scale(1.06); z-index: 2; }
.kid-row .more { white-space: nowrap; align-self: center; margin-left: 8px; font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--aqua); background: var(--sky); padding: 10px 16px; border-radius: 999px; }

.sync-vis { position: relative; height: 120px; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; padding: 0 12%; }
.dev { width: 58px; height: 104px; border-radius: 14px; background: var(--ink); box-shadow: inset 0 0 0 3px #26363c; position: relative; }
.dev::after { content: ""; position: absolute; inset: 6px; border-radius: 9px; background: linear-gradient(180deg, var(--aqua-3), #fff); }
.dev.big { width: 76px; height: 108px; border-radius: 16px; }
.wire { position: absolute; left: calc(12% + 70px); right: calc(12% + 84px); top: 50%; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--green) 0 10px, transparent 10px 18px); background-size: 36px 4px; animation: flow 1s linear infinite; }
.wire::after { content: ""; position: absolute; top: 50%; left: 0; width: 14px; height: 14px; border-radius: 50%; translate: 0 -50%; background: var(--gold); box-shadow: 0 0 0 6px rgba(245,179,24,.25); animation: travel 2.4s var(--ease) infinite; }
@keyframes flow { to { background-position: 36px 0; } }
@keyframes travel { from { left: 0; } to { left: calc(100% - 14px); } }

.pin-dots { display: flex; gap: 12px; margin-top: 22px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); }
.pin-dots i.f { background: var(--aqua-3); border-color: var(--aqua-3); animation: pinPop .5s var(--spring) both; animation-delay: calc(var(--i) * 140ms); }
@keyframes pinPop { from { transform: scale(0); } }

/* ---------- Crew ---------- */
.crew { overflow: clip; }
.crew-stage { position: relative; margin-top: 56px; height: 230px; }
.crew-stage::before { content: ""; position: absolute; left: -20%; right: -20%; bottom: 20px; height: 70px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,121,150,.16), transparent); }
.crew-line { display: flex; justify-content: center; align-items: flex-end; gap: clamp(0px, 1vw, 12px); height: 100%; }
.crew-line .kid { flex: none; --size: clamp(110px, 12vw, 160px); cursor: pointer; transition: transform .5s var(--spring); }
.crew-line .kid:nth-child(odd) { transform: translateY(-8px); }
.crew-line .kid:hover { transform: translateY(-22px) scale(1.08); }
@media (max-width: 760px) { .crew-line { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; } .crew-line .kid { scroll-snap-align: center; } }

/* ---------- Privacy band ---------- */
.privacy-band { padding: clamp(80px, 10vw, 130px) 0; }
.pv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.pv { padding: 28px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.pv .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; background: var(--sky); }
.pv .ic svg { width: 26px; height: 26px; stroke: var(--aqua); }
.pv h3 { font-size: 1.4rem; letter-spacing: -.03em; margin-bottom: 6px; }
.pv p { color: var(--ink-2); }
@media (max-width: 860px) { .pv-grid { grid-template-columns: 1fr; } }

/* ---------- Final CTA ---------- */
.final { padding: 0 0 clamp(80px, 10vw, 120px); }
.final-card { position: relative; overflow: clip; isolation: isolate; border-radius: var(--r-lg); padding: clamp(56px, 8vw, 110px) 24px; text-align: center; color: #fff; background: linear-gradient(140deg, #005e75 0%, var(--aqua) 40%, var(--aqua-2) 100%); }
.final-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 60% at 50% 110%, rgba(255,212,92,.55), transparent 70%); z-index: -1; }
.final-card::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .3; mix-blend-mode: overlay; pointer-events: none; }
.final-card .anim { --size: clamp(150px, 20vw, 220px); margin: 0 auto 10px; display: block; filter: drop-shadow(0 30px 30px rgba(0,0,0,.25)); }
.final-card h2 { font-size: clamp(2.6rem, 7vw, 5.6rem); font-weight: 800; letter-spacing: -.055em; }
.final-card p { color: rgba(255,255,255,.85); font-size: 1.2rem; margin: 18px auto 34px; max-width: 30rem; }
.final-card .btn-store { --b: #fff; color: var(--ink); }
.final-card .btn-store:hover { color: var(--ink); }
.final-card .mail { display: inline-block; margin-top: 22px; color: #fff; font-weight: 800; }

/* ---------- Footer ---------- */
.site-footer { padding: 0 0 40px; color: var(--muted); font-size: .95rem; overflow: clip; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.site-footer a { color: var(--ink-2); text-decoration: none; font-weight: 800; }
.site-footer a:hover { color: var(--aqua); }
.wordmark { font-family: var(--display); font-weight: 800; font-size: clamp(6rem, 26vw, 22rem); letter-spacing: -.07em; line-height: .78; text-align: center; background: linear-gradient(180deg, rgba(0,121,150,.16), rgba(0,121,150,0) 85%); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; margin-top: 12px; }

/* ---------- Document pages (privacy / terms / support) ---------- */
.doc { padding: 140px 0 80px; background: radial-gradient(50% 300px at 50% 0, rgba(127,219,230,.35), transparent 80%); }
.doc .container { max-width: 780px; }
.doc h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: -.05em; margin: 0 0 10px; }
.doc .meta { color: var(--muted); margin: 0 0 36px; font-weight: 700; }
.doc article { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow-1); }
.doc article h2 { font-size: 1.5rem; letter-spacing: -.03em; margin: 36px 0 10px; }
.doc article h2:first-child { margin-top: 0; }
.doc article p, .doc article li { color: var(--ink-2); }
.doc article p + p { margin-top: 12px; }
.doc article ul { padding-left: 1.2rem; margin: 10px 0; }
.doc article li { margin: 6px 0; }
.doc code { font-size: .9em; background: var(--sky); padding: 1px 6px; border-radius: 6px; }
.contact-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; background: var(--ink); color: #fff; border-radius: var(--r); padding: 28px 32px; margin-bottom: 24px; }
.contact-box h2 { font-size: 1.6rem; letter-spacing: -.03em; margin-bottom: 4px; }
.contact-box p { margin: 0; color: rgba(255,255,255,.7); }
.mail-btn { display: inline-block; background: var(--gold); color: var(--ink); font-weight: 900; text-decoration: none; padding: 14px 24px; border-radius: 999px; transition: transform .3s var(--spring); }
.mail-btn:hover { color: var(--ink); transform: translateY(-2px) scale(1.03); }
details { border-top: 1px solid var(--line); padding: 18px 0; }
details:first-of-type { border-top: 0; padding-top: 0; }
summary { cursor: pointer; font-weight: 900; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sky); color: var(--aqua); font-size: 1.2rem; transition: transform .4s var(--spring); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; }
.doc + .site-footer .foot-top { border-top: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero h1 .w > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- Small phones ---------- */
@media (max-width: 600px) { .f1, .f2 { display: none; } .quest .node .anim { --size: 52px; } .quest .node.end .anim { --size: 66px; } .quest .walker .kid { --size: 84px; } }
