/* VOICE   occasion: a children's game shelf, bright and gentle, few words
   IDEA    a picture-book hillside; each game is a big toy card resting on the grass
   PICTURE sky with sun (moon and stars at night), drifting clouds, rolling hills; card art drawn per game
   COLOUR  sky blue ground, grass green, sun yellow, one pink accent for "Play"; night is the same hill under a deep sky
   TYPE    Fredoka (self-hosted, rounded) for everything; four sizes
   LAYOUT  laptop: title in the sky, cards in a row on the grass, grown-ups band below
           phone: same order stacked, one card per row, buttons full width */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/fredoka-latin.woff2") format("woff2");
}

/* Day palette (default) */
:root {
  color-scheme: light;
  --sky-top: #46b9fb;
  --sky-bottom: #bde9ff;
  --sun: #ffd23f;
  --sun-light: #ffe98f;
  --rays: #ffc21a;
  --crater: transparent;
  --star: transparent;
  --cloud: #ffffff;
  --hill-far: #8fe08a;
  --hill-near: #5ccf68;
  --grass: #5ccf68;
  --grass-deep: #3fb457;
  --card: #ffffff;
  --card-ink: #17324d;
  --muted: #4a6177;
  --ink: #0f2a42;
  --hero-ink: #0f2a42;
  --pink: #ff4f86;
  --pink-deep: #e23a70;
  --chip: #eef8ff;
  --band: #fff9ec;
  --band-ink: #2a2118;
  --band-muted: #6a5a48;
  --foot: #3fb457;
  --foot-ink: #08351a;
  --focus: #0b63ce;
  --shadow: rgba(16, 66, 30, 0.22);
  --art-pink: #ffe0ea;
  --art-blue: #e3f3ff;
}

/* Night palette: system dark mode, unless a light theme is forced */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --sky-top: #141c47;
    --sky-bottom: #33407d;
    --sun: #fff4c9;
    --sun-light: #fffbe8;
    --rays: transparent;
    --crater: #ebdfae;
    --star: #ffffff;
    --cloud: #4b5893;
    --hill-far: #2f6f55;
    --hill-near: #245c45;
    --grass: #245c45;
    --grass-deep: #1b4a37;
    --card: #1f2a57;
    --card-ink: #f3f6ff;
    --muted: #c4cdf0;
    --ink: #f3f6ff;
    --hero-ink: #ffffff;
    --pink: #ff6c99;
    --pink-deep: #ff4f86;
    --chip: #2c3a72;
    --band: #161d3f;
    --band-ink: #eef1ff;
    --band-muted: #bfc7ea;
    --foot: #1b4a37;
    --foot-ink: #d9f5e3;
    --focus: #9cc8ff;
    --shadow: rgba(0, 0, 0, 0.4);
  --art-pink: #3b3170;
  --art-blue: #2a3a78;
  }
}

/* Same night palette when a viewer forces dark */
:root[data-theme="dark"] {
  color-scheme: dark;
  --sky-top: #141c47;
  --sky-bottom: #33407d;
  --sun: #fff4c9;
  --sun-light: #fffbe8;
  --rays: transparent;
  --crater: #ebdfae;
  --star: #ffffff;
  --cloud: #4b5893;
  --hill-far: #2f6f55;
  --hill-near: #245c45;
  --grass: #245c45;
  --grass-deep: #1b4a37;
  --card: #1f2a57;
  --card-ink: #f3f6ff;
  --muted: #c4cdf0;
  --ink: #f3f6ff;
  --hero-ink: #ffffff;
  --pink: #ff6c99;
  --pink-deep: #ff4f86;
  --chip: #2c3a72;
  --band: #161d3f;
  --band-ink: #eef1ff;
  --band-muted: #bfc7ea;
  --foot: #1b4a37;
  --foot-ink: #d9f5e3;
  --focus: #9cc8ff;
  --shadow: rgba(0, 0, 0, 0.4);
  --art-pink: #3b3170;
  --art-blue: #2a3a78;
}

* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grass);
  color: var(--ink);
  font: 17px/1.5 "Fredoka", ui-rounded, "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; border-radius: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Sky ---------- */
.sky {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  padding: max(14px, env(safe-area-inset-top)) max(5vw, 16px, env(safe-area-inset-right)) 0 max(5vw, 16px, env(safe-area-inset-left));
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars circle { fill: var(--star); }
.sun { position: absolute; top: clamp(56px, 9vw, 70px); right: clamp(12px, 8vw, 140px); width: clamp(84px, 14vw, 150px); height: auto; }
.rays path { stroke: var(--rays); stroke-width: 7; stroke-linecap: round; fill: none; }
.disc { fill: var(--sun); }
.disc-light { fill: var(--sun-light); opacity: 0.7; }
.craters circle { fill: var(--crater); }
.cloud { position: absolute; fill: var(--cloud); height: auto; }
.c1 { width: clamp(110px, 16vw, 210px); top: 92px; left: -2%; opacity: 0.95; }
.c2 { width: clamp(80px, 11vw, 150px); top: 40%; left: 58%; opacity: 0.85; }
.c3 { width: clamp(70px, 9vw, 130px); top: 26%; left: 30%; opacity: 0.7; }
@media (prefers-reduced-motion: no-preference) {
  .c1 { animation: drift 38s ease-in-out infinite alternate; }
  .c2 { animation: drift 46s ease-in-out infinite alternate-reverse; }
  .c3 { animation: drift 54s ease-in-out infinite alternate; }
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(6vw); } }

.top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1240px;
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--hero-ink);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  min-height: 44px;
}
.mark { width: 44px; height: 44px; flex: none; }
.mark-bg { fill: var(--pink); }
.mark-star { fill: #fff; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }

.langs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}
:root[data-theme="dark"] .langs { background: rgba(20, 28, 71, 0.55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .langs { background: rgba(20, 28, 71, 0.55); } }
.langs button {
  min-width: 48px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--hero-ink);
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--card); color: var(--card-ink); box-shadow: 0 2px 6px var(--shadow); }

.hero {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(36px, 7vw, 84px) 0 clamp(10px, 2vw, 20px);
}
.hero h1 {
  font-size: clamp(52px, 12vw, 104px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hero-ink);
  max-width: 11ch;
  text-wrap: balance;
}
.lede {
  margin-top: 14px;
  font-size: clamp(19px, 2.6vw, 24px);
  line-height: 1.35;
  font-weight: 500;
  color: var(--hero-ink);
  max-width: 26ch;
  text-wrap: balance;
}
.hills { display: block; width: calc(100% + 2 * max(5vw, 16px)); height: clamp(70px, 11vw, 160px); margin: 0 calc(-1 * max(5vw, 16px)); position: relative; z-index: 1; }
.hill-far { fill: var(--hill-far); }
.hill-near { fill: var(--hill-near); }

/* ---------- Games on the grass ---------- */
.meadow {
  background: var(--grass);
  padding: 4px max(5vw, 16px, env(safe-area-inset-right)) clamp(40px, 6vw, 72px) max(5vw, 16px, env(safe-area-inset-left));
}
.cards {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(18px, 3vw, 32px);
  align-items: stretch;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  color: var(--card-ink);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 10px 0 var(--grass-deep), 0 18px 30px var(--shadow);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.card:hover { transform: translateY(-4px); box-shadow: 0 14px 0 var(--grass-deep), 0 24px 36px var(--shadow); }
a.card:active { transform: translateY(4px); box-shadow: 0 4px 0 var(--grass-deep), 0 10px 18px var(--shadow); }
a.card:focus-visible { outline-offset: 6px; border-radius: 32px; }
.bg-pink { fill: var(--art-pink); }
.bg-blue { fill: var(--art-blue); }
.art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 22px 22px; flex: 1; }
.card h3 { font-size: clamp(24px, 3vw, 30px); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 2px 0 0; list-style: none; }
.chips li { background: var(--chip); border-radius: 999px; padding: 4px 12px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.play {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 5px 0 var(--pink-deep);
}
.play svg { width: 22px; height: 22px; fill: #fff; }
.soon .art { opacity: 0.95; }
.soon .card-body { justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
  .egg { transform-origin: 160px 170px; animation: wiggle 3.2s ease-in-out infinite; }
}
@keyframes wiggle {
  0%, 70%, 100% { transform: rotate(0deg); }
  75% { transform: rotate(-6deg); }
  82% { transform: rotate(6deg); }
  89% { transform: rotate(-3deg); }
}

/* ---------- Grown-ups ---------- */
.grownups { background: var(--band); color: var(--band-ink); padding: clamp(40px, 6vw, 80px) max(5vw, 16px, env(safe-area-inset-right)) clamp(40px, 6vw, 72px) max(5vw, 16px, env(safe-area-inset-left)); }
.wrap { max-width: 1240px; margin: 0 auto; }
.grownups h2 { font-size: clamp(32px, 4.5vw, 46px); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; }
.gu-intro { margin-top: 12px; max-width: 60ch; color: var(--band-muted); font-size: 18px; }
.points { list-style: none; padding: 0; margin: clamp(24px, 4vw, 40px) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(20px, 3vw, 36px); }
.points svg { width: 56px; height: 56px; display: block; margin-bottom: 10px; }
.pt-bg.p1 { fill: #ffd23f; }
.pt-bg.p2 { fill: #5cc8ff; }
.pt-bg.p3 { fill: #5ccf68; }
.pt-ink { fill: none; stroke: #17324d; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.points h3 { font-size: 22px; font-weight: 600; line-height: 1.2; }
.points p { margin-top: 6px; color: var(--band-muted); }
.contact { margin-top: clamp(28px, 4vw, 44px); font-size: 19px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.contact a { font-weight: 600; color: var(--band-ink); text-decoration-color: var(--pink); text-decoration-thickness: 3px; text-underline-offset: 4px; padding: 8px 0; }

.foot { background: var(--foot); color: var(--foot-ink); text-align: center; padding: 22px 16px max(22px, env(safe-area-inset-bottom)); font-size: 15px; font-weight: 500; }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  .brand { font-size: 20px; }
  .sun { top: 74px; right: 10px; }
  .hero { padding-top: 28px; }
  .hero h1 { max-width: 7ch; }
  .lede { max-width: 18ch; }
  .card { border-radius: 26px; }
  .card-body { padding: 16px 18px 20px; }
}

.foot a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; padding: 10px 2px; }
.pt-link { margin-top: 8px; }
.pt-link a { color: var(--band-ink); font-weight: 600; text-decoration-color: var(--pink); text-decoration-thickness: 2px; text-underline-offset: 3px; display: inline-block; padding: 6px 0; }
