/* ==========================================================================
   Pure Audio Solution: marketing site
   Dark, cinematic, neon, "Northern lights" colours (green > teal > blue). Mobile-first.
   The three brand stops keep their original token names:
   --cyan = stop 1, aurora green (voices), --violet = stop 2, teal,
   --magenta = stop 3, blue (music & effects).
   Two themes: dark (default, :root) and light ([data-theme="light"] on <html>).
   Reference: private/plan/design-system.md. Do not add colours or sizes
   outside the tokens below: every colour a rule uses must come from a token,
   so both themes stay complete.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #05060b;
  --bg-raised: #0b0d16;
  --bg-sunken: #030408;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);

  /* text */
  --text: #eef2ff;
  --text-2: #c4cae2;
  --muted: #8d95b5;

  /* brand */
  --cyan: #5cff9d;
  --violet: #2dd4d4;
  --violet-text: #6fe9e9;
  --magenta: #4b8bff;
  --mint: #3dffb2;
  --amber: #ffc857;
  --rose: #ff5d7a;

  /* audio semantics: never swap these */
  --voice: var(--cyan);
  --me: var(--magenta);
  --mix: #c9cee6;
  --part: var(--amber);

  --grad: linear-gradient(120deg, var(--cyan), var(--violet) 55%, var(--magenta));
  --grad-soft: linear-gradient(120deg, rgba(var(--cyan-rgb), 0.16), rgba(var(--violet-rgb), 0.16) 55%, rgba(var(--magenta-rgb), 0.16));
  --glow: 0 0 0 1px rgba(var(--cyan-rgb), 0.25), 0 10px 40px -10px rgba(var(--cyan-rgb), 0.35);
  --glow-violet: 0 0 0 1px rgba(var(--violet-rgb), 0.3), 0 20px 60px -20px rgba(var(--violet-rgb), 0.55);
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan);

  /* type */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-display: clamp(2.6rem, 1.3rem + 5vw, 5.5rem);
  --fs-h1: clamp(2.2rem, 1.6rem + 2.8vw, 3.75rem);
  --fs-h2: clamp(1.85rem, 1.35rem + 2.1vw, 3rem);
  --fs-h3: clamp(1.15rem, 1.06rem + 0.4vw, 1.375rem);
  --fs-lead: clamp(1.05rem, 0.99rem + 0.3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-micro: 0.75rem;

  /* space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --section-y: clamp(4rem, 2.5rem + 5vw, 7rem);
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1200px;
  --header-h: 68px;

  /* shape and motion */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* theme: brand colours as "r, g, b" for tints, e.g. rgba(var(--cyan-rgb), 0.1).
     Always change a colour and its -rgb twin together. */
  --cyan-rgb: 92, 255, 157;
  --violet-rgb: 45, 212, 212;
  --magenta-rgb: 75, 139, 255;
  --mint-rgb: 61, 255, 178;
  --amber-rgb: 255, 200, 87;
  --rose-rgb: 255, 93, 122;
  --mix-rgb: 201, 206, 230;
  /* bright washes for glows and aurora only (never text or thin lines) */
  --wash-cyan: 92, 255, 157;
  --wash-violet: 45, 212, 212;
  --wash-magenta: 75, 139, 255;

  /* theme: text on fills */
  --on-grad: #05060b;           /* text and icons on --grad */
  --amber-fill: var(--amber);   /* part labels */
  --on-part: #05060b;           /* text on --amber-fill */
  --success-text: #c9ffe9;
  --error-text: #ffd5dd;
  --selection: rgba(var(--violet-rgb), 0.45);
  --selection-text: #fff;

  /* theme: page, header, panels */
  --aurora-1: rgba(var(--wash-cyan), 0.24);
  --aurora-2: rgba(var(--wash-violet), 0.24);
  --aurora-3: rgba(var(--wash-magenta), 0.18);
  --grid-line: rgba(255, 255, 255, 0.032);
  --spot: rgba(var(--cyan-rgb), 0.07);
  --header-bg: rgba(5, 6, 11, 0.6);
  --header-bg-solid: rgba(5, 6, 11, 0.85);
  --hover-bg: rgba(255, 255, 255, 0.05);
  --line-3: rgba(255, 255, 255, 0.26);
  --glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  --card-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  --card-shadow: none;
  --inset: rgba(0, 0, 0, 0.3);
  --inset-2: rgba(0, 0, 0, 0.35);
  --input-bg: rgba(255, 255, 255, 0.04);
  --btn-shadow: 0 10px 30px -12px rgba(var(--cyan-rgb), 0.7);
  --btn-shadow-hover: 0 16px 40px -10px rgba(var(--violet-rgb), 0.75);
  --cta-fill: rgba(11, 13, 22, 0.88);
  --cta-shadow: 0 40px 120px -50px rgba(var(--violet-rgb), 0.65);
  --cta-ghost-bg: rgba(11, 13, 22, 0.72);
  --meter-track: rgba(255, 255, 255, 0.06);
  --ticker-bg: rgba(255, 255, 255, 0.02);
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233dffb2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d95b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  /* theme: product scenes (monitors, app windows, extension) */
  --stage-hi: rgba(255, 255, 255, 0.04);
  --corner-mark: rgba(255, 255, 255, 0.22);
  --label-bg: rgba(5, 6, 11, 0.72);
  --canvas-guide: rgba(255, 255, 255, 0.06);  /* read by site.js */
  --window-bg: rgba(11, 13, 22, 0.9);
  --window-bg-solid: rgba(11, 13, 22, 0.96);
  --window-bar: rgba(255, 255, 255, 0.025);
  --window-dot: rgba(255, 255, 255, 0.14);
  --window-shadow: 0 40px 120px -40px rgba(var(--cyan-rgb), 0.22), var(--shadow);
  --playhead: #fff;
  --playhead-glow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(var(--cyan-rgb), 0.6);
  --progress-tint: rgba(255, 255, 255, 0.07);
  --progress-glow: 6px 0 18px -4px rgba(255, 255, 255, 0.5);
  --panel-bg: #0b0d14;
  --panel-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9);
  --field-bg: #141724;
  --dim: brightness(0.55) saturate(0.7);
  --logo-bars: #0a0b12;          /* audio bars in the logo mark */
  /* demo video frame and YouTube thumbnail: a dark scene tinted by the brand colours (same in both themes) */
  --frame-top: #06261f;
  --frame-mid: #071a2e;
  --thumb-bg: #0b2a2c;
  /* YouTube Studio mock-up: follows YouTube's own dark and light look */
  --yt-bg: #141418;
  --yt-row: #1d1d23;
  --yt-track: #2a2a31;
  --yt-text: #f1f1f1;
  --yt-row-text: #e9e9ee;
  --yt-meta: #aaaab4;
  --yt-dim: #9a9aa6;
  --yt-red: #ff4e45;
}

/* ---------- 1b. Light theme ----------
   <html data-theme="light">, set before first paint by the inline script in
   includes/header.php from localStorage "pas-theme". Dark stays the default.
   Brand hues are deepened so text and thin lines pass WCAG AA on white:
   on --bg cyan (green) 6.0:1, violet text (teal) 5.4:1, magenta (blue) 6.1:1, amber 5.7:1, mint 5.6:1,
   rose 5.8:1, and at least 4.6:1 on their own 10% tints (badges, chips). */
[data-theme="light"] {
  color-scheme: light;

  --bg: #f5f4fb;
  --bg-raised: #ffffff;
  --bg-sunken: #edecf6;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.94);
  --surface-3: rgba(28, 25, 80, 0.08);
  --line: rgba(28, 25, 80, 0.1);
  --line-2: rgba(28, 25, 80, 0.17);
  --line-3: rgba(28, 25, 80, 0.3);

  --text: #14152b;
  --text-2: #41466a;
  --muted: #5c6283;

  --cyan: #036b4e;
  --violet: #0e7490;
  --violet-text: #0e6d87;
  --magenta: #1d4ed8;
  --mint: #04704f;
  --amber: #935000;
  --rose: #be123c;
  --mix: #5f6684;
  --cyan-rgb: 3, 107, 78;
  --violet-rgb: 14, 116, 144;
  --magenta-rgb: 29, 78, 216;
  --mint-rgb: 4, 112, 79;
  --amber-rgb: 147, 80, 0;
  --rose-rgb: 190, 18, 60;
  --mix-rgb: 95, 102, 132;
  --wash-cyan: 52, 235, 150;
  --wash-violet: 34, 211, 238;
  --wash-magenta: 96, 140, 255;

  --glow: 0 0 0 1px rgba(var(--cyan-rgb), 0.16), 0 10px 28px -12px rgba(var(--cyan-rgb), 0.42);
  --glow-violet: 0 0 0 1px rgba(var(--violet-rgb), 0.2), 0 20px 50px -24px rgba(var(--violet-rgb), 0.45);
  --shadow: 0 1px 2px rgba(28, 25, 80, 0.05), 0 28px 70px -36px rgba(43, 32, 120, 0.32);

  --on-grad: #ffffff;
  --amber-fill: #f5b83d;
  --on-part: #14152b;
  --success-text: #065f46;
  --error-text: #9f1239;
  --selection: rgba(var(--violet-rgb), 0.2);
  --selection-text: #14152b;

  --aurora-1: rgba(var(--wash-cyan), 0.24);
  --aurora-2: rgba(var(--wash-violet), 0.24);
  --aurora-3: rgba(var(--wash-magenta), 0.18);
  --grid-line: rgba(28, 25, 80, 0.045);
  --spot: rgba(var(--wash-violet), 0.06);
  --header-bg: rgba(245, 244, 251, 0.72);
  --header-bg-solid: rgba(245, 244, 251, 0.94);
  --hover-bg: rgba(28, 25, 80, 0.05);
  --glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.66));
  --card-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72));
  --card-shadow: 0 1px 2px rgba(28, 25, 80, 0.04), 0 14px 34px -22px rgba(43, 32, 120, 0.24);
  --inset: rgba(28, 25, 80, 0.035);
  --inset-2: rgba(28, 25, 80, 0.045);
  --input-bg: #ffffff;
  --btn-shadow: 0 10px 26px -12px rgba(var(--cyan-rgb), 0.55);
  --btn-shadow-hover: 0 16px 36px -12px rgba(var(--violet-rgb), 0.55);
  --cta-fill: rgba(255, 255, 255, 0.86);
  --cta-shadow: 0 34px 90px -46px rgba(var(--violet-rgb), 0.45);
  --cta-ghost-bg: #ffffff;
  --meter-track: rgba(28, 25, 80, 0.08);
  --ticker-bg: rgba(255, 255, 255, 0.55);
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304704f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6283' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  --stage-hi: rgba(255, 255, 255, 0.85);
  --corner-mark: rgba(28, 25, 80, 0.25);
  --label-bg: rgba(255, 255, 255, 0.88);
  --canvas-guide: rgba(28, 25, 80, 0.1);
  --window-bg: rgba(255, 255, 255, 0.92);
  --window-bg-solid: #ffffff;
  --window-bar: rgba(28, 25, 80, 0.03);
  --window-dot: rgba(28, 25, 80, 0.16);
  --window-shadow: 0 34px 90px -44px rgba(var(--cyan-rgb), 0.3), var(--shadow);
  --playhead: #14152b;
  --playhead-glow: 0 0 10px rgba(var(--violet-rgb), 0.45);
  --progress-tint: rgba(28, 25, 80, 0.05);
  --progress-glow: 6px 0 16px -6px rgba(28, 25, 80, 0.35);
  --panel-bg: #ffffff;
  --panel-shadow: 0 24px 60px -22px rgba(28, 25, 80, 0.38);
  --field-bg: #f3f2f9;
  --dim: brightness(0.86) saturate(0.6);
  --yt-bg: #ffffff;
  --yt-row: #f2f2f2;
  --yt-track: #e5e5e5;
  --yt-text: #0f0f0f;
  --yt-row-text: #1f1f1f;
  --yt-meta: #606060;
  --yt-dim: #606060;
  --yt-red: #e0352b;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg, canvas, video { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  text-wrap: balance;
}
p, figure, dl, dd, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--selection); color: var(--selection-text); }
.site-main:focus { outline: none; }

.icon { display: inline-block; width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }
.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-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--grad);
  color: var(--on-grad);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font: 500 0.8em/1.4 var(--font-mono);
  text-align: center;
}

/* ---------- 3. Page background ---------- */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.bg-aurora::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 35% at 15% 12%, var(--aurora-1), transparent 70%),
    radial-gradient(35% 30% at 85% 8%, var(--aurora-2), transparent 70%),
    radial-gradient(45% 40% at 70% 95%, var(--aurora-3), transparent 70%);
  animation: aurora-drift 30s ease-in-out infinite alternate;
  will-change: transform;
}
.bg-aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 25%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 25%, transparent 72%);
}
.spotlight {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, -30%), var(--spot), transparent 60%);
}
@keyframes aurora-drift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- 4. Text helpers ---------- */
.text-gradient {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.text-voice { color: var(--voice); }
.text-me { color: var(--me); }
.text-muted { color: var(--muted); }
.tc { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.lead { font-size: var(--fs-lead); color: var(--text-2); max-width: 60ch; }

/* ---------- 5. Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.5); }
.section--flush-top { padding-top: 0; }
.section__head {
  display: grid;
  gap: var(--sp-4);
  justify-items: start;
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 1.8rem + 2.5vw, 4rem);
}
.section__head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section__title { font-size: var(--fs-h2); }
.section__lead { font-size: var(--fs-lead); color: var(--text-2); max-width: 62ch; }
.section__more { margin-top: var(--sp-6); display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* two columns: main + aside (About, Contact, FAQ) */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
@media (min-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: start; }
  .split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--aside-left { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .split__sticky { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- 6. Buttons ---------- */
.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: var(--btn-h);
  padding: 0 1.35rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: 600 var(--fs-sm)/1 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s, filter 0.25s;
}
.btn .icon { width: 18px; height: 18px; }
.btn__arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: var(--grad);
  color: var(--on-grad);
  box-shadow: var(--btn-shadow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow-hover);
  filter: brightness(1.08);
}
.btn--ghost {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: rgba(var(--cyan-rgb), 0.5);
  background: rgba(var(--cyan-rgb), 0.06);
  color: var(--cyan);
}
.btn--sm { --btn-h: 40px; padding: 0 1rem; border-radius: 12px; font-size: var(--fs-xs); }
.btn--sm .icon { width: 16px; height: 16px; }
.btn--lg { --btn-h: 56px; padding: 0 1.7rem; border-radius: 16px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; filter: none; }

/* ---------- 7. Small labels ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--cyan);
  font: 600 var(--fs-micro)/1.2 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  animation: pulse 2s ease-in-out infinite;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font: 600 var(--fs-micro)/1.2 var(--font-body);
  letter-spacing: 0.02em;
  max-width: 100%;
}
.badge .icon { width: 14px; height: 14px; }
.app-window .badge, .card__foot .badge { white-space: nowrap; }
.badge--cyan { background: rgba(var(--cyan-rgb), 0.1); border-color: rgba(var(--cyan-rgb), 0.28); color: var(--cyan); }
.badge--violet { background: rgba(var(--violet-rgb), 0.14); border-color: rgba(var(--violet-rgb), 0.34); color: var(--violet-text); }
.badge--magenta { background: rgba(var(--magenta-rgb), 0.1); border-color: rgba(var(--magenta-rgb), 0.3); color: var(--magenta); }
.badge--mint { background: rgba(var(--mint-rgb), 0.1); border-color: rgba(var(--mint-rgb), 0.28); color: var(--mint); }
.badge--amber { background: rgba(var(--amber-rgb), 0.1); border-color: rgba(var(--amber-rgb), 0.3); color: var(--amber); }
.badge--rose { background: rgba(var(--rose-rgb), 0.1); border-color: rgba(var(--rose-rgb), 0.3); color: var(--rose); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font: 600 var(--fs-micro)/1.2 var(--font-body);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.status--done { color: var(--mint); }
.status--working { color: var(--cyan); }
.status--working::before { animation: pulse 1.4s ease-in-out infinite; }
.status--failed { color: var(--rose); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font: 500 var(--fs-xs)/1.2 var(--font-body);
  white-space: nowrap;
}
.chip .icon { width: 14px; height: 14px; }
.chip--part { border-color: rgba(var(--amber-rgb), 0.35); background: rgba(var(--amber-rgb), 0.08); color: var(--amber); font-family: var(--font-mono); }

/* ---------- 8. Surfaces ---------- */
.glass {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--glass-bg);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.glass--pad { padding: clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem); }
.glass--glow { border-color: rgba(var(--cyan-rgb), 0.3); box-shadow: var(--glow), var(--shadow); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: border-color 0.3s, transform 0.4s var(--ease), background-color 0.3s;
}
@media (hover: hover) {
  .card:hover { border-color: rgba(var(--cyan-rgb), 0.24); transform: translateY(-3px); }
}
.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: var(--grad-soft);
  color: var(--cyan);
}
.card__icon .icon { width: 22px; height: 22px; }
.card__icon--me { color: var(--magenta); }
.card__icon--violet { color: var(--violet-text); }
.card__title { font-size: var(--fs-h3); text-wrap: pretty; }
.card__text { color: var(--text-2); font-size: var(--fs-sm); }
.card__foot { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-2); }
.card--use { padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem); gap: var(--sp-4); }
.card--use .card__icon { width: 54px; height: 54px; border-radius: 16px; }
.card--use .card__icon .icon { width: 26px; height: 26px; }

.checklist { list-style: none; display: grid; gap: 0.65rem; }
.checklist li { position: relative; padding-left: 1.95rem; color: var(--text-2); font-size: var(--fs-sm); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12em;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  border: 1px solid rgba(var(--mint-rgb), 0.35);
  background: rgba(var(--mint-rgb), 0.1) var(--check-icon) center / 0.75rem no-repeat;
}
.checklist strong { color: var(--text); font-weight: 600; }

/* ---------- 9. Header and navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  transition: border-color 0.3s, background-color 0.3s;
}
.site-header.is-scrolled, .nav-open .site-header { border-bottom-color: var(--line); background: var(--header-bg-solid); }
.site-header__inner { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--header-h); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
}
.brand .logo { width: 38px; height: 38px; flex: none; border-radius: 12px; box-shadow: var(--glow); }
/* logo mark follows the palette: bright stops in both themes */
.logo__stop--1 { stop-color: rgb(var(--wash-cyan)); }
.logo__stop--2 { stop-color: rgb(var(--wash-violet)); }
.logo__stop--3 { stop-color: rgb(var(--wash-magenta)); }
.logo__bars { fill: var(--logo-bars); }
.brand__name { display: flex; flex-direction: column; font: 700 1.1rem/1.05 var(--font-display); letter-spacing: -0.01em; }
.brand__name small { margin-top: 3px; font: 500 0.62rem/1.2 var(--font-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.nav, .site-header__cta, .site-header__actions { display: none; }
.nav__list { list-style: none; display: flex; gap: 0.3rem; padding: 0.3rem; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.nav__link {
  display: block;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav__link:hover { color: var(--text); background: var(--hover-bg); }
.nav__link.is-active { color: var(--on-grad); background: var(--grad); box-shadow: var(--glow); }
.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; grid-area: 1 / 1; }
.nav-toggle[aria-expanded="true"] .icon--menu, .nav-toggle[aria-expanded="false"] .icon--close { display: none; }
.nav-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* theme switch: icon button next to "Access the app" (desktop), full row in the mobile menu.
   Both carry [data-theme-toggle]; the sun shows in dark (switches to light), the moon in light. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.theme-toggle:hover { color: var(--cyan); border-color: rgba(var(--cyan-rgb), 0.5); background: rgba(var(--cyan-rgb), 0.06); }
.theme-toggle:focus-visible, .theme-switch:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.theme-icon { grid-area: 1 / 1; width: 18px; height: 18px; transition: opacity 0.3s var(--ease), transform 0.5s var(--ease); }
.theme-icon--moon, [data-theme="light"] .theme-icon--sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="light"] .theme-icon--moon { opacity: 1; transform: none; }
.theme-switch {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: 52px;
  margin-bottom: var(--sp-4);
  padding: 0 var(--sp-4) 0 var(--sp-2);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font: 600 var(--fs-sm)/1.2 var(--font-body);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-switch:hover { color: var(--text); border-color: var(--line-2); }
.theme-switch__icon { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--grad-soft); color: var(--cyan); }
html:not(.js) [data-theme-toggle] { display: none; }
.mobile-nav { border-top: 1px solid var(--line); padding-block: var(--sp-3) var(--sp-5); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.mobile-nav[hidden] { display: none; }
.mobile-nav__list { list-style: none; display: grid; gap: 2px; margin-bottom: var(--sp-4); }
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-md);
  color: var(--text-2);
  font: 600 1.2rem/1 var(--font-display);
  text-decoration: none;
}
.mobile-nav__link .icon { width: 18px; height: 18px; color: var(--muted); }
.mobile-nav__link:hover, .mobile-nav__link[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.mobile-nav__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--cyan); }
.mobile-nav__mail { margin-top: var(--sp-4); text-align: center; font-size: var(--fs-sm); }
.mobile-nav__mail a { color: var(--text-2); }
@media (min-width: 900px) {
  .site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .brand { margin-right: 0; justify-self: start; }
  .nav { display: block; }
  .site-header__actions { display: flex; align-items: center; gap: var(--sp-3); justify-self: end; }
  .site-header__cta { display: inline-flex; justify-self: end; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

/* ---------- 10. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: var(--sp-8);
  padding-block: var(--sp-8) var(--sp-5);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(var(--violet-rgb), 0.06));
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0.45;
}
.site-footer__grid { display: grid; gap: var(--sp-6) var(--sp-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-footer__brand { grid-column: 1 / -1; display: grid; gap: var(--sp-4); justify-items: start; max-width: 380px; }
.site-footer__brand .brand { margin-right: 0; }
.site-footer__tag { color: var(--muted); font-size: var(--fs-sm); }
.site-footer__contact { grid-column: 1 / -1; }
.site-footer__h { margin-bottom: var(--sp-4); font: 600 var(--fs-micro)/1.2 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { list-style: none; display: grid; gap: var(--sp-3); }
.site-footer__col a { color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; transition: color 0.2s; }
.site-footer__col a:hover { color: var(--cyan); text-decoration: underline; }
.site-footer__mail { display: inline-flex; align-items: center; gap: 0.5rem; overflow-wrap: anywhere; }
.site-footer__mail .icon { width: 18px; height: 18px; color: var(--cyan); }
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-xs);
}
@media (min-width: 900px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); }
  .site-footer__brand, .site-footer__contact { grid-column: auto; }
}

/* ---------- 11. Home hero ---------- */
.hero { position: relative; padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(3.5rem, 2rem + 5vw, 6.5rem); }
.hero__grid { display: grid; gap: clamp(2.75rem, 2rem + 3vw, 4.5rem); }
.hero__copy { display: grid; gap: var(--sp-5); justify-items: center; max-width: 1100px; margin-inline: auto; text-align: center; }
.hero__title { font-size: var(--fs-display); line-height: 0.98; letter-spacing: -0.035em; }
.hero__lead { max-width: 58ch; color: var(--text-2); font-size: var(--fs-lead); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); width: 100%; }
.hero__actions .btn { flex: 1 1 auto; }
.hero__facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2) var(--sp-5); color: var(--muted); font-size: var(--fs-xs); }
.hero__facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero__facts .icon { width: 16px; height: 16px; color: var(--cyan); }
.hero__visual { width: 100%; max-width: 1120px; margin-inline: auto; }
@media (min-width: 640px) {
  .hero__actions { width: auto; }
  .hero__actions .btn { flex: 0 0 auto; }
}

/* split visual: one mix in, two lanes out */
.split-viz { padding: var(--sp-3); border-radius: var(--r-xl); overflow: hidden; }
.split-viz::after {
  content: "";
  position: absolute;
  right: -15%;
  bottom: -45%;
  width: 70%;
  height: 110%;
  background: radial-gradient(closest-side, rgba(var(--wash-magenta), 0.16), transparent);
  pointer-events: none;
}
.split-viz__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-1) var(--sp-2) var(--sp-3); }
.split-viz__title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-2);
  font: 600 var(--fs-micro)/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 10px var(--rose); animation: pulse 1.6s ease-in-out infinite; }
.split-viz__tc { color: var(--muted); font-size: var(--fs-micro); }
.split-viz__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 70% at 20% 50%, var(--stage-hi), transparent 60%),
    radial-gradient(60% 50% at 85% 25%, rgba(var(--wash-cyan), 0.07), transparent 70%),
    radial-gradient(60% 50% at 85% 75%, rgba(var(--wash-magenta), 0.07), transparent 70%),
    var(--bg-sunken);
  overflow: hidden;
}
.split-viz__stage::before {
  /* safe-area corner marks, like a broadcast monitor */
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 1;
  pointer-events: none;
  --c: var(--corner-mark);
  background:
    linear-gradient(var(--c), var(--c)) top left / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 14px no-repeat;
}
.split-viz__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.split-viz__label {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--label-bg);
  color: var(--text);
  font: 600 var(--fs-micro)/1 var(--font-body);
  white-space: nowrap;
}
.split-viz__label i { width: 8px; height: 8px; border-radius: 2px; background: currentColor; box-shadow: 0 0 8px currentColor; }
.split-viz__label--mix { left: 6%; top: 9%; color: var(--mix); }
.split-viz__label--voice { right: 6%; top: 9%; color: var(--voice); border-color: rgba(var(--cyan-rgb), 0.3); }
.split-viz__label--me { right: 6%; bottom: 9%; color: var(--me); border-color: rgba(var(--magenta-rgb), 0.3); }
.split-viz__legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); padding: var(--sp-3) var(--sp-2) var(--sp-1); color: var(--muted); font-size: var(--fs-micro); }
.split-viz__legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.split-viz__legend i { width: 18px; height: 3px; border-radius: 2px; background: currentColor; }
.split-viz__legend .is-voice { color: var(--voice); }
.split-viz__legend .is-me { color: var(--me); }
.split-viz__legend b { color: var(--text-2); font-weight: 500; }
@media (min-width: 640px) {
  .split-viz__stage { aspect-ratio: 16 / 8; }
}
@media (min-width: 1000px) {
  .split-viz__stage { aspect-ratio: 21 / 8; }
}

/* format ticker under the hero, like a broadcast crawl */
.ticker {
  position: relative;
  border-block: 1px solid var(--line);
  background: var(--ticker-bg);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__list { list-style: none; display: flex; align-items: center; }
.ticker__list li {
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
  padding: 0.95rem 0 0.95rem 1.75rem;
  color: var(--muted);
  font: 500 var(--fs-xs)/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker__list li::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.ticker__list li.is-accent { color: var(--cyan); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 12. Waveform bars and timelines (shared by every scene) ---------- */
.bars { display: flex; align-items: center; gap: 2px; width: 100%; height: 100%; }
.bars > span {
  flex: 1 1 0;
  min-width: 1px;
  height: calc(max(var(--h, 0.5), 0.06) * 100%);
  border-radius: 2px;
  background: currentColor;
  opacity: 0.92;
  transform-origin: center;
  transition: transform 0.55s var(--ease), opacity 0.55s var(--ease);
}
.bars--cut .is-cut, .is-processed .bars .is-cut { transform: scaleY(0.06); opacity: 0.35; }

.tl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px var(--sp-3); align-items: stretch; }
.tl__names { display: grid; gap: 6px; }
.tl__name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: var(--lane-h, 44px);
  color: var(--muted);
  font: 600 0.6875rem/1.15 var(--font-body);
  letter-spacing: 0.03em;
}
.tl__name::before { content: ""; width: 3px; height: 60%; border-radius: 2px; background: currentColor; flex: none; }
.tl__name--voice { color: var(--voice); }
.tl__name--me { color: var(--me); }
.tl__waves { position: relative; display: grid; gap: 6px; }
.tl__lane { height: var(--lane-h, 44px); padding: 4px 0; }
.tl__lane--voice { color: var(--voice); }
.tl__lane--me { color: var(--me); }
.tl__lane--mix { color: var(--mix); }
.tl__ruler { display: flex; justify-content: space-between; grid-column: 2; color: var(--muted); font: 500 0.6875rem/1 var(--font-mono); }
.part {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: var(--a);
  width: calc(var(--b) - var(--a));
  border-inline: 1px solid rgba(var(--amber-rgb), 0.55);
  border-radius: 4px;
  background: rgba(var(--amber-rgb), 0.07);
  pointer-events: none;
}
.part__label {
  position: absolute;
  white-space: nowrap;
  top: -1px;
  left: -1px;
  padding: 1px 5px;
  border-radius: 4px 0 4px 0;
  background: var(--amber-fill);
  color: var(--on-part);
  font: 600 0.625rem/1.3 var(--font-mono);
}
.playhead { position: absolute; inset: -6px 0; pointer-events: none; transform: translateX(calc(var(--p, 0.38) * 100%)); will-change: transform; }
.playhead::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  border-radius: 2px;
  background: var(--playhead);
  box-shadow: var(--playhead-glow);
}

/* ---------- 13. Two modes ---------- */
.modes { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mode-card { display: grid; gap: var(--sp-5); align-content: start; padding: clamp(1.4rem, 1rem + 1.8vw, 2.5rem); border-radius: var(--r-xl); overflow: hidden; }
.mode-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, var(--cyan)), transparent);
  opacity: 0.8;
}
.mode-card::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 70%;
  height: 80%;
  background: radial-gradient(closest-side, var(--accent-glow, rgba(var(--wash-cyan), 0.14)), transparent);
  pointer-events: none;
}
.mode-card--voice { --accent: var(--cyan); --accent-glow: rgba(var(--wash-cyan), 0.14); }
.mode-card--me { --accent: var(--magenta); --accent-glow: rgba(var(--wash-magenta), 0.14); }
.mode-card__head { display: grid; gap: var(--sp-3); justify-items: start; }
.mode-card__title { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem); }
.mode-card__lead { color: var(--text-2); }
.mode-card__viz { padding: var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--inset); --lane-h: 38px; }
.mode-card__sub { font: 600 var(--fs-micro)/1.2 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mode-card__get { display: grid; gap: var(--sp-3); }
.mode-card__use { padding-top: var(--sp-4); border-top: 1px solid var(--line); color: var(--text-2); font-size: var(--fs-sm); }
.mode-card__use strong { color: var(--text); }
.modes__note { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: var(--sp-5); color: var(--muted); font-size: var(--fs-sm); }
.modes__note .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--violet-text); }

/* ---------- 14. Product scenes ---------- */
.scenes { display: grid; gap: clamp(4.5rem, 3rem + 5vw, 8rem); }
.scene { display: grid; gap: clamp(1.75rem, 1rem + 2vw, 3.5rem); align-items: center; }
.scene__copy { display: grid; gap: var(--sp-4); justify-items: start; }
.scene__num { color: var(--cyan); font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: 0.12em; }
.scene__title { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem); }
.scene__text { color: var(--text-2); }
.scene__stage { position: relative; min-width: 0; }
.scene__stage::before {
  content: "";
  position: absolute;
  inset: 5% -4% -6%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--wash-violet), 0.28), transparent);
  pointer-events: none;
}
.scene__hint { margin-top: var(--sp-3); color: var(--muted); font-size: var(--fs-xs); text-align: center; }
@media (min-width: 1000px) {
  .scene { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); }
  .scene--flip .scene__copy { order: 2; }
}

.app-window {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--window-bg);
  box-shadow: var(--window-shadow);
  overflow: hidden;
}
.app-window::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.6), rgba(var(--magenta-rgb), 0.6), transparent);
}
.app-window__bar { display: flex; align-items: center; gap: var(--sp-3); padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); background: var(--window-bar); }
.app-window__dots { display: flex; gap: 6px; }
.app-window__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--window-dot); }
.app-window__title { margin-right: auto; color: var(--muted); font: 600 var(--fs-micro)/1.2 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-window__body { display: grid; gap: var(--sp-3); padding: clamp(0.75rem, 0.5rem + 1vw, 1.25rem); }

/* scene 1: before / after player */
.player__screen { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); border: 1px solid var(--line); background: #000; overflow: hidden; }
.player__frame {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 60% at 72% 38%, rgba(var(--wash-magenta), 0.38), transparent 70%),
    radial-gradient(50% 65% at 22% 72%, rgba(var(--wash-cyan), 0.3), transparent 70%),
    radial-gradient(40% 40% at 50% 20%, rgba(var(--wash-violet), 0.45), transparent 70%),
    linear-gradient(180deg, var(--frame-top) 0%, var(--frame-mid) 55%, #05060b 100%);
  background-size: 140% 140%, 140% 140%, 120% 120%, 100% 100%;
  animation: frame-drift 14s ease-in-out infinite alternate;
}
.player__frame::before {
  /* horizon line */
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 64%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  box-shadow: 0 0 30px 6px rgba(var(--wash-violet), 0.5);
}
.player__frame::after {
  /* light sweep */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: light-sweep 7s ease-in-out infinite;
}
.player__letterbox { position: absolute; inset: 0; pointer-events: none; border-block: clamp(10px, 3vw, 22px) solid #000; }
.player__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-pill);
  background: var(--grad);
  color: var(--on-grad);
  font: 600 var(--fs-micro)/1 var(--font-body);
  box-shadow: var(--glow);
  transition: background 0.3s;
}
.scene-player:not(.is-processed) .player__badge { background: #eef2ff; color: #05060b; box-shadow: none; }
.player__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: 0.5rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.player__play { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--grad); color: var(--on-grad); box-shadow: var(--glow); }
.player__play .icon { width: 18px; height: 18px; fill: currentColor; }
.player__time { margin-left: auto; padding-right: 0.4rem; color: var(--text-2); font-size: var(--fs-xs); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.seg__btn {
  min-height: 36px;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: 600 var(--fs-xs)/1 var(--font-body);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.seg__btn:hover { color: var(--text); }
.seg__btn[aria-pressed="true"] { background: var(--grad); color: var(--on-grad); box-shadow: var(--glow); }
.seg__btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.player__timeline { padding: 10px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--inset-2); --lane-h: 40px; }
.parts-table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.parts-table caption { padding-bottom: 0.5rem; text-align: left; color: var(--text); font: 600 var(--fs-sm)/1.3 var(--font-display); }
.parts-table th { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); text-align: left; color: var(--muted); font: 600 0.6875rem/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; }
.parts-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); color: var(--text-2); font-family: var(--font-mono); font-variant-numeric: tabular-nums; transition: background 0.3s, color 0.3s; }
.parts-table tr.is-active td { background: rgba(var(--amber-rgb), 0.08); color: var(--text); }
.part-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0 0.5rem;
  border: 1px solid rgba(var(--amber-rgb), 0.35);
  border-radius: 8px;
  background: rgba(var(--amber-rgb), 0.08);
  color: var(--amber);
  font: 600 var(--fs-micro)/1 var(--font-mono);
  cursor: pointer;
}
.part-jump:hover { background: rgba(var(--amber-rgb), 0.16); }

/* scene 2: Studio dubbing tracks */
.job-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.job-line strong { margin-right: auto; font: 600 var(--fs-sm)/1.3 var(--font-display); }
.tracks { position: relative; display: grid; gap: var(--sp-3); }
.track { display: grid; gap: 0.6rem; padding: 0.8rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.track--me { border-color: rgba(var(--magenta-rgb), 0.3); color: var(--me); }
.track--voice { border-color: rgba(var(--cyan-rgb), 0.3); color: var(--voice); }
.track__head { display: flex; align-items: center; gap: 0.75rem; }
.track__swatch { width: 4px; height: 30px; flex: none; border-radius: 3px; background: currentColor; box-shadow: 0 0 12px currentColor; }
.track__name { display: grid; min-width: 0; color: var(--text); font-size: var(--fs-sm); line-height: 1.3; }
.track__name strong { font-weight: 600; }
.track__name span { color: var(--muted); font-size: var(--fs-micro); }
.track__wave { position: relative; height: 54px; padding: 6px 8px; border-radius: 10px; background: var(--inset-2); overflow: hidden; }
.track__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-right: 2px solid var(--playhead);
  background: linear-gradient(90deg, transparent, var(--progress-tint));
  box-shadow: var(--progress-glow);
  pointer-events: none;
}
.scene-tracks.is-playing .track__progress { animation: track-progress 9s linear infinite; }
.dl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.45rem 0.7rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font: 600 var(--fs-micro)/1 var(--font-body);
  white-space: nowrap;
}
.dl-chip .icon { width: 14px; height: 14px; color: currentColor; }
.dl-chip--grad { border-color: transparent; background: var(--grad); color: var(--on-grad); }
.scene-tracks.is-playing .dl-chip--grad { animation: chip-glow 3s ease-in-out infinite; }
.dl-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.dl-row .dl-chip { margin-left: 0; }

/* scene 3: extension flow */
.flow-steps { list-style: none; display: grid; gap: var(--sp-2); width: 100%; }
.flow-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font: 500 var(--fs-sm)/1.35 var(--font-body);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
}
.flow-step:hover { border-color: var(--line-2); color: var(--text); }
.flow-step:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.flow-step__n { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--surface-3); color: var(--text); font: 600 var(--fs-xs)/1 var(--font-mono); }
.flow-step[aria-pressed="true"] { border-color: rgba(var(--cyan-rgb), 0.45); background: rgba(var(--cyan-rgb), 0.06); color: var(--text); box-shadow: var(--glow); }
.flow-step[aria-pressed="true"] .flow-step__n { background: var(--grad); color: var(--on-grad); }
.flow-step__timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }
.scene-flow.is-auto .flow-step[aria-pressed="true"] .flow-step__timer { animation: step-timer var(--step-ms, 4200ms) linear forwards; }

.flow { display: grid; min-height: 360px; padding: var(--sp-3); }
.flow > * { grid-area: 1 / 1; }
.flow__screen {
  display: grid;
  gap: var(--sp-3);
  align-content: start;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.985);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0.6s, filter 0.6s;
}
.flow__screen--studio { background: var(--yt-bg); }
.flow__screen--import { background: var(--window-bg-solid); }
.scene-flow[data-step="0"] .flow__screen--studio,
.scene-flow[data-step="1"] .flow__screen--studio,
.scene-flow[data-step="2"] .flow__screen--import { opacity: 1; visibility: visible; transform: none; }
.scene-flow[data-step="1"] .flow__screen--studio { filter: var(--dim); }
.yt-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); color: var(--yt-meta); font: 500 var(--fs-micro)/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.yt-title { color: var(--yt-text); font: 600 1.05rem/1.2 var(--font-body); letter-spacing: 0; }
.yt-video { display: flex; gap: var(--sp-3); align-items: center; }
.yt-thumb { width: 88px; aspect-ratio: 16 / 9; flex: none; border-radius: 6px; background: radial-gradient(60% 80% at 70% 30%, rgba(var(--wash-magenta), 0.55), transparent 70%), radial-gradient(60% 80% at 25% 75%, rgba(var(--wash-cyan), 0.45), transparent 70%), var(--thumb-bg); }
.yt-timeline { position: relative; height: 6px; margin-top: var(--sp-2); border-radius: 3px; background: var(--yt-track); }
.yt-timeline .part { top: 0; bottom: 0; border: 0; border-radius: 3px; background: var(--yt-red); box-shadow: 0 0 10px rgba(255, 78, 69, 0.5); }
.yt-ticks { display: flex; justify-content: space-between; color: var(--yt-dim); font: 500 0.6875rem/1 var(--font-mono); }
.yt-meta { color: var(--yt-meta); font-size: var(--fs-micro); }
.yt-claims { list-style: none; display: grid; gap: 6px; }
.yt-claim {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: var(--yt-row);
  color: var(--yt-row-text);
  font-size: var(--fs-xs);
  overflow: hidden;
}
.yt-claim::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yt-red); }
.yt-claim small { display: block; color: var(--yt-dim); font-size: 0.6875rem; }
.yt-claim .tc { color: var(--yt-text); }
.yt-claim::after {
  /* the extension reading the row */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.22), transparent);
  transform: translateX(-100%);
}
.scene-flow[data-step="0"].is-running .yt-claim::after { animation: row-scan 1.6s var(--ease) 0.6s 1 forwards; }
.scene-flow[data-step="0"].is-running .yt-claim:nth-child(2)::after { animation-delay: 1.3s; }
.scene-flow[data-step="1"] .yt-claim { box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb), 0.45); }

.ext-panel {
  justify-self: end;
  align-self: end;
  z-index: 2;
  width: min(300px, 100%);
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow), var(--glow);
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0.6s;
}
.scene-flow[data-step="1"] .ext-panel { opacity: 1; visibility: visible; transform: none; }
.ext-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
.ext-panel__brand { font: 600 var(--fs-xs)/1 var(--font-body); }
.ext-panel__ver { color: var(--muted); font: 500 0.625rem/1 var(--font-mono); }
.ext-panel__body { display: grid; gap: 0.5rem; padding: 0.8rem; font-size: var(--fs-micro); }
.ext-row { display: flex; align-items: center; gap: 0.5rem; color: var(--text-2); }
.ext-select { flex: 1; padding: 0.4rem 0.55rem; border-radius: 8px; border: 1px solid var(--line-2); background: var(--field-bg); color: var(--text); }
.ext-tc { padding: 0.35rem 0.5rem; border-radius: 8px; border: 1px solid var(--line-2); background: var(--field-bg); color: var(--text); font-family: var(--font-mono); }
.ext-found { display: flex; gap: 0.45rem; align-items: flex-start; padding: 0.5rem 0.6rem; border-radius: 8px; background: rgba(var(--mint-rgb), 0.08); color: var(--mint); line-height: 1.4; }
.ext-found .icon { width: 14px; height: 14px; margin-top: 1px; }
.ext-open { display: block; padding: 0.6rem; border-radius: 8px; background: var(--grad); color: var(--on-grad); font-weight: 700; text-align: center; }
.scene-flow[data-step="1"].is-running .ext-open { animation: press 0.5s var(--ease) 2.6s 1; }

.imp__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.imp__title { font: 600 1.05rem/1.2 var(--font-display); }
.imp__field { display: grid; gap: 0.35rem; }
.imp__label { color: var(--muted); font: 600 0.6875rem/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; }
.imp__input { display: flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0 0.75rem; border-radius: 10px; border: 1px solid rgba(var(--cyan-rgb), 0.4); background: rgba(var(--cyan-rgb), 0.04); color: var(--text); font: 500 var(--fs-xs)/1 var(--font-mono); overflow: hidden; white-space: nowrap; }
.imp__input .icon { width: 15px; height: 15px; color: var(--cyan); }
.typed { display: inline-block; overflow: hidden; max-width: 100%; vertical-align: bottom; }
.scene-flow[data-step="2"].is-running .typed { animation: typing 1.1s steps(24, end) 0.35s 1 both; }
.imp__modes, .imp__parts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.imp__mode { padding: 0.45rem 0.7rem; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); font: 600 var(--fs-micro)/1 var(--font-body); }
.imp__mode.is-on { border-color: rgba(var(--cyan-rgb), 0.5); background: rgba(var(--cyan-rgb), 0.08); color: var(--cyan); }
.scene-flow[data-step="2"].is-running .imp__parts .chip { animation: pop-in 0.5s var(--ease) both; }
.scene-flow[data-step="2"].is-running .imp__parts .chip:nth-child(1) { animation-delay: 1.2s; }
.scene-flow[data-step="2"].is-running .imp__parts .chip:nth-child(2) { animation-delay: 1.45s; }
.imp__check { display: flex; align-items: center; gap: 0.5rem; color: var(--text-2); font-size: var(--fs-micro); }
.imp__box { display: grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 5px; background: var(--grad); color: var(--on-grad); }
.imp__box .icon { width: 12px; height: 12px; stroke-width: 3; }
.imp__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--line); }
.imp__ready { color: var(--text-2); font-size: var(--fs-xs); }
.imp__go { pointer-events: none; }
.scene-flow[data-step="2"].is-running .imp__go { animation: chip-glow 2.2s ease-in-out 2s infinite; }
@media (min-width: 640px) { .flow { min-height: 380px; padding: var(--sp-4); } }

/* ---------- 15. How it works ---------- */
.steps { position: relative; list-style: none; display: grid; gap: var(--sp-4); }
.step {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--sp-3);
  align-content: start;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--card-bg), var(--bg);
  box-shadow: var(--card-shadow);
}
.step__top { display: flex; align-items: center; justify-content: space-between; }
.step__num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: var(--on-grad); font: 700 1.05rem/1 var(--font-display); box-shadow: var(--glow); }
.step__top .icon { width: 22px; height: 22px; color: var(--muted); }
.step__title { font-size: var(--fs-h3); }
.step__text { color: var(--text-2); font-size: var(--fs-sm); }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); } }
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps::before {
    content: "";
    position: absolute;
    top: calc(clamp(1.25rem, 1rem + 1vw, 1.75rem) + 21px);
    left: 4%;
    right: 4%;
    height: 2px;
    background: var(--grad);
    opacity: 0.6;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.6s var(--ease) 0.2s;
  }
  .steps.is-in::before, html:not(.js) .steps::before { transform: scaleX(1); }
}

/* ---------- 16. Speed panel ---------- */
.speed { display: grid; gap: var(--sp-6); padding: clamp(1.5rem, 1rem + 2.5vw, 3rem); border-radius: var(--r-xl); overflow: hidden; }
.speed::after {
  content: "";
  position: absolute;
  left: -20%;
  bottom: -60%;
  width: 70%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(var(--wash-cyan), 0.12), transparent);
  pointer-events: none;
}
.speed__intro { display: grid; gap: var(--sp-4); justify-items: start; }
.speed__title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); }
.speed__note { color: var(--muted); font-size: var(--fs-xs); }
.speed__rows { list-style: none; display: grid; gap: var(--sp-5); }
.speed-row { display: grid; gap: 0.6rem; }
.speed-row__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.speed-row__label { color: var(--text-2); font-size: var(--fs-sm); }
.speed-row__value { font: 700 clamp(1.6rem, 1.3rem + 1vw, 2.1rem)/1 var(--font-display); white-space: nowrap; }
.speed-row__value small { margin-left: 2px; color: var(--muted); font-size: 0.5em; font-weight: 600; }
.speed-row__meters { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 2.6rem; align-items: center; gap: 0.4rem 0.75rem; color: var(--muted); font-size: var(--fs-micro); }
.speed-row__meters .tc { text-align: right; color: var(--text-2); }
.meter { position: relative; height: 8px; border-radius: 99px; background: var(--meter-track); overflow: hidden; }
.meter__fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform 1.3s var(--ease); }
.meter--length .meter__fill { background: rgba(var(--mix-rgb), 0.4); }
.meter--time .meter__fill { background: var(--grad); box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.5); transition-delay: 0.35s; }
.speed.is-in .meter__fill, html:not(.js) .meter__fill { transform: scaleX(1); }
@media (min-width: 1000px) { .speed { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: var(--sp-8); } }

/* ---------- 17. Accordion (native details/summary) ---------- */
.accordion { display: grid; gap: var(--sp-3); }
.accordion__item { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.3s, background-color 0.3s; }
.accordion__item[open] { border-color: rgba(var(--cyan-rgb), 0.3); background: rgba(var(--cyan-rgb), 0.035); }
.accordion__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-lg);
  color: var(--text);
  font: 600 1.0625rem/1.35 var(--font-display);
  list-style: none;
  cursor: pointer;
}
.accordion__q::-webkit-details-marker { display: none; }
.accordion__q::after {
  content: "";
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(var(--cyan), var(--cyan)) center / 12px 1.6px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) center / 1.6px 12px no-repeat;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.accordion__item[open] > .accordion__q::after { transform: rotate(45deg); border-color: rgba(var(--cyan-rgb), 0.5); }
.accordion__q:hover { color: var(--cyan); }
.accordion__q:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.accordion__a { padding: 0 1.25rem 1.25rem; color: var(--text-2); }
.accordion__a > * + * { margin-top: 0.75rem; }
.accordion__a a { color: var(--cyan); }
.accordion__a ul { padding-left: 1.2rem; }
.faq-group + .faq-group { margin-top: var(--sp-7); }
.faq-group__title { margin-bottom: var(--sp-4); font-size: var(--fs-h3); }
.faq-teaser { display: grid; gap: var(--sp-6); }
.faq-teaser .section__head { margin-bottom: 0; }
@media (min-width: 1000px) { .faq-teaser { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; } }

/* ---------- 18. CTA band ---------- */
.cta-band {
  position: relative;
  display: grid;
  gap: var(--sp-5);
  padding: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  border-radius: var(--r-xl);
  border: 1px solid rgba(var(--violet-rgb), 0.38);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(var(--wash-cyan), 0.16), transparent 60%),
    radial-gradient(70% 140% at 100% 100%, rgba(var(--wash-magenta), 0.18), transparent 60%),
    var(--cta-fill);
  box-shadow: var(--cta-shadow);
  overflow: hidden;
}
.cta-band__wave { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; opacity: 0.22; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.cta-band__copy { position: relative; display: grid; gap: var(--sp-3); }
.cta-band__title { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); }
.cta-band__text { max-width: 52ch; color: var(--text-2); }
.cta-band__actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.cta-band__actions .btn { flex: 1 1 auto; }
.cta-band .btn--ghost { background: var(--cta-ghost-bg); }
@media (min-width: 900px) {
  .cta-band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .cta-band__actions .btn { flex: 0 0 auto; }
}

/* ---------- 19. Inner page hero ---------- */
.page-hero { position: relative; padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.page-hero__inner { display: grid; gap: var(--sp-5); justify-items: start; max-width: 860px; }
.page-hero__title { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.03em; }
.page-hero__lead { max-width: 60ch; color: var(--text-2); font-size: var(--fs-lead); }
.page-hero__wave { width: min(100%, 440px); height: 44px; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.page-hero::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--cyan-rgb), 0.5), rgba(var(--violet-rgb), 0.4), transparent 80%);
}

/* ---------- 20. Prose (About) ---------- */
.prose { max-width: 68ch; color: var(--text-2); font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.prose h3 { margin-top: 1.6em; font-size: var(--fs-h3); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--cyan); }
.prose a { color: var(--cyan); }
.prose strong { color: var(--text); font-weight: 600; }

/* ---------- 21. Info list (Contact aside, About facts) ---------- */
.info-list { list-style: none; display: grid; gap: var(--sp-5); }
.info-item { display: flex; gap: 0.9rem; align-items: flex-start; }
.info-item > div { min-width: 0; }
.info-item .card__icon { width: 42px; height: 42px; flex: none; }
.info-item__label { display: block; margin-bottom: 2px; color: var(--muted); font: 600 var(--fs-micro)/1.3 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; }
.info-item__value { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.info-item__value a { color: var(--cyan); }
.info-item__text { color: var(--text-2); font-size: var(--fs-sm); }

/* in-page navigation (FAQ groups) */
.toc { display: grid; gap: var(--sp-3); }
.toc__title { color: var(--muted); font: 600 var(--fs-micro)/1.2 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; }
.toc__list { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc__link { display: block; margin-left: -1px; padding: 0.5rem 0.9rem; border-left: 2px solid transparent; color: var(--text-2); font-size: var(--fs-sm); text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.toc__link:hover { color: var(--text); border-left-color: var(--cyan); }

/* ---------- 22. Forms ---------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: grid; gap: 0.45rem; }
.field__label { color: var(--text-2); font: 600 var(--fs-xs)/1.3 var(--font-body); letter-spacing: 0.02em; }
.field__req { color: var(--magenta); }
.field__opt { color: var(--muted); font-weight: 500; }
.field__input {
  width: 100%;
  min-height: 50px;
  padding: 0.8rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--input-bg);
  color: var(--text);
  font: 400 1rem/1.45 var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field__input::placeholder { color: var(--muted); opacity: 1; }
.field__input:hover { border-color: var(--line-3); }
.field__input:focus { outline: none; border-color: var(--cyan); background: rgba(var(--cyan-rgb), 0.03); box-shadow: 0 0 0 4px rgba(var(--cyan-rgb), 0.16); }
textarea.field__input { min-height: 170px; resize: vertical; }
select.field__input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
}
select.field__input option { background: var(--bg-raised); color: var(--text); }
.field__hint { color: var(--muted); font-size: var(--fs-xs); }
.field__error { display: flex; align-items: center; gap: 0.4rem; color: var(--rose); font-size: var(--fs-xs); }
.field__error .icon { width: 15px; height: 15px; }
.field--invalid .field__input { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(var(--rose-rgb), 0.12); }
.field--invalid .field__input:focus { border-color: var(--cyan); background: rgba(var(--cyan-rgb), 0.03); box-shadow: 0 0 0 4px rgba(var(--cyan-rgb), 0.16); }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.form__note { color: var(--muted); font-size: var(--fs-xs); }
.alert { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1rem 1.15rem; border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.alert > div { min-width: 0; }
.alert .icon { width: 20px; height: 20px; margin-top: 2px; }
.alert__title { display: block; margin-bottom: 2px; color: var(--text); font-weight: 600; }
.alert--success { border-color: rgba(var(--mint-rgb), 0.35); background: rgba(var(--mint-rgb), 0.07); color: var(--success-text); }
.alert--success .icon { color: var(--mint); }
.alert--error { border-color: rgba(var(--rose-rgb), 0.4); background: rgba(var(--rose-rgb), 0.08); color: var(--error-text); }
.alert--error .icon { color: var(--rose); }
.alert a { color: inherit; font-weight: 600; }
.alert:focus { outline: none; box-shadow: var(--focus-ring); }

/* ---------- 23. Scroll reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 24. Keyframes ---------- */
@keyframes frame-drift {
  0% { background-position: 0% 0%, 100% 100%, 50% 0%, 0 0; }
  100% { background-position: 100% 60%, 0% 40%, 50% 100%, 0 0; }
}
@keyframes light-sweep { 0%, 35% { transform: translateX(-100%); } 75%, 100% { transform: translateX(100%); } }
@keyframes track-progress { from { width: 0; } to { width: 100%; } }
@keyframes chip-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--cyan-rgb), 0); } 50% { box-shadow: 0 0 0 4px rgba(var(--cyan-rgb), 0.18), 0 8px 30px -6px rgba(var(--violet-rgb), 0.8); } }
@keyframes step-timer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes row-scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes press { 50% { transform: scale(0.95); filter: brightness(1.2); } }
@keyframes typing { from { max-width: 0; } to { max-width: 100%; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }

/* ---------- 25. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .spotlight { display: none; }
  .scene-flow .typed { max-width: 100%; }
}

/* ---------- 26. Theme switch ---------- */
/* site.js adds .theme-switching to <html> for two frames, so every colour changes at once
   (only the sun/moon icon animates). Where supported, the switch is a short cross-fade. */
.theme-switching *:not(.theme-icon),
.theme-switching *::before,
.theme-switching *::after { transition: none !important; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.4s; animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1); }
