/* Pet Phonics website. One family (Nunito, SIL OFL, self-hosted), colours taken from the app's art. */
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --sky-top: #4fb2ff;
  --sky-mid: #a6dbff;
  --sky-low: #e3f4ff;
  --page: #f3f8ff;
  --ink: #24164f;
  --ink-soft: #4f4778;
  --purple: #4b25a8;
  --purple-deep: #2a1167;
  --violet-line: #6a45d6;
  --green: #2fa128;
  --green-face: #24881f;
  --green-edge: #17611a;
  --gold: #ffc22e;
  --gold-edge: #c98400;
  --grass: #63cf4f;
  --grass-dark: #44ac38;
  --sea: #0a72bc;
  --sea-deep: #07508a;
  --card: #ffffff;
  --radius-xl: 32px;
  --radius-l: 24px;
  --radius-m: 16px;
  --shadow-card: 0 18px 40px -18px rgba(36, 22, 79, 0.35), 0 2px 6px rgba(36, 22, 79, 0.08);
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--purple); text-underline-offset: 0.18em; }
a:hover { color: var(--violet-line); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 10px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

.visually-hidden {
  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; background: #fff; color: var(--ink);
  padding: 10px 16px; border-radius: 12px; font-weight: 800; box-shadow: var(--shadow-card);
}
.skip:focus { top: 12px; }

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

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7.2vw, 5.25rem); font-weight: 950; letter-spacing: -0.03em; }
h2 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 850; letter-spacing: -0.01em; line-height: 1.15; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--ink-soft); font-weight: 650; max-width: 36em; margin: 18px auto 0; text-wrap: pretty; }
.center { text-align: center; }

/* ---------- App Store badge (Apple's official black badge, unaltered) ---------- */
/* The padding is Apple's clear space (a quarter of the badge height); the negative margin keeps the layout. */
.store-badge { display: inline-block; padding: 14px; margin: -14px; line-height: 0; border-radius: 22px; }
.store-badge img { display: block; height: 56px; width: auto; }
.store-note { margin: 18px 0 0; font-size: 0.95rem; font-weight: 750; color: var(--ink-soft); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-stuck { background: rgba(255, 255, 255, 0.9); box-shadow: 0 6px 20px -12px rgba(36, 22, 79, 0.35); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; color: var(--ink); font-weight: 950; font-size: 1.35rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand img { height: 48px; width: auto; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none; font-weight: 850; font-size: 0.98rem;
  box-shadow: 0 3px 0 rgba(36,22,79,0.14), 0 8px 18px -10px rgba(36,22,79,0.4);
  transition: transform 0.15s ease;
}
.nav-btn:hover { color: var(--ink); transform: translateY(-1px); }
.nav-btn .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--green-face); display: grid; place-items: center; }
.nav-btn .dot svg { width: 10px; height: 10px; margin-left: 2px; }
.site-header.is-stuck .nav-btn { background: var(--green-face); color: #fff; box-shadow: 0 3px 0 var(--green-edge); }
.site-header.is-stuck .nav-btn .dot { background: rgba(255,255,255,0.22); }
@media (max-width: 520px) { .brand img { height: 40px; } }
.site-footer .logo { display: block; width: fit-content; margin: 0 auto 22px; line-height: 0; }
.site-footer .logo img { height: 72px; width: auto; }
@media (max-width: 520px) { .site-footer .logo img { height: 60px; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  margin-top: -72px; padding-top: calc(72px + clamp(28px, 6vw, 64px));
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-low) 100%);
  text-align: center;
}
.hero .copy { position: relative; z-index: 3; }
.hero h1 { color: var(--ink); }
.hero .lead { color: #2f2566; }
.hero .cta { margin-top: 30px; }
.hero .store-note { color: #3a3070; }

.clouds { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.cloud { position: absolute; width: var(--w, 280px); opacity: 0.95; animation: drift var(--t, 90s) linear infinite; animation-delay: var(--d, 0s); will-change: transform; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }
.cloud { left: 0; }

.hero-stage { position: relative; z-index: 2; width: min(1040px, 100%); margin: clamp(36px, 6vw, 64px) auto 0; padding-bottom: clamp(64px, 8.5vw, 120px); }

/* a landscape iPhone, drawn in CSS */
.phone {
  position: relative; margin-inline: auto;
  padding: clamp(7px, 1.2vw, 14px);
  border-radius: clamp(26px, 5vw, 58px);
  background: linear-gradient(145deg, #3a3550, #18142a 40%, #2a2540);
  box-shadow: 0 0 0 2px #514a6e inset, 0 40px 80px -30px rgba(20, 30, 80, 0.55), 0 12px 24px -12px rgba(20,30,80,0.4);
}
.phone .screen { border-radius: clamp(20px, 3.9vw, 45px); overflow: hidden; background: #000; aspect-ratio: 2708 / 1320; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; }
.hero .phone { width: min(780px, 88vw); }

.float-card {
  position: absolute; z-index: 4; text-align: left;
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow-card);
  padding: 14px 16px; width: 250px;
}
.float-card .tag { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 850; color: var(--ink-soft); margin-bottom: 8px; }
.float-card .tag img { width: 22px; height: 22px; border-radius: 6px; }
.float-card .tag time { margin-left: auto; font-weight: 700; color: #8a84a6; }
.card-sound { left: -10px; top: 14%; }
.card-sound .row { display: flex; align-items: center; gap: 12px; }
.card-sound .row img { width: 74px; height: auto; }
.card-sound b { display: block; font-size: 1.05rem; font-weight: 900; line-height: 1.2; }
.card-sound p { margin: 2px 0 0; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.3; }
.card-read { right: -14px; top: 24%; width: 270px; }
.card-read .strip { display: flex; gap: 8px; flex-wrap: wrap; font-weight: 950; font-size: 1.45rem; letter-spacing: -0.01em; }
.card-read .strip span { position: relative; padding-bottom: 8px; color: var(--ink); }
.card-read .strip span::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; border-radius: 4px; background: var(--ink); }
.card-read .coins { display: flex; gap: 6px; margin-top: 10px; align-items: center; font-size: 0.9rem; font-weight: 850; color: var(--ink-soft); }
.card-read .coins img { width: 26px; height: 26px; }

.hill {
  position: absolute; z-index: 3; left: 50%; bottom: 0; transform: translateX(-50%);
  width: max(160%, 1500px); height: clamp(110px, 13.5vw, 190px);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, var(--grass) 0%, var(--grass-dark) 100%);
  box-shadow: inset 0 10px 0 rgba(255,255,255,0.22);
}
.hill-pets { position: absolute; z-index: 5; left: 0; right: 0; bottom: clamp(44px, 6.5vw, 92px); pointer-events: none; }
.hp { position: absolute; bottom: 0; width: var(--s, 130px); }
.hp .stack { position: relative; }
.hp img { width: 100%; height: auto; }
.hp img + img { position: absolute; left: 0; bottom: 0; }

/* pets that wake: sleep, then one eye, then awake */
.wake .w-sleep { animation: w-sleep 0.01s linear var(--wd, 1.2s) both; }
.wake .w-peek { opacity: 0; animation: w-peek 0.7s steps(1) var(--wd, 1.2s) both; }
.wake .w-awake { opacity: 0; animation: w-awake 0.4s ease calc(var(--wd, 1.2s) + 0.7s) both; }
.wake .stack { animation: hop 0.5s ease calc(var(--wd, 1.2s) + 0.7s) both; }
@keyframes w-sleep { to { opacity: 0; } }
@keyframes w-peek { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes w-awake { from { opacity: 0; } to { opacity: 1; } }
@keyframes hop { 0% { transform: translateY(0); } 40% { transform: translateY(-14%); } 100% { transform: translateY(0); } }

/* hero entrance: one orchestrated moment */
.enter { animation: rise 0.8s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--ed, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.pop { animation: pop 0.55s cubic-bezier(.3,1.5,.5,1) both; animation-delay: var(--ed, 0s); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.85); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .card-sound { left: 2%; top: auto; bottom: calc(100% - 22px); width: 200px; padding: 10px 12px; }
  .card-sound .row img { width: 50px; }
  .card-sound b { font-size: 0.95rem; }
  .card-sound p { font-size: 0.82rem; }
  .card-read { display: none; }
  .hero-stage { margin-top: 110px; }
}
@media (max-width: 400px) { .card-sound { width: 186px; } }

.nowrap { white-space: nowrap; }

/* ---------- facts strip ---------- */
.facts { padding: clamp(28px, 4vw, 44px) 0 clamp(20px, 4vw, 40px); }
.facts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; }
.facts li { display: flex; align-items: center; gap: 10px; font-weight: 850; color: var(--ink-soft); font-size: 1.02rem; }
.facts .ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.facts .ic img { width: 40px; height: 40px; object-fit: contain; }
@media (max-width: 600px) {
  .facts ul { flex-direction: column; align-items: flex-start; width: max-content; margin-inline: auto; max-width: calc(100% - 2 * var(--gutter)); gap: 12px; }
}
.coin-letter {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe48a 0%, var(--gold) 55%, #f0a800 100%);
  box-shadow: 0 3px 0 var(--gold-edge), inset 0 0 0 3px rgba(255, 240, 180, 0.9);
  color: var(--ink); font-weight: 950; font-size: 1.1rem; line-height: 1;
}

/* ---------- the sticky reading scene ---------- */
.story { position: relative; height: 360vh; margin-top: clamp(20px, 4vw, 40px); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 76px clamp(10px, 2vw, 24px) clamp(10px, 2vw, 24px); }
.scene {
  position: relative; height: 100%; overflow: hidden; border-radius: var(--radius-xl);
  background: #8fd36b; isolation: isolate;
  box-shadow: 0 30px 60px -30px rgba(20, 60, 20, 0.45);
}
.scene > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; z-index: -1; }
.scene-cap { position: absolute; left: 0; right: 0; top: clamp(22px, 5vh, 56px); text-align: center; padding-inline: 16px; z-index: 3; }
.scene-cap .line { position: absolute; left: 0; right: 0; transition: opacity 0.45s ease, transform 0.45s ease; }
.scene-cap .line h3 { font-size: clamp(2rem, 5.4vw, 4.2rem); font-weight: 950; letter-spacing: -0.03em; color: var(--ink); text-shadow: 0 2px 0 rgba(255,255,255,0.55); }
.scene-cap .line p { margin: 8px auto 0; max-width: 30em; font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.2rem); color: #2f2566; }
.scene-cap .l2 { opacity: 0; transform: translateY(20px); }
.scene[data-phase="play"] .scene-cap .l1, .scene[data-phase="done"] .scene-cap .l1 { opacity: 0; transform: translateY(-20px); }
.scene[data-phase="play"] .scene-cap .l2, .scene[data-phase="done"] .scene-cap .l2 { opacity: 1; transform: none; }

.sentence {
  position: absolute; left: 50%; top: 52%; z-index: 4;
  transform: translate(-50%, -50%);
  background: #fffdf6; border: 5px solid var(--violet-line); border-radius: 26px;
  padding: clamp(14px, 2.2vw, 26px) clamp(18px, 3vw, 38px) clamp(18px, 2.4vw, 28px);
  box-shadow: 0 6px 0 #4a2aa0, 0 30px 50px -20px rgba(36, 22, 79, 0.5);
  display: flex; gap: clamp(10px, 1.6vw, 22px); white-space: nowrap;
  transition: top 0.7s cubic-bezier(.3,.9,.3,1), transform 0.7s cubic-bezier(.3,.9,.3,1);
}
.sentence .wd { position: relative; font-size: clamp(2rem, 6.4vw, 4.6rem); font-weight: 950; letter-spacing: -0.01em; line-height: 1.05; color: #c4bfd8; padding-bottom: 14px; transition: color 0.25s ease; }
.sentence .wd::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 0; height: 8px; border-radius: 6px; background: #e4e0ee; }
.sentence .wd::before { content: ""; position: absolute; left: 2px; right: 2px; bottom: 0; height: 8px; border-radius: 6px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease; z-index: 1; }
.sentence .wd.lit { color: var(--ink); animation: wordpop 0.35s ease; }
.sentence .wd.lit::before { transform: scaleX(1); }
@keyframes wordpop { 50% { transform: translateY(-6px) scale(1.06); } }
.scene[data-phase="play"] .sentence, .scene[data-phase="done"] .sentence { top: clamp(150px, 27vh, 250px); transform: translate(-50%, 0) scale(0.62); transform-origin: 50% 0; }

.mic {
  position: absolute; left: 50%; top: calc(52% + clamp(70px, 11vw, 120px)); z-index: 4; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 0 rgba(36,22,79,0.18); transition: opacity 0.3s ease;
}
.mic svg { width: 26px; height: 26px; }
.mic::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.85); animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { transform: scale(0.85); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.scene[data-phase="intro"] .mic, .scene[data-phase="play"] .mic, .scene[data-phase="done"] .mic { opacity: 0; }

.side-note {
  position: absolute; z-index: 5; left: clamp(14px, 3vw, 40px); bottom: clamp(90px, 14vh, 130px);
  width: 270px; background: #fff; border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow-card);
  opacity: 0; transform: translateY(16px) scale(0.96); transition: opacity 0.35s ease, transform 0.4s ease;
}
.side-note b { display: block; font-weight: 900; font-size: 1.05rem; line-height: 1.2; }
.side-note p { margin: 4px 0 10px; font-size: 0.93rem; color: var(--ink-soft); line-height: 1.35; }
.slider { position: relative; display: flex; gap: 8px; padding-top: 6px; }
.slider i { display: block; height: 7px; border-radius: 4px; background: #e4e0ee; }
.slider i:nth-child(1) { width: 22%; } .slider i:nth-child(2) { width: 30%; } .slider i:nth-child(3) { width: 26%; }
.slider .knob { position: absolute; top: -3px; left: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 4px rgba(75,37,168,0.2); animation: slide 2.6s ease-in-out infinite; }
@keyframes slide { 0% { left: 0; } 70% { left: calc(84% - 22px); } 100% { left: calc(84% - 22px); opacity: 0; } }
.scene[data-phase="read"] .side-note { opacity: 1; transform: none; }

.actors { position: absolute; left: 0; right: 0; bottom: clamp(70px, 12vh, 120px); height: 1px; z-index: 3; }
.pan { position: absolute; left: 44%; bottom: 0; width: clamp(90px, max(12vw, 13vh), 180px); transform: translateX(-50%); opacity: 0; transition: opacity 0.4s ease; }
.pan img { width: 100%; filter: drop-shadow(0 10px 6px rgba(20, 60, 20, 0.35)); transform-origin: 30% 70%; }
.cat { position: absolute; left: 50%; bottom: -10px; width: clamp(110px, max(14vw, 18vh), 230px); transform: translateX(70vw); transition: transform 1s cubic-bezier(.3,.8,.35,1); }
.cat img { width: 100%; filter: drop-shadow(0 12px 8px rgba(20, 60, 20, 0.3)); }
.scene[data-phase="play"] .pan, .scene[data-phase="done"] .pan { opacity: 1; }
.scene[data-phase="play"] .cat { transform: translateX(10%); }
.scene[data-phase="done"] .cat { transform: translateX(10%); transition-duration: 0.5s; }
.scene[data-phase="done"] .cat img { animation: tap 0.5s ease 2; transform-origin: 50% 100%; }
@keyframes tap { 50% { transform: rotate(-8deg) translateY(-6px); } }
.scene[data-phase="done"] .pan img { animation: ding 0.5s ease 0.15s 2; }
@keyframes ding { 25% { transform: rotate(-9deg); } 75% { transform: rotate(6deg); } }
.burst { position: absolute; left: 44%; bottom: 60px; width: 0; height: 0; }
.burst img { position: absolute; width: 34px; left: -17px; top: -17px; opacity: 0; }
.scene[data-phase="done"] .burst img { animation: burst 0.9s cubic-bezier(.2,.8,.3,1) 0.2s both; }
@keyframes burst { 0% { opacity: 0; transform: translate(0,0) scale(0.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(1) rotate(40deg); } }

.coin-row { position: absolute; left: 50%; bottom: clamp(18px, 3.4vh, 34px); transform: translateX(-50%); display: flex; gap: clamp(8px, 1.4vw, 16px); z-index: 4; }
.coin-row span { width: clamp(42px, 5vw, 64px); height: clamp(18px, 2vw, 26px); border-radius: 50%; background: rgba(255,255,255,0.75); box-shadow: 0 4px 0 rgba(0,0,0,0.12); transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease; }
.coin-row span.on { background: linear-gradient(180deg, #ffe17a, var(--gold)); box-shadow: 0 4px 0 var(--gold-edge); transform: translateY(-3px); }

@media (max-width: 760px) {
  .side-note { left: 50%; transform: translate(-50%, 16px); width: min(300px, 86%); bottom: 72px; padding: 12px 14px; }
  .scene[data-phase="read"] .side-note { transform: translate(-50%, 0); }
  .side-note p { margin-bottom: 8px; }
  .sentence { top: 44%; border-width: 4px; }
  .sentence .wd { padding-bottom: 10px; }
  .sentence .wd::after, .sentence .wd::before { height: 6px; }
  .mic { top: calc(44% + 64px); width: 48px; height: 48px; }
  .scene[data-phase="play"] .sentence, .scene[data-phase="done"] .sentence { top: clamp(150px, 26vh, 210px); transform: translate(-50%, 0) scale(0.72); }
  .actors { bottom: 86px; }
  .pan { left: 36%; }
  .burst { left: 36%; }
  .cat { left: 46%; }
}

/* ---------- three steps on the hill ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0 0; }
.section-head { text-align: center; max-width: 900px; margin: 0 auto; padding-inline: var(--gutter); }
.steps-band { position: relative; padding-bottom: clamp(70px, 9vw, 120px); }
.steps-band::before {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: -1;
  width: max(170%, 1500px); height: clamp(160px, 17vw, 270px);
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  background: linear-gradient(180deg, var(--grass) 0%, var(--grass-dark) 100%);
  box-shadow: inset 0 10px 0 rgba(255,255,255,0.2);
}
.steps-band { isolation: isolate; overflow: hidden; }
.steps { list-style: none; margin: clamp(40px, 6vw, 72px) auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 32px); width: min(1320px, 100% - 2 * var(--gutter)); }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step .num { width: 52px; height: 52px; font-size: 1.5rem; margin-bottom: 14px; }
.step h3 { max-width: 15em; }
.step p { margin: 8px 0 22px; color: var(--ink-soft); max-width: 22em; font-size: 1rem; }
.step .phone { width: 100%; margin-top: auto; padding: 8px; border-radius: 30px; }
.step .phone .screen { border-radius: 23px; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; max-width: 560px; gap: 56px; }
  .steps-band::before { height: clamp(150px, 34vw, 240px); }
}

/* ---------- worlds ---------- */
.worlds { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin: clamp(40px, 6vw, 72px) auto 0; }
.world { margin: 0; text-align: center; }
.tablet { padding: clamp(8px, 1vw, 13px); border-radius: clamp(20px, 2.4vw, 32px); background: linear-gradient(145deg, #3a3550, #18142a 45%, #2a2540); box-shadow: 0 0 0 2px #514a6e inset, 0 36px 60px -30px rgba(20,30,80,0.5); }
.tablet .screen { aspect-ratio: 4 / 3; border-radius: clamp(13px, 1.6vw, 20px); overflow: hidden; }
.tablet .screen img { width: 100%; height: 100%; object-fit: cover; }
.world:first-child .tablet { transform: rotate(-2deg); }
.world:last-child .tablet { transform: rotate(2deg); }
.world figcaption { margin-top: 28px; }
.world figcaption p { margin: 6px auto 12px; color: var(--ink-soft); max-width: 26em; }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.letters .coin-letter { width: 40px; height: 40px; }
.letters .more { align-self: center; font-weight: 850; color: var(--ink-soft); margin-left: 4px; }
@media (max-width: 1000px) { .letters { gap: 6px; } .letters .coin-letter { width: 34px; height: 34px; font-size: 1rem; } }
@media (max-width: 760px) { .worlds { grid-template-columns: 1fr; gap: 56px; } }

/* ---------- pets and stickers marquee ---------- */
.marquee { overflow: hidden; margin-top: clamp(36px, 5vw, 56px); padding-block: 18px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee + .marquee { margin-top: 6px; }
.track { display: flex; width: max-content; animation: marquee var(--mt, 70s) linear infinite; }
.marquee.rev .track { animation-direction: reverse; }
.marquee:hover .track, .marquee:focus-within .track { animation-play-state: paused; }
.track > ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0 9px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.pet-card { position: relative; width: 170px; padding: 18px 14px 14px; background: #fff; border-radius: 28px; box-shadow: var(--shadow-card); text-align: center; flex: none; }
.pet-card .pic { position: relative; height: 132px; display: grid; place-items: end center; }
.pet-card .pic img { max-height: 132px; width: auto; transition: opacity 0.35s ease, transform 0.35s ease; }
.pet-card .pic .w-awake { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%) translateY(6px) scale(0.92); opacity: 0; }
.pet-card.is-awake .pic .w-awake { opacity: 1; transform: translateX(-50%); }
.pet-card.is-awake .pic .w-sleep { opacity: 0; }
.pet-card .name { display: block; margin-top: 10px; font-weight: 900; font-size: 1.1rem; }
.pet-card .coin-letter { z-index: 2; position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; font-size: 1.15rem; }
.sticker { flex: none; width: 116px; height: 116px; display: grid; place-items: center; }
.sticker img { max-width: 100px; max-height: 100px; width: auto; filter: drop-shadow(0 6px 8px rgba(36,22,79,0.2)); }
.sticker:nth-child(odd) img { transform: rotate(-6deg); }
.sticker:nth-child(even) img { transform: rotate(5deg); }
.marquee-note { text-align: center; color: var(--ink-soft); margin: 10px auto 0; padding-inline: var(--gutter); font-weight: 750; }

/* ---------- grown-ups (purple band, like the app's bars) ---------- */
.calm { margin-top: clamp(90px, 12vw, 160px); background: radial-gradient(120% 90% at 50% 0%, #5a31c4 0%, var(--purple) 40%, var(--purple-deep) 100%); color: #fff; padding: clamp(70px, 10vw, 130px) 0; border-radius: clamp(32px, 6vw, 72px); width: min(1400px, 100% - 2 * clamp(0px, 2vw, 24px)); margin-inline: auto; }
.calm h2 { color: #fff; }
.calm .lead { color: #dcd3ff; }
.calm a { color: #fff; }
.calm-list { list-style: none; margin: clamp(40px, 6vw, 64px) auto 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 48px) clamp(28px, 5vw, 72px); max-width: 1000px; }
.calm-list li { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; }
.calm-list .ic { width: 64px; height: 64px; border-radius: 20px; background: rgba(255,255,255,0.12); display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.14); }
.calm-list .ic svg { width: 32px; height: 32px; }
.calm-list .ic.math { font-weight: 950; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--gold); }
.calm-list h3 { color: #fff; }
.calm-list p { margin: 6px 0 0; color: #dcd3ff; }
.calm .more-link { text-align: center; margin: clamp(40px, 5vw, 56px) 0 0; font-weight: 850; }
@media (max-width: 760px) { .calm-list { grid-template-columns: 1fr; } }

/* ---------- questions ---------- */
.faq { max-width: 760px; margin: clamp(36px, 5vw, 56px) auto 0; display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: 20px; box-shadow: 0 2px 0 rgba(36,22,79,0.06), 0 10px 24px -16px rgba(36,22,79,0.3); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-weight: 900; font-size: 1.1rem; border-radius: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #efeaff; color: var(--purple); display: grid; place-items: center; transition: transform 0.25s ease, background 0.25s ease; }
.faq summary .plus svg { width: 14px; height: 14px; }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--gold); color: var(--ink); }
.faq .answer { padding: 0 22px 20px; color: var(--ink-soft); }
.faq .answer p { margin: 0; }

/* ---------- the ending: the island ---------- */
.final { position: relative; margin-top: clamp(90px, 12vw, 160px); background: linear-gradient(180deg, var(--page) 0%, var(--sky-low) 12%, var(--sky-mid) 45%, #7fc7ff 100%); padding-top: clamp(60px, 8vw, 110px); text-align: center; overflow: hidden; }
.final .cta { margin-top: 30px; position: relative; z-index: 3; }
.island-wrap { position: relative; height: clamp(300px, 42.4vw, 820px); margin-top: clamp(24px, 5vw, 60px); overflow: hidden; }
.island { position: absolute; left: 50%; top: 0; height: 100%; aspect-ratio: 2640 / 1120; width: auto; min-width: 100%; transform: translateX(-50%); }
.island > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%); mask-image: linear-gradient(180deg, transparent 0%, #000 16%); }
.island .it { position: absolute; z-index: 2; transform: translate(-50%, -100%); }
.island .it img { width: 100%; filter: drop-shadow(0 8px 6px rgba(10, 40, 30, 0.28)); }
.island .bob img { animation: bob 3.6s ease-in-out infinite; animation-delay: var(--bd, 0s); }
@keyframes bob { 50% { transform: translateY(-5%); } }
.final .clouds { z-index: 2; }

.site-footer { position: relative; background: linear-gradient(180deg, var(--sea) 0%, var(--sea-deep) 100%); color: #fff; text-align: center; padding: clamp(28px, 4vw, 40px) 0 28px; overflow: hidden; }
.site-footer a { color: #fff; font-weight: 850; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.site-footer .copy { margin: 16px 0 0; font-size: 0.92rem; color: #d6ecff; font-weight: 700; }
.wordmark { display: block; margin: clamp(18px, 3vw, 30px) auto 0; font-weight: 1000; letter-spacing: -0.04em; line-height: 0.82; font-size: clamp(3.4rem, 15.5vw, 15rem); color: rgba(255,255,255,0.14); white-space: nowrap; user-select: none; }
.final + .site-footer { padding-top: 6px; }

/* ---------- legal pages ---------- */
.legal-top { background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 60%, var(--page) 100%); margin-top: -72px; padding-top: 72px; height: 260px; }
.legal { position: relative; margin: -170px auto 0; width: min(800px, 100% - 2 * var(--gutter)); background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: clamp(26px, 5vw, 56px) clamp(20px, 5vw, 64px) clamp(30px, 5vw, 56px); font-weight: 550; font-size: 1.05rem; line-height: 1.65; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.08; margin: 0 0 6px; }
.legal h2 { font-size: 1.35rem; line-height: 1.25; margin: 40px 0 8px; letter-spacing: -0.01em; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .meta { color: var(--ink-soft); margin-bottom: 28px; font-weight: 700; }
.legal .summary { background: #eef6ff; border: 2px solid #d4e8ff; border-radius: 20px; padding: 18px 22px; }
.legal .summary p:last-child, .legal .summary ul:last-child { margin-bottom: 0; }
.legal-page .site-footer { margin-top: clamp(60px, 8vw, 100px); }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: clamp(40px, 8vw, 90px) var(--gutter) clamp(60px, 9vw, 110px); }
.lost img { width: 220px; margin: 0 auto 18px; }
.lost p { color: var(--ink-soft); }

/* ---------- reduced motion: everything rests in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  .cloud { animation: none; transform: translateX(var(--rx, 10vw)); }
  .enter, .pop, .wake .stack { animation: none; }
  .wake .w-sleep, .wake .w-peek { animation: none; opacity: 0; }
  .wake .w-awake { animation: none; opacity: 1; }
  .track { animation: none; }
  .marquee { overflow-x: auto; }
  .track > ul[aria-hidden="true"] { display: none; }
  .island .bob img, .mic::before, .slider .knob { animation: none; }
  .nav-btn, .faq summary .plus { transition: none; }
  .story { height: auto; }
  .stage { position: relative; height: min(100svh, 780px); }
  .sentence, .cat, .scene-cap .line, .side-note, .pan, .coin-row span { transition: none !important; }
  .scene .burst { display: none; }
}
