/* The Lumio film (docs/motion-design.md §6.9): the stage reel.js draws into, on /reel and in the home page's film
   section. One deterministic clock moves everything (reel.js render(t)), so nothing in the stage has a CSS
   transition or animation: no @keyframes in here. Sizes are in the film's unit, --u = min(width, height) / 1280 of
   the stage, which reel.js keeps. The stage's colors per data-theme ("auto" follows prefers-color-scheme). */
.reel-stage {
  --u: .5px;
  --r-bg: #070708;
  --r-text: #ededee;
  --r-dim: #a3a3aa;
  --r-label: #84848c;
  --r-accent: #86b7ff;
  --r-accent2: #c9a8ff;
  --r-cyan: #67e8f9;
  --r-box: #18181b;
  --r-box-line: #36363b;
  --r-chip: #18181b;
  --r-line: #ffffff14;
  --r-primary: #ededee;
  --r-on-primary: #0b0b0c;
  --r-box-shadow: 0 calc(6 * var(--u)) calc(16 * var(--u)) calc(-4 * var(--u)) #000a;
  --r-pill-text: #b9d3ff;
  --r-band-fill: #86b7ff4d;  /* the accent at 30% */
  --r-streak: #ffffff26;
  --r-hair: #ffffff47;
  --r-chip-line: #ffffff14;
  --r-card-shadow: 0 calc(18 * var(--u)) calc(40 * var(--u)) calc(-18 * var(--u)) #000c, 0 0 0 calc(1 * var(--u)) #ffffff12;
  position: relative; overflow: hidden; isolation: isolate; contain: layout paint;
  background: var(--r-bg); color: var(--r-text);
  font-family: 'Geist', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision;
}
.reel-stage[data-theme="light"] {
  --r-bg: #f3f3f5;
  --r-text: #18181b;
  --r-dim: #52525b;
  --r-label: #64646c;
  --r-accent: #2563eb;
  --r-accent2: #7c3aed;
  --r-cyan: #06b6d4;
  --r-box: #ffffff;
  --r-box-line: #00000024;
  --r-chip: #e8e8eb;
  --r-line: #00000014;
  --r-primary: #18181b;
  --r-on-primary: #fafafa;
  --r-box-shadow: 0 calc(6 * var(--u)) calc(16 * var(--u)) calc(-4 * var(--u)) #0000002e;
  --r-pill-text: #1d4ed8;
  --r-band-fill: #a8c1f7d9;  /* the accent mixed 40% with white, at 85% */
  --r-streak: #ffffff38;
  --r-hair: #ffffff8c;
  --r-chip-line: transparent;
  --r-card-shadow: 0 calc(18 * var(--u)) calc(40 * var(--u)) calc(-20 * var(--u)) #0000003d, 0 0 0 calc(1 * var(--u)) #0000000f;
}

.reel-stage *, .reel-stage *::before, .reel-stage *::after { box-sizing: border-box; transition: none !important; animation: none !important; }
.reel-world, .reel-wipe, .reel-end, .reel-grain { position: absolute; inset: 0; pointer-events: none; }
.reel-world { overflow: hidden; }
.reel-fx { position: absolute; width: 0; height: 0; overflow: hidden; }
.reel-measure { position: absolute; left: -99999px; top: 0; white-space: pre; visibility: hidden; font-kerning: normal; }
/* Every piece is placed by its transform from the top left of its layer, and hidden until its moment. */
.reel-p { position: absolute; left: 0; top: 0; transform-origin: 0 0; opacity: 0; white-space: pre; }

/* ---------------------------------------------------------------- the camera: the 1280u world, centered on the stage */
.reel-cam { position: absolute; left: 50%; top: 50%; width: calc(1280 * var(--u)); height: calc(1280 * var(--u)); margin: calc(-640 * var(--u)) 0 0 calc(-640 * var(--u)); transform-origin: 50% 50%; }

/* 1 · The composer: Lumio's pill message box. */
.reel-box { border-radius: calc(38 * var(--u)); background: var(--r-box); box-shadow: inset 0 0 0 calc(1 * var(--u)) var(--r-box-line), var(--r-box-shadow); }
.reel-plus, .reel-mic, .reel-send { display: grid; place-items: center; border-radius: 50%; }
.reel-plus { color: var(--r-dim); }
.reel-mic { color: var(--r-dim); }
.reel-send { background: var(--r-primary); color: var(--r-on-primary); }
.reel-plus svg, .reel-mic svg, .reel-send svg, .reel-auto svg { display: block; width: 100%; height: 100%; }
.reel-ph { color: var(--r-label); line-height: 1; }
.reel-typed { color: var(--r-text); line-height: 1; }
.reel-auto { display: flex; align-items: center; color: var(--r-dim); font-weight: 500; line-height: 1; }
.reel-line { border-radius: 999px; background-color: var(--r-text); background-repeat: no-repeat; }
.reel-dot { border-radius: 50%; background: var(--r-accent); }
.reel-caret { background: var(--r-text); border-radius: calc(1.5 * var(--u)); }

/* 2 · The band and the brand silk (it stands in for the reference's photo; the same in both themes). */
.reel-silk {
  position: absolute; left: 50%; top: 50%; opacity: 0; overflow: hidden;
  background:
    radial-gradient(38% 38% at 22% 28%, #86b7ff, #86b7ff00),
    radial-gradient(30% 30% at 62% 60%, #eef3ff, #eef3ff00),
    radial-gradient(34% 34% at 28% 72%, #000000, #00000000),
    radial-gradient(28% 28% at 82% 22%, #c9a8ff, #c9a8ff00),
    radial-gradient(22% 22% at 8% 18%, #2aa3c8, #2aa3c800),
    #0b1530;
  background-size: 160% 100%;
}
.reel-silk-pale { position: absolute; inset: 0; background: #ffffff; opacity: 0; }
.reel-ask { position: absolute; left: 50%; top: 50%; color: #ffffff; line-height: 1; white-space: pre; opacity: 0; }
.reel-banner { position: absolute; left: 0; right: 0; top: 50%; opacity: 0; }
.reel-banner-fill { position: absolute; inset: 0; background: var(--r-band-fill); }
.reel-streak { position: absolute; top: -20%; bottom: -20%; width: calc(30 * var(--u)); background: linear-gradient(90deg, transparent, var(--r-streak), transparent); transform: skewX(-30deg); }
.reel-streak:nth-of-type(2) { left: 75%; }
.reel-streak:nth-of-type(3) { left: 88%; }
.reel-banner-words { position: absolute; left: 0; top: 0; height: 100%; color: #ffffff; line-height: 1; letter-spacing: -.01em; }
.reel-bw { position: absolute; top: 50%; white-space: pre; }
.reel-banner-caret { position: absolute; top: 50%; width: calc(3 * var(--u)); background: #ffffff; border-radius: calc(1.5 * var(--u)); }
.reel-banner-box { position: absolute; left: 50%; top: 50%; border-style: solid; border-color: var(--r-hair); opacity: 0; }

/* 3–6 · "Ask Lumio" into the first word; the sentence, the style chip and its slot; the eating line and the pill. */
.reel-word, .reel-q, .reel-ch { color: var(--r-text); line-height: 1; }
.reel-make {
  line-height: 1; color: transparent; -webkit-background-clip: text; background-clip: text;
  background:
    radial-gradient(38% 60% at 22% 28%, #86b7ff, #86b7ff00),
    radial-gradient(30% 50% at 62% 60%, #eef3ff, #eef3ff00),
    radial-gradient(34% 60% at 28% 72%, #000000, #00000000),
    radial-gradient(28% 50% at 82% 22%, #c9a8ff, #c9a8ff00),
    #0b1530;
}
.reel-chip { border-radius: calc(12 * var(--u)); background: var(--r-chip); box-shadow: inset 0 0 0 calc(1 * var(--u)) var(--r-chip-line); }
.reel-item { display: flex; align-items: center; color: var(--r-dim); line-height: 1; }
.reel-swatch { flex: none; overflow: hidden; border-radius: calc(15 * var(--u)); }
.reel-swatch svg { display: block; width: 100%; height: 100%; }
.reel-eat { border-radius: 999px; background: var(--r-accent); }
.reel-pill { display: flex; align-items: center; overflow: hidden; border-radius: calc(14 * var(--u)); border-style: solid; border-color: var(--r-accent); }
.reel-pill-fill { position: absolute; inset: 0; background: var(--r-accent); }
.reel-spin { position: relative; flex: none; color: var(--r-dim); }
.reel-spin svg { display: block; width: 100%; height: 100%; }
.reel-pill-label { position: relative; color: var(--r-pill-text); line-height: 1; white-space: pre; }

/* 7 · The pictures: Lumio's own illustrations, through the page's watercolor filter, labeled with Lumio's tiers. */
.reel-card { border-radius: calc(22 * var(--u)); }
.reel-card-pic { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; box-shadow: var(--r-card-shadow); background: var(--r-box); }
.reel-card-pic svg { display: block; width: 100%; height: 100%; }
.reel-card-wash { position: absolute; inset: 0; border-radius: inherit; }
.reel-card-label { position: absolute; left: 0; bottom: 100%; display: flex; align-items: center; color: var(--r-dim); font-weight: 500; line-height: 1; white-space: pre; }
.reel-card-label svg { display: block; flex: none; }
.reel-card-play { position: absolute; display: grid; place-items: center; border-radius: 50%; background: #000000a6; color: #ffffff; }
.reel-card-len { position: absolute; border-radius: calc(8 * var(--u)); background: #000000a6; color: #ffffff; font-family: 'Geist Mono', ui-monospace, Menlo, monospace; font-weight: 500; line-height: 1; }

/* 8 · The wipe and the end card (always dark). */
.reel-wipe { opacity: 0; }
.reel-end { --r-text: #ededee; --r-label: #84848c; background: #070708; opacity: 0; }
.reel-end-words { color: #ededee; font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.reel-end-icon { border-radius: 50%; }
/* The bloom: the accent from 40% to nothing at 2.2× the icon's diameter, and a 6% halo out to 6× (the box is 6×). */
.reel-end-bloom { position: absolute; left: 50%; top: 50%; border-radius: 50%; background: radial-gradient(circle closest-side, #86b7ff66, #86b7ff00 36.7%), radial-gradient(circle closest-side, #86b7ff0f, #86b7ff00); }
.reel-end-disc {
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(180deg, #1d1e1f, #111212 60%, #0b0c0c); box-shadow: inset 0 0 0 calc(1 * var(--u)) #ffffff1f;
}
.reel-end-mark { position: absolute; inset: 18%; }
.reel-end-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.reel-end-url { color: var(--r-label); font-family: 'Geist Mono', ui-monospace, Menlo, monospace; line-height: 1; }

/* The film grain (still: nothing loops in the stage), not in recordings. */
.reel-grain {
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Less Transparency: the band and the pieces are solid. More Contrast: hairlines on the chips and the pill, no bloom. */
@media (prefers-reduced-transparency: reduce) {
  .reel-banner-fill { background: var(--r-box); }
}
@media (prefers-contrast: more) {
  .reel-chip { box-shadow: inset 0 0 0 calc(1 * var(--u)) var(--r-dim); }
  .reel-end-bloom { display: none; }
}

/* ---------------------------------------------------------------- /reel (reel.html): the stage letterboxed to its ratio */
.reel-page { margin: 0; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; background: #000; overflow: hidden; }
.reel-page .art-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.reel-main { display: contents; }
.reel-page .reel-stage { width: min(100vw, calc(100vh * var(--ratio, 1))); width: min(100vw, calc(100svh * var(--ratio, 1))); aspect-ratio: var(--ratio, 1); }
.reel-page[data-ratio="9x16"] { --ratio: .5625; }
.reel-page[data-ratio="16x9"] { --ratio: 1.7778; }
.reel-page .reel-ctl { position: fixed; right: 14px; bottom: 14px; }
.reel-page[data-record] .reel-ctl { display: none; }
.reel-noscript { position: absolute; inset: 0; display: grid; place-items: center; background: #070708; color: #ededee; font: 500 clamp(28px, 7vw, 64px)/1 'Geist', ui-sans-serif, -apple-system, sans-serif; letter-spacing: -.02em; }

/* The controls (Pause or Play, Replay; "Play the storyboard" with less motion), here and on the home page. */
.reel-ctl { display: flex; gap: 8px; z-index: 2; }
.reel-ctl button {
  height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #161619f5; color: #ededee;
  font: 500 13.5px/1 'Geist', ui-sans-serif, -apple-system, sans-serif; cursor: pointer; box-shadow: 0 8px 24px -10px #000c;
}
.reel-ctl button:hover { background: #222226f5; }
.reel-ctl button:focus-visible { outline: 2px solid #86b7ff; outline-offset: 2px; }
.reel-ctl button[hidden] { display: none; }
