/*
 * River · the pages.
 *
 * One system, six characters. The base is the river's night: the journey's
 * glass, hairlines and uppercase labels, Manrope with the italic serif for the
 * phrase that matters. Each page then takes its own light:
 *
 *   night     the film, apply, contact, the questions — the river itself
 *   graphite  the product — River's own dark interface, its green
 *   paper     for animators — the sketchbook: paper, graphite, red and blue pencil
 *   ice       for studios — cold daylight on the ice, slate and teal
 *   ink       for investors — a deck: deep ink, cream type, one amber line
 *   warm      the studio — the cinema: warm dark, amber, the films large
 *
 * Every page is 1180 wide at most, reads at phone width, and ends on the
 * night card with the falcon.
 */
@font-face { font-family: "Manrope"; src: url("/assets/manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
/* the handwriting: Caveat 500, as the film has it since its v127 look, at 1.24x as the film sets it; one file answers upright and italic, so no rule is slanted by the browser */
@font-face { font-family: "Caveat"; src: url("/assets/caveat.woff2") format("woff2"); font-style: normal; font-weight: 400 700; size-adjust: 124%; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/assets/caveat.woff2") format("woff2"); font-style: italic; font-weight: 400 700; size-adjust: 124%; font-display: swap; }

:root { --sans: "Manrope", system-ui, -apple-system, sans-serif; --serif: "Caveat", "Segoe Print", cursive; }

/* ---------- the characters ---------- */
body {
  --bg: #020409; --bg2: #07101c; --ink: #eef4fb; --muted: #8fa3bb; --soft: #b5cce2;
  --line: rgba(146, 186, 232, .16); --hair: rgba(146, 186, 232, .1);
  --accent: #57c1ff; --accent-2: #3fbf7f; --mark: #ff6a55;
  --card: linear-gradient(180deg, rgba(10, 18, 30, .94), rgba(4, 8, 14, .96)); --card-line: rgba(120, 160, 210, .18);
  --shadow: 0 30px 80px rgba(0, 0, 0, .55);
  --btn: #f5f7fa; --btn-ink: #04070d; --field: rgba(2, 8, 17, .6);
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(50, 140, 255, .16), transparent 70%);
  color-scheme: dark;
}
body.theme-graphite {
  --bg: #0b0e10; --bg2: #121619; --ink: #e9eef0; --muted: #8d99a3; --soft: #9fd3b6;
  --line: rgba(255, 255, 255, .1); --hair: rgba(255, 255, 255, .06);
  --accent: #3fbf7f; --accent-2: #57c1ff; --mark: #e8693c;
  --card: linear-gradient(180deg, #14191e, #0f1316); --card-line: rgba(255, 255, 255, .1);
  --btn: #3fbf7f; --btn-ink: #06110b; --field: rgba(255, 255, 255, .04);
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(63, 191, 127, .12), transparent 70%);
}
/* for animators: a sheet of crushed paper, flattened, graphite type, the animator's red pencil for the hand. The sheet (assets/paper/crushed.jpg)
   is the film's R1 rice paper, the creases of ambientCG's Paper003 (CC0) lit from the upper left, and faint pencil marks in its margins drawn with
   the film's own pencil code; it stays still while the page scrolls over it. Sheets on it are white with a hairline. */
body.theme-paper {
  --bg: #f2f1ee; --bg2: #f2f1ee; --ink: #141518; --muted: #585b61; --soft: #d8432f;
  --line: #e1e0dc; --hair: #e9e8e4;
  --accent: #d8432f; --accent-2: #4fa3e0; --mark: #d8432f;
  --card: #ffffff; --card-line: #e1e0dc;
  --shadow: none;
  --btn: #141518; --btn-ink: #fff; --field: #fff;
  --glow: none;
  color-scheme: light;
}
body.theme-paper::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: #f2f1ee url("/assets/paper/crushed.jpg") center / cover no-repeat; }
body.theme-paper .site-header { background: color-mix(in srgb, #f2f1ee 78%, transparent); }
body.theme-paper .frame-card, body.theme-paper .print { box-shadow: 0 0 0 1px var(--card-line); }
body.theme-paper .stage.paper { background: #f7f7f7; }
body.theme-ice {
  --bg: #e6edf3; --bg2: #f4f8fb; --ink: #14202b; --muted: #58697a; --soft: #1f7a8c;
  --line: rgba(20, 32, 43, .14); --hair: rgba(20, 32, 43, .08);
  --accent: #1f7a8c; --accent-2: #2f8fff; --mark: #d8432f;
  --card: #ffffff; --card-line: rgba(20, 32, 43, .1);
  --shadow: 0 1px 2px rgba(20, 40, 60, .12), 0 24px 60px rgba(20, 40, 60, .14);
  --btn: #14202b; --btn-ink: #fff; --field: #fff;
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, .8), transparent 70%);
  color-scheme: light;
}
/* investors: the ledger. Plain white and black, like a fund's own letter, with the handwriting in one blue pencil; flat cards, no glow */
body.theme-ledger {
  --bg: #ffffff; --bg2: #ffffff; --ink: #0f1012; --muted: #585b61; --soft: #2a66b3;
  --line: #e2e3e5; --hair: #ececed;
  --accent: #2a66b3; --accent-2: #2a66b3; --mark: #2a66b3;
  --card: #ffffff; --card-line: #e2e3e5;
  --shadow: none;
  --btn: #0f1012; --btn-ink: #fff; --field: #fff;
  --glow: none;
  color-scheme: light;
}
body.theme-ledger .card, body.theme-ledger .stat { border-radius: 6px; box-shadow: 0 0 0 1px var(--card-line); }
body.theme-warm {
  --bg: #171210; --bg2: #221a15; --ink: #f5ede4; --muted: #a8988a; --soft: #e8a96a;
  --line: rgba(245, 237, 228, .14); --hair: rgba(245, 237, 228, .08);
  --accent: #e8893c; --accent-2: #57c1ff; --mark: #e8893c;
  --card: linear-gradient(180deg, #241c17, #1b1512); --card-line: rgba(245, 237, 228, .12);
  --btn: #e8893c; --btn-ink: #1a0f06; --field: rgba(245, 237, 228, .05);
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(232, 137, 60, .14), transparent 70%);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--glow); }
img, video, svg { max-width: 100%; display: block; }
/* iPhone in Low Power Mode starts no video by itself and draws its own play button on each (Nov 15): no buttons; the still
   frame shows until the reader's first touch starts them (src/site.js) */
video:not([controls])::-webkit-media-controls, video:not([controls])::-webkit-media-controls-start-playback-button, video:not([controls])::-webkit-media-controls-overlay-play-button, video:not([controls])::-webkit-media-controls-panel { display: none !important; -webkit-appearance: none; opacity: 0 !important; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; } p:last-child { margin-bottom: 0; }
b, strong { font-weight: 700; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; z-index: 100; } .skip:focus { left: 12px; }
::selection { background: rgba(87, 193, 255, .35); }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.wrap.narrow { width: min(840px, 100% - 48px); }
.wrap.wide { width: min(1320px, 100% - 48px); }
.sec { padding: clamp(60px, 8vw, 110px) 0; }
.sec.hair { border-top: 1px solid var(--hair); }
.sec.tight { padding-top: clamp(32px, 4vw, 56px); }
.center { text-align: center; } .center .actions { justify-content: center; } .center .byline, .center .lede { margin-inline: auto; }
.mt { margin-top: clamp(30px, 5vw, 60px); } .mt-s { margin-top: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.two.top { align-items: start; } .two.wide-r { grid-template-columns: .9fr 1.1fr; } .two.wide-l { grid-template-columns: 1.1fr .9fr; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .two, .two.wide-r, .two.wide-l { grid-template-columns: 1fr; } .three { grid-template-columns: 1fr; } .four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .four { grid-template-columns: 1fr; } }

/* ---------- type ---------- */
em, .serif { font-family: var(--serif); font-style: normal; font-weight: 500; letter-spacing: 0; color: var(--soft); }
.display { margin: 0; font-size: clamp(42px, 6.2vw, 86px); line-height: 1; font-weight: 500; letter-spacing: -.045em; text-wrap: balance; }
.head { margin: 0; font-size: clamp(32px, 4.4vw, 60px); line-height: 1.04; font-weight: 500; letter-spacing: -.04em; text-wrap: balance; }
.h3 { margin: 0; font-size: clamp(25px, 2.8vw, 38px); line-height: 1.1; font-weight: 500; letter-spacing: -.03em; text-wrap: balance; }
.h4 { margin: 0; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.display em, .head em, .h3 em, .h4 em { font-size: 1.08em; line-height: .92; }
.eyebrow { margin: 0 0 18px; font: 600 11px/1.3 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.eyebrow b { color: var(--mark); font-weight: 800; }
.byline { margin: 22px 0 0; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); text-wrap: pretty; max-width: 46ch; }
.byline strong, .lede strong { color: var(--ink); font-weight: 600; }
.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); } .small { font-size: 14px; line-height: 1.5; }
.label { font: 700 11px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.label.accent { color: var(--accent); }
.prose { max-width: 66ch; } .prose p { margin-bottom: 1.1em; color: var(--muted); } .prose p strong, .prose b { color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }
.ul { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9c38-6 78 5 118 1s78-7 116 2' fill='none' stroke='%23d8432f' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 100% / 100% .26em; padding-bottom: .12em; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font: 600 14px/1 var(--sans); letter-spacing: .02em; white-space: nowrap; transition: transform .2s, filter .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn .t { font-weight: 500; opacity: .7; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn svg { width: 14px; height: 14px; }
.link { font-weight: 600; color: var(--ink); border-bottom: 1.5px solid var(--line); padding-bottom: 1px; transition: border-color .2s; }
.link:hover { border-color: var(--accent); } .link.arrow::after { content: " →"; }

/* ---------- header ---------- */
/* the top bar: the current's own bar (src/site-shell.css) on every page, the same place, size and type;
   only the colours come from the page (ink for the words, the page's accent for the page you are on) */
.site-header { -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.scrolled { border-color: var(--hair); }
.site-header .wrap { position: relative; width: auto; margin: 0; padding: 34px 4.45% 20px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 12px; font: 600 13px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.site-header .wordmark { font-size: 14px; font-weight: 600; line-height: normal; }
.wordmark .by { font-size: 9.5px; letter-spacing: .2em; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); }
.site-nav a { display: block; font: 500 11px/normal var(--sans); letter-spacing: .11em; text-transform: uppercase; white-space: nowrap; color: color-mix(in srgb, var(--ink) 88%, var(--bg)); transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }
.site-nav .apply { margin: 0; padding: 10px 18px; border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); border-radius: 999px; color: var(--ink); }
.site-nav .apply:hover, .site-nav .apply[aria-current] { color: var(--ink); border-color: var(--accent); }
.menu-btn { display: none; margin-left: auto; padding: 10px 16px; border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); border-radius: 30px; background: var(--bg2); color: var(--ink); font: 12px var(--sans); cursor: pointer; }
.site-header a:focus-visible, .menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
@media (max-width: 1320px) and (min-width: 1061px) { .site-nav { gap: 13px; } .site-header .wordmark { font-size: 12px; } .site-nav a { letter-spacing: .07em; } .site-nav .apply { padding: 9px 14px; } }
@media (max-width: 1060px) {
  .site-header .wrap { padding: 22px 6% 15px; }
  .menu-btn { display: block; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; position: absolute; left: 6%; right: 6%; top: 77px; flex-direction: column; align-items: stretch; gap: 0; padding: 22px; background: color-mix(in srgb, var(--bg) 96%, transparent); border: 1px solid var(--line); border-radius: 8px; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .site-nav a { font-size: 12px; padding: 10px; }
  .site-nav .apply { text-align: center; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(30px, 5vw, 60px); }
.hero .display { max-width: 16ch; } .center .display { margin-inline: auto; }
.hero .byline { max-width: 54ch; }
.status { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 28px 0 0; font: 600 11px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.status i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); vertical-align: 1px; }

/* ---------- pictures ---------- */
.frame { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--bg2); box-shadow: 0 0 0 1px var(--card-line), var(--shadow); }
.frame img, .frame video { width: 100%; height: auto; }
.frame figcaption { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; font: 600 10.5px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--hair); }
.frame.soft { box-shadow: var(--shadow); }
/* a paper print, on any desk */
.print { position: relative; margin: 0; padding: 10px 10px 14px; background: #fbfaf7; color: #2c2f34; box-shadow: 0 1px 2px rgba(40, 30, 20, .25), 0 18px 44px rgba(0, 0, 0, .35); }
.print img, .print video { width: 100%; height: auto; }
.print p { margin: 12px 4px 0; font-size: 14px; line-height: 1.45; color: #4b4e55; } .print p b { color: #2c2f34; }
.print .caption { display: flex; justify-content: space-between; gap: 12px; margin: 10px 4px 0; font: 700 10px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #8a8d94; }
.print.tilt-l { transform: rotate(-1.4deg); } .print.tilt-r { transform: rotate(1.2deg); }
.tape::before { content: ""; position: absolute; left: 50%; top: -11px; width: 92px; height: 24px; margin-left: -46px; background: rgba(214, 205, 170, .78); transform: rotate(-2deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.prints { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: clamp(32px, 5vw, 56px); }
.prints .print:nth-child(odd) { transform: rotate(-1.1deg); } .prints .print:nth-child(even) { transform: rotate(.9deg); }
@media (max-width: 960px) { .prints { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .prints { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding: 12px 4px 18px; margin-inline: -24px; padding-inline: 24px; } .prints .print { flex: 0 0 76%; scroll-snap-align: center; transform: none; } }

/* devices */
.laptop { position: relative; }
.laptop .lid { padding: 10px 10px 6px; border-radius: 14px 14px 4px 4px; background: linear-gradient(180deg, #2a2f38, #15181e); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow); }
.laptop .glass { border-radius: 7px; overflow: hidden; background: #0b0e10; } .laptop .glass img { width: 100%; height: auto; }
.laptop .base { height: 10px; margin: 0 -12px; border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #3a404a, #1a1d23); }
.ipad { padding: 12px; border-radius: 24px; background: linear-gradient(160deg, #2a2f38, #121419); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), inset 0 0 0 2px #05060a, var(--shadow); }
.ipad .glass { border-radius: 12px; overflow: hidden; background: #f3f0e9; } .ipad .glass img { width: 100%; height: auto; }
.window { border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--card-line), var(--shadow); } .window img { width: 100%; height: auto; }

/* ---------- the film ---------- */
.player { position: relative; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--card-line), 0 50px 140px rgba(0, 0, 0, .6); aspect-ratio: 16 / 9; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; }
.player .cover { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; background-size: cover; background-position: center; cursor: pointer; transition: opacity .4s; }
/* the cover reads as a video, the way YouTube and Netflix covers do: a soft play button in the middle that
   doesn't hide the picture, a faint shade along the bottom, and the length in a small badge in the corner */
.player .cover::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .22)); pointer-events: none; }
.player .play { position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center; width: clamp(54px, 5.6vw, 72px); aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; background: rgba(8, 12, 20, .42); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 12px 40px rgba(0, 0, 0, .28); transition: transform .2s ease, background-color .2s ease; }
.player .play span { display: grid; place-items: center; } .player .play span svg { width: clamp(18px, 1.8vw, 24px); height: clamp(18px, 1.8vw, 24px); margin-left: 3px; }
.player .cover:hover .play, .player .cover:focus-visible .play { transform: scale(1.06); background: rgba(8, 12, 20, .62); }
.player .len { position: absolute; right: clamp(10px, 1.4vw, 16px); bottom: clamp(10px, 1.4vw, 16px); z-index: 2; padding: 4px 7px; border-radius: 6px; background: rgba(0, 0, 0, .72); color: #fff; font: 600 12px/1.2 var(--sans); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.player.playing .cover { opacity: 0; pointer-events: none; }
.chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chapters button { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 13px; border-radius: 999px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); font: 600 12px/1 var(--sans); color: var(--muted); transition: color .2s, box-shadow .2s; }
.chapters button:hover, .chapters button.on { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chapters button .t { font-size: 10.5px; letter-spacing: .08em; color: var(--accent); }
.film-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: 13px; color: var(--muted); }
/* the film as a strip of stills */
.filmstrip { display: grid; grid-auto-flow: column; grid-auto-columns: 236px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; margin-inline: -4px; scrollbar-width: none; }
.filmstrip::-webkit-scrollbar { display: none; }
.filmstrip figure { margin: 0; scroll-snap-align: start; cursor: pointer; }
.filmstrip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--card-line), 0 16px 40px rgba(0, 0, 0, .35); transition: transform .25s; }
.filmstrip figure:hover img, .filmstrip figure.on img { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent), 0 16px 40px rgba(0, 0, 0, .35); }
.filmstrip figcaption { display: flex; gap: 10px; align-items: baseline; margin-top: 10px; font: 600 12px/1.4 var(--sans); color: var(--ink); }
.filmstrip figcaption .t { font-size: 10.5px; letter-spacing: .1em; color: var(--accent); }
.filmstrip figcaption span:last-child { color: var(--muted); font-weight: 500; }
.chapter-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.chapter-list li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--hair); cursor: pointer; }
.chapter-list li:hover b, .chapter-list li.on b { color: var(--accent); }
.chapter-list .t { font: 600 12px/1.6 var(--sans); letter-spacing: .08em; color: var(--accent); }
.chapter-list .s b { display: block; font-weight: 600; } .chapter-list .s span { display: block; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .chapter-list { grid-template-columns: 1fr; } }

/* ---------- lists and cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(28px, 5vw, 52px); }
.card { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 32px); border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--card-line), var(--shadow); }
.card .h4 { margin-top: 2px; } .card p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.card li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.card li::before { content: "—"; position: absolute; left: 0; top: 0; color: var(--accent); }
.card .link { margin-top: auto; align-self: flex-start; }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; } }
.numbered { list-style: none; margin: clamp(24px, 4vw, 40px) 0 0; padding: 0; display: grid; }
.numbered li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--hair); }
.numbered .n { font: 600 12px/1.8 var(--sans); letter-spacing: .14em; color: var(--accent); }
.numbered .h4 { margin-bottom: 6px; } .numbered p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.numbered.two-col { grid-template-columns: 1fr 1fr; gap: 0 48px; }
@media (max-width: 820px) { .numbered.two-col { grid-template-columns: 1fr; } }
.defs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px 36px; margin: clamp(28px, 5vw, 48px) 0 0; }
.defs div { padding-top: 14px; border-top: 1px solid var(--hair); }
.defs dt { font: 600 16px/1.3 var(--sans); } .defs dd { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 960px) { .defs { grid-template-columns: 1fr 1fr; } } @media (max-width: 600px) { .defs { grid-template-columns: 1fr; } }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(28px, 5vw, 48px); }
.cols > div { padding-top: 16px; border-top: 1px solid var(--line); } .cols .label { display: block; margin-bottom: 10px; } .cols p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } }

/* the twelve steps */
.steps { list-style: none; margin: clamp(32px, 5vw, 64px) 0 0; padding: 0; display: grid; gap: clamp(40px, 6vw, 84px); }
.step { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.step:nth-child(even) .step-text { order: 2; }
.step .h3 { margin-top: 2px; } .step .byline { font-size: clamp(16px, 1.3vw, 18px); margin-top: 14px; }
.step .more { margin-top: 14px; font-size: 15px; }
@media (max-width: 820px) { .step { grid-template-columns: 1fr; } .step:nth-child(even) .step-text { order: 0; } }

/* stats, for the deck */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: clamp(28px, 5vw, 48px); }
.stat { padding: 22px 22px 20px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--card-line); }
.stat b { display: block; font: 400 clamp(34px, 3.4vw, 48px)/1 var(--serif); font-style: italic; color: var(--soft); letter-spacing: -.02em; }
.stat span { display: block; margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.stat i { display: block; margin-top: 8px; font: 600 10px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-style: normal; }
@media (max-width: 960px) { .stats { grid-template-columns: 1fr 1fr; } } @media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* timeline */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(28px, 4vw, 48px); }
.timeline div { padding-top: 16px; border-top: 2px solid var(--line); }
.timeline div.now { border-top-color: var(--accent); }
.timeline .label { display: block; margin-bottom: 10px; } .timeline .h4 { margin-bottom: 8px; } .timeline p { font-size: 15px; color: var(--muted); line-height: 1.55; }
@media (max-width: 960px) { .timeline { grid-template-columns: 1fr 1fr; } } @media (max-width: 520px) { .timeline { grid-template-columns: 1fr; } }

/* a flow: design → River → edit */
.flow { display: grid; grid-template-columns: 1fr auto 1.4fr auto 1fr; gap: 16px; align-items: stretch; margin-top: clamp(28px, 4vw, 48px); }
.flow .box { padding: 22px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--card-line); }
.flow .box.river { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.flow .box .label { display: block; margin-bottom: 10px; } .flow .box p { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.flow .box ul { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink); display: grid; gap: 4px; }
.flow .arrow { align-self: center; font: 300 34px/1 var(--sans); color: var(--accent); }
@media (max-width: 820px) { .flow { grid-template-columns: 1fr; } .flow .arrow { transform: rotate(90deg); justify-self: center; } }

/* table */
.table { width: 100%; margin-top: clamp(24px, 4vw, 40px); border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; padding: 0 14px 12px 0; font: 700 10.5px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.table td { padding: 14px 14px 14px 0; vertical-align: top; border-bottom: 1px solid var(--hair); color: var(--muted); line-height: 1.5; }
.table td.k { color: var(--ink); font-weight: 600; width: 26%; } .table td.src { color: var(--accent); font-weight: 600; white-space: nowrap; }
.sources { margin-top: 26px; font-size: 13px; color: var(--muted); } .sources ol { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 4px; } .sources a { border-bottom: 1px solid var(--line); }
.sources a:hover { color: var(--ink); }

/* faq */
.faq { margin-top: clamp(24px, 4vw, 40px); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 20px 0; cursor: pointer; font: 600 clamp(17px, 1.6vw, 20px)/1.3 var(--sans); letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); font: 500 19px/1 var(--sans); color: var(--muted); transition: transform .25s; }
.faq details[open] summary::after { content: "–"; transform: rotate(180deg); }
.faq .a { padding: 0 0 24px; max-width: 70ch; color: var(--muted); line-height: 1.6; } .faq .a p { margin-bottom: .9em; } .faq .a b { color: var(--ink); }
.faq .a ul { margin: .4em 0 .9em; padding-left: 1.2em; } .faq .a li { margin: .3em 0; }
.faq-group { margin-top: clamp(40px, 6vw, 72px); } .faq-group:first-of-type { margin-top: 0; }
.faq-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.faq-nav a { padding: 10px 16px; border-radius: 999px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); font: 600 13px/1 var(--sans); } .faq-nav a:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* forms */
.form { display: grid; gap: 16px; } .form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 7px; font: 600 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.form input, .form select, .form textarea { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: 400 15px/1.4 var(--sans); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.form textarea { resize: vertical; min-height: 120px; }
.form .choices { display: flex; flex-wrap: wrap; gap: 8px; } .form .choices label { flex-direction: row; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; }
.form .choices input { width: auto; accent-color: var(--accent); }
.form .fine { font-size: 12.5px; color: var(--muted); line-height: 1.5; } .status-msg { font-size: 14px; color: var(--accent); min-height: 1.4em; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }

/* ---------- paper things, for the sketchbook ---------- */
.sheet { position: relative; padding: clamp(22px, 3vw, 40px); background: #fbfaf6; color: #2c2f34; box-shadow: 0 1px 2px rgba(40, 30, 20, .18), 0 18px 40px rgba(70, 55, 30, .14); }
.sheet.pad-l { padding: clamp(28px, 4vw, 52px); }
.theme-paper .sheet { background: #fff; }
.pencil { font-family: var(--serif); font-style: italic; color: var(--accent); }
.note-red { font: 500 15px/1.4 var(--serif); font-style: italic; color: #d8432f; }
.note-blue { font: 500 15px/1.4 var(--serif); font-style: italic; color: #4fa3e0; }
.polaroid { margin: 0; padding: 10px 10px 22px; background: #fffdfa; box-shadow: 0 10px 28px rgba(67, 75, 51, .18); transform: rotate(-2.4deg); }
.polaroid + .polaroid { transform: rotate(1.8deg); }
.polaroid img { width: 100%; aspect-ratio: 1 / 1.08; object-fit: contain; background: #f3f0e9; }
.polaroid figcaption { margin-top: 14px; text-align: center; font: 700 9.5px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #75806b; }
.sketch-sheet { position: relative; padding: 14px; background: #e7e2d7; box-shadow: 0 16px 40px rgba(68, 61, 33, .14); transform: rotate(-1.2deg); }
.sketch-sheet img { width: 100%; }
.sketch-sheet .tape { position: absolute; left: 44%; top: -10px; width: 96px; height: 26px; background: rgba(196, 191, 152, .55); transform: rotate(3deg); }
/* animators: the animator's desk, something to play with in every part (src/animators.js, src/world-camera.js) */
.hand { margin: 18px 0 0; font: 500 clamp(19px, 1.8vw, 24px)/1.25 var(--serif); color: #d8432f; }
.desk-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.desk-row.flip { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 960px) { .desk-row, .desk-row.flip { grid-template-columns: 1fr; } }
/* a print on the paper, and pictures in a row with a red pencil arrow between */
.frame-card { position: relative; margin: 0; padding: 8px; background: #fff; box-shadow: 0 1px 2px rgba(40, 30, 20, .2), 0 14px 34px rgba(70, 55, 30, .14); }
.frame-card img, .frame-card video { display: block; width: 100%; height: auto; background: #f3f0e9; }
.frame-card figcaption { display: flex; justify-content: space-between; gap: 12px; margin: 10px 2px 2px; font: 700 10px/1.35 var(--sans); letter-spacing: .15em; text-transform: uppercase; color: #8a8d94; }
.frame-card figcaption b { color: #d8432f; font-weight: 700; text-align: right; }
.lineup { display: grid; grid-template-columns: var(--cols, 1fr auto 1fr); gap: clamp(12px, 2vw, 26px); align-items: center; }
.lineup > .to { font: 500 clamp(34px, 3.4vw, 50px)/1 var(--serif); color: #d8432f; text-align: center; }
.desk-hero .lineup { max-width: 1180px; margin-inline: auto; }
@media (max-width: 760px) { .lineup { grid-template-columns: 1fr !important; } .lineup > .to { transform: rotate(90deg); line-height: .6; } }

/* a stage: one frame, and what plays in it */
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #10141a; box-shadow: 0 1px 2px rgba(40, 30, 20, .2), 0 18px 40px rgba(50, 40, 20, .18); isolation: isolate; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.stage.paper { background: #f6f3ec; }
.stage .layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame-stack { position: absolute; inset: 0; transform-origin: 0 0; }
.stage-tag { position: absolute; z-index: 4; left: 12px; top: 12px; padding: 6px 10px 5px; border-radius: 7px; background: rgba(10, 14, 18, .62); color: #fff; font: 700 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.stage-tag.right { left: auto; right: 12px; } .stage-tag.kept { background: #d8432f; } .stage-tag:empty { display: none; }
.big-play { position: absolute; z-index: 5; left: 50%; top: 50%; display: grid; place-items: center; width: 68px; height: 68px; margin: -34px 0 0 -34px; border: 0; border-radius: 50%; background: rgba(12, 14, 18, .5); color: #fff; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); transition: opacity .3s; }
.big-play svg { width: 24px; height: 24px; margin-left: 4px; }
.playing .big-play { opacity: 0; pointer-events: none; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.stage-say { min-height: 1.5em; margin: 12px 2px 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.stage-say b { color: var(--ink); font-weight: 600; }
.stage-say.inline { flex: 1 1 320px; margin: 0 0 0 6px; }
.ctl { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg); cursor: pointer; flex: none; }
.ctl svg { width: 13px; height: 13px; margin-left: 2px; }
.playing .ctl[data-toggle] svg { display: none; } .playing .ctl[data-toggle]::before { content: ""; width: 11px; height: 13px; border-inline: 4px solid currentColor; box-sizing: border-box; }
.seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { padding: 8px 13px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 12.5px/1 var(--sans); cursor: pointer; }
.seg button:hover { color: var(--ink); } .seg button.on { background: var(--ink); color: var(--bg); }
.seg-label { padding: 0 6px 0 10px; font: 700 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ctl-text { padding: 8px 2px; border: 0; background: none; color: var(--ink); font: 600 13px/1 var(--sans); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); text-underline-offset: 4px; cursor: pointer; }
.ctl-text[aria-pressed="true"] { color: var(--accent); }
.btn.small { padding: 10px 18px; font-size: 13.5px; }
.readout { font: 600 12.5px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.chapter [hidden], [data-widget] [hidden] { display: none !important; }
.ctl:focus-visible, .seg button:focus-visible, .ctl-text:focus-visible, .pose:focus-visible, .split:focus-visible, .kcard:focus-visible, .cut-strip button:focus-visible, .gz:focus-visible, .rw-pane canvas:focus-visible, .slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* the key, dropped anywhere and rendered there */
.pose { position: absolute; z-index: 3; cursor: grab; transform-origin: 50% 50%; touch-action: none; }
/* the pencil darkened and haloed, so it reads on the bright ice */
.pose .sketch { display: block; width: 100%; height: auto; filter: brightness(.25) drop-shadow(0 0 1.2px rgba(255, 255, 255, .95)) drop-shadow(0 0 3px rgba(255, 255, 255, .7)); transition: opacity .5s; }
.pose .render { position: absolute; left: 12.99%; top: 7.97%; width: 78.47%; height: auto; opacity: 0; clip-path: inset(0 0 100% 0); transition: opacity .2s, clip-path .9s cubic-bezier(.65, 0, .35, 1); pointer-events: none; }
.rendered .pose .render { opacity: 1; clip-path: inset(0 0 0 0); }
.rendered .pose .sketch { opacity: 0; } .rendered.show-drawing .pose .sketch { opacity: .85; }
.pose::before { content: ""; position: absolute; inset: -4%; border: .75px dashed rgba(255, 255, 255, .9); border-radius: 3px; }
.rendered .pose::before, .rendered .pose i { display: none; }
.pose i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #d8432f; box-shadow: 0 0 0 1px #fff; }
.pose i::after { content: ""; position: absolute; inset: -9px; }
.pose .h-scale { right: -5%; bottom: -6%; cursor: nwse-resize; } .pose .h-turn { left: 50%; top: -12%; margin-left: -4px; cursor: grab; }
.sweep { position: absolute; z-index: 4; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .0) 40%, rgba(160, 230, 200, .35) 50%, transparent 60%) 0 -120% / 100% 220% no-repeat; }
.rendering .sweep { opacity: 1; animation: sweep .9s cubic-bezier(.65, 0, .35, 1); }
@keyframes sweep { to { background-position: 0 120%; } }



/* takes, under an onion skin */
.stage .take, .stage .onion { opacity: 0; transition: opacity .3s; } .stage .take.on { opacity: 1; }
.onion-ctl { display: inline-flex; align-items: center; gap: 10px; font: 700 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.onion-ctl input { width: 120px; accent-color: #d8432f; }

.compare .after { position: absolute; inset: 0; z-index: 1; clip-path: inset(0 0 0 50%); }
.compare { cursor: ew-resize; }
.split { position: absolute; z-index: 3; top: 0; bottom: 0; left: 50%; width: 0; }
.split::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .4); }
.split i { position: absolute; top: 50%; left: -17px; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.split i::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px/1 var(--sans); color: #2c2f34; }
.mark { position: absolute; z-index: 2; border: 2px solid #d8432f; border-radius: 50%; opacity: 0; transform: scale(1.3); transition: opacity .3s, transform .4s; }
.marking .mark { opacity: 1; transform: none; }
.ref-card { position: absolute; z-index: 4; right: 10px; bottom: 10px; width: 22%; margin: 0; padding: 5px 5px 6px; border-radius: 7px; background: #fbfaf6; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.ref-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #eef0f2; border-radius: 4px; }
.ref-card figcaption { margin-top: 5px; font: 500 15px/1 var(--serif); color: #2c2f34; }
.stage img.after { opacity: 0; transition: opacity .6s; } .applied .stage img.after { opacity: 1; }

/* keys to motion, on a pegbar */
.pegbar { position: relative; display: grid; grid-template-columns: .8fr 2fr .8fr; gap: clamp(12px, 2vw, 24px); align-items: start; margin-top: clamp(28px, 4vw, 48px); padding-top: 26px; }
.pegbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-radius: 5px; background: linear-gradient(#cfc9bb, #b9b2a2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.pegbar .key { margin: 0; padding: 6px 6px 8px; background: #fff; box-shadow: 0 1px 2px rgba(40, 30, 20, .2), 0 12px 28px rgba(70, 55, 30, .14); }
.pegbar .key img { display: block; width: 100%; height: auto; }
.pegbar .key figcaption { margin-top: 7px; font: 500 19px/1 var(--serif); color: #d8432f; }
.say-line { display: flex; gap: 12px; align-items: center; margin: 12px 0 0; padding: 11px 14px; border-radius: 12px; background: #1a1d21; color: #e9eef0; font-size: 14.5px; }
.say-line .who { font: 700 9.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #8d99a3; }
.say-line span[data-type] { min-height: 1.4em; }
.scrub { flex: 1 1 200px; accent-color: #d8432f; }
@media (max-width: 860px) { .pegbar { grid-template-columns: 1fr 1fr; } .pegbar .mid { grid-column: 1 / -1; order: -1; } }

/* a breakdown, dropped between the keys */
.stage.keys { --kw: 25%; }
.kcard { position: absolute; z-index: 2; width: var(--kw); margin: 0; padding: 5px 5px 7px; background: #fff; box-shadow: 0 1px 2px rgba(40, 30, 20, .2), 0 12px 26px rgba(70, 55, 30, .16); transition: left .7s cubic-bezier(.65, 0, .35, 1), top .7s cubic-bezier(.65, 0, .35, 1), transform .7s; }
.kcard img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.kcard figcaption { margin-top: 5px; font: 500 16px/1 var(--serif); color: #d8432f; }
.kcard.start { left: 3%; top: 44%; } .kcard.end { left: 72%; top: 44%; }
.kcard.bd { left: 37.5%; top: 5%; z-index: 4; cursor: grab; touch-action: none; transform: rotate(-3deg); }
.kcard.bd img { object-fit: contain; background: #fbfaf7; } .kcard.bd figcaption { color: #2f7fc0; }
.kcard.bd.held { cursor: grabbing; transition: none; box-shadow: 0 24px 50px rgba(40, 30, 20, .3); }
.added .kcard.bd { top: 44%; transform: none; cursor: default; }
.ib { position: absolute; z-index: 1; left: calc(29.5% + var(--i) * 5.4%); top: 50%; width: 13%; margin: 0; padding: 3px; background: #fff; box-shadow: 0 1px 2px rgba(40, 30, 20, .2); transform: rotate(calc((var(--i) - 2.5) * 1.6deg)); transition: left .7s cubic-bezier(.65, 0, .35, 1), top .7s cubic-bezier(.65, 0, .35, 1); }
.ib img { display: block; width: 100%; height: auto; }
.added .ib { top: 73%; } .added .ib[data-side="l"] { left: calc(13% + var(--i) * 4.6%); } .added .ib[data-side="r"] { left: calc(57% + (var(--i) - 3) * 4.6%); }
.tline2 { position: absolute; left: 3%; right: 3%; bottom: 7%; height: 2px; background: rgba(44, 47, 52, .5); }
.tline2 i { position: absolute; top: -8px; width: 2px; height: 18px; background: #d8432f; } .tline2 .a { left: 0; } .tline2 .b { right: 0; }
.tline2 .m { left: 50%; background: #2f7fc0; opacity: 0; transition: opacity .4s .5s; } .added .tline2 .m { opacity: 1; }

/* timing: the cut, and its exposure sheet */
.xsheet-desk { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(18px, 2.4vw, 32px); align-items: start; margin-top: clamp(28px, 4vw, 48px); }
@media (max-width: 960px) { .xsheet-desk { grid-template-columns: 1fr; } }
.cut-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 3px; margin-top: 14px; }
.cut-strip button { position: relative; padding: 0; border: 0; border-radius: 3px; background: #000; cursor: pointer; }
.cut-strip img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; opacity: .3; filter: grayscale(.7); }
.cut-strip .in img { opacity: 1; filter: none; } .cut-strip .in { box-shadow: 0 0 0 2px #d8432f; }
.cut-strip .sel { box-shadow: 0 0 0 2px #d8432f, 0 0 0 5px rgba(216, 67, 47, .3); }
.cut-strip .now { outline: 2px solid #fff; outline-offset: -2px; }
.cut-strip b { position: absolute; right: 3px; bottom: 2px; font: 700 9.5px/1 var(--sans); color: #fff; text-shadow: 0 0 4px #000; }
.xsheet { background: #fffdf8; box-shadow: 0 1px 2px rgba(40, 30, 20, .18), 0 14px 30px rgba(70, 55, 30, .12); font-variant-numeric: tabular-nums; }
.xs-head { display: grid; grid-template-columns: 1fr 1fr; padding: 10px 14px; border-bottom: 2px solid #2c2f34; font: 700 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #2c2f34; }
.xsheet ol { max-height: 420px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.xsheet li { display: grid; grid-template-columns: 1fr 1fr; padding: 3px 14px; border-bottom: 1px solid #e7e1d4; font-size: 13px; color: #8a8d94; }
.xsheet li:nth-child(8n) { border-bottom-color: #c9c2b2; }
.xsheet li b { font: 500 18px/1 var(--serif); color: #2c2f34; }
.xsheet li.hold b { color: transparent; } .xsheet li.hold b::before { content: "|"; color: #b9b2a2; font: 400 14px/1 var(--sans); }
.xsheet li.now { background: #fbe7e3; }
.xs-foot { margin: 0; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; color: #5d6068; border-top: 2px solid #2c2f34; }
.xs-foot b { color: #2c2f34; }

/* the desk's rows swap sides now and then, so the pictures are not all on the right */
.desk-row.swap { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); }
.desk-row.swap > :first-child { order: 2; }
@media (max-width: 960px) { .desk-row.swap { grid-template-columns: 1fr; } .desk-row.swap > :first-child { order: 0; } }

/* your characters where they were made: an iPad drawing app, a 3D app on a laptop, then River's garden */
/* the import: the two characters' own software set back and out of focus either side, River's asset garden in the middle, in focus */
.cast { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(300px, 400px) 72px minmax(0, 1.35fr); align-items: center; gap: 0 6px; }
.cast figure { margin: 0; }
.cast-src > figcaption { margin-top: 12px; font: 500 22px/1 var(--serif); color: #585b61; text-align: center; }
.cast-src .pad, .cast-src .mbp-lid, .cast-src .mbp-base { filter: blur(1.1px) saturate(.8); opacity: .62; transition: opacity .6s, filter .6s; }
.cast.importing .cast-src .pad, .cast.importing .cast-src .mbp-lid, .cast.importing .cast-src .mbp-base { opacity: .8; }
.cast-to { display: grid; justify-items: center; gap: 2px; font: 500 22px/1 var(--serif); color: #d8432f; }
.cast-to svg { width: 72px; height: auto; } .cast-to .flip { transform: scaleX(-1); }
/* the iPad: the real frame over the app, its screen 52, 53 → 1164, 1537 of 1264 x 1588 */
.dev-ipad .pad { position: relative; aspect-ratio: 1264 / 1588; }
.dev-ipad .pad svg { position: absolute; left: 4.03%; top: 3.27%; width: 88.13%; height: 93.58%; }
.dev-ipad .pad img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the laptop: a thin black bezel with its camera, the silver base and its thumb notch */
.mbp-lid { position: relative; padding: 2.1% 2.1% 2.9%; border-radius: 16px 16px 5px 5px; background: #0b0b0c; box-shadow: 0 0 0 1.5px #55585d, 0 0 0 2.5px #1f2023; }
.mbp-lid::before { content: ""; position: absolute; left: 50%; top: .7%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #16181c; box-shadow: inset 0 0 0 1.5px #2a2f36; }
.mbp-lid svg { display: block; width: 100%; height: auto; border-radius: 2px; }
.mbp-base { position: relative; height: 0; padding-bottom: 3.3%; margin: 0 -4.5%; border-radius: 2px 2px 50% 50% / 2px 2px 100% 100%; background: linear-gradient(#eceef0, #d3d5d8 35%, #a9acb0 80%, #85888d); }
.mbp-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 14%; height: 40%; transform: translateX(-50%); border-radius: 0 0 9px 9px; background: linear-gradient(#a9acb0, #c9cbce); }
/* River's asset garden, as the app draws it: portrait tiles, 14 px corners, the character's colour behind it; an empty slot is the app's dashed one */
.cast-river { position: relative; z-index: 2; display: grid; gap: 12px; }
.garden { padding: 20px 18px 18px; border-radius: 16px; background: #0b0e10; box-shadow: 0 2px 4px rgba(20, 15, 10, .2), 0 30px 60px rgba(40, 30, 20, .26); font-family: var(--sans); }
.garden p { margin: 0; }
.g-title { font: 600 18px/1.25 var(--sans); color: #e6eaed; }
.g-group { display: flex; justify-content: space-between; margin-top: 16px !important; font: 600 10px/1 var(--sans); letter-spacing: .03em; text-transform: uppercase; color: #b7c0c7; } .g-group span + span { color: #6f7980; }
.g-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.g-tiles figcaption, .g-bg figcaption { margin-top: 7px; font: 600 10px/1.2 var(--sans); letter-spacing: .02em; text-transform: uppercase; color: #e6eaed; }
.g-slot { aspect-ratio: 90 / 104; border-radius: 14px; }
.g-tile { width: 100%; height: 100%; padding: 6px; border: 1px solid #232b31; border-radius: 14px; background: var(--c); }
.g-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
.g-bg { margin-top: 10px !important; } .g-bg img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid #232b31; border-radius: 12px; }
.g-add { margin-top: 14px !important; padding: 11px 0; border: 1px solid #232b31; border-radius: 10px; background: #12161a; font: 600 10px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #e6eaed; text-align: center; }
.cast-river .stage-say { margin: 0; }
/* before a character is in: its slot empty; it flies in from its own device (src/animators.js cast) */
.cast.live .g-tiles figure:not(.in) .g-slot { border: 1.5px dashed #2c353c; }
.cast.live .g-tiles figure:not(.in) .g-tile, .cast.live .g-tiles figure:not(.in) figcaption { opacity: 0; }
.g-tiles figure.in .g-tile { animation: settle .35s ease-out; }
.g-fly { position: absolute; z-index: 6; pointer-events: none; box-shadow: 0 18px 40px rgba(20, 15, 10, .35); }
@keyframes settle { from { transform: scale(.94); } }
@keyframes land { from { transform: scale(.92); opacity: 0; } }
@media (max-width: 960px) { .cast { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 22px 18px; } .cast-to { display: none; } .cast-river { grid-column: 1 / -1; grid-row: 2; width: min(400px, 100%); justify-self: center; } }

/* the world: the camera's view, River's camera beside it, the frames you take below */
.campg { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.campg-view .rw-pane { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #0d1115; box-shadow: 0 1px 2px rgba(40, 30, 20, .2), 0 22px 50px rgba(50, 40, 20, .2); }
.rw-pane .still, .rw-pane canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rw-pane canvas { opacity: 0; transition: opacity .4s; }
.ready .rw-pane canvas { opacity: 1; }
.rw-pane i { position: absolute; z-index: 2; width: 26px; height: 26px; border: 0 solid #fff; pointer-events: none; }
.rw-pane .c0 { left: 16px; top: 16px; border-top-width: 3px; border-left-width: 3px; } .rw-pane .c1 { right: 16px; top: 16px; border-top-width: 3px; border-right-width: 3px; }
.rw-pane .c2 { left: 16px; bottom: 16px; border-bottom-width: 3px; border-left-width: 3px; } .rw-pane .c3 { right: 16px; bottom: 16px; border-bottom-width: 3px; border-right-width: 3px; }
.rw-pane .stage-tag { left: 50%; top: 16px; transform: translateX(-50%); white-space: nowrap; }
.rw-pane::after { content: ""; position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.flash .rw-pane::after { animation: snap .45s ease-out; }
@keyframes snap { 0% { opacity: .85; } 100% { opacity: 0; } }
.campg-panel { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 14px; background: #0b0e10; color: #e6eaed; }
.campg-panel .label { color: #b7c0c7; } .campg-panel .small { margin: 0; font-size: 13px; line-height: 1.45; color: #8d99a3; }
.campg-panel .gz { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; } .gz .cam, .gz .track { cursor: grab; } .dragging .gz .cam, .dragging .gz .track { cursor: grabbing; }
.campg-panel .small b { color: #e6eaed; }
.campg-panel .btn { align-self: stretch; justify-content: center; background: #2f8f5c; color: #fff; }
.campg-panel .ctl-text { align-self: flex-start; color: #c9d3de; }
.campg-strip { grid-column: 1 / -1; }
.campg-strip [data-strip] { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.campg-strip figure { width: 160px; margin: 0; padding: 5px; background: #fff; box-shadow: 0 1px 2px rgba(40, 30, 20, .2), 0 8px 20px rgba(70, 55, 30, .12); animation: land .45s ease-out; }
.campg-strip img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.campg-strip figcaption { margin-top: 5px; font: 500 16px/1 var(--serif); color: #2c2f34; }
.no-gl .rw-pane canvas, .no-gl [data-clay] { display: none; }
@media (max-width: 960px) { .campg { grid-template-columns: 1fr; } .campg-panel { display: grid; grid-template-columns: 160px 1fr; align-items: center; } .campg-panel .label, .campg-panel .small { grid-column: 1 / -1; } }

/* what you send: the region on the frame, and River's composer */
.ask { display: grid; gap: 14px; }
.ask-frame { border-radius: 10px; }
.region { position: absolute; z-index: 2; border: 1.5px dashed #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .28); }
.composer { padding: 14px; border-radius: 14px; background: #0f1216; color: #c9cfd5; font: 500 13px/1.2 var(--sans); box-shadow: 0 0 0 1px #1d242a; }
.crow { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; } .crow > span { width: 78px; color: #87919a; font-size: 12px; }
.crow b, .crow button { display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border: 1px solid #2a3238; border-radius: 6px; background: none; color: #dfe4e7; font: 600 12px/1 var(--sans); cursor: pointer; }
.crow b { cursor: default; } .crow .on { background: #2f8f5c; border-color: #2f8f5c; color: #fff; }
.chips { flex-wrap: wrap; } .chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 4px; border-radius: 8px; background: #1a1f24; font: 700 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #e6eaed; }
.chip img { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; background: #fff; }
.field { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 10px 10px 14px; border: 1.5px solid #2f8f5c; border-radius: 12px; background: #0b0e10; color: #fff; box-shadow: 0 0 0 4px rgba(47, 143, 92, .15); }
.field span { flex: 1; font-size: 14px; line-height: 1.35; min-height: 1.35em; }
.send { width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: #2f8f5c; color: #fff; font: 700 16px/1 var(--sans); cursor: pointer; }
.sent { margin-top: 12px; } .bubble { margin-left: 18%; padding: 10px 12px; border-radius: 12px; background: #1d5a3c; color: #fff; } .bubble .chips { display: flex; gap: 6px; margin-bottom: 8px; } .bubble p { margin: 0; font-size: 13.5px; line-height: 1.4; }
.coming { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; color: #9fd3b6; font-size: 13px; } .coming i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #2f8f5c; border-top-color: transparent; animation: spin .8s linear infinite; }
.coming.done i { animation: none; border-color: #3fbf7f; background: #3fbf7f; }
.coming a { color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* the expressions dock */
.dock { display: grid; grid-template-columns: .9fr 1.1fr 1fr; gap: 14px; margin-top: clamp(28px, 4vw, 48px); padding: 14px; border-radius: 16px; background: #0b0e10; color: #e6eaed; font-family: var(--sans); }
.dock-col { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: #11161a; box-shadow: inset 0 0 0 1px #1c2329; }
.dl { margin: 0; font: 700 10px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #b7c0c7; } .dl span { color: #3fbf7f; }
.known { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .known figure { margin: 0; } .known img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #2a5a3e; } .known figcaption { margin-top: 5px; font: 700 9px/1 var(--sans); letter-spacing: .1em; color: #87919a; text-transform: uppercase; }
.ctrl { display: grid; gap: 6px; font: 700 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #87919a; } .ctrl span { display: flex; justify-content: space-between; } .ctrl b { color: #e6eaed; font-weight: 600; letter-spacing: 0; }
.ctrl input { width: 100%; accent-color: #3fbf7f; }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid4 button { position: relative; padding: 0; border: 0; border-radius: 10px; background: #1a2026; cursor: pointer; overflow: hidden; box-shadow: inset 0 0 0 1px #232b31; }
.grid4 img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; opacity: .75; transition: opacity .2s; }
.grid4 span { position: absolute; left: 7px; bottom: 6px; font: 700 9px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #fff; text-shadow: 0 0 4px #000; }
.grid4 .on { box-shadow: 0 0 0 2.5px #3fbf7f; } .grid4 .on img { opacity: 1; } .grid4 .on span { color: #9fe0bd; }
/* the dock's render: the pose + the expression picked, then Render; a thin bar runs along the frame while it renders */
.render-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.render-row figure { margin: 0; }
.render-row img { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: #1a2026; box-shadow: inset 0 0 0 1px #232b31; }
.render-row figcaption { margin-top: 6px; font: 600 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #87919a; } .render-row figcaption b { color: #9fe0bd; font-weight: 700; }
.render-row > span { font: 300 22px/1 var(--sans); color: #87919a; padding-bottom: 16px; }
.dock [data-render][disabled] { opacity: .55; cursor: default; }
.dock .shot .render-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .08); opacity: 0; transition: opacity .2s; }
.dock .shot .render-bar i { display: block; width: 0; height: 100%; background: #e2683c; }
.dock.rendering .shot .render-bar { opacity: 1; } .dock.rendering .shot .render-bar i { width: 100%; transition: width 1.1s linear; }
.dock.rendering .shot [data-shot] { filter: saturate(.4) brightness(.85); transition: filter .3s; }
.apply-row { display: grid; grid-template-columns: 56px 14px 56px 1fr; gap: 8px; align-items: center; } .apply-row img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; } .apply-row span { color: #87919a; text-align: center; } .apply-row p { margin: 0; font-size: 12.5px; line-height: 1.35; color: #c9cfd5; } .apply-row b { color: #fff; }
.dock .apply { justify-content: center; background: #e2683c; color: #fff; }
.dock .shot { border-radius: 10px; }
.dock .stage-say { color: #9aa4ad; font-size: 13.5px; margin-top: 0; } .dock .stage-say b { color: #fff; }
@media (max-width: 960px) { .dock { grid-template-columns: 1fr; } }

/* a new keyframe, between the two, and the in-betweens either side of it */
#new-key .stage.keys { aspect-ratio: 21 / 8; margin-top: clamp(28px, 4vw, 48px); --kw: 19%; }
#new-key .kcard.start { left: 1.5%; top: 38%; } #new-key .kcard.end { left: 79.5%; top: 38%; }
#new-key .kcard.bd { left: 40.5%; top: 4%; }
#new-key .added .kcard.bd, .added #new-key .kcard.bd { top: 38%; }
#new-key .ib { width: 7.5%; left: calc(22% + var(--i) * 5.4%); top: 46%; }
#new-key .added .ib[data-side="l"] { left: calc(21.4% + var(--i) * 3.6%); } #new-key .added .ib[data-side="r"] { left: calc(60.6% + (var(--i) - 5) * 3.6%); }
.ib-label { position: absolute; top: 76%; font: 700 9.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #8a8d94; opacity: 0; transition: opacity .4s .5s; }
.ib-label.l { left: 24%; } .ib-label.r { left: 63%; }
.added .ib-label { opacity: 1; }

/* home, under the current: what you bring to the beta, and what you keep */
/* the three prints share one height: each column is as wide as its picture is, relative to the others */
.bring { display: grid; grid-template-columns: .785fr auto 1fr auto 1.78fr; gap: 10px; align-items: center; }
.bring .print { padding: 6px 6px 9px; }
.bring .print img { display: block; width: 100%; height: auto; background: #fff; }
.bring .caption { flex-direction: column; gap: 2px; margin-top: 7px; } .bring .caption span:last-child { font: 500 18px/1.1 var(--serif); letter-spacing: 0; text-transform: none; color: #2c2f34; }
.bring-to { font: 500 28px/1 var(--serif); color: var(--soft); text-align: center; }
@media (max-width: 760px) { .bring { grid-template-columns: .785fr 1fr; } .bring-to { display: none; } .bring .print:last-child { grid-column: 1 / -1; } }

/* ---------- posters, for the cinema ---------- */
.films { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: clamp(28px, 5vw, 48px); }
.film-card .cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border-radius: 12px; overflow: hidden; background: #0b0e10; box-shadow: 0 0 0 1px var(--card-line), var(--shadow); }
.film-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; } .film-card .cover:hover img { transform: scale(1.03); }
.film-card .cover .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: rgba(4, 8, 14, .7); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); } .film-card .cover .play svg { width: 18px; height: 18px; margin-left: 3px; }
.film-card .cover.live { aspect-ratio: 16 / 9; } .film-card .cover iframe { width: 100%; height: 100%; border: 0; }
.film-card .meta { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 16px 2px 0; }
.film-card .film-kind { font-weight: 400; color: var(--muted); }
.film-card .film-note { margin: 6px 0 0; font-size: 15px; line-height: 1.4; color: var(--muted); }
.film-card .meta .label { display: block; margin-bottom: 6px; color: var(--accent); }
@media (max-width: 760px) { .films { grid-template-columns: 1fr; } }

/* ---------- the night card, with the falcon ---------- */
.night { position: relative; padding: clamp(80px, 12vw, 160px) 0; background: radial-gradient(70% 62% at 50% 46%, #0c1626, #04070d 72%); color: #f4f7fb; overflow: hidden; }
.night .eyebrow { color: #bcd6f2; } .night .display, .night .head { color: #f4f7fb; } .night em { color: #bcd6f2; }
.night .byline, .night p { color: #c9d3de; }
.night .falcon { position: absolute; right: -6%; bottom: -14%; width: min(640px, 62%); opacity: .55; pointer-events: none; -webkit-mask-image: radial-gradient(60% 60% at 60% 50%, #000 40%, transparent 100%); mask-image: radial-gradient(60% 60% at 60% 50%, #000 40%, transparent 100%); }
.night .wrap { position: relative; z-index: 2; }
.night .btn { background: #f5f7fa; color: #04070d; } .night .btn.ghost { background: transparent; color: #f4f7fb; box-shadow: inset 0 0 0 1.5px rgba(244, 247, 251, .35); }
.night .url { margin-top: 26px; font: 600 14px/1 var(--sans); letter-spacing: .08em; color: #bcd6f2; }
.night .back { margin-top: 18px; font: 600 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; } .night .back a { color: #8fa3bb; border-bottom: 1px solid rgba(143, 163, 187, .35); padding-bottom: 3px; } .night .back a:hover { color: #f4f7fb; }

/* ---------- footer ---------- */
.site-footer { padding: clamp(40px, 6vw, 72px) 0 40px; border-top: 1px solid var(--hair); }
.site-footer .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .tag { margin-top: 16px; max-width: 30ch; font-size: 14px; color: var(--muted); line-height: 1.5; }
.site-footer .label { display: block; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; } .site-footer li a:hover { color: var(--accent); }
.site-footer .bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--hair); font-size: 12.5px; color: var(--muted); }
@media (max-width: 820px) { .site-footer .top { grid-template-columns: 1fr 1fr; } }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; } .rv.d1 { transition-delay: .08s; } .rv.d2 { transition-delay: .16s; } .rv.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- 404 ---------- */
.lost { min-height: 60vh; display: grid; place-items: center; }

/* the ways of working (animators): text beside its frame, alternating sides */
.roles { margin-top: clamp(36px, 5vw, 64px); }
.role + .role { margin-top: clamp(56px, 8vw, 110px); }
.role.flip > :first-child { order: 2; }
@media (max-width: 960px) { .role.flip > :first-child { order: 0; } }
.ticks { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.ticks li::before { content: "—"; position: absolute; left: 0; top: 0; color: var(--accent); }
.ticks li b { color: var(--ink); font-weight: 600; }

/* the two ways a studio works with RoohLabs */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: clamp(32px, 5vw, 56px); }
.paths .card { gap: 16px; }
.paths .card .h3 { margin: 0; }
.paths .card .pic { margin: -4px -4px 4px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.paths .card .pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.paths .card .actions { margin-top: auto; padding-top: 8px; }
@media (max-width: 960px) { .paths { grid-template-columns: 1fr; } }

/* a wide table keeps its columns on a phone and scrolls sideways */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { min-width: 640px; }
@media (max-width: 640px) { .table { font-size: 13.5px; } .table td.k { width: auto; } }

/* product: each step plays its moment in the demo video above */
.play-at { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 7px 14px 7px 10px; border: 0; border-radius: 999px; background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: 600 12px/1 var(--sans); letter-spacing: .02em; cursor: pointer; transition: color .2s, box-shadow .2s; }
.play-at svg { width: 11px; height: 11px; color: var(--accent); }
.play-at span { color: var(--ink); }
.play-at:hover, .play-at.on { color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.play-at:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* investors: the questions a seed investor asks, answered in turn, with the list of them kept in view */
.qa { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.qa-nav { position: sticky; top: 108px; display: grid; }
.qa-nav a { display: grid; grid-template-columns: 34px 1fr; padding: 8px 0; border-top: 1px solid var(--hair); font-size: 13.5px; line-height: 1.35; color: var(--muted); text-decoration: none; transition: color .2s; }
.qa-nav a b { font: 600 10.5px/1.9 var(--sans); letter-spacing: .12em; color: var(--accent); }
.qa-nav a:hover, .qa-nav a.on { color: var(--ink); }
.qa-item { padding: clamp(40px, 5vw, 72px) 0; border-top: 1px solid var(--hair); scroll-margin-top: 100px; }
.qa-item:first-child { padding-top: 0; border-top: 0; }
.qa-item .q { margin: 0 0 22px; max-width: 24ch; font: 400 clamp(30px, 3.3vw, 46px)/1.08 var(--serif); font-style: italic; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.qa-item .prose { max-width: 70ch; }
.qa-item .ticks { margin-top: 18px; }
.qa-item .numbered li:first-child { border-top: 0; }
.src { display: inline-block; margin-left: 4px; font-size: 12.5px; color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.src:hover { border-bottom-color: var(--accent); }
/* the letter: letters 0.5px further apart; the gap between words stays Manrope's own (word-spacing takes back the 0.5px the space gets too) */
.letter p { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; }
.letter p:not(.sign) { letter-spacing: 0.5px; word-spacing: -0.5px; }
.market .card { gap: 10px; } .market .big { font: 500 clamp(34px, 3.4vw, 48px)/1 var(--serif); color: var(--accent); white-space: nowrap; } .market .card p { font-size: 14.5px; }
.letter .sign { margin-top: 1.6em; font: italic 400 22px/1 var(--serif); color: var(--soft); }
@media (max-width: 960px) { .qa { grid-template-columns: 1fr; } .qa-nav { display: none; } }

/* a word ringed by hand, in the ledger's blue pencil */
.circled { position: relative; white-space: nowrap; }
.circled::after { content: ""; position: absolute; inset: 6% -8% -8% -6%; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80' preserveAspectRatio='none'%3E%3Cpath d='M38 10 C 90 0, 178 6, 192 34 C 202 60, 120 76, 64 72 C 18 69, 2 50, 10 30 C 18 12, 60 6, 104 7' fill='none' stroke='%232a66b3' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }

/* the pencil man (src/guide.js): the demo video's dot-and-line figure beside each toy, showing what to do; he goes once it is touched */
.guide { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: flex-end; gap: 2px; pointer-events: none; transition: opacity .45s; }
.guide[data-face="-1"] { flex-direction: row; justify-content: flex-start; }
.guide canvas { flex: none; width: var(--gw, 88px); height: var(--gh, 104px); }
.guide span { padding-bottom: 12px; font: 500 clamp(18px, 1.5vw, 21px)/1.05 var(--serif); color: #d8432f; max-width: 15ch; }
.guide[data-ink="light"] span { color: #fff; text-shadow: 0 1px 5px rgba(0, 0, 0, .6); }
.guide.gone { opacity: 0; }
/* in the pictures: placed on the picture, scaled with it */
.g-key, .g-split, .g-newkey { position: absolute; z-index: 4; --gh: clamp(64px, 8vw, 112px); --gw: calc(var(--gh) * .95); }
.g-key { left: 43%; top: 36%; }
.g-split { left: 12%; bottom: 3%; }
.g-newkey { left: 57%; top: 6%; }
/* under the controls */
@media (max-width: 960px) { .g-cam { grid-column: 1 / -1; } }
@media (max-width: 640px) { .guide span { font-size: 17px; } .g-takes { margin-left: 18%; } .g-newkey { top: 2%; align-items: flex-start; } .g-newkey span { padding: 4px 0 0; font-size: 15px; } .campg-panel { display: flex; } }
.guide i { font-style: normal; } .guide .short { display: none; }
@media (max-width: 640px) { .guide .long { display: none; } .guide .short { display: inline; } }
.g-cam { margin-top: auto; --gh: 84px; --gw: 76px; }
.g-btn { display: grid; justify-items: start; gap: 2px; }
.g-cast { margin-left: -4px; }
.g-ask { margin: 6px -6px -6px auto; width: max-content; }
.g-takes { margin: 4px 0 -10px 27%; }
.g-faces { grid-column: 1 / -1; justify-self: center; margin: 4px 0 -10px 4%; }
.g-scrub { margin: 2px 0 -6px 3%; }
.g-cut { margin: 6px 0 -6px 2%; }

/* ---------- River Identity, played on its own (src/identity-card.js): his design, the shot, the four fixes ---------- */
.idcard { position: relative; padding: clamp(16px, 2.6vw, 30px) clamp(14px, 2.6vw, 30px) clamp(14px, 2vw, 22px); border-radius: 20px; background: radial-gradient(90% 80% at 58% 40%, #121c2a, #06090e); color: #e6eaed; box-shadow: 0 2px 4px rgba(20, 15, 10, .2), 0 30px 70px rgba(20, 20, 30, .32); }
.idc-stage { position: relative; display: grid; grid-template-columns: minmax(0, .42fr) minmax(0, 1fr); gap: clamp(18px, 4vw, 48px); align-items: center; }
.idc-ref, .idc-shot { position: relative; margin: 0; }
.idc-ref { aspect-ratio: 760 / 1400; }
.idc-ref img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .55)); }
.idc-shot { aspect-ratio: 1; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(146, 186, 232, .18), 0 24px 60px rgba(0, 0, 0, .5); }
.idc-zoom { position: absolute; inset: 0; transform-origin: 0 0; }
.idc-zoom img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.idc-fix, .idc-erase, .idc-whole { opacity: 0; }
.idc-fix { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.idc-ref figcaption, .idc-shot figcaption { position: absolute; left: 10px; top: 10px; z-index: 3; padding: 5px 9px; border-radius: 999px; background: rgba(5, 9, 15, .72); font: 700 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #cfe2f7; }
.idc-shot figcaption { left: auto; right: 10px; }
.idc-marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.idc-marks circle { fill: none; stroke: #ff6a55; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--ring, 0)); transform-box: fill-box; transform-origin: center; transform: rotate(-80deg); }
.idc-marks text { fill: #ff7a66; font: 700 21px/1 var(--serif); opacity: var(--ring, 0); paint-order: stroke; stroke: rgba(5, 9, 15, .7); stroke-width: 3px; }
.idc-marks .ln { fill: none; stroke: #ff8a78; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--line, 0)); opacity: .85; }
.idc-marks .mk g { transition: opacity .25s ease; }
.idc-marks .mk.lit .on-ref circle { stroke-width: 3.4; filter: drop-shadow(0 0 7px rgba(255, 106, 85, .75)); }
.idc-say { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-height: 30px; margin: clamp(14px, 2vw, 20px) 0 0; opacity: 0; }
.idc-say b { font: 700 clamp(22px, 2.4vw, 28px)/1 var(--serif); color: #ff7a66; }
.idc-say em { font: 700 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #9fe8bf; white-space: nowrap; }
.idc-say em:empty { display: none; }
.idc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.idc-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.idc-steps button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border: 0; border-radius: 999px; background: #141b24; box-shadow: inset 0 0 0 1px #243040; color: #b9c6d3; font: 600 12.5px/1 var(--sans); cursor: pointer; transition: background .25s, color .25s, box-shadow .25s; }
.idc-steps button b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #233042; color: #ffb3a8; font: 700 11px/1 var(--sans); }
.idc-steps button.on { background: #2a1714; color: #fff; box-shadow: inset 0 0 0 1.5px #ff6a55; } .idc-steps button.on b { background: #ff6a55; color: #160a08; }
.idc-steps button.done b { background: #1f4a35; color: #b9f3d2; } .idc-steps button.done b::after { content: "✓"; } .idc-steps button.done b { font-size: 0; } .idc-steps button.done b::after { font-size: 11px; }
.idc-again { padding: 8px 2px; border: 0; background: none; color: #c9d3de; font: 600 13px/1 var(--sans); text-decoration: underline; text-decoration-color: rgba(255, 106, 85, .55); text-underline-offset: 4px; cursor: pointer; }
.idc-steps button:focus-visible, .idc-again:focus-visible { outline: 2px solid #ff6a55; outline-offset: 2px; }
@media (max-width: 560px) { .idc-stage { grid-template-columns: minmax(0, .38fr) minmax(0, 1fr); gap: 16px; } .idc-steps button { padding: 6px 10px 6px 6px; font-size: 12px; } .idc-ref figcaption, .idc-shot figcaption { font-size: 8.5px; } }

/* ---------- the current, on a phone: the story as cards (scripts/pages/home.mjs); River Identity on its own on bigger screens ---------- */
.m-story { display: none; }
@media (max-width: 760px) {
  .m-story { display: block; padding: 64px 0 24px; }
  .id-feature { display: none; }
  .m-card, .m-step { margin: 0 0 64px; }
  .m-k { margin: 0 0 12px; font: 700 11px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #8fb6de; }
  .m-k b { color: #f4f7fb; }
  .m-h { margin: 0 0 14px; font: 500 clamp(30px, 8.6vw, 38px)/1.04 var(--sans); letter-spacing: -.025em; color: #f4f7fb; }
  .m-h em { display: block; }
  .m-p { margin: 0 0 20px; font-size: 16px; line-height: 1.55; color: #aab6c3; }
  .m-pic { margin: 0 0 12px; border-radius: 14px; overflow: hidden; background: #070b11; box-shadow: 0 0 0 1px rgba(146, 186, 232, .16), 0 18px 40px rgba(0, 0, 0, .45); }
  .m-pic img { display: block; width: 100%; height: auto; }
  .m-cue { margin: 8px 0 64px; font: 500 clamp(28px, 8vw, 34px)/1.1 var(--sans); letter-spacing: -.02em; text-align: center; color: #f4f7fb; }
  .m-cue em { display: block; }
  .m-steps { margin: 0; padding: 0; list-style: none; }
  /* identity, the one RoohLabs built: its own card, lit in the red pencil */
  .m-id { position: relative; margin-inline: -10px; padding: 22px 10px 14px; border-radius: 24px; background: radial-gradient(120% 70% at 50% 0%, rgba(255, 106, 85, .14), transparent 60%), #070a10; box-shadow: 0 0 0 1px rgba(255, 106, 85, .4), 0 30px 70px rgba(0, 0, 0, .5); }
  .m-id .m-k, .m-id .m-h, .m-id .m-p, .m-id .m-badge { margin-inline: 6px; }
  .m-badge { display: inline-block; margin-bottom: 14px; padding: 6px 11px; border-radius: 999px; background: #ff6a55; color: #160a08; font: 800 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
  .m-id .idcard { box-shadow: none; padding-inline: 12px; }
  .m-end { margin: 24px 0 40px; text-align: center; } .m-end .actions { justify-content: center; }
}

/* River Continuity (For animators #continuity): the five moves as they came, joined by hand, and the one take; a bar under each
   joined film shows its moves (the joins in red) and where it is playing */
.seq-note { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.seq-step { margin-top: clamp(40px, 5vw, 68px); }
.seq-head { display: grid; gap: 6px; margin-bottom: 16px; }
.seq-head .label { color: var(--accent); }
.seq-head p { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.5; color: var(--muted); }
.seq-moves { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
.seq-moves .frame-card { padding: 6px; }
.seq-moves video { aspect-ratio: 16 / 9; object-fit: contain; background: #0d1014; }
.seq-moves .frame-card figcaption { margin-top: 8px; font-size: 9.5px; letter-spacing: .1em; }
.seq-bar { position: relative; display: flex; height: 26px; margin-top: 8px; background: #f3f0e9; font: 500 10.5px/26px var(--mono, ui-monospace, monospace); letter-spacing: .04em; text-transform: uppercase; color: #8a8d94; }
.seq-bar i { flex: var(--f) 0 0; min-width: 0; overflow: hidden; white-space: nowrap; text-align: center; font-style: normal; border-left: 2px solid #d8432f; transition: background-color .15s, color .15s; }
.seq-bar i:first-child { border-left: 0; }
.seq-bar i.on { background: color-mix(in srgb, #d8432f 13%, transparent); color: #141518; }
.seq-bar.one i.on { background: color-mix(in srgb, #141518 8%, transparent); }
.seq-bar .ph { position: absolute; top: -4px; bottom: -4px; left: 0; width: 2px; margin-left: -1px; background: #141518; pointer-events: none; }
#continuity .cols { margin-top: clamp(36px, 4.5vw, 56px); }
@media (max-width: 900px) { .seq-moves { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .seq-moves { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seq-moves > :last-child { grid-column: span 2; } }

/* home, under the current: the way on for studios and investors, quiet, under the studio's own buttons */
.ways-on { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 24px 0 0; }

/* the demo film playing silent (started for the reader): its sound, one press away */
.player .sound-on { position: absolute; left: 50%; bottom: clamp(14px, 3vw, 28px); z-index: 3; display: none; align-items: center; gap: 8px; translate: -50% 0; padding: 10px 16px; border: 0; border-radius: 999px; background: rgba(8, 12, 20, .72); color: #fff; font: 600 14px/1 var(--sans); cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
.player .sound-on svg { width: 18px; height: 18px; }
.player.silent .sound-on { display: inline-flex; }
