/* RAF Film Lab — a darkroom: warm blacks, paper whites, and the orange of an unwound film leader. */
:root {
  --bg: #121110;
  --bg-alt: #1a1816;
  --surface: #201e1b;
  --surface-2: #2a2723;
  --text: #f4efe7;
  --muted: #b3aa9d;
  --line: #34302b;
  --accent: #ff8a3d;
  --accent-deep: #ff9d5c;
  --accent-ink: #1b1007;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 18px 48px rgba(0, 0, 0, .45);
  --radius: 18px;
  --max: 1160px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf7f2;
    --bg-alt: #f2ede5;
    --surface: #ffffff;
    --surface-2: #f6f1ea;
    --text: #1d1a16;
    --muted: #6a6157;
    --line: #e5ddd2;
    --accent: #e8661c;
    --accent-deep: #c9520e;
    --accent-ink: #ffffff;
    --shadow: 0 1px 2px rgba(29, 26, 22, .06), 0 14px 36px rgba(29, 26, 22, .10);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; letter-spacing: -.02em; line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.3rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 760; }
h3 { font-size: 1.22rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd {
  font: .88em/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 760; font-size: 1.05rem; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 560; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }

/* Sections */
section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 0 40px; }
.section-head.center { margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow { color: var(--accent-deep); font-size: .82rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .6em; }

/* Hero */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .intro { max-width: 820px; }
.badge {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font-size: .85rem; font-weight: 600; margin-bottom: 20px;
}
.glow { color: var(--accent); }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 720px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.platforms { color: var(--muted); font-size: .92rem; }
.hero-shot { margin-top: 48px; }
.window {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #1c1b19;
}

/* Cards */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card p { color: var(--muted); margin: 0; }
.card h3 { margin-bottom: .4em; }
.ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); margin-bottom: 16px;
}
.ico svg { width: 24px; height: 24px; }

/* Film gallery */
.gallery { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.gallery-stage { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: #000; aspect-ratio: 3 / 2; }
.gallery-stage img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
.gallery-caption {
  position: absolute; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: .9rem; font-weight: 650;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-group { margin-bottom: 18px; }
.chip-group h3 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.gallery-note { color: var(--muted); font-size: .9rem; margin-top: 8px; }

/* Before/after comparison */
.compare {
  position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 3 / 2; background: #000; touch-action: pan-y; user-select: none;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--split, 50%)); }
.compare .handle {
  position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); pointer-events: none;
}
.compare .handle::after {
  content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #222;
  display: grid; place-items: center; font-size: 18px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .tag {
  position: absolute; top: 14px; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: rgba(0, 0, 0, .6); color: #fff; pointer-events: none;
}
.compare .tag.l { left: 14px; }
.compare .tag.r { right: 14px; }
.pairs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.pair figure { margin: 0; }
.pair .two { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 10px; overflow: hidden; }
.pair img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pair figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.pair figcaption strong { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat b { display: block; font-size: 2.2rem; letter-spacing: -.02em; color: var(--accent); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .95rem; }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 36px 0; }
.feature.flip > :first-child { order: 2; }
.feature ul { padding-left: 1.1em; color: var(--muted); }
.feature li { margin: .45em 0; }
.feature li strong { color: var(--text); }
.feature-art img { border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* Privacy band */
.privacy-band {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  background: linear-gradient(135deg, #2a1608, #3a1d07 55%, #1a0f06); color: #f7ecdf;
  border-radius: 24px; padding: 48px; box-shadow: var(--shadow);
}
.privacy-band p { color: #e3cfba; }
.privacy-band a { color: #ffbe8c; }
.privacy-band ul { margin: 0; padding-left: 1.1em; color: #f1e2d2; }
.privacy-band li { margin: .5em 0; }

/* Final CTA + beta form */
.cta-final { text-align: center; }
.cta-final img { margin: 0 auto 20px; border-radius: 23%; box-shadow: var(--shadow); }
.cta-final > .wrap > p { color: var(--muted); max-width: 640px; margin-left: auto; margin-right: auto; }
.beta-form { max-width: 520px; margin: 28px auto 12px; }
.beta-row { display: flex; gap: 10px; }
.beta-row input {
  flex: 1; min-width: 0; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit;
}
.beta-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cf-turnstile { margin: 14px 0 0; min-height: 65px; }
.beta-status { min-height: 1.6em; margin: 10px 0 0; color: var(--muted); }
.beta-status.ok { color: #63c27c; font-weight: 600; }
.beta-note { font-size: .9rem; color: var(--muted); }

/* Docs (guide, privacy) */
.doc { max-width: 760px; }
.doc h2 { font-size: 1.6rem; margin-top: 1.8em; }
.doc h3 { margin-top: 1.4em; }
.doc li { margin: .4em 0; }
.doc ul, .doc ol { color: var(--text); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 24px; margin: 24px 0 8px; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; }
.toc a { text-decoration: none; }
.note { border-left: 3px solid var(--accent); background: var(--surface); padding: 12px 18px; border-radius: 0 12px 12px 0; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 16px 0 24px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 650; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
td.num { font-variant-numeric: tabular-nums; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.legal { flex-basis: 100%; font-size: .8rem; opacity: .8; margin: 6px 0 0; }

@media (max-width: 900px) {
  section { padding: 64px 0; }
  .pillars, .grid-3 { grid-template-columns: 1fr; }
  .grid-4, .pairs, .stats { grid-template-columns: 1fr 1fr; }
  .gallery, .feature, .privacy-band { grid-template-columns: 1fr; }
  .feature.flip > :first-child { order: 0; }
  .privacy-band { padding: 32px 24px; }
  .toc ol { columns: 1; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .grid-4, .pairs, .stats { grid-template-columns: 1fr; }
  .beta-row { flex-direction: column; }
  .hide-sm { display: none; }
  .nav { gap: 16px; }
}
