@import 'tokens.css';
/* Cutcheck public pages (home, pricing, sign-in) plus the parts the app shell reuses: buttons, fields, pills, notes and
   plan cards. Colours come only from tokens.css; the one exception is the video frame in the sample editor, which shows
   video content (a dark picture with white burned-in captions), not interface chrome. */

[hidden] { display: none !important; }
img, svg, video { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
button { font: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--space-3); top: -200px; z-index: 100; padding: var(--space-2) var(--space-3); background: var(--surface);
  color: var(--text-1); border: 1px solid var(--border-strong); border-radius: var(--radius-s); font-weight: 600; }
.skip:focus { top: var(--space-3); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-5); }
.muted { color: var(--text-2); }
.small { font-size: var(--text-s); }

/* ---- wordmark ---- */
.wordmark { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text-1); text-decoration: none;
  font-weight: 700; font-size: var(--text-l); letter-spacing: -0.01em; }
.wordmark svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4);
  border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--text-1);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-quiet { background: transparent; border-color: transparent; }
.btn-quiet:hover { background: var(--surface-2); }
.btn-sm { min-height: 32px; padding: 0 var(--space-3); font-size: var(--text-s); }
.btn-lg { min-height: 48px; padding: 0 var(--space-5); font-size: var(--text-l); }
.btn-block { width: 100%; }
.btn[disabled] { background: var(--surface-2); border-color: var(--border); color: var(--text-3); cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* ---- form fields ----
   Field outlines use --text-3, not --border-strong: inputs need 3:1 against their surroundings (WCAG 1.4.11) and
   --border-strong is about 1.6:1. */
.field { display: grid; gap: var(--space-1); }
.field > label, .label { font-weight: 600; font-size: var(--text-s); }
.hint { color: var(--text-3); font-size: var(--text-s); font-weight: 400; }
.field-msg { color: var(--danger); font-size: var(--text-s); }
.field-msg:empty { display: none; }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3); font: inherit; font-size: 16px;
  color: var(--text-1); background: var(--surface); border: 1px solid var(--text-3); border-radius: var(--radius-s); }
.input::placeholder { color: var(--text-3); opacity: 1; }
.input[aria-invalid="true"] { border-color: var(--danger); }

/* ---- pills, notes, placeholder labels ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px var(--space-2); border-radius: 999px; font-size: var(--text-xs);
  font-weight: 600; line-height: 18px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.ph { display: inline-block; margin-left: var(--space-1); padding: 0 6px; border: 1px dashed var(--warn); border-radius: var(--radius-s);
  background: var(--warn-soft); color: var(--warn); font-size: var(--text-xs); font-weight: 600; line-height: 18px; vertical-align: 0.1em;
  letter-spacing: 0.01em; white-space: nowrap; }
.note { padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text-1); }
.note-warn { background: var(--warn-soft); border-color: var(--warn); }
.note-danger { background: var(--danger-soft); border-color: var(--danger); }
.note a { color: var(--accent); }
.setup-note { margin: var(--space-4) 0; }

/* ---- public header and footer ---- */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: var(--space-6); min-height: 64px; }
.site-nav { display: flex; gap: var(--space-5); }
.site-nav a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text-1); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.site-actions { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; }
.site-footer { border-top: 1px solid var(--border); margin-top: var(--space-8); padding: var(--space-5) 0; color: var(--text-2); font-size: var(--text-s); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.site-footer nav a[aria-current="page"] { color: var(--text-1); }
.site-footer a { color: var(--text-2); }
.site-footer .wordmark { font-size: var(--text); }
.site-footer .credit { margin-left: auto; }

/* ---- home: hero and the link field ---- */
.hero { padding: var(--space-8) 0 var(--space-7); }
.hero h1 { font-size: var(--text-3xl); line-height: 1.08; letter-spacing: -0.025em; max-width: 15ch; }
.lede { margin-top: var(--space-4); font-size: var(--text-l); color: var(--text-2); max-width: 60ch; }
.url-form { margin-top: var(--space-6); max-width: 720px; }
.url-row { display: flex; gap: var(--space-2); padding: var(--space-2); background: var(--surface); border: 1px solid var(--text-3);
  border-radius: var(--radius-l); box-shadow: var(--shadow); }
.url-row:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.url-row:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.url-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-3); border: 0; background: transparent; color: var(--text-1);
  font: inherit; font-size: var(--text-l); }
.url-row input:focus-visible { outline: none; }
.url-row input::placeholder { color: var(--text-3); opacity: 1; }
.url-under { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); }
.url-under .field-msg { flex-basis: 100%; }

/* ---- home: sections ---- */
.section { padding: var(--space-7) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: var(--space-6); }
.section-head h2 { font-size: var(--text-2xl); letter-spacing: -0.02em; }
.section-head p { margin-top: var(--space-2); color: var(--text-2); }
.steps-list { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); counter-reset: step; }
.steps-list li { counter-increment: step; padding-top: var(--space-4); border-top: 2px solid var(--border-strong); }
.steps-list li::before { content: counter(step); display: block; font-family: var(--mono); font-size: var(--text-s); color: var(--accent); font-weight: 600; margin-bottom: var(--space-2); }
.steps-list h3 { font-size: var(--text-l); }
.steps-list p { margin-top: var(--space-2); color: var(--text-2); }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.panel { padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); }
.panel h3 { font-size: var(--text-l); }
.panel p { margin-top: var(--space-2); color: var(--text-2); }
.panel p strong { color: var(--text-1); }

/* ---- home: the sample project, laid out like the real editor ---- */
.sample-label { display: inline-flex; gap: var(--space-2); align-items: center; font-size: var(--text-s); color: var(--text-2); margin-bottom: var(--space-2); }
.editor-mock { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.em-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.em-bar .em-title { font-weight: 700; font-size: var(--text); }
.em-bar .em-meta { color: var(--text-2); font-size: var(--text-s); }
.em-bar .em-right { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; color: var(--text-2); font-size: var(--text-s); }
.em-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-5); padding: var(--space-4); }
.em-preview { display: grid; gap: var(--space-3); align-content: start; }
/* The frame is the Short itself: video content, so it stays dark with white captions in both themes. */
.frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; background: #111; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame.no-image img { display: none; }
.frame.no-image::after { content: "Frame image not available"; position: absolute; left: 0; right: 0; top: 40%; text-align: center; color: #bbb; font-size: var(--text-s); }
.frame .cap { position: absolute; left: 8%; right: 8%; top: 64%; text-align: center; color: #fff; font-weight: 800; font-size: 19px; line-height: 1.2;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 2px 6px #000; overflow-wrap: anywhere; }
.em-transport { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: var(--text-s); color: var(--text-2); }
.em-transport .tc { font-family: var(--mono); color: var(--text-1); }
.timeline { position: relative; height: 56px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface-2); }
.tl-clip { position: absolute; top: 6px; height: 24px; left: 6px; right: 6px; padding: 0 var(--space-2); border-radius: 4px; background: var(--accent); color: var(--on-accent);
  font-size: var(--text-xs); font-weight: 600; line-height: 24px; white-space: nowrap; overflow: hidden; }
.tl-caps { position: absolute; left: 6px; right: 6px; top: 36px; height: 12px; }
.tl-caps i { position: absolute; top: 0; height: 12px; border-radius: 2px; background: var(--border-strong); }
.tl-caps i.on { background: var(--accent); }
.tl-track { position: absolute; left: 6px; right: 6px; top: 2px; bottom: 2px; pointer-events: none; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text-1); }
.em-side { display: grid; gap: var(--space-4); align-content: start; min-width: 0; }
.em-tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--border); font-weight: 600; color: var(--text-2); }
.em-tabs span { padding: var(--space-2) 0; }
.em-tabs .on { color: var(--text-1); box-shadow: inset 0 -2px 0 var(--accent); }
.caps { list-style: none; display: grid; gap: var(--space-1); max-height: 330px; overflow: auto; padding: 2px; }
.caps li { display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: center; gap: var(--space-2); padding: 3px var(--space-2); border-radius: var(--radius-s); }
.caps li.on { background: var(--accent-soft); }
.caps .t { font-family: var(--mono); font-size: var(--text-xs); color: var(--text-2); white-space: nowrap; }
.caps input { width: 100%; min-height: 34px; padding: 0 var(--space-2); font: inherit; font-size: var(--text-s); color: var(--text-1);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-s); }
.caps li.on input { border-color: var(--accent); }
.review { padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); display: grid; gap: var(--space-2); }
.review h3 { font-size: var(--text); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.review p { color: var(--text-2); font-size: var(--text-s); }
.review p b { color: var(--text-1); }
.issue { padding: var(--space-3); border-left: 3px solid var(--warn); background: var(--surface); border-radius: 0 var(--radius-s) var(--radius-s) 0; display: grid; gap: var(--space-1); }
.shots img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-l); }

/* ---- pricing and plan cards (also used on the app's Billing page) ---- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.plan { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); }
.plan.is-current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan h3 { font-size: var(--text-l); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.plan .price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--space-2); }
.plan .amt { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.02em; }
.plan .per { color: var(--text-2); font-size: var(--text-s); }
.plan ul { list-style: none; display: grid; gap: var(--space-2); }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan .plan-cta { margin-top: auto; padding-top: var(--space-2); }
.plan .plan-cta .btn { width: 100%; white-space: normal; text-align: center; padding-top: var(--space-2); padding-bottom: var(--space-2); }
.plan .per-month { color: var(--text-2); font-size: var(--text-s); margin-top: calc(-1 * var(--space-2)); }
/* Monthly / Yearly: two buttons with aria-pressed (pricing and Billing) */
.period { display: inline-flex; gap: var(--space-1); padding: 3px; margin-bottom: var(--space-4); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-s); }
.period button { min-height: 40px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-s); background: none; color: var(--text-1); font: inherit; cursor: pointer; }
.period button:hover { background: var(--surface-2); }
.period button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.period button:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.period-save { font-size: var(--text-s); }
/* top-up packs on Billing */
.topups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); margin-top: var(--space-2); max-width: 560px; }
.topup { display: grid; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.credit-line { margin-top: var(--space-4); color: var(--text-2); }
.includes { margin-top: var(--space-6); }
.includes h2 { font-size: var(--text-l); }
.includes ul { margin-top: var(--space-3); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-2) var(--space-5); list-style: none; color: var(--text-2); }
.page-title { padding: var(--space-7) 0 var(--space-5); }
.page-title h1 { font-size: var(--text-2xl); letter-spacing: -0.02em; }

/* ---- legal pages (privacy, terms): long-form reading ---- */
.legal { max-width: 72ch; padding-top: var(--space-6); }
.legal .page-title { padding: var(--space-5) 0 var(--space-4); }
.legal .lede a, .legal p a, .legal li a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal h2 { font-size: var(--text-xl); margin-top: var(--space-7); scroll-margin-top: var(--space-5); }
.legal h3 { font-size: var(--text-l); margin-top: var(--space-5); }
.legal p, .legal ul { margin-top: var(--space-3); }
.legal ul { padding-left: var(--space-5); }
.legal li + li { margin-top: var(--space-2); }
.legal .proc li { padding-left: var(--space-1); }
.toc { padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); }
.toc ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: var(--space-6); }
.toc li + li { margin-top: 0; }
.toc li { padding: 2px 0; break-inside: avoid; }
.draft-note { margin: 0; }

/* ---- sign-in ---- */
.auth-main { display: grid; justify-items: center; padding: var(--space-7) var(--space-4); }
.auth-card { width: 100%; max-width: 440px; display: grid; gap: var(--space-4); }
.auth-card h1 { font-size: var(--text-xl); }
.auth-card .panel { display: grid; gap: var(--space-3); }
.pending-link { padding: var(--space-2) var(--space-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-s);
  font-family: var(--mono); font-size: var(--text-s); overflow-wrap: anywhere; color: var(--text-1); }
#clerk-signin { min-height: 120px; display: grid; justify-items: center; }
#clerk-signin:empty { display: none; }
.auth-legal { text-align: center; }
.auth-legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---- small screens ---- */
@media (max-width: 900px) {
  .steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-body { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 var(--space-4); }
  .site-header .wrap { flex-wrap: wrap; gap: var(--space-2) var(--space-4); padding-top: var(--space-3); padding-bottom: var(--space-3); min-height: 0; }
  .site-nav { order: 3; width: 100%; gap: var(--space-4); }
  .site-actions .btn { min-height: 36px; padding: 0 var(--space-3); font-size: var(--text-s); }
  .hero { padding: var(--space-6) 0 var(--space-6); }
  .hero h1 { font-size: var(--text-2xl); }
  .lede { font-size: var(--text); }
  .url-row { flex-direction: column; }
  .url-row .btn { width: 100%; }
  .steps-list, .two-up { grid-template-columns: 1fr; }
  .em-body { grid-template-columns: 1fr; }
  .em-preview { max-width: 300px; width: 100%; margin: 0 auto; }
  .site-footer .credit { margin-left: 0; }
  .toc ul { columns: 1; }
  .legal { padding-top: var(--space-4); }
}

/* ======================================================================================================================
   Home page, "D" design (approved by the owner, 22 Nov 2026): white, heavy headings, one soft colour glow, gradient
   highlight words and the wide-video-to-Short animation. These colours are home-page decoration only (the glow, the
   gradient words and the feature icons), so they live here rather than in tokens.css; every text colour still comes from
   the tokens, so contrast holds in both themes.
   ==================================================================================================================== */
@font-face { font-family: "Inter Display"; font-weight: 800; font-display: swap; src: url(fonts/Inter-800.woff) format("woff"); }
/* Light values are dark enough for 3:1 on white at heading sizes (the amber end was 1.9:1 at #ffb23f). */
:root { --d-violet: #4b3bff; --d-pink: #d81b74; --d-amber: #c25e00; --d-display: "Inter Display", var(--font); }
:root[data-theme="dark"] { --d-violet: #8f84ff; --d-pink: #ff6fb3; --d-amber: #ffc56b; }

/* Public header on every public page: pill buttons, and an ink-coloured primary like the design. */
.site-header .btn, .cta-band .btn { border-radius: 999px; }
.btn-ink, .site-header .btn-primary { background: var(--text-1); border-color: var(--text-1); color: var(--bg); }
.btn-ink:hover, .site-header .btn-primary:hover { background: var(--text-2); border-color: var(--text-2); color: var(--bg); }
.home .site-header { border-bottom-color: transparent; position: relative; z-index: 2; }
.home main, .home .site-footer { position: relative; z-index: 1; }
.home .wordmark { font-family: var(--d-display); font-weight: 800; letter-spacing: -0.03em; }

/* color is the solid fallback (and what contrast checkers read); the fill makes the gradient show. */
.gtext { background: linear-gradient(90deg, var(--d-violet), var(--d-pink) 55%, var(--d-amber)); -webkit-background-clip: text; background-clip: text;
  color: var(--d-violet); -webkit-text-fill-color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (forced-colors: active) { .gtext { color: CanvasText; -webkit-text-fill-color: CanvasText; background: none; } }
.kicker { font-weight: 700; font-size: var(--text-s); color: var(--accent); margin-bottom: var(--space-2); }

/* ---- hero ---- */
.home { position: relative; }
/* The glow is wider than the page; its own clipped box keeps it from widening the page. */
.glow-wrap { position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 1100px; overflow: hidden; pointer-events: none; }
.hero-d { position: relative; padding: var(--space-6) 0 var(--space-8); }
.hero-glow { position: absolute; z-index: 0; right: -280px; top: -320px; width: 1100px; height: 1100px; border-radius: 50%; filter: blur(120px); opacity: .26; pointer-events: none;
  background: radial-gradient(40% 50% at 30% 40%, var(--d-pink) 0%, transparent 70%), radial-gradient(45% 55% at 70% 40%, var(--d-violet) 0%, transparent 70%),
    radial-gradient(40% 50% at 50% 80%, var(--d-amber) 0%, transparent 70%); }
:root[data-theme="dark"] .hero-glow { opacity: .18; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-6); align-items: center; }
.hero-copy { display: grid; gap: var(--space-5); }
.eyebrow { justify-self: start; display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); font-size: var(--text-s); font-weight: 600; color: var(--text-1); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d-pink); }
.hero-d h1 { font-family: var(--d-display); font-weight: 800; font-size: clamp(44px, 6.4vw, 80px); line-height: .98; letter-spacing: -0.045em; max-width: 11ch; }
.hero-d .lede { margin-top: 0; max-width: 46ch; }
.hero-d .url-form { margin-top: 0; }
.hero-d .url-row { border-radius: 999px; padding: 6px 6px 6px var(--space-3); }
.hero-d .url-row .btn { border-radius: 999px; background: var(--text-1); border-color: var(--text-1); color: var(--bg); }
.hero-d .url-row .btn:hover { background: var(--text-2); border-color: var(--text-2); }

/* The animation: a wide frame narrows into a 9:16 Short. Sizes are variables so small screens get a smaller stage. */
.morph { --fw: 520px; --fh: 293px; --sw: 270px; --sh: 480px; --gw: 165px; margin: 0; display: grid; gap: var(--space-4); justify-items: center; }
.morph-steps { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.morph-media.gone { visibility: hidden; }
.morph-steps li { padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: var(--text-xs); font-weight: 700;
  white-space: nowrap;
  color: var(--text-1); opacity: .45; animation: d-step 9s ease infinite; }
.morph-steps .ms2 { animation-name: d-step2; } .morph-steps .ms3 { animation-name: d-step3; } .morph-steps .ms4 { animation-name: d-step4; }
.morph-stage { height: var(--sh); display: flex; align-items: center; justify-content: center; }
.morph-frame { position: relative; width: var(--fw); height: var(--fh); border-radius: 16px; overflow: hidden; background: #111;
  box-shadow: 0 50px 100px -40px rgba(20, 20, 60, .6); animation: d-frame 9s cubic-bezier(.7, 0, .2, 1) infinite; }
.morph-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: d-push 9s ease-in-out infinite; }
.morph-guide { position: absolute; top: 0; bottom: 0; width: var(--gw); left: 6%; border: 3px solid #fff; border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(10, 14, 40, .55); opacity: 0; animation: d-guide 9s cubic-bezier(.6, 0, .2, 1) infinite; }
.morph-file { position: absolute; left: 12px; bottom: 12px; padding: 4px 8px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: var(--text-xs); font-weight: 600; animation: d-file 9s ease infinite; }
/* Video content, so white captions on a dark picture in both themes, like the sample frame below. */
.morph-cap { position: absolute; left: 10px; right: 10px; top: 64%; text-align: center; font-family: var(--d-display); font-weight: 800; font-size: 28px;
  text-transform: uppercase; color: #fff; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 3px 0 #000; opacity: 0;
  animation: d-cap 9s ease infinite; }
.morph-cap .hi { animation: d-hi 9s ease infinite; }
.morph-prog { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 3px; border-radius: 2px; overflow: hidden; }
.morph-prog i { display: block; height: 100%; width: 0; background: #fff; animation: d-prog 9s linear infinite; }
.morph-badge { opacity: 0; animation: d-badge 9s ease infinite; }
.morph-badge .pill { font-size: var(--text-s); padding: 6px 14px; line-height: 20px; }

@keyframes d-frame { 0%, 52% { width: var(--fw); height: var(--fh); border-radius: 16px; } 66%, 90% { width: var(--sw); height: var(--sh); border-radius: 30px; }
  100% { width: var(--fw); height: var(--fh); border-radius: 16px; } }
@keyframes d-push { 0%, 52% { transform: scale(1); } 90% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes d-guide { 0%, 12% { opacity: 0; left: 6%; } 20% { opacity: 1; left: 6%; } 34% { left: 58%; } 42%, 50% { opacity: 1; left: calc(50% - var(--gw) / 2); }
  56%, 100% { opacity: 0; left: calc(50% - var(--gw) / 2); } }
@keyframes d-file { 0%, 48% { opacity: 1; } 54%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes d-cap { 0%, 68% { opacity: 0; transform: translateY(12px) scale(.9); } 73%, 90% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes d-hi { 0%, 74% { color: #fff; } 76%, 90% { color: #ffe14d; } 100% { color: #fff; } }
@keyframes d-badge { 0%, 74% { opacity: 0; transform: translateY(8px); } 78%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes d-prog { 0%, 66% { width: 0; } 92% { width: 100%; } 100% { width: 0; } }
@keyframes d-step { 0%, 22% { opacity: .45; } 26%, 96% { opacity: 1; } 100% { opacity: .45; } }
@keyframes d-step2 { 0%, 40% { opacity: .45; } 44%, 96% { opacity: 1; } 100% { opacity: .45; } }
@keyframes d-step3 { 0%, 62% { opacity: .45; } 66%, 96% { opacity: 1; } 100% { opacity: .45; } }
@keyframes d-step4 { 0%, 74% { opacity: .45; } 78%, 96% { opacity: 1; } 100% { opacity: .45; } }
/* Reduced motion (tokens.css stops all animation): show the finished Short, still. */
@media (prefers-reduced-motion: reduce) {
  .morph-frame { width: var(--sw); height: var(--sh); border-radius: 30px; }
  .morph-cap, .morph-badge, .morph-steps li { opacity: 1; }
  .morph-file, .morph-guide { display: none; }
  .morph-prog i { width: 60%; }
}

/* ---- sources strip ---- */
.sources { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sources .wrap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3) var(--space-6); padding-top: var(--space-5);
  padding-bottom: var(--space-5); color: var(--text-2); }
.sources b { font-family: var(--d-display); font-weight: 800; letter-spacing: -0.02em; color: var(--text-1); font-size: var(--text-l); }

/* ---- sections on the home page ---- */
.home .section { border-top: 0; padding: var(--space-8) 0 var(--space-6); }
.home .section-head h2 { font-family: var(--d-display); font-weight: 800; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.02; letter-spacing: -0.04em; }
.home .section-head { max-width: 760px; }
.home .section-head p:not(.kicker) { font-size: var(--text-l); margin-top: var(--space-3); }
.home .editor-mock { border-radius: 20px; box-shadow: 0 40px 80px -48px rgba(20, 20, 60, .45), var(--shadow); }

.feature-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-4); }
.feature-grid li { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-5); background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.feature-grid li:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(20, 20, 60, .3); }
.feature-grid h3 { font-size: var(--text-xl); letter-spacing: -0.02em; }
.feature-grid p { color: var(--text-2); }
.fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.fi svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fi-1 { background: var(--accent-soft); color: var(--accent); }
.fi-2 { background: var(--danger-soft); color: var(--danger); }
.fi-3 { background: var(--warn-soft); color: var(--warn); }
.fi-4 { background: var(--ok-soft); color: var(--ok); }
.fi-5 { background: var(--accent-soft); color: var(--accent); }
.fi-6 { background: var(--surface-2); color: var(--text-1); }

.home .steps-list li { border-top: 0; padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.home .steps-list li::before { font-family: var(--d-display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--accent); content: "0" counter(step); }

/* ---- closing call to action ---- */
.cta-band { padding: var(--space-7) 0 0; }
.cta-card { position: relative; overflow: hidden; display: grid; justify-items: center; gap: var(--space-5); padding: var(--space-8) var(--space-5); text-align: center;
  border-radius: 28px; background: var(--text-1); color: var(--bg); }
.cta-card::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(30% 40% at 25% 30%, var(--d-pink), transparent 70%),
  radial-gradient(35% 45% at 75% 40%, var(--d-violet), transparent 70%), radial-gradient(30% 40% at 50% 90%, var(--d-amber), transparent 70%);
  opacity: .35; filter: blur(60px); pointer-events: none; }
.cta-card h2 { position: relative; font-family: var(--d-display); font-weight: 800; font-size: clamp(30px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -0.04em; max-width: 18ch; }
.cta-actions { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.cta-card .btn-ink { background: var(--bg); border-color: var(--bg); color: var(--text-1); }
.cta-card .btn-ink:hover { background: var(--surface-2); border-color: var(--surface-2); color: var(--text-1); }
.cta-quiet { background: transparent; border-color: var(--bg); color: var(--bg); }
.cta-quiet:hover { background: rgba(127, 127, 127, .2); color: var(--bg); }
.home .site-footer { margin-top: var(--space-7); }

/* mid-size windows (owner, 22 Nov 2026: sideways scroll at ~1040 px): the 520 px frame is wider than its column */
@media (max-width: 1200px) { .morph { --fw: 430px; --fh: 242px; --sw: 226px; --sh: 402px; --gw: 136px; } }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-d h1 { max-width: 14ch; }
}
@media (max-width: 720px) {
  .morph { --fw: 320px; --fh: 180px; --sw: 200px; --sh: 356px; --gw: 101px; }
  .morph-cap { font-size: 20px; }
  .hero-d .url-row { border-radius: var(--radius-l); padding: var(--space-2); }
  .hero-d .url-row .btn { border-radius: var(--radius); }
  .home .section { padding: var(--space-7) 0 var(--space-5); }
  .home .steps-list li::before { font-size: 32px; }
}

/* Plan cards, Plans B (owner, 22 Nov 2026; /pricing and the app's Plans page): who each plan is for, what its credits
   come to, and Pro marked most popular. */
.plan .plan-name { display: grid; gap: 4px; }
.plan .plan-tag { color: var(--text-2); font-size: var(--text-s); }
.plan .plan-est { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); font-size: var(--text-s); }
.plan .plan-est b { color: var(--text-1); }
.plan.is-popular { position: relative; }
.plan .plan-flag { position: absolute; top: -12px; left: 24px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: var(--text-xs); font-weight: 700; }

/* ---- menu links that scroll (home page): a smooth scroll that stops below the header, and the heading it lands on
   lights up briefly (home.js adds .landed). Off for people who ask for less motion. ---- */
html { scroll-behavior: smooth; }
.home .section { scroll-margin-top: var(--space-5); }
.home .section-head.landed .kicker { animation: landed-kicker 1.4s ease-out; }
.home .section-head.landed h2 { animation: landed-h 1.4s ease-out; }
@keyframes landed-kicker { 0% { opacity: 0; transform: translateY(6px); } 30% { opacity: 1; transform: none; } }
@keyframes landed-h { 0% { opacity: .35; transform: translateY(10px); } 35% { opacity: 1; transform: none; } }
.home .more-link { margin-top: var(--space-5); text-align: center; }
.home .more-link a { font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .home .section-head.landed .kicker, .home .section-head.landed h2 { animation: none; }
}

/* Klipley loader ("phone conveyor"), the one loading animation for the site and the app. Three phones: the right one
   leans back and flies off, the others shift right and a new one fades in on the left; the middle one is 1.1x, the sides 0.78x. Markup:
   <div class="kl-loading" role="status"><span class="kl-loader" aria-hidden="true"><i></i><i></i><i></i><i></i></span><span class="sr-only">Loading…</span></div>
   Add kl-page to fill the page area. Four phones share one 3.2 s loop, 0.8 s apart, so each slot is always taken. */
.kl-loading { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.kl-loading.kl-page { min-height: 60vh; }
.kl-loader { position: relative; display: block; width: 76px; height: 34px; }
.kl-loader i { position: absolute; left: 0; top: 0; width: 20px; height: 34px; box-sizing: border-box; border: 2px solid var(--text-3); border-radius: 6px; background: var(--surface); opacity: 0; animation: kl-move 3.2s cubic-bezier(.65, 0, .35, 1) infinite; }
.kl-loader i::before { content: ""; position: absolute; top: 3px; left: 50%; width: 6px; height: 2px; margin-left: -3px; border-radius: 1px; background: var(--text-3); }
.kl-loader i:nth-child(2) { animation-delay: -.8s; }
.kl-loader i:nth-child(3) { animation-delay: -1.6s; }
.kl-loader i:nth-child(4) { animation-delay: -2.4s; }
@keyframes kl-move {
  0%, 8.75% { transform: translateX(-12px) scale(.5); opacity: 0; }
  15%, 33.75% { transform: translateX(0) scale(.78); opacity: 1; }
  40% { transform: translateX(29px) scale(1.17, 1.03); }
  43%, 58.75% { transform: translateX(28px) scale(1.1); }
  65% { transform: translateX(57px) scale(.72, .84); }
  68%, 75% { transform: translateX(56px) scale(.78); opacity: 1; }
  79% { transform: translateX(49px) scale(.78) rotate(-8deg); opacity: 1; }
  83.75%, 100% { transform: translateX(100px) scale(.7) rotate(12deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .kl-loader i { animation: none; opacity: 1; }
  .kl-loader i:nth-child(1) { transform: scale(.78); }
  .kl-loader i:nth-child(2) { transform: translateX(28px) scale(1.1); }
  .kl-loader i:nth-child(3) { transform: translateX(56px) scale(.78); }
  .kl-loader i:nth-child(4) { display: none; }
}
