/* Sorrel Studio. The geometric fox (static/brand/mark.svg) is the logo.
   Black ground, bone type, one family (Archivo) used at two widths: ultra-condensed for the credit-block
   headlines, normal for everything you read or click. Sorrel orange is the tally light: the primary action,
   progress, and "this is live". Nothing else is orange. */
@font-face {
  font-family: 'Archivo';
  src: url('/static/fonts/archivo-wdth.woff2') format('woff2-variations'), url('/static/fonts/archivo-wdth.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --black: #000000;
  --raise: #161616;        /* inputs, panels that sit above the ground */
  --raise-2: #1f1f1f;      /* hover on raised things */
  --rule: #262626;         /* hairlines */
  --rule-2: #3a3a3a;       /* stronger rules, focus rings on dark */
  --bone: #ece8e1;         /* primary text */
  --ash: #8c8a86;          /* secondary text */
  --smoke: #5c5a57;        /* disabled, tertiary */
  --sorrel: #e0784a;
  --sorrel-ink: #1a0a03;
  --error: #ff8a7a;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* radii vary by role instead of one value everywhere */
  --r-control: 6px;
  --r-media: 10px;
  --header: 64px;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--bone); font: 400 15px/1.55 var(--font); font-stretch: 100%; font-feature-settings: 'ss01'; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sorrel); outline-offset: 2px; }
::selection { background: var(--sorrel); color: var(--sorrel-ink); }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.num { font-variant-numeric: tabular-nums; }

/* Display type: the credit block. Only used for big headlines. */
.display { font-stretch: 62%; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; line-height: .86; margin: 0; }

/* ---------- Brand: wordmark + tally light ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); }
.brand .mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand em { font-style: normal; font-weight: 500; color: var(--ash); margin-left: .12em; }
.brand span { font-stretch: 70%; font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }

/* ---------- Header ---------- */
.site-header, .app-header { position: sticky; top: 0; z-index: 30; background: #000000d9; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--rule); }
.site-header .bar, .app-header .bar { height: var(--header); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-header .bar { padding: 0 20px; }
.site-header .left, .site-header .right, .app-header .left, .app-header .right { display: flex; align-items: center; gap: 28px; }
.site-header .right, .app-header .right { gap: 8px; }
.nav { display: flex; gap: 4px; }
.navlink { color: var(--ash); text-decoration: none; font-weight: 500; padding: 8px 10px; border-radius: var(--r-control); background: none; border: 0; cursor: pointer; transition: color .15s; }
.navlink:hover, .navlink.on { color: var(--bone); }
.navlink.on { box-shadow: inset 0 -2px 0 var(--sorrel); border-radius: 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-control); padding: 11px 18px; font-weight: 600; font-size: 14px; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:disabled { cursor: not-allowed; opacity: .4; }
.btn-accent { background: var(--sorrel); color: var(--sorrel-ink); }
.btn-accent:hover:not(:disabled) { background: #ea8659; }
.btn-white { background: var(--bone); color: var(--black); }
.btn-white:hover:not(:disabled) { background: #fff; }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--rule-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--bone); }
.btn-glass { background: #ffffff14; color: var(--bone); backdrop-filter: blur(8px); }
.btn-glass:hover { background: #ffffff24; }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-lg { padding: 15px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--ash); font-weight: 500; font-size: 13px; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-2); }
.linkbtn:hover { color: var(--bone); text-decoration-color: var(--bone); }
.textlink { color: var(--bone); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-2); }
.textlink:hover { text-decoration-color: var(--sorrel); }

/* ---------- Landing: hero viewfinder ---------- */
.hero { position: relative; height: min(calc(100svh - var(--header)), 900px); min-height: 560px; overflow: hidden; background: var(--black); border-bottom: 1px solid var(--rule); user-select: none; }
.hero .side { position: absolute; inset: 0; }
.hero .side video, .hero .side img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50%) 30%; }
.hero .side.recast { clip-path: inset(0 0 0 var(--split, 50%)); }
/* Fallback when no footage is installed: an empty viewfinder, never a fake person. */
.hero .vf { position: absolute; inset: 0; background:
    radial-gradient(120% 90% at 30% 40%, #1c1c1c 0%, #070707 55%, #000 100%); }
.hero .recast .vf { background: radial-gradient(120% 90% at 70% 45%, #3a1a0c 0%, #140803 50%, #000 100%); }
.grain { position: absolute; inset: -50%; opacity: .14; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1s steps(4) infinite; pointer-events: none; }
.guides { z-index: 2; position: absolute; inset: clamp(18px, 4vw, 48px); pointer-events: none; }
.guides i { position: absolute; width: 28px; height: 28px; border-color: #ece8e166; border-style: solid; border-width: 0; }
.guides i:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.guides i:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.guides i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.guides i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.hud { z-index: 2; position: absolute; top: clamp(30px, 5vw, 62px); left: clamp(30px, 5vw, 62px); right: clamp(30px, 5vw, 62px); display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--bone); pointer-events: none; font-variant-numeric: tabular-nums; }
.hud .rec { display: inline-flex; align-items: center; gap: 8px; }
.hud .rec::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--sorrel); animation: tally 1.6s ease-in-out infinite; }
.hero .side-label { z-index: 2; position: absolute; bottom: clamp(30px, 5vw, 62px); font-size: 13px; font-weight: 600; color: var(--bone); pointer-events: none; }
.hero .take .side-label { left: clamp(30px, 5vw, 62px); }
.hero .recast .side-label { right: clamp(30px, 5vw, 62px); color: var(--sorrel); }
.split-handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 44px; margin-left: -22px; cursor: ew-resize; z-index: 3; touch-action: none; background: none; border: 0; padding: 0; }
.split-handle::before { content: ''; position: absolute; top: 0; bottom: 0; left: 21px; width: 2px; background: var(--bone); }
.split-handle span { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; background: var(--bone); display: grid; place-items: center; }
.split-handle span svg { width: 18px; height: 18px; stroke: var(--black); }
/* With real footage, a scrim behind the headline keeps it legible on any frame. */
.hero.has-media::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, #000000c7 0%, #00000080 35%, transparent 62%), linear-gradient(to top, #000000a6 0%, transparent 40%); }
.hero .copy { position: absolute; left: clamp(30px, 5vw, 62px); bottom: clamp(70px, 9vw, 120px); z-index: 2; max-width: 760px; pointer-events: none; }
.hero .copy > * { pointer-events: auto; }
.hero h1 { font-size: clamp(60px, 10vw, 156px); color: var(--bone); }
.hero p { font-size: clamp(16px, 1.4vw, 19px); color: var(--bone); max-width: 30em; margin: 22px 0 28px; text-shadow: 0 1px 12px #000; }
.hero .row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* ---------- Landing: sections ---------- */
.section { padding-top: clamp(72px, 9vw, 128px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--bone); }
.lede { font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: clamp(40px, 6vw, 88px); line-height: .9; margin: 0 0 40px; max-width: 14ch; }

/* The process really is a sequence, so it's numbered. */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); counter-reset: step; }
.process li { padding: 22px 28px 0 0; counter-increment: step; }
.process li::before { content: counter(step); display: block; font-stretch: 62%; font-weight: 800; font-size: 56px; line-height: 1; color: var(--smoke); margin-bottom: 18px; }
.process li:first-child::before { color: var(--sorrel); }
.process b { display: block; font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.process p { margin: 0; color: var(--ash); max-width: 30ch; }
.process .cost { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--bone); font-variant-numeric: tabular-nums; }

.reel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.reel .tile { grid-column: span 4; }
.reel .tile.wide { grid-column: span 8; }
.reel .frame { aspect-ratio: 4 / 5; }
.reel .tile.wide .frame { aspect-ratio: auto; height: 100%; min-height: 100%; }
.reel figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px 0; font-size: 14px; color: var(--ash); }
.reel figcaption b { color: var(--bone); font-weight: 600; }

.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.promises div { border-top: 1px solid var(--rule-2); padding-top: 18px; }
.promises b { display: block; font-weight: 600; margin-bottom: 6px; }
.promises p { margin: 0; color: var(--ash); font-size: 14px; }

.closer { margin-top: clamp(72px, 9vw, 128px); border-top: 1px solid var(--rule); padding: clamp(64px, 8vw, 110px) 0; display: flex; align-items: end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.closer h2 { font-size: clamp(56px, 9vw, 140px); }

/* ---------- Tiles & media (landing reel + studio history) ---------- */
.tile { display: block; text-decoration: none; color: inherit; margin: 0; }
.tile .frame { position: relative; overflow: hidden; border-radius: var(--r-media); background: var(--raise); }
.tile .media { position: absolute; inset: 0; }
.tile .media video, .tile .media img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 4px; background: #000000b3; color: var(--bone); backdrop-filter: blur(6px); }
.tag-mono { font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 48px 0 36px; color: var(--ash); font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer .col { display: flex; flex-direction: column; gap: 8px; }
.site-footer .col b { color: var(--bone); font-weight: 600; margin-bottom: 4px; }
.site-footer .col a { text-decoration: none; }
.site-footer .col a:hover { color: var(--bone); }
.site-footer .fine { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; font-size: 13px; color: var(--smoke); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ash); }
.input { width: 100%; background: var(--raise); border: 1px solid var(--rule); border-radius: var(--r-control); padding: 12px 13px; color: var(--bone); outline: none; transition: border-color .15s; resize: vertical; }
.input::placeholder { color: var(--smoke); }
.input:focus { border-color: var(--bone); }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--ash); line-height: 1.45; cursor: pointer; }
.check input { appearance: none; flex-shrink: 0; width: 18px; height: 18px; margin: 1px 0 0; border: 1.5px solid var(--rule-2); border-radius: 4px; background: transparent; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--sorrel); border-color: var(--sorrel); }
.check input:checked::after { content: ''; width: 8px; height: 4px; border-left: 2px solid var(--sorrel-ink); border-bottom: 2px solid var(--sorrel-ink); transform: rotate(-45deg) translate(1px, -1px); }
.check input:checked + span { color: var(--bone); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--rule); border-radius: var(--r-control); padding: 3px; gap: 3px; }
.segmented button { background: none; border: 0; border-radius: 4px; padding: 9px 10px; font-weight: 600; font-size: 13px; color: var(--ash); cursor: pointer; }
.segmented button:hover { color: var(--bone); }
.segmented button.on { background: var(--bone); color: var(--black); }
.error-text { color: var(--error); font-size: 13px; }
.notice { border-left: 2px solid var(--error); padding: 10px 14px; background: #ff8a7a12; color: var(--bone); font-size: 14px; border-radius: 0 var(--r-control) var(--r-control) 0; }
.notice.info { border-left-color: var(--sorrel); background: #e0784a12; color: var(--bone); font-size: 13px; }

/* ---------- Auth ---------- */
.auth { min-height: calc(100svh - var(--header)); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 1fr); }
/* Left: the real before/after frame (falls back to a dark viewfinder) */
.auth .poster { position: relative; overflow: hidden; border-right: 1px solid var(--rule); display: flex; align-items: flex-end; padding: clamp(28px, 4vw, 56px); background: #000; }
.auth .poster .vf { position: absolute; inset: 0; background: radial-gradient(110% 80% at 30% 30%, #2a1309 0%, #0a0503 55%, #000 100%); }
.auth .poster .shot { position: absolute; inset: 0; }
.auth .poster .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 60%) 30%; }
.auth .poster .shot img.recast { clip-path: inset(0 0 0 var(--focus, 60%)); }
.auth .poster .shot::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--focus, 60%); width: 2px; background: var(--bone); }
.auth .poster::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, #000000e6 0%, #00000080 32%, transparent 60%); }
.auth .poster .tag-take, .auth .poster .tag-recast { position: absolute; top: clamp(24px, 3vw, 40px); z-index: 2; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 4px; background: #000000a6; backdrop-filter: blur(6px); }
.auth .poster .tag-take { left: clamp(24px, 3vw, 40px); }
.auth .poster .tag-recast { right: clamp(24px, 3vw, 40px); color: var(--sorrel); }
.auth .poster h2 { position: relative; z-index: 2; font-size: clamp(56px, 7vw, 120px); }

/* Right: one centred column */
.auth-card { padding: clamp(32px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.auth-card .inner { width: 100%; max-width: 400px; }
.auth-card .crest { width: 52px; height: 52px; display: block; margin-bottom: 28px; }
.auth-card h1 { font-size: clamp(28px, 2.4vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 10px; }
.auth-card .lede-sm { color: var(--ash); margin: 0 0 28px; font-size: 15px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card .facts { list-style: none; padding: 22px 0 0; margin: 26px 0 0; border-top: 1px solid var(--rule); display: grid; gap: 12px; font-size: 14px; }
.auth-card .facts li { display: flex; gap: 12px; align-items: baseline; color: var(--bone); }
.auth-card .facts li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sorrel); flex-shrink: 0; transform: translateY(-2px); }
.auth-card .facts small { display: block; color: var(--ash); font-size: 13px; }
.auth-card .fine { font-size: 12px; color: var(--smoke); margin: 22px 0 0; }
.auth-card .fine a { color: var(--ash); }

/* ---------- Pricing ---------- */
.pricing-hero { padding: clamp(56px, 7vw, 96px) 0 40px; display: flex; align-items: end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.pricing-hero h1 { font-size: clamp(56px, 9vw, 136px); }
.pricing-hero p { color: var(--ash); max-width: 34ch; margin: 0; font-size: 16px; }
.period { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--rule); border-radius: var(--r-control); padding: 3px; gap: 3px; margin-top: 18px; }
.period button { background: none; border: 0; padding: 8px 14px; border-radius: 4px; color: var(--ash); font-weight: 600; font-size: 13px; cursor: pointer; }
.period button.on { background: var(--bone); color: var(--black); }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); }
.tier { position: relative; padding: 28px 28px 32px 0; display: flex; flex-direction: column; gap: 4px; }
.tier + .tier { padding-left: 28px; border-left: 1px solid var(--rule); }
.tier.popular::before { content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--sorrel); }
.tier .badge { font-size: 12px; font-weight: 600; color: var(--sorrel); position: absolute; top: 28px; right: 28px; }
.tier h2 { margin: 0; font-size: 22px; font-weight: 700; }
.tier .for { color: var(--ash); font-size: 14px; }
.tier .price { margin: 22px 0 2px; display: flex; align-items: baseline; gap: 6px; }
.tier .price b { font-stretch: 62%; font-weight: 800; font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.tier .price span { color: var(--ash); font-size: 14px; }
.tier .note { color: var(--ash); font-size: 13px; min-height: 20px; }
.tier .btn { margin: 18px 0 22px; }
.tier hr { display: none; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: var(--sorrel); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transform: translateY(2px); }
.box { border: 1px solid var(--rule); border-radius: var(--r-media); padding: 26px; }
.fit { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.fit input[type=range] { width: 100%; margin-top: 12px; accent-color: var(--sorrel); }
.fit .answer { flex: 0 0 auto; min-width: 200px; }
.fit .answer b { display: block; font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: 48px; line-height: 1; margin: 4px 0; }
.table-wrap { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cmp th, .cmp td { text-align: left; padding: 13px 14px 13px 0; border-bottom: 1px solid var(--rule); }
.cmp thead th { color: var(--ash); font-weight: 600; font-size: 13px; }
.cmp td:first-child { color: var(--ash); }
.cmp .no { color: var(--smoke); }
.faq { border-top: 1px solid var(--rule-2); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; font-size: 16px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font-size: 22px; font-weight: 400; color: var(--ash); }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 0 0 20px; color: var(--ash); max-width: 64ch; }

/* ---------- Studio ---------- */
.credits { font-variant-numeric: tabular-nums; }
.credits svg { width: 15px; height: 15px; fill: none; stroke: var(--sorrel); stroke-width: 2; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule-2); background: var(--raise); color: var(--bone); font-weight: 700; cursor: pointer; }
.menu { position: absolute; right: 20px; top: calc(var(--header) - 6px); min-width: 220px; background: var(--raise); border: 1px solid var(--rule); border-radius: var(--r-media); padding: 6px; display: flex; flex-direction: column; box-shadow: 0 20px 50px #000; }
.menu .who { padding: 9px 10px 11px; font-size: 13px; color: var(--ash); border-bottom: 1px solid var(--rule); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }
.menu button, .menu a { text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 4px; text-decoration: none; font-size: 14px; cursor: pointer; }
.menu button:hover, .menu a:hover { background: var(--raise-2); }

.studio { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: calc(100svh - var(--header)); }
.panel { border-right: 1px solid var(--rule); padding: 20px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: var(--header); height: calc(100svh - var(--header)); overflow-y: auto; }
.label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ash); }
.card { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; text-align: left; background: var(--raise); border: 1px solid var(--rule); border-radius: var(--r-media); cursor: pointer; transition: border-color .15s; }
.card:hover { border-color: var(--rule-2); }
.card .thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--r-control); background: var(--black); display: grid; place-items: center; overflow: hidden; color: var(--ash); }
.card .thumb img, .card .thumb video { width: 100%; height: 100%; object-fit: cover; }
.card .meta { flex: 1; display: flex; flex-direction: column; }
.card .meta b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta small { color: var(--ash); font-size: 12px; }
.card input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.card:focus-within { border-color: var(--bone); }
.quick { display: flex; gap: 6px; margin-top: 8px; }
.quick:empty { display: none; }
.quick button { width: 40px; height: 40px; padding: 0; border-radius: var(--r-control); overflow: hidden; border: 1.5px solid transparent; background: var(--raise); cursor: pointer; opacity: .6; }
.quick button:hover { opacity: 1; }
.quick button.on { border-color: var(--sorrel); opacity: 1; }
.quick img, .quick video { width: 100%; height: 100%; object-fit: cover; }
.hint { font-size: 12px; color: var(--ash); margin-top: 7px; }
.generate { margin-top: auto; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 16px 18px; border-radius: var(--r-control); border: 0; background: var(--sorrel); color: var(--sorrel-ink); font-weight: 700; font-size: 15px; cursor: pointer; }
.generate:hover:not(:disabled) { background: #ea8659; }
.generate:disabled { background: var(--raise); color: var(--smoke); cursor: not-allowed; }
.generate .cost { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

.stage { padding: 20px clamp(16px, 2.4vw, 32px) 48px; display: flex; flex-direction: column; gap: 12px; }
.review-tabs { display: flex; gap: 2px; }
.filter { background: none; border: 0; padding: 8px 12px; color: var(--ash); font-weight: 600; font-size: 13px; cursor: pointer; border-radius: 0; box-shadow: inset 0 -2px 0 transparent; }
.filter:hover { color: var(--bone); }
.filter.on { color: var(--bone); box-shadow: inset 0 -2px 0 var(--sorrel); }
.preview { position: relative; aspect-ratio: 16 / 9; max-height: calc(100svh - var(--header) - 190px); width: 100%; border-radius: var(--r-media); overflow: hidden; background: var(--raise); display: grid; place-items: center; }
.preview video { width: 100%; height: 100%; object-fit: contain; background: var(--black); }
.preview .badge { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 4px; background: #000000b3; color: var(--bone); z-index: 2; backdrop-filter: blur(6px); }
.preview .badge.hd { background: var(--sorrel); color: var(--sorrel-ink); }
.preview .ai { position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 4px; background: #000000b3; color: var(--bone); z-index: 2; }
.empty { text-align: left; padding: 32px; max-width: 520px; justify-self: start; align-self: end; }
.empty h2 { font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: clamp(44px, 5vw, 72px); line-height: .9; margin: 0 0 12px; }
.empty p { color: var(--ash); margin: 0; }
.empty svg { display: none; }
.shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, #161616 20%, #222 50%, #161616 80%); background-size: 220% 100%; animation: shimmer 1.8s linear infinite; }
.progress-card { position: relative; width: min(440px, 88%); background: #000000e6; border: 1px solid var(--rule); border-radius: var(--r-media); padding: 22px; }
.progress-card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.progress-card .top b { display: block; font-weight: 600; }
.progress-card .top small { color: var(--ash); font-size: 13px; }
.progress-card .pct { margin-left: auto; font-stretch: 62%; font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.bar-track { height: 3px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--sorrel); transition: width .6s ease; }
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--smoke); }
.steps li.done { color: var(--ash); }
.steps li.active { color: var(--bone); }
.steps .dot { width: 14px; height: 14px; display: grid; place-items: center; flex-shrink: 0; }
.steps .dot i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--rule-2); }
.steps li.active .dot i { background: var(--sorrel); border-color: var(--sorrel); animation: tally 1.4s ease-in-out infinite; }
.steps li.done .dot i { display: none; }
.steps li.done .dot::after { content: ''; width: 8px; height: 4px; border-left: 2px solid var(--ash); border-bottom: 2px solid var(--ash); transform: rotate(-45deg) translate(1px, -1px); }
.spin { width: 22px; height: 22px; flex-shrink: 0; animation: spin 1s linear infinite; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 6px 0; }
.result-bar b { display: block; font-weight: 600; font-size: 15px; }
.result-bar small { color: var(--ash); font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

.hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.hist .frame { aspect-ratio: 16 / 10; }
.hist .t { padding: 8px 2px 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .s { padding: 0 2px; color: var(--ash); font-size: 12px; }
.hist .tile.on .frame { outline: 2px solid var(--sorrel); outline-offset: 2px; }

/* Character picker */
.modal { position: fixed; inset: 0; z-index: 50; background: #000000cc; display: grid; place-items: center; padding: 16px; }
.dialog { width: min(760px, 100%); background: #0f0f0f; border: 1px solid var(--rule); border-radius: var(--r-media); overflow: hidden; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--rule); }
.dialog-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.iconbtn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-control); background: none; border: 1px solid var(--rule); color: var(--bone); cursor: pointer; }
.iconbtn:hover { border-color: var(--bone); }
.search { display: flex; align-items: center; gap: 8px; flex: 1; background: var(--raise); border: 1px solid var(--rule); border-radius: var(--r-control); padding: 0 12px; }
.search:focus-within { border-color: var(--bone); }
.search input { flex: 1; background: none; border: 0; outline: none; padding: 11px 0; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.pick-item, .new-char { position: relative; display: flex; flex-direction: column; gap: 2px; cursor: pointer; border-radius: var(--r-media); text-align: left; }
.pick-item .ph { aspect-ratio: 3 / 4; border-radius: var(--r-media); overflow: hidden; background: var(--raise); margin-bottom: 6px; border: 2px solid transparent; }
.pick-item.on .ph { border-color: var(--sorrel); }
.pick-item:hover .ph { border-color: var(--rule-2); }
.pick-item.on:hover .ph { border-color: var(--sorrel); }
.pick-item .ph img, .pick-item .ph video { width: 100%; height: 100%; object-fit: cover; }
.pick-item b { font-weight: 600; font-size: 14px; }
.pick-item small { color: var(--ash); font-size: 12px; }
.pick-item .del { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #000000b3; color: var(--bone); cursor: pointer; opacity: 0; font-size: 12px; }
.pick-item:hover .del, .pick-item .del:focus-visible { opacity: 1; }
.new-char { aspect-ratio: 3 / 4; border: 1.5px dashed var(--rule-2); align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: var(--bone); }
.new-char:hover { border-color: var(--sorrel); }
.new-char small { color: var(--ash); font-weight: 400; font-size: 12px; }
.new-char svg { margin-bottom: 6px; }
.new-char input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--bone); color: var(--black); padding: 11px 16px; border-radius: var(--r-control); font-weight: 600; font-size: 14px; box-shadow: 0 16px 40px #000; max-width: min(520px, calc(100% - 32px)); }
.toast.err { background: var(--error); color: #1a0402; }

/* ---------- Motion ---------- */
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -20% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tally { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -5%); } 75% { transform: translate(-2%, 4%); } }
@media (prefers-reduced-motion: reduce) {
  .shimmer, .spin, .grain, .hud .rec::before, .steps li.active .dot i { animation: none !important; }
  .bar-fill { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .process, .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .process li { padding-right: 0; }
  .reel .tile, .reel .tile.wide { grid-column: span 6; }
  .reel .tile.wide .frame { aspect-ratio: 4 / 5; height: auto; }
  .tiers { grid-template-columns: 1fr; }
  .tier, .tier + .tier { padding: 28px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .tier .badge { right: 0; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth .poster { height: 260px; border-right: 0; border-bottom: 1px solid var(--rule); padding: 20px; }
  .auth .poster h2 { font-size: 44px; }
  .auth-card { justify-content: flex-start; padding-top: 32px; }
}
@media (max-width: 860px) {
  .studio { grid-template-columns: 1fr; }
  .panel { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule); }
  .stage { order: -1; }
  .nav { display: none; }
}
@media (max-width: 600px) {
  .site-header .brand em { display: none; }
  .process, .promises { grid-template-columns: 1fr; }
  .reel .tile, .reel .tile.wide { grid-column: span 12; }
  .hero { min-height: 620px; }
  /* On phones the copy covers most of the frame: give it a scrim above the split line so it stays readable. */
  .hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; z-index: 4; pointer-events: none;
    background: linear-gradient(to top, #000 0%, #000000f0 55%, transparent 100%); }
  .hero .copy { z-index: 5; bottom: 64px; }
  .hero .side-label, .guides i:nth-child(3), .guides i:nth-child(4) { display: none; }
  .hud .tc { display: none; }
}
