/* Brand colours come from site.config.js (set on :root by site.js); these are the fallbacks. */
@font-face { font-family: "Comfortaa"; src: url("fonts/Comfortaa-Variable.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Didact Gothic"; src: url("fonts/DidactGothic-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --sky: #9fd3f5; --sea: #1f8fd6; --cream: #fff7ea; --sand: #f3e4cc; --ink: #4a2f22;
  --accent: #f2a33a; --pink: #e86aa4; --green: #5fae4e;
  --muted: color-mix(in srgb, var(--ink) 70%, white);
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 10px 30px -12px rgba(74, 47, 34, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 18px/1.6 "Didact Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: "Comfortaa", system-ui, sans-serif; font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); text-align: center; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
section { padding: 72px 0; }
.sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 40px; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--cream) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.top-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 1.5rem "Comfortaa", sans-serif; text-decoration: none; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; opacity: .8; }
.nav a:hover { opacity: 1; color: var(--sea); }

/* hero */
.hero { position: relative; padding: 56px 0 96px; background: linear-gradient(180deg, var(--sky) 0%, color-mix(in srgb, var(--sky) 40%, var(--cream)) 70%, var(--cream) 100%); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: "title art" "copy art";
  column-gap: 48px;
}
.hero-grid h1 { grid-area: title; align-self: end; }
.hero-grid .hero-art { grid-area: art; align-self: center; }
.hero-copy { grid-area: copy; align-self: start; }

@media (max-width: 600px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "art" "copy";
    row-gap: 20px;
  }
  .hero-grid h1 { margin: 0; }
}
.kicker { display: inline-block; background: #fff; color: var(--sea); font: 700 .9rem "Comfortaa", sans-serif; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero-art img { border-radius: 28px; box-shadow: var(--shadow); border: 6px solid #fff; }
.hero-art { margin: 0; transform: rotate(1.2deg); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0; }
.store, .ghost { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 999px; font: 700 1rem "Comfortaa", sans-serif; text-decoration: none; transition: transform .15s; }
.store { background: var(--ink); color: #fff; }
.store svg { width: 22px; height: 22px; }
.store.soon { background: color-mix(in srgb, var(--ink) 75%, white); cursor: default; }
.ghost { border: 2px solid var(--ink); background: #fff; }
.store:not(.soon):hover, .ghost:hover { transform: translateY(-2px); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 14px 6px 6px; font-size: .95rem; box-shadow: 0 2px 8px -4px rgba(74,47,34,.3); }
.chips .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; color: #fff; background: var(--green); }
.chips li:first-child .ic { background: var(--pink); }
.chips li:nth-child(3) .ic { background: var(--accent); }
.chips li:nth-child(4) .ic { background: var(--sea); }

/* shared section background */
.band { background: var(--card); }

/* games */
.games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.game { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.game-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.game-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--green); color: #fff; font: 700 .8rem "Comfortaa", sans-serif; padding: 5px 12px; border-radius: 999px; }
.game.sleeping .game-img img { filter: saturate(.45) brightness(1.03); }
.game.sleeping .badge { background: color-mix(in srgb, var(--ink) 70%, white); }
.game-body { padding: 14px 16px 16px; }
.game-body h3 { margin-bottom: 4px; }
.skill { color: var(--sea); font-size: .9rem; font-weight: 600; margin-bottom: 10px; }
.game-body p:last-child { color: var(--muted); margin: 0; font-size: 1rem; }

/* how */
.how { background: color-mix(in srgb, var(--sand) 60%, var(--cream)); }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps li { text-align: center; padding: 0 12px; }
.steps p { color: var(--muted); }
.num { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 1.5rem "Comfortaa", sans-serif; margin-bottom: 14px; }

/* plouf */
.plouf-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.plouf-grid img { border-radius: var(--radius); }
.plouf h2 { text-align: left; }

/* faq */
details { background: var(--card); border-radius: 16px; padding: 4px 22px; margin-bottom: 12px; box-shadow: 0 2px 10px -6px rgba(74,47,34,.3); }
summary { cursor: pointer; padding: 16px 0; font: 700 1.05rem "Comfortaa", sans-serif; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--sea); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); }

/* cta + footer */
.cta { text-align: center; background: var(--sky); }
.cta h2 { margin-bottom: 24px; }
.foot { background: var(--ink); color: #f6ead8; padding: 44px 0; }
.foot-row { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; }
.foot-row p { opacity: .75; margin: 10px 0 0; font-size: .95rem; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot nav a { text-decoration: none; opacity: .85; }
.foot nav a:hover { opacity: 1; text-decoration: underline; }
.copy { width: 100%; }

/* phones */
@media (max-width: 860px) {
  section { padding: 56px 0; }
  .hero { padding-top: 32px; }
  .plouf-grid { grid-template-columns: 1fr; gap: 32px; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .plouf h2 { text-align: center; }
  .plouf .lead { text-align: center; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .store, .ghost { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* privacy and terms */
.legal { padding: 48px 0 72px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .2em; }
.legal h2 { text-align: left; font-size: 1.3rem; margin: 2em 0 .6em; }
.legal p, .legal li { color: color-mix(in srgb, var(--ink) 85%, white); }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .4em; }
.legal a { color: var(--sea); }
.updated { color: var(--muted); font-size: .95rem; }
.summary { background: white; border-radius: var(--radius); padding: 22px 26px 10px; margin: 28px 0; }
.summary h2 { margin-top: 0; }
[hidden] { display: none !important; }

/* A continuous island: sky, clouds, a shoreline, then the sea. Scoped so legal pages stay quiet. */
.island-page { --island-sky: #e8f6fa; background: var(--cream); }
.island-page main { overflow: clip; background: var(--cream); }
.island-page .top { background: color-mix(in srgb, var(--island-sky) 92%, transparent); border-bottom: 0; }
.island-page .hero { background: linear-gradient(#d8eff8, var(--island-sky)); padding-bottom: 56px; }
.island-page .hero-art { width: min(100%, 680px); transform: none; position: relative; }
.island-page .hero-art::before { content: ""; position: absolute; inset: -24px -15px; border-radius: 48% 52% 45% 55%; background: #fff9; transform: rotate(-6deg); }
.island-page .hero-art img { position: relative; border: 0; box-shadow: none; border-radius: 45% 55% 42% 58% / 38% 42% 58% 62%; }
.cloud-edge { display: block; width: 100%; height: clamp(55px, 8vw, 125px); fill: var(--cream); background: var(--island-sky); margin: -1px 0; }
.island-page .games-sec { padding-top: 44px; padding-bottom: 24px; }
.island-page .game { box-shadow: 0 12px 28px -20px #754c3240; }
.shoreline { position: relative; height: clamp(120px, 14vw, 200px); margin-top: 28px; pointer-events: none; }
.shoreline > svg:first-child { width: 100%; height: 100%; display: block; }
.shoreline .little-boat { position: absolute; width: clamp(90px, 11vw, 150px); height: auto; right: 15%; bottom: 18%; transform: rotate(-5deg); }
.island-page .how { background: var(--cream); padding-top: 30px; padding-bottom: 36px; }
.island-page .steps { position: relative; }
.island-page .steps::before { content: ""; position: absolute; left: 17%; right: 17%; top: 27px; border-top: 2px dashed #dec9a8; }
.island-page .num { position: relative; outline: 10px solid var(--cream); background: #f2c678; color: var(--ink); }
.island-page .plouf { background: linear-gradient(var(--cream) 65%, #fffaf2); padding-top: 60px; padding-bottom: 45px; }
.island-page .plouf-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
.plouf-cloud { position: relative; min-width: 0; padding: 0 24px 15px; }
.island-plouf { width: 100%; aspect-ratio: 1.3 / 1.4; position: relative; z-index: 1; max-width: 370px; margin: auto; }
.island-plouf img { position: absolute; width: auto; max-width: none; border-radius: 0; transform: translate(-50%,-50%); }
.plouf-cloud .cloud-edge { position: absolute; bottom: 0; left: -8%; width: 116%; height: 110px; background: none; fill: white; filter: drop-shadow(0 12px 12px #ddcdb333); }
.island-page .faq { background: #fffaf2; padding-top: 35px; padding-bottom: 55px; }
.island-page details { box-shadow: none; border: 1px solid #eee4d5; }
.sea-invitation { position: relative; background: #dff2f4; }
.sea-invitation > .cloud-edge { background: #fffaf2; fill: #dff2f4; transform: scaleX(-1); }
.island-page .cta { background: none; padding: 20px 0 65px; }
.island-page .farewell { width: 130px; margin-bottom: 16px; }
.island-page .foot { background: #dff2f4; color: var(--ink); border-top: 1px solid #c6e2e4; }
.island-page section[id] { scroll-margin-top: 85px; }
.island-page a:focus-visible, .island-page button:focus-visible, .island-page summary:focus-visible { outline: 3px solid var(--sea); outline-offset: 5px; }
@media (max-width: 860px) {
  .island-page .hero-art::before { inset: -12px -5px; }
  .island-page .hero { padding-bottom: 40px; }
  .island-page .plouf-grid { grid-template-columns: 1fr; gap: 32px; }
  .plouf-cloud { width: min(100%, 400px); margin: auto; }
  .island-page .steps::before { display: none; }
  .island-page .steps { gap: 25px; }
  .island-page .plouf { padding-top: 32px; }
}
@media (max-width: 600px) {
  .island-page .hero-art img { border-radius: 40% 50% 38% 45%; }
  .island-page .games-sec { padding-top: 32px; }
  .island-page .island-plouf { max-width: 280px; }
  .island-page .cta { padding-bottom: 42px; }
}

.logo-icon { width: 44px; height: 44px; flex: 0 0 44px; object-fit: cover; border-radius: 12px; }

/* The multi-activity hero is a transparent illustration, not a framed game card. */
.island-page .hero-art-play::before { display: none; }
.island-page .hero-art-play img { border-radius: 0; width: 100%; }

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

.chips .ic svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-copy .actions { margin-top: 22px; }
.store.store-badge:not(.soon) {
  width: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
.store-badge img { display: block; width: auto; height: 48px; }
.store-badge:not(.soon) span, .store-badge.soon img { display: none; }

.plouf-greeter {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
  transform-origin: center 92%;
}

@media (prefers-reduced-motion: no-preference) {
  .plouf-greeter.is-greeting .plouf-wave-arm {
    transform-origin: 18% 20%;
    animation: plouf-wave 5.5s ease-in-out infinite;
  }
}

@keyframes plouf-wave {
  0%, 27.2727%, 100% { transform: translate(-50%, -50%) rotate(0); }
  5.45%, 15%, 21.82% { transform: translate(-50%, -50%) rotate(-115deg); }
  10.36%, 18.55% { transform: translate(-50%, -50%) rotate(-85deg); }
}
