/* ============================================================
   Oqra — official site
   ============================================================
   Design tokens MIRROR the app (Packages/FilmBoUI Tokens.swift +
   FilmBoShared/CameraChrome.swift):

     · Pure-black canvas stepped into near-black surfaces — depth
       comes from gray density + hairlines + blur, never cards or
       rounded corners.
     · SF Pro (system), LIGHT as the default weight; Regular only
       for CTAs / headings. No monospace, no bold.
     · Two-tone ink (bright value #ededed / dim label #555). COLOR
       comes ONLY from the visible SPECTRUM (the spectrogram's
       RainbowBar, 380–700nm) + the RGB logo triad — never a flat
       accent. The app's gold is utilitarian-only and is absent here.
       Primary buttons use the app's active look: bright-ink fill +
       black text (SegmentedSelector), not a colored fill.
   ============================================================ */

:root {
  /* ---- palette (exact app values) ---- */
  --bg:           #000000;   /* canvas */
  --bg-elev:      #0a0a0a;   /* surface */
  --bg-surface:   #141414;   /* surfaceAlt */
  --rule:         #151515;   /* divider — soft hairline */
  --rule-bright:  #1e1e1e;   /* dividerStrong — visible hairline */
  --hairline:     rgba(255, 255, 255, 0.12);   /* light divider — matches the current chrome */

  /* Frosted-glass surface — shared by the nav, feature cards, pickers,
     and bordered buttons. */
  --glass:        rgba(0, 0, 0, 0.72);
  /* Same frosted surface with the blur dropped. Over the dark page (and the
     already-soft page light) a 12px blur does no visible work, while the
     saturate keeps the faint tint pixel-identical. The nav skips even this:
     it covers photos on every scroll frame, so it gets no backdrop pass at all. */
  --glass-tint:   saturate(140%);

  --ink:          #ededed;   /* value — bright/primary text */
  --ink-dim:      #b4b4b4;   /* body copy (web-readability tier) */
  --ink-faint:    #8a8a8a;   /* dim caps labels, tags, nav — lightened from the
                                app's #555 to clear WCAG AA on pure black */
  --ink-ghost:    #757575;   /* faintest micro-copy — AA-safe (app uses #3a3a3a) */

  /* The app's COLOR IDENTITY is the visible spectrum (the spectrogram's
     RainbowBar, 380–700nm) — NOT a flat accent. Exact nm→RGB stops from
     FilmBoUI Tokens.swift. Used as the singular color expression; chrome
     otherwise stays black + gray. Gold is utilitarian-only in the app and is
     intentionally absent here. */
  --spectrum: linear-gradient(90deg,
    #6400b4 0%,    /* 380nm */ #0000ff 14.3%,  /* 440 */ #00b4ff 28.6%, /* 490 */
    #00ff80 42.9%, /* 510 */   #b4ff00 57.1%,  /* 560 */ #ffdc00 71.4%, /* 590 */
    #ff8000 85.7%, /* 620 */   #c80000 100%);  /* 700nm */
  --live:       #00c8c8;   /* cyan — app "live" indicator (utilitarian) */
  --destructive:#f23c36;   /* app filmic-red — errors only (utilitarian) */

  /* ---- type: SF Pro / system, light-first (no mono) ---- */
  --font-sans:    -apple-system, BlinkMacSystemFont, "SF Pro Text",
                  "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  /* Page and section titles, as in the app. ui-serif asks Apple devices for their built-in
     New York; its license doesn't allow shipping the font, so others get the fallback. */
  --font-display: ui-serif, "New York", "Playfair Display", serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, monospace;   /* datasheet voice */

  --w-light:   300;
  --w-regular: 400;

  /* ---- rhythm ---- */
  --gutter:   clamp(20px, 4vw, 56px);
  --col:      min(720px, calc(100vw - 2 * var(--gutter)));
  --col-wide: min(1120px, calc(100vw - 2 * var(--gutter)));

  /* ---- shared scroll-transition rhythm (unitless vh) ----
     HOLD = dwell scroll distance on each stage; FADE = crossfade distance
     between stages; TAIL = extra dwell AFTER the final phase, before the pinned
     section releases into the next. Read by hero.js, and the pinned height
     derives from them (hero = 2·HOLD + FADE + TAIL of travel, atop one viewport). */
  --scroll-hold: 28;
  --scroll-fade: 42;
  --scroll-tail: 30;
}

/* Headline fallback where New York isn't available. Browsers only fetch it if
   ui-serif and "New York" both miss. Licensed under the OFL (see assets/fonts). */
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }


/* Page light: a blurred copy of the photo on screen, behind all content. light.js picks
   the image and hero.js drives the layer's opacity. Hidden to start, so the hero stays
   on black and the page stays black without JavaScript or with reduced motion.
   Each image is 96 by 60 and keeps its own layer, so the GPU stretches a tiny texture
   rather than holding a screen-sized one. */
.page-light {
  position: fixed;
  inset: 0;
  z-index: -1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}
.page-light img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  will-change: opacity;
}
/* The hidden half of a crossfade, so it costs nothing at rest. */
.is-idle { visibility: hidden; }

body {
  margin: 0;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: var(--w-regular);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.6);
  transition: border-color 150ms ease-out, color 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  a:hover { border-bottom-color: #fff; }
}

/* Chromatic text selection — the spectrum, even when you highlight. */
::selection { background: #00b4ff; color: #000; }
::-moz-selection { background: #00b4ff; color: #000; }

/* ---------- a11y / utilities ---------- */

/* One visible keyboard-focus ring for every focusable thing (links, buttons,
   the before/after slider). */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* Anchored sections clear the sticky nav when jumped to. */
[id] { scroll-margin-top: 84px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- layout primitives ---------- */

.container      { width: var(--col);      margin: 0 auto; }
.container--wide{ width: var(--col-wide); margin: 0 auto; }

section { padding: clamp(72px, 11vh, 132px) 0; position: relative; }

/* Fade-in on scroll. reveal.js adds .reveal (hidden) then .is-visible when the
   element enters the viewport — so it's a no-op without JS (stays visible) and
   under reduced motion (reveal.js opts out). */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

section.divided::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  /* Each divided section's hairline frames its OWN content width, so it never
     overhangs. */
  width: var(--section-col, var(--col-wide));
  height: 1px;
  background: transparent;
}
#features { --section-col: var(--col-wide); }   /* develop stays the wide beat */
#compare  { --section-col: var(--col); }          /* frames its 720 text + centered square */
#support  { --section-col: var(--col); }          /* reading column */

/* ---------- shared label / type ---------- */

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: var(--w-regular);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 26px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.8);
}

h1, h2, h3, h4 { margin: 0 0 0.5em; color: var(--ink); }
h1, h2 {
  font-family: var(--font-display);
  /* Hold New York's display cut at phone sizes too, as in the poster. */
  font-variation-settings: "opsz" 80;
}

h1 {
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: var(--w-regular);        /* a touch more weight — present, not soft */
}

h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: var(--w-regular);        /* New York's lightest */
}

h3 {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: var(--w-regular);
  color: var(--ink);
  margin-bottom: 0.9em;
}

p { margin: 0 0 1.25em; color: var(--ink-dim); }
p.lead {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  font-weight: var(--w-light);
  color: var(--ink);
  letter-spacing: -0.005em;
}
strong { color: var(--ink); font-weight: var(--w-regular); }

/* ---------- top nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  /* Solid, not --glass: with no blur, anything behind it would show through sharp. */
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
/* Signature: the visible-spectrum ruler (the app's core metaphor) as a thin
   hairline under the nav — the one place color lives, on every page. */
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--spectrum);
}
/* The whole nav hides while the hero ("landing") is in view — the hero carries
   its own brand lockup, so the bar would only duplicate it. nav.js toggles
   .is-hidden and slides it back in once you scroll past the hero; .nav--anim
   gates the transition so the load state is set instantly (no slide on first
   paint). A keyboard Tab (:focus-within) also brings it back, so its links are
   never invisible-but-focusable. Pages with no hero (privacy, 404) never get
   .is-hidden — the nav stays put there. */
.nav--anim { transition: transform 0.35s ease, opacity 0.35s ease; }
.nav.is-hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.nav.is-hidden:focus-within { transform: none; opacity: 1; pointer-events: auto; }

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0.32em;
  font-weight: var(--w-regular);
  color: var(--ink);
  border: 0;
}
.nav__brand:hover { color: var(--ink); border: 0; }
/* The mark is the spectrum capsules (transparent PNG) — sits straight on the
   black nav with no edge. Non-square, so size by height and let width follow. */
.nav__logo { height: 32px; width: auto; display: block; }
.nav__wordmark { height: 14px; width: auto; display: block; }

.nav__links {
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 11px;
  font-weight: var(--w-light);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav__links a {
  color: var(--ink-faint);
  border: 0;
  display: inline-flex;
  align-items: center;
  min-height: 36px;   /* roomier tap target */
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--ink); }
}
.nav__links a.accent { color: var(--ink); }

@media (max-width: 560px) {
  .nav__links a.is-secondary { display: none; }
}

/* ---------- buttons (sharp rectangles, 0 radius) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: var(--w-regular);
  padding: 15px 24px;
  border: 1px solid var(--rule-bright);
  border-radius: 0;                      /* hard-edged */
  color: var(--ink);
  background: var(--glass);       /* frosted glass, like the nav/cards */
  -webkit-backdrop-filter: var(--glass-tint);
  backdrop-filter: var(--glass-tint);
  cursor: pointer;
  transition: border-color 150ms ease-out, background 150ms ease-out, color 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--ink-faint); color: var(--ink); }
}

/* Primary = the app's active-segment look: solid bright-ink fill, black text
   (SegmentedSelector active state) — NOT a colored accent. */
.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #000;
}
@media (hover: hover) and (pointer: fine) {
.btn--primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000;
  /* a faint spectrum bloom on the install CTA */
  box-shadow: 0 0 0 1px rgba(255,255,255,0.4), 0 6px 30px -8px rgba(0,180,255,0.55);
}
}

/* Disabled / "coming soon" CTA — reads as inert chrome, not active gold */
.btn--soon,
.btn[aria-disabled="true"] {
  background: transparent;
  border-color: var(--rule-bright);
  color: var(--ink-faint);
  cursor: default;
  pointer-events: none;
}
.btn--soon .btn__note {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-ghost);
}

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}
/* Support's lone email button sits between two paragraphs — base .btn-row only
   has top margin, so balance the bottom so it reads centred between them. */
#support .btn-row { margin-bottom: 36px; }

/* ---------- hero ---------- */

.hero {
  /* --u is one poster pixel; --type is the headline size, and the lockup scales
     with it in em. Tall windows: the camera device runs edge to edge when height allows. */
  --u: min(100vw / 1879.7, 50svh / 1358.6);
  --type: min(12.5vw, 8svh);
  margin-top: -73px;           /* the hidden nav still reserves its height in flow */
  padding: 0 0 clamp(56px, 9vh, 104px);
  overflow-x: clip;
}
/* Taller than square: two full-screen frames. hero.js pins them and crossfades on
   scroll; without JS or with reduced motion they simply stack. */
.hero__frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
}
.hero__frame--a { gap: clamp(22px, 4svh, 40px); padding-top: clamp(24px, 6svh, 64px); }
.hero__frame--b { gap: clamp(20px, 3.5svh, 32px); }
.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.26em;
  width: 6.56em;
  font-size: var(--type);
}
.hero__copy h1 {
  margin: 0;
  font-size: 1em;
  font-weight: var(--w-regular);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}
.hero__brand { display: flex; align-items: center; }
/* The PNG carries padding for its bloom, so pull it out to align the pills. */
.hero__mark { width: 1.394em; height: auto; margin: 0 0.185em 0 -0.22em; }
.hero__wordmark { width: 1.962em; height: 0.439em; }
.hero__copy .btn-row { margin-top: 0.1em; }
.hero__copy .btn { letter-spacing: 0.12em; white-space: nowrap; }

.hero__device { display: block; height: auto; max-width: none; }
.hero__device--camera { width: calc(1879.7 * var(--u)); }
.hero__device--edit { width: auto; height: min(128vw, calc(100svh - 250px)); }
.hero__lead.lead { width: min(calc(6.56 * var(--type)), 620px); margin: 0; }

.hero.is-pinned .hero__stage {
  height: calc((2 * var(--scroll-hold) + var(--scroll-fade) + var(--scroll-tail)) * 1svh + 100svh);
}
.hero.is-pinned .hero__pin {
  position: sticky;
  top: 0;
  display: grid;
  height: 100svh;
}
.hero.is-pinned .hero__frame { grid-area: 1 / 1; min-height: 0; will-change: opacity; }
.hero.is-pinned .hero__frame--b { opacity: 0; }

.hero__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: calc(6.56 * var(--type));
  margin: 0 auto;
  padding-top: clamp(24px, 4vh, 48px);
}

/* Square or wider keeps the poster's row, whatever the size. The camera's image
   overflows its layout box and sits above the row's centre, as in the poster. */
@media (min-aspect-ratio: 1/1) {
  .hero {
    --u: min(83vw / 4363, 69svh / 2030.32, 0.6px);
    --type: calc(200 * var(--u));
  }
  .hero__pin, .hero__frame { display: contents; }
  .hero__stage {
    display: grid;
    grid-template-areas: "edit copy camera" "lead lead lead";
    grid-template-columns: auto auto auto;
    grid-template-rows: 100svh auto;
    justify-content: center;
    align-items: center;
    column-gap: calc(238 * var(--u));
    padding-left: calc(58 * var(--u));
  }
  .hero__copy { grid-area: copy; }
  .hero__device--edit { grid-area: edit; width: calc(984.723 * var(--u)); height: auto; }
  .hero__device--camera {
    grid-area: camera;
    margin: 0 calc(-144.4 * var(--u)) calc(241.8 * var(--u)) calc(-145.3 * var(--u));
  }
  .hero__lead.lead {
    grid-area: lead;
    justify-self: center;
    width: min(620px, var(--col));
    margin-left: calc(-58 * var(--u));
    padding-top: clamp(40px, 8vh, 88px);
    text-align: center;
  }
  .hero__intro { align-items: center; width: var(--col); padding-top: 24px; text-align: center; }
}
/* Small row: use more of the width, and fit the button to the centre column so it
   wraps rather than running into the camera. */
@media (min-aspect-ratio: 1/1) and (max-width: 1100px) {
  .hero { --u: min(90vw / 4363, 69svh / 2030.32); }
  .hero__copy .btn-row { width: 100%; }
  .hero__copy .btn {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-align: center;
    white-space: normal;
    text-wrap: balance;
  }
}
/* Sideways phones have no height to spare, so let the row fill more of it. */
@media (min-aspect-ratio: 1/1) and (max-height: 500px) {
  .hero { --u: min(83vw / 4363, 84svh / 2030.32); }
  .hero__copy .btn { padding: 9px 12px; font-size: 10px; }
}

/* Capability chips — hairline-divided mono row, the app's datasheet voice. */
.speclist {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.speclist li { padding: 0 14px; border-left: 1px solid var(--rule-bright); }
.speclist li:first-child { padding-left: 0; border-left: 0; }

/* Reassurance at the install decision. */
.hero__free {
  margin: 16px 0 0;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--ink-faint);
}
/* Device requirement — quiet, sets expectations before the install decision. */
.hero__req {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-ghost);
}

/* ---------- immersive sample gallery (shot on Oqra) ----------
   Native paging in the same 3:4 frame. Without JS only the first image shows;
   with JS the browser owns finger tracking, momentum and page snapping. */
.gallery { margin: 0; padding-top: clamp(40px, 7vh, 88px); }
.gallery__title { text-align: center; margin: 0 0 24px; padding: 0 var(--gutter); }
.gallery__stage {
  position: relative;
  width: 100%;
  max-width: calc(82vh * 3 / 4);
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg);
}
.gallery__img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}
.gallery__img.is-active { display: block; }
.gallery.is-scrollable .gallery__stage {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;   /* JS requests smooth arrows; auto remains instant */
  scrollbar-width: none;
  touch-action: auto;      /* retain vertical page scrolling and pinch zoom */
}
.gallery.is-scrollable .gallery__stage::-webkit-scrollbar { display: none; }
.gallery.is-scrollable .gallery__img {
  display: block;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.gallery__stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 18px var(--gutter);
}
.gallery__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--rule-bright);
  border-radius: 0;          /* hard-edged */
  background: var(--glass);   /* frosted glass, like the nav/cards/buttons */
  -webkit-backdrop-filter: var(--glass-tint);
  backdrop-filter: var(--glass-tint);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 150ms ease-out, color 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .gallery__nav:hover { border-color: var(--ink-faint); }
}
.gallery__nav svg { display: block; width: 13px; height: 13px; }
.gallery__counter {
  min-width: 5.5em;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

/* ---------- feature grid (hairline-separated cells) ---------- */

/* "Built for iPhone" (#native): a three-up grid of cards, each led by a
   screenshot banner of Oqra's own UI that bleeds to the card top and fades into
   the copy below. */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  /* faint translucent hairline grid (lets the page glow seep through the frost) */
  background: var(--hairline);
  border: 1px solid var(--hairline);
  margin-top: 8px;
}
.feature {
  /* same frosted infill as the floating nav bar (blur dropped — see --glass-tint) */
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-tint);
  backdrop-filter: var(--glass-tint);
  padding-bottom: clamp(24px, 2.6vw, 32px);
  overflow: hidden;
}
.feature__banner {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  margin-bottom: clamp(16px, 2vw, 22px);
  /* Longer, eased top + bottom fade — a gradual S-curve falloff (extra mid
     stops) instead of a hard linear band, so the edges melt out smoothly. The
     focal control stays in the solid 32–68% middle. */
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%, rgba(0,0,0,0.12) 9%, rgba(0,0,0,0.5) 18%, #000 32%,
    #000 68%, rgba(0,0,0,0.5) 82%, rgba(0,0,0,0.12) 91%, transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0%, rgba(0,0,0,0.12) 9%, rgba(0,0,0,0.5) 18%, #000 32%,
    #000 68%, rgba(0,0,0,0.5) 82%, rgba(0,0,0,0.12) 91%, transparent 100%);
}
/* Both shots are pre-cropped to 2:1 with the focal control centred and the same
   scale (focus-centred, OOB padded transparent), so a plain centred cover is all
   that's needed — no per-card object-position. */
.feature__banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.feature__text { padding: 0 clamp(22px, 2.4vw, 28px); }
.feature p { margin-bottom: 0; font-size: 15.5px; }

/* 3 cards don't divide into 2 columns (leaves an empty cell), so go straight
   from 3-up to a single column (3 rows) on narrow / portrait devices. */
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

#native .lead { max-width: 600px; }
#native .features { margin-top: clamp(24px, 3vw, 40px); }

/* Trademark attribution — required when naming Apple/Adobe features. */
/* Footnote star mark + the disclaimer it points to, under the feature row. */
.ref { color: var(--ink-faint); }
.features-note {
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}
.legal-note {
  margin: clamp(18px, 2.2vw, 24px) 0 0;
  max-width: 760px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink-ghost);
}

/* features section: the hybrid story leads, then two cards.
   The highlight headline IS the section's <h2>; the lead is held to a
   readable measure so it doesn't run the full wide column. */
.features--two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 540px) { .features--two { grid-template-columns: 1fr; } }

/* ---------- expandable depth on a feature card (native <details>, no JS) ----------
   Surface stays one concise line; the engine intro / build story lives behind a
   tap. Hard-edged: a hairline rule, an uppercase summary row, a +/− marker. */
.feature .more { margin-top: 20px; border-top: 1px solid var(--rule-bright); }
.feature .more > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  cursor: pointer;
  font-size: 11px;
  font-weight: var(--w-regular);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 150ms ease-out;
}
.feature .more > summary::-webkit-details-marker { display: none; }
.feature .more > summary::after {
  content: "+";
  font-size: 15px;
  line-height: 1;
  color: var(--ink-faint);
  transition: color 150ms ease-out;
}
.feature .more[open] > summary::after { content: "\2013"; }   /* en-dash minus */
.feature .more > summary:hover,
.feature .more > summary:hover::after { color: var(--ink); }
.more__body { padding-top: 18px; }
.more__body p { margin-bottom: 0; font-size: 14.5px; }

/* ---------- long-form legal / support prose ---------- */

/* `.prose` is used as in-page sections now (always paired with `.divided`),
   so section padding handles spacing — no standalone top pad. */
.prose h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 0.3em;
}
.prose .updated {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 48px;
}
/* Subsection heads inside a prose section (the section TITLE is a normal
   big <h2>; these are <h3>). */
.prose h3 {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: var(--w-regular);
  color: var(--ink);
  margin-top: 48px;
  margin-bottom: 14px;
}
/* Body copy only — must NOT restyle component tokens (.tag, .lead) that happen
   to be <p>s inside a prose section, or they silently grow (specificity: a bare
   `.prose p` beats `.tag`/`.lead`). Tokens stay context-independent. */
.prose p:not(.tag):not(.lead), .prose li { color: var(--ink-dim); font-size: 16.5px; }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 0.6em; }
.prose a { word-break: break-word; }

/* ---------- collapsible FAQ (#support) — native <details>, no JS ---------- */
.faq { margin-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--hairline); }
.faq__item { border-bottom: 1px solid var(--hairline); }
.faq__item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: var(--w-light);
  line-height: 1.35;
  color: var(--ink);
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
  content: "+";
  flex: none;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-faint);
}
.faq__item[open] > summary::after { content: "\2212"; }   /* minus */
.faq__a { padding: 0 0 20px; }
.faq__a p { margin: 0; }

/* ---------- before / after reveal (#compare) ---------- */

.ba {
  position: relative;
  width: 100%;
  /* Centered square within the 720 reading column; capped by viewport height
     too so a 1:1 square never towers past the fold on a laptop. Reaches the
     full column width on tall screens, sits narrower (centered) on short ones. */
  max-width: min(var(--col), 66vh);
  margin: 8px auto 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--rule-bright);
  background: var(--bg-elev);
  user-select: none;
  -webkit-user-select: none;
  /* Allow vertical scroll over the comparator; only the handle owns the
     gesture (touch-action: none on .ba__handle) so a swipe scrolls the page
     instead of snapping the divider. */
  touch-action: pan-y;
  cursor: ew-resize;
  outline: none;
}
.ba:focus-visible { border-color: var(--ink-faint); }

.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
}
/* The "before" sits on top, clipped to the left of the split. */
.ba__before { clip-path: inset(0 calc(100% - var(--split)) 0 0); }

.ba__line {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--split);
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  pointer-events: none;
}
/* Shared drag button — used by BOTH the A/B comparator (.ba__handle) and the
   develop scrubber (.develop__scrub-handle) so the two are identical: a
   hard-edged square, translucent over a backdrop blur, a 1px --ink border and
   a centered ‹ › glyph. Position/gesture specifics live on each below. */
.ba__handle, .develop__scrub-handle {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: ew-resize;
}
/* Affordance: brighten the border on hover; go solid + "grabbing" while
   dragging (compare.js / stepper.js toggle .is-grabbing on the control). No
   scale-bump — the hard-edged datasheet handle stays put. */
.ba__handle:hover, .develop__scrub-handle:hover { border-color: #fff; }
.ba.is-grabbing .ba__handle,
.develop__scrub.is-grabbing .develop__scrub-handle {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.82);
  cursor: grabbing;
}
.ba__handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* The ONLY drag target: re-enable pointer events (the line is inert) and
     own the gesture so dragging the divider never scrolls the page. */
  pointer-events: auto;
  touch-action: none;
}
/* Roomier touch target without changing the visual size. */
.ba__handle::before { content: ""; position: absolute; inset: -13px; }

.ba__label {
  position: absolute;
  top: 12px;
  font-size: 10px;
  font-weight: var(--w-regular);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.55);
  padding: 5px 9px;
  pointer-events: none;
}
.ba__label--l { left: 12px; }
.ba__label--r { right: 12px; }

/* ---------- segmented selector (mirrors the app's SegmentedSelector) ---------- */

.ba__controls {
  max-width: min(var(--col), 66vh);   /* track the comparator width above */
  margin: 18px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* The selected film's one-line identity (updated by compare.js). */
.ba__note {
  margin: 2px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-faint);
}
.seg {
  display: flex;
  gap: 1px;                  /* the 1px gap IS the divider, like the app */
}
.seg button {
  flex: 1;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: var(--glass);   /* frosted glass — inactive */
  -webkit-backdrop-filter: var(--glass-tint);
  backdrop-filter: var(--glass-tint);
  color: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--w-regular);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms ease-out, color 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .seg button:hover { color: var(--ink); }
}
.seg button.active {           /* app active state: bright-ink fill, black text */
  background: var(--ink);
  color: #000;
}

/* ---------- footer ---------- */

/* The app's print credit (RecipeQRPoster.signature): a hairline, then the lockup
   and links, with the credit lines speaking in the voice at the lower corners. */
.site-footer {
  padding: 56px var(--gutter) 40px;
}
.site-footer__inner {
  width: var(--col-wide);
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px 32px;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 26px;
  font-size: 11px;
  font-weight: var(--w-light);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-footer__links a {
  color: var(--ink-faint);
  border: 0;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.site-footer__links a:hover { color: var(--ink); }
.site-footer__tagline,
.site-footer__legal {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.site-footer__legal { text-align: right; }
.site-footer .nav__brand { justify-self: start; }
@media (max-width: 560px) {
  .site-footer__links { grid-column: 1 / -1; grid-row: 2; }
  .site-footer__tagline { grid-column: 1; grid-row: 3; }
  .site-footer__legal { grid-column: 2; grid-row: 3; }
}

/* ---------- develop: scroll-driven, sticky build-up (#develop) ----------
   ONE real Snow capture walked through the film pipeline. The left column
   pins the engine pitch; the right frame steps through the 8 real FilmBoCore
   renders as the section scrolls — each next stage is VERTICALLY WIPED in
   (top→down) over the one below, led by a hard black bar (like #compare's
   slider, but vertical + black). A solid frame is always underneath the wipe,
   so it never flashes black. stepper.js drives per-image clip-path + the bar
   + the caption from scroll progress — no scrubber, no tabs. Hard 0-radius
   edges. */
.develop {
  position: relative;
  margin-top: clamp(36px, 6vw, 72px);
  /* Static, drag-to-develop now — no scroll pin, so a normal-height section. */
}
.develop__sticky { display: contents; }   /* the old pin wrapper is now inert */
.develop__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  /* 1fr spacer rows top & bottom CENTER the title+body block as one unit; the
     two auto rows sit adjacent (no stage height wedged between them). */
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(28px, 5vw, 72px);
  row-gap: 0;
  width: 100%;
}
/* Desktop: heading + body are an adjacent, vertically-centered block on the
   left; the image stage (frame + dragger) sits on the right, centered. */
.develop__text  { grid-column: 1; grid-row: 2; }
.develop__intro { grid-column: 1; grid-row: 3; }
.develop__stage { grid-column: 2; grid-row: 1 / -1; align-self: center; }
.develop__title { margin: 0 0 18px; }
.develop__intro {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-dim);
}
/* Live per-stage caption, overlaid bottom-left ON the frame. Two stacked
   layers under the text: a gradient-masked (progressive) backdrop blur, then a
   dark opacity gradient ON TOP of the blur for contrast. Both negative-z so the
   text paints above them. */
.develop__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 56px 22px 18px;
  pointer-events: none;
}
.develop__cap::before {            /* progressive backdrop blur (bottom-heavy) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 40%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, #000 40%, transparent 100%);
}
.develop__cap::after {             /* dark opacity gradient, above the blur */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top,
    rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.42) 50%, transparent 100%);
}
/* Caption text styles for the develop (#develop) sticky section. */
.develop__name {
  font-size: 12px;
  font-weight: var(--w-regular);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.develop__sub {
  font-size: 13px;
  font-weight: var(--w-light);
  line-height: 1.45;
  color: var(--ink-faint);
}
.develop__count {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
}
.develop__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--rule-bright);
  background: var(--bg-elev);
  user-select: none;
  -webkit-user-select: none;
}
.develop__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Each later frame is hidden, then VERTICALLY WIPED in over the one below
     (a top→down reveal led by the black bar — like #compare's slider, but
     vertical + black). JS drives clip-path from scroll progress. */
  clip-path: inset(0 0 100% 0);
  -webkit-user-drag: none;
}
.develop__img:first-child { clip-path: none; }   /* always-on base, never clipped */
/* The wipe edge: a hard black bar that slides down the frame as the next stage
   reveals above it. Centered on the seam; JS sets `top` + visibility. */
.develop__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--develop-bar, 6px);
  margin-top: calc(var(--develop-bar, 6px) / -2);
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/* ---- drag-to-develop scrubber (under the image stage) ----
   A horizontal dragger in the app's language: a hairline rail, an --ink fill up
   to a hard-edged knob. Dragging scrubs the 9 build stages (stepper.js) — no
   scroll, no auto-advance. */
.develop__scrub {
  --handle: 34px;        /* the rail is inset by half this so the handle never
                            overflows the image: at 0%/100% its EDGE meets the edge */
  position: relative;
  height: 34px;
  margin-top: 16px;
  cursor: ew-resize;
  touch-action: pan-y;   /* vertical scroll passes through; horizontal drags scrub */
  user-select: none;
  -webkit-user-select: none;
}
/* Two layers split by the handle: full-spectrum colour to the LEFT (developed),
   neutral gray to the RIGHT (undeveloped). The rail is inset by half a handle on
   each side so it ends where the handle CENTRE can reach; --scrub is 0..1. */
.develop__scrub-gray,
.develop__scrub-color {
  position: absolute; top: 50%;
  left: calc(var(--handle) / 2);
  right: calc(var(--handle) / 2);
  height: 4px; transform: translateY(-50%);
}
.develop__scrub-gray  { background: var(--ink-faint); }
.develop__scrub-color {
  background: var(--spectrum);
  clip-path: inset(0 calc((1 - var(--scrub, 1)) * 100%) 0 0);
}
.develop__scrub-handle {
  position: absolute; top: 50%;
  /* centre travels [handle/2 .. 100%-handle/2] so the handle stays fully inside */
  left: calc(var(--handle) / 2 + var(--scrub, 1) * (100% - var(--handle)));
  transform: translate(-50%, -50%);
}
.develop__scrub:focus-visible { outline: none; }
.develop__scrub:focus-visible .develop__scrub-handle {
  outline: 2px solid var(--ink); outline-offset: 3px;
}
/* Replay the auto-develop animation — centred under the dragger, datasheet voice. */
.develop__replay {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  margin: 16px auto 0;
  padding: 8px 10px;
  background: transparent;
  border: 0;                 /* no frame — text + icon only */
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 150ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .develop__replay:hover { color: var(--ink); }
}
.develop__replay-icon { width: 13px; height: 13px; display: block; flex: none; }

/* Portrait / narrow: one column — title → image stage (frame + dragger) → body.
   Nothing pins now, so the frame is simply full width (no scale-down). */
@media (max-width: 760px) {
  .develop { margin-top: 28px; }
  .develop__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 18px;
  }
  .develop__text,
  .develop__stage,
  .develop__intro { grid-column: auto; grid-row: auto; width: 100%; }
}

/* ---------- build + share: two groups in one row (.flows) ----------
   sideways.js pins it and moves the row left as you scroll, fading the first group out
   as the second fades in, with the intro swapping alongside. --pad starts the row on the
   page's left edge (.container--wide), the same edge as the section head. Taller than square (the hero's threshold) a pair
   overflows on purpose, sized for legibility over matching scale: a sideways phone at
   true scale would leave the upright one too small to read. */
.flows {
  --pad: calc((100vw - var(--col-wide)) / 2);
  --pad-end: var(--pad);
  --wide: calc(100vw - 2 * var(--gutter));
  --tall-h: min(60svh, 130vw);
  --gap: clamp(16px, 3vw, 32px);
  width: 100vw;
  margin: clamp(12px, 3vw, 32px) 0 0 calc(50% - 50vw);
}
.flows__pin { display: flex; flex-direction: column; }
.flows__caps { order: 1; }   /* last on screen, first in the markup: read before the images */
.flows__window { position: relative; display: flex; align-items: center; overflow-x: auto; }
.flows__track {
  flex: none;
  display: flex;
  align-items: center;
  gap: calc(var(--gap) * 2.5);   /* a wider gap between groups */
  padding-inline: var(--pad) var(--pad-end);
}
.flows__pair { flex: none; display: flex; align-items: center; gap: var(--gap); }
.flow__shot { display: block; flex: none; -webkit-user-drag: none; }
.flow__shot--tall { width: auto; height: var(--tall-h); }
.flow__shot--wide { width: var(--wide); height: auto; }
.flow__cap {
  box-sizing: border-box;
  padding: clamp(14px, 2.5svh, 28px) var(--gutter) clamp(20px, 4svh, 44px);
  text-align: center;
}
.flow__cap h3 { margin: 0 0 8px; }
.flow__cap p { max-width: 46ch; margin: 0 auto; text-wrap: balance; }

.flows.is-pinned .flows__pin {
  position: sticky;
  top: 0;
  box-sizing: border-box;
  height: 100svh;
  padding-top: 73px;   /* clears the fixed nav */
}
.flows.is-pinned .flows__caps { display: grid; }
.flows.is-pinned .flow__cap { grid-area: 1 / 1; will-change: opacity; }
.flows.is-pinned .flows__window { flex: 1; min-height: 0; overflow: hidden; }
.flows.is-pinned .flows__track { will-change: transform; }
.flows.is-pinned .flows__pair { will-change: opacity; }

/* Square or wider: a pair fits on screen, at the mockups' true relative scale. */
@media (min-aspect-ratio: 1/1) {
  .flows {
    --u: min(var(--col-wide) / 1848, (100svh - 290px) / 1113);
    --gap: calc(64 * var(--u));
    --pair: calc(1848 * var(--u));
    --pad-end: calc(100vw - var(--pad) - var(--pair));   /* the second group lands where the first began */
  }
  .flows__caps { width: var(--pair); margin-left: var(--pad); }   /* centred under the group */
  .flow__shot--tall { width: calc(536 * var(--u)); height: auto; }
  .flow__shot--wide { width: calc(1248 * var(--u)); }
}
/* Short windows and sideways phones: a tighter intro leaves the phones more room. */
@media (min-aspect-ratio: 1/1) and (max-height: 640px) {
  .flows {
    --u: min(var(--col-wide) / 1848, (100svh - 133px) / 1113);
    --pad: calc((100vw - var(--pair)) / 2);   /* much narrower than the page here, so centre it */
  }
  .flows__caps { width: 100%; margin-left: 0; }
  .flow__cap { padding: 8px var(--gutter) 10px; }
  .flow__cap h3 { margin-bottom: 2px; }
  .flows .flow__cap p:not(.tag):not(.lead) { max-width: none; font-size: 13px; line-height: 1.4; }
}

/* Built for iPhone, taller than square: the head holds still and the cards move left.
   Without .is-pinned (JS off, or square and wider) they stay the grid above. */
.native-run.is-pinned .native-run__pin {
  position: sticky;
  /* A pin taller than the screen (small iPhones) sticks by its bottom, keeping the cards. */
  top: min(0px, calc(100svh - var(--pin-h, 100svh)));
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  min-height: 100svh;
  padding-top: 73px;   /* clears the fixed nav */
}
.native-run.is-pinned .tag { align-self: flex-start; }
.native-run.is-pinned .native-run__window {
  position: relative;
  display: flex;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
}
.native-run.is-pinned .features {
  --pad: calc((100vw - var(--col-wide)) / 2);
  flex: none;
  display: flex;
  margin: clamp(24px, 3vw, 40px) var(--pad) 0;
  will-change: transform;
}
.native-run.is-pinned .feature { flex: none; width: min(78vw, 440px); }

.download-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* Touch-down feedback is immediate; only the release eases back into place.
   Manipulation preserves panning and pinch zoom on these discrete controls. */
.btn, .gallery__nav, .seg button, .develop__replay {
  touch-action: manipulation;
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 200ms ease-out, border-color 150ms ease-out,
              background-color 150ms ease-out, color 150ms ease-out;
}
.btn:not([aria-disabled="true"]):not(.btn--soon):active,
.gallery__nav:active, .seg button:active, .develop__replay:active {
  transform: scale(0.97);
  opacity: 0.78;
  transition-duration: 0s;
}
@media (prefers-reduced-motion: reduce) {
  .btn:not([aria-disabled="true"]):not(.btn--soon):active,
  .gallery__nav:active, .seg button:active, .develop__replay:active {
    transform: none;
  }
}

