/* Palette from the game art: sky, grass, sunshine, and the bunny's white and red. */
:root {
  --ink: #2a2238;
  --ink-soft: #4f4762;
  --cream: #fffaf0;
  --paper: #ffffff;
  --line: #efe4d2;

  --sky: #5bbcf4;
  --sky-mid: #98d6fa;
  --sky-light: #cdeefe;
  --sky-pale: #eaf7ff;
  --sky-deep: #155f9e;
  --night: #173f6e;

  --grass: #62c23f;
  --grass-light: #9bd97a;
  --grass-pale: #eef9e7;
  --grass-deep: #2c6e1d;

  --sun: #ffd33d;
  --sun-light: #ffe58a;
  --sun-pale: #fff5cc;
  --sun-deep: #8a5300;

  --red: #e8432f;
  --red-pale: #ffe7e2;
  --red-deep: #b8301f;

  --radius-s: 14px;
  --radius-m: 24px;
  --radius-l: 36px;
  --shadow-sticker: 0 5px 0 rgba(42, 34, 56, 0.12);
  --shadow-soft: 0 22px 40px -24px rgba(42, 34, 56, 0.45);

  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
svg.icon { width: 1.25em; height: 1.25em; flex: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7.2vw, 4.9rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 700; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--sky-deep); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus { outline: none; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

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

.site-header {
  background: var(--sky);
  position: relative;
  z-index: 5;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-block: 0.85rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(42, 34, 56, 0.18);
}
.site-nav ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.45); }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.7); }
.site-nav .lang-switch {
  background: var(--paper);
  box-shadow: 0 3px 0 rgba(42, 34, 56, 0.15);
  margin-left: 0.35rem;
}
.site-nav .lang-switch:hover { background: var(--sun-pale); }

@media (max-width: 760px) {
  .nav-extra { display: none; }
}
@media (max-width: 520px) {
  .header-row { padding-block: 0.65rem; }
  .brand { font-size: 1.3rem; }
  .brand img { width: 38px; height: 38px; border-radius: 11px; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; }
  .site-nav a { padding: 0.4rem 0.65rem; }
  .site-nav .lang-switch { margin-left: auto; }
}

/* ---------- buttons, badge, chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.1rem;
  padding: 0.7rem 1.35rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.1;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { background: var(--sun-pale); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-sun { background: var(--sun); }
.btn-sun:hover { background: var(--sun-light); }
.btn-ink { background: var(--ink); color: #fff; box-shadow: 0 4px 0 rgba(42, 34, 56, 0.35); }
.btn-ink:hover { background: #3b3150; }
.btn-ghost {
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border-width: 2px;
  border-color: var(--line);
  font-size: 1rem;
  box-shadow: 0 3px 0 var(--line);
}
.btn-ghost:hover { border-color: var(--sun); background: var(--sun-pale); }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.5rem;
  padding: 0.5rem 1.25rem 0.5rem 1rem;
  border-radius: 16px;
  background: #15121c;
  color: #fff;
  text-decoration: none;
  line-height: 1.05;
  box-shadow: 0 4px 0 rgba(21, 18, 28, 0.35);
}
.store-badge .icon { width: 1.9rem; height: 1.9rem; color: var(--sun); }
.store-badge small { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.01em; opacity: 0.92; }
.store-badge b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; }
a.store-badge:hover { background: #2c2638; }
.store-badge.is-soon { cursor: default; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem 0.4rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-weight: 800;
  font-size: 0.98rem;
}
.chips .icon {
  width: 1.55rem;
  height: 1.55rem;
  padding: 0.28rem;
  border-radius: 50%;
  background: var(--grass);
  color: #fff;
}

.pill {
  display: inline-block;
  vertical-align: middle;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--red-pale);
  color: var(--red-deep);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.eyebrow-on-sky { background: rgba(255, 255, 255, 0.85); color: var(--red-deep); }
.eyebrow-on-dark { background: rgba(255, 211, 61, 0.16); color: var(--sun); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-mid) 58%, var(--sky-light) 100%);
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 0;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: end;
  gap: 1rem 2rem;
}
.hero-copy { padding-bottom: clamp(5rem, 11vw, 9.5rem); }
.hero h1 { margin-bottom: 0.3em; }
.hero h1 .hl {
  display: inline-block;
  color: #962216; /* the bunny's red, dark enough for 3:1 on the sky */
}
.hero-lead {
  max-width: 34rem;
  font-size: clamp(1.12rem, 1.8vw, 1.3rem);
  font-weight: 600;
  color: var(--ink);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1rem;
  margin-top: 1.5rem;
}
.hero-art {
  position: relative;
  align-self: end;
  justify-self: center;
  width: min(100%, 380px);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.hero-bunny {
  position: relative;
  z-index: 2;
  width: 100%;
  filter: drop-shadow(0 18px 18px rgba(23, 63, 110, 0.25));
}
.hero-star {
  position: absolute;
  z-index: 3;
  top: -2%;
  right: -10%;
  width: 34%;
}
.cloud { position: absolute; z-index: 1; pointer-events: none; }
.cloud-a { top: 2%; left: -90px; width: clamp(150px, 20vw, 260px); }
.cloud-b { top: 16%; right: 4%; width: clamp(110px, 14vw, 190px); opacity: 0.9; }

.hills {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(70px, 11vw, 150px);
}
.hill-back { fill: var(--grass-light); }
.hill-front { fill: var(--grass); }
.hill-ground { fill: var(--cream); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-art { width: min(62vw, 250px); margin: 0.5rem auto 2.2rem; }
  .hero-star { right: -18%; }
  .cloud-b { top: auto; bottom: 34%; right: -20px; }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.section-head {
  max-width: 44rem;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  text-align: center;
}
.section-lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  font-weight: 600;
  margin: 0;
}

.tone-sky { --tone: var(--sky); --tone-pale: var(--sky-pale); --tone-deep: var(--sky-deep); --tone-edge: var(--sky-light); }
.tone-sun { --tone: var(--sun); --tone-pale: var(--sun-pale); --tone-deep: var(--sun-deep); --tone-edge: var(--sun-light); }
.tone-grass { --tone: var(--grass); --tone-pale: var(--grass-pale); --tone-deep: var(--grass-deep); --tone-edge: #c8ecb5; }
.tone-red { --tone: var(--red); --tone-pale: var(--red-pale); --tone-deep: var(--red-deep); --tone-edge: #ffc6bb; }

/* how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem 1.5rem;
  margin: 0;
  padding: 1rem 0 0;
  list-style: none;
}
.step {
  position: relative;
  padding: 2.2rem 1.6rem 1.6rem;
  border: 3px solid var(--tone-edge);
  border-radius: var(--radius-m);
  background: var(--paper);
  box-shadow: 0 6px 0 var(--tone-edge);
}
.step p { margin: 0; color: var(--ink-soft); }
.step-num {
  position: absolute;
  top: -1.3rem;
  left: 1.4rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
}
.step-icon, .feature-icon {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  margin-bottom: 1rem;
  border-radius: 20px;
  background: var(--tone-pale);
  color: var(--tone-deep);
}
.step-icon .icon, .feature-icon .icon { width: 2rem; height: 2rem; }

.tv-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.6rem 1.8rem;
  border: 3px dashed var(--sky-light);
  border-radius: var(--radius-m);
  background: var(--sky-pale);
}
.tv-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.tv-card p { color: var(--ink-soft); max-width: 46rem; margin-bottom: 0.6rem; }
.tv-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 4rem;
  height: 4rem;
  border-radius: 20px;
  background: var(--sky);
  color: var(--ink);
}
.tv-icon .icon { width: 2.2rem; height: 2.2rem; }

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; max-width: 34rem; margin-inline: auto; }
  .tv-card { flex-direction: column; }
}

/* games */

.games { background: var(--sky-pale); border-radius: var(--radius-l); margin-inline: clamp(0px, 1.5vw, 20px); }
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 4px solid var(--paper);
  border-radius: var(--radius-m);
  background: var(--paper);
  box-shadow: var(--shadow-sticker), var(--shadow-soft);
  transition: transform 0.2s ease;
}
.game-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 18px 18px 8px 8px;
  background: var(--sky-light);
}
.game-body { padding: 0.95rem 1.05rem 1.15rem; }
.game-body h3 { margin-bottom: 0.3rem; font-size: 1.4rem; }
.game-body p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.game-body .moves {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  background: var(--tone-pale);
  color: var(--tone-deep);
  font-weight: 800;
  font-size: 0.85rem;
}
.game-card.tone-0 { --tone-pale: var(--sky-pale); --tone-deep: var(--sky-deep); }
.game-card.tone-1 { --tone-pale: var(--sun-pale); --tone-deep: var(--sun-deep); }
.game-card.tone-2 { --tone-pale: var(--grass-pale); --tone-deep: var(--grass-deep); }
.game-card.tone-3 { --tone-pale: var(--red-pale); --tone-deep: var(--red-deep); }

/* Ten cards: two big ones on top, then two rows of four. */
.game-card:nth-child(-n + 2) { grid-column: span 2; }
.game-card:nth-child(-n + 2) .game-body h3 { font-size: 1.65rem; }
@media (max-width: 1000px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .game-card:nth-child(-n + 2) { grid-column: auto; }
  .game-card:nth-child(-n + 2) .game-body h3 { font-size: 1.4rem; }
}
@media (max-width: 600px) { .game-grid { grid-template-columns: 1fr; } }

/* see how it plays: three looping "move -> game" demos and the "Try it!" bubble game.
   Without animation (reduced motion, or before it starts) every demo shows its key frame:
   the base styles below are that frame, and the loops are added only when motion is wanted. */

.see [hidden] { display: none !important; }

.demos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.demo {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid var(--tone-edge);
  border-radius: var(--radius-m);
  background: var(--paper);
  box-shadow: 0 6px 0 var(--tone-edge);
}
.demo-stage {
  display: grid;
  grid-template-columns: 1fr 1.5rem 1fr;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 0.75rem 0;
}
.demo-side {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  isolation: isolate;
}
.demo-kid { background: linear-gradient(180deg, var(--tone-pale) 0 86%, var(--tone-edge) 86% 100%); }
.demo-tag {
  position: absolute;
  z-index: 8;
  top: 0.4rem;
  left: 0.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}
.demo-arrow { display: grid; place-items: center; color: var(--tone-deep); }
.demo-arrow .icon { width: 1.4rem; height: 1.4rem; }
.demo-side img { position: absolute; max-width: none; pointer-events: none; user-select: none; }
.demo-body { padding: 1rem 1.2rem 1.3rem; }
.demo-body h3 { margin-bottom: 0.3rem; font-size: 1.4rem; }
.demo-body p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.demo-body .moves {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  background: var(--tone-pale);
  color: var(--tone-deep);
  font-weight: 800;
  font-size: 0.85rem;
}
.demo-body .demo-still { display: none; margin-top: 0.6rem; font-size: 0.9rem; font-style: italic; }
.demo-controls { margin: 1.5rem 0 0; text-align: center; }
.demo-pause .icon { width: 1.1rem; height: 1.1rem; }
.demo-pause[aria-pressed="true"] .icon-pause, .demo-pause[aria-pressed="false"] .icon-play { display: none; }

@media (max-width: 1000px) {
  .demos { grid-template-columns: 1fr; max-width: 34rem; margin-inline: auto; }
}

/* the kid (src/kid.svg), drawn in the site's sticker style */
.kid { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kid-o { fill: none; stroke: var(--ink); stroke-width: 14; stroke-linecap: round; }
.kid-skin, .kid-pants { fill: none; stroke: #f0b78f; stroke-width: 8.5; stroke-linecap: round; }
.kid-sleeve-o { fill: none; stroke: var(--ink); stroke-width: 16; stroke-linecap: round; }
.kid-sleeve { fill: none; stroke: var(--sun); stroke-width: 10; stroke-linecap: round; }
.kid-shoe { fill: var(--red); stroke: var(--ink); stroke-width: 3; }
.kid-shorts { fill: var(--sky); stroke: var(--ink); stroke-width: 3; }
.kid-shirt { fill: var(--sun); stroke: var(--ink); stroke-width: 3; }
.kid-star { fill: #fff; }
.kid-face { fill: #f0b78f; stroke: var(--ink); stroke-width: 3; }
.kid-hair { fill: #6b4330; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.kid-tuft { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.kid-cheek { fill: #ff8f7a; opacity: 0.55; }
.kid-eye { fill: var(--ink); }
.kid-smile { fill: none; stroke: var(--ink); stroke-width: 2.8; stroke-linecap: round; }
.kid-shadow { fill: rgba(42, 34, 56, 0.16); transform-origin: 60px 160px; }
.kid-body { transform-origin: 60px 155px; }
.kid-arm-l { transform-origin: 46px 78px; }
.kid-arm-r { transform-origin: 74px 78px; }
.kid-leg-l { transform-origin: 54px 110px; }
.kid-leg-r { transform-origin: 66px 110px; }

/* Bunny Dash: key frame = mid-jump over the log */
.demo-dash .demo-game { background: linear-gradient(180deg, #8fd3fb 0, var(--sky-light) 28.5%, var(--grass-light) 28.5%, var(--grass) 100%); }
.dash-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.dash-hill { fill: #7cc95a; }
.dash-road { fill: #f1d9a6; stroke: #d6b16f; stroke-width: 0.8; }
.dash-lane { fill: none; stroke: #fff; stroke-width: 1.4; stroke-dasharray: 5 5; stroke-linecap: round; opacity: 0.9; }
.dash-tuft { left: 0; top: 0; width: 18%; opacity: 0; }
.dash-obj { position: absolute; inset: 0; z-index: 2; transform-origin: 50% 90%; }
.dash-obj img { bottom: 7%; }
.dash-log img { left: 27%; width: 46%; }
.dash-rock img { left: 36%; width: 28%; }
.dash-rock { opacity: 0; }
.dash-bunny { position: absolute; z-index: 3; left: 33.5%; bottom: 6%; width: 33%; }
.dash-hop { position: relative; transform: translateY(-58%); }
.dash-run { position: relative; opacity: 0; }
.demo-side .dash-run img { position: relative; display: block; width: 66%; margin-inline: auto; }
.demo-side .dash-run .run-b { position: absolute; top: 0; left: 17%; opacity: 0; }
.dash-jump { left: 9%; bottom: 0; width: 82%; }
.demo-dash .kid-body { transform: translateY(-22px); }
.demo-dash .kid-arm-l { transform: rotate(135deg); }
.demo-dash .kid-arm-r { transform: rotate(-135deg); }
.demo-dash .kid-leg-l { transform: rotate(16deg); }
.demo-dash .kid-leg-r { transform: rotate(-16deg); }
.demo-dash .kid-shadow { transform: scale(0.6); }

/* Bubble Pop: key frame = the pop */
.demo-pop .demo-game, .try-stage {
  background:
    radial-gradient(120% 30% at 22% 104%, var(--grass) 0 60%, transparent 61%),
    radial-gradient(110% 26% at 88% 104%, #9bd97a 0 60%, transparent 61%),
    linear-gradient(180deg, #40a1f5 0%, #9fd6fb 55%, #cdeeff 100%);
}
.film {
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.75) 0 9%, transparent 26%),
    conic-gradient(from 210deg, rgba(255, 160, 220, 0.42), rgba(160, 215, 255, 0.4), rgba(180, 255, 200, 0.4), rgba(255, 240, 160, 0.45), rgba(255, 160, 220, 0.42));
}
.pop-bubble, .pop-glove { position: absolute; inset: 0; }
.pop-bubble { z-index: 2; }
.pop-glove { z-index: 4; transform: translate(7%, -42%); }
.pop-ball { position: absolute; left: 52%; top: 12%; width: 38%; aspect-ratio: 1; opacity: 0; }
.pop-ball img, .pop-amb img { position: static; display: block; width: 100%; }
.pop-friend { left: 61.5%; top: 20.5%; width: 19%; z-index: 1; transform: translate(-60%, 150%); }
.pop-f { left: 50%; top: 9%; width: 42%; opacity: 0; z-index: 2; }
.pop-f1 { opacity: 1; }
.pop-spark { left: 80%; top: 5%; width: 17%; z-index: 3; }
.pop-glove img { left: 52%; top: 60%; width: 22%; filter: drop-shadow(0 4px 3px rgba(23, 63, 110, 0.25)); }
.pop-amb { position: absolute; z-index: 1; left: 9%; top: 52%; width: 20%; aspect-ratio: 1; }
.demo-pop .kid-arm-r { transform: rotate(-122deg); }
.demo-pop .kid-arm-l { transform: rotate(14deg); }
.demo-pop .kid-body { transform: rotate(5deg); }

/* Freeze Dance: key frame = "Freeze!" */
.demo-freeze .demo-game {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 211, 61, 0.7) 0 7%, transparent 8%),
    radial-gradient(circle at 82% 24%, rgba(232, 67, 47, 0.35) 0 6%, transparent 7%),
    radial-gradient(circle at 60% 8%, rgba(91, 188, 244, 0.55) 0 5%, transparent 6%),
    linear-gradient(180deg, #fff0f5 0%, #ffd9cf 100%);
}
.fd-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 20%; background: #f7b5a3; z-index: 1; }
.fd-frost { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(205, 238, 254, 0.94), rgba(234, 247, 255, 0.97) 78%, #bfe6fb 78%); }
.fd-peng { position: absolute; z-index: 3; left: 10%; bottom: 9%; width: 80%; aspect-ratio: 1; transform-origin: 50% 100%; }
.demo-side .fd-peng img { bottom: 0; left: 50%; height: 84%; width: auto; transform: translateX(-50%); }
.fd-cheer, .fd-dance { opacity: 0; }
.demo-side .fd-peng .fd-ice { height: 100%; bottom: -4%; opacity: 0.72; }
.fd-note { z-index: 4; top: 40%; width: 12%; opacity: 0; }
.fd-note-a { left: 8%; }
.fd-note-b { right: 8%; top: 52%; }
.fd-flake { z-index: 5; width: 10%; }
.fd-flake-a { left: 10%; top: 36%; }
.fd-flake-b { right: 10%; top: 54%; }
.fd-call {
  position: absolute;
  z-index: 6;
  top: 15%;
  left: 50%;
  padding: 0.15rem 0.6rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--sky-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.8rem, 2.4vw, 1rem);
  line-height: 1.3;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 3px 0 rgba(42, 34, 56, 0.2);
}
.demo-freeze .kid-arm-l { transform: rotate(135deg); }
.demo-freeze .kid-arm-r { transform: rotate(-95deg); }

/* try it */
.try-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 1.5rem 2.25rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 3px solid var(--sun-light);
  border-radius: var(--radius-l);
  background: var(--sun-pale);
  box-shadow: 0 6px 0 var(--sun-light);
}
.try-copy .eyebrow { background: var(--sun); color: var(--ink); }
.try-title { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.try-copy p { color: var(--ink-soft); }
.try-text { font-weight: 600; color: var(--ink); }
.try-hand {
  float: left;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0.15rem 0.75rem 0.2rem 0;
  border-radius: 14px;
  background: var(--paper);
  color: var(--sun-deep);
}
.try-hand .icon { width: 1.6rem; height: 1.6rem; }
.try-copy .try-text { color: var(--ink); }
.try-keys { font-size: 0.95rem; }
.try-note { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.95rem; }
.try-note .icon { width: 1.4rem; height: 1.4rem; padding: 0.22rem; border-radius: 50%; background: var(--grass); color: #fff; }
.try-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.8rem; }
.try-copy .try-score {
  margin: 0;
  padding: 0.3rem 1rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}
.try-score b { display: inline-block; min-width: 2ch; font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; color: var(--red-deep); text-align: center; }
.try-sound {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0.35rem 0.95rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--line);
}
.try-sound:hover { border-color: var(--sun); }
.try-sound[aria-pressed="true"] { background: var(--sun); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.try-sound[aria-pressed="true"] .icon-sound-off, .try-sound[aria-pressed="false"] .icon-sound-on { display: none; }
.try-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 4px solid var(--paper);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-sticker), var(--shadow-soft);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.try-stage.is-playing { touch-action: none; cursor: none; }
.try-stage img { position: absolute; max-width: none; pointer-events: none; }
.try-cloud { top: 9%; left: 6%; width: 26%; }
.try-time { position: absolute; z-index: 5; top: 10px; left: 12px; right: 12px; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); visibility: hidden; }
.try-time span { display: block; height: 100%; border-radius: inherit; background: var(--sun); transform-origin: left center; }
.try-stage.is-playing .try-time { visibility: visible; }
.try-field { position: absolute; inset: 0; }
.try-idle { position: absolute; z-index: 1; }
.try-idle-a { left: 7%; top: 60%; width: 16%; }
.try-idle-b { right: 12%; top: 18%; width: 13%; }
.try-stage.is-playing .try-idle { display: none; }
.tb { position: absolute; left: 0; top: 0; will-change: transform; transition: opacity 0.5s ease; }
.tb.is-gone { opacity: 0; }
.try-stage .tb-rim { position: relative; display: block; width: 100%; }
.try-stage .tb-friend { left: 20%; top: 21%; width: 60%; }
.try-stage .try-glove { left: 0; top: 0; z-index: 4; filter: drop-shadow(0 5px 4px rgba(23, 63, 110, 0.3)); }
.tp-burst { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; }
.try-stage .tp-burst img { inset: 0; width: 100%; opacity: 0; }
.try-stage .tp-burst .tp-sparkle { inset: auto; top: -8%; right: -6%; width: 42%; }
.try-stage .tp-friend { z-index: 2; }
.try-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1rem;
  text-align: center;
  background: rgba(255, 250, 240, 0.3);
}
.try-stage.is-playing .try-overlay { display: none; }
.try-msg, .try-nojs {
  max-width: 24rem;
  margin: 0;
  padding: 0.6rem 1.1rem;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-sticker);
  font-weight: 700;
}
.try-msg { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.25; }
.try-start .icon { width: 1.1rem; height: 1.1rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 860px) {
  .try-card { grid-template-columns: 1fr; }
  .try-stage { aspect-ratio: 1 / 1; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-body .demo-still { display: block; }
  .demo-controls { display: none; }
  .demo *, .tp-burst img, .tp-friend { animation: none !important; }
  .try-stage .tp-burst .tp-pop-1, .try-stage .tp-burst .tp-sparkle { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Bunny Dash, 5 s: jump the log, then step aside past a rock and back. */
  .demo-dash *, .demo-pop *, .demo-freeze * { animation-duration: 5s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
  .demo-dash .kid-body { animation-name: dash-kid; }
  .demo-dash .kid-arm-l { animation-name: dash-arm-l; }
  .demo-dash .kid-arm-r { animation-name: dash-arm-r; }
  .demo-dash .kid-leg-l { animation-name: dash-leg-l; }
  .demo-dash .kid-leg-r { animation-name: dash-leg-r; }
  .demo-dash .kid-shadow { animation-name: dash-shadow; }
  .demo-dash .dash-bunny { animation-name: dash-lane; }
  .demo-dash .dash-hop { animation-name: dash-hop; }
  .demo-dash .dash-run { animation-name: dash-run; animation-timing-function: linear; }
  .demo-dash .dash-jump { animation-name: dash-jumpframe; animation-timing-function: linear; }
  .demo-dash .dash-run .run-b { animation: dash-flip 0.36s steps(1, end) infinite; }
  .demo-dash .dash-log { animation-name: dash-log; animation-timing-function: ease-in; }
  .demo-dash .dash-rock { animation-name: dash-rock; animation-timing-function: ease-in; }
  .demo-dash .dash-lane { animation: dash-lanes 0.4s linear infinite; }
  .demo-dash .dash-tuft-l { animation: dash-tuft-l 1.3s linear infinite; }
  .demo-dash .dash-tuft-r { animation: dash-tuft-r 1.3s -0.65s linear infinite; }

  /* Bubble Pop, 5 s: reach, pop, and the friend hops away. */
  .demo-pop .kid-body { animation-name: pop-kid; }
  .demo-pop .kid-arm-r { animation-name: pop-arm-r; }
  .demo-pop .kid-arm-l { animation-name: pop-arm-l; }
  .demo-pop .pop-glove { animation-name: pop-glove; }
  .demo-pop .pop-bubble { animation-name: pop-drift; animation-timing-function: ease-out; }
  .demo-pop .pop-ball { animation-name: pop-ball; }
  .demo-pop .pop-friend { animation-name: pop-friend; animation-timing-function: linear; }
  .demo-pop .pop-f0 { animation-name: pop-f0; animation-timing-function: linear; }
  .demo-pop .pop-f1 { animation-name: pop-f1; animation-timing-function: linear; }
  .demo-pop .pop-f2 { animation-name: pop-f2; animation-timing-function: linear; }
  .demo-pop .pop-spark { animation-name: pop-spark; }
  .demo-pop .pop-amb { animation: pop-amb 7s linear infinite; }

  /* Freeze Dance, 6 s: dance on the beat, then "Freeze!" */
  .demo-freeze * { animation-duration: 6s; }
  .demo-freeze .kid-body { animation-name: fd-kid; }
  .demo-freeze .kid-arm-l { animation-name: fd-arm-l; }
  .demo-freeze .kid-arm-r { animation-name: fd-arm-r; }
  .demo-freeze .fd-peng { animation-name: fd-peng; }
  .demo-freeze .fd-cheer { animation-name: fd-cheer; animation-timing-function: linear; }
  .demo-freeze .fd-dance { animation-name: fd-dance; animation-timing-function: linear; }
  .demo-freeze .fd-frozen { animation-name: fd-frozen; animation-timing-function: linear; }
  .demo-freeze .fd-ice { animation-name: fd-ice; }
  .demo-freeze .fd-frost { animation-name: fd-frost; }
  .demo-freeze .fd-call { animation-name: fd-call; }
  .demo-freeze .fd-note-a { animation-name: fd-note-a; animation-timing-function: linear; }
  .demo-freeze .fd-note-b { animation-name: fd-note-b; animation-timing-function: linear; }
  .demo-freeze .fd-flake { animation-name: fd-flake; animation-timing-function: linear; }

  .demos.is-paused * { animation-play-state: paused !important; }

  /* Try it: the pop splash and the freed friend */
  .tp-burst .tp-pop-0 { animation: tp-f0 0.5s linear forwards; }
  .tp-burst .tp-pop-1 { animation: tp-f1 0.5s linear forwards; }
  .tp-burst .tp-pop-2 { animation: tp-f2 0.5s linear forwards; }
  .tp-burst .tp-sparkle { animation: tp-spark 0.65s ease-out forwards; }
  .tp-friend { animation: tp-free 1.6s ease-in forwards; }
  .try-idle-a { animation: bob 3.6s ease-in-out infinite; }
  .try-idle-b { animation: bob 4.4s -1.2s ease-in-out infinite; }
}

@keyframes dash-kid {
  0%, 8%, 36%, 46%, 92%, 100% { transform: translate(0, 0); }
  12% { transform: translate(0, 5px); }
  20% { transform: translate(0, -22px); }
  28% { transform: translate(0, 0); }
  32% { transform: translate(0, 4px); }
  50% { transform: translate(15px, -4px); }
  54%, 84% { transform: translate(30px, 0); }
  88% { transform: translate(15px, -4px); }
}
@keyframes dash-arm-l {
  0%, 8%, 36%, 58%, 84%, 94%, 100% { transform: rotate(0deg); }
  12% { transform: rotate(-12deg); }
  20% { transform: rotate(135deg); }
  28% { transform: rotate(40deg); }
  50%, 88% { transform: rotate(28deg); }
}
@keyframes dash-arm-r {
  0%, 8%, 36%, 58%, 84%, 94%, 100% { transform: rotate(0deg); }
  12% { transform: rotate(12deg); }
  20% { transform: rotate(-135deg); }
  28% { transform: rotate(-40deg); }
  50%, 88% { transform: rotate(-28deg); }
}
@keyframes dash-leg-l {
  0%, 12%, 28%, 46%, 56%, 84%, 94%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(16deg); }
  88% { transform: rotate(14deg); }
}
@keyframes dash-leg-r {
  0%, 12%, 28%, 46%, 56%, 84%, 94%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-16deg); }
  50% { transform: rotate(-20deg); }
}
@keyframes dash-shadow {
  0%, 8%, 28%, 46%, 92%, 100% { transform: translate(0, 0) scale(1); }
  20% { transform: translate(0, 0) scale(0.6); }
  54%, 84% { transform: translate(30px, 0) scale(1); }
}
@keyframes dash-lane {
  0%, 48%, 96%, 100% { transform: translateX(0); }
  56%, 88% { transform: translateX(101%); }
}
@keyframes dash-hop {
  0%, 12%, 30%, 36%, 100% { transform: translateY(0); }
  21% { transform: translateY(-58%); }
  33% { transform: translateY(-5%); }
}
@keyframes dash-run {
  0%, 12.5%, 30.5%, 100% { opacity: 1; }
  13%, 30% { opacity: 0; }
}
@keyframes dash-jumpframe {
  0%, 12.5%, 30.5%, 100% { opacity: 0; }
  13%, 30% { opacity: 1; }
}
@keyframes dash-flip {
  0% { opacity: 0; }
  50% { opacity: 1; }
}
@keyframes dash-log {
  0% { transform: translateY(-56%) scale(0.15); opacity: 0; }
  5% { opacity: 1; }
  22% { transform: none; opacity: 1; }
  27% { opacity: 1; }
  31%, 100% { transform: translateY(14%) scale(1.3); opacity: 0; }
}
@keyframes dash-rock {
  0%, 38% { transform: translateY(-56%) scale(0.15); opacity: 0; }
  43% { opacity: 1; }
  66% { transform: none; opacity: 1; }
  71% { opacity: 1; }
  75%, 100% { transform: translateY(14%) scale(1.3); opacity: 0; }
}
@keyframes dash-lanes { to { stroke-dashoffset: -10; } }
@keyframes dash-tuft-l {
  0% { transform: translate(222%, 400%) scale(0.25); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(-40%, 1150%) scale(1.25); opacity: 1; }
}
@keyframes dash-tuft-r {
  0% { transform: translate(290%, 400%) scale(0.25); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(560%, 1150%) scale(1.25); opacity: 1; }
}

@keyframes pop-kid {
  0%, 12%, 76%, 100% { transform: rotate(0deg); }
  36%, 56% { transform: rotate(5deg); }
}
@keyframes pop-arm-r {
  0%, 12%, 76%, 100% { transform: rotate(0deg); }
  36%, 56% { transform: rotate(-122deg); }
  40% { transform: rotate(-130deg); }
}
@keyframes pop-arm-l {
  0%, 12%, 76%, 100% { transform: rotate(0deg); }
  36%, 56% { transform: rotate(14deg); }
}
@keyframes pop-glove {
  0%, 12%, 78%, 100% { transform: translate(0, 0) rotate(0deg); }
  37%, 56% { transform: translate(7%, -42%) rotate(-6deg); }
  40% { transform: translate(8%, -46%) rotate(-10deg); }
}
@keyframes pop-drift {
  0% { transform: translate(-8%, 60%); opacity: 0; }
  6% { opacity: 1; }
  20% { transform: translate(3%, 30%); }
  38%, 100% { transform: translate(0, 0); opacity: 1; }
}
@keyframes pop-ball {
  0%, 39% { transform: scale(1); opacity: 1; }
  42%, 100% { transform: scale(1.25); opacity: 0; }
}
@keyframes pop-friend {
  0%, 39% { transform: translate(0, 0); opacity: 1; }
  48% { transform: translate(-15%, 385%); }
  53% { transform: translate(-50%, 330%); }
  57% { transform: translate(-85%, 385%); }
  62% { transform: translate(-120%, 330%); }
  66% { transform: translate(-155%, 385%); }
  71% { transform: translate(-190%, 330%); }
  75% { transform: translate(-225%, 385%); opacity: 1; }
  82%, 100% { transform: translate(-240%, 385%); opacity: 0; }
}
@keyframes pop-f0 {
  0%, 38.9% { opacity: 0; transform: scale(0.6); }
  39% { opacity: 1; transform: scale(0.7); }
  42.9% { opacity: 1; transform: scale(0.85); }
  43%, 100% { opacity: 0; }
}
@keyframes pop-f1 {
  0%, 42.9% { opacity: 0; transform: scale(0.85); }
  43% { opacity: 1; transform: scale(0.9); }
  46.9% { opacity: 1; transform: scale(1); }
  47%, 100% { opacity: 0; }
}
@keyframes pop-f2 {
  0%, 46.9% { opacity: 0; transform: scale(1); }
  47% { opacity: 1; transform: scale(1); }
  53%, 100% { opacity: 0; transform: scale(1.15); }
}
@keyframes pop-spark {
  0%, 39% { opacity: 0; transform: scale(0) rotate(-40deg); }
  45% { opacity: 1; transform: scale(1.1) rotate(10deg); }
  50% { opacity: 1; transform: scale(1) rotate(0deg); }
  58%, 100% { opacity: 0; transform: scale(0.7) rotate(20deg); }
}
@keyframes pop-amb {
  0% { transform: translate(0, 90%); opacity: 0; }
  12%, 82% { opacity: 0.95; }
  50% { transform: translate(18%, -120%); }
  100% { transform: translate(0, -260%); opacity: 0; }
}

@keyframes fd-kid {
  0%, 18%, 36%, 100% { transform: translateY(0) rotate(-5deg); }
  9%, 27%, 45% { transform: translateY(0) rotate(5deg); }
  4.5%, 13.5%, 22.5%, 31.5%, 40.5%, 49.5% { transform: translateY(4px) rotate(0deg); }
  54%, 92% { transform: translateY(0) rotate(0deg); }
}
@keyframes fd-arm-l {
  0%, 36%, 100% { transform: rotate(30deg); }
  9%, 45% { transform: rotate(132deg); }
  18% { transform: rotate(40deg); }
  27% { transform: rotate(138deg); }
  54% { transform: rotate(60deg); }
  56%, 92% { transform: rotate(135deg); }
}
@keyframes fd-arm-r {
  0%, 36%, 100% { transform: rotate(-132deg); }
  9%, 45% { transform: rotate(-40deg); }
  18% { transform: rotate(-138deg); }
  27% { transform: rotate(-30deg); }
  54% { transform: rotate(-90deg); }
  56%, 92% { transform: rotate(-95deg); }
}
@keyframes fd-peng {
  0%, 18%, 36%, 100% { transform: translateY(0) rotate(-6deg); }
  9%, 27%, 45% { transform: translateY(0) rotate(6deg); }
  4.5%, 13.5%, 22.5%, 31.5%, 40.5%, 49.5% { transform: translateY(-5%) rotate(0deg); }
  54%, 94% { transform: translateY(0) rotate(0deg); }
}
@keyframes fd-cheer {
  0%, 8.9%, 18%, 26.9%, 36%, 44.9%, 95%, 100% { opacity: 1; }
  9%, 17.9%, 27%, 35.9%, 45%, 94.9% { opacity: 0; }
}
@keyframes fd-dance {
  0%, 8.9%, 18%, 26.9%, 36%, 44.9%, 54.5%, 100% { opacity: 0; }
  9%, 17.9%, 27%, 35.9%, 45%, 54.4% { opacity: 1; }
}
@keyframes fd-frozen {
  0%, 54.4%, 95%, 100% { opacity: 0; }
  54.5%, 94.9% { opacity: 1; }
}
@keyframes fd-ice {
  0%, 55% { opacity: 0; transform: translateX(-50%) scale(0.6); }
  60% { opacity: 0.75; transform: translateX(-50%) scale(1.05); }
  63%, 90% { opacity: 0.72; transform: translateX(-50%) scale(1); }
  95%, 100% { opacity: 0; transform: translateX(-50%) scale(1.1); }
}
@keyframes fd-frost {
  0%, 54%, 97%, 100% { opacity: 0; }
  60%, 90% { opacity: 1; }
}
@keyframes fd-call {
  0%, 53% { transform: translateX(-50%) scale(0); }
  57% { transform: translateX(-50%) scale(1.15); }
  60%, 88% { transform: translateX(-50%) scale(1); }
  92%, 100% { transform: translateX(-50%) scale(0); }
}
@keyframes fd-note-a {
  0% { transform: translateY(60%) rotate(-8deg); opacity: 0; }
  4%, 22% { opacity: 1; }
  26% { transform: translateY(-150%) rotate(8deg); opacity: 0; }
  27% { transform: translateY(60%) rotate(-8deg); opacity: 0; }
  31%, 47% { opacity: 1; }
  51% { transform: translateY(-150%) rotate(8deg); opacity: 0; }
  100% { transform: translateY(-150%); opacity: 0; }
}
@keyframes fd-note-b {
  0%, 12% { transform: translateY(60%) rotate(8deg); opacity: 0; }
  16%, 34% { opacity: 1; }
  38% { transform: translateY(-150%) rotate(-8deg); opacity: 0; }
  39% { transform: translateY(60%) rotate(8deg); opacity: 0; }
  43%, 50% { opacity: 1; }
  54%, 100% { transform: translateY(-70%) rotate(-8deg); opacity: 0; }
}
@keyframes fd-flake {
  0%, 56% { transform: translateY(-60%) rotate(0deg); opacity: 0; }
  62%, 86% { opacity: 1; }
  92%, 100% { transform: translateY(80%) rotate(120deg); opacity: 0; }
}

@keyframes tp-f0 { 0%, 30% { opacity: 1; transform: scale(0.8); } 31%, 100% { opacity: 0; } }
@keyframes tp-f1 { 0%, 30% { opacity: 0; } 31%, 62% { opacity: 1; transform: scale(0.95); } 63%, 100% { opacity: 0; } }
@keyframes tp-f2 { 0%, 62% { opacity: 0; } 63% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); } }
@keyframes tp-spark {
  0% { opacity: 0; transform: scale(0) rotate(-40deg); }
  35% { opacity: 1; transform: scale(1.1) rotate(10deg); }
  100% { opacity: 0; transform: scale(0.8) rotate(25deg); }
}
@keyframes tp-free {
  0% { transform: translate(0, 0); }
  30% { transform: translate(0, var(--fall)); }
  40% { transform: translate(calc(var(--dir) * 22px), calc(var(--fall) - 20px)); }
  50% { transform: translate(calc(var(--dir) * 44px), var(--fall)); }
  60% { transform: translate(calc(var(--dir) * 66px), calc(var(--fall) - 20px)); }
  70% { transform: translate(calc(var(--dir) * 88px), var(--fall)); opacity: 1; }
  100% { transform: translate(calc(var(--dir) * 150px), var(--fall)); opacity: 0; }
}

/* made for little kids */

.kids { overflow: hidden; }
.kids .wrap { position: relative; }
.kids-chick {
  position: absolute;
  top: -1.5rem;
  right: var(--gutter);
  width: clamp(90px, 12vw, 150px);
  transform: rotate(8deg);
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li {
  padding: 1.5rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--paper);
}
.features h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.features p { margin: 0; color: var(--ink-soft); }
.feature-icon { width: 3.2rem; height: 3.2rem; border-radius: 16px; margin-bottom: 0.85rem; }
.feature-icon .icon { width: 1.75rem; height: 1.75rem; }

@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .kids-chick { display: none; }
}

/* privacy band */

.privacy-band {
  margin-inline: clamp(0px, 1.5vw, 20px);
  border-radius: var(--radius-l);
  background:
    radial-gradient(circle at 12% 18%, rgba(91, 188, 244, 0.35), transparent 42%),
    radial-gradient(circle at 92% 90%, rgba(98, 194, 63, 0.25), transparent 45%),
    var(--night);
  color: #fff;
}
.privacy-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem 3.5rem;
  align-items: center;
}
.privacy-band h2 { color: #fff; }
.privacy-band .section-lead { color: #dcecfb; margin-bottom: 1.6rem; }
.shield {
  display: grid;
  place-items: center;
  width: 4.2rem;
  height: 4.2rem;
  margin-bottom: 1.2rem;
  border-radius: 22px;
  background: var(--sun);
  color: var(--ink);
}
.shield .icon { width: 2.4rem; height: 2.4rem; }
.privacy-points {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.privacy-points li {
  display: flex;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
}
.privacy-points .icon { width: 2rem; height: 2rem; color: var(--sun); margin-top: 0.1rem; }
.privacy-points h3 { font-size: 1.2rem; margin-bottom: 0.2rem; color: #fff; }
.privacy-points p { margin: 0; color: #dcecfb; }
.privacy-band :focus-visible, .site-footer :focus-visible { outline-color: var(--sun); }

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

/* faq */

.faq-wrap { max-width: 52rem; }
.faq-list { display: grid; gap: 0.8rem; }
.faq details {
  border: 2px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}
.faq details[open] { border-color: var(--sun); box-shadow: 0 4px 0 var(--sun-light); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
  border-radius: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon {
  width: 2rem;
  height: 2rem;
  padding: 0.45rem;
  border-radius: 50%;
  background: var(--sun-pale);
  color: var(--ink);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.faq details[open] summary .icon { transform: rotate(45deg); background: var(--sun); }
.faq .answer { padding: 0 1.25rem 1.1rem; color: var(--ink-soft); }
.faq .answer p { margin: 0; }
.faq-more { margin-top: 1.6rem; text-align: center; font-weight: 600; color: var(--ink-soft); }

/* call to action */

.cta { padding-top: 0; }
.cta-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-l);
  background: var(--sun);
  box-shadow: 0 6px 0 #e8b812;
}
.cta-card > div { flex: 1 1 18rem; }
.cta-card h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 0.25rem; }
.cta-card p { margin: 0; font-weight: 700; font-size: 1.1rem; }
.cta-icon { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 4px 0 rgba(42, 34, 56, 0.2); }

/* ---------- prose pages (privacy, support) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(4.5rem, 8vw, 6rem);
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-mid) 100%);
  border-radius: 0 0 var(--radius-l) var(--radius-l);
}
.page-hero .wrap { position: relative; z-index: 2; max-width: calc(48rem + 2 * var(--gutter)); }
.page-hero h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); margin-bottom: 0.2em; }
.page-hero .eyebrow { background: rgba(255, 255, 255, 0.85); }
.page-meta { margin: 0; font-weight: 700; }
.page-hero .cloud-a { top: auto; bottom: 10%; left: auto; right: -40px; width: clamp(140px, 20vw, 240px); }

.prose {
  position: relative;
  z-index: 3;
  max-width: 48rem;
  margin: -3rem auto clamp(3rem, 7vw, 5rem);
  padding: clamp(1.4rem, 4.5vw, 3rem);
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow-sticker), var(--shadow-soft);
  width: calc(100% - 2 * var(--gutter));
}
.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(1.55rem, 3vw, 1.95rem);
  scroll-margin-top: 1rem;
}
.prose h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.35rem;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: var(--sun);
}
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; scroll-margin-top: 1rem; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5rem; padding-left: 0.2rem; }
.prose li::marker { color: var(--red-deep); font-weight: 800; }
.prose strong { color: var(--ink); }
.prose p, .prose li { color: #3a3249; }
.prose .contact-card {
  display: inline-block;
  padding: 1rem 1.3rem;
  border-radius: 18px;
  background: var(--sun-pale);
  border: 2px solid var(--sun-light);
}
.prose .lead-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.4rem 0 0.5rem; }
.prose .lead-actions .btn { color: var(--ink); }
.prose a.email { font-weight: 800; }

/* ---------- 404 ---------- */

.hero-404 { min-height: 70vh; }
.nf-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  align-items: center;
  gap: 1.5rem 3rem;
  padding-bottom: clamp(6rem, 12vw, 10rem);
}
.nf-bunny { width: min(100%, 260px); justify-self: center; transform: rotate(-8deg); }
.nf-sr {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  max-width: 34rem;
}
.nf-sr p { margin-bottom: 0.3rem; }
@media (max-width: 700px) {
  .nf-grid { grid-template-columns: 1fr; }
  .nf-bunny { width: 150px; }
}

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

.site-footer {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  background: var(--ink);
  color: #f3eee6;
}
.site-footer a { color: #fff; }
.site-footer .brand { color: #fff; margin-bottom: 0.9rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand p { max-width: 24rem; color: #d9d1e6; margin: 0; }
.footer-links h2 {
  font-size: 1.05rem;
  color: var(--sun);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}
.footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a { text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.footer-links a:hover { text-decoration: underline; }
.footer-fine {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.88rem;
  color: #cfc6dc;
}
.footer-fine p { margin: 0 0 0.4rem; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- motion (only when wanted) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-bunny { animation: bob 3.4s ease-in-out infinite; }
  .hero-star { animation: twinkle 4s ease-in-out infinite; }
  .cloud-a { animation: drift 26s ease-in-out infinite alternate; }
  .cloud-b { animation: drift 32s ease-in-out infinite alternate-reverse; }
  .game-card:hover { transform: translateY(-4px) rotate(-0.4deg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-1.5deg); }
}
@keyframes twinkle {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.08); }
}
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(60px); }
}

@media print {
  .site-header, .site-footer, .hills, .cloud, .hero-art { display: none; }
  .prose { box-shadow: none; margin-top: 0; }
}
