/* ==========================================================
   Marey — landing page
   Direction: the darkroom. Contact sheets, film edges,
   safelight red and the photographer's grease pencil.
   Mobile first.
   ========================================================== */

:root {
  --ink: #0e0d0c;
  --ink-2: #171513;
  --ink-3: #221f1c;
  --line: rgba(239, 231, 218, .12);
  --paper: #efe7da;
  --paper-2: #e4dacb;
  --paper-ink: #1b1815;
  --muted: rgba(239, 231, 218, .58);
  --red: #e63b2e;        /* grease pencil / safelight */
  --red-deep: #b5241a;
  --amber: #f0a43a;      /* film edge markings */
  --green: #7fc28a;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;

  --gutter: 16px;
  --max: 1240px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  color-scheme: dark;
}

@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 100;
  opacity: .07;
  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='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

img, svg { display: block; max-width: 100%; }
.ph { width: 100%; height: 100%; object-fit: cover; background: var(--ink-3); }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--red); color: var(--paper); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--paper); color: var(--ink); padding: 8px 12px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.tiny { font-size: 11px; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 96px 0; position: relative; }
@media (min-width: 900px) { .section { padding: 140px 0; } }

.kicker { color: var(--red); margin-bottom: 20px; }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 9vw, 92px);
  line-height: .98;
  letter-spacing: -.02em;
  margin-bottom: 24px;
}
.h2 em, .hero__title em, .final__title em { font-style: italic; color: var(--red); }
.h2--sm { font-size: clamp(36px, 7vw, 64px); }
.h3 {
  font-family: var(--sans);
  font-weight: 560;
  font-size: 20px;
  letter-spacing: -.01em;
  margin-bottom: 8px;
}
.body { color: var(--muted); font-size: 17px; max-width: 34em; }
.body--wide { max-width: 44em; }
@media (min-width: 900px) { .body { font-size: 19px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); color: var(--ink);
  text-decoration: none; font-weight: 560;
  border-radius: 999px; padding: 12px 20px;
  transition: transform .2s var(--ease), background .2s;
}
.btn:hover { background: #fff; transform: translateY(-1px); }
.btn--small { padding: 8px 16px; font-size: 14px; }

.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--paper); color: var(--ink);
  border-radius: 14px; padding: 12px 22px 12px 18px;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 10px 30px -10px rgba(230, 59, 46, .45);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.appstore:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 18px 40px -12px rgba(230, 59, 46, .7); }
.appstore__logo { width: 26px; height: 26px; margin-top: -3px; }
.appstore__text { display: flex; flex-direction: column; font-weight: 600; font-size: 20px; line-height: 1.05; letter-spacing: -.01em; }
.appstore__text small { font-size: 11px; font-weight: 450; letter-spacing: .01em; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(to bottom, rgba(14,13,12,.85), rgba(14,13,12,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .3s;
}
.nav.is-scrolled { background: rgba(14,13,12,.82); border-bottom: 1px solid var(--line); }
.nav__links { display: none; gap: 28px; font-size: 14px; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--paper); }
@media (min-width: 900px) { .nav__links { display: flex; } }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__name { font-family: var(--serif); font-size: 28px; line-height: 1; letter-spacing: -.01em; }
.brand__mark { display: inline-flex; gap: 2px; align-items: center; }
.brand__mark i { width: 5px; height: 18px; background: var(--paper); border-radius: 1px; }
.brand__mark i:nth-child(1) { opacity: .25; }
.brand__mark i:nth-child(2) { opacity: .45; }
.brand__mark i:nth-child(3) { opacity: .7; }
.brand__mark i:nth-child(4) { background: var(--red); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 120px 0 56px;
  background:
    radial-gradient(80% 60% at 85% 10%, rgba(230, 59, 46, .22), transparent 60%),
    radial-gradient(60% 50% at 0% 100%, rgba(240, 164, 58, .08), transparent 70%),
    var(--ink);
  overflow: hidden;
}
@media (min-width: 900px) { .hero { padding: 160px 0 72px; } }
.hero__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 28px; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 15vw, 188px);
  line-height: .9;
  letter-spacing: -.035em;
  margin-bottom: 36px;
}
.hero__row { display: grid; gap: 32px; align-items: end; }
@media (min-width: 900px) { .hero__row { grid-template-columns: 1.2fr 1fr; gap: 64px; } .hero__cta { justify-self: end; text-align: right; } }
.lead { font-size: 18px; color: var(--muted); max-width: 32em; }
.lead strong { color: var(--paper); font-weight: 520; }
@media (min-width: 900px) { .lead { font-size: 20px; } }
.hero__cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
@media (min-width: 900px) { .hero__cta { align-items: flex-end; } }

/* Film strip */
.strip {
  margin: 56px 0 0;
  background: #090807;
  padding: 0;
  transform: rotate(-2deg);
  width: 112%;
  margin-left: -6%;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
  position: relative;
}
@media (min-width: 900px) { .strip { margin-top: 88px; transform: rotate(-1.5deg); } }
.strip::before, .strip::after {
  /* sprocket holes */
  content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background-image: repeating-linear-gradient(90deg, transparent 0 10px, rgba(239,231,218,.85) 10px 22px, transparent 22px 30px);
  -webkit-mask: linear-gradient(#000, #000);
  border-radius: 2px;
  opacity: .9;
}
.strip::before { top: 8px; }
.strip::after { bottom: 8px; }
.strip__edge {
  display: flex; justify-content: space-around; gap: 24px;
  color: var(--amber); font-size: 10px; padding: 24px 0 6px; white-space: nowrap; overflow: hidden;
}
.strip__edge--bottom { padding: 6px 0 24px; }
.strip__frames {
  position: relative;
  display: flex; gap: 8px; padding: 0 8px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.strip__frames::-webkit-scrollbar { display: none; }

.frame {
  position: relative; flex: 0 0 auto;
  width: 46vw; max-width: 260px; aspect-ratio: 3 / 2;
  border-radius: 2px; overflow: visible;
}
@media (min-width: 900px) { .frame { width: calc((100vw * 1.12 - 72px) / 8); max-width: none; } }
.frame__img { position: absolute; inset: 0; overflow: hidden; border-radius: 2px; }
.frame__img .ph { width: 100%; height: 100%; }
.frame.is-reject .frame__img { filter: saturate(.35) brightness(.6); transition: filter .6s; }
.frame__label {
  position: absolute; left: 6px; bottom: 6px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 5px; border-radius: 2px; background: rgba(14,13,12,.7); color: var(--paper);
  opacity: 0; transform: translateY(4px); transition: .5s var(--ease);
}
.frame__label--best { background: var(--red); }
.is-annotated .frame__label { opacity: 1; transform: none; }

/* grease pencil marks */
.mark { position: absolute; pointer-events: none; overflow: visible; }
.mark path { fill: none; stroke: var(--red); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.mark--circle { inset: -16% -12%; width: 124%; height: 132%; }
.mark--x { inset: 18% 28%; width: 44%; height: 64%; }
.is-annotated .mark path { animation: draw 0.9s var(--ease) forwards; }
.is-annotated .mark--x path:nth-child(2) { animation-delay: .25s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hand {
  position: absolute; font-family: var(--hand); color: var(--red); font-size: 22px; font-weight: 700;
  white-space: nowrap; transform: rotate(-6deg); opacity: 0; transition: opacity .5s .8s;
  top: -34px; left: 50%; translate: -50% 0;
}
.is-annotated .hand { opacity: 1; }

.facts {
  max-width: var(--max); margin: 56px auto 0; padding: 0 var(--gutter);
  list-style: none; display: grid; gap: 10px; color: var(--muted);
}
.facts b { color: var(--red); font-weight: 500; margin-right: 8px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(3, auto); justify-content: space-between; } }

/* ---------- Ticker ---------- */
.ticker { border-block: 1px solid var(--line); overflow: hidden; background: var(--ink-2); }
.ticker__track { display: flex; gap: 28px; white-space: nowrap; padding: 14px 0; width: max-content; animation: tick 40s linear infinite; color: var(--paper); }
.ticker__track span:nth-child(even) { color: var(--red); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Speed ---------- */
.speed__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .speed__grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.keys { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 14px; }
.keys li { display: flex; align-items: center; gap: 6px; }
kbd {
  font-family: var(--mono); font-size: 12px; min-width: 28px; height: 28px; padding: 0 7px;
  display: inline-grid; place-items: center;
  border-radius: 6px; background: var(--ink-3); color: var(--paper);
  border: 1px solid rgba(239,231,218,.18); border-bottom-width: 3px;
}
.flipper { position: relative; }
.flipper__screen {
  position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden;
  background: var(--ink-3);
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0,0,0,.9);
}
.flipper__screen > div { position: absolute; inset: 0; opacity: 0; }
.flipper__screen > div.on { opacity: 1; }
.flipper__screen .ph { width: 100%; height: 100%; }
.flipper__hud { display: flex; justify-content: space-between; margin-top: 12px; color: var(--muted); }
.flipper__speed { color: var(--amber); }
.flipper::before {
  /* viewfinder corners */
  content: ""; position: absolute; inset: -10px -10px 22px; pointer-events: none; z-index: 2;
  background:
    linear-gradient(var(--red), var(--red)) top left / 18px 2px,
    linear-gradient(var(--red), var(--red)) top left / 2px 18px,
    linear-gradient(var(--red), var(--red)) top right / 18px 2px,
    linear-gradient(var(--red), var(--red)) top right / 2px 18px,
    linear-gradient(var(--red), var(--red)) bottom left / 18px 2px,
    linear-gradient(var(--red), var(--red)) bottom left / 2px 18px,
    linear-gradient(var(--red), var(--red)) bottom right / 18px 2px,
    linear-gradient(var(--red), var(--red)) bottom right / 2px 18px;
  background-repeat: no-repeat;
}

/* ---------- Contact sheet (paper) ---------- */
.sheet { background: var(--paper); color: var(--paper-ink); }
.sheet .body { color: rgba(27, 24, 21, .7); }
.sheet .kicker { color: var(--red-deep); }
.sheet .h2 em { color: var(--red-deep); }
.sheet::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(27,24,21,.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.steps { list-style: none; padding: 0; margin: 64px 0 0; display: grid; gap: 48px; position: relative; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.step p:not(.step__num) { color: rgba(27, 24, 21, .72); }
.step__num { color: var(--red-deep); margin: 20px 0 6px; font-size: 13px; }
.step__visual {
  position: relative; aspect-ratio: 4 / 3; background: #15130f; border-radius: 3px; padding: 10px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 18px 40px -22px rgba(0,0,0,.6);
}
.step:nth-child(2) .step__visual { transform: rotate(.8deg); }
.step:nth-child(3) .step__visual { transform: rotate(-.6deg); }

/* step 1: grid of frames, most auto-decided */
.mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; height: 100%; }
.mini { position: relative; border-radius: 1px; overflow: hidden; }
.mini .ph { width: 100%; height: 100%; }
.mini.is-auto { opacity: .28; filter: grayscale(.6); }
.mini.is-doubt { outline: 2px solid var(--amber); outline-offset: -2px; }
.mini.is-doubt::after {
  content: "?"; position: absolute; right: 3px; top: 1px;
  font-family: var(--hand); color: var(--amber); font-size: 20px; line-height: 1; font-weight: 700;
}
.step__badge {
  position: absolute; z-index: 2; right: -8px; bottom: -14px; transform: rotate(-4deg);
  font-family: var(--hand); font-weight: 700; font-size: 22px; color: var(--red-deep);
  background: var(--paper); padding: 0 8px; border-radius: 2px;
}

/* step 2: fanned group */
.fan { position: relative; height: 100%; }
.fan .mini { position: absolute; width: 56%; aspect-ratio: 3 / 2; top: 50%; left: 50%; box-shadow: 0 8px 18px rgba(0,0,0,.5); transition: transform .8s var(--ease), opacity .8s; }
.fan .mini .stars-mini {
  position: absolute; left: 4px; bottom: 3px; font-size: 10px; color: var(--amber); letter-spacing: 1px;
  text-shadow: 0 1px 2px #000; opacity: 0; transition: opacity .4s .6s;
}
.fan .mini.is-best { z-index: 5; outline: 2px solid var(--red); outline-offset: 2px; }
.is-in .fan .mini .stars-mini { opacity: 1; }

/* step 3: rejects */
.rejects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: 100%; align-content: center; }
.rejects .mini { aspect-ratio: 3 / 2; filter: grayscale(.8) brightness(.55); transition: filter .6s .9s; }
.rejects .mini.is-rescued { filter: none; }
.rejects .mini .mark--circle { inset: -14% -10%; width: 120%; height: 128%; }
.rejects .mini { overflow: visible; }
.rejects .mini .ph { border-radius: 1px; }
.is-in .mark path { animation: draw .9s var(--ease) .5s forwards; }

/* ---------- Demo viewer ---------- */
.demo { background: var(--ink-2); }
.demo__head { margin-bottom: 40px; }
.viewer {
  background: #0b0a09; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 50px 100px -40px rgba(0,0,0,.9);
}
.viewer:focus-visible { outline-offset: 6px; }
.viewer__bar {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px;
}
.viewer__bar .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: 1px; }
#demoStatus { color: var(--amber); }
.viewer__stage { display: grid; }
@media (min-width: 900px) { .viewer__stage { grid-template-columns: 1fr 240px; } }
.viewer__main { position: relative; aspect-ratio: 3 / 2; background: #000; overflow: hidden; }
.viewer__main .ph { width: 100%; height: 100%; }
.viewer__main .flag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 3px; background: rgba(0,0,0,.6);
}
.viewer__main .flag--pick { background: var(--green); color: var(--ink); }
.viewer__main .flag--reject { background: var(--red); }
.viewer__main .flag--suggest { background: rgba(14,13,12,.75); color: var(--amber); }
.viewer__info { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 16px; align-content: start; }
@media (min-width: 900px) { .viewer__info { border-top: 0; border-left: 1px solid var(--line); padding: 20px; } }
.score { display: grid; gap: 6px; }
.score__label { color: var(--muted); font-size: 11px; }
.score__value { font-family: var(--serif); font-size: 56px; line-height: 1; letter-spacing: -.02em; text-transform: none; }
.score__bar { height: 4px; background: var(--ink-3); border-radius: 2px; overflow: hidden; }
.score__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--amber), var(--red)); transition: width .5s var(--ease); }
.viewer__keys { display: none; gap: 8px; font-size: 10px; color: var(--muted); margin-top: auto; }
.viewer__keys span { display: flex; align-items: center; gap: 8px; }
.viewer__keys kbd { height: 22px; min-width: 22px; font-size: 10px; }
@media (min-width: 900px) { .viewer__keys { display: grid; } .viewer__info { display: flex; flex-direction: column; } }
.viewer__tags { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 11px; }
.viewer__tags dt { color: var(--muted); }
.viewer__tags dd { margin: 0; text-align: right; }
.viewer__tags .good { color: var(--green); }
.viewer__tags .bad { color: var(--red); }
.viewer__film { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.viewer__film::-webkit-scrollbar { display: none; }
.thumb {
  position: relative; flex: 0 0 auto; width: 84px; aspect-ratio: 3 / 2; padding: 0; border: 0; cursor: pointer;
  border-radius: 2px; overflow: hidden; background: #000; opacity: .55; transition: opacity .2s, transform .2s;
}
@media (min-width: 720px) { .thumb { width: 120px; } }
.thumb .ph { width: 100%; height: 100%; }
.thumb.is-active { opacity: 1; outline: 2px solid var(--paper); outline-offset: -2px; }
.thumb.is-pick::after, .thumb.is-reject::after, .thumb.is-suggest::after {
  position: absolute; top: 3px; right: 3px; font-family: var(--mono); font-size: 9px; padding: 1px 4px; border-radius: 2px;
}
.thumb.is-suggest::after { content: "AI"; background: rgba(0,0,0,.7); color: var(--amber); }
.thumb.is-pick::after { content: "PICK"; background: var(--green); color: var(--ink); }
.thumb.is-reject::after { content: "✕"; background: var(--red); color: var(--paper); }
.thumb.is-reject { filter: grayscale(.8) brightness(.6); }
.thumb .stars-mini { position: absolute; left: 4px; bottom: 2px; font-size: 9px; color: var(--amber); text-shadow: 0 1px 2px #000; }
.viewer__controls {
  display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line);
}
.viewer__controls .ctrl--auto { grid-column: 1 / -1; order: 5; }
@media (min-width: 720px) {
  .viewer__controls { grid-template-columns: auto auto auto 1fr auto; }
  .viewer__controls .ctrl--auto { grid-column: auto; order: 0; justify-self: end; }
}
.ctrl {
  appearance: none; border: 1px solid var(--line); background: var(--ink-2); color: var(--paper);
  font: 500 14px var(--sans); border-radius: 8px; padding: 8px 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  transition: background .2s, border-color .2s;
}
.ctrl kbd { height: 22px; min-width: 22px; font-size: 11px; }
.ctrl:hover { background: var(--ink-3); }
.ctrl--pick:hover { border-color: var(--green); }
.ctrl--reject:hover { border-color: var(--red); }
.ctrl--auto { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.ctrl--auto kbd { background: var(--ink); }
.ctrl--auto:hover { background: #fff; }

/* ---------- Taste + control ---------- */
.taste__grid { display: grid; gap: 72px; }
@media (min-width: 900px) {
  .taste__grid { grid-template-columns: 1fr 1fr; gap: 96px 80px; align-items: center; }
  .control { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; column-gap: 80px; align-items: center; }
  .control__copy { grid-column: 2; grid-row: 1; }
  .control > .verdict { grid-column: 1; grid-row: 1; justify-self: center; margin-top: 0; width: 100%; }
}
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 11px; color: var(--paper); }
.learn {
  background: var(--ink-2); border-radius: var(--radius); padding: 24px;
  box-shadow: 0 0 0 1px var(--line);
}
.learn__label { color: var(--muted); font-size: 11px; display: block; margin-bottom: 16px; }
.learn__svg { width: 100%; height: 180px; overflow: visible; }
.learn__grid { stroke: var(--line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.learn__line { fill: none; stroke: var(--red); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-in .learn__line { transition: stroke-dashoffset 1.8s var(--ease); stroke-dashoffset: 0; }
.learn__dot { fill: var(--red); opacity: 0; transition: opacity .4s 1.6s; }
.is-in .learn__dot { opacity: 1; }
.learn__axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-top: 10px; }

.control { display: grid; gap: 0; }
.verdict { position: relative; margin-top: 40px; max-width: 360px; }
.verdict__card { background: var(--paper); color: var(--paper-ink); padding: 10px 10px 14px; border-radius: 3px; transform: rotate(-2deg); box-shadow: 0 30px 60px -25px rgba(0,0,0,.9); }
.verdict__img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 1px; }
.verdict__img .ph { width: 100%; height: 100%; }
.verdict__meta, .verdict__actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; }
.stars { color: #c47a12; font-size: 14px; letter-spacing: 2px; }
.stars i { font-style: normal; opacity: .25; }
.v-ok { background: var(--paper-ink); color: var(--paper); padding: 6px 10px; border-radius: 3px; }
.v-edit { border: 1px solid rgba(27,24,21,.3); padding: 5px 10px; border-radius: 3px; }
.scribble {
  position: absolute; font-family: var(--hand); color: var(--red); font-size: 30px; font-weight: 700;
  transform: rotate(-8deg); right: -10px; top: -26px;
}
@media (min-width: 900px) { .scribble { right: -60px; } }

/* ---------- Groups pile ---------- */
.groups { background: var(--ink); overflow: hidden; }
.pile { position: relative; height: 230px; margin-top: 56px; }
@media (min-width: 900px) { .pile { height: 400px; } }
.pile .mini {
  position: absolute; width: 26%; max-width: 180px; aspect-ratio: 3 / 2; box-shadow: 0 10px 24px rgba(0,0,0,.6);
  transition: transform 1.2s var(--ease), left 1.2s var(--ease), top 1.2s var(--ease);
  border: 3px solid var(--paper); border-radius: 2px;
}
@media (min-width: 900px) { .pile .mini { width: 19%; max-width: 240px; } }
.pile__label {
  position: absolute; font-family: var(--hand); color: var(--red); font-size: 24px; font-weight: 700;
  opacity: 0; transition: opacity .5s 1.1s; white-space: nowrap; transform: rotate(-4deg);
}
.pile.is-grouped .pile__label { opacity: 1; }

/* ---------- Bento ---------- */
.bento { background: var(--ink-2); }
.bento__grid { display: grid; gap: 16px; margin-top: 56px; }
@media (min-width: 900px) {
  .bento__grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(200px, auto); }
  .card--library { grid-column: span 2; grid-row: span 2; }
  .card--edit { grid-column: span 2; grid-row: span 2; }
  .card--stat { grid-column: span 2; }
}
.card { background: var(--ink); border-radius: 6px; padding: 24px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; display: flex; flex-direction: column; gap: 24px; }
.card p { color: var(--muted); }
.card__copy { max-width: 30em; }
.mosaic {
  display: block; flex: 1;
  -webkit-mask: linear-gradient(to bottom, #000 55%, transparent);
  mask: linear-gradient(to bottom, #000 55%, transparent);
  height: 340px; flex: none; overflow: hidden; position: relative; align-content: start;
}
@media (min-width: 900px) { .mosaic { height: 420px; } }
.mosaic__track { display: contents; }
.mosaic .mini { aspect-ratio: 1; }
.mosaic__year { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; color: var(--amber); padding: 8px 0 4px; }
.mosaic-scroll { animation: mosaic 30s linear infinite; display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
@keyframes mosaic { to { transform: translateY(-50%); } }

.editor { display: grid; gap: 12px; flex: 1; }
.editor { align-content: start; }
@media (min-width: 600px) { .editor__panel { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.editor__img { position: relative; aspect-ratio: 3 / 2; border-radius: 3px; overflow: hidden; --split: 50%; }
.editor__img > div { position: absolute; inset: 0; }
.editor__img .ph { width: 100%; height: 100%; }
.editor__before { filter: saturate(.35) contrast(.8) brightness(.85); }
.editor__after { clip-path: inset(0 0 0 var(--split)); }
.editor__mask {
  background: repeating-linear-gradient(45deg, rgba(230,59,46,.32) 0 3px, transparent 3px 9px);
  clip-path: polygon(var(--split) 0, 100% 0, 100% 56%, 88% 55%, 78% 51%, 68% 50%, 60% 45%, 54% 37%, var(--split) 41%);
  mix-blend-mode: screen; opacity: .9; animation: maskPulse 3s ease-in-out infinite;
}
@keyframes maskPulse { 50% { opacity: .35; } }
.editor__handle { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: var(--paper); translate: -1px 0; }
.editor__handle::after { content: "◂▸"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; background: var(--paper); color: var(--ink); font-size: 10px; padding: 4px 5px; border-radius: 999px; }
.editor__panel { display: grid; gap: 12px; align-content: start; font-size: 10px; color: var(--muted); }
.editor__panel label { display: grid; gap: 6px; }
.editor__panel span { height: 3px; background: var(--ink-3); border-radius: 2px; position: relative; }
.editor__panel i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); background: var(--paper); border-radius: 2px; }
.editor__panel i::after { content: ""; position: absolute; right: -5px; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); }
.editor__panel label:nth-child(3) i { background: var(--red); }
.editor__panel label:nth-child(3) i::after { background: var(--red); }

.card--stat { justify-content: space-between; }
.card--stat .mono { color: var(--muted); max-width: 26em; line-height: 1.6; }
.card .big-num { font-family: var(--serif); font-size: clamp(88px, 18vw, 160px); line-height: .85; letter-spacing: -.04em; color: var(--paper); }
.card--red { background: var(--red); box-shadow: none; }
.card--red .mono, .card.card--red .big-num { color: var(--ink); }

/* ---------- Lightroom ---------- */
.routes { display: grid; gap: 16px; margin-top: 56px; }
@media (min-width: 900px) { .routes { grid-template-columns: 1fr 1fr; gap: 24px; } }
.route { border: 1px solid var(--line); border-radius: 6px; padding: 24px; display: grid; gap: 24px; }
.route p:last-child { color: var(--muted); }
.route__tag { color: var(--amber); }
.route__diagram { display: flex; align-items: center; gap: 10px; }
.node {
  flex: 0 0 auto; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  padding: 14px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--ink-2);
}
.node--marey { background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 22px; text-transform: none; letter-spacing: 0; padding: 8px 16px; }
.wire { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.wire i { position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, var(--red), transparent); animation: wire 1.8s linear infinite; }
@keyframes wire { from { left: -30%; } to { left: 100%; } }
.wire::after { content: ""; position: absolute; right: 0; top: -4px; border: 5px solid transparent; border-left-color: var(--red); border-right: 0; }

/* ---------- Fit / ring ---------- */
.fit { background: var(--paper); color: var(--paper-ink); }
.fit .body { color: rgba(27, 24, 21, .7); }
.fit .kicker { color: var(--red-deep); }
.fit .h2 em { color: var(--red-deep); }
.fit__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .fit__grid { grid-template-columns: 0.9fr 1.1fr; gap: 96px; } }
.ring { position: relative; width: min(100%, 420px); margin: 0 auto; aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: rgba(27,24,21,.12); stroke-width: 14; stroke-dasharray: 2 3; }
.ring__fg { fill: none; stroke: var(--red); stroke-width: 14; stroke-dasharray: 0 100; transition: stroke-dasharray 1.8s var(--ease); }
.is-in .ring__fg, .ring.is-in .ring__fg { stroke-dasharray: 80 100; }
.ring__num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: clamp(96px, 26vw, 168px); letter-spacing: -.05em; line-height: 1; }
.ring__num small { font-size: .32em; align-self: center; margin: -1.4em 0 0 .08em; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.compare ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 11px; line-height: 1.4; }
.compare li { padding-left: 18px; position: relative; }
.compare li::before { content: "✓"; position: absolute; left: 0; color: var(--red-deep); }
.compare__col--not li { color: rgba(27,24,21,.55); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.compare__col--not li::before { content: "✕"; }
.compare__head { font-weight: 500; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(27,24,21,.2); }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .faq__grid { grid-template-columns: 1fr 1.4fr; gap: 80px; } }
.faq__list details { border-top: 1px solid var(--line); }
.faq__list details:last-child { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer; padding: 22px 36px 22px 0; position: relative;
  font-size: 18px; font-weight: 500;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%;
  font-family: var(--mono); font-size: 20px; color: var(--red); transition: transform .3s var(--ease);
}
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list details p { color: var(--muted); padding: 0 0 22px; max-width: 36em; }

/* ---------- Final ---------- */
.final { position: relative; min-height: 90vh; display: grid; place-items: center; overflow: hidden; text-align: center; padding: 120px var(--gutter); background: #120605; }
.final__frames { position: absolute; inset: -10%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; transform: rotate(-8deg) scale(1.1); opacity: .3; filter: grayscale(.2); }
@media (min-width: 900px) { .final__frames { grid-template-columns: repeat(8, 1fr); } }
.final__frames .mini { aspect-ratio: 3 / 2; }
.final::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(60% 55% at 50% 50%, rgba(18,6,5,.92) 30%, rgba(18,6,5,.4) 100%);
}
.final::after {
  /* safelight glow */
  content: ""; position: absolute; z-index: 1; width: 120vmax; height: 120vmax; left: 50%; top: 100%; translate: -50% -50%;
  background: radial-gradient(circle, rgba(230,59,46,.35), transparent 55%);
  pointer-events: none;
}
.final__inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 24px; max-width: 760px; }
.final .kicker { margin: 0; }
.final__title { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 13vw, 150px); line-height: .9; letter-spacing: -.035em; }
.final .body { margin-bottom: 12px; }

/* ---------- Legal pages ---------- */
.legal { padding: 120px 0 96px; }
@media (min-width: 900px) { .legal { padding: 160px 0 140px; } }
.legal__wrap { max-width: 820px; }
.legal__head { margin-bottom: 40px; }
.legal__head .h2 { margin-bottom: 16px; }
.legal__summary {
  background: var(--paper); color: var(--paper-ink); border-radius: 4px;
  padding: 24px; margin-bottom: 56px; transform: rotate(-.6deg);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
}
.legal__summary-title { color: var(--red-deep); margin-bottom: 12px; }
.legal__summary ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal__body { color: var(--muted); font-size: 16px; }
.legal__body h2 {
  font-family: var(--serif); font-weight: 400; color: var(--paper);
  font-size: clamp(28px, 5vw, 36px); line-height: 1.1; letter-spacing: -.01em;
  margin: 48px 0 16px; padding-top: 24px; border-top: 1px solid var(--line);
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body p + p { margin-top: 14px; }
.legal__body ul { padding-left: 20px; margin: 14px 0; display: grid; gap: 10px; }
.legal__body strong { color: var(--paper); font-weight: 520; }
.legal__body a { color: var(--paper); text-decoration-color: var(--red); text-underline-offset: 3px; }
.todo { background: rgba(240, 164, 58, .18); color: var(--amber); padding: 0 4px; border-radius: 2px; }
.footer__links a[aria-current] { color: var(--paper); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1fr auto; } }
.footer__note { color: var(--muted); margin-top: 16px; max-width: 30em; font-size: 14px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 24px; align-content: start; }
.footer__links a { text-decoration: none; color: var(--muted); }
.footer__links a:hover { color: var(--paper); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; color: var(--muted); font-size: 10px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.strip.reveal { transform: rotate(-2deg) translateY(40px); }
.strip.reveal.is-in { transform: rotate(-2deg); }
@media (min-width: 900px) {
  .strip.reveal { transform: rotate(-1.5deg) translateY(40px); }
  .strip.reveal.is-in { transform: rotate(-1.5deg); }
}

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