/* ==========================================================================
   Story Reframe website — "Projection room" design system
   Rules and examples: private/plan/design-system.md. Dark only.
   Sections: 1 tokens · 2 base · 3 layout · 4 components · 5 header/footer
             6 home: hero console · 7 pipeline · 8 modes · 9 editor mock
             10 files/measured/pricing/faq/cta · 11 inner pages · 12 motion safety
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* surfaces */
  --bg: #06070a;
  --bg-2: #0a0c11;
  --surface: #0f1219;
  --surface-2: #151924;
  --surface-3: #1c2130;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  /* text (contrast on --bg: 17.6 / 9.0 / 5.6) */
  --text: #eef0f5;
  --text-2: #aab1c2;
  --text-3: #8189a0;
  /* brand */
  --amber: #22d3ee;          /* accent (cyan, matches the app since 2026-11-16): cut marks, primary actions */
  --amber-2: #c084fc;        /* gradient end (violet) */
  --amber-ink: #03111a;      /* text on the accent gradient (8:1 or more) */
  --amber-soft: rgba(34, 211, 238, .12);
  --ice: #c4b5fd;            /* Claude / AI reading */
  --ice-soft: rgba(196, 181, 253, .12);
  --keep: #5be0a0;
  --keep-soft: rgba(91, 224, 160, .14);
  --drop: #ff6b5e;
  --drop-soft: rgba(255, 107, 94, .14);
  --focus: #67e8f9;
  --grad: linear-gradient(100deg, #22d3ee 0%, #818cf8 50%, #c084fc 100%);
  --grad-ai: linear-gradient(100deg, #c4b5fd 0%, #f0abfc 100%);
  /* type */
  --font-display: "Unbounded", "Geist", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --fs-h2: clamp(1.65rem, 1.2rem + 1.9vw, 2.75rem);
  --fs-hero: clamp(2rem, 1.25rem + 3vw, 3.55rem);
  --lh: 1.6;
  --lh-tight: 1.12;
  /* spacing (4 px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 128px);
  /* shape */
  --r-sm: 8px; --r: 14px; --r-lg: 22px; --r-pill: 999px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 60px -30px rgba(0, 0, 0, .8);
  --glow: 0 30px 120px -40px rgba(129, 140, 248, .35);
  /* motion */
  --t-fast: 160ms;
  --t: 280ms;
  --t-slow: 700ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --cycle: 10s;               /* hero + pipeline loop length */
  color-scheme: dark;
}

/* 2. Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-md)/var(--lh) var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: var(--lh-tight); letter-spacing: -.01em; }
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.035em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-xl); letter-spacing: -.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration-color: rgba(34, 211, 238, .5); text-underline-offset: 3px; }
a:hover { color: var(--amber); }
strong { font-weight: 600; color: var(--text); }
cite { font-style: italic; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(34, 211, 238, .35); color: #fff; }
.tc { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.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: var(--s-4); top: -60px; z-index: 100; padding: var(--s-2) var(--s-4); background: var(--amber); color: var(--amber-ink); border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: var(--s-3); }
.site-main:focus { outline: none; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* 3. Layout ------------------------------------------------------------------ */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .55); }
.section--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg) 85%); border-block: 1px solid var(--line); }
.section__head { max-width: 720px; margin: 0 auto var(--s-8); text-align: center; }
.section__head--left { margin-inline: 0; text-align: start; }
.section__head .lead { margin-top: var(--s-4); }
.section__more { margin-top: var(--s-7); text-align: center; }
.split { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); } }
.split__text .lead { margin-top: var(--s-4); }
.split__caption { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--text-3); text-align: center; }
.split__visual { margin: 0; }

/* 4. Components ------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-4);
  font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }
.lead { font-size: var(--fs-lg); color: var(--text-2); }
.lead a { color: var(--text); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn {
  --btn-h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--btn-h); padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: 600 var(--fs-md)/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background-color var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), color var(--t) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--grad); color: var(--amber-ink); box-shadow: 0 10px 30px -12px rgba(129, 140, 248, .7); }
.btn--primary:hover { color: var(--amber-ink); box-shadow: 0 14px 40px -12px rgba(129, 140, 248, .9); }
.btn--ghost { background: rgba(255, 255, 255, .03); border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { color: var(--text); border-color: rgba(34, 211, 238, .55); background: var(--amber-soft); }
.btn--sm { --btn-h: 40px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.btn--lg { --btn-h: 54px; padding: 0 var(--s-6); font-size: var(--fs-lg); }
.btn--block { width: 100%; }
.btn__arrow { transition: transform var(--t) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.link-arrow { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; color: var(--amber); text-decoration: none; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform var(--t) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

.card { position: relative; padding: var(--s-6); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font: 500 var(--fs-xs)/1.2 var(--font-mono); letter-spacing: .04em; color: var(--text-2); }
.chip--keep { color: var(--keep); border-color: rgba(91, 224, 160, .4); background: var(--keep-soft); }
.chip--drop { color: var(--drop); border-color: rgba(255, 107, 94, .4); background: var(--drop-soft); }
.chip--ai { color: var(--ice); border-color: rgba(196, 181, 253, .4); background: var(--ice-soft); }

.notice { display: flex; align-items: flex-start; gap: var(--s-3); max-width: 720px; margin: 0 auto var(--s-6); padding: var(--s-3) var(--s-4); border: 1px solid rgba(34, 211, 238, .35); background: var(--amber-soft); border-radius: var(--r); color: var(--text); font-size: var(--fs-sm); }
.notice .icon { color: var(--amber); margin-top: 2px; }
.notice--ok { border-color: rgba(91, 224, 160, .4); background: var(--keep-soft); margin-top: var(--s-5); }
.notice--ok .icon { color: var(--keep); }
.notice--error { border-color: rgba(255, 107, 94, .45); background: var(--drop-soft); }
.notice--error .icon { color: var(--drop); }

.checks { list-style: none; display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.checks li { display: flex; gap: var(--s-3); color: var(--text-2); }
.checks .icon { color: var(--amber); margin-top: 3px; }

/* Scroll reveal: only when JS runs (html.js). --d = stagger index (0-4). */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* 5. Header / footer --------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease); border-bottom: 1px solid transparent; }
.site-header.is-scrolled, .site-header.is-open { background: rgba(6, 7, 10, .82); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: var(--s-4); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.logo { width: 32px; height: 32px; }
.brand__name { font: 600 1.125rem/1 var(--font-display); letter-spacing: -.03em; }
.nav { display: none; margin-inline: auto; }
.nav__list { list-style: none; display: flex; gap: var(--s-1); }
.nav__link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r-pill); color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; transition: color var(--t) var(--ease), background-color var(--t) var(--ease); }
.nav__link:hover, .nav__link.is-active { color: var(--text); background: rgba(255, 255, 255, .05); }
.site-header__actions { display: flex; align-items: center; gap: var(--s-2); margin-inline-start: auto; }
.site-header__cta { display: none; }
.nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.nav-toggle .icon { width: 20px; height: 20px; grid-area: 1 / 1; }
.nav-toggle .icon--close, .nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }
.mobile-nav { border-top: 1px solid var(--line); padding-block: var(--s-4) var(--s-6); max-height: calc(100dvh - 68px); overflow-y: auto; }
.mobile-nav__list { list-style: none; }
.mobile-nav__link { display: flex; align-items: center; justify-content: space-between; min-height: 56px; border-bottom: 1px solid var(--line); text-decoration: none; font: 500 1.25rem/1 var(--font-display); letter-spacing: -.02em; }
.mobile-nav__link .icon { color: var(--text-3); }
.mobile-nav__actions { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
.mobile-nav__mail { margin-top: var(--s-5); text-align: center; color: var(--text-2); }
@media (min-width: 640px) { .site-header__cta { display: inline-flex; } }
@media (min-width: 1000px) {
  .nav { display: block; }
  .nav-toggle, .mobile-nav { display: none !important; }
  .site-header__actions { margin-inline-start: 0; }
}

.site-footer { padding-block: var(--s-8) var(--s-6); border-top: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-size: var(--fs-sm); }
.site-footer__grid { display: grid; gap: var(--s-6); }
.site-footer__tagline { max-width: 340px; margin-top: var(--s-4); }
.site-footer__mail { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-4); }
.site-footer__mail .icon { color: var(--amber); }
.site-footer__h { margin-bottom: var(--s-3); font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.site-footer__col ul { list-style: none; display: grid; gap: var(--s-1); }
.site-footer__col a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.site-footer__bottom { display: grid; gap: var(--s-2); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--text-3); font-size: var(--fs-xs); }
@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
  .site-footer__bottom { grid-template-columns: auto auto; justify-content: space-between; }
}

/* 6. Home: hero + console ------------------------------------------------------ */
.hero { position: relative; padding-block: var(--s-7) var(--s-8); overflow: hidden; }
.hero__bg {
  position: absolute; inset: -68px 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 30%, rgba(129, 140, 248, .16), transparent 70%),
    radial-gradient(40% 40% at 12% 8%, rgba(196, 181, 253, .10), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}
.hero__inner { display: grid; gap: var(--s-7); align-items: center; }
.hero__title { font-size: var(--fs-hero); line-height: 1.04; letter-spacing: -.045em; }
.hero__title .grad-text { display: inline; }
.hero__lead { margin-top: var(--s-5); max-width: 560px; font-size: var(--fs-lg); color: var(--text-2); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero__note { display: flex; gap: var(--s-2); margin-top: var(--s-5); max-width: 520px; font-size: var(--fs-sm); color: var(--text-3); }
.hero__note .icon { color: var(--keep); margin-top: 2px; width: 18px; height: 18px; }
.hero__visual { margin: 0; min-width: 0; }
@media (max-width: 479px) { .hero__ctas .btn { width: 100%; } }
@media (min-width: 1000px) {
  .hero { padding-block: var(--s-8) var(--s-9); }
  .hero__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-7); }
}

.console {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(23, 27, 38, .92), rgba(10, 12, 17, .96));
  box-shadow: var(--glow), var(--shadow);
}
.console::after { /* glass highlight */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), transparent 30%);
}
.console__bar { display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-4); border-bottom: 1px solid var(--line); font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--text-2); }
.console__rec { width: 8px; height: 8px; border-radius: 50%; background: var(--drop); box-shadow: 0 0 10px var(--drop); animation: blink 1.6s steps(2, jump-none) infinite; }
.console__file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console__tc { margin-inline-start: auto; color: var(--amber); }
.console__body { display: grid; gap: var(--s-4); padding: var(--s-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) {
  .console__body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: var(--s-5); gap: var(--s-5); }
  .console__strip { grid-column: 1 / -1; }
}
.console__h { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 12px var(--ice); animation: pulse 1.8s ease-in-out infinite; }

/* filmstrip */
.strip { position: relative; height: 96px; padding: 14px 0; border-radius: 10px; background: #08090d; overflow: hidden; }
.strip::before, .strip::after { /* sprocket holes */
  content: ""; position: absolute; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(255, 255, 255, .16) 7px 13px, transparent 13px 20px);
}
.strip::before { top: 4px; }
.strip::after { bottom: 4px; }
.strip__frames { display: flex; gap: 3px; height: 100%; padding-inline: 3px; }
.strip__frame {
  flex: 1 1 0; min-width: 0; border-radius: 3px;
  background:
    radial-gradient(90% 70% at 30% 35%, hsl(var(--h) 80% 62% / .75), transparent 62%),
    linear-gradient(165deg, hsl(var(--h) 45% 24%), hsl(calc(var(--h) + 35) 40% 8%));
}
.strip__frame:nth-child(n+11) { display: none; }
@media (min-width: 480px) { .strip__frame:nth-child(n+11) { display: block; } }
.strip__marks { position: absolute; inset: 8px 3px; animation: marks-in var(--cycle) linear infinite; }
.strip__mark { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1%); border-radius: 6px; }
.strip__mark--keep { border: 2px solid var(--keep); background: rgba(91, 224, 160, .08); box-shadow: 0 0 16px -4px rgba(91, 224, 160, .7) inset; }
.strip__mark--drop { background: repeating-linear-gradient(135deg, rgba(6, 7, 10, .72) 0 4px, rgba(255, 107, 94, .35) 4px 6px); border: 1px solid rgba(255, 107, 94, .5); }
.strip__scanner { position: absolute; inset: 0; transform: translateX(-100%); animation: scan var(--cycle) linear infinite; background: linear-gradient(90deg, transparent 55%, rgba(196, 181, 253, .14)); }
.strip__scanner::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 2px; background: var(--ice); box-shadow: 0 0 14px 3px rgba(196, 181, 253, .75); }

.strip-result { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }
.strip-result__label { font-size: var(--fs-xs); color: var(--text-3); }
.strip-result__label--out { color: var(--keep); }
.strip-result__bar { display: flex; gap: 2px; flex: 0 1 34%; height: 10px; transform-origin: left center; animation: result-in var(--cycle) var(--ease) infinite; }
.strip-result__bar i { flex: var(--w) 1 0; border-radius: 3px; background: var(--keep); box-shadow: 0 0 10px rgba(91, 224, 160, .6); }

/* subtitle feed */
.subs { position: relative; height: 172px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent); }
.subs__track { list-style: none; display: grid; gap: 6px; padding-bottom: 6px; animation: subs-scroll 26s linear infinite; }
.subs__line { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-3); row-gap: 4px; padding: 6px 8px; border-radius: 8px; font-size: var(--fs-sm); line-height: 1.35; color: var(--text-2); }
.subs__line .tc { font-size: var(--fs-xs); color: var(--text-3); padding-top: 2px; }
.subs__line.is-beat { background: var(--ice-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--ice); }
.subs__tag { grid-column: 2; justify-self: start; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(196, 181, 253, .16); color: var(--ice); font: 500 .6875rem/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }

/* outputs */
.outs { list-style: none; display: grid; gap: 6px; }
.out {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .025);
  animation: out-in var(--cycle) var(--ease) infinite; animation-delay: calc(var(--i) * .3s);
}
.out__shape { flex: none; display: block; border: 1.5px solid var(--amber); border-radius: 3px; background: var(--amber-soft); }
.out__shape--wide { width: 24px; height: 14px; }
.out__shape--tall { width: 11px; height: 18px; margin-inline: 6.5px; }
.out__shape--split { width: 24px; height: 12px; background: repeating-linear-gradient(90deg, var(--amber-soft) 0 5px, var(--bg) 5px 7px); }
.out__shape--film { width: 24px; height: 14px; border-color: var(--keep); background: var(--keep-soft); }
.out__name { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.out__tc { flex: none; font-size: var(--fs-xs); color: var(--text-3); }
@media (min-width: 380px) and (max-width: 559px) { .outs { grid-template-columns: 1fr 1fr; } .out__tc { display: none; } }

@keyframes scan { 0% { transform: translateX(-100%); opacity: 1; } 45% { transform: translateX(0); opacity: 1; } 52%, 100% { transform: translateX(0); opacity: 0; } }
@keyframes marks-in { 0% { clip-path: inset(0 100% 0 0); opacity: 1; } 45% { clip-path: inset(0 0 0 0); opacity: 1; } 90% { clip-path: inset(0 0 0 0); opacity: 1; } 97%, 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes result-in { 0%, 48% { transform: scaleX(0); opacity: 0; } 58% { transform: scaleX(1); opacity: 1; } 90% { transform: scaleX(1); opacity: 1; } 97%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes out-in { 0%, 52% { opacity: .25; transform: translateY(6px); border-color: var(--line); } 58% { opacity: 1; transform: none; border-color: rgba(34, 211, 238, .45); } 90% { opacity: 1; transform: none; border-color: var(--line); } 100% { opacity: .25; transform: translateY(6px); } }
@keyframes subs-scroll { to { transform: translateY(-50%); } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes pulse { 50% { opacity: .45; transform: scale(.8); } }

/* facts strip under the hero */
.facts { border-block: 1px solid var(--line); background: var(--bg-2); }
.facts__list { list-style: none; display: grid; gap: var(--s-5); padding-block: var(--s-6); }
.fact { display: flex; gap: var(--s-3); }
.fact__icon { width: 22px; height: 22px; color: var(--amber); margin-top: 2px; }
.fact__title { font: 600 var(--fs-md)/1.3 var(--font-body); letter-spacing: 0; margin-bottom: 4px; }
.fact p { font-size: var(--fs-sm); color: var(--text-2); }
@media (min-width: 640px) { .facts__list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .facts__list { grid-template-columns: repeat(4, 1fr); gap: var(--s-6); } }

/* 7. Pipeline (How it works) ---------------------------------------------------- */
.pipeline { position: relative; list-style: none; display: grid; gap: var(--s-4); counter-reset: none; }
.pipeline__step {
  position: relative; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  animation: step-glow var(--cycle) var(--ease) infinite; animation-delay: calc(var(--i) * 2s); animation-fill-mode: none;
}
.pipeline__node {
  position: relative; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: var(--s-4);
  border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text-2);
  animation: node-on var(--cycle) var(--ease) infinite; animation-delay: calc(var(--i) * 2s); animation-fill-mode: none;
}
.pipeline__node .icon { width: 24px; height: 24px; }
.pipeline__node--ai { color: var(--ice); }
.pipeline__title { display: flex; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-2); font: 600 var(--fs-lg)/1.25 var(--font-body); letter-spacing: -.01em; }
.pipeline__num { font-size: var(--fs-xs); color: var(--amber); }
.pipeline__step p { font-size: var(--fs-sm); color: var(--text-2); }
.pipeline__viz { position: relative; height: 64px; margin-bottom: var(--s-4); padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); overflow: hidden; }
.pipeline__rail { display: none; }

/* desktop: five in a row, rail through the nodes, a pulse runs along it */
@media (min-width: 1100px) {
  .pipeline { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); }
  .pipeline__step { padding: var(--s-4); }
  .pipeline__rail { display: block; position: absolute; left: calc(10% - 4px); right: calc(10% - 4px); top: calc(var(--s-4) + 26px); z-index: 1; height: 2px; background: linear-gradient(90deg, rgba(34, 211, 238, .1), rgba(34, 211, 238, .35), rgba(34, 211, 238, .1)); pointer-events: none; }
  .pipeline__step { background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
  .pipeline__node { margin-inline: auto; }
  .pipeline__title, .pipeline__step p { text-align: center; justify-content: center; }
  .pipeline__runner { position: absolute; inset: 0; animation: run var(--cycle) linear infinite; }
  .pipeline__runner i { position: absolute; left: -6px; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(34, 211, 238, .2), 0 0 24px 6px rgba(129, 140, 248, .7); }
}
@keyframes run { 0% { transform: translateX(0); opacity: 1; } 80% { transform: translateX(100%); opacity: 1; } 86%, 100% { transform: translateX(100%); opacity: 0; } }
@keyframes node-on {
  0% { color: var(--amber-ink); background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px rgba(34, 211, 238, .15), 0 0 40px rgba(129, 140, 248, .55); }
  16% { color: var(--amber-ink); background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px rgba(34, 211, 238, .15), 0 0 40px rgba(129, 140, 248, .55); }
  24%, 100% { color: var(--text-2); background: var(--surface-3); border-color: var(--line-2); box-shadow: none; }
}
@keyframes step-glow { 0%, 16% { border-color: rgba(34, 211, 238, .45); } 24%, 100% { border-color: var(--line); } }

/* step mini visuals: each plays when its step lights (same cycle, same delay) */
.viz-upload { display: grid; gap: 5px; align-content: center; }
.viz-upload__file { font-size: .6875rem; line-height: 1.1; color: var(--text-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.viz-upload__file--srt { color: var(--ice); }
.viz-upload__bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.viz-upload__bar i { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(.08); animation: fill var(--cycle) var(--ease) infinite; animation-delay: calc(var(--i, 0) * 2s); }
.pipeline__step .viz-upload__bar i { animation-delay: 0s; }
.viz-read { display: grid; gap: 5px; align-content: center; }
.viz-read i { display: block; width: calc(var(--w) * 1%); height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.viz-read i.is-beat { background: var(--ice); box-shadow: 0 0 10px rgba(196, 181, 253, .6); }
.viz-read::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(196, 181, 253, .22), transparent); transform: translateX(-100%); animation: sweep var(--cycle) linear infinite; animation-delay: 2s; }
.viz-plan { display: grid; align-content: center; }
.viz-plan__bar { position: relative; display: block; height: 18px; border-radius: 4px; background: rgba(255, 255, 255, .06); }
.viz-plan__bar i { position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1%); border-radius: 4px; opacity: 0; animation: mark-pop var(--cycle) var(--ease) infinite; animation-delay: 4s; }
.viz-plan__bar i.k { border: 1.5px solid var(--keep); background: var(--keep-soft); }
.viz-plan__bar i.d { background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(255, 107, 94, .5) 3px 5px); }
.viz-review { display: grid; gap: 5px; align-content: center; }
.viz-review__row { display: flex; align-items: center; gap: 8px; }
.viz-review__row i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.viz-review__row b { width: 22px; height: 10px; border-radius: 6px; background: var(--keep); }
.viz-review__row--flip i { animation: row-dim var(--cycle) var(--ease) infinite; animation-delay: 6s; }
.viz-review__row--flip b { animation: toggle-off var(--cycle) var(--ease) infinite; animation-delay: 6s; }
.viz-render { display: flex; align-items: center; justify-content: center; gap: 4px; }
.viz-render span { padding: 3px 5px; border-radius: 5px; border: 1px solid rgba(91, 224, 160, .45); color: var(--keep); font-size: .625rem; opacity: .2; animation: tag-in var(--cycle) var(--ease) infinite; animation-delay: 8s; }
.viz-render span:nth-child(2) { animation-delay: 8.15s; }
.viz-render span:nth-child(3) { animation-delay: 8.3s; }
.viz-render span:nth-child(4) { animation-delay: 8.45s; }
@keyframes fill { 0% { transform: scaleX(.08); } 15% { transform: scaleX(1); } 90% { transform: scaleX(1); } 100% { transform: scaleX(.08); } }
@keyframes sweep { 0% { transform: translateX(-100%); } 18%, 100% { transform: translateX(100%); } }
@keyframes mark-pop { 0% { opacity: 0; transform: scaleY(.3); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes row-dim { 0% { opacity: 1; } 8% { opacity: .35; } 85% { opacity: .35; } 95%, 100% { opacity: 1; } }
@keyframes toggle-off { 0% { background: var(--keep); } 8% { background: var(--drop); } 85% { background: var(--drop); } 95%, 100% { background: var(--keep); } }
@keyframes tag-in { 0% { opacity: .2; transform: translateY(4px); } 6% { opacity: 1; transform: none; } 80% { opacity: 1; } 95%, 100% { opacity: .2; } }
@media (min-width: 640px) and (max-width: 1099px) { .pipeline { grid-template-columns: 1fr 1fr; } .pipeline__step:nth-child(5) { grid-column: 1 / -1; } }
/* phones: a vertical timeline, node on the left */
@media (max-width: 639px) {
  .pipeline { gap: 0; }
  .pipeline__step { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: var(--s-4); padding: 0 0 var(--s-6); border: 0; background: none; animation: none; }
  .pipeline__step::before { content: ""; position: absolute; left: 21px; top: 52px; bottom: 6px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, rgba(34, 211, 238, .35), var(--line)); }
  .pipeline__step:nth-child(5)::before { display: none; }
  .pipeline__node { grid-row: 1 / span 3; width: 44px; height: 44px; margin: 0; border-radius: 14px; }
  .pipeline__node .icon { width: 20px; height: 20px; }
  .pipeline__viz { grid-column: 2; height: 58px; margin-bottom: var(--s-3); }
  .pipeline__title, .pipeline__step p { grid-column: 2; }
}

/* 8. Modes --------------------------------------------------------------------- */
.modes { display: grid; gap: var(--s-4); }
@media (min-width: 800px) { .modes { grid-template-columns: 1fr 1fr; gap: var(--s-5); } }
.mode { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--surface-2), var(--surface)); transition: border-color var(--t) var(--ease), transform var(--t) var(--ease); }
.mode:hover { border-color: rgba(34, 211, 238, .35); }
.mode__viz { position: relative; height: 168px; padding: var(--s-5); border-bottom: 1px solid var(--line); background: radial-gradient(70% 90% at 50% 100%, rgba(129, 140, 248, .1), transparent 70%), #08090d; overflow: hidden; }
.mode__body { padding: var(--s-5) var(--s-5) var(--s-6); }
.mode__kicker { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); font: 500 var(--fs-xs)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.mode__kicker .icon { width: 16px; height: 16px; }
.mode__title { margin-bottom: var(--s-3); }
.mode__body > p { color: var(--text-2); }
.mode__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-5) 0 0; padding-top: var(--s-4); border-top: 1px dashed var(--line-2); font-size: var(--fs-sm); }
.mode__meta div { display: flex; gap: var(--s-2); }
.mode__meta dt { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; padding-top: 2px; }
.mode__meta dd { margin: 0; color: var(--text); }

/* summary: long bar loses its dropped parts, short bar assembles */
.viz-summary { display: grid; align-content: center; gap: var(--s-5); }
.viz-summary__row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: var(--s-3); }
.viz-summary__label { font-size: var(--fs-xs); color: var(--text-3); }
.viz-summary__row--out .viz-summary__label { color: var(--keep); }
.viz-summary__bar { display: flex; gap: 3px; height: 22px; }
.viz-summary__bar i { flex: var(--w) 1 0; border-radius: 4px; }
.viz-summary__bar i.k { background: rgba(255, 255, 255, .2); animation: sum-keep 8s var(--ease) infinite; }
.viz-summary__bar i.d { background: rgba(255, 255, 255, .2); animation: sum-drop 8s var(--ease) infinite; }
.viz-summary__bar--out { width: 30%; transform-origin: left; animation: sum-out 8s var(--ease) infinite; }
.viz-summary__bar--out i { background: var(--keep); box-shadow: 0 0 12px rgba(91, 224, 160, .45); }
@keyframes sum-keep { 0%, 15% { background: rgba(255, 255, 255, .2); } 30%, 88% { background: var(--keep); } 100% { background: rgba(255, 255, 255, .2); } }
@keyframes sum-drop { 0%, 15% { background: rgba(255, 255, 255, .2); opacity: 1; } 30%, 88% { background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(255, 107, 94, .55) 3px 5px); opacity: .7; } 100% { background: rgba(255, 255, 255, .2); opacity: 1; } }
@keyframes sum-out { 0%, 38% { transform: scaleX(0); opacity: 0; } 55%, 88% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* reels: three peaks on the source, three vertical phones rise */
.viz-reels { display: grid; grid-template-rows: auto 1fr; gap: var(--s-4); }
.viz-reels__src { position: relative; display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .18), rgba(255, 255, 255, .1)); }
.viz-reels__src i { position: absolute; top: -4px; left: calc(var(--a) * 1%); width: 14%; height: 22px; margin-left: -7%; border-radius: 5px; border: 1.5px solid var(--amber); background: var(--amber-soft); box-shadow: 0 0 16px rgba(34, 211, 238, .5); }
.viz-reels__phones { display: flex; justify-content: center; align-items: flex-end; gap: 9%; }
.viz-reels__phone { position: relative; width: 52px; height: 92px; border-radius: 9px; border: 1.5px solid var(--line-2); background: linear-gradient(170deg, hsl(calc(20 + var(--i) * 150) 60% 40%), hsl(calc(40 + var(--i) * 150) 45% 10%)); animation: phone-up 8s var(--ease) infinite; animation-delay: calc(var(--i) * .35s); }
.viz-reels__phone b { position: absolute; left: 8px; right: 8px; bottom: 12px; height: 5px; border-radius: 3px; background: #fff; box-shadow: 0 7px 0 -1px rgba(255, 255, 255, .7); }
@keyframes phone-up { 0%, 10% { transform: translateY(40px); opacity: 0; } 22%, 85% { transform: none; opacity: 1; } 95%, 100% { transform: translateY(40px); opacity: 0; } }

/* episodes: one bar splits into four, hooks pulse at each end */
.viz-episodes { display: grid; align-content: center; }
.viz-episodes__bar { display: flex; height: 38px; }
.viz-episodes__bar i { position: relative; flex: 1; border-radius: 6px; background: linear-gradient(90deg, rgba(34, 211, 238, .12), rgba(34, 211, 238, .3)); border: 1.5px solid rgba(34, 211, 238, .6); animation: ep-split 8s var(--ease) infinite; --x: calc((var(--i) - 1.5) * 10px); }
.viz-episodes__bar i::after { content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px 2px rgba(34, 211, 238, .8); opacity: 0; animation: hook 8s var(--ease) infinite; }
.viz-episodes__bar i:last-child::after { display: none; }
.viz-episodes__bar b { font-style: normal; position: absolute; left: 0; right: 0; top: calc(100% + 10px); text-align: center; font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); opacity: 0; animation: ep-label 8s var(--ease) infinite; }
@keyframes ep-split { 0%, 15% { transform: none; border-radius: 0; } 30%, 88% { transform: translateX(var(--x)) scaleX(.86); border-radius: 6px; } 100% { transform: none; border-radius: 0; } }
@keyframes hook { 0%, 30% { opacity: 0; transform: scale(.4); } 38%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes ep-label { 0%, 32% { opacity: 0; } 40%, 88% { opacity: 1; } 100% { opacity: 0; } }

/* series to movie: episode grid collapses into one film that keeps its events */
.viz-s2m { display: grid; place-items: center; }
.viz-s2m__grid { display: grid; grid-template-columns: repeat(8, 22px); gap: 5px; animation: grid-out 8s var(--ease) infinite; }
.viz-s2m__grid i { height: 14px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.viz-s2m__grid i.ev { background: var(--amber); box-shadow: 0 0 10px rgba(34, 211, 238, .7); }
.viz-s2m__film { position: absolute; left: 12%; right: 12%; top: 50%; height: 26px; margin-top: -13px; border-radius: 6px; border: 1.5px solid var(--keep); background: var(--keep-soft); transform-origin: center; animation: film-in 8s var(--ease) infinite; }
.viz-s2m__film i { position: absolute; top: -6px; bottom: -6px; left: calc(var(--a) * 1%); width: 3px; border-radius: 2px; background: var(--amber); box-shadow: 0 0 10px rgba(34, 211, 238, .8); }
@keyframes grid-out { 0%, 25% { opacity: 1; transform: none; } 42%, 88% { opacity: 0; transform: scale(.6, .2); } 100% { opacity: 1; transform: none; } }
@keyframes film-in { 0%, 32% { opacity: 0; transform: scaleX(.3); } 48%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: scaleX(.3); } }
@media (max-width: 399px) { .viz-s2m__grid { grid-template-columns: repeat(8, 17px); } }

/* 9. Editor mock ------------------------------------------------------------------ */
.ed { overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: #0c0e13; box-shadow: var(--glow), var(--shadow); font-size: var(--fs-sm); }
.ed__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 10px var(--s-4); border-bottom: 1px solid var(--line); }
.ed__title { font-weight: 600; }
.ed__ver { margin-inline-start: 6px; padding: 2px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: var(--fs-xs); }
.ed__status { padding: 3px 10px; border-radius: var(--r-pill); font: 500 var(--fs-xs)/1.4 var(--font-mono); background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(34, 211, 238, .4); transition: all var(--t) var(--ease); }
.ed.is-valid .ed__status { background: var(--keep-soft); color: var(--keep); border-color: rgba(91, 224, 160, .4); }
.ed__grid { display: grid; gap: var(--s-3); padding: var(--s-3); }
@media (min-width: 640px) { .ed__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.ed__player { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.ed__scene { position: absolute; inset: 0; background: radial-gradient(60% 70% at 70% 40%, hsl(var(--scene-h, 205) 70% 55% / .6), transparent 70%), linear-gradient(160deg, hsl(var(--scene-h, 205) 40% 20%), #05060a); transition: background var(--t-slow) var(--ease); }
.ed__crop { position: absolute; top: 0; bottom: 0; left: 50%; width: 31.6%; margin-left: -15.8%; border: 1.5px dashed rgba(255, 255, 255, .35); border-radius: 2px; opacity: .6; }
.ed__sub { position: absolute; left: 8%; right: 8%; bottom: 14%; text-align: center; font-size: clamp(.6875rem, .6rem + .4vw, .8125rem); font-weight: 600; color: #fff; text-shadow: 0 1px 3px #000, 0 0 2px #000; }
.ed__ptc { position: absolute; left: 8px; top: 8px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .6); font-size: .6875rem; color: var(--amber); }
.ed__tl { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s-2); margin-top: var(--s-3); }
.ed__tl-name { font-size: .6875rem; color: var(--text-3); }
.ed__tl-track { position: relative; display: block; height: 22px; border-radius: 5px; background: rgba(255, 255, 255, .05); }
.ed__tl-seg { position: absolute; top: 3px; bottom: 3px; left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1%); border-radius: 3px; background: var(--keep); opacity: .85; transition: all var(--t) var(--ease); }
.ed__tl-seg.is-drop { background: transparent; border: 1.5px solid var(--drop); opacity: 1; }
.ed__tl-ev { position: absolute; top: -3px; left: calc(var(--a) * 1%); width: 2px; height: 28px; background: var(--amber); border-radius: 1px; }
.ed__tl-head { position: absolute; top: -4px; bottom: -4px; left: 0; width: 2px; background: #fff; box-shadow: 0 0 8px #fff; animation: playhead 12s linear infinite; }
@keyframes playhead { from { left: 0; } to { left: 100%; } }
.ed__list { list-style: none; display: grid; gap: 6px; align-content: start; }
.ed__row { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: var(--s-2); padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease), opacity var(--t) var(--ease); }
.ed__row.is-selected { border-color: rgba(34, 211, 238, .55); background: var(--amber-soft); }
.ed__n { width: 18px; text-align: center; font-size: var(--fs-xs); color: var(--text-3); }
.ed__thumb { width: 44px; height: 28px; border-radius: 4px; background: radial-gradient(80% 80% at 35% 35%, hsl(var(--h) 75% 60% / .8), transparent 65%), linear-gradient(160deg, hsl(var(--h) 45% 25%), #05060a); }
.ed__info { display: grid; min-width: 0; gap: 1px; }
.ed__beat { font-weight: 600; font-size: .8125rem; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ed__tc { font-size: .6875rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed__why { display: none; font-size: .75rem; line-height: 1.35; color: var(--ice); }
.ed__why::before { content: "Story Reframe AI: "; color: var(--text-3); }
.ed__row.is-selected .ed__why { display: block; }
.ed__keep { padding: 3px 9px; border-radius: var(--r-pill); font: 500 .6875rem/1.4 var(--font-mono); background: var(--keep-soft); color: var(--keep); border: 1px solid rgba(91, 224, 160, .4); transition: all var(--t) var(--ease); }
.ed__row.is-dropped { opacity: .6; }
.ed__row.is-dropped .ed__beat { text-decoration: line-through; text-decoration-color: var(--drop); }
.ed__row.is-dropped .ed__keep { background: var(--drop-soft); color: var(--drop); border-color: rgba(255, 107, 94, .45); }
.ed__bar { display: flex; align-items: center; gap: var(--s-2); padding: 10px var(--s-3); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.ed__meter { display: grid; gap: 5px; flex: 1; min-width: 0; }
.ed__meter-text { display: flex; gap: 6px; font-size: var(--fs-xs); white-space: nowrap; }
.ed__meter-text [data-ed-total] { color: var(--amber); font-weight: 500; transition: color var(--t) var(--ease); }
.ed.is-valid .ed__meter-text [data-ed-total] { color: var(--keep); }
.ed__meter-target { color: var(--text-3); }
.ed__meter-bar { position: relative; display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ed__meter-bar i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 3px; background: var(--amber); transition: width var(--t-slow) var(--ease), background-color var(--t) var(--ease); }
.ed.is-valid .ed__meter-bar i { width: 98.5%; background: var(--keep); }
.ed__btn { flex: none; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.ed__btn--primary { background: var(--grad); border-color: transparent; color: var(--amber-ink); }
@media (max-width: 479px) { .ed__btn--hide-sm { display: none; } }

/* 10. Files, measured, pricing, FAQ, CTA ------------------------------------------- */
.files { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .files { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .files { grid-template-columns: repeat(4, 1fr); } }
.file-card { padding: var(--s-6) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.file-card__ext { display: inline-flex; align-items: center; min-height: 34px; margin-bottom: var(--s-5); padding: 0 12px; border-radius: 8px; border: 1px solid rgba(34, 211, 238, .4); background: var(--amber-soft); color: var(--amber); font-size: var(--fs-sm); font-weight: 500; }
.file-card h3 { margin-bottom: var(--s-2); font: 600 var(--fs-lg)/1.3 var(--font-body); }
.file-card p { font-size: var(--fs-sm); color: var(--text-2); }
.file-card--rights { border-color: rgba(91, 224, 160, .3); background: linear-gradient(180deg, rgba(91, 224, 160, .08), var(--surface)); }
.file-card--rights .file-card__ext { color: var(--keep); border-color: rgba(91, 224, 160, .4); background: var(--keep-soft); }

.measured { display: grid; gap: var(--s-6); padding: var(--s-6) var(--s-5); border: 1px solid var(--line-2); border-radius: var(--r-lg); background: radial-gradient(80% 120% at 0% 0%, rgba(196, 181, 253, .08), transparent 60%), var(--surface); }
.measured h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.measured__src { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--text-3); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--s-4); margin: 0; }
.stat { display: flex; flex-direction: column-reverse; gap: var(--s-1); }
.stat dt { font-size: var(--fs-sm); color: var(--text-2); }
.stat dd { margin: 0; font: 500 var(--fs-lg)/1 var(--font-body); color: var(--text-2); }
.stat__n { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); font-weight: 500; letter-spacing: -.04em; color: var(--text); }
@media (min-width: 900px) { .measured { grid-template-columns: 1fr 1.3fr; align-items: center; padding: var(--s-7); } .stats { grid-template-columns: repeat(4, 1fr); } }

.prices { display: grid; gap: var(--s-4); align-items: stretch; }
@media (min-width: 700px) { .prices { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1150px) { .prices { grid-template-columns: repeat(4, 1fr); } }
.price-card { position: relative; display: flex; flex-direction: column; padding: var(--s-6) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.price-card--featured { border-color: transparent; background: linear-gradient(180deg, var(--surface-2), var(--surface)) padding-box, conic-gradient(from var(--angle, 0deg), #22d3ee, #c084fc, #f0abfc, #22d3ee) border-box; border: 1.5px solid transparent; box-shadow: var(--glow); animation: border-spin 8s linear infinite; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes border-spin { to { --angle: 360deg; } }
.price-card__flag { position: absolute; top: -12px; left: var(--s-5); padding: 4px 10px; border-radius: var(--r-pill); background: var(--grad); color: var(--amber-ink); font: 600 var(--fs-xs)/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.price-card__name { font: 600 var(--fs-xl)/1.2 var(--font-display); letter-spacing: -.03em; }
.price-card__aud { margin-top: var(--s-2); min-height: 2.8em; font-size: var(--fs-sm); color: var(--text-2); }
.price { display: flex; align-items: baseline; gap: 2px; margin-top: var(--s-5); }
.price__currency { font: 500 1.25rem/1 var(--font-display); color: var(--text-2); align-self: flex-start; margin-top: 6px; }
.price__amount { font: 500 clamp(2.25rem, 1.9rem + 1.2vw, 2.75rem)/1 var(--font-display); letter-spacing: -.05em; }
.price__amount--label { font-size: clamp(1.6rem, 1.4rem + .6vw, 1.9rem); letter-spacing: -.035em; padding-block: .3em; }
.price__period { margin-inline-start: 6px; font-size: var(--fs-sm); color: var(--text-3); }
.price-card__hours { margin-top: var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); font-size: var(--fs-sm); color: var(--text-2); }
.price-card__hours-n { color: var(--amber); font-weight: 500; }
.price-card__list { list-style: none; display: grid; gap: var(--s-2); margin: var(--s-5) 0 var(--s-6); font-size: var(--fs-sm); color: var(--text-2); }
.price-card__list li { display: flex; gap: var(--s-2); }
.price-card__list .icon { width: 18px; height: 18px; color: var(--keep); margin-top: 2px; }
.price-card .btn { margin-top: auto; }
.prices__foot { max-width: 760px; margin: var(--s-6) auto 0; text-align: center; font-size: var(--fs-sm); color: var(--text-3); }

.faq-teaser { display: grid; gap: var(--s-6); }
@media (min-width: 1000px) { .faq-teaser { grid-template-columns: 1fr 1.6fr; gap: var(--s-8); align-items: start; } .faq-teaser .section__head { margin-bottom: 0; } }
.faq { display: grid; gap: var(--s-3); }
.faq__item { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color var(--t) var(--ease); }
.faq__item[open] { border-color: rgba(34, 211, 238, .35); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 60px; padding: var(--s-3) var(--s-5); cursor: pointer; list-style: none; font-weight: 600; font-size: var(--fs-lg); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon { color: var(--amber); transition: transform var(--t) var(--ease); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__a { padding: 0 var(--s-5) var(--s-5); color: var(--text-2); }
.faq__a p + p { margin-top: var(--s-3); }

.cta-band { padding-block: var(--section); }
.cta-band__inner { position: relative; display: grid; gap: var(--s-6); justify-items: start; padding: var(--s-7) var(--s-5); border-radius: var(--r-lg); border: 1px solid var(--line-2); overflow: hidden; background: radial-gradient(70% 120% at 100% 0%, rgba(129, 140, 248, .22), transparent 60%), radial-gradient(60% 100% at 0% 100%, rgba(196, 181, 253, .1), transparent 60%), var(--surface); }
.cta-band__copy h2 { max-width: 15ch; }
.cta-band__copy p { margin-top: var(--s-4); max-width: 520px; color: var(--text-2); font-size: var(--fs-lg); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
/* phones: copy, then buttons stacked full width */
@media (max-width: 639px) {
  .cta-band__inner { justify-items: stretch; }
  .cta-band__actions { flex-direction: column; }
  .cta-band__actions .btn { width: 100%; }
}
/* desktop: [dial] copy | buttons. Named tracks, so the band works with or without .leader:
   the dial track is "auto" and empty when there is no dial, and spacing comes from margins (column-gap 0). */
@media (min-width: 1000px) {
  .cta-band__inner { grid-template-columns: [dial] auto [copy] minmax(0, 1fr) [actions] auto; align-items: center; column-gap: 0; padding: var(--s-8) var(--s-7); }
  .cta-band__inner > .leader { grid-column: dial; margin-inline-end: var(--s-7); }
  .cta-band__copy { grid-column: copy; }
  .cta-band__actions { grid-column: actions; flex-wrap: nowrap; justify-content: flex-end; margin-inline-start: var(--s-7); }
}
/* film-leader countdown */
.leader { position: relative; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; border: 1.5px solid var(--line-2); background: radial-gradient(circle, transparent 54%, rgba(255, 255, 255, .06) 55%, transparent 56%); }
.leader::before, .leader::after { content: ""; position: absolute; background: var(--line-2); }
.leader::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.leader::after { top: 50%; left: 0; right: 0; height: 1px; }
.leader__sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(34, 211, 238, .55) var(--sweep, 0deg), transparent 0); animation: sweep-turn 1s linear infinite; }
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes sweep-turn { to { --sweep: 360deg; } }
.leader__num { position: relative; font-size: 2.25rem; font-weight: 500; color: var(--text); }

/* 11. Inner pages --------------------------------------------------------------------- */
.page-hero { position: relative; padding-block: var(--s-8) var(--s-7); border-bottom: 1px solid var(--line); background: radial-gradient(50% 80% at 85% 0%, rgba(129, 140, 248, .12), transparent 70%), radial-gradient(40% 60% at 0% 0%, rgba(196, 181, 253, .07), transparent 70%); }
.page-hero--center { text-align: center; border-bottom: 0; padding-block: var(--s-10); }
.page-hero--center .lead { margin-inline: auto; }
.page-hero__title { max-width: 18ch; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); letter-spacing: -.04em; }
.page-hero--center .page-hero__title { margin-inline: auto; }
.page-hero .lead { max-width: 640px; margin-top: var(--s-4); }
.page-hero__ctas { display: flex; flex-wrap: wrap; justify-content: inherit; gap: var(--s-3); margin-top: var(--s-6); }
.page-hero--center .page-hero__ctas { justify-content: center; }
.prose { max-width: 720px; color: var(--text-2); }
.prose h2 { margin: var(--s-7) 0 var(--s-3); font-size: var(--fs-xl); font-family: var(--font-body); font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.prose h3 { margin: var(--s-5) 0 var(--s-2); font-size: var(--fs-lg); color: var(--text); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--s-4); }
.prose ul, .prose ol { padding-inline-start: 1.25em; }
.prose li + li { margin-top: var(--s-1); }
.prose a { color: var(--amber); }
.prose__updated { font-size: var(--fs-sm); color: var(--text-3); }

.form { display: grid; gap: var(--s-5); max-width: 640px; }
.form__row { display: grid; gap: var(--s-5); }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field__label { font-weight: 600; font-size: var(--fs-sm); }
.field__hint { font-size: var(--fs-xs); color: var(--text-3); }
.field__error { font-size: var(--fs-sm); color: var(--drop); }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.textarea { min-height: 160px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(34, 211, 238, .25); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--drop); }
.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--amber); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* tables (settings per cut type, comparisons): ALWAYS wrap in .table-wrap. The table keeps a minimum width
   (--table-min, default 640px) and scrolls sideways inside the wrapper; the page itself never scrolls sideways.
   Edge fades (::before left, ::after right) show there is more to scroll. They are driven by a scroll timeline
   where supported (hidden when nothing overflows, fade out at each end); elsewhere the right fade shows below 700px. */
.table-wrap {
  --tw-bg: var(--bg-2);
  --tw-fade: 44px;
  position: relative; display: flex;
  max-width: 100%;
  overflow-x: auto; overscroll-behavior-x: contain;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--tw-bg);
  scrollbar-width: thin; scrollbar-color: rgba(34, 211, 238, .45) transparent;
  scroll-timeline: --tw inline;
}
.table-wrap::before, .table-wrap::after { content: ""; position: sticky; z-index: 2; flex: none; width: var(--tw-fade); pointer-events: none; opacity: 0; }
.table-wrap::before { left: 0; margin-inline-end: calc(var(--tw-fade) * -1); background: linear-gradient(90deg, var(--tw-bg) 15%, rgba(10, 12, 17, 0)); }
.table-wrap::after { right: 0; margin-inline-start: calc(var(--tw-fade) * -1); background: linear-gradient(270deg, var(--tw-bg) 15%, rgba(10, 12, 17, 0)); }
@supports (animation-timeline: scroll()) {
  .table-wrap::before { animation: tw-fade-left linear both; animation-timeline: --tw; }
  .table-wrap::after { animation: tw-fade-right linear both; animation-timeline: --tw; }
}
@supports not (animation-timeline: scroll()) {
  @media (max-width: 699px) {
    .table-wrap::after { opacity: 1; }
    .table-wrap > .table tr > :last-child { padding-inline-end: var(--tw-fade); } /* fade then only covers padding at the end */
  }
}
@keyframes tw-fade-left { 0% { opacity: 0; } 12%, 100% { opacity: 1; } }
@keyframes tw-fade-right { 0%, 88% { opacity: 1; } 100% { opacity: 0; } }
.table-wrap > .table { flex: 1 0 auto; min-width: var(--table-min, 640px); }
.table-hint { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); font: 500 var(--fs-xs)/1.4 var(--font-mono); letter-spacing: .06em; color: var(--text-3); }
.table-hint .icon { width: 16px; height: 16px; color: var(--amber); }
@media (min-width: 700px) { .table-hint { display: none; } }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: var(--s-3) var(--s-4); text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { font: 500 var(--fs-xs)/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); background: var(--surface); }
.table tbody th { font-weight: 600; color: var(--text); }
.table td { color: var(--text-2); }
.table tr:last-child > * { border-bottom: 0; }
kbd { display: inline-block; min-width: 1.8em; padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); font: 500 var(--fs-xs)/1.4 var(--font-mono); text-align: center; color: var(--text); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); margin: var(--s-5) 0 0; font-size: var(--fs-sm); }
.keys dd { margin: 0; color: var(--text-2); }
@media (min-width: 1000px) { .split--flip .split__visual { order: -1; } .split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }

/* Spacing utilities (design-system.md §4.1). Values come only from the --s-* scale.
   .sc-stack: vertical rhythm between direct children. .sc-mt-* / .sc-mb-0: one-off gaps; they use
   !important so they beat component margins (e.g. ".split__text .lead"). Never add other margin utilities. */
.sc-stack { --stack: var(--s-4); }
.sc-stack--sm { --stack: var(--s-2); }
.sc-stack--lg { --stack: var(--s-6); }
.sc-stack > * { margin-block: 0; }
.sc-stack > * + * { margin-top: var(--stack); }
.sc-mt-0 { margin-top: 0 !important; }
.sc-mt-2 { margin-top: var(--s-2) !important; }  /*  8px: under an h3 / card title */
.sc-mt-3 { margin-top: var(--s-3) !important; }  /* 12px: hint or caption under a field/block */
.sc-mt-4 { margin-top: var(--s-4) !important; }  /* 16px: paragraph after a lead or heading */
.sc-mt-5 { margin-top: var(--s-5) !important; }  /* 24px: block after a list or chips */
.sc-mt-7 { margin-top: var(--s-7) !important; }  /* 48px: new sub-section (h3) inside a section */
.sc-mt-auto { margin-top: auto !important; }     /* push a footer to the bottom of a flex column card */
.sc-mb-0 { margin-bottom: 0 !important; }
/* card footer: 32px above it in any card; in .card--flex it also sits at the bottom when cards share a row height */
.card__foot { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.card--flex { display: flex; flex-direction: column; }
.card--flex > .card__foot { margin-top: auto; }
.card--flex > :nth-last-child(2):not(.card__foot) { margin-bottom: var(--s-6); }

/* 12. Motion safety ------------------------------------------------------------------- */
/* Off-screen animated blocks are paused by site.js (data-anim → .is-paused). */
.is-paused, .is-paused *, .is-paused *::before, .is-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 1ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  /* static "explained" end states instead of loops */
  .strip__scanner { animation: none; transform: translateX(0); opacity: 0; }
  .strip__marks, .strip-result__bar, .out { animation: none; opacity: 1; transform: none; clip-path: none; }
  .subs__track { animation: none; }
  .pipeline__node, .pipeline__step, .pipeline__runner { animation: none; }
  .pipeline__runner { display: none; }
  .viz-upload__bar i { animation: none; transform: none; }
  .viz-read::after { display: none; }
  .viz-plan__bar i, .viz-render span { animation: none; opacity: 1; transform: none; }
  .viz-review__row--flip i { animation: none; opacity: .35; }
  .viz-review__row--flip b { animation: none; background: var(--drop); }
  .viz-summary__bar i.k { animation: none; background: var(--keep); }
  .viz-summary__bar i.d { animation: none; opacity: .7; background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(255, 107, 94, .55) 3px 5px); }
  .viz-summary__bar--out, .viz-reels__phone { animation: none; opacity: 1; transform: none; }
  .viz-episodes__bar i { animation: none; transform: translateX(var(--x)) scaleX(.86); border-radius: 6px; }
  .viz-episodes__bar i::after, .viz-episodes__bar b { animation: none; opacity: 1; transform: none; }
  .viz-s2m__grid { animation: none; opacity: 0; }
  .viz-s2m__film { animation: none; opacity: 1; transform: none; }
  .ed__tl-head { animation: none; left: 34%; }
  .price-card--featured { animation: none; }
  .leader__sweep { animation: none; --sweep: 270deg; }
  .console__rec, .ai-dot { animation: none; }
}

/* First-visit loading screen (same as the app): shown once per browser session, fades out by itself,
   never blocks clicks. The class is set by the inline script in layout.php. */
.boot { position: fixed; inset: 0; z-index: 1000; display: none; place-items: center; background: var(--bg); pointer-events: none; }
html.sc-first .boot { display: grid; animation: boot-out .5s var(--ease) 1s forwards; }
.boot__inner { display: grid; justify-items: center; gap: var(--s-4); }
.boot__mark { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.boot__mark .logo { width: 52px; height: 52px; filter: drop-shadow(0 0 18px rgba(34, 211, 238, .55)); animation: boot-pop .7s var(--ease) both; }
.boot__mark::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px;
  background: conic-gradient(from 0deg, transparent 0 55%, #22d3ee 75%, #c084fc 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: boot-spin 1s linear infinite; }
.boot__word { font: 600 1.6rem/1 var(--font-display); letter-spacing: .01em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: boot-pop .7s var(--ease) .1s both; }
.boot__scan { position: relative; width: 180px; height: 2px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.boot__scan::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--grad); box-shadow: 0 0 12px #22d3ee; animation: boot-scan 1s ease-in-out infinite; }
@keyframes boot-out { to { opacity: 0; visibility: hidden; } }
@keyframes boot-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@keyframes boot-scan { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { html.sc-first .boot { display: none; } }
