/* EarlyEars promo site. Colours mirror lib/widgets/early_theme.dart. */
:root {
  --cream: #F8F5ED;
  --panel: #FFFCF5;
  --ink: #1F2B31;
  --muted: #5E6664;
  --outline: #E8E2D7;
  --orange: #FF8500;
  --teal: #00B3B0;
  --accent: #14788C;
  --coral: #E36B40;
  --green: #388559;
  --night: #1C2547;
  --night-2: #2F3B6B;

  /* Theme-dependent surfaces (dark values below) */
  --surface: #fff;
  --edge: #fff;
  --on-ink: #fff;
  --ink-hover: #2C3B42;
  --on-accent: #fff;
  --accent-soft: rgba(20, 120, 140, .09);
  --accent-soft-2: rgba(20, 120, 140, .16);
  --outline-strong: #CFC7B8;
  --placeholder: #9AA09E;
  --header-bg: rgba(248, 245, 237, .86);
  --btn-shadow: 0 6px 16px rgba(31, 43, 49, .18);
  --story-a: #FFF8EA;
  --story-b: #FCEFD6;
  --story-edge: #F3E3C4;
  --story-quote: rgba(255, 255, 255, .6);
  --cta-a: #E7F6F4;
  --cta-b: #FFF2E0;
  --logo-filter: none;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(31, 43, 49, .06);
  --shadow-lg: 0 24px 60px rgba(31, 43, 49, .10);
  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* Dark: the hero's night sky spread across the page. The block is repeated so
   the system setting works without JavaScript, and the switch can override it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #10172B; --panel: #172038; --surface: #1E2843; --edge: rgba(255, 255, 255, .07);
    --ink: #F1ECE1; --on-ink: #131A2E; --ink-hover: #FFFFFF; --muted: #A5ADC1;
    --outline: #28324F; --outline-strong: #3C4870; --placeholder: #6F7A96;
    --accent: #4FC6C8; --on-accent: #0F1A2B; --accent-soft: rgba(79, 198, 200, .12); --accent-soft-2: rgba(79, 198, 200, .2);
    --coral: #FF8F6B; --green: #6CC795;
    --header-bg: rgba(16, 23, 43, .82); --btn-shadow: 0 6px 16px rgba(0, 0, 0, .35);
    --story-a: #262338; --story-b: #302838; --story-edge: #41364A; --story-quote: rgba(255, 255, 255, .05);
    --cta-a: #12323D; --cta-b: #33282E;
    --shadow: 0 10px 30px rgba(0, 0, 0, .25); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .38);
    --logo-filter: invert(1) sepia(.12);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --cream: #10172B; --panel: #172038; --surface: #1E2843; --edge: rgba(255, 255, 255, .07);
  --ink: #F1ECE1; --on-ink: #131A2E; --ink-hover: #FFFFFF; --muted: #A5ADC1;
  --outline: #28324F; --outline-strong: #3C4870; --placeholder: #6F7A96;
  --accent: #4FC6C8; --on-accent: #0F1A2B; --accent-soft: rgba(79, 198, 200, .12); --accent-soft-2: rgba(79, 198, 200, .2);
  --coral: #FF8F6B; --green: #6CC795;
  --header-bg: rgba(16, 23, 43, .82); --btn-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  --story-a: #262338; --story-b: #302838; --story-edge: #41364A; --story-quote: rgba(255, 255, 255, .05);
  --cta-a: #12323D; --cta-b: #33282E;
  --shadow: 0 10px 30px rgba(0, 0, 0, .25); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .38);
  --logo-filter: invert(1) sepia(.12);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.02em; font-weight: 900; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 800;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  background: var(--ink); color: var(--on-ink);
  border: 0; border-radius: 16px;
  font: inherit; font-size: 16px; font-weight: 800; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s;
  box-shadow: var(--btn-shadow);
}
.btn:hover { background: var(--ink-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 14.5px; border-radius: 13px; }
.btn-ghost {
  background: var(--panel); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--outline), var(--shadow);
}
.btn-ghost:hover { background: var(--surface); }
.btn svg, .text-btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.text-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 8px 14px 8px 10px;
  background: var(--accent-soft); color: var(--accent);
  border: 0; border-radius: 999px;
  font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer;
  transition: background .2s;
}
.text-btn:hover { background: var(--accent-soft-2); }
.text-btn.is-playing { background: var(--accent); color: var(--on-accent); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--outline); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand img { height: 30px; width: auto; filter: var(--logo-filter); }
.header-nav { display: flex; gap: 26px; margin-left: auto; }
.header-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; opacity: .8; }
.header-nav a:hover { opacity: 1; }
@media (max-width: 760px) {
  .header-nav { display: none; }
  .header-inner { gap: 14px; height: 60px; }
  .brand img { height: 24px; }
  .theme-toggle { margin-left: auto; }
}
@media (max-width: 400px) {
  .header-inner { gap: 10px; }
  .brand img { height: 20px; }
  .header-inner .btn-small { padding: 0 12px; font-size: 14px; }
}
@media (max-width: 349px) { .header-inner .btn-small { display: none; } }

/* Theme switch: the sun slides across a day sky and becomes a crescent moon. */
.theme-toggle {
  display: none; position: relative; flex: none; width: 58px; height: 32px;
  padding: 0; border: 0; border-radius: 999px; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.js .theme-toggle { display: block; }
.tt-track {
  position: absolute; inset: 0; overflow: hidden; border-radius: inherit;
  background: linear-gradient(180deg, #8DD2EA 0%, #CBEDF4 100%);
  box-shadow: inset 0 0 0 1.5px rgba(31, 43, 49, .08), inset 0 2px 5px rgba(31, 43, 49, .14);
}
.tt-track::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(180deg, #141C44 0%, #2E3A73 100%);
  transition: opacity .55s var(--ease);
}
.tt-cloud {
  position: absolute; right: 7px; top: 15px; width: 16px; height: 7px; border-radius: 99px; background: #fff;
  transition: transform .55s var(--ease), opacity .35s;
}
.tt-cloud::before, .tt-cloud::after { content: ""; position: absolute; border-radius: 50%; background: #fff; }
.tt-cloud::before { width: 8px; height: 8px; left: 2px; top: -4px; }
.tt-cloud::after { width: 6px; height: 6px; left: 8px; top: -2px; }
.tt-stars i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #FFF6D8;
  opacity: 0; transform: scale(0); transition: opacity .3s, transform .45s cubic-bezier(.34, 1.6, .64, 1);
}
.tt-stars i:nth-child(1) { left: 9px; top: 8px; }
.tt-stars i:nth-child(2) { left: 18px; top: 18px; width: 2px; height: 2px; }
.tt-stars i:nth-child(3) { left: 23px; top: 7px; width: 2px; height: 2px; }
.tt-stars i:nth-child(4) { left: 11px; top: 22px; width: 2px; height: 2px; }
.tt-knob {
  position: absolute; left: 4px; top: 4px; width: 24px; height: 24px;
  transition: transform .6s cubic-bezier(.34, 1.36, .64, 1), scale .2s var(--ease);
}
.tt-rays {
  position: absolute; inset: -4px; border-radius: 50%;
  background: repeating-conic-gradient(#FFB21C 0 13deg, transparent 13deg 45deg);
  -webkit-mask: radial-gradient(closest-side, transparent 68%, #000 70% 94%, transparent 97%);
  mask: radial-gradient(closest-side, transparent 68%, #000 70% 94%, transparent 97%);
  transition: transform .6s var(--ease), opacity .35s;
}
.tt-disc {
  position: absolute; inset: 2.5px; overflow: hidden; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #FFE992, #FFC531 58%, #F5A300);
  box-shadow: 0 1px 3px rgba(150, 90, 0, .35);
  transition: box-shadow .5s;
}
.tt-disc::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 36% 34%, #FFFBEF, #F2E8CF 70%, #DCD0B4);
  transition: opacity .45s var(--ease);
}
.tt-disc i {
  position: absolute; border-radius: 50%; background: rgba(160, 145, 115, .35); opacity: 0; transition: opacity .4s .15s;
}
.tt-disc i:nth-child(1) { width: 4px; height: 4px; left: 4px; top: 9px; }
.tt-disc i:nth-child(2) { width: 3px; height: 3px; left: 8px; top: 13px; }
/* The night sky slides over the disc to carve the crescent */
.tt-disc::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #1F295A;
  transform: translate(110%, -80%); transition: transform .6s var(--ease);
}
.theme-toggle:hover .tt-knob { scale: 1.06; }
.theme-toggle:active .tt-knob { scale: .94; }

[data-theme="dark"] .tt-track::before { opacity: 1; }
[data-theme="dark"] .tt-cloud { transform: translateY(18px); opacity: 0; }
[data-theme="dark"] .tt-stars i { opacity: 1; transform: scale(1); animation: tt-twinkle 2.6s ease-in-out .6s infinite; }
[data-theme="dark"] .tt-stars i:nth-child(2) { transition-delay: .12s; animation-delay: 1.1s; }
[data-theme="dark"] .tt-stars i:nth-child(3) { transition-delay: .2s; animation-delay: 1.7s; }
[data-theme="dark"] .tt-stars i:nth-child(4) { transition-delay: .28s; animation-delay: 2.2s; }
[data-theme="dark"] .tt-knob { transform: translateX(26px) rotate(-25deg); }
[data-theme="dark"] .tt-rays { transform: rotate(120deg) scale(.5); opacity: 0; }
[data-theme="dark"] .tt-disc { box-shadow: 0 0 8px rgba(255, 240, 200, .45); }
[data-theme="dark"] .tt-disc::before, [data-theme="dark"] .tt-disc i { opacity: 1; }
[data-theme="dark"] .tt-disc::after { transform: translate(42%, -30%); }
@keyframes tt-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Theme change: a circle of the new theme spreads from the switch (main.js),
   or a quick colour fade where view transitions aren't supported. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-fade *:not(.theme-toggle, .theme-toggle *),
.theme-fade *:not(.theme-toggle, .theme-toggle *)::before,
.theme-fade *:not(.theme-toggle, .theme-toggle *)::after {
  transition: background-color .45s var(--ease), border-color .45s var(--ease), color .45s var(--ease), box-shadow .45s var(--ease) !important;
}

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(closest-side, rgba(70, 84, 154, .13), rgba(0, 179, 176, .05) 55%, transparent);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 64px); align-items: center; position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; margin-bottom: 22px;
  background: var(--panel); border: 1px solid var(--outline); border-radius: 999px;
  font-size: 14px; font-weight: 800; color: var(--ink);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(56, 133, 89, .18); }

h1 { font-size: clamp(42px, 6.4vw, 76px); letter-spacing: -.035em; }
.lede { margin-top: 20px; font-size: clamp(17px, 1.6vw, 19.5px); color: var(--muted); max-width: 36em; }

.waitlist-card {
  margin-top: 30px; padding: 20px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  scroll-margin-top: 100px;
}
.waitlist-card.is-highlighted { animation: highlight 1.2s var(--ease); }
@keyframes highlight {
  0% { box-shadow: 0 0 0 0 rgba(0, 179, 176, .55), var(--shadow-lg); }
  100% { box-shadow: 0 0 0 18px rgba(0, 179, 176, 0), var(--shadow-lg); }
}
.field-label { display: block; font-weight: 800; font-size: 15.5px; margin-bottom: 10px; }
.field-row { display: flex; gap: 10px; }
.email-input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--outline); border-radius: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.email-input::placeholder { color: var(--placeholder); }
.email-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(20, 120, 140, .14); }
.email-input[aria-invalid="true"] { border-color: var(--coral); }

.device-choice { border: 0; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.device-choice legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.device-choice legend span { font-weight: 600; opacity: .8; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 6px 13px;
  border: 1.5px solid var(--outline); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 700; transition: all .15s;
}
.chip:hover span { border-color: var(--outline-strong); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.form-status { min-height: 0; font-size: 14.5px; font-weight: 700; color: var(--coral); }
.form-status:not(:empty) { margin-top: 12px; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.waitlist-success { display: flex; align-items: center; gap: 16px; }
.waitlist-success[hidden] { display: none; }
.waitlist-success:focus { outline: none; }
.waitlist-success img { width: 60px; height: auto; flex: none; animation: hop .7s var(--ease) 2; }
.success-title { font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.waitlist-success p:not(.success-title) { color: var(--muted); }

.fine-print { margin-top: 14px; font-size: 13.5px; color: var(--muted); padding-left: 4px; }

@media (max-width: 540px) {
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
  .waitlist-card { padding: 16px; }
}

/* Stage: "The Moon Sing" ---------------------------------------------------
   Everything inside .stage is laid out on a 1000 x 900 canvas, the same one the
   scene SVGs use (tool/make_hero_scene.py). One canvas unit is .1cqw. */
.hero-stage-wrap { display: flex; flex-direction: column; align-items: center; }
.stage-frame { width: 100%; container-type: inline-size; }
.stage {
  --u: .1cqw;
  position: relative; width: 100%; aspect-ratio: 1000 / 900;
  border-radius: 36px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(42% 38% at 50% 50%, rgba(255, 222, 168, .20), transparent 72%),
    linear-gradient(180deg, #0F1538 0%, #18214F 28%, #283574 52%, #46549A 68%, #2E3A73 100%);
  box-shadow: 0 46px 80px -34px rgba(20, 28, 64, .62), 0 14px 30px -12px rgba(20, 28, 64, .28);
}
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 8; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 38%, transparent 58%, rgba(6, 10, 30, .38));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.stage .layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage .sky { z-index: 1; }
.stage .hills { z-index: 3; }

.moon { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.moon img { position: absolute; inset: 0; width: 100%; height: 100%; }
.moon-halo {
  position: absolute; left: 50%; top: 50.2%; width: calc(560 * var(--u)); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 196, .42) 52%, rgba(255, 226, 170, .12) 72%, transparent);
  transition: opacity 1.2s var(--ease), transform 1.6s var(--ease);
  opacity: .8;
}
.stage.is-chord .moon-halo { opacity: 1; transform: translate(-50%, -50%) scale(1.22); }

/* Fireflies drifting over the grass */
.fireflies { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.fireflies i {
  position: absolute; width: calc(7 * var(--u)); aspect-ratio: 1; border-radius: 50%;
  background: #F6FBC4; box-shadow: 0 0 calc(14 * var(--u)) calc(4 * var(--u)) rgba(226, 244, 140, .55);
  animation: drift var(--d, 11s) ease-in-out infinite alternate, flicker 2.8s ease-in-out var(--f, 0s) infinite;
}
.fireflies i:nth-child(1) { left: 8%;  top: 74%; --d: 13s; --f: -.4s; }
.fireflies i:nth-child(2) { left: 34%; top: 66%; --d: 10s; --f: -1.6s; }
.fireflies i:nth-child(3) { left: 61%; top: 70%; --d: 14s; --f: -.9s; }
.fireflies i:nth-child(4) { left: 88%; top: 72%; --d: 12s; --f: -2.2s; }
.fireflies i:nth-child(5) { left: 20%; top: 92%; --d: 15s; --f: -1.1s; }
.fireflies i:nth-child(6) { left: 75%; top: 93%; --d: 11s; --f: -.2s; }
.fireflies i:nth-child(7) { left: 49%; top: 61%; --d: 16s; --f: -1.9s; width: calc(5 * var(--u)); }
@keyframes drift {
  0%   { translate: 0 0; }
  33%  { translate: calc(26 * var(--u)) calc(-18 * var(--u)); }
  66%  { translate: calc(-12 * var(--u)) calc(-34 * var(--u)); }
  100% { translate: calc(18 * var(--u)) calc(-8 * var(--u)); }
}
@keyframes flicker { 0%, 100% { opacity: .15; } 45%, 60% { opacity: .95; } }

/* The singers stand on the front hill */
.singer {
  --height: calc(360 * var(--u) * var(--h));
  position: absolute; z-index: 5;
  left: calc(var(--x) * var(--u) - var(--height) * var(--w) / 2);
  bottom: calc((900 - var(--foot)) * var(--u));
  height: var(--height); aspect-ratio: var(--w);
  padding: 0; margin: 0; border: 0; background: none; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: arrive .9s cubic-bezier(.34, 1.5, .64, 1) calc(.55s + var(--i) * .16s) both;
}
.singer img {
  position: relative; z-index: 1; height: 100%; width: auto; margin: 0 auto;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 calc(6 * var(--u)) calc(6 * var(--u)) rgba(5, 12, 30, .35));
  animation: breathe 3.6s ease-in-out calc(var(--i) * -1.2s) infinite;
  transition: translate .35s var(--ease);
}
.singer:hover img { translate: 0 -3%; }
.singer:focus-visible { outline: 3px solid #FFF4D6; outline-offset: 6px; border-radius: 18px; }
.singer .shadow {
  position: absolute; left: 50%; bottom: calc(-10 * var(--u)); width: 78%; height: calc(26 * var(--u));
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(4, 18, 20, .55), transparent);
}
/* A ring of the singer's colour spreads across the grass when it sings */
.singer .shadow::after {
  content: ""; position: absolute; inset: -10% -6%; border-radius: 50%;
  border: calc(3 * var(--u)) solid var(--g); opacity: 0;
}
.singer.is-singing .shadow::after { animation: ground-ring 1.1s var(--ease); }
.singer.is-singing img { animation: hop .55s var(--ease); }
.singer.is-humming img { animation: hum 1.2s ease-in-out; }
.tag {
  position: absolute; z-index: 2; top: calc(100% + 8 * var(--u)); left: 50%; transform: translateX(-50%);
  min-width: 2.3em; padding: .15em .7em; text-align: center;
  background: var(--c); color: var(--t); border-radius: 999px;
  font-weight: 900; font-size: clamp(12px, calc(30 * var(--u)), 16px); line-height: 1.35;
  box-shadow: 0 0 0 2px rgba(255, 248, 230, .92), 0 4px 10px rgba(0, 0, 0, .25);
  transition: box-shadow .3s;
}
.singer.is-singing .tag { box-shadow: 0 0 0 2px #fff, 0 0 18px 4px var(--g); }

@keyframes arrive { from { opacity: 0; transform: translateY(8%) scale(.92); } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, .988); } }
@keyframes hum { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.5deg) translateY(-2%); } 65% { transform: rotate(1.5deg); } }
@keyframes ground-ring { 0% { opacity: .9; transform: scale(.55); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes hop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  30% { transform: translateY(-14%) scale(.97, 1.03); }
  60% { transform: translateY(0) scale(1.03, .97); }
}

/* Music in the sky: a staff, the three notes, and the sparks that light them */
.sky-music { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.sky-music * { transform-box: fill-box; transform-origin: center; }
.staff path { fill: none; stroke: url(#staff-fade); stroke-width: 2; opacity: .34; transition: opacity .6s; }
.stage.is-playing .staff path { opacity: .5; }
.staff-chord path { fill: none; stroke: url(#staff-chord); stroke-width: 2.6; opacity: 0; filter: url(#glow); stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.stage.is-chord .staff-chord path { animation: staff-sweep 2.4s var(--ease) forwards; }
@keyframes staff-sweep { 0% { opacity: .95; stroke-dashoffset: 1; } 45% { opacity: .95; stroke-dashoffset: 0; } 100% { opacity: .55; stroke-dashoffset: 0; } }

.note-body { animation: note-in .7s var(--ease) calc(1.25s + var(--i) * .18s) both; }
@keyframes note-in { from { opacity: 0; transform: scale(.4); } }
.note-halo { fill: var(--g); opacity: 0; filter: url(#soft); transition: opacity .5s; }
.note-head { fill: var(--g); fill-opacity: 0; stroke: var(--g); stroke-width: 2.2; stroke-opacity: .5; transition: fill-opacity .35s, stroke-opacity .35s; }
.note-sharp { fill: none; stroke: var(--g); stroke-linecap: round; opacity: .5; transition: opacity .35s; }
.note-sparkle { fill: #FFFBEF; opacity: 0; transform: scale(.3) rotate(0deg); transition: opacity .4s, transform .8s var(--ease); }
.note.is-hint .note-head { stroke-opacity: .95; }
.note.is-lit .note-halo { opacity: .85; }
.note.is-lit .note-head { fill-opacity: 1; stroke: #FFFBEF; stroke-opacity: 1; stroke-width: 2.6; filter: url(#glow); }
.note.is-lit .note-sharp { opacity: 1; }
.note.is-lit .note-sparkle { opacity: .9; transform: scale(1) rotate(45deg); }
.stage.is-chord .note.is-lit .note-body { animation: chord-pulse 1.3s var(--ease) 2; }
@keyframes chord-pulse { 50% { transform: scale(1.22); } }

.chord-name {
  font-family: "Nunito", ui-rounded, system-ui, sans-serif; font-weight: 900; font-size: 30px; letter-spacing: .02em;
  fill: #FFF4D6; opacity: 0; transform: translateY(10px); transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.stage.is-chord .chord-name { opacity: .95; transform: none; transition-delay: .5s; }

.spark { fill: #FFFBEF; stroke: var(--g); stroke-width: 3; filter: url(#glow); }
.trail { fill: var(--g); animation: trail .75s ease-out forwards; }
@keyframes trail { from { opacity: .85; } to { opacity: 0; transform: scale(.2) translateY(6px); } }
.burst { fill: none; stroke: var(--g); stroke-width: 2.5; animation: burst .9s var(--ease) forwards; }
@keyframes burst { from { opacity: .95; transform: scale(.5); } to { opacity: 0; transform: scale(2.6); } }
.glint { fill: var(--g); filter: url(#glow); }
.hum-note { fill: var(--g); }
.hum-note path:last-child { fill: none; stroke: var(--g); stroke-width: 2.4; stroke-linecap: round; }

.play-btn { margin-top: 22px; }
.play-btn.is-playing { background: var(--ink); color: var(--on-ink); }
.stage-caption { margin-top: 14px; font-size: 14.5px; color: var(--muted); text-align: center; max-width: 34em; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage-wrap { max-width: 560px; margin: 0 auto; width: 100%; }
  .hero-copy { text-align: left; }
}
@media (max-width: 540px) { .stage { border-radius: 26px; } }

/* Sections --------------------------------------------------------------- */
.section { padding: clamp(64px, 9vw, 112px) 0; scroll-margin-top: 60px; }
.section-panel { background: var(--panel); border-top: 1px solid var(--outline); border-bottom: 1px solid var(--outline); }
.section-head { max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.kicker { font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
h2 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -.03em; }
.section-head p:not(.kicker) { margin-top: 16px; color: var(--muted); font-size: 18px; }

/* Note grid */
.note-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.note-key {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 18px 10px 14px; min-height: 176px;
  background: var(--panel); border: 1px solid var(--outline); border-radius: var(--radius);
  font: inherit; color: var(--ink); cursor: pointer; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.note-key:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--edge); }
.note-key::before {
  content: ""; position: absolute; top: 18px; left: 50%; width: 92px; aspect-ratio: 1;
  transform: translateX(-50%) scale(.9); border-radius: 50%;
  background: var(--d, var(--c)); opacity: .3; transition: opacity .25s, transform .35s var(--ease);
}
.note-key img { position: relative; height: 92px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(31, 43, 49, .1)); }
.note-key .note-name {
  position: relative; margin-top: 12px; padding: 2px 12px; border-radius: 999px;
  background: var(--c); color: var(--t); font-weight: 900; font-size: 16px;
}
.note-key .animal-name { margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.note-key.is-playing::before { opacity: .95; transform: translateX(-50%) scale(1.25); }
.note-key.is-playing img { animation: hop .55s var(--ease); }
.note-key .ripple {
  position: absolute; top: 64px; left: 50%; width: 92px; aspect-ratio: 1; border-radius: 50%;
  border: 3px solid var(--d, var(--c)); transform: translate(-50%, -50%) scale(.6); opacity: .9;
  animation: ripple .9s var(--ease) forwards; pointer-events: none;
}
@keyframes ripple { to { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }

@media (max-width: 900px) { .note-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) {
  .note-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .note-key { min-height: 150px; padding: 14px 6px 12px; }
  .note-key::before { width: 72px; top: 14px; }
  .note-key img { height: 72px; }
  .note-key .ripple { width: 72px; top: 50px; }
}

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  padding: 22px 22px 26px; background: var(--cream); border: 1px solid var(--outline); border-radius: var(--radius);
}
.step-visual {
  height: 128px; margin-bottom: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--outline);
  display: flex; align-items: center; justify-content: center; gap: 18px; overflow: hidden;
}
.step-num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px;
  border-radius: 50%; background: var(--ink); color: var(--on-ink); font-weight: 900; font-size: 14px;
}
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p:not(.step-num) { color: var(--muted); }

.pip {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--c); font-weight: 900; font-size: 20px; color: #1F2B31;
  opacity: .35; transform: scale(.85); transition: opacity .3s, transform .4s var(--ease);
}
.pip.is-on { opacity: 1; transform: scale(1.08); }
[data-demo="slow"]:not(.is-active) .pip { opacity: .9; transform: none; }

.sweep { gap: 6px; align-items: flex-end; padding: 18px 14px; }
.sweep i {
  width: 7%; border-radius: 6px; background: var(--c); opacity: .35;
  transition: opacity .25s, transform .3s var(--ease); transform-origin: bottom;
}
.sweep i.is-on { opacity: 1; transform: scaleY(1.08); }

.wave { gap: 5px; }
.wave span {
  width: 6px; border-radius: 4px; background: linear-gradient(180deg, var(--teal), var(--accent));
  height: 30%; animation: wave 1.6s ease-in-out infinite;
}
.wave span:nth-child(2n) { animation-delay: -.3s; } .wave span:nth-child(3n) { animation-delay: -.7s; }
.wave span:nth-child(5n) { animation-delay: -1.1s; } .wave span:nth-child(7n) { animation-delay: -.5s; }
@keyframes wave { 0%, 100% { height: 18%; } 50% { height: 68%; } }

@media (max-width: 900px) { .steps { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

.scenes { margin-top: 40px; text-align: center; }
.scenes-title { font-weight: 800; margin-bottom: 14px; }
.scene-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.scene-list li {
  padding: 8px 16px; background: var(--cream); border: 1px solid var(--outline); border-radius: 999px;
  font-weight: 700; font-size: 15px;
}

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; grid-auto-flow: dense; }
.tile {
  position: relative; padding: 26px; background: var(--panel); border: 1px solid var(--outline);
  border-radius: var(--radius); overflow: hidden;
}
.tile h3 { font-size: 23px; margin-bottom: 8px; }
.tile p { color: var(--muted); }
.tile-kicker { font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--accent) !important; margin-bottom: 6px; }
.tile-icon {
  width: 60px; height: 60px; margin-bottom: 18px; border-radius: 18px;
  display: grid; place-items: center; font-size: 30px;
  background: var(--cream); border: 1px solid var(--outline);
}
.tile-icon img { width: 44px; height: 44px; object-fit: contain; }
.tile-icon.interval { display: flex; gap: 6px; align-items: flex-end; justify-content: center; padding-bottom: 14px; }
.tile-icon.interval span { width: 12px; border-radius: 4px; background: var(--c); }
.tile-icon.interval span:first-child { height: 14px; } .tile-icon.interval span:last-child { height: 30px; }
.tile-note {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px;
  background: rgba(56, 133, 89, .08); border-radius: 12px; font-size: 14px; color: var(--green) !important; font-weight: 700;
}
.tile-note svg { width: 16px; height: 16px; fill: currentColor; flex: none; margin-top: 2px; }

.tile-story {
  grid-column: span 2; grid-row: span 2;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  background: linear-gradient(180deg, var(--story-a) 0%, var(--story-b) 100%);
  border-color: var(--story-edge);
}
.tile-story h3 { font-size: clamp(28px, 3vw, 36px); }
.tile-story .tile-text > p:not(.tile-kicker) { max-width: 36em; font-size: 17px; }
.tile-story blockquote {
  margin: 18px 0 0; padding: 14px 18px; border-left: 4px solid var(--coral);
  background: var(--story-quote); border-radius: 0 14px 14px 0;
  font-style: italic; font-weight: 700; color: var(--ink);
}
.moods { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.moods li { padding: 5px 12px; background: var(--surface); border-radius: 999px; font-size: 14px; font-weight: 700; border: 1px solid var(--story-edge); }
.story-cast { --base: clamp(120px, 15vw, 190px); display: flex; align-items: flex-end; justify-content: center; gap: 2%; padding-top: 8px; }
.story-cast img { height: calc(var(--base) * var(--h)); width: auto; filter: drop-shadow(0 8px 6px rgba(31, 43, 49, .12)); }

.tile-night {
  background: linear-gradient(135deg, var(--night) 0%, var(--night-2) 100%);
  border-color: var(--night);
  color: #fff; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end;
}
.tile-night h3 { color: #fff; font-size: 26px; }
.tile-night p { color: rgba(255, 255, 255, .78); max-width: 30em; }
.tile-night .tile-kicker { color: rgba(255, 255, 255, .62) !important; }
.tile-night .moon { position: absolute; inset: 22px 28px auto auto; font-size: 52px; filter: drop-shadow(0 0 18px rgba(255, 230, 160, .55)); }
.stars {
  position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent),
    radial-gradient(1px 1px at 28% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 30%, #fff, transparent),
    radial-gradient(1px 1px at 58% 14%, #fff, transparent),
    radial-gradient(2px 2px at 70% 34%, #FFE9A8, transparent),
    radial-gradient(1px 1px at 82% 56%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 36% 50%, #fff, transparent),
    radial-gradient(1px 1px at 90% 20%, #fff, transparent),
    radial-gradient(1px 1px at 6% 60%, #fff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .5; } to { opacity: .95; } }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-story { grid-column: span 2; grid-row: auto; }
  .tile-night { grid-column: span 2; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .tile-story, .tile-night { grid-column: auto; }
  .story-cast { --base: 100px; }
  .tile { padding: 22px; }
}

/* Trust */
.trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust li { padding: 24px; background: var(--cream); border: 1px solid var(--outline); border-radius: var(--radius); }
.trust-icon { display: block; font-size: 30px; margin-bottom: 14px; }
.trust h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -.01em; }
.trust p { color: var(--muted); font-size: 15.5px; }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .trust { grid-template-columns: 1fr; } }

/* FAQ */
.faq-wrap { max-width: 780px; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--outline); border-radius: 18px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); border-color: var(--edge); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; position: relative;
  font-weight: 800; font-size: 17.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

/* CTA */
.cta { padding: 0 0 clamp(64px, 9vw, 112px); }
.cta-inner {
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--wrap) - 2 * var(--gutter));
  padding: 48px var(--gutter) 56px;
  text-align: center;
  background: linear-gradient(160deg, var(--cta-a) 0%, var(--cta-b) 100%);
  border: 1px solid var(--edge); border-radius: 36px; box-shadow: var(--shadow-lg);
}
.cta h2 { margin-top: 10px; }
.cta p { margin: 14px auto 26px; color: var(--muted); font-size: 18px; max-width: 30em; }
.cta-parade { display: flex; justify-content: center; align-items: flex-end; gap: clamp(6px, 2vw, 18px); }
.cta-parade img { height: clamp(56px, 9vw, 90px); width: auto; filter: drop-shadow(0 6px 5px rgba(31, 43, 49, .12)); }
.cta-parade img:nth-child(odd) { animation: bob 3s ease-in-out infinite; }
.cta-parade img:nth-child(even) { animation: bob 3s ease-in-out -1.5s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Footer */
.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--outline); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-logo { height: 22px; width: auto; filter: var(--logo-filter); }
.site-footer p { color: var(--muted); font-size: 14px; }

/* Thanks page */
.thanks { min-height: 100vh; display: grid; place-items: center; padding: 32px var(--gutter); text-align: center; }
.thanks-card { max-width: 480px; padding: 40px 28px; background: var(--panel); border: 1px solid var(--edge); border-radius: 30px; box-shadow: var(--shadow-lg); }
.thanks-card img.logo { height: 30px; width: auto; margin: 0 auto 28px; filter: var(--logo-filter); }
.thanks-card img.duck { height: 110px; width: auto; margin: 0 auto 18px; animation: hop .7s var(--ease) 2; }
.thanks-card h1 { font-size: 36px; }
.thanks-card p { margin: 12px 0 26px; color: var(--muted); }

/* Reveal on scroll (only when JS has opted in) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Three ways, wide tiles, age bands ------------------------------------- */
.step-pair { gap: 4px; align-items: flex-end; padding-top: 14px; }
.step-pair img { height: calc(112px * var(--h, 1)); width: auto; filter: drop-shadow(0 6px 5px rgba(31, 43, 49, .12)); }
a.text-btn { text-decoration: none; }
.tile-span2 { grid-column: span 2; }
.tile-wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .tile-span2 { grid-column: auto; } }
.trust.ages { grid-template-columns: repeat(5, 1fr); }
.trust .age-range { margin: -4px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .04em; color: var(--accent); }
@media (max-width: 1080px) { .trust.ages { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .trust.ages { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .trust.ages { grid-template-columns: 1fr; } }
