/* Motion Library site.
   Type: Geist 400/500 and Geist Mono, as the brand specifies. Hierarchy from size and colour, not weight.
   Negative tracking only on display sizes (32px and up).
   Colour: the Motion Library brand. Red appears once per screen. Stripes are the past, solid is now.
   Themes: html[data-theme="dark" | "light"], set before paint by the inline script in <head>.
   A section with .inverse takes the opposite theme. */


@font-face { font-family: "Satoshi"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/Satoshi-Bold.woff2") format("woff2"); }

:root {
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --red: #D2402A;
  --ink: #111110;
  --paper: #F4F2EE;
  --white: #FFFFFF;
  --graphite: #6B6A66;
  --r-card: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
}

/* dark tokens */
:root, [data-theme="dark"], [data-theme="light"] .inverse {
  --bg: #0A0A0A; --bg-2: #111110; --surface: #181817; --surface-2: #20201F; --surface-3: #2A2A28;
  --fg: #F4F2EE; --fg-strong: #FFFFFF; --fg-2: #BDBAB4; --muted: #8E8C87;
  --line: rgba(244, 242, 238, 0.09); --line-2: rgba(244, 242, 238, 0.18);
  --btn-bg: #FFFFFF; --btn-fg: #0A0A0A; --btn-hover: #E8E6E1;
  --btn2-bg: #212120; --btn2-fg: #FFFFFF; --btn2-hover: #2C2C2A;
  --nav-bg: rgba(10, 10, 10, 0.86);
  --stripe: rgba(244, 242, 238, 0.55);
  --grain-blend: overlay; --grain-op: .10;
  --shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
/* light tokens */
[data-theme="light"], [data-theme="dark"] .inverse {
  --bg: #F4F2EE; --bg-2: #ECE9E3; --surface: #FFFFFF; --surface-2: #F0EDE7; --surface-3: #E4E0D9;
  --fg: #111110; --fg-strong: #111110; --fg-2: #3C3B38; --muted: #6B6A66;
  --line: rgba(17, 17, 16, 0.10); --line-2: rgba(17, 17, 16, 0.20);
  --btn-bg: #111110; --btn-fg: #FFFFFF; --btn-hover: #000000;
  --btn2-bg: #E4E0D9; --btn2-fg: #111110; --btn2-hover: #D9D4CC;
  --nav-bg: rgba(244, 242, 238, 0.88);
  --stripe: rgba(17, 17, 16, 0.5);
  --grain-blend: multiply; --grain-op: .16;
  --shadow: 0 30px 60px rgba(17, 17, 16, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* the canvas behind the page: page colour above the middle, footer colour below it,
   so the overscroll bounce at either end shows the colour of the edge you pulled, never black */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: linear-gradient(180deg, var(--bg) 0 50%, var(--surface-2) 50% 100%); overscroll-behavior-y: none; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .35s, color .35s; }
.inverse { background: var(--bg); color: var(--fg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; font-feature-settings: normal; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* stripe textures (the brand signature), reusable */
.tex-stripes { background: repeating-linear-gradient(0deg, var(--stripe) 0 2.6px, transparent 2.6px 6px); }
.tex-frames { background:
  linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 100%,
  linear-gradient(0deg, var(--line) 1px, transparent 1px) 0 0 / 100% 36px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap; transition: background-color .2s, color .2s, transform .2s var(--ease-out); }
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease-out); }
.btn:hover svg { transform: translateX(2px); }
.btn:active { transform: scale(0.97); }
.btn-lg { height: 48px; padding: 0 24px; }
.btn-white { background: var(--btn-bg); color: var(--btn-fg); }
.btn-white:hover { background: var(--btn-hover); }
.btn-dark { background: var(--btn2-bg); color: var(--btn2-fg); }
.btn-dark:hover { background: var(--btn2-hover); }
.btn-ghost { color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #000; }
.btn-block { width: 100%; height: 48px; }
.chip { height: 28px; padding: 0 12px; border-radius: 999px; font-family: var(--mono); font-size: 12px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); transition: color .2s, background-color .2s, box-shadow .2s; display: inline-flex; align-items: center; white-space: nowrap; }
.chip:hover { color: var(--fg); }
.chip.on { color: var(--btn-fg); background: var(--btn-bg); box-shadow: none; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 32px; height: 64px; padding: 0 var(--gutter); background: var(--nav-bg); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid transparent; transition: border-color .3s, background-color .35s; }
.nav.scrolled { border-bottom-color: var(--line); }
.lockup { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-strong); }
.lockup-mark { width: 24px; height: 24px; }
.lockup-word { width: 112px; height: 16px; }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }
.nav-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nav-cta .btn { height: 36px; padding: 0 16px; font-size: 13px; }
.theme-toggle { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--fg); transition: background-color .2s; flex: none; }
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
.nav-menu { display: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); position: relative; }
.nav-menu span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--fg); transition: transform .3s var(--ease-out); }
.nav-menu span:first-child { top: 16px; } .nav-menu span:last-child { top: 24px; }
.nav.open .nav-menu span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .nav-menu span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.nav-mobile-end { display: none; margin-left: auto; gap: 8px; align-items: center; }

/* ---------- shader canvases ---------- */
.shader { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* ---------- hero ---------- */
.hero-wrap { position: relative; overflow: hidden; }
.hero-wrap .shader { -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 80%); mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 80%); }
.hero { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 112px) var(--gutter) 64px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.announce { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); transition: color .2s; max-width: 100%; }
.announce:hover { color: var(--fg); }
.announce-arrow { width: 16px; height: 16px; flex: none; }
.hero-title { margin-top: 28px; font-size: clamp(40px, 6.2vw, 76px); font-weight: 500; line-height: 1.02; letter-spacing: -0.035em; color: var(--fg-strong); }
.frameword { position: relative; display: inline-block; }
.frameline { position: absolute; left: 0; right: 0; bottom: -0.1em; height: 0.07em; display: flex; gap: 0.06em; }
.frameline i, .frameline b { flex: 1; transform-origin: left; transform: scaleX(0); animation: grow .5s var(--ease-out) forwards; }
.frameline i { background: repeating-linear-gradient(0deg, var(--fg) 0 45%, transparent 45% 100%); background-size: 100% 6px; opacity: .55; }
.frameline i:nth-child(1) { animation-delay: .5s; } .frameline i:nth-child(2) { animation-delay: .62s; } .frameline i:nth-child(3) { animation-delay: .74s; }
.frameline b { flex: 1.4; background: var(--red); animation-delay: .86s; }
@keyframes grow { to { transform: scaleX(1); } }
.hero-sub { margin-top: 24px; max-width: 560px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; color: var(--fg-2); }
.hero-ctas { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hero > * { animation: rise .8s var(--ease-out) both; }
.hero > *:nth-child(2) { animation-delay: .06s; } .hero > *:nth-child(3) { animation-delay: .12s; } .hero > *:nth-child(4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* page heads (library, uses, docs) */
.page-head-wrap { position: relative; overflow: hidden; }
.page-head-wrap .shader { -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%); mask-image: linear-gradient(180deg, #000 20%, transparent 95%); }
.page-head { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter) 48px; }
.page-head h1 { font-size: clamp(40px, 5.6vw, 68px); font-weight: 500; line-height: 1.02; letter-spacing: -0.03em; color: var(--fg-strong); max-width: 900px; }
.page-head p { margin-top: 20px; max-width: 600px; font-size: clamp(16px, 1.5vw, 18px); color: var(--fg-2); }

/* ---------- bento ---------- */
.bento { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 120px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card { position: relative; min-height: 320px; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; display: flex; flex-direction: column; transition: background-color .35s; }
.card-wide { grid-column: span 2; min-height: 420px; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-size: 14px; font-weight: 500; }
.card-foot a, .card-foot button { color: var(--muted); font-weight: 400; font-size: 13px; transition: color .2s; }
.card-foot a::after, .tech-next::after { content: " →"; }
.card-foot a:hover, .card-foot button:hover { color: var(--fg); }

/* match cut */
.card-matchcut { background: var(--ink); }
.mc-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.mc-img { width: min(42%, 240px); aspect-ratio: 1; object-fit: contain; }
.mc-hud { position: absolute; top: 16px; left: 16px; display: flex; gap: 8px; }
.mc-hud span { height: 28px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 8px; background: rgba(10,10,10,.72); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mc-replay { position: absolute; top: 16px; right: 16px; height: 28px; padding: 0 12px; border-radius: 8px; background: rgba(0,0,0,.35); color: #fff; opacity: 0; transition: opacity .3s; backdrop-filter: blur(8px); }
.card-matchcut.done .mc-replay { opacity: 1; }
.card-matchcut.done .mc-speed { display: none; }
.card-matchcut .card-foot { position: relative; z-index: 2; color: #fff; }
.card-matchcut .card-foot > * { padding: 4px 8px; border-radius: 8px; background: rgba(10,10,10,.72); }
.card-matchcut .card-foot a { color: rgba(255,255,255,.75); }

/* chat */
.chat { padding: 24px 20px 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }
.bubble { max-width: 88%; padding: 8px 16px; border-radius: 18px; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.in .bubble { opacity: 1; transform: none; }
.bubble-me { align-self: flex-end; background: var(--surface-2); border-bottom-right-radius: 6px; }
.bubble-agent { align-self: flex-start; background: transparent; padding-left: 0; color: var(--fg-2); transition-delay: .35s; }
.bubble-late { transition-delay: .9s; }
.think { color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.think i { width: 8px; height: 8px; border-radius: 2px; background: repeating-linear-gradient(0deg, var(--muted) 0 1.5px, transparent 1.5px 3px); }
@keyframes spin { to { transform: rotate(360deg); } }

/* film strip */
.strip { position: relative; margin: 24px 0 0; height: 152px; overflow: hidden; cursor: grab; touch-action: pan-y; outline: none; }
.strip:active { cursor: grabbing; }
.strip-track { position: absolute; top: 16px; left: 0; display: flex; gap: 8px; will-change: transform; }
.sf { position: relative; width: 152px; height: 84px; border-radius: 8px; overflow: hidden; flex: none; transition: transform .35s var(--ease-out), opacity .35s; }
.sf img { width: 100%; height: 100%; object-fit: cover; }
.sf::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--surface) 82%, transparent) 0 3px, transparent 3px 6px); transition: opacity .3s; }
.sf.now { transform: scale(1.12); box-shadow: 0 0 0 2px var(--fg-strong); z-index: 2; }
.sf.now::after { opacity: 0; }
.sf.future { opacity: .35; }
.sf.future::after { opacity: 0; }
.strip-read { display: flex; justify-content: space-between; padding: 0 20px; color: var(--muted); }
.strip-tc { color: var(--fg); }

/* ease curve */
.ease { width: 100%; height: auto; padding: 16px 20px 0; }
.ease-grid { stroke: var(--line); fill: none; }
.ease-path { stroke: var(--fg); stroke-width: 2; fill: none; }
.ease-ghosts circle { fill: none; stroke: var(--muted); stroke-width: 1; }
.ease-dot { fill: var(--fg-strong); }
.ease-pick { display: flex; gap: 8px; padding: 8px 20px 0; flex-wrap: wrap; }

/* sound */
.card-sound { grid-column: 1 / -1; min-height: 280px; }
.sound { padding: 24px 24px 0; display: grid; grid-template-columns: 1fr 240px; gap: 20px; align-items: center; }
.wave { width: 100%; height: 140px; }
.sound-cues { display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.sound-cues b { display: block; font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--fg); }

/* technique cards */
.tech-deck { position: relative; height: 248px; margin: 20px 20px 0; perspective: 900px; cursor: pointer; }
.tc { position: absolute; inset: 0; border-radius: 12px; background: var(--paper); color: var(--ink); padding: 16px; display: flex; flex-direction: column; gap: 8px; transform-origin: 50% 110%; transition: transform .55s var(--ease-out), opacity .45s; box-shadow: 0 0 0 1px rgba(17,17,16,.08); }
[data-theme="light"] .tc { background: #FBFAF7; }
.tc-frames { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; height: 64px; }
.tc-frames span { border-radius: 6px; background: repeating-linear-gradient(0deg, var(--ink) 0 2.6px, transparent 2.6px 6px); opacity: .5; }
.tc-frames span:nth-child(2) { opacity: .8; }
.tc-frames span:last-child { background: var(--red); opacity: 1; }
.tc .tc-title { font-size: 18px; font-weight: 500; line-height: 1.2; color: var(--ink); }
.tc p { font-size: 13px; line-height: 1.45; color: #44433F; }
.tc dl { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; font-family: var(--mono); font-size: 11px; color: var(--graphite); }
.tc dt { color: var(--ink); }

/* ---------- agents ---------- */
.agents { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 140px; display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
h2 { font-size: clamp(34px, 4.2vw, 52px); font-weight: 500; line-height: 1.04; letter-spacing: -0.025em; color: var(--fg-strong); }
.agents-copy p { margin-top: 20px; max-width: 440px; font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.agents .hero-ctas { justify-content: flex-start; margin-top: 28px; }
.stats { margin-top: 44px; display: flex; gap: 40px; }
.stats dt { font-size: 32px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--fg-strong); }
.stats dd { font-size: 13px; color: var(--muted); }

/* code block: always dark, like a terminal */
.code { border-radius: var(--r-card); background: #0E0E0D; color: #D8D5CF; box-shadow: inset 0 0 0 1px rgba(244,242,238,.09); overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px; border-bottom: 1px solid rgba(244,242,238,.09); }
.dots { display: flex; gap: 8px; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: #2A2A28; }
.code-copy { color: #8E8C87; } .code-copy:hover { color: #F4F2EE; }
.code-body { padding: 24px 24px 8px; min-height: 272px; font-size: 13px; line-height: 1.75; color: #D8D5CF; white-space: pre-wrap; overflow-x: auto; }
.code-body .c { color: #9A978F; } .code-body .k { color: #FFFFFF; font-weight: 500; } .code-body .p { color: #9A978F; }
.code-body .caret { display: inline-block; width: 8px; height: 16px; background: #F4F2EE; vertical-align: -2px; }
@keyframes blink { 50% { opacity: 0; } }
.code-tabs { display: flex; gap: 8px; padding: 12px 16px 16px; flex-wrap: wrap; }
.code .chip { color: #8E8C87; box-shadow: inset 0 0 0 1px rgba(244,242,238,.12); }
.code .chip:hover { color: #F4F2EE; }
.code .chip.on { color: #0A0A0A; background: #F4F2EE; box-shadow: none; }

/* ---------- principles dial (an .inverse section) ---------- */
.principles { padding: 120px var(--gutter); text-align: center; }
.section-sub { margin-top: 16px; color: var(--muted); font-size: 17px; }
.dial-wrap { max-width: 980px; margin: 56px auto 0; display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: center; text-align: left; }
.dial { position: relative; width: 340px; height: 340px; cursor: grab; touch-action: none; border-radius: 50%; }
.dial:active { cursor: grabbing; }
.dial-face { width: 100%; height: 100%; }
.dial-ticks line { stroke: var(--fg); stroke-width: 2; opacity: .25; transition: opacity .25s, stroke .25s; }
.dial-ticks line.major { stroke-width: 3; opacity: .5; }
.dial-ticks line.on { stroke: var(--red); opacity: 1; }
.knob { fill: var(--surface); filter: drop-shadow(0 18px 30px rgba(0,0,0,.18)) drop-shadow(0 2px 3px rgba(0,0,0,.14)); }
.knob-notch { fill: var(--fg); }
.dial-knob { transition: transform .45s var(--ease-out); }
.dial-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; white-space: pre; font-size: 14px; color: var(--muted); pointer-events: none; }
.dial-n { color: var(--fg); }
.dial-title { font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.dial-line { margin-top: 8px; font-size: 19px; color: var(--fg-2); }
.dial-bar { margin-top: 28px; height: 8px; border-radius: 999px; background: repeating-linear-gradient(0deg, var(--line-2) 0 2.4px, transparent 2.4px 5px); overflow: hidden; }
.dial-bar-fill { display: block; height: 100%; width: 0; background: var(--fg); border-radius: 999px; transition: width .6s var(--ease-out); }
.dial-count { margin-top: 8px; color: var(--muted); }
.dial-btns { margin-top: 28px; display: flex; gap: 8px; }
.dial-read > * { transition: opacity .25s, transform .35s var(--ease-out); }
.dial-read.swap .dial-title, .dial-read.swap .dial-line { opacity: 0; transform: translateY(6px); }

/* ---------- our films ---------- */
.films { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 40px; }
.films-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.films-head p { color: var(--muted); max-width: 460px; margin-top: 12px; }
.film-row { margin-top: 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.film-media { position: relative; aspect-ratio: 16/10; border-radius: 14px; overflow: hidden; background: var(--surface); }
.film-media img, .film-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out), opacity .3s; }
.film-media video { opacity: 0; }
.film.playing .film-media video { opacity: 1; }
.film-meta { margin-top: 16px; color: var(--muted); }
.film h3 { margin-top: 4px; font-size: 17px; font-weight: 500; }

/* ---------- library grid (home preview + library page) ---------- */
.library { padding: 120px 0 40px; }
.library .films-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.lib-tools { max-width: var(--max); margin: 28px auto 0; padding: 0 var(--gutter); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.lib-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-search { height: 40px; width: min(320px, 100%); padding: 0 16px 0 40px; border-radius: 999px; border: 0; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%238E8C87' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 16px 50%; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; outline: none; }
.lib-search:focus { box-shadow: inset 0 0 0 1px var(--line-2); }
.lib-count { color: var(--muted); }
.lib-grid { max-width: var(--max); margin: 24px auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lib-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .35s var(--ease-out), background-color .35s; }
.lib-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-tile { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 16px; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; color: var(--fg-strong); }
.lib-tile::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, var(--line-2) 0 2.6px, transparent 2.6px 6px); }
.lib-tile span { position: relative; }
.lib-src { position: absolute; top: 8px; right: 8px; height: 24px; padding: 0 8px; border-radius: 6px; display: inline-flex; align-items: center; background: rgba(10,10,10,.6); color: #fff; backdrop-filter: blur(6px); }
.lib-body { padding: 16px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lib-brand { color: var(--muted); }
.lib-body h3 { font-size: 15px; font-weight: 500; line-height: 1.3; }
.lib-tags { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.lib-tags span { height: 24px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.lib-more { max-width: var(--max); margin: 28px auto 0; padding: 0 var(--gutter); display: flex; justify-content: center; }
.lib-empty { grid-column: 1 / -1; padding: 48px 0; text-align: center; color: var(--muted); }

/* ---------- submit a film ---------- */
.submit { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter); display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.submit-copy p { margin-top: 16px; color: var(--fg-2); max-width: 420px; }
.submit-copy ol { margin-top: 28px; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 16px; }
.submit-copy li { counter-increment: s; display: flex; gap: 16px; color: var(--fg-2); }
.submit-copy li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 4px; }
.form { border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 28px; display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.field .hint { color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 16px; border-radius: 10px; border: 0; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; outline: none; transition: box-shadow .2s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: inset 0 0 0 1.5px var(--fg); }
.field.bad input { box-shadow: inset 0 0 0 1.5px var(--red); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.drop { position: relative; border-radius: 14px; padding: 24px; text-align: center; color: var(--muted); background: repeating-linear-gradient(0deg, var(--line) 0 1.2px, transparent 1.2px 6px); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background-color .2s; }
.drop.over { background-color: var(--surface-2); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop b { color: var(--fg); font-weight: 500; }
.drop-preview { display: none; gap: 16px; align-items: center; text-align: left; }
.drop.has .drop-empty { display: none; }
.drop.has .drop-preview { display: flex; }
.drop-preview video { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #000; flex: none; }
.form-msg { min-height: 20px; color: var(--muted); font-size: 14px; }
.form-msg.ok { color: var(--fg); }

/* ---------- open source ---------- */
.oss { position: relative; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 40px auto 0; padding: 0 var(--gutter); }
.oss-card { position: relative; border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.oss-inner { position: relative; padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 64px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.oss p { margin-top: 16px; color: var(--fg-2); max-width: 440px; font-size: 17px; }
.oss .hero-ctas { justify-content: flex-start; }
.oss-steps { display: grid; gap: 8px; }
.oss-step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; padding: 16px 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line); }
.oss-step i { width: 44px; height: 32px; border-radius: 6px; background: repeating-linear-gradient(0deg, var(--stripe) 0 2.6px, transparent 2.6px 6px); }
.oss-step:last-child i { background: var(--fg-strong); }
.oss-step b { display: block; font-weight: 500; }
.oss-step span { color: var(--muted); font-size: 14px; }

/* ---------- start ---------- */
.start { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 140px; text-align: center; }
.start-grid { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.start-card { border-radius: var(--r-card); padding: 32px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.start-card h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.start-card p { margin-top: 8px; color: var(--muted); }
.start-card ul { list-style: none; margin: 24px 0 32px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.start-card li { display: flex; gap: 12px; align-items: baseline; }
.start-card li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: repeating-linear-gradient(0deg, currentColor 0 2px, transparent 2px 4px); opacity: .7; transform: translateY(1px); }
.start-card .btn { margin-top: auto; }
.start-card-red { background: var(--red); box-shadow: none; color: var(--white); }
.start-card-red p { color: #FFFFFF; }

/* ---------- uses page ---------- */
.uses { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 120px; display: grid; gap: 16px; }
.use { display: grid; grid-template-columns: 320px 1fr; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.use-visual { position: relative; min-height: 260px; background: var(--surface-2); overflow: hidden; }
.use-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.use-num { position: absolute; top: 16px; left: 16px; color: var(--fg-strong); font-size: 14px; z-index: 1; }
.use-visual.has-img .use-num { color: #fff; }
.use-frames { position: absolute; left: 16px; right: 16px; bottom: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 56px; }
.use-frames span { border-radius: 6px; background: repeating-linear-gradient(0deg, var(--stripe) 0 2.6px, transparent 2.6px 6px); }
.use-frames span:last-child { background: var(--fg-strong); }
.use-body { padding: 28px 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.use-body h2 { font-size: clamp(24px, 2.4vw, 30px); }
.use-body > div > p { margin-top: 12px; color: var(--fg-2); }
.use-steps { list-style: none; display: grid; gap: 8px; counter-reset: u; font-size: 14px; color: var(--fg-2); align-content: start; }
.use-steps li { counter-increment: u; display: grid; grid-template-columns: 26px 1fr; }
.use-steps li::before { content: counter(u); font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.say { margin-top: 16px; display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.say span { flex: 1; }
.say button { color: var(--muted); font-family: var(--mono); font-size: 12px; } .say button:hover { color: var(--fg); }
.use-ex { margin-top: 16px; display: inline-flex; gap: 8px; color: var(--muted); font-size: 14px; }
.use-ex:hover { color: var(--fg); }

/* ---------- docs page ---------- */
.docs { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 120px; display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 88px; display: grid; gap: 4px; font-size: 14px; }
.toc a { padding: 8px 12px; border-radius: 10px; color: var(--muted); transition: color .2s, background-color .2s; }
.toc a:hover { color: var(--fg); }
.toc a.on { color: var(--fg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.doc { min-width: 0; max-width: 760px; }
.doc section { padding-bottom: 56px; scroll-margin-top: 88px; }
.doc h2 { font-size: clamp(28px, 3vw, 36px); }
.doc h3 { margin-top: 28px; font-size: 18px; font-weight: 500; }
.doc p, .doc li { color: var(--fg-2); }
.doc p { margin-top: 16px; }
.doc ul { margin-top: 12px; padding-left: 20px; display: grid; gap: 8px; }
.doc code { font-family: var(--mono); font-size: 13px; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--fg); }
.doc pre { margin-top: 16px; padding: 16px 20px; border-radius: 14px; background: #0E0E0D; color: #D8D5CF; font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow-x: auto; box-shadow: inset 0 0 0 1px rgba(244,242,238,.09); }
.doc pre code { background: none; padding: 0; color: inherit; }
.doc pre .c { color: #9A978F; }
.doc .tbl { margin-top: 16px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 500; color: var(--fg); }
.doc td { color: var(--fg-2); }
.doc td:first-child { white-space: nowrap; }
.callout { margin-top: 16px; padding: 16px 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.callout i { width: 28px; height: 20px; border-radius: 4px; background: repeating-linear-gradient(0deg, var(--stripe) 0 2.6px, transparent 2.6px 6px); margin-top: 2px; }
.callout p { margin: 0; }

/* ---------- pricing ---------- */
.plans { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 32px 28px; display: flex; flex-direction: column; }
.plan-ent { box-shadow: inset 0 0 0 1px var(--line-2); }
.plan-level { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; height: 20px; margin-bottom: 28px; }
.plan-level i, .plan-level b { border-radius: 4px; }
.plan-level i { background: repeating-linear-gradient(0deg, var(--stripe) 0 2px, transparent 2px 4px); opacity: .6; }
.plan-level b { background: var(--fg); }
.plan-level b.r { background: var(--red); }
.plan-name { font-size: 24px; letter-spacing: -0.01em; }
.plan-state { margin-top: 8px; color: var(--muted); }
.plan-price { margin-top: 24px; font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -0.03em; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
.plan-price-muted { color: var(--muted); }
.plan-for { margin-top: 16px; color: var(--fg-2); min-height: 48px; }
.plan .btn { margin-top: 24px; }
.plan-list { list-style: none; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: 14px; color: var(--fg-2); }
.plan-list li { display: grid; grid-template-columns: 16px 1fr; gap: 12px; align-items: baseline; }
.plan-list li::before { content: ""; width: 12px; height: 8px; border-radius: 2px; background: repeating-linear-gradient(0deg, var(--fg) 0 2px, transparent 2px 4px); opacity: .7; transform: translateY(-1px); }
.plan-list li:first-child::before { background: var(--fg); opacity: 1; }
.plan-more { margin-top: auto; padding-top: 24px; font-size: 14px; color: var(--muted); transition: color .2s; }
.plan-more:hover { color: var(--fg); }

.compare { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 40px; }
.compare h2 { margin-bottom: 28px; }
.compare .tbl { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cmp th { text-align: left; font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.cmp td { padding: 16px; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.cmp th:not(:first-child), .cmp td:not(:first-child) { width: 16%; }
.cmp td:first-child, .cmp th:first-child { padding-left: 0; color: var(--fg); }
.cmp tbody th { font-weight: 400; text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.cmp .y, .cmp .n { display: inline-block; width: 16px; height: 12px; border-radius: 4px; vertical-align: middle; }
.cmp .y { background: var(--fg); }
.cmp .n { background: repeating-linear-gradient(0deg, var(--line-2) 0 2px, transparent 2px 4px); }

/* ---------- enterprise ---------- */
.ent-head h1 { max-width: 880px; }
.ent-ctas { justify-content: flex-start; }

.gap { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gap-col { border-radius: var(--r-card); padding: 32px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.gap-now { box-shadow: inset 0 0 0 1px var(--line-2); }
.gap-tag { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.gap-tag i, .gap-tag b { width: 28px; height: 16px; border-radius: 4px; }
.gap-tag i { background: repeating-linear-gradient(0deg, var(--stripe) 0 2px, transparent 2px 4px); }
.gap-tag b { background: var(--fg); }
.gap ul { list-style: none; margin-top: 24px; display: grid; gap: 16px; font-size: 17px; }
.gap-col:not(.gap-now) li { color: var(--muted); }
.gap-now li { color: var(--fg); }

.pipe { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 0; }
.pipe-track { margin-top: 40px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pipe-step { display: grid; gap: 12px; text-align: left; padding: 0; }
.pipe-frame { height: 72px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .25s, box-shadow .25s; }
.pipe-step.past .pipe-frame { background: repeating-linear-gradient(0deg, var(--stripe) 0 2.4px, transparent 2.4px 6px); box-shadow: none; opacity: .7; }
.pipe-step.now .pipe-frame { background: var(--red); box-shadow: none; }
.pipe-step:hover:not(.now) .pipe-frame { box-shadow: inset 0 0 0 1px var(--fg); }
.pipe-num { color: var(--muted); }
.pipe-name { font-size: 16px; font-weight: 500; color: var(--muted); transition: color .2s; }
.pipe-step.now .pipe-name, .pipe-step.past .pipe-name { color: var(--fg); }
.pipe-detail { margin-top: 32px; padding: 32px; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; grid-template-columns: 1fr 2fr; gap: 8px 40px; align-items: start; }
.pipe-k { color: var(--muted); grid-column: 1 / -1; }
.pipe-t { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.pipe-d { color: var(--fg-2); font-size: 17px; }
.pipe-own { grid-column: 2; color: var(--muted); margin-top: 8px; }

.build { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 0; }
.build-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bcard { border-radius: var(--r-card); padding: 28px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.bcard:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.bnum { color: var(--muted); }
.bcard h3 { margin-top: 32px; font-size: 20px; font-weight: 500; }
.bcard p { margin-top: 8px; color: var(--fg-2); font-size: 15px; }

.runs { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 0; }
.run-steps { list-style: none; margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.run-bar { display: block; height: 8px; border-radius: 4px; margin-bottom: 24px; background: repeating-linear-gradient(0deg, var(--stripe) 0 2px, transparent 2px 4px); }
.run-steps li:last-child .run-bar { background: var(--fg); }
.run-steps h3 { font-size: 20px; font-weight: 500; }
.run-steps p { margin-top: 8px; color: var(--fg-2); font-size: 15px; }
.run-steps .run-out { margin-top: 16px; color: var(--muted); }

.ent-films { padding-top: 120px; }
.ent-contact { padding-bottom: 120px; }
.submit-copy > .btn { margin-top: 24px; }

@media (max-width: 1080px) {
  .plans, .build-grid { grid-template-columns: 1fr 1fr; }
  .plan-ent { grid-column: 1 / -1; }
  .run-steps { grid-template-columns: 1fr 1fr; }
  .pipe-track { grid-template-columns: repeat(3, 1fr); }
  .pipe-detail { grid-template-columns: 1fr; }
  .pipe-own { grid-column: auto; }
}
@media (max-width: 640px) {
  .plans, .build-grid, .gap, .run-steps { grid-template-columns: 1fr; }
  .plan-ent { grid-column: auto; }
  .pipe-track { grid-template-columns: repeat(2, 1fr); }
  .pipe-frame { height: 56px; }
  .gap-col, .pipe-detail { padding: 24px; }
  .plan-for { min-height: 0; }
}

/* ---------- footer: clean card, the logo huge and fading out at the bottom ---------- */
.footer { margin-top: 80px; background: var(--surface-2); border-top: 1px solid var(--line); transition: background-color .35s; }
.footer-card { position: relative; overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.6fr .8fr 1.2fr 1.1fr; gap: 40px; padding: clamp(40px, 5vw, 64px) var(--gutter) 0; align-items: start; }
/* the footer line is set in Satoshi Bold (ITF Free Font License, Fontshare), a heavy geometric sans like the reference wordmark */
.f-lead { font-family: "Satoshi", var(--font); font-size: clamp(22px, 2vw, 28px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--fg-strong); max-width: 420px; text-align: left; justify-self: start; }
.f-col .f-h { font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: 0; color: var(--fg); margin-bottom: 16px; }
.f-col > a { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; transition: color .2s; }
.f-col > a:hover { color: var(--fg); }
.f-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.f-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--fg); transition: box-shadow .2s; }
.f-pill:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.f-pill svg { width: 16px; height: 16px; }
.f-ctas { display: grid; justify-items: start; }
.f-ctas hr { width: 100%; border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }
.f-cta { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.01em; color: var(--fg-strong); }
.f-cta:first-child { color: var(--fg-strong); }
.f-arrow { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--fg-strong); color: var(--bg); transition: transform .3s var(--ease-out); }
.f-arrow-red { background: var(--red); color: #fff; }
.f-arrow svg { width: 12px; height: 12px; }
.f-cta:hover .f-arrow { transform: rotate(45deg); }
.f-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.f-giant { display: block; width: calc(100% - 2 * var(--gutter)); height: auto; margin: clamp(56px, 8vw, 112px) var(--gutter) -6.5%; color: var(--fg-strong);
  -webkit-mask-image: linear-gradient(180deg, #000 20%, rgba(0,0,0,.55) 55%, transparent 92%); mask-image: linear-gradient(180deg, #000 20%, rgba(0,0,0,.55) 55%, transparent 92%); }

/* ---------- quiet states: hovers are neutral surface steps; red is kept for the few things that matter ---------- */
:focus-visible { outline-color: var(--fg); }

/* star the repo, at the right of the nav */
.star-btn { display: inline-flex; align-items: center; height: 36px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; font-weight: 500; color: var(--fg); overflow: hidden; transition: background-color .2s; }
.star-btn > svg { width: 16px; height: 16px; margin: 0 8px 0 12px; }
.star-btn > span:first-of-type { padding-right: 12px; }
.star-count { display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0 12px; border-left: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.star-ico { width: 12px; height: 12px; }
.star-btn:hover { background: var(--surface-2); }
.nav-text { font-size: 14px; color: var(--muted); padding: 0 8px; transition: color .2s; }
.nav-text:hover { color: var(--fg); }

/* buttons and chips */
.btn-ghost:hover { background: var(--surface-2); }
.chip:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.chip.on:hover { box-shadow: none; }

/* cards: a hairline and a 2px lift on hover, nothing coloured */
.card, .lib-card, .start-card { transition: transform .3s var(--ease-out), box-shadow .2s, background-color .35s; }
.card:hover, .lib-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2); }
.card-matchcut:hover { box-shadow: none; }
.start-card:hover { transform: translateY(-2px); }
.oss-step { transition: box-shadow .2s; }
.oss-step:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.use { transition: box-shadow .2s; }
.use:hover { box-shadow: inset 0 0 0 1px var(--line-2); }

/* library cards: HD thumb fades in, a neutral play mark on hover */
.lib-thumb img { opacity: 0; transition: opacity .4s; }
.lib-thumb img.ready { opacity: 1; }
.lib-thumb::after { content: ""; position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; z-index: 2;
  background: rgba(10, 10, 10, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4.5v7l6-3.5z' fill='white'/%3E%3C/svg%3E") center / 20px no-repeat;
  opacity: 0; transition: opacity .2s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lib-card:hover .lib-thumb::after { opacity: 1; }

/* our films: a red playhead runs along the bottom while the preview plays (the one live thing) */
.film-media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); z-index: 2; }
.film.playing .film-media::after { animation: playhead 12s linear infinite; }
@keyframes playhead { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* uses: the last striped frame turns solid on hover */
.use-frames span { transition: background-color .2s; }
.say { transition: box-shadow .2s; }
.say:hover { box-shadow: inset 0 0 0 1px var(--line-2); }

/* docs */
.toc a.on { box-shadow: inset 2px 0 0 var(--fg), inset 0 0 0 1px var(--line); }
.doc a:not(.btn) { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.doc a:not(.btn):hover { text-decoration-color: var(--fg); }

/* footer */
.f-col > a:hover { color: var(--fg); }
.f-pill:hover { box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .card-wide, .card-sound { grid-column: span 2; }
  .agents, .submit, .oss-inner { grid-template-columns: 1fr; gap: 40px; }
  .film-row, .lib-grid { grid-template-columns: 1fr 1fr 1fr; }
  .dial-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 40px; }
  .dial-btns { justify-content: center; }
  .use { grid-template-columns: 1fr; }
  .use-visual { min-height: 200px; }
  .docs { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; display: flex; flex-wrap: wrap; }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-mobile-end { display: flex; }
  .nav-menu { display: block; }
  .nav.open { flex-wrap: wrap; height: auto; padding-bottom: 16px; }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: 16px; width: 100%; font-size: 18px; padding-top: 12px; color: var(--fg); order: 3; }
  .nav.open .nav-cta { display: flex; width: 100%; margin: 4px 0 0; order: 4; }
  .nav.open .nav-cta .theme-toggle { display: none; }
  .nav.open .nav-cta .btn { flex: 1; height: 44px; }
  .use-body { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .f-lead { grid-column: 1 / -1; }
  .film-row, .lib-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .card-wide, .card-sound { grid-column: auto; }
  .card-wide { min-height: 340px; }
  .sound { grid-template-columns: 1fr; }
  .sound-cues { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .stats { gap: 24px; }
  .film-row, .lib-grid { grid-template-columns: 1fr; }
  .start-grid, .field-row { grid-template-columns: 1fr; }
  .dial { width: 280px; height: 280px; }
  .use-body { padding: 24px 20px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer { margin-top: 40px; }
  .lib-search { width: 100%; }
  .form { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 404 */
.nf { min-height: 56vh; }
.nf-code { color: var(--muted); margin-bottom: 20px; }
