/* Twirly pre-launch site, style A mockup: warm, flat, friendly.
   Cream page, deep plum text, a violet pebble "you" and an orange ball of sound.
   Flat filled shapes, soft flat shadows, no outlines. Light theme only.
   Motion styles only apply under html.moving (set in <head>). */

/* ---------- fonts (self-hosted, SIL OFL: see fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700; font-stretch: 75% 100%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  /* the picture */
  --you: #7468dc;             /* the pebble: shapes only, never small text */
  --orange: #ff7438;          /* the sound: shapes only */
  --mint: #5fc796;
  --yellow: #ffc44d;
  --pink: #f7a6a0;
  --lilac: #e7e2ff;

  /* page */
  --bg: #fbefe2;              /* warm cream */
  --bg-raise: #fffaf4;        /* cards, fields */
  --bg-sunk: #f6e3d0;         /* the demo section */
  --peach: #f9e0c8;           /* big flat discs, the sign-up band */
  --peach-2: #f6d4b6;
  --ink: #2a2140;             /* deep plum: 13.3:1 on cream */
  --ink-2: #554a66;           /* 7.3:1 on cream, 6.5:1 on peach */
  --ink-3: #665b72;           /* 5.6:1 on cream, 5.0:1 on peach and sunk */
  --violet-ink: #4f40c4;      /* violet text and focus rings: 6.5:1 on cream */
  --orange-ink: #a8410f;      /* orange text: 5.4:1 on cream */
  --line: rgba(42, 33, 64, .1);
  --line-2: rgba(42, 33, 64, .2);
  --field: #fffaf4;
  --danger: #b42318;          /* 5.2:1 on peach */
  --ok: #1a6a44;              /* 5.2:1 on peach */
  --accent-ink: var(--violet-ink);
  --btn: #2a2140;
  --btn-ink: #fff6ec;         /* 14:1 on the button */

  --shadow: 0 10px 0 -4px rgba(150, 92, 52, .10), 0 18px 40px -18px rgba(150, 92, 52, .35);
  --shadow-sm: 0 5px 0 -2px rgba(150, 92, 52, .10), 0 12px 24px -14px rgba(150, 92, 52, .4);

  --font: "Instrument Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", ui-serif, "New York", Georgia, "Times New Roman", serif;

  --nav-h: 64px;
  --gutter: 16px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 56px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;               /* clip, not hidden: hidden would break the sticky stages */
  scroll-padding-top: var(--nav-h);
  background: var(--bg);
}
html.still { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html.moving { scroll-behavior: smooth; } }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, blockquote, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
img, svg, canvas { display: block; }
button, input { font: inherit; color: inherit; }
::selection { background: rgba(116, 104, 220, .3); color: var(--ink); }

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

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--btn-ink); padding: 10px 16px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- type ---------- */
.h-xl {
  font-size: clamp(2.75rem, 1.2rem + 5.6vw, 6.5rem);
  font-weight: 650;
  letter-spacing: -.035em; line-height: .98;
  text-wrap: balance;
}
.h-lg {
  font-size: clamp(2.25rem, 1.2rem + 3.4vw, 4.25rem);
  font-weight: 650;
  letter-spacing: -.035em; line-height: 1;
}
.ser, .beat-line em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  letter-spacing: -.01em; font-size: 1.1em;
}
.lede {
  font-size: clamp(1.1875rem, 1rem + .8vw, 1.5rem);
  line-height: 1.4; letter-spacing: -.01em;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -.005em; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, transform .2s var(--ease-out), box-shadow .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { background: #3b2f5a; transform: translateY(-1px); }
.btn-lg { height: 56px; padding: 0 30px; font-size: 17px; }
.btn-quiet { background: var(--bg-raise); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-quiet:hover { transform: translateY(-1px); }
.btn:disabled { background: #efe2d4; color: var(--ink-3); box-shadow: none; cursor: default; transform: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  color: var(--ink);
  transition: background-color .35s, box-shadow .35s, backdrop-filter .35s;
}
.nav.is-solid {
  background: rgba(251, 239, 226, .88);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
  font-size: 19px; font-weight: 650; letter-spacing: -.01em;
}
.logo { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--ink-2); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta {
  color: var(--btn-ink); background: var(--btn);
  height: 38px; padding: 0 18px; border-radius: 999px;
  display: inline-flex; align-items: center; font-weight: 600;
}
.nav-links .nav-cta:hover { background: #3b2f5a; color: var(--btn-ink); }
@media (max-width: 640px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---------- sign-up capsule ---------- */
.capsule { width: 100%; max-width: 460px; }
.capsule-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--field);
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.capsule-row:focus-within { box-shadow: 0 0 0 3px rgba(79, 64, 196, .5), var(--shadow); }
.capsule input[type=email] {
  flex: 1 1 auto; min-width: 0; height: 48px;
  padding: 0 8px 0 18px;
  border: 0; background: transparent; outline: none;
  font-size: 16px; color: var(--ink);
}
.capsule input[type=email]::placeholder { color: var(--ink-3); opacity: 1; }
.capsule input[aria-invalid=true] { color: var(--danger); }
.capsule .btn { flex: none; }
.capsule .btn:hover { transform: none; }
.capsule-lg { max-width: 520px; }
.capsule-lg input[type=email] { height: 56px; font-size: 17px; }
.capsule-lg .btn { height: 56px; padding: 0 28px; font-size: 17px; }
.consent { margin-top: 14px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.consent a { color: inherit; }
.form-msg { margin-top: 6px; font-size: 15px; min-height: 1.4em; }
.form-msg.err { color: var(--danger); }
.form-msg.ok { color: var(--ok); font-weight: 600; }
.form-msg .note { display: block; color: var(--ink-3); font-weight: 400; font-size: 13px; }
.capsule.done .capsule-row, .capsule.done .consent { display: none; }
.capsule.done .form-msg { font-size: 18px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* =====================================================================
   1. THE FILM
   ===================================================================== */
.film { position: relative; background: var(--bg); color: var(--ink); }
.stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.moving .stage, .still .film-stage { position: sticky; top: 0; }   /* still: the frame holds behind the words and cuts between beats */
.stage-inner { position: absolute; inset: 0; }

/* the warm disc behind the pebble: placed by js/motion.js */
.sun {
  position: absolute; left: 0; top: 0; z-index: 0;
  width: 1000px; height: 1000px; border-radius: 50%;
  background: var(--peach);
  transform-origin: 0 0;
  will-change: transform;
}
.sun i { position: absolute; left: 790px; top: -56px; width: 242px; height: 242px; border-radius: 50%; background: var(--peach-2); }

.listener { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.frags { position: absolute; inset: 0; pointer-events: none; }
.frags-back { z-index: 1; }
.frags-front { z-index: 3; }

/* text that scrolls over the stage */
.film-track { position: relative; z-index: 5; margin-top: -100vh; margin-top: -100svh; }
.beat {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 var(--gutter);
  text-align: center;
}
.beat-long { min-height: 150vh; min-height: 150svh; }
.beat-end { min-height: 120vh; min-height: 120svh; }
.beat > * { will-change: opacity, transform; }
.beat-line {
  position: relative;
  max-width: 13ch;
  font-size: clamp(2.5rem, 1rem + 5vw, 5.75rem);
  font-weight: 650;
  letter-spacing: -.035em; line-height: 1;
  text-wrap: balance;
  text-shadow: 0 0 18px var(--bg), 0 0 36px var(--bg);
}
.beat-line em { color: var(--violet-ink); }
.beat-sub {
  margin-top: 20px; max-width: 28ch;
  font-size: clamp(1.125rem, .95rem + .6vw, 1.4375rem);
  line-height: 1.38; letter-spacing: -.008em;
  color: var(--ink-2);
  text-wrap: balance;
  text-shadow: 0 0 14px var(--bg), 0 0 28px var(--bg);
}

/* hero: phones and small tablets put the pebble on top, the words underneath */
.hero {
  justify-content: flex-end; align-items: stretch;
  text-align: left;
  padding-top: var(--nav-h);
  padding-bottom: 22px;
}
.hero-top, .hero-bottom { display: flex; flex-direction: column; align-items: flex-start; }
.hero-bottom { margin-top: 14px; }
.hero-title {
  font-size: clamp(2.75rem, 12.5vw, 3.5rem);
  font-weight: 650;
  letter-spacing: -.035em; line-height: .98;
  text-wrap: balance;
}
.hero-title .ser { font-size: 1.12em; }
.hero-sub {
  margin-top: 14px;
  max-width: 30em;
  font-size: 18px; line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero-when { font-size: 14px; font-weight: 550; color: var(--ink-3); }
.hero .capsule { margin-top: 14px; }
.hero .consent { margin-top: 12px; }
.hero .form-msg { min-height: 0; }
.cue {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
  color: var(--ink); text-decoration: none; font-weight: 650;
  transition: color .2s;
}
.cue:hover { color: var(--violet-ink); }
.cue svg { width: 10px; height: 15px; }
.moving .cue svg { animation: cue 2.4s var(--ease-out) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(2px); } }

/* phones: the story's words sit under the pebble (their middle at ~70% of the screen) */
@media (max-width: 899px) {
  .beat:not(.hero) { padding-top: 40vh; padding-top: 40svh; }
  .beat-line { font-size: clamp(2.25rem, 1rem + 5.6vw, 3.5rem); }
  .beat-sub { margin-top: 14px; }
}

/* wide screens: words on the left, the pebble on the right (like the hero draft) */
@media (min-width: 900px) {
  .beat { align-items: flex-start; text-align: left; padding-right: 56%; }
  .beat-line { max-width: 11ch; font-size: clamp(3rem, 1rem + 3.9vw, 5.5rem); }
  .beat-sub { max-width: 24ch; }
  .hero { justify-content: center; padding-right: 54%; padding-bottom: 40px; }
  .hero-top, .hero-bottom { max-width: 560px; }
  .hero-title { font-size: clamp(60px, 6.4vw, 96px); }
  .hero-sub { margin-top: 24px; font-size: 20px; }
  .hero-bottom { margin-top: 28px; }
  .hero-when { font-size: 15px; }
}

/* fragments: the noise, as friendly flat cards */
.frag {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px; line-height: 1.25; letter-spacing: -.005em;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  backface-visibility: hidden;
  contain: layout style;
  opacity: 0;
}
.still .frag { will-change: auto; }
.f-tab {
  height: 36px; padding: 0 13px 0 12px;
  border-radius: 12px 12px 5px 5px;
  background: var(--bg-raise);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}
.f-tab::after { content: ""; width: 7px; height: 7px; margin-left: 8px; opacity: .45;
  background: linear-gradient(45deg, transparent 40%, currentColor 40% 60%, transparent 60%), linear-gradient(-45deg, transparent 40%, currentColor 40% 60%, transparent 60%); }
.f-fav { width: 14px; height: 14px; border-radius: 5px; flex: none; background: var(--c, #b9aab0); }
.f-note {
  width: 236px; padding: 12px 14px; gap: 11px; align-items: flex-start; white-space: normal;
  border-radius: 20px;
  background: var(--bg-raise);
  box-shadow: var(--shadow);
}
.f-note .f-app { width: 28px; height: 28px; border-radius: 9px; flex: none; background: var(--c, #b9aab0); }
.f-note b { display: block; font-size: 12px; font-weight: 650; color: var(--ink); }
.f-note span span { display: block; font-size: 13px; color: var(--ink-2); }
.f-badge {
  width: 32px; height: 32px; justify-content: center;
  border-radius: 999px; background: var(--orange); color: var(--ink);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px var(--bg);
}
.f-badge.wide { width: auto; padding: 0 10px; }
.f-todo { font-size: 15px; font-weight: 500; color: var(--ink); }
.f-todo::before { content: ""; width: 17px; height: 17px; border-radius: 6px; background: var(--peach-2); }
.f-thought {
  padding: 6px 18px 9px;
  border-radius: 999px;
  background: var(--bg-raise);
  box-shadow: var(--shadow-sm);
  font-family: var(--serif); font-style: italic; font-size: 21px; letter-spacing: -.005em; color: var(--ink);
}
.f-thought::before, .f-thought::after { content: ""; position: absolute; border-radius: 50%; background: var(--bg-raise); }
.f-thought::before { left: 16px; bottom: -9px; width: 12px; height: 12px; }
.f-thought::after { left: 8px; bottom: -17px; width: 7px; height: 7px; }
.f-timer { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--bg-raise); box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.f-timer::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.f-doc {
  flex-direction: column; align-items: flex-start; gap: 5px;
  width: 180px; padding: 15px 17px 17px;
  border-radius: 18px; background: var(--bg-raise); color: var(--ink);
  box-shadow: var(--shadow);
}
.f-doc b { font-size: 13px; font-weight: 650; }
.f-doc span { font-size: 11px; color: var(--ink-3); }
.f-doc i { display: block; }
.f-doc i.caret { width: 2px; height: 18px; margin-top: 6px; border-radius: 1px; background: var(--you); }
.moving .f-doc i.caret { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* "now playing" card (the songs beat) */
.now-playing {
  position: absolute; left: 0; top: 0; z-index: 4;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 10px;
  border-radius: 22px;
  background: var(--bg-raise);
  box-shadow: var(--shadow);
  opacity: 0;
  will-change: transform, opacity;
}
.np-art {
  width: 44px; height: 44px; border-radius: 14px;
  background: radial-gradient(circle at 68% 34%, var(--yellow) 0 24%, transparent 25%), var(--orange);
}
.np-text { display: flex; flex-direction: column; font-size: 14px; color: var(--ink-2); }
.np-text b { color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.np-bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; margin-left: 6px; }
.np-bars i { width: 4px; height: 40%; border-radius: 2px; background: var(--orange); }
.moving .np-bars i { animation: np 1s ease-in-out infinite alternate; }
.np-bars i:nth-child(2) { animation-delay: -.35s; height: 80%; }
.np-bars i:nth-child(3) { animation-delay: -.6s; height: 55%; }
.np-bars i:nth-child(4) { animation-delay: -.15s; height: 70%; }
@keyframes np { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.np-bars i { transform-origin: 50% 100%; }

/* the flat line of silence, through the pebble's ears */
.wave { position: absolute; left: 0; top: 50%; z-index: 1; width: 100%; height: 120px; margin-top: -60px; opacity: 0; overflow: visible; }
.wave path { fill: none; stroke: var(--ink); stroke-opacity: .28; stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
@media (min-width: 900px) { .wave { left: 46%; width: 50%; } }


/* =====================================================================
   2. EXPLODED VIEW
   ===================================================================== */
.layers { position: relative; background: var(--bg); color: var(--ink); }
.moving .layers { height: 400vh; height: 400svh; }
.layers-head {
  position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--nav-h) + 4svh);
  padding: 0 var(--gutter);
  text-align: center;
  will-change: opacity, transform;
}
.layers-head .lede { margin-top: 14px; }
.stack {
  position: absolute; inset: 0; z-index: 2;
  --plate-w: min(42vw, 540px, 60svh);
  --label-w: clamp(200px, calc((100vw - var(--plate-w)) / 2 - 64px - var(--gutter)), 300px);
}
.stack::before {                                 /* a big flat disc behind the plates */
  content: ""; position: absolute; left: 50%; top: 57%;
  width: calc(var(--plate-w) * 1.5); aspect-ratio: 1; border-radius: 50%;
  background: var(--peach);
  transform: translate(-50%, -50%);
}
.plates { position: absolute; left: 50%; top: 57%; width: 0; height: 0; }
.layer {
  position: absolute; top: 0; left: calc(var(--plate-w) / -2);
  width: var(--plate-w);
  will-change: transform;
}
.plate { width: 100%; height: auto; overflow: visible; }
.iso { transform: matrix(.7071, .3889, -.7071, .3889, 0, 0); }
.layer[data-layer="0"] { z-index: 4; }
.layer[data-layer="1"] { z-index: 3; }
.layer[data-layer="2"] { z-index: 2; }
.layer[data-layer="3"] { z-index: 1; }

/* each plate: one flat tint, a darker flat slab under it */
.layer[data-layer="0"] .base { fill: #ece8ff; }
.layer[data-layer="0"] .slab { fill: #c9c1f5; }
.layer[data-layer="1"] .base { fill: #fff3e6; }
.layer[data-layer="1"] .slab { fill: #ecc9aa; }
.layer[data-layer="2"] .base { fill: #e1f4ea; }
.layer[data-layer="2"] .slab { fill: #b3dcc6; }
.layer[data-layer="3"] .base { fill: #f3dcc4; }
.layer[data-layer="3"] .slab { fill: #d6af8b; }

.plate .track { fill: none; stroke: #d9d2ff; stroke-width: 26; }
.plate .p-orb { fill: var(--orange); }
/* the little pebble standing on the top plate (and the one in the maker note) */
.mini-floor { fill: #d9d2ff; }
.mini-body, .art-body { fill: var(--you); }
.mini-shade, .art-shade { fill: #6a5ed2; }
.mini-hi, .art-hi { fill: #8a7fe6; }
.mini-ink, .art-ink { fill: var(--ink); }
.mini-cheek, .art-cheek { fill: #ef8fa0; opacity: .55; }
.mini-warm, .art-warm { fill: var(--orange); }

.plate .lane { fill: #fbe3cc; }
.plate .beats rect { fill: #efc6a2; }
.plate .beats rect.on { fill: var(--orange); }
.plate .beat-dot { fill: var(--mint); }
.moving .plate .beats rect { transform-box: fill-box; transform-origin: 50% 50%; animation: beatbar 1.25s cubic-bezier(.2, .7, .3, 1) infinite; }
.moving .plate .beats rect:nth-child(4n+2) { animation-delay: -.95s; }
.moving .plate .beats rect:nth-child(4n+3) { animation-delay: -.62s; }
.moving .plate .beats rect:nth-child(4n) { animation-delay: -.3s; }
@keyframes beatbar { 0% { transform: scaleY(1.25); } 60%, 100% { transform: scaleY(.8); } }

.plate .win { fill: var(--bg-raise); }
.plate .win-bar { fill: #f1e2d3; }
.plate .tab-on { fill: var(--bg-raise); }
.plate .tab-off { fill: #e6d3c1; }
.plate .wave-ln { fill: none; stroke: var(--you); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.plate .scrub { fill: #efe0d1; }
.plate .scrub-on { fill: var(--you); }
.plate .knob { fill: var(--orange); }

.plate .noise-band { fill: #e7c5a2; }
.plate .noise-band.deep { fill: #dcb48d; }
.plate .grain circle { fill: #8a5a36; }

.stack-labels { position: absolute; left: 50%; top: 57%; width: 0; height: 0; }
.layer-label {
  position: absolute; top: 0;
  width: var(--label-w);
  will-change: transform, opacity;
}
.layer-label:nth-child(odd) { left: calc(var(--plate-w) / 2 + 60px); }
.layer-label:nth-child(even) { right: calc(var(--plate-w) / 2 + 60px); text-align: right; }
.layer-label h3 { font-size: clamp(1.25rem, 1rem + .7vw, 1.625rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.layer-label p { margin-top: 6px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.layer-num {
  display: inline-block; margin-bottom: 10px; padding: 3px 11px;
  border-radius: 999px; background: var(--lilac);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.layer-label:nth-child(2) .layer-num { background: #ffd9c4; }
.layer-label:nth-child(3) .layer-num { background: #cfeedd; }
.layer-label:nth-child(4) .layer-num { background: #f0d5b9; }
.layer-label::before {                                    /* a short flat leader towards the plate */
  content: ""; position: absolute; top: 50%; width: 44px; height: 3px; border-radius: 2px;
  background: var(--line-2);
  transform: scaleX(var(--lead, 1));
}
.layer-label:nth-child(odd)::before { right: calc(100% + 12px); transform-origin: 100% 50%; }
.layer-label:nth-child(even)::before { left: calc(100% + 12px); transform-origin: 0 50%; }
.layers-end {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: max(36px, 7svh);
  padding: 0 var(--gutter);
  text-align: center;
  font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); font-weight: 550; letter-spacing: -.01em; color: var(--ink-2);
  opacity: 0;
}

/* phones + small tablets: one caption at a time under the stack */
@media (max-width: 899px) {
  .stack { --plate-w: min(78vw, 400px, 44svh); }
  .plates, .stack::before { top: 47%; }
  .stack-labels { left: var(--gutter); right: var(--gutter); top: auto; bottom: max(28px, 5svh); width: auto; height: 0; }
  .layer-label, .layer-label:nth-child(odd), .layer-label:nth-child(even) {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; text-align: center;
  }
  .layer-label::before { display: none; }
  .layer-label p { max-width: 32ch; margin-left: auto; margin-right: auto; }
  .layers-end { bottom: max(40px, 7svh); }
}

/* still version: one calm exploded frame, every label visible */
.still .layers { height: auto; }
.still .layers-stage { height: auto; min-height: 0; overflow: visible; padding: calc(var(--nav-h) + 40px) 0 64px; }
.still .layers-head { position: relative; top: 0; }
.still .stack { position: relative; inset: auto; height: min(118vw, 700px); }   /* JS sets the exact height on desktop */
.still .plates, .still .stack-labels, .still .stack::before { top: 50%; }
.still .layers-end { position: relative; bottom: auto; opacity: 1; margin-top: 36px; }
@media (max-width: 899px) {
  .still .stack { height: auto; }
  .still .stack::before { top: min(60vw, 280px); }
  .still .plates { position: relative; left: auto; top: auto; width: auto; height: min(120vw, 560px); }
  .still .plates .layer { left: 50%; top: 50%; margin-left: calc(var(--plate-w) / -2); }
  .still .stack-labels { position: relative; inset: auto; height: auto; display: grid; gap: 22px; padding: 0 var(--gutter); }
  .still .layer-label { position: relative; inset: auto; }
}

/* =====================================================================
   3. THE MAKER
   ===================================================================== */
.maker { position: relative; padding: clamp(110px, 18svh, 200px) 0 clamp(90px, 14svh, 160px); background: var(--bg); }
.maker-wrap { max-width: 1120px; }
.maker-art { width: min(72vw, 320px); height: auto; margin: 40px auto 0; }
.art-sun { fill: var(--peach); }
.art-sun2 { fill: var(--peach-2); }
.art-orbit { fill: none; stroke: var(--peach-2); stroke-width: 12; }
.art-floor { fill: #efd2b8; }
.art-desk { fill: #efd2b8; }
.art-laptop, .art-base { fill: var(--ink); }
.art-logo { fill: var(--you); }
.art-ball { fill: var(--orange); }
.art-ball-hi { fill: #ff9a62; }
.art-dot.y { fill: var(--yellow); }
.art-dot.m { fill: var(--mint); }
.art-dot.p { fill: var(--pink); }
@media (min-width: 900px) {
  .maker-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); column-gap: 56px; align-items: center; }
  .maker-quote { grid-column: 1 / -1; }
  .maker-art { grid-column: 1; width: 100%; max-width: 420px; margin: clamp(40px, 6svh, 72px) auto 0; }
  .maker-wrap .maker-body { grid-column: 2; margin: clamp(40px, 6svh, 72px) 0 0; }
}
.maker-quote p {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.6rem, 1rem + 6vw, 6.2rem);
  line-height: 1; letter-spacing: -.02em;
  text-wrap: balance;
}
.maker-quote p::before { content: "“"; margin-left: -.42em; color: var(--orange-ink); }
.maker-quote p::after { content: "”"; color: var(--orange-ink); }
.maker-body {
  margin: clamp(40px, 6svh, 72px) 0 0 auto;
  max-width: 560px;
  padding: clamp(26px, 4vw, 40px);
  border-radius: 32px;
  background: var(--bg-raise);
  box-shadow: var(--shadow);
  font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); line-height: 1.55; letter-spacing: -.006em;
  color: var(--ink-2);
}
.maker-body p + p { margin-top: 1em; }
.maker-body .maker-try { color: var(--ink); font-weight: 650; }
.maker-body .sig { display: flex; align-items: center; gap: 12px; margin-top: 1.4em; font-family: var(--serif); font-style: italic; font-size: 1.35em; color: var(--ink); }
.sig-pebble { width: 52px; height: 52px; flex: none; }

/* =====================================================================
   4. TRY IT
   ===================================================================== */
.try { position: relative; padding: clamp(90px, 14svh, 160px) 0 clamp(90px, 14svh, 150px); background: var(--bg-sunk); }
.try-head { text-align: center; }
.try-head .lede { margin: 18px auto 0; max-width: 30ch; }
.try-grid {
  margin-top: clamp(40px, 7svh, 80px);
  display: grid; gap: 36px; align-items: start;
}
@media (min-width: 960px) { .try-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.try-visual {
  position: relative;
  aspect-ratio: 1 / .92;
  border-radius: 36px;
  background: #fff6ec;
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--ink);
}
@media (min-width: 960px) { .try-visual { position: sticky; top: calc(var(--nav-h) + 24px); } }
.demo-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.try-readout {
  position: absolute; left: 22px; right: 22px; bottom: 18px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.readout-l, .readout-r {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-sunk); color: var(--ink); font-weight: 700; letter-spacing: .02em;
}
.readout-beat b { color: var(--ink); font-weight: 650; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: rgba(42, 33, 64, .16); vertical-align: 0; transition: background-color .08s, box-shadow .08s; }
.dot.hit { background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 116, 56, .25); }

.presets { margin: 0; padding: 0; border: 0; display: grid; gap: 12px; }
.presets-legend { margin-bottom: 12px; padding: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.preset { position: relative; display: block; cursor: pointer; }
.preset input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.preset-body {
  display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 18px; align-items: center;
  padding: 18px 22px;
  border-radius: 22px;
  background: var(--bg-raise);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, background-color .2s, transform .2s var(--ease-out);
}
.preset:hover .preset-body { transform: translateY(-1px); }
.preset input:checked + .preset-body { background: #f1edff; box-shadow: inset 0 0 0 2.5px var(--you), var(--shadow-sm); }
.preset input:focus-visible + .preset-body { outline: 3px solid var(--violet-ink); outline-offset: 3px; }
.preset-glyph { grid-row: 1 / 3; width: 64px; height: 24px; overflow: visible; }
.preset-glyph .g-track { fill: none; stroke: #ecd5c0; stroke-width: 6; stroke-linecap: round; }
.preset input:checked + .preset-body .g-track { stroke: #dcd5ff; }
.preset-glyph .g-beat { stroke: #ecd5c0; stroke-width: 3; stroke-linecap: round; }
.preset-glyph .g-dot { fill: var(--orange); }
.moving .preset input:checked + .preset-body .g-lr, .moving .preset:hover .g-lr { animation: glyph-x 2.6s cubic-bezier(.37, 0, .63, 1) infinite alternate; }
.moving .preset input:checked + .preset-body .g-lr.fast, .moving .preset:hover .g-lr.fast { animation-duration: .5s; }
.moving .preset input:checked + .preset-body .g-x, .moving .preset:hover .g-x { animation: glyph-x 2.2s cubic-bezier(.37, 0, .63, 1) infinite alternate; }
.moving .preset input:checked + .preset-body .g-y, .moving .preset:hover .g-y { animation: glyph-y 2.2s cubic-bezier(.37, 0, .63, 1) -1.1s infinite alternate; }
@keyframes glyph-x { from { transform: translateX(-24px); } to { transform: translateX(24px); } }
@keyframes glyph-y { from { transform: translateY(-7px); } to { transform: translateY(7px); } }
.preset-name { font-size: 19px; font-weight: 650; letter-spacing: -.015em; }
.preset-desc { font-size: 15px; color: var(--ink-2); }
.preset.is-custom .preset-name::after { content: " · tuned"; font-weight: 400; color: var(--ink-3); }

.demo-live, .demo-fallback { margin-top: 24px; }
.demo-actions { display: flex; gap: 10px; }
.demo-actions .btn-primary { flex: 1 1 auto; }
.demo-hint { margin-top: 14px; font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.demo-hint b { color: var(--ink-2); font-weight: 650; }
.demo-status { margin-top: 10px; min-height: 1.4em; font-size: 15px; color: var(--ink-2); }
.demo-status.err { color: var(--danger); }
.demo-status.on { color: var(--ok); font-weight: 650; }

.tune { margin-top: 18px; border-top: 2px solid var(--line); }
.tune summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 2px; cursor: pointer; list-style: none;
  font-size: 16px; font-weight: 650; letter-spacing: -.01em;
}
.tune summary::-webkit-details-marker { display: none; }
.tune summary svg { width: 16px; height: 16px; color: var(--ink-3); transition: transform .25s var(--ease-out); }
.tune[open] summary svg { transform: rotate(180deg); }
.tune-body { padding: 4px 0 8px; }
.group { margin-top: 18px; }
.group:first-child { margin-top: 0; }
.lbl { margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  flex: 1 1 auto; min-height: 40px; padding: 6px 14px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--bg-raise); box-shadow: var(--shadow-sm);
  color: var(--ink-2); font-size: 14px; font-weight: 500;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--btn); color: var(--btn-ink); font-weight: 650; box-shadow: none; }
.ctl { margin-top: 16px; }
.ctl label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; color: var(--ink-2); }
.ctl output { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ctl.off { opacity: .45; }
input[type=range] { width: 100%; accent-color: var(--you); }
.check { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; flex: none; accent-color: var(--you); }
.tune-notes { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }
.tune-notes p + p { margin-top: 8px; }
.tune-notes b { color: var(--ink-2); }

.fallback-title { font-size: 19px; font-weight: 650; letter-spacing: -.015em; }
.demo-fallback > p:not(.fallback-title) { margin-top: 6px; color: var(--ink-2); }
.demo-fallback .capsule { margin-top: 18px; }

.tips { margin-top: 28px; display: grid; gap: 14px; }
.tips li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.tips b { color: var(--ink); font-weight: 650; }
.tips svg {
  width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--bg-raise);
  fill: none; stroke: var(--violet-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* =====================================================================
   5. SIGN-UP
   ===================================================================== */
.signup {
  position: relative; overflow: hidden;
  padding: clamp(190px, 26svh, 260px) 0 clamp(110px, 20svh, 220px);
  background: var(--peach); color: var(--ink);
  text-align: center;
}
.gather { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.signup-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.signup .lede { margin-top: 22px; max-width: 30ch; }
.signup .capsule { margin-top: 40px; }

/* =====================================================================
   6. FAQ + FOOTER
   ===================================================================== */
.faq { padding: clamp(90px, 14svh, 150px) 0; background: var(--bg); }
.faq-wrap { display: grid; gap: 36px; }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: 1fr 1.6fr; gap: 64px; } .faq h2 { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; } }
.faq-list { display: grid; gap: 12px; }
.faq-list details { padding: 0 24px; border-radius: 24px; background: var(--bg-raise); box-shadow: var(--shadow-sm); }
.faq-list summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 22px 52px 22px 0;
  font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); font-weight: 650; letter-spacing: -.015em;
  background: radial-gradient(circle at calc(100% - 16px) 50%, var(--peach) 0 16px, transparent 16.5px) no-repeat;   /* a flat disc behind the plus */
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after {
  content: ""; position: absolute; right: 9px; top: 50%; width: 14px; height: 2.5px; margin-top: -1px; border-radius: 2px;
  background: var(--ink); transition: transform .3s var(--ease-out);
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list details p { padding: 0 48px 24px 0; max-width: 60ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }

.footer { padding: 44px 0; background: var(--bg); border-top: 2px solid var(--line); color: var(--ink-2); }
.footer-base { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.footer-base .nav-brand { color: var(--ink); font-size: 17px; }
.footer-base .logo { width: 24px; height: 24px; }
.copy { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.footer-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--ink); text-decoration: underline; }

/* =====================================================================
   REVEALS (only with motion on)
   ===================================================================== */
.reveals [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }
.reveals [data-reveal].is-in { opacity: 1; transform: none; }

/* reduced motion: nothing moves, not even the buttons */
html.still .btn:hover, html.still .preset:hover .preset-body, html.still .btn-quiet:hover { transform: none; }
/* belt and braces: honour the OS setting even if the class was forced */
@media (prefers-reduced-motion: reduce) {
  html.still *, html.still *::before, html.still *::after { animation: none !important; transition-duration: .01ms !important; }
}
