/* Fablori v4 "fresh": the page is the studio. Bright white, ink, one brand
   violet. Plus Jakarta Sans for everything, DM Mono only for data and code.
   One radius scale (10 / 16 / 22), three elevations, motion from transform,
   opacity and clip-path only. Engine (sc/) untouched; this themes it. */
:root {
  --bg: #FFFFFF; --surface: #F6F6F9; --surface-2: #EEEEF3; --well: #FBFBFD;
  --line: #E4E4EA; --line-2: #D3D3DC;
  --ink: #16161C; --ink-2: #3F3F4A; --dim: #676775;
  --accent: #5B45F0; --accent-2: #4733D9; --accent-soft: #EFECFF; --accent-ink: #FFFFFF;
  --rec: #E5484D; --ok: #1E9E57; --amber: #B7791F;
  --s1: #5B45F0; --s2: #0E9F8F; --s3: #D9822B; --s4: #D9467A; --s5: #2F7DE1; --s6: #7A8B12;
  --r1: 10px; --r2: 16px; --r3: 22px;
  --e1: 0 1px 2px rgba(22, 22, 40, .06), 0 2px 8px rgba(22, 22, 40, .05);
  --e2: 0 2px 4px rgba(22, 22, 40, .05), 0 12px 32px rgba(22, 22, 40, .09);
  --e3: 0 4px 10px rgba(22, 22, 40, .06), 0 28px 70px rgba(22, 22, 40, .16);
  --edge: inset 0 1px 0 rgba(255, 255, 255, .9);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4.5vw, 64px);
  --bar: 64px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --sc-canvas: var(--bg); --sc-surface: var(--surface); --sc-ink: var(--ink); --sc-ink-soft: var(--dim);
  --sc-accent: var(--accent); --sc-accent-ink: #fff; --sc-font-display: var(--font); --sc-font-text: var(--font);
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.04; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
textarea, input { font: inherit; color: inherit; caret-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--r1); }
.skip:focus { top: 12px; }
.small { font-size: 13px; }
.label { display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: .02em; color: var(--dim); text-transform: uppercase; }
.link { font-weight: 700; color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* buttons: one shape, three weights */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: var(--r1); border: 1px solid transparent; font: 700 15.5px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px rgba(91, 69, 240, .28); }
.btn-primary:hover { background: var(--accent-2); }
.btn-quiet { background: var(--bg); color: var(--ink); border-color: var(--line-2); }
.btn-quiet:hover { border-color: var(--ink-2); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---- the studio bar ---- */
.appbar { position: fixed; z-index: 60; inset: 0 0 auto; height: var(--bar); display: flex; align-items: center; gap: 22px; padding: 0 var(--gutter); background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 20px/1 var(--font); letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 26px; height: 22px; }
.steps { display: flex; align-items: center; gap: 4px; margin-left: 18px; padding: 4px; border-radius: 12px; background: var(--surface); }
.steps a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--dim); text-decoration: none; transition: background .2s var(--ease), color .2s var(--ease); }
.steps a i { font: 500 11px/1 var(--mono); font-style: normal; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: var(--line); color: var(--ink-2); }
.steps a.on { background: #fff; color: var(--ink); box-shadow: var(--e1); }
.steps a.on i { background: var(--accent); color: #fff; }
.steps a.done i { background: var(--ok); color: #fff; }
.grow { flex: 1; }
.links { display: flex; gap: 20px; font-size: 14.5px; font-weight: 600; }
.links a, .signin { color: var(--ink-2); text-decoration: none; }
.links a:hover, .signin:hover { color: var(--ink); }
.signin { font-size: 14.5px; font-weight: 600; }
.menu-btn { display: none; width: 40px; height: 40px; margin-right: -6px; border: 0; border-radius: var(--r1); background: transparent; color: var(--ink); place-items: center; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn[aria-expanded="true"] { background: var(--surface); }
.phone-menu { position: absolute; top: calc(100% + 6px); right: 10px; left: 10px; display: grid; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--e3); }
.phone-menu a { display: flex; align-items: center; height: 48px; padding: 0 14px; border-radius: var(--r1); font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; }
.phone-menu a:active { background: var(--surface); }
.phone-menu a + a { border-top: 1px solid var(--line); }

/* ---- 1 · brief ---- */
.brief { position: relative; padding: calc(var(--bar) + clamp(56px, 9vh, 110px)) var(--gutter) clamp(56px, 8vh, 96px); overflow: hidden; }
.brief-back { position: absolute; inset: 0; pointer-events: none; }
.ghost-frame { position: absolute; margin: 0; right: -8vw; top: 30%; width: min(46vw, 640px); border-radius: var(--r3); overflow: hidden; opacity: .13; filter: saturate(.6) blur(5px); box-shadow: var(--e3); transform: translate3d(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -8px), 0) rotate(3deg); }
.ghost-tray { position: absolute; left: -2vw; bottom: 8%; margin: 0; padding: 0; list-style: none; display: flex; gap: 12px; opacity: .55; transform: translate3d(calc(var(--mx, 0) * 10px), 0, 0) rotate(-2deg); }
.ghost-tray li { width: 150px; aspect-ratio: 16 / 10; border-radius: 14px; border: 2px dashed var(--line-2); background: var(--well); }
.brief-in { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; text-align: center; }
.brief h1 { font-size: clamp(40px, 5.2vw, 68px); }
.status { margin: 18px auto 0; max-width: 46ch; font-size: clamp(17px, 1.4vw, 19.5px); color: var(--ink-2); }
.composer { margin: 34px auto 0; text-align: left; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r3); box-shadow: var(--e3); padding: 12px 12px 12px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); transform: translate3d(calc(var(--mx, 0) * 4px), calc(var(--my, 0) * 3px), 0); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--e3); }
.mode { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface); margin: 4px 6px 4px; }
.mode button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font: 600 13.5px/1 var(--font); color: var(--dim); cursor: pointer; }
.mode button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--e1); }
.composer textarea, .composer .site-input { display: block; width: 100%; border: 0; outline: 0; resize: none; background: transparent; padding: 10px 12px 6px; font-size: 19px; line-height: 1.5; min-height: 96px; }
.composer .site-input { min-height: 0; height: 64px; font: 500 20px/1 var(--mono); }
.composer textarea::placeholder, .composer input::placeholder { color: #9A9AA7; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 4px 2px 8px; flex-wrap: wrap; }
.tries { display: flex; gap: 6px; flex-wrap: wrap; }
.tries button { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--well); font: 600 13px/1 var(--font); color: var(--ink-2); cursor: pointer; transition: border-color .15s var(--ease), color .15s var(--ease); }
.tries button:hover { border-color: var(--accent); color: var(--accent); }
.hint { margin-top: 14px; font-size: 13.5px; color: var(--dim); }
.hint.err { color: var(--rec); }

/* ---- 2 · storyboard (peak) ---- */
.board-stage { height: 100svh; padding: calc(var(--bar) + 24px) var(--gutter) 24px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px 36px; max-width: 1440px; margin: 0 auto; }
.board-head { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.brief-text { margin-top: 12px; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.55; font-weight: 500; color: var(--ink-2); }
.brief-text mark { background: transparent; color: var(--ink-2); border-radius: 5px; box-shadow: inset 0 -2px 0 transparent; transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease); padding: 0 1px; }
.brief-text mark.lit { color: var(--ink); background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: inset 0 -2px 0 var(--c); }
.board-status { margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); color: var(--dim); }
.board-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.board-status.done .dot { background: var(--ok); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
.scenes { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.scene { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--e2); overflow: hidden; opacity: 0; transform: translate3d(0, 18px, 0) scale(.96); transition: opacity .45s var(--ease), transform .55s var(--ease); }
.scene.in { opacity: 1; transform: none; }
.scene .pic { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.scene .pic img { width: 100%; height: 100%; object-fit: cover; }
.scene .pic .n { position: absolute; left: 8px; top: 8px; height: 22px; min-width: 22px; padding: 0 6px; border-radius: 6px; background: var(--c); color: #fff; font: 500 11.5px/22px var(--mono); text-align: center; }
.scene .pic .sec { position: absolute; right: 8px; top: 8px; height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(22,22,28,.72); color: #fff; font: 500 11.5px/22px var(--mono); }
.scene .txt { padding: 10px 12px 12px; border-top: 3px solid var(--c); }
.scene .txt b { display: block; font-size: 14px; line-height: 1.25; }
.scene .txt p { margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.scene .txt .cr { margin-top: 8px; font: 400 10.5px/1.3 var(--mono); color: #8C8C99; }
.lanes { grid-column: 1 / -1; grid-row: 3; display: grid; gap: 6px; padding: 12px 14px; background: var(--well); border: 1px solid var(--line); border-radius: var(--r2); }
.lane { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 10px; font: 500 11px/1 var(--mono); color: var(--dim); }
.lane > div { position: relative; height: 22px; display: flex; gap: 3px; }
.lane .blk { height: 100%; border-radius: 5px; background: var(--c); transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease); }
.lane .blk.in { transform: scaleX(1); }
.lane-voice .blk { height: 10px; align-self: center; opacity: .55; }
.lane-time { grid-template-columns: 76px 1fr; height: 12px; position: relative; }
.lane-time span { color: var(--ink); }
.playhead { position: absolute; left: 86px; top: -66px; bottom: -2px; width: 2px; background: var(--rec); transform: translateX(calc(var(--ph, 0) * (100% - 0px))); }
.finished { position: absolute; z-index: 5; inset: calc(var(--bar) + 18px) var(--gutter) 18px; display: grid; place-items: center; isolation: isolate; pointer-events: none; opacity: 0; transform: scale(.97); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.finished.in { opacity: 1; transform: none; pointer-events: auto; }
.finished::before { content: ""; position: absolute; inset: -40px calc(-1 * var(--gutter)); background: rgba(255, 255, 255, .78); z-index: -1; }
.finished-in { width: min(1180px, 100%); display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--e3); padding: 18px; }
.player { position: relative; border-radius: var(--r2); overflow: hidden; background: #111; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; object-fit: cover; }
.sound { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--ink); font: 700 14.5px/1 var(--font); cursor: pointer; box-shadow: var(--e2); }
.sound svg { width: 20px; height: 20px; color: var(--accent); }
.sound .wv { opacity: .25; } .sound[aria-pressed="true"] .wv { opacity: 1; }
.finished-copy p { margin: 10px 0 20px; color: var(--ink-2); font-size: 16px; }

/* ---- 3 · examples ---- */
.ex-stage { height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: calc(var(--bar) + 12px) 0 24px; overflow: hidden; background: var(--surface); }
.ex-head { padding: 0 var(--gutter); max-width: 900px; display: grid; gap: 10px; }
.ex-head h2 { font-size: clamp(34px, 4vw, 54px); }
.ex-head p { color: var(--ink-2); max-width: 54ch; }
.ex-rail { display: flex; gap: 16px; margin: 0; padding: 0 var(--gutter); list-style: none; width: max-content; }
.ex { width: 330px; flex: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--e1); overflow: hidden; cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.ex:hover { box-shadow: var(--e2); transform: translateY(-2px); }
.ex .th, .ex .meta, .ex .k { display: block; }
.ex .th { position: relative; aspect-ratio: 16 / 10; background: #111; }
.ex.tall .th { aspect-ratio: auto; height: 207px; }
.ex .th img, .ex .th video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ex .th video { opacity: 0; transition: opacity .25s; } .ex .th video.on { opacity: 1; }
.ex .play { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; color: var(--accent); box-shadow: var(--e2); }
.ex .play svg { width: 15px; height: 15px; margin-left: 2px; }
.ex .meta { padding: 12px 14px 14px; }
.ex .k { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .03em; color: var(--dim); }
.ex b { display: block; margin-top: 7px; font-size: 16.5px; line-height: 1.25; }
.ex p { margin-top: 6px; font-size: 13px; color: var(--dim); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- 4 · website ---- */
.site { padding: clamp(80px, 12vh, 140px) 0; }
.site-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.site-copy h2 { font-size: clamp(32px, 3.6vw, 48px); }
.site-copy p { margin-top: 14px; color: var(--ink-2); max-width: 46ch; }
.site-form { display: flex; gap: 8px; margin-top: 24px; max-width: 520px; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--r2); background: #fff; box-shadow: var(--e1); }
.site-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.site-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 12px; font: 500 16px/1 var(--mono); }
.site-demo { margin: 0; }
.site-demo video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r2); box-shadow: var(--e3); background: #111; }
.site-demo figcaption { margin-top: 12px; font-size: 13.5px; color: var(--dim); }

/* ---- 5 · pricing ---- */
.pricing { padding: clamp(72px, 10vh, 120px) 0; border-top: 1px solid var(--line); }
.pricing h2 { font-size: clamp(34px, 4vw, 54px); }
.pricing .lead { margin-top: 14px; color: var(--ink-2); max-width: 60ch; font-size: 17px; }
.plans { margin-top: 34px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r2); background: #fff; box-shadow: var(--e1); }
.plan.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--e2); }
.plan header { display: flex; flex-direction: column; gap: 8px; }
.plan header b { font-size: 16px; }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 14px; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.plan p { font-size: 14px; color: var(--ink-2); flex: 1; }
.plan .btn { height: 44px; }

/* ---- 6 · developers ---- */
.dev-stage { height: 100svh; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: calc(var(--bar) + 20px) var(--gutter) 24px; max-width: 1340px; margin: 0 auto; }
.dev-copy h2 { font-size: clamp(32px, 3.6vw, 50px); }
.dev-copy p { margin: 14px 0 18px; color: var(--ink-2); max-width: 44ch; }
.dev-panel { background: #15151B; color: #E9E9F0; border-radius: var(--r3); box-shadow: var(--e3); overflow: hidden; }
.dev-tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.dev-tabs button { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: #A6A6B4; font: 600 13.5px/1 var(--font); cursor: pointer; }
.dev-tabs button[aria-selected="true"] { background: rgba(255,255,255,.1); color: #fff; }
.dev-body { position: relative; padding: 18px 20px 20px; }
.dev-body pre { margin: 0; overflow-x: auto; font: 400 13.5px/1.7 var(--mono); }
.dev-body .c { color: #8E8EA0; }
.copy { position: absolute; right: 14px; top: 14px; height: 30px; padding: 0 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: transparent; color: #fff; font: 600 12.5px/1 var(--font); cursor: pointer; }
.copy:hover { background: rgba(255,255,255,.08); }
.dev-body .link { display: inline-block; margin-top: 12px; color: #B8ADFF; }

/* ---- 7 · start ---- */
.start { padding: clamp(80px, 12vh, 140px) 0 28px; background: linear-gradient(var(--bg), var(--surface)); }
.start-in { text-align: center; }
.start h2 { font-size: clamp(36px, 4.4vw, 60px); }
.composer-end { max-width: 760px; margin-top: 28px; }
.composer-end textarea { min-height: 72px; }
.foot { margin-top: clamp(64px, 10vh, 110px); padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--dim); }
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--ink-2); text-decoration: none; } .foot a:hover { color: var(--ink); }
/* the landing pages for one kind of customer each */
.foot .foot-for { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.foot .foot-for span { color: var(--dim); font: 500 12px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .03em; }

/* ---- example viewer ---- */
.viewer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(22, 22, 28, .55); }
.viewer[hidden] { display: none; }
.viewer-in { position: relative; width: min(1040px, 100%); background: #fff; border-radius: var(--r3); box-shadow: var(--e3); padding: 14px; }
.viewer-in video { width: 100%; max-height: 78svh; border-radius: var(--r2); background: #111; }
.viewer-in .vmeta { padding: 12px 6px 4px; display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.viewer-x { position: absolute; right: -10px; top: -10px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--e2); z-index: 2; }
.viewer-x svg { width: 18px; height: 18px; }

/* ---- header layouts: Admin > Homepage sets html[data-hero] ----
   A  composer alone on the page (no video)
   B  cinema: a Fablori video fills the first screen behind the words
   C  split: words and composer left, the video playing right
   D  video first: a large player, the words and composer under it */
.hero-media { display: none; position: relative; overflow: hidden; background: #111; }
.hero-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-sound { position: absolute; z-index: 3; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 13px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--ink); font: 700 15px/1 var(--font); cursor: pointer; box-shadow: var(--e2); }
.hero-sound svg { width: 20px; height: 20px; color: var(--accent); }
.hero-sound .wv { opacity: .25; } .hero-sound[aria-pressed="true"] .wv { opacity: 1; }
.hero-tag { position: absolute; z-index: 3; right: 14px; top: 14px; padding: 6px 10px; border-radius: 8px; background: rgba(22, 22, 28, .6); color: #fff; font: 500 11.5px/1 var(--mono); letter-spacing: .02em; }
html[data-hero="b"] .hero-media, html[data-hero="c"] .hero-media, html[data-hero="d"] .hero-media { display: block; }
html[data-hero="b"] .brief-back, html[data-hero="c"] .brief-back, html[data-hero="d"] .brief-back { display: none; }

/* B · cinema */
html[data-hero="b"] .brief { min-height: 100svh; display: grid; align-items: center; padding-bottom: 120px; background: #0e0e13; }
html[data-hero="b"] .brief-in { position: static; }
html[data-hero="b"] .brief-in > :not(.hero-media) { position: relative; z-index: 2; }
html[data-hero="b"] .hero-media { position: absolute; inset: 0; z-index: 0; background: #0e0e13; }
html[data-hero="b"] .hero-media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(10, 10, 16, .66) 0%, rgba(10, 10, 16, .5) 40%, rgba(10, 10, 16, .58) 70%, rgba(10, 10, 16, .84) 100%); }
html[data-hero="b"] .brief h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
html[data-hero="b"] .status { color: rgba(255, 255, 255, .88); }
html[data-hero="b"] .hint { color: rgba(255, 255, 255, .72); }
html[data-hero="b"] .hint.err { color: #FFB4B6; }
html[data-hero="b"] .composer { box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
html[data-hero="b"] .hero-sound { left: var(--gutter); bottom: 32px; height: 52px; padding: 0 22px 0 16px; font-size: 16px; }
/* Above the live chat button (Bantergram, bottom right). */
html[data-hero="b"] .hero-tag { right: var(--gutter); top: auto; bottom: 104px; }

/* C · split */
html[data-hero="c"] .brief { padding-top: calc(var(--bar) + clamp(40px, 7vh, 80px)); }
html[data-hero="c"] .brief-in { max-width: 1280px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: 1fr auto auto auto auto 1fr; grid-template-areas: "x m" "h m" "s m" "f m" "t m" "y m"; column-gap: clamp(32px, 4vw, 64px); text-align: left; }
html[data-hero="c"] .brief h1 { grid-area: h; font-size: clamp(38px, 4.2vw, 60px); }
html[data-hero="c"] .status { grid-area: s; margin-left: 0; }
html[data-hero="c"] .composer { grid-area: f; margin: 28px 0 0; }
html[data-hero="c"] .hint { grid-area: t; }
html[data-hero="c"] .hero-media { grid-area: m; align-self: center; aspect-ratio: 16 / 9; border-radius: var(--r3); box-shadow: var(--e3); }

/* D · video first */
html[data-hero="d"] .brief { padding-top: calc(var(--bar) + 28px); }
html[data-hero="d"] .brief-in { max-width: 1160px; display: flex; flex-direction: column; align-items: center; }
html[data-hero="d"] .hero-media { order: -1; width: min(100%, calc(60svh * 16 / 9)); aspect-ratio: 16 / 9; margin-bottom: 34px; border-radius: var(--r3); box-shadow: var(--e3); }
html[data-hero="d"] .brief h1 { font-size: clamp(34px, 4vw, 54px); }
html[data-hero="d"] .composer { width: min(760px, 100%); }

/* ---- phones ---- */
@media (max-width: 980px) {
  html[data-hero="c"] .brief-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "h" "s" "f" "t" "m"; text-align: center; }
  html[data-hero="c"] .status { margin-left: auto; }
  html[data-hero="c"] .composer { margin: 24px 0 0; text-align: left; }
  html[data-hero="c"] .hero-media { margin-top: 26px; }
}
@media (max-width: 980px) {
  .steps { display: none; }
  .board-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; }
  .board-head { grid-row: 1; grid-column: 1; align-self: start; }
  .scenes { grid-row: 2; grid-column: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: start; }
  .scene .txt p, .scene .txt .cr { display: none; }
  .finished-in { grid-template-columns: 1fr; }
  .site-in, .dev-stage { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  :root { --bar: 56px; }
  body { font-size: 16px; }
  .appbar { gap: 10px; background: #fff; }
  .links, .signin { display: none; }
  .bar-cta { height: 36px; padding: 0 14px; font-size: 13.5px; box-shadow: none; }
  .bar-cta .lg, .hint .lg { display: none; }
  .menu-btn { display: grid; }

  /* brief: one clean card on a soft wash, no back plane */
  .brief { padding: calc(var(--bar) + 30px) 16px 6px; background: radial-gradient(130% 55% at 50% 0%, var(--accent-soft), transparent 72%); }
  .brief-back { display: none; }
  .brief h1 { font-size: 36px; }
  .status { margin-top: 12px; font-size: 16px; }
  .composer { margin-top: 22px; padding: 8px; border-radius: var(--r2); box-shadow: var(--e2); transform: none; }
  .mode { margin: 2px 2px 0; }
  .composer textarea { font-size: 17px; min-height: 96px; padding: 10px 10px 4px; }
  .composer .site-input { font-size: 17px; height: 56px; padding: 0 10px; }
  .composer-foot { padding: 4px 2px 2px; gap: 10px; }
  .tries { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 0 2px; }
  .tries::-webkit-scrollbar { display: none; }
  .tries button { flex: none; height: 34px; }
  .composer-foot .btn { width: 100%; }
  .hint { margin-top: 12px; font-size: 13px; }

  .board-stage { padding: calc(var(--bar) + 14px) 16px 16px; }
  .brief-text { font-size: 15px; line-height: 1.5; margin-top: 8px; }
  .board-status { margin-top: 10px; }
  .scenes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .scene { border-radius: 10px; }
  .scene .pic { aspect-ratio: 4 / 3; }
  .scene .pic .sec { display: none; }
  .scene .txt { padding: 6px 7px 8px; } .scene .txt b { font-size: 11.5px; }
  .mine-cta { margin-top: 12px; padding: 12px; } .mine-cta p { font-size: 13px; }
  .lanes { display: none; }
  .finished { inset: calc(var(--bar) + 12px) 12px 12px; place-items: start center; padding-top: 4vh; }
  .finished::before { background: rgba(255, 255, 255, .97); }
  .finished-in { padding: 10px; gap: 14px; border-radius: var(--r2); }
  /* the vertical cut on a phone: as tall as the screen allows, copy beneath */
  .finished-in.tall { justify-items: center; }
  .finished-in.tall .player { aspect-ratio: 9 / 16; height: min(52svh, 470px); width: auto; }
  .finished-in.tall .finished-copy { justify-self: stretch; }
  .finished-copy { padding: 0 4px 4px; }
  .finished-copy p { font-size: 14.5px; margin: 6px 0 14px; }
  .finished-copy .btn { width: 100%; }
  .sound { left: 10px; bottom: 10px; height: 40px; font-size: 13.5px; }

  /* examples: a native swipe instead of a pinned pan */
  .examples.flat .ex-stage { height: auto; padding: 56px 0 52px; gap: 20px; overflow: visible; }
  .ex-head { padding: 0 16px; }
  .ex-head h2 { font-size: 32px; }
  .examples.flat .ex-rail { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 4px 16px 10px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .examples.flat .ex-rail::-webkit-scrollbar { display: none; }
  .examples.flat .ex-rail > li { flex: none; scroll-snap-align: start; }
  .ex { width: 78vw; max-width: 320px; }
  .ex.tall .th { height: auto; aspect-ratio: 16 / 10; }
  .ex:hover { transform: none; }

  .site { padding: 56px 0; }
  .site-copy h2, .pricing h2, .dev-copy h2, .start h2 { font-size: 32px; }
  .site-form { flex-direction: column; } .site-form input { height: 48px; }
  .site-demo figcaption { font-size: 13px; }

  .pricing { padding: 56px 0; }
  .pricing .lead { font-size: 16px; }
  .plans { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
  .plan { padding: 16px; gap: 10px; }
  .plan header { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .plan .price { font-size: 28px; }
  .plan p { font-size: 14px; }

  /* developers: a plain section, tabs are tapped */
  .dev.flat .dev-stage { height: auto; padding: 56px 16px; gap: 22px; }
  .dev-tabs { padding: 8px; }
  .dev-tabs button { flex: 1; padding: 0 6px; font-size: 13px; }
  .dev-body { padding: 14px 14px 16px; }
  .dev-body pre { font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
  .copy { position: static; display: block; width: 100%; height: 40px; margin-top: 14px; font-size: 13.5px; }
  .dev-body .link { margin-top: 14px; }

  .start { padding: 56px 0 24px; }
  .composer-end { margin-top: 22px; }
  .composer-end .composer-foot { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .foot { margin-top: 48px; flex-direction: column; gap: 12px; }
  .foot nav { flex-wrap: wrap; gap: 8px 18px; }

  .viewer { padding: 12px; }
  .viewer-in { padding: 8px; border-radius: var(--r2); }
  .viewer-x { right: 6px; top: 6px; }
}
@media (max-width: 700px) {
  html[data-hero="b"] .brief { padding: calc(var(--bar) + 36px) 16px 112px; background: #0e0e13; }
  html[data-hero="b"] .hero-sound { left: 16px; bottom: 24px; height: 48px; font-size: 15px; }
  html[data-hero="b"] .hero-tag { right: 16px; top: calc(var(--bar) + 12px); bottom: auto; }
  html[data-hero="d"] .hero-media { width: 100%; margin-bottom: 22px; border-radius: var(--r2); }
  html[data-hero="c"] .hero-media, html[data-hero="d"] .hero-media { border-radius: var(--r2); }
  .hero-sound { height: 40px; font-size: 13.5px; padding: 0 14px 0 10px; left: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene, .lane .blk, .finished, .brief-text mark { transition: none; }
  .ghost-frame, .ghost-tray, .composer { transform: none !important; }
  .board-status .dot { animation: none; }
}

.mine-cta { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); display: grid; gap: 12px; justify-items: start; }
.mine-cta p { font-size: 14.5px; color: var(--ink-2); }
.mine-cta .link { border: 0; background: none; padding: 0; font: 700 14px/1 var(--font); cursor: pointer; }
