/* ============ Landing page — faithful port of the v0 design ============
 * Vanilla CSS (no Tailwind/build) so the toy stays offline-first.
 * Palette + layout mirror the v0 export (oklch brand colors, Baloo headings).
 */
:root {
  --jungle: oklch(0.62 0.13 162);
  --jungle-light: oklch(0.78 0.16 162);
  --jungle-dark: #0e6e52;
  --water: oklch(0.79 0.10 230);
  --sun: oklch(0.88 0.16 92);
  --coral: oklch(0.72 0.17 35);
  --coral-shadow: rgb(190, 80, 50);
  --cream: oklch(0.97 0.02 95);
  --card: oklch(0.99 0.01 95);
  --foreground: oklch(0.32 0.05 165);
  --muted-fg: oklch(0.50 0.04 160);
  --secondary: oklch(0.92 0.04 120);
  --secondary-fg: oklch(0.35 0.06 165);
  --border: oklch(0.88 0.03 130);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; }
body {
  min-height: 100dvh;
  background: var(--cream);
  color: var(--foreground);
  -webkit-user-select: none; user-select: none;
  overflow-x: hidden;
}
.font-heading {
  font-family: "Baloo 2", "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
  font-weight: 800;
}
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

/* ---------- Start gate (kept, restyled to match) ---------- */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh;
  background: radial-gradient(circle at 50% 30%, var(--jungle-light), var(--jungle));
  text-align: center;
}
.gate-mascot { width: clamp(150px, 42vw, 280px); animation: bob 5s ease-in-out infinite; }
.gate-title {
  color: #fff; line-height: .9; letter-spacing: .5px;
  text-shadow: 0 4px 0 rgba(0,0,0,.16), 0 8px 18px rgba(0,0,0,.18);
}
.gate-title .small { display: block; font-size: clamp(22px, 7vw, 40px); }
.gate-title .big { display: block; font-size: clamp(48px, 15vw, 104px); }
.big-start {
  width: clamp(108px, 28vw, 160px); height: clamp(108px, 28vw, 160px); border-radius: 50%; border: none; cursor: pointer;
  background: var(--coral); color: #fff; font-size: clamp(46px, 13vw, 72px);
  box-shadow: 0 10px 0 var(--coral-shadow), 0 14px 26px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; padding-left: 8px;
  animation: pulse 1.6s ease-in-out infinite;
}
.big-start:active { transform: translateY(6px); box-shadow: 0 4px 0 var(--coral-shadow); }
.gate-hint { color: #eafff5; font-size: clamp(15px, 4.5vw, 22px); font-weight: 700; opacity: .92; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in oklab, var(--water) 40%, transparent), var(--cream) 55%, var(--cream));
  padding: clamp(24px, 5vw, 48px) 20px clamp(28px, 6vw, 64px);
}
.sun {
  position: absolute; right: -64px; top: -64px; width: clamp(200px, 40vw, 320px); height: clamp(200px, 40vw, 320px);
  border-radius: 50%; background: var(--sun); filter: blur(2px); pointer-events: none;
  animation: sun-breathe 14s ease-in-out infinite;
}
.sun.small { width: clamp(150px, 30vw, 224px); height: clamp(150px, 30vw, 224px); right: -40px; top: -40px;
  background: color-mix(in oklab, var(--sun) 70%, transparent); animation: none; }
@keyframes sun-breathe { 0%,100%{transform:scale(1) rotate(0)} 50%{transform:scale(1.06) rotate(8deg)} }

.hero-inner { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-mascot { width: clamp(200px, 56vw, 320px); animation: bob 5s ease-in-out infinite; }
.hero-title { margin-top: 14px; line-height: .9; color: var(--jungle); }
.hero-title .small { display: block; font-size: clamp(22px, 5vw, 34px); }
.hero-title .big { display: block; font-size: clamp(50px, 13vw, 110px); }
.hero-tagline {
  margin-top: 16px; max-width: 32rem; font-size: clamp(17px, 3.5vw, 22px); font-weight: 700; color: var(--muted-fg);
}
.play-btn {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  border: none; border-radius: 999px; background: var(--coral); color: #fff;
  padding: clamp(16px, 3vw, 20px) clamp(32px, 7vw, 44px); font-size: clamp(22px, 5vw, 30px);
  box-shadow: 0 10px 0 var(--coral-shadow); transition: transform .15s, box-shadow .15s;
}
.play-btn:hover { transform: translateY(-2px); }
.play-btn:active { transform: translateY(4px); box-shadow: 0 4px 0 var(--coral-shadow); }
.play-btn svg { width: clamp(26px, 6vw, 32px); height: auto; }

/* ---------- Reassurance strip ---------- */
.reassure {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 60%, transparent);
}
.reassure ul {
  list-style: none; max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center; gap: 12px; padding: 18px 20px;
}
.reassure li {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  background: var(--secondary); color: var(--secondary-fg); padding: 9px 16px; font-weight: 800; font-size: clamp(13px, 3vw, 15px);
}
.reassure svg { width: 17px; height: 17px; color: var(--jungle); }

/* ---------- Game grid ---------- */
.games { max-width: 1024px; margin: 0 auto; padding: clamp(36px, 6vw, 64px) 20px; }
.games-heading { text-align: center; color: var(--jungle); font-size: clamp(28px, 6vw, 40px); margin-bottom: 28px; }
.game-list {
  list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (min-width: 640px) { .game-list { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.game-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  aspect-ratio: 1; border-radius: 2rem; padding: 16px; text-align: center;
  box-shadow: 0 10px 0 rgba(14,70,52,0.18); transition: transform .18s, box-shadow .18s;
  color: #fff;
}
.game-card:hover { transform: translateY(-8px); }
.game-card:active { transform: translateY(2px) scale(.97); box-shadow: 0 4px 0 rgba(14,70,52,0.18); }
.game-card .emoji { font-size: clamp(44px, 12vw, 64px); filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); transition: transform .2s; }
.game-card:hover .emoji { transform: scale(1.1); }
.game-card .label { font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; font-size: clamp(19px, 4.5vw, 24px); text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.game-card .hint { font-size: clamp(11px, 2.8vw, 14px); font-weight: 700; color: rgba(255,255,255,.85); }

/* per-game gradients (ported from v0 oklch) */
.g-sing  { background: linear-gradient(135deg, oklch(0.78 0.16 162), oklch(0.62 0.13 162)); }
.g-tap   { background: linear-gradient(135deg, oklch(0.70 0.14 150), oklch(0.55 0.12 158)); }
.g-count { background: linear-gradient(135deg, oklch(0.82 0.10 230), oklch(0.66 0.12 240)); }
.g-memory{ background: linear-gradient(135deg, oklch(0.80 0.12 205), oklch(0.62 0.13 220)); }
.g-pop   { background: linear-gradient(135deg, oklch(0.88 0.16 92),  oklch(0.78 0.16 70)); }
.g-peek  { background: linear-gradient(135deg, oklch(0.86 0.13 120), oklch(0.72 0.15 135)); }
.g-music { background: linear-gradient(135deg, oklch(0.78 0.16 55),  oklch(0.72 0.17 35)); }
.g-dress { background: linear-gradient(135deg, oklch(0.75 0.16 30),  oklch(0.66 0.16 20)); }
.g-paint { background: linear-gradient(135deg, oklch(0.82 0.14 75),  oklch(0.72 0.16 45)); }
.g-keys  { background: linear-gradient(135deg, oklch(0.74 0.13 300), oklch(0.60 0.14 295)); }
.g-fireworks { background: linear-gradient(135deg, oklch(0.55 0.15 280), oklch(0.40 0.12 270)); }
.g-smash { background: linear-gradient(135deg, oklch(0.78 0.17 20),  oklch(0.66 0.18 10)); }
.g-match { background: linear-gradient(135deg, oklch(0.74 0.15 190), oklch(0.60 0.13 200)); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: color-mix(in oklab, var(--card) 60%, transparent);
  padding: 32px 20px;
}
.site-footer .inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.parents-link { border-radius: 999px; padding: 8px 16px; font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; color: var(--jungle); }
.parents-link:hover { text-decoration: underline; }
.made-with { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted-fg); }
.made-with svg { width: 16px; height: 16px; color: var(--coral); fill: var(--coral); }

/* ---------- Floating bubbles (hero) ---------- */
.bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.croc-bubble {
  position: absolute; bottom: -10%; border-radius: 50%; background: var(--water);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.45); animation: croc-drift linear infinite;
}
@keyframes croc-drift {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10% { opacity: .7; }
  90% { opacity: .5; }
  100% { transform: translateY(-110vh) translateX(var(--drift, 20px)) scale(1.15); opacity: 0; }
}

/* ---------- Language toggle (top-right) — segmented FR | EN ---------- */
.lang-fab {
  position: fixed; top: 14px; right: 14px; z-index: 40;
  border: none; cursor: pointer; background: #fff; color: var(--jungle);
  font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800;
  height: 48px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.18);
  display: inline-flex; align-items: center; gap: 3px; padding: 0 6px;
}
.lang-fab:active { transform: scale(.94); }
.lang-fab .lang-seg {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 38px; border-radius: 999px;
  font-size: 16px; color: #9fb3aa; transition: background .15s, color .15s;
}
.lang-fab .lang-seg.on { background: var(--jungle); color: #fff; }

@keyframes bob { 0%,100%{transform:translateY(0) rotate(-1.5deg)} 50%{transform:translateY(-14px) rotate(1.5deg)} }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .croc-bubble { opacity: .25 !important; }
}
