/* Relief design system: the global standard for every screen.
   Tokens first, then base type, layout and components. Page layouts live in style.css
   and only compose what is defined here. Guide: UI.md. */

/* ---------- tokens ---------- */
:root {
  /* brand */
  --accent: #ff4201;                 /* the red-orange at the start of the logo route */
  --accent-deep: #e23800;            /* hover and pressed */
  --route: linear-gradient(90deg, #da2a01, #fa6f06 50%, #fba903);

  /* type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

  /* space */
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(80px, 11vw, 152px);
  --nav-h: 64px;

  /* shape */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* depth */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 28px 56px -28px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 20px 50px -24px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.05);

  /* motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fast: 0.18s;
  --slow: 0.6s;
}

/* Surfaces. Components only read these, so they work on light and dark alike.
   Put .dark on any section (or .light inside a dark one) to switch. */
:root, .light {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --fg: #1d1d1f;
  --fg-soft: #6e6e73;
  --fg-faint: #a1a1a6;
  --hairline: rgba(0, 0, 0, 0.09);
  --control: rgba(0, 0, 0, 0.05);
  --control-hover: rgba(0, 0, 0, 0.09);
  --solid: #1d1d1f;
  --on-solid: #ffffff;
  --glass: rgba(245, 245, 247, 0.8);
}
.dark {
  --bg: #000000;
  --surface: #141416;
  --fg: #f5f5f7;
  --fg-soft: #a1a1a6;
  --fg-faint: #6e6e73;
  --hairline: rgba(255, 255, 255, 0.14);
  --control: rgba(255, 255, 255, 0.1);
  --control-hover: rgba(255, 255, 255, 0.17);
  --solid: #ffffff;
  --on-solid: #000000;
  --glass: rgba(0, 0, 0, 0.86);
}
.light, .dark { background: var(--bg); color: var(--fg); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* The scrollbar's space is kept even while the splash locks scrolling, so nothing shifts sideways when it appears. */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

/* ---------- type ---------- */
.display { font-size: clamp(44px, 7.4vw, 104px); font-weight: 600; line-height: 1; letter-spacing: -0.045em; }
.h1 { font-size: clamp(36px, 5.2vw, 68px); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; }
.h2 { font-size: clamp(30px, 3.8vw, 48px); font-weight: 600; line-height: 1.07; letter-spacing: -0.035em; }
.h3 { font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.lead { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.45; color: var(--fg-soft); }
.small { font-size: 14px; line-height: 1.45; }
.micro { font-size: 12px; line-height: 1.5; color: var(--fg-faint); }
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-faint); }
.display, .h1, .h2, .h3, .lead { text-wrap: balance; }
.soft { color: var(--fg-soft); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: calc(880px + var(--gutter) * 2); }
.section { padding: var(--section) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .lead { margin-top: 16px; }
.white { --bg: #ffffff; --surface: #f5f5f7; background: var(--bg); }
.center { text-align: center; margin-left: auto; margin-right: auto; }
@media (min-width: 1000px) { .narrow-only { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: var(--r-pill); background: var(--control); color: var(--fg); font-size: 15px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none; transition: background var(--fast), color var(--fast), box-shadow var(--fast), transform var(--fast) var(--ease); }
.btn:hover { background: var(--control-hover); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn-primary { background: var(--solid); color: var(--on-solid); }
.btn-primary:hover { background: var(--solid); box-shadow: 0 0 0 4px var(--control-hover); }
.btn-accent { background: var(--accent); color: #fff; font-weight: 600; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); }
.btn-outline:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--fg); }
.btn-ghost { background: transparent; }
.btn-sm { height: 34px; padding: 0 15px; font-size: 13px; }
.btn-lg { height: 54px; padding: 0 30px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn .arrow { transition: transform var(--fast) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Text link with a chevron, for secondary routes out of a section. */
.link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--fg); font-size: 17px; text-decoration: none; cursor: pointer; }
.link::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); transition: transform var(--fast) var(--ease); }
.link:hover::after { transform: translateX(3px) rotate(45deg); }

/* ---------- fields ---------- */
.field { display: block; width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--surface); font-size: 16px; outline: none; transition: border-color var(--fast), box-shadow var(--fast); }
.field::placeholder { color: var(--fg-faint); }
.field:hover { border-color: var(--fg-faint); }
.field:focus { border-color: var(--fg); box-shadow: 0 0 0 4px var(--control); }
.field.pill { height: 42px; border-radius: var(--r-pill); padding: 0 18px; font-size: 15px; }
.field.search { padding-left: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236e6e73' stroke-width='1.8'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 16px 50%; }
select.field, select.field.pill { appearance: none; -webkit-appearance: none; width: auto; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%231d1d1f' stroke-width='1.6'%3E%3Cpath d='m1 1 4 4 4-4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }

/* Switch: a labelled on/off row. */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: var(--r-pill); background: var(--control-hover); cursor: pointer; transition: background var(--fast); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform var(--fast) var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- chips and segmented controls ---------- */
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--control); color: var(--fg); font-size: 13px; cursor: pointer; transition: background var(--fast), color var(--fast), opacity var(--fast); }
.chip:hover { background: var(--control-hover); }
.chip small { font-size: 11px; color: var(--fg-soft); }
.chip.on { background: var(--solid); color: var(--on-solid); }
.chip.on small { color: inherit; opacity: 0.6; }
.chip.empty:not(.on) { opacity: 0.45; }

.tag { display: inline-block; font-style: normal; font-size: 11.5px; line-height: 1; color: var(--fg-soft); background: var(--control); border-radius: var(--r-pill); padding: 5px 9px; }

.seg { display: flex; flex: none; padding: 3px; border-radius: var(--r-pill); background: var(--control); }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: var(--r-pill); font-size: 13px; color: var(--fg-soft); cursor: pointer; transition: background var(--fast), color var(--fast); }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.seg.wide button { flex: 1; }

/* ---------- cards ---------- */
.card { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; text-align: left; border: 0; padding: 10px; border-radius: var(--r-lg); background: var(--surface); color: var(--fg); text-decoration: none; cursor: pointer; box-shadow: var(--shadow-1); transition: transform var(--slow) var(--ease), box-shadow var(--slow) var(--ease), background var(--fast); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card-body { padding: 16px 8px 8px; }
.card-body b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.card-body span { display: block; font-size: 13px; color: var(--fg-soft); margin-top: 3px; }
.card-body .chips { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- navigation ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--nav-h); background: var(--glass); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav-logo { margin-right: auto; }
.nav-logo img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 28px; }
.nav-links a, .nav-links button { padding: 6px 0; border: 0; background: none; font-size: 13px; color: var(--fg-soft); text-decoration: none; cursor: pointer; transition: color var(--fast); }
.nav-links a:hover, .nav-links button:hover, .nav-links .current { color: var(--fg); }

/* ---------- footer ---------- */
/* One footer for the site: a raised panel holding the line and the way in, then where
   to go, with the small print underneath. A soft light follows the pointer across it. */
.foot { padding: clamp(24px, 4vw, 48px) 0 20px; }
.foot-card { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 64px); border: 1px solid var(--hairline); border-radius: 32px; background: #0b0b0d; }
.foot-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 85%) var(--my, 0%), rgba(255, 255, 255, 0.07), transparent 70%); }
.foot-card > * { position: relative; }
.foot-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; }
/* Two lines, always: on phones the size follows the width so neither sentence wraps. */
.foot-line { font-size: min(clamp(24px, 3.4vw, 46px), calc((100vw - 104px) / 13.4)); font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; }
.foot-line span { display: block; white-space: nowrap; }
.foot-line span:first-child { color: var(--fg-faint); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 64px; margin-top: clamp(40px, 6vw, 80px); padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--hairline); }
.foot-brand { max-width: 300px; }
.foot-logo img { display: block; height: 34px; width: auto; }
.foot-brand .small { margin-top: 16px; color: var(--fg-soft); }
.foot-cols { display: flex; gap: clamp(32px, 7vw, 104px); }
.foot-cols div { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.foot-cols .label { margin-bottom: 6px; }
.foot-cols a, .foot-cols button { padding: 0; border: 0; text-align: left; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; font-size: 15px; color: var(--fg-soft); text-decoration: none; cursor: pointer; transition: color var(--fast), background-size 0.35s var(--ease); }
.foot-cols a:hover, .foot-cols button:hover { color: var(--fg); background-size: 100% 1px; }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 22px clamp(4px, 2vw, 24px) 0; }
.foot-base .micro:first-child { color: var(--fg-soft); }
.foot-up { display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border: 0; border-radius: 50%; background: var(--control); color: var(--fg); cursor: pointer; transition: background var(--fast), transform var(--fast) var(--ease); }
.foot-up:hover { background: var(--control-hover); transform: translateY(-2px); }

/* ---------- feedback ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; max-width: min(520px, calc(100vw - 32px)); padding: 13px 20px; border-radius: var(--r-pill); background: #1d1d1f; color: #fff; font-size: 14px; line-height: 1.35; text-align: center; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28); animation: toast-in 0.4s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.busy { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; align-content: center; gap: 22px; padding: 32px; background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); font-size: 15px; line-height: 1.5; color: var(--fg-soft); text-align: center; }
.busy::before { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--hairline); border-top-color: var(--accent); animation: turn 0.9s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

/* ---------- dialog ---------- */
/* A small card over a dimmed page, for short decisions such as paying for a film. */
.dialog { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.32); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade var(--slow) var(--ease) both; }
.dialog-card { position: relative; width: min(420px, 100%); display: grid; gap: 14px; padding: 30px 28px 22px; border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--shadow-3); animation: rise 0.5s var(--ease) both; }
.dialog-card .h2 { margin-top: -8px; }
.dialog-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--control); color: var(--fg); font-size: 20px; line-height: 1; cursor: pointer; }
.ticks { display: grid; gap: 8px; margin: 2px 0; padding: 0; list-style: none; font-size: 15px; color: var(--fg-soft); }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 0.42em; width: 10px; height: 5px; border-left: 2px solid var(--fg); border-bottom: 2px solid var(--fg); transform: rotate(-45deg); }

.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--fg-soft); cursor: pointer; }
.agree input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--fg); }
.agree a, .foot-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.find summary { cursor: pointer; color: var(--fg-soft); text-align: center; list-style: none; }
.find summary::-webkit-details-marker { display: none; }
.find-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 10px 0 6px; }
.foot-legal { display: flex; gap: 16px; }

/* ---------- motion ---------- */
/* Add .reveal to anything that should ease in as it scrolls into view; --d staggers siblings. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 760px) {
  .field.pill { font-size: 16px; }
  :root { --nav-h: 56px; }
  .nav-links { display: none; }
  .nav-logo img { height: 36px; }
  .btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
}

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

/* ---------- Recorder: shown while a film records ---------- */
/* The live frame being captured, a thin accent bar driven by real progress, time left. */
.recorder { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 32px; background: rgba(245, 245, 247, 0.88); backdrop-filter: saturate(1.6) blur(24px); -webkit-backdrop-filter: saturate(1.6) blur(24px); animation: recorder-in var(--slow) var(--ease) both; }
.recorder.done { animation: recorder-out 0.5s var(--ease) 0.9s both; }
.recorder-card { display: grid; gap: 16px; justify-items: center; }
.recorder-frame { border-radius: var(--r-md); overflow: hidden; background: #f5f5f7; box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.06); }
.recorder-frame canvas { display: block; width: 100%; height: 100%; }
.recorder-bar { width: 100%; height: 3px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); overflow: hidden; margin-top: 6px; }
.recorder-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 0.25s linear; box-shadow: 0 0 10px rgba(255, 66, 1, 0.45); }
.recorder-meta { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--fg-soft); font-variant-numeric: tabular-nums; }
.recorder-title { display: inline-flex; align-items: center; gap: 9px; }
.recorder-title b { color: var(--fg); font-weight: 600; }
.recorder-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: recorder-pulse 1.4s ease-in-out infinite; }
.recorder.done .recorder-dot { animation: none; background: #34c759; }
.recorder-hint { margin: -6px 0 0; color: var(--fg-faint); justify-self: start; }
@keyframes recorder-in { from { opacity: 0; } }
@keyframes recorder-out { to { opacity: 0; visibility: hidden; } }
@keyframes recorder-pulse { 50% { opacity: 0.25; transform: scale(0.8); } }
@media (prefers-reduced-motion: reduce) { .recorder-dot { animation: none; } .recorder-bar i { transition: none; } }

/* ---------- Group: a titled, collapsible section (studio panel) ---------- */
/* <details class="group"><summary>Title <small>current choice</small></summary><div class="group-body">… */
.group { border-top: 1px solid var(--hairline); }
.group > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; user-select: none; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary small { margin-left: auto; min-width: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--fg-soft); }
.group > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: -4px 2px 0 0; border-right: 1.6px solid var(--fg-soft); border-bottom: 1.6px solid var(--fg-soft); transform: rotate(45deg); transition: transform var(--fast) var(--ease); }
.group[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.group > summary:hover::after { border-color: var(--fg); }
.group-body { display: grid; gap: 18px; padding: 2px 0 22px; }
.group[open] > .group-body { animation: group-in 0.3s var(--ease) both; }
@keyframes group-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .group[open] > .group-body { animation: none; } }
