/* Wunderbox — wunderbox.app. One stylesheet for the landing page and the
   legal pages. Night sky + warm gold, taken from the app itself (the home's
   meadow, the glowing box, the sticker art). Fonts are self-hosted (no
   third-party font request). */
@import url('/fonts/fonts.css');

:root {
  --night-0: #0c0822;
  --night-1: #1a1044;
  --night-2: #2c1a66;
  --violet: #6d4ce0;
  --gold: #ffc94d;
  --gold-2: #ff9f43;
  --coral: #ff6b5c;
  --mint: #3ecf9e;
  --sky: #29b6f6;
  --cream: #fff8ee;
  --cream-2: #fdeedb;
  --ink: #2a1f3d;
  --ink-2: #5a4e6e;
  --line: #eadcc8;
  --radius: 28px;
  --shadow: 0 18px 50px -18px rgba(26, 16, 68, .45);
  --maxw: 1180px;
  --head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font: 17px/1.6 var(--body); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; letter-spacing: -.01em; }
.wrap { width: min(var(--maxw), 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── nav ─────────────────────────────────────────────────────────── */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s; }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.nav.solid { background: rgba(18, 11, 48, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.nav .brand img { height: 34px; width: auto; }
.nav nav { display: flex; gap: 26px; margin-left: auto; }
.nav nav a { color: #e9e2ff; text-decoration: none; font-weight: 700; font-size: 15px; opacity: .85; }
.nav nav a:hover { opacity: 1; }
.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none; font: 800 16px var(--body); border-radius: 999px; padding: 14px 24px; transition: transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(180deg, #ffd66b, var(--gold-2)); color: #3a2300; box-shadow: 0 10px 28px -8px rgba(255, 159, 67, .7), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); }
.nav .btn { padding: 10px 18px; font-size: 14px; }
@media (max-width: 860px) { .nav nav { display: none; } .nav .btn { margin-left: auto; } }

/* ── hero ────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; color: #fff; overflow: hidden; background: var(--night-0) url('/img/meadow-wide.webp') center 38% / cover no-repeat; display: grid; align-items: end; }
@media (max-aspect-ratio: 4/5) { .hero { background-image: url('/img/meadow-tall.webp'); background-position: center bottom; } }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,8,34,.55) 0%, rgba(12,8,34,0) 38%, rgba(12,8,34,0) 70%, rgba(12,8,34,.7) 100%); pointer-events: none; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.02fr 1fr; gap: 40px; align-items: center; padding: 120px 0 70px; }
.hero-copy .kicker { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); background: rgba(255, 201, 77, .12); padding: 7px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,201,77,.35); }
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); margin: 18px 0 18px; font-weight: 700; text-shadow: 0 4px 30px rgba(12,8,34,.6); }
.hero h1 .glow { background: linear-gradient(180deg, #ffe9a8, var(--gold) 45%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(18px, 1.6vw, 21px); color: #e6defc; max-width: 34ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; font-weight: 700; font-size: 15px; color: #d9d0f7; }
.hero .chips span::before { content: '✓'; color: var(--mint); margin-right: 7px; font-weight: 900; }
.store-note { font-size: 13px; color: #bfb3e8; margin-top: 12px; }

/* the Wunderbox show: shake ×3 → pop open → modules fly out → gentle bob */
.stage { position: relative; aspect-ratio: 1 / .96; width: min(100%, 560px); justify-self: center; }
.stage .box { position: absolute; left: 50%; bottom: 0; width: 42%; transform: translateX(-50%); cursor: pointer; filter: drop-shadow(0 20px 30px rgba(0,0,0,.45)); }
.stage .box img { width: 100%; height: auto; }
.stage .box { z-index: 1; }
.stage .mod { z-index: 2; }
.stage .box .open { position: absolute; inset: auto 0 0; opacity: 0; transform-origin: 50% 100%; }
.stage .beam { position: absolute; left: 50%; bottom: 22%; width: 60%; height: 70%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 100%, rgba(255, 214, 110, .75), rgba(255, 159, 67, .25) 40%, transparent 70%); opacity: 0; filter: blur(6px); pointer-events: none; }
.stage .mod { position: absolute; left: 50%; top: 50%; width: 16%; text-align: center; opacity: 0; transform: translate(-50%, 110%) scale(.2); pointer-events: none; }
.stage .mod img { width: 100%; filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); }
.stage .mod b { display: block; font: 600 clamp(11px, 1.15vw, 14px) var(--head); color: #fff; margin-top: -4px; text-shadow: 0 2px 8px rgba(0,0,0,.7); white-space: nowrap; }
.stage .spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff6cf; box-shadow: 0 0 10px 3px rgba(255, 214, 110, .8); opacity: 0; }

.play .box { animation: shake 1.25s ease-in-out both; }
.play .box .closed { animation: hide 0s linear 1.3s both; }
.play .box .open { animation: pop .55s cubic-bezier(.2, 1.6, .4, 1) 1.3s both; }
.play .beam { animation: beam 2.6s ease-out 1.35s both; }
.play .mod { animation: fly .9s cubic-bezier(.2, .9, .3, 1.15) calc(1.45s + var(--i) * .11s) both, bob 3.6s ease-in-out calc(2.6s + var(--i) * .23s) infinite; }
.play .spark { animation: spark 1.6s ease-out calc(1.35s + var(--d)) both; }
@keyframes shake { 0%, 100% { transform: translateX(-50%) rotate(0); } 8%, 40%, 72% { transform: translateX(-50%) rotate(-7deg) translateY(-3%); } 20%, 52%, 84% { transform: translateX(-50%) rotate(7deg) translateY(-3%); } 30%, 62%, 94% { transform: translateX(-50%) rotate(0) translateY(0); } }
@keyframes hide { to { opacity: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.85); } 100% { opacity: 1; transform: scale(1); } }
@keyframes beam { 0% { opacity: 0; transform: translateX(-50%) scaleY(.2); } 25% { opacity: 1; transform: translateX(-50%) scaleY(1); } 100% { opacity: .55; transform: translateX(-50%) scaleY(1); } }
@keyframes fly { 0% { opacity: 0; transform: translate(-50%, 110%) scale(.2) rotate(-20deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(0); } }
@keyframes bob { 0%, 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))); } 50% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) - 6px)); } }
@keyframes spark { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(1); } }
.hint { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font-size: 13px; color: #cbbff2; opacity: .8; white-space: nowrap; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 104px; gap: 10px; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero .ctas, .hero .chips { justify-content: center; }
  .stage { width: min(100%, 420px); order: -1; margin-top: -10px; }
  .hero h1 { font-size: clamp(34px, 9vw, 44px); margin: 14px 0 12px; }
  .hero p.lead { font-size: 17px; }
  .hint { display: none; }
}

/* ── sections ───────────────────────────────────────────────────── */
section { padding: 110px 0; position: relative; }
.eyebrow { font: 800 14px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--violet); }
.h2 { font-size: clamp(32px, 4vw, 50px); margin: 10px 0 16px; font-weight: 700; }
.sub { font-size: 19px; color: var(--ink-2); max-width: 60ch; }
.center { text-align: center; } .center .sub { margin-inline: auto; }

/* modules */
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
.mcard { position: relative; background: #fff; border-radius: var(--radius); padding: 22px 22px 24px 118px; min-height: 124px; box-shadow: 0 1px 0 var(--line), 0 12px 30px -20px rgba(42,31,61,.35); transition: transform .25s, box-shadow .25s; }
.mcard:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 1px 0 var(--line), 0 22px 40px -22px rgba(42,31,61,.45); }
.mcard img { position: absolute; left: 14px; top: 50%; width: 92px; transform: translateY(-50%) rotate(-4deg); transition: transform .3s; }
.mcard:hover img { transform: translateY(-54%) rotate(4deg) scale(1.06); }
.mcard h3 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.mcard p { font-size: 15.5px; color: var(--ink-2); line-height: 1.45; }
.mcard::after { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 5px; border-radius: 0 6px 6px 0; background: var(--c); }
@media (max-width: 980px) { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .modules { grid-template-columns: 1fr; } }

/* phones */
.phone { position: relative; width: 100%; aspect-ratio: 390 / 844; border-radius: 13.5% / 6.3%; padding: 3.2%; background: linear-gradient(145deg, #3b3552, #15121f); box-shadow: 0 40px 80px -30px rgba(26,16,68,.6), inset 0 0 0 2px rgba(255,255,255,.08); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 11% / 5.1%; }

.tour { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 50px 20px 30px; margin: 0 -20px; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shot { scroll-snap-align: center; text-align: center; }
.shot .phone { transition: transform .35s; }
.shot:nth-child(odd) .phone { transform: translateY(18px); }
.shot:hover .phone { transform: translateY(-6px); }
.shot h3 { font-size: 19px; font-weight: 600; margin-top: 26px; }
.shot p { font-size: 15px; color: var(--ink-2); margin-top: 4px; }

/* worlds (dark band) */
.worlds { background: radial-gradient(1200px 600px at 80% 0%, #3a2489 0%, transparent 60%), linear-gradient(180deg, var(--night-1), var(--night-0)); color: #fff; overflow: hidden; }
.worlds .eyebrow { color: var(--gold); }
.worlds .sub { color: #cfc5f1; }
.world { display: grid; grid-template-columns: 1fr 300px; gap: 60px; align-items: center; margin-top: 80px; }
.world.flip { grid-template-columns: 300px 1fr; }
.world.flip .phone { order: -1; }
.world h3 { font-size: clamp(28px, 3vw, 38px); font-weight: 700; }
.world h3 small { display: block; font: 800 14px var(--body); color: var(--gold); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.world p { color: #d7cff5; margin: 14px 0; font-size: 18px; max-width: 52ch; }
.steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.steps span { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; color: #efeaff; }
.steps span i { font-style: normal; color: var(--gold); margin-right: 6px; }
@media (max-width: 860px) { .world, .world.flip { grid-template-columns: 1fr; gap: 34px; } .world .phone, .world.flip .phone { order: 2; width: 260px; margin-inline: auto; } }

/* parents */
.parents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; }
.pcard { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 0 var(--line), 0 12px 30px -22px rgba(42,31,61,.35); }
.pcard .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--bg); margin-bottom: 16px; }
.pcard h3 { font-size: 21px; font-weight: 600; margin-bottom: 6px; }
.pcard p { font-size: 15.5px; color: var(--ink-2); }
@media (max-width: 900px) { .parents-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .parents-grid { grid-template-columns: 1fr; } }

/* promise band */
.promise { padding: 0 0 110px; }
.promise .card { background: linear-gradient(135deg, #2c1a66, #4b2aa8); color: #fff; border-radius: 36px; padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.promise .card::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255,201,77,.35), transparent 65%); }
.promise h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 700; }
.promise p { color: #ddd4fb; margin-top: 12px; }
.promise ul { list-style: none; display: grid; gap: 12px; font-weight: 700; }
.promise li::before { content: '✓'; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: #073b2a; font-weight: 900; margin-right: 12px; font-size: 14px; }
.promise a { color: var(--gold); }
@media (max-width: 860px) { .promise .card { grid-template-columns: 1fr; padding: 36px 26px; } }

/* faq */
.faq { max-width: 820px; margin: 44px auto 0; }
.faq details { background: #fff; border-radius: 22px; margin-bottom: 12px; box-shadow: 0 1px 0 var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 60px 22px 26px; font: 600 19px var(--head); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--cream-2); display: grid; place-items: center; font: 700 20px var(--body); color: var(--violet); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 26px 22px; color: var(--ink-2); }

/* final cta */
.final { background: var(--night-0) url('/img/meadow-wide.webp') center 70% / cover; color: #fff; text-align: center; padding: 130px 0 150px; overflow: hidden; }
.final::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--cream) 0%, rgba(12,8,34,0) 22%, rgba(12,8,34,.25) 100%); }
.final .wrap { position: relative; }
.final img.boxmini { width: 150px; margin: 0 auto 18px; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 16px 26px rgba(0,0,0,.5)); }
.final h2 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 700; }
.final p { color: #ddd4fb; margin: 14px auto 30px; max-width: 46ch; font-size: 19px; }
@keyframes float { 50% { transform: translateY(-10px) rotate(2deg); } }

/* footer */
footer { background: var(--night-0); color: #b8addb; padding: 50px 0 60px; font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
footer img { height: 28px; width: auto; opacity: .95; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer a { text-decoration: none; color: #ddd4fb; font-weight: 700; }
footer a:hover { color: #fff; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--rd, 0s); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}

/* ── legal pages ─────────────────────────────────────────────────── */
.legal-head { background: linear-gradient(180deg, rgba(12,8,34,.35), rgba(12,8,34,.1)), var(--night-0) url('/img/meadow-wide.webp') center 62% / cover; color: #fff; padding: 140px 0 70px; }
.legal-head h1 { font-size: clamp(34px, 4vw, 52px); font-weight: 700; }
.legal-head p { color: #d7cff5; margin-top: 10px; }
.legal-head p a { color: var(--gold); }
.legal { padding: 60px 0 100px; }
.legal .doc { max-width: 780px; margin-inline: auto; }
.legal h2 { font-size: 30px; font-weight: 700; margin: 56px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 21px; font-weight: 600; margin: 32px 0 8px; }
.legal p, .legal li { color: #3d3350; margin: 8px 0; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--violet); font-weight: 700; }
.legal code { background: var(--cream-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.legal .box { background: #fff; border-radius: 22px; padding: 18px 24px; box-shadow: 0 1px 0 var(--line); margin: 16px 0; }
.legal .box ul { margin: 0; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; background: #fff; border-radius: 22px; padding: 26px 28px; box-shadow: 0 1px 0 var(--line); }
.legal dt { font-weight: 800; color: var(--ink); }
.legal dd { color: #3d3350; }
@media (max-width: 560px) { .legal dl { grid-template-columns: 1fr; gap: 2px; } .legal dd { margin-bottom: 12px; } }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 64px 0; }
.contact-card { background: linear-gradient(135deg, #2c1a66, #4b2aa8); color: #fff; border-radius: 28px; padding: 30px; margin: 10px 0 30px; box-shadow: var(--shadow); }
.contact-card p { color: #ddd4fb !important; }
.contact-card a { color: var(--gold) !important; font-size: 22px; }
