/* ============================================================
   stempo — "sketchbook" design system
   Light : graphite pencil on warm paper
   Dark  : coloured crayon on a chalkboard
   Both share the same hand-drawn geometry; only the medium
   changes. Tokens here are the source of truth for the app
   reskin (frontend/src/styles/globals.css) too.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Nunito:ital,wght@0,300..900;1,300..700&family=Spline+Sans+Mono:wght@400;600&display=swap');

/* ---------- tokens ----------
   Colours are declared once with light-dark(); the toggle just flips
   `color-scheme`. Only the three non-colour switches below need to be
   restated per theme. Light = graphite on warm paper, dark = crayon on
   a chalkboard. */
:root {
  color-scheme: light dark;

  /* In dark mode the generated board is one continuous material. Panels use
     green-black washes from that same material instead of neutral charcoal,
     so they create hierarchy without reading as grey cards pasted on top. */
  --paper:        light-dark(oklch(96.5% 0.009 85),  oklch(21% 0.030 160));
  --paper-card:   light-dark(oklch(99.2% 0.004 85),  oklch(20% 0.032 160 / 0.60));
  --paper-sunk:   light-dark(oklch(93.5% 0.011 85),  oklch(14% 0.025 160 / 0.72));
  /* Elevated surface for things that float ON a card rather than beside it.
     On paper a white sticker already reads as lifted, so light matches
     --paper-card; on the board it has to be lighter than what it sits on. */
  --paper-raised: light-dark(oklch(99.2% 0.004 85),  oklch(27% 0.032 160 / 0.78));

  --ink:          light-dark(oklch(31% 0.016 265),   oklch(94% 0.018 85));
  --ink-mute:     light-dark(oklch(50% 0.016 265),   oklch(82% 0.022 85));
  --ink-faint:    light-dark(oklch(65% 0.014 265),   oklch(69% 0.020 88));

  --rule:         light-dark(oklch(72% 0.014 265),   oklch(76% 0.022 85 / 0.48));
  --rule-soft:    light-dark(oklch(84% 0.010 265),   oklch(72% 0.018 85 / 0.22));

  --accent:       light-dark(oklch(55% 0.17 25),     oklch(79% 0.16 55));
  --accent-2:     light-dark(oklch(52% 0.14 245),    oklch(88% 0.035 88));
  --accent-3:     light-dark(oklch(62% 0.13 145),    oklch(79% 0.16 55));
  --on-accent:    light-dark(oklch(99% 0.004 85),    oklch(24% 0.03 80));

  --stroke: 2px;

  --font-hand: 'Caveat', 'Bradley Hand', cursive;
  --font-body: 'Nunito', ui-rounded, system-ui, sans-serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, monospace;

  --gutter: clamp(1.15rem, 4vw, 3rem);
  --max: 1180px;

  /* non-colour switches (light-dark() only accepts colours) — images
     included, so the sheet texture and the drawn wordmark are restated
     per theme alongside the grain */
  --grain-opacity: 0.03;
  --grain-blend:   multiply;
  --shadow-lift:   0 2px 0 oklch(72% 0.014 265 / 0.28);
  /* the device needs no help on paper — it is already darker than the page */
  --shadow-screen: none;
  --bg-texture:    url('brand/bg-paper.webp');
  --bg-texture-size: 525px;
  --feature-wash:  linear-gradient(transparent, transparent);
  --feature-filter: none;
  --wordmark:      url('brand/logo-light-alpha-96.webp');
  --app-library-image:   url('app-library-light.webp');
  --feature-library-image:    url('feature-library-light.webp');
  --feature-practice-image:   url('feature-practice-light.webp');
  --feature-sections-image:   url('feature-sections-light.webp');
  --feature-separation-image: url('feature-separation-light.webp');
  --feature-tuning-image:     url('feature-tuning-light.webp');
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --grain-opacity: 0.018;
    --grain-blend:   screen;
    --shadow-lift:   0 3px 0 oklch(12% 0.022 162 / 0.7), 0 12px 24px -12px oklch(8% 0.02 162 / 0.9);
    --shadow-screen: 0 28px 64px -26px oklch(8% 0.02 162 / 0.95);
    --bg-texture:    url('brand/bg-board.webp');
    --bg-texture-size: 768px;
    --feature-wash:  linear-gradient(oklch(14% 0.032 160 / 0.20), oklch(14% 0.032 160 / 0.20));
    --feature-filter: saturate(0.72) contrast(0.96) brightness(0.94);
    --wordmark:      url('brand/logo-dark-alpha-96.webp');
    --app-library-image:   url('app-library-dark.webp');
    --feature-library-image:    url('feature-library-dark.webp');
    --feature-practice-image:   url('feature-practice-dark.webp');
    --feature-sections-image:   url('feature-sections-dark.webp');
    --feature-separation-image: url('feature-separation-dark.webp');
    --feature-tuning-image:     url('feature-tuning-dark.webp');
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --grain-opacity: 0.018;
  --grain-blend:   screen;
  --shadow-lift:   0 3px 0 oklch(12% 0.022 162 / 0.7), 0 12px 24px -12px oklch(8% 0.02 162 / 0.9);
  --shadow-screen: 0 28px 64px -26px oklch(8% 0.02 162 / 0.95);
  --bg-texture:    url('brand/bg-board.webp');
  --bg-texture-size: 768px;
  --feature-wash:  linear-gradient(oklch(14% 0.032 160 / 0.20), oklch(14% 0.032 160 / 0.20));
  --feature-filter: saturate(0.72) contrast(0.96) brightness(0.94);
  --wordmark:      url('brand/logo-dark-alpha-96.webp');
  --app-library-image:   url('app-library-dark.webp');
  --feature-library-image:    url('feature-library-dark.webp');
  --feature-practice-image:   url('feature-practice-dark.webp');
  --feature-sections-image:   url('feature-sections-dark.webp');
  --feature-separation-image: url('feature-separation-dark.webp');
  --feature-tuning-image:     url('feature-tuning-dark.webp');
}
/* No image overrides needed here — the media-query block above already
   excludes [data-theme='light'], so an explicit light choice falls back to
   the paper values on :root. */
:root[data-theme='light'] { color-scheme: light; }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--paper);
  background-image: var(--bg-texture);
  /* Same sheet as the app (frontend/src/styles/globals.css). Tiled — both
     textures wrap cleanly — and sized per theme so one source pixel maps to
     one device pixel on a 2x screen. Unlike the app this page scrolls, so the
     sheet scrolls with it rather than sitting `fixed`. */
  background-size: var(--bg-texture-size);
  background-repeat: repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 240ms ease, color 240ms ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- medium: paper fibre / chalk dust ---------- */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }

/* ---------- hand-drawn geometry ----------
   The uneven corner radii read as a box drawn by hand; four
   variants keep repeated cards from looking stamped out. */
.sketch      { border: var(--stroke) solid var(--rule); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
.sketch--b   { border-radius: 15px 225px 15px 255px / 225px 15px 255px 15px; }
.sketch--c   { border-radius: 200px 12px 190px 20px / 20px 195px 14px 210px; }
.sketch--d   { border-radius: 18px 210px 22px 185px / 195px 16px 205px 18px; }
.sketch--pill{ border-radius: 120px 140px 130px 150px / 60px 70px 62px 68px; }

/* ---------- typography ---------- */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.06; }

.hand {
  font-family: var(--font-hand);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink-mute);
}

.section { padding: clamp(3.5rem, 9vh, 6.5rem) 0; }
.section__title { font-size: clamp(2rem, 4.6vw, 3.3rem); max-width: 20ch; }
.section__title .hand { font-size: 1.24em; line-height: 0.86; display: inline-block; }
.section__lead { margin-top: 1.1rem; max-width: 52ch; color: var(--ink-mute); font-weight: 350; }
.center { text-align: center; margin-inline: auto; }
.center .section__title, .center .section__lead { margin-inline: auto; }

/* underline scribbled beneath a word — masked so it takes the
   theme accent rather than a baked-in stroke colour */
.underline-scribble { position: relative; white-space: nowrap; }
.underline-scribble::after {
  content: '';
  position: absolute; left: -2%; right: -2%; bottom: -0.2em;
  height: 0.36em;
  background: var(--accent);
  -webkit-mask: no-repeat center/100% 100%
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 18' preserveAspectRatio='none'%3E%3Cpath d='M3 12c28-7 62-9 96-6 24 2 51 7 98 2' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  mask: no-repeat center/100% 100%
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 18' preserveAspectRatio='none'%3E%3Cpath d='M3 12c28-7 62-9 96-6 24 2 51 7 98 2' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.5rem 0.8rem;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  font-weight: 700;
  border: var(--stroke) solid var(--ink);
  border-radius: 120px 140px 130px 150px / 60px 70px 62px 68px;
  background: var(--paper-card);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.btn:hover { transform: translate(-1px, -2px) rotate(-0.5deg); box-shadow: 0 5px 0 var(--rule); }
.btn:active { transform: translate(0, 1px); box-shadow: 0 1px 0 var(--rule); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { box-shadow: 0 5px 0 color-mix(in oklab, var(--accent) 55%, var(--ink)); }
.btn--sm { font-size: 1.05rem; padding: 0.4rem 1.05rem 0.5rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  padding: 0.85rem 0;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: var(--stroke) solid transparent;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
/* The drawn wordmark, swapped in as a background so the markup keeps its
   text — the link's accessible name and the crawlable "stempo" stay put
   while the pixels come from the art. Sized by height with `contain`,
   because the two theme cuts aren't quite the same aspect ratio. */
.nav__brand {
  display: block;
  width: 6.2rem; height: 2.2rem;
  background: var(--wordmark) left center / contain no-repeat;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
}
.nav__brand span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 1.35rem; font-size: 0.95rem; font-weight: 600; }
.nav__links a:not(.btn) { color: var(--ink-mute); }
.nav__links a:not(.btn):hover { color: var(--ink); }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border: var(--stroke) solid var(--rule);
  border-radius: 60px 70px 62px 68px / 62px 66px 60px 70px;
  color: var(--ink-mute);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); transform: rotate(-4deg); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .icon-moon { display: none; }
}

/* ---------- hero ---------- */
.hero-card {
  margin-top: 0.5rem;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 0;
  background: var(--paper-card);
  border: var(--stroke) solid var(--rule);
  border-radius: 42px 38px 44px 40px / 40px 44px 38px 42px;
  position: relative;
  overflow: hidden;
}
.hero__head { text-align: center; }
.hero__title {
  font-size: clamp(2.7rem, 7.4vw, 5.6rem);
  max-width: 15ch;
  margin-inline: auto;
}
.hero__title .hand {
  display: block;
  font-size: 1.16em;
  line-height: 0.82;
  color: var(--ink-faint);
  transform: rotate(-1.4deg);
}
.hero__subtitle {
  margin: 1.6rem auto 0;
  max-width: 46ch;
  color: var(--ink-mute);
  font-weight: 350;
  font-size: 1.06rem;
}
.hero__cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.hero__fineprint { margin-top: 1rem; font-family: var(--font-hand); font-size: 1.2rem; color: var(--ink-faint); }

/* stage: device in the middle, satellites pinned around it.
   --sat-lane is the clear margin each satellite column needs; the device is
   sized so it never grows into it (see the min-width query below). */
.stage {
  position: relative; margin-top: 3rem; padding-bottom: 1px;
  --sat-lane: 168px;
  --dev-half: min(440px, 50% - var(--sat-lane));
}
.stage__device {
  width: min(100%, 880px);
  margin-inline: auto;
  border: var(--stroke) solid var(--ink);
  border-top-left-radius: 20px; border-top-right-radius: 22px;
  border-bottom: 0;
  background: var(--paper-sunk);
  padding: 0.5rem 0.5rem 0;
  transform: rotate(-0.4deg);
  /* On the board the app's own dark theme is the same value as the page, so
     without this the screen has no edge and the device dissolves into it. */
  box-shadow: var(--shadow-screen);
}
.app-shot {
  aspect-ratio: var(--app-shot-ratio, 16 / 9);
  width: 100%;
  background-image: var(--app-shot-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
/* ratio matches the asset exactly, so nothing gets cropped by `cover`.
   The asset is a 1100px-wide capture (above the app's 1025px compact
   breakpoint) so it renders near 1:1 here and stays readable. */
.app-shot--library { --app-shot-image: var(--app-library-image); --app-shot-ratio: 1100 / 640; }
.stage__device .app-shot { border-radius: 12px 14px 0 0; }

.sat {
  position: absolute;
  display: none;
  align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem 0.6rem;
  background: var(--paper-raised);
  border: var(--stroke) solid var(--rule);
  box-shadow: var(--shadow-lift);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  z-index: 3;
}
.sat small { display: block; font-weight: 400; color: var(--ink-faint); font-size: 0.72rem; }
.sat__ico { color: var(--accent); flex: 0 0 auto; }
.sat__ico svg { width: 1.2rem; height: 1.2rem; }
/* Anchored off the device edge rather than the stage edge, so every card hugs
   the screenshot by the same amount whatever its own width is. */
.sat--left  { right: calc(50% + var(--dev-half) + 14px); }
.sat--right { left:  calc(50% + var(--dev-half) + 14px); }
.sat--a { top: 3%;  transform: rotate(-2deg);   border-radius: 90px 12px 80px 14px / 14px 76px 12px 88px; }
.sat--b { top: 0;   transform: rotate(1.8deg);  border-radius: 12px 84px 14px 92px / 78px 12px 86px 14px; }
.sat--c { top: 39%; transform: rotate(1.4deg);  border-radius: 76px 14px 88px 12px / 12px 82px 14px 78px; }
.sat--d { top: 45%; transform: rotate(-1.6deg); border-radius: 14px 90px 12px 78px / 84px 14px 76px 12px; }
.sat--e { top: 75%; transform: rotate(-1deg);   border-radius: 82px 13px 74px 15px / 15px 88px 13px 80px; }

/* Only float the satellites once the stage is wide enough to hold them beside
   the app shot. Below this they'd sit on top of the UI, so they stay off. */
@media (min-width: 1320px) {
  .sat { display: flex; max-width: var(--sat-lane); }
  /* widen the lanes a little past the hero-card padding... */
  .stage { margin-inline: calc(var(--gutter) * -0.6); }
  /* ...and never let the device eat into them */
  .stage__device { width: min(880px, calc(100% - var(--sat-lane) * 2)); }
}

/* ---------- pill tab row ---------- */
.tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
  margin: 2.6rem auto 0;
}
.tabs a {
  padding: 0.42rem 1.15rem 0.52rem;
  border: var(--stroke) solid var(--rule);
  border-radius: 120px 140px 130px 150px / 60px 70px 62px 68px;
  background: var(--paper-card);
  font-family: var(--font-hand);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--ink-mute);
}
.tabs a:hover { color: var(--ink); border-color: var(--ink); transform: rotate(-1deg); }
.tabs a:nth-child(even) { transform: rotate(0.8deg); }

/* ---------- alternating feature rows ---------- */
.feat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(3rem, 7vh, 5rem) 0;
}
.feat + .feat { border-top: var(--stroke) dashed var(--rule-soft); }
.feat:nth-child(even) .feat__art { order: -1; }
.feat > :first-child { max-width: 31rem; }
.feat__num {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--accent);
}
.feat__title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0.4rem 0 0.9rem; }
.feat__body { color: var(--ink-mute); font-weight: 350; }
.feat__list { margin-top: 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.feat__list li { display: flex; gap: 0.65rem; align-items: flex-start; color: var(--ink-mute); font-weight: 350; }
.feat__list svg { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: 0.28rem; color: var(--accent-3); }
.feat__art {
  --feature-image: none;
  position: relative;
  aspect-ratio: 3 / 2;
  min-height: 0;
  overflow: hidden;
  background-color: var(--paper-card);
  background-image: var(--feature-wash), var(--feature-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: var(--feature-filter);
  border: var(--stroke) solid var(--rule);
  box-shadow: 0 10px 28px color-mix(in oklab, var(--ink) 10%, transparent), var(--shadow-lift);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.feat__art::after {
  content: '';
  position: absolute;
  inset: 0.45rem;
  pointer-events: none;
  border: 1px solid color-mix(in oklab, var(--rule) 58%, transparent);
  border-radius: inherit;
  opacity: 0.58;
}
.feat:hover .feat__art {
  transform: translateY(-3px) rotate(-0.25deg);
  box-shadow: 0 16px 36px color-mix(in oklab, var(--ink) 14%, transparent), var(--shadow-lift);
}
.feat__art--library { --feature-image: var(--feature-library-image); }
.feat__art--practice { --feature-image: var(--feature-practice-image); }
.feat__art--sections { --feature-image: var(--feature-sections-image); }
.feat__art--separation { --feature-image: var(--feature-separation-image); }
.feat__art--tuning { --feature-image: var(--feature-tuning-image); }

/* ---------- keycaps ---------- */
.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.35rem 2.6rem; width: 100%; max-width: 960px; margin-inline: auto; }
.keys__row { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0; border-bottom: var(--stroke) dashed var(--rule-soft); }
.keys__caps { display: flex; gap: 0.3rem; min-width: 5.4rem; }
.keys__label { color: var(--ink-mute); font-weight: 350; font-size: 0.95rem; }
kbd {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.34rem 0.55rem;
  min-width: 1.9rem;
  text-align: center;
  color: var(--ink);
  background: var(--paper-card);
  border: var(--stroke) solid var(--rule);
  border-radius: 30px 8px 26px 9px / 9px 24px 8px 28px;
  box-shadow: var(--shadow-lift);
}
.keys__more { margin-top: 1.8rem; text-align: center; font-family: var(--font-hand); font-size: 1.2rem; color: var(--ink-faint); }

/* ---------- content panel ----------
   Uses --paper-card like every other panel on the page. --paper-sunk
   is reserved for inset chrome (the mock's toolbar/transport, the
   marquee strip); using it here made this the only block darker than
   the page. Only the footer stays permanently dark. */
.board {
  background: var(--paper-card);
  border-radius: 40px 36px 42px 38px / 38px 42px 36px 40px;
  padding: clamp(2.2rem, 5vw, 3.6rem);
  border: var(--stroke) solid var(--rule);
}
.board > .section__title,
.board > .section__lead { text-align: center; margin-inline: auto; }
.board > .section__lead { max-width: 52ch; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; max-width: 780px; margin-inline: auto; }
.plan { padding: 1.7rem 1.8rem 1.9rem; background: var(--paper-card); border: var(--stroke) solid var(--rule); display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; }
.plan--pro { border-color: var(--accent); transform: rotate(-0.6deg); }
.plan__name { font-family: var(--font-hand); font-size: 1.45rem; color: var(--ink-mute); }
.plan--pro .plan__name { color: var(--accent); }
.plan__cost { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.plan__cost em { font-style: normal; font-size: 0.92rem; font-weight: 500; color: var(--ink-faint); }
.plan__specs { color: var(--ink-mute); font-weight: 350; font-size: 0.95rem; margin-bottom: 0.9rem; }
.plans__note { margin-top: 1.6rem; text-align: center; font-family: var(--font-hand); font-size: 1.2rem; color: var(--ink-faint); }
.plans__note a { color: var(--accent); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: var(--stroke) solid var(--rule); padding: 0.9rem 0; background: var(--paper-sunk); }
.marquee__track { display: flex; width: max-content; animation: slide 26s linear infinite; }
/* Two identical halves; the -50% loop is fed by one of them, so each
   must span at least the viewport or a gap scrolls through. space-around
   spreads the phrases when the text is narrower than the screen. */
.marquee__half {
  display: flex; align-items: center;
  gap: 2.5rem;
  flex: 0 0 auto;
  min-width: 100vw;
  justify-content: space-around;
}
.marquee__half span { font-family: var(--font-hand); font-size: clamp(1.7rem, 4vw, 2.9rem); font-weight: 700; color: var(--ink-faint); white-space: nowrap; }
.marquee__half span:nth-child(even) { color: var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- faq ---------- */
.faq { max-width: 760px; }
.faq__item { border-bottom: var(--stroke) dashed var(--rule-soft); padding: 0.4rem 0; }
.faq__item summary { cursor: pointer; list-style: none; padding: 0.9rem 0; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; font-family: var(--font-hand); font-size: 1.7rem; color: var(--accent); line-height: 1; }
.faq__item[open] summary::after { content: '–'; }
.faq__item p { padding-bottom: 1rem; color: var(--ink-mute); font-weight: 350; max-width: 62ch; }

/* ---------- footer ----------
   Follows the medium like everything else; --paper-sunk plus a rule
   separates it from the page without switching material. */
.foot {
  background: var(--paper-sunk);
  color: var(--ink);
  border-top: var(--stroke) solid var(--rule);
  padding: clamp(2.6rem, 6vw, 4rem) 0 2rem;
  margin-top: clamp(3rem, 8vh, 5rem);
}
.foot__inner { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 2rem; }
.foot__brand p { margin-top: 0.6rem; color: var(--ink-mute); font-weight: 350; max-width: 30ch; }
.foot h4 { font-family: var(--font-hand); font-size: 1.35rem; font-weight: 600; margin-bottom: 0.7rem; }
.foot ul { display: flex; flex-direction: column; gap: 0.45rem; }
.foot li a { color: var(--ink-mute); font-weight: 350; font-size: 0.95rem; }
.foot li a:hover { color: var(--ink); }
.foot__bottom { margin-top: 2.6rem; padding-top: 1.3rem; border-top: var(--stroke) dashed var(--rule-soft); display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-mute); font-size: 0.85rem; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .feat { grid-template-columns: 1fr; }
  .feat:nth-child(even) .feat__art { order: 0; }
  .keys { grid-template-columns: 1fr; gap: 0; }
  .plans { grid-template-columns: 1fr; }
  .foot__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav__links a:not(.btn):not(.login) { display: none; }
  .foot__inner { grid-template-columns: 1fr; }
  .foot__bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   App mock — the product drawn in the same medium as the page.
   Built from the theme tokens rather than a raster screenshot so
   it follows light/dark, and doubles as the first pass at the
   app reskin.
   ============================================================ */
.ui {
  background: var(--paper-card);
  border: var(--stroke) solid var(--rule);
  border-radius: 16px 19px 15px 18px / 18px 15px 19px 16px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  text-align: left;
}

.ui__bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-bottom: var(--stroke) solid var(--rule-soft);
  background: var(--paper-sunk);
}
.ui__brand { font-family: var(--font-hand); font-size: 1.1rem; font-weight: 700; }
.ui__brand i { font-style: normal; color: var(--accent); }
.ui__search {
  flex: 1;
  padding: 0.24rem 0.6rem;
  border: var(--stroke) solid var(--rule-soft);
  border-radius: 40px 12px 36px 14px / 14px 34px 12px 40px;
  color: var(--ink-faint);
  font-size: 11px;
}
.ui__pill {
  padding: 0.2rem 0.6rem;
  font-size: 11px; font-weight: 700;
  border: var(--stroke) solid var(--accent);
  color: var(--accent);
  border-radius: 40px 14px 36px 12px / 12px 34px 14px 40px;
  white-space: nowrap;
}

.ui__body { display: grid; grid-template-columns: 138px 1fr; }
.ui__side {
  border-right: var(--stroke) solid var(--rule-soft);
  padding: 0.55rem 0.5rem;
  display: flex; flex-direction: column; gap: 0.1rem;
}
.ui__side h5 {
  font-family: var(--font-hand); font-weight: 600;
  font-size: 0.95rem; color: var(--ink-faint);
  margin: 0.55rem 0 0.15rem;
}
.ui__side a { padding: 0.16rem 0.42rem; color: var(--ink-mute); border-radius: 22px 7px 19px 8px / 8px 18px 7px 22px; }
.ui__side a.is-on { background: color-mix(in oklab, var(--accent) 15%, transparent); color: var(--ink); font-weight: 700; }

.ui__main { padding: 0.45rem 0.7rem 0.6rem; }
.ui__head, .ui__row { display: grid; grid-template-columns: 1.6fr 1.1fr auto; gap: 0.6rem; align-items: center; }
.ui__head {
  font-family: var(--font-hand); font-size: 0.95rem; color: var(--ink-faint);
  padding: 0.15rem 0.35rem 0.3rem;
  border-bottom: var(--stroke) dashed var(--rule-soft);
}
.ui__row { padding: 0.32rem 0.35rem; border-bottom: var(--stroke) dashed var(--rule-soft); }
.ui__row:last-child { border-bottom: 0; }
.ui__row em { font-style: normal; color: var(--ink-mute); }
.ui__row.is-on {
  background: color-mix(in oklab, var(--accent) 13%, transparent);
  border-radius: 30px 9px 26px 10px / 10px 25px 9px 28px;
  font-weight: 700;
}
.ui__row.is-on em { color: var(--ink); }
.ui__key { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }

.ui__foot {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.45rem 0.75rem;
  border-top: var(--stroke) solid var(--rule-soft);
  background: var(--paper-sunk);
}
.ui__play {
  width: 24px; height: 24px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: var(--stroke) solid var(--ink);
  border-radius: 50%;
}
.ui__play svg { width: 10px; height: 10px; }
.ui__now { font-weight: 700; white-space: nowrap; }
.ui__now small { display: block; font-weight: 400; font-size: 10px; color: var(--ink-faint); }
.ui__time { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); white-space: nowrap; }

.ui__scrub { flex: 1; height: 4px; background: var(--rule-soft); border-radius: 4px; position: relative; }
.ui__scrub i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; }
.ui__scrub i::after {
  content: ''; position: absolute; right: -4px; top: 50%;
  width: 9px; height: 9px; margin-top: -4.5px;
  background: var(--paper-card);
  border: var(--stroke) solid var(--accent);
  border-radius: 50%;
}

/* ---- song view: the inspector controls ---- */
.ui__panel { padding: 0.8rem 0.85rem; display: flex; flex-direction: column; gap: 0.7rem; }
.ui__panel > div { display: flex; flex-direction: column; gap: 0.3rem; }
.ui__label { font-family: var(--font-hand); font-size: 0.98rem; color: var(--ink-faint); }
.ui__chips { display: flex; flex-wrap: wrap; gap: 0.32rem; }
.ui__chip {
  padding: 0.18rem 0.55rem; font-size: 11px;
  border: var(--stroke) solid var(--rule-soft);
  color: var(--ink-mute);
  border-radius: 30px 10px 26px 11px / 11px 25px 10px 28px;
  white-space: nowrap;
}
.ui__chip.is-on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.ui__meter { display: flex; align-items: center; gap: 0.55rem; }
.ui__meter .ui__scrub { height: 4px; }
.ui__meter b { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--ink-mute); }

@media (max-width: 560px) {
  .ui__body { grid-template-columns: 1fr; }
  .ui__side { display: none; }
  .ui__head, .ui__row { grid-template-columns: 1.4fr auto; }
  .ui__head span:nth-child(2), .ui__row em { display: none; }
}

/* ---------- full plan cards (pricing page) ----------
   The landing uses the compact .price-strip; this is the detailed
   comparison, so it adds a spec table, a badge and an aligned CTA. */
.plans--full { max-width: 900px; }
.plan { position: relative; }
.plan__tagline { color: var(--ink-mute); font-weight: 350; font-size: 0.95rem; }

.plan__badge {
  position: absolute;
  top: -0.85rem; right: 1.4rem;
  padding: 0.12rem 0.75rem 0.22rem;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--on-accent);
  border: var(--stroke) solid var(--accent);
  border-radius: 60px 70px 62px 68px / 30px 34px 31px 33px;
  transform: rotate(2.2deg);
}

.plan__table { width: 100%; margin: 0.7rem 0 1.3rem; }
.plan__table li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: var(--stroke) dashed var(--rule-soft);
  font-size: 0.95rem;
}
.plan__table li:last-child { border-bottom: 0; }
.plan__table span:first-child { color: var(--ink-mute); font-weight: 350; }
.plan__table span:last-child { font-weight: 700; text-align: right; }

/* .plan is align-items:flex-start, so the CTA must opt back into the
   full card width for the button to stretch. */
.plan__cta { margin-top: auto; align-self: stretch; }
.plan__cta .btn { width: 100%; justify-content: center; }
