/* Game for Kids landing. Tokens from research/05-visual-design.md. */
@font-face { font-family: "Baloo"; src: url("fonts/baloo-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Baloo"; src: url("fonts/baloo-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Baloo"; src: url("fonts/baloo-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  --cream: #FFF8EC;
  --sky-bg: #DDF1FF;
  --lilac-bg: #F1EDFF;
  --ink: #2B2D5C;
  --ink-soft: #565A85;
  --grape: #6C4CE0; --grape-edge: #4D36A1;
  --sun: #FFC93C;   --sun-edge: #C9962A;
  --berry: #D12A63; --leaf: #23803A; --sky: #1871C9; --teal: #0B7A7A; --tangerine: #FF8A1F;
  --r-sm: 12px; --r-md: 20px; --r-lg: 28px; --r-card: 32px; --r-pill: 9999px;
  --shadow-soft: 0 1px 2px rgba(43,45,92,.08), 0 4px 12px rgba(43,45,92,.08), 0 16px 32px rgba(43,45,92,.08);
  --shadow-sticker: 8px 8px 0 rgba(43,45,92,.14);
  --fs-hero: clamp(2.4rem, 1rem + 5.2vw, 4.6rem);
  --fs-h2: clamp(1.8rem, 1rem + 2.6vw, 3rem);
  --fs-body: clamp(1.02rem, .96rem + .3vw, 1.15rem);
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Baloo", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--grape); }
h1, h2, h3 { font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: inherit; font-weight: 800; font-size: 1.12rem; text-decoration: none;
  padding: .78em 1.5em; border-radius: var(--r-pill); border: 0; cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease;
  white-space: nowrap;
}
.btn-3d { background: var(--grape); color: #fff; box-shadow: 0 6px 0 var(--grape-edge), 0 12px 22px rgba(43,45,92,.22); }
.btn-3d:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--grape-edge), 0 16px 26px rgba(43,45,92,.24); }
.btn-3d:active { transform: translateY(6px); box-shadow: 0 0 0 var(--grape-edge), 0 2px 6px rgba(43,45,92,.2); }
.btn-sun { background: var(--sun); color: var(--ink); box-shadow: 0 6px 0 var(--sun-edge), 0 12px 22px rgba(43,45,92,.18); }
.btn-sun:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--sun-edge), 0 16px 26px rgba(43,45,92,.2); }
.btn-sun:active { transform: translateY(6px); box-shadow: 0 0 0 var(--sun-edge); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px #E6E0F5, 0 6px 0 #E6E0F5; }
.btn-ghost:active { transform: translateY(6px); box-shadow: inset 0 0 0 2px #E6E0F5; }
.btn-sm { font-size: 1rem; padding: .55em 1.1em; }
.btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,248,236,.86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(43,45,92,.06); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 3px 0 rgba(43,45,92,.12); }
.wordmark { font-weight: 800; font-size: 1.5rem; letter-spacing: .01em; white-space: nowrap; }
.wordmark span:nth-child(6n+1) { color: #FF5D73; } .wordmark span:nth-child(6n+2) { color: #FFA41B; }
.wordmark span:nth-child(6n+3) { color: #2FB45A; } .wordmark span:nth-child(6n+4) { color: #3D8BFF; }
.wordmark span:nth-child(6n+5) { color: #8B5CF6; } .wordmark span:nth-child(6n+6) { color: #14B8C9; }
.nav-links { display: flex; align-items: center; gap: 22px; font-weight: 600; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--grape); }
.lang { display: inline-flex; border-radius: var(--r-pill); background: #fff; box-shadow: inset 0 0 0 2px #EEE8F7; padding: 3px; }
.lang a { padding: 2px 10px; border-radius: var(--r-pill); font-weight: 800; font-size: .9rem; text-decoration: none; color: var(--ink-soft); }
.lang a[aria-current="true"] { background: var(--grape); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(70px, 9vw, 120px); background: linear-gradient(180deg, var(--cream) 0%, #FFF2DA 100%); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.eyebrow { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: var(--r-pill); padding: 4px 12px; font-weight: 700; font-size: .92rem; box-shadow: 0 3px 0 rgba(43,45,92,.08); }
.hero h1 { font-size: var(--fs-hero); }
.hero h1 em { font-style: normal; color: var(--grape); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .22em; background: var(--sun); border-radius: 99px; z-index: -1; opacity: .8; }
.lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.32rem); color: var(--ink-soft); max-width: 34ch; margin: 18px 0 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.store { display: inline-flex; align-items: center; gap: 10px; background: #111; color: #fff; border-radius: 12px; padding: 7px 14px; line-height: 1.1; }
.store svg { width: 22px; height: 22px; fill: #fff; }
.store small { display: block; font-size: .7rem; opacity: .75; font-weight: 600; }
.store b { font-weight: 800; font-size: 1.02rem; }

.stage { position: relative; }
.blob { position: absolute; inset: -6% -4% -8% -2%; background: linear-gradient(135deg, #BFE3FF, #E3D8FF); border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%; animation: morph 14s ease-in-out infinite; z-index: 0; }
.device { position: relative; z-index: 1; background: #22243F; border-radius: 34px; padding: 14px; box-shadow: 0 30px 60px rgba(43,45,92,.28), inset 0 0 0 2px #3A3D66; transform: rotate(-3deg); }
.device img { border-radius: 22px; width: 100%; aspect-ratio: 20 / 9; object-fit: cover; }
.floaty { position: absolute; z-index: 2; font-size: clamp(2rem, 1.2rem + 2.4vw, 3.4rem); filter: drop-shadow(0 8px 10px rgba(43,45,92,.2)); animation: float 4.5s ease-in-out infinite; }
.f1 { left: -4%; top: -10%; } .f2 { right: -2%; top: -14%; animation-delay: -1.5s; } .f3 { right: 6%; bottom: -16%; animation-delay: -3s; } .f4 { left: 8%; bottom: -18%; animation-delay: -2.2s; }

/* ---------- Waves ---------- */
.wave { display: block; width: 100%; height: clamp(40px, 6vw, 90px); }
.wave-sky { fill: var(--sky-bg); } .wave-cream { fill: var(--cream); } .wave-lilac { fill: var(--lilac-bg); } .wave-grape { fill: var(--grape); }

/* ---------- Sections ---------- */
section { position: relative; }
.pad { padding: clamp(56px, 8vw, 104px) 0; }
.bg-sky { background: var(--sky-bg); } .bg-lilac { background: var(--lilac-bg); } .bg-grape { background: var(--grape); color: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { color: var(--ink-soft); margin: 12px 0 0; }
.kicker { display: inline-block; font-weight: 800; color: var(--grape); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin-bottom: 8px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat { background: #fff; border-radius: var(--r-lg); padding: 18px 14px; text-align: center; box-shadow: var(--shadow-sticker); }
.stat b { display: block; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 800; line-height: 1; }
.stat span { color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.stat:nth-child(1) b { color: var(--berry); } .stat:nth-child(2) b { color: var(--sky); } .stat:nth-child(3) b { color: var(--leaf); }
.stat:nth-child(4) b { color: var(--grape); } .stat:nth-child(5) b { color: var(--teal); }

.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.game { background: #fff; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-sticker); transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.game:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 10px 12px 0 rgba(43,45,92,.16); }
.game figure { margin: 0; background: var(--tint, #EEF3FF); padding: 12px 12px 0; }
.game figure img { border-radius: 18px 18px 0 0; aspect-ratio: 20 / 9; object-fit: cover; width: 100%; }
.game .body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game h3 { font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.game h3 .ico { font-size: 1.5rem; }
.game p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.45; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.tag { font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: var(--r-pill); background: #EEF0F7; color: var(--ink-soft); }
.tag.free { background: #DDF5E3; color: var(--leaf); } .tag.pro { background: #FFE9C7; color: #8A5300; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split h2 { font-size: var(--fs-h2); }
.split p { color: var(--ink-soft); }
.split ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.split li { display: flex; gap: 10px; align-items: flex-start; }
.split li::before { content: "✓"; flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #DDF5E3; color: var(--leaf); font-weight: 800; }
.frame { background: #22243F; border-radius: 28px; padding: 12px; box-shadow: 0 24px 48px rgba(43,45,92,.22); }
.frame img { border-radius: 18px; aspect-ratio: 20 / 9; object-fit: cover; }
.frame.tilt-r { transform: rotate(2deg); } .frame.tilt-l { transform: rotate(-2deg); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { background: #fff; border-radius: var(--r-card); padding: 26px 22px; box-shadow: var(--shadow-soft); position: relative; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -18px; left: 22px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); font-weight: 800; box-shadow: 0 4px 0 var(--sun-edge); }
.step .big { font-size: 2.6rem; }
.step h3 { font-size: 1.35rem; margin: 6px 0 4px; }
.step p { margin: 0; color: var(--ink-soft); }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust div { background: #fff; border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-soft); }
.trust .e { font-size: 2rem; }
.trust strong { display: block; font-size: 1.2rem; margin: 6px 0 2px; }
.trust p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.price { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { background: #fff; border-radius: var(--r-card); padding: 26px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 8px; border: 3px solid transparent; }
.plan.best { border-color: var(--grape); position: relative; transform: translateY(-8px); }
.plan.best .ribbon { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--berry); color: #fff; font-weight: 800; font-size: .85rem; padding: 3px 14px; border-radius: var(--r-pill); }
.plan h3 { font-size: 1.4rem; }
.plan .amt { font-weight: 800; font-size: 1.6rem; color: var(--grape); }
.plan ul { padding-left: 1.1em; margin: 0; color: var(--ink-soft); }

.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: #fff; border-radius: var(--r-md); padding: 16px 22px; margin-bottom: 12px; box-shadow: var(--shadow-soft); }
.faq summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--grape); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; color: var(--ink-soft); }

.final { text-align: center; }
.final h2 { font-size: var(--fs-h2); color: #fff; }
.final p { opacity: .9; margin: 10px auto 26px; max-width: 46ch; }
.final .mascot { font-size: 4rem; display: inline-block; animation: float 4s ease-in-out infinite; }

footer { background: #2B2D5C; color: #CFD2EE; padding: 40px 0 48px; font-size: .95rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: #fff; text-decoration: none; margin-inline-end: 16px; }
footer a:hover { text-decoration: underline; }

/* ---------- Document pages (privacy) ---------- */
.doc { max-width: 760px; padding: 40px 0 64px; }
.doc h1 { font-size: var(--fs-h2); }
.doc h2 { font-size: 1.4rem; margin-top: 28px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc .card { background: #fff; border-radius: var(--r-lg); padding: 24px 28px; box-shadow: var(--shadow-soft); }

/* ---------- Motion ---------- */
@keyframes morph { 50% { border-radius: 40% 60% 58% 42% / 45% 58% 42% 55%; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .games { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .trust, .price { grid-template-columns: 1fr 1fr; }
  .plan.best { transform: none; }
}
@media (max-width: 760px) {
  .nav-links a:not(.btn), .nav-links .lang { display: none; }
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .split .visual { order: -1; }
  .games, .steps, .trust, .price { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:last-child { grid-column: span 2; }
  .nav .btn-sm { font-size: .9rem; padding: .5em .9em; }
  .device { transform: rotate(-2deg); }
  .wordmark { font-size: 1.25rem; }
}
