/* KudoCookie site: the film's palette (cream to sky), the trophy's royal blue and gold, toy-like chunky shapes. */
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cream: #fff4dc;
  --cream-deep: #ffe6b3;
  --sky: #9cc3ea;
  --sky-soft: #d9eafa;
  --royal: #0e2e95;
  --royal-bright: #2a4fd6;
  --gold: #f5b83d;
  --gold-deep: #b97a0a;
  --cookie: #c98b4f;
  --grass: #78c46a;
  --grass-deep: #3f8a3a;
  --dirt: #8a5a33;
  --berry: #ff6f91;
  --ink: #2b1a0e;
  --ink-soft: #5d4636;
  --surface: #fffaf0;
  --line: #2b1a0e;
  --bg: var(--cream);
  --on-royal: #fff4dc;
  --radius: 22px;
  --shadow: 0 6px 0 var(--line);
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1433;
    --surface: #15224f;
    --ink: #fff4dc;
    --ink-soft: #d6c8b4;
    --line: #050a1c;
    --sky-soft: #1b2b63;
    --cream-deep: #22306a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Nunito", ui-rounded, system-ui, sans-serif;
  font-size-adjust: from-font;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--royal-bright); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, .brand, .btn, .sticker, .price { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-weight: 600; line-height: 1.1; }
h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 4.4rem); letter-spacing: -0.01em; margin: 0 0 0.4em; text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 3rem); margin: 0 0 0.5em; text-wrap: balance; }
h3 { font-size: 1.35rem; margin: 0 0 0.35em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); color: var(--ink-soft); max-width: 38ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.45rem; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 11px; border: 2px solid var(--line); }
.site-nav ul { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.site-nav a:hover { background: var(--cream-deep); }
@media (min-width: 900px) { .site-nav ul { display: flex; } }
.lang { font-weight: 800; text-decoration: none; padding: 8px 12px; border: 2px solid var(--line); border-radius: 999px; min-width: 48px; text-align: center; }
.lang:hover { background: var(--sky-soft); }

/* Buttons: chunky toys that press down */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px;
  border: 3px solid var(--line); border-radius: 999px;
  background: var(--gold); color: #2b1a0e;
  font-size: 1.15rem; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow);
  transition: translate 0.12s ease, box-shadow 0.12s ease, background-color 0.2s;
}
.btn:hover { background: #ffc85a; }
.btn:active { translate: 0 4px; box-shadow: 0 2px 0 var(--line); }
.btn-royal { background: var(--royal); color: var(--on-royal); }
.btn-royal:hover { background: var(--royal-bright); }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: 1rem; }
.btn[aria-disabled="true"] { cursor: default; }
.store-row { display: flex; flex-wrap: wrap; gap: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px; min-height: 60px;
  border: 3px solid var(--line); border-radius: 18px;
  background: #111; color: #fff; text-decoration: none; box-shadow: var(--shadow);
}
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 0.75rem; opacity: 0.8; line-height: 1.1; }
.store b { display: block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.2rem; line-height: 1.15; }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-soft) 45%, var(--bg) 100%);
  padding: clamp(28px, 5vw, 72px) 0 clamp(48px, 6vw, 80px);
}
@media (prefers-color-scheme: dark) {
  .hero { background: linear-gradient(180deg, #1d3a8a 0%, #13235a 50%, var(--bg) 100%); }
}
.hero-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1.15fr; } }
.kicker {
  display: inline-block; margin-bottom: 14px; padding: 6px 14px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 999px;
  font-weight: 800; font-size: 0.95rem;
}
.hero h1 em { font-style: normal; color: var(--royal); background: linear-gradient(transparent 62%, var(--gold) 62%); padding-inline: 4px; }
@media (prefers-color-scheme: dark) { .hero h1 em { color: var(--gold); background: none; } }
.hero .store-row { margin-top: 22px; }
.hero-note { margin-top: 16px; font-size: 0.95rem; color: var(--ink-soft); }

.screen {
  position: relative;
  border: 4px solid var(--line); border-radius: calc(var(--radius) + 6px);
  background: #000; overflow: hidden;
  box-shadow: 0 10px 0 var(--line);
  aspect-ratio: 16 / 9;
}
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; }
.hero-media { position: relative; }
.hero-media .screen { rotate: -1.5deg; }
.trophy {
  position: absolute; z-index: 2; width: clamp(92px, 16vw, 170px);
  right: clamp(-8px, -1vw, -24px); bottom: clamp(-40px, -4vw, -64px);
  filter: drop-shadow(0 8px 0 rgb(0 0 0 / 0.25));
}
.sticker {
  position: absolute; z-index: 2; padding: 8px 14px;
  background: var(--berry); color: #fff; border: 3px solid var(--line); border-radius: 14px;
  font-size: clamp(0.85rem, 0.75rem + 0.4vw, 1.05rem); box-shadow: 0 4px 0 var(--line);
}
.sticker-a { top: -16px; left: -6px; rotate: -6deg; }
.sticker-b { top: 14px; right: -10px; rotate: 5deg; background: var(--grass-deep); }
@media (max-width: 520px) { .sticker-b { display: none; } }

.pause {
  position: absolute; z-index: 3; left: 12px; bottom: 12px;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 2px solid #fff; border-radius: 50%; background: rgb(0 0 0 / 0.55); color: #fff; cursor: pointer;
}
.pause svg { width: 18px; height: 18px; }
.pause .i-play, .pause[data-paused] .i-pause { display: none; }
.pause[data-paused] .i-play { display: block; }

/* Floating voxel cubes */
.cubes { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cube {
  position: absolute; width: var(--s, 34px); aspect-ratio: 1;
  border: 3px solid var(--line); border-radius: 8px;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.45) 0 30%, transparent 30%), var(--c, var(--gold));
  box-shadow: inset -6px -6px 0 rgb(0 0 0 / 0.18);
  rotate: var(--r, 12deg);
}
@media (prefers-reduced-motion: no-preference) {
  .cube { animation: bob 6s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
}
@keyframes bob { to { translate: 0 -18px; rotate: calc(var(--r, 12deg) + 14deg); } }

/* Grass edge under a section, like the floating island */
.island-edge {
  height: 34px; margin-top: -2px;
  background:
    linear-gradient(var(--grass) 0 12px, transparent 12px),
    repeating-linear-gradient(90deg, var(--dirt) 0 22px, #7a4d2a 22px 44px);
  border-top: 3px solid var(--line); border-bottom: 3px solid var(--line);
  mask: linear-gradient(#000 0 0);
}

section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--sky-soft); }
.section-royal { background: var(--royal); color: var(--on-royal); }
.section-royal .lead { color: #d9e1ff; }

/* Steps */
.steps { display: grid; gap: 28px; margin-top: 40px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.step { position: relative; padding-top: 28px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -22px; left: 20px; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--gold); border: 3px solid var(--line); border-radius: 14px; rotate: -8deg;
  font: 600 1.5rem "Fredoka", sans-serif; color: #2b1a0e;
}
.step img { border-radius: 14px; border: 2px solid var(--line); margin-bottom: 16px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.step p { margin: 0; color: var(--ink-soft); }
.polaroid { position: relative; }
.polaroid .tag {
  position: absolute; right: 10px; bottom: 26px; padding: 4px 12px; rotate: 4deg;
  background: var(--surface); border: 2px solid var(--line); border-radius: 10px; font: 600 1.1rem "Fredoka", sans-serif;
}

/* Clips */
.clips { display: grid; gap: 28px; margin-top: 40px; }
@media (min-width: 900px) { .clips { grid-template-columns: repeat(3, 1fr); } }
.clip figcaption { padding: 14px 4px 0; }
.clip figcaption b { display: block; font: 600 1.3rem "Fredoka", sans-serif; }
.clip figcaption span { color: var(--ink-soft); }
.clip { margin: 0; }
.clip:nth-child(2) .screen { rotate: 1deg; }
.clip:nth-child(3) .screen { rotate: -1deg; }

/* Features */
.features { display: grid; gap: 20px; margin-top: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.feature .emoji { font-size: 2.2rem; line-height: 1; display: block; margin-bottom: 10px; }
.feature p { margin: 0; color: var(--ink-soft); }

/* Promise */
.promise { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .promise { grid-template-columns: auto 1fr; } }
.shield {
  width: clamp(110px, 18vw, 170px); aspect-ratio: 1; display: grid; place-items: center;
  background: var(--gold); border: 4px solid var(--line); border-radius: 36px; rotate: -6deg;
  font-size: clamp(3rem, 7vw, 5rem); box-shadow: 0 8px 0 var(--line);
}
.checks { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 8px; }
.checks li { padding-left: 34px; position: relative; font-weight: 700; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; background: var(--grass); color: #10300c; border-radius: 8px; font-size: 0.9rem; }
.section-royal a { color: var(--gold); font-weight: 800; }

/* Pricing */
.prices { display: grid; gap: 24px; margin-top: 40px; align-items: stretch; }
@media (min-width: 860px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.plan { display: flex; flex-direction: column; }
.plan ul { padding-left: 1.2em; margin: 0 0 1em; color: var(--ink-soft); }
.plan .price { font-size: 2.6rem; margin: 6px 0 12px; }
.plan .price small { font-size: 1rem; color: var(--ink-soft); font-family: "Nunito", sans-serif; font-weight: 700; }
.plan-best { background: var(--royal); color: var(--on-royal); position: relative; }
.plan-best ul, .plan-best .price small { color: #d9e1ff; }
.plan-best .ribbon {
  position: absolute; top: -18px; right: 18px; rotate: 4deg; padding: 6px 14px;
  background: var(--gold); color: #2b1a0e; border: 3px solid var(--line); border-radius: 12px; font: 600 1rem "Fredoka", sans-serif;
}
.fineprint { margin-top: 24px; font-size: 0.95rem; color: var(--ink-soft); }

/* Gift ideas */
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; padding: 0; list-style: none; }
.chips li { padding: 10px 18px; background: var(--surface); border: 3px solid var(--line); border-radius: 999px; font-weight: 800; box-shadow: 0 4px 0 var(--line); }
.chips li:nth-child(odd) { rotate: -2deg; }
.chips li:nth-child(even) { rotate: 2deg; }

/* FAQ */
.faq { max-width: 820px; margin: 36px auto 0; display: grid; gap: 14px; }
.faq details { background: var(--surface); border: 3px solid var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--line); }
.faq summary { cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 800; font-size: 1.1rem; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; font: 600 1.6rem "Fredoka", sans-serif; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 16px; color: var(--ink-soft); }

/* Download */
.download { text-align: center; }
.download .store-row { justify-content: center; margin-top: 26px; }
.download img { margin: 0 auto 10px; width: 120px; }

/* Footer */
.site-footer { background: #1a0f07; color: #f3e6d2; padding: 48px 0 32px; border-top: 4px solid var(--line); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h2 { font-size: 1.15rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal-line { margin-top: 32px; font-size: 0.9rem; opacity: 0.75; }

/* Legal and text pages */
.page-head { background: linear-gradient(180deg, var(--sky) 0%, var(--bg) 100%); padding: clamp(36px, 6vw, 72px) 0 24px; }
@media (prefers-color-scheme: dark) { .page-head { background: linear-gradient(180deg, #1d3a8a 0%, var(--bg) 100%); } }
.prose { max-width: 780px; padding-bottom: 72px; }
.prose h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose .summary { font-size: 1.15rem; padding: 18px 20px; background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.prose code { font-size: 0.9em; background: var(--cream-deep); padding: 1px 6px; border-radius: 6px; }
.prose pre { overflow-x: auto; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 14px; font-size: 0.9rem; }
.prose pre code { background: none; padding: 0; }
.table-scroll { overflow-x: auto; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 25%, transparent); }
.prose th { background: var(--cream-deep); }
.prose .updated { color: var(--ink-soft); font-size: 0.95rem; }
dl.ids { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
dl.ids dt { font-weight: 800; }
dl.ids dd { margin: 0; }
@media (max-width: 560px) { dl.ids { grid-template-columns: 1fr; } dl.ids dd { margin-bottom: 8px; } }
.contact-card { display: grid; gap: 8px; }
.contact-card .btn { justify-self: start; }

/* Scroll reveal: progressive enhancement, final state is the visible one */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: pop-in linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}
@keyframes pop-in { from { opacity: 0; translate: 0 40px; scale: 0.96; } }

@media (forced-colors: active) {
  .btn, .card, .store, .screen { border-color: CanvasText; }
}
.skip:focus { position: fixed; z-index: 20; top: 8px; left: 8px; width: auto; height: auto; clip-path: none; padding: 10px 16px; background: var(--gold); color: #2b1a0e; border: 3px solid var(--line); border-radius: 12px; font-weight: 800; }
.cube-1 { --s: 38px; --c: var(--gold); top: 12%; left: 4%; --r: 14deg; }
.cube-2 { --s: 26px; --c: var(--grass); top: 64%; left: 2%; --r: -10deg; --d: -2s; }
.cube-3 { --s: 30px; --c: var(--berry); top: 8%; left: 46%; --r: 22deg; --d: -4s; }
.cube-4 { --s: 22px; --c: var(--cookie); top: 80%; left: 52%; --r: 8deg; --d: -1s; }
.cube-5 { --s: 34px; --c: #fff; top: 6%; right: 5%; --r: -16deg; --d: -3s; }
.download .lead { margin-inline: auto; }
@media (max-width: 959px) { .cube-1, .cube-2, .cube-3, .cube-4 { display: none; } }
.lost { margin: 0 auto 12px; width: 140px; }
@media (max-width: 420px) { .brand { font-size: 1.2rem; gap: 8px; } .brand img { width: 34px; height: 34px; } .header-inner { gap: 8px; } }
@media (prefers-color-scheme: dark) { .btn-royal { background: var(--royal-bright); } .btn-royal:hover { background: #3d63f0; } }
