/* Layout: one dark "darkroom" page; photos and phone frames carry the colour, type is paper-white on charcoal.
   Deliberately single-theme (dark): black-and-white photos read best on a dark ground. */
:root {
  --ground: #0f1011;
  --ground-2: #17191b;
  --line: #2a2d30;
  --paper: #ece8e1;        /* fibre-paper white */
  --paper-dim: #a9a6a0;
  --paper-faint: #6f6d69;
  --selenium: #b79aa8;     /* selenium-toned accent, used sparingly */
  --font-display: "Libre Caslon Text", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --max: 1160px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--paper);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--selenium); outline-offset: 3px; border-radius: 4px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; height: 60px;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
  display: flex; align-items: center; gap: 28px;
}
.wordmark { font-family: var(--font-display); font-size: 22px; text-decoration: none; letter-spacing: .01em; }
.wordmark span { font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; margin-left: 3px; color: var(--paper-dim); vertical-align: 3px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--paper-dim); font-size: 15px; }
.nav nav a:hover { color: var(--paper); }
.pill { font: 500 12px/1 var(--font-mono); letter-spacing: .06em; padding: 8px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--paper-dim); white-space: nowrap; }
@media (max-width: 760px) { .nav nav { display: none; } .pill { margin-left: auto; } }

/* type */
.eyebrow { font: 500 12px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--selenium); margin: 0 0 14px; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 6.2vw, 76px); line-height: 1.04; letter-spacing: -.01em; margin: 0 0 24px; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; margin: 0 0 28px; max-width: 20ch; }
h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 16px; max-width: 62ch; }
.lede { font-size: 19px; color: var(--paper-dim); }
.hint, .small { font-size: 14px; color: var(--paper-faint); }
.intro { color: var(--paper-dim); }

/* sections */
.hero, .band { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.band { padding-block: 96px 24px; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center;
  padding-block: 72px 64px;
}
.hero-text { min-width: 0; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-points span { font: 400 13px/1 var(--font-mono); padding: 9px 12px; border-radius: 6px; background: var(--ground-2); border: 1px solid var(--line); color: var(--paper-dim); }
.hero-phones { position: relative; height: clamp(460px, 52vw, 640px); min-width: 0; }
.hero-phones .phone { position: absolute; width: clamp(200px, 22vw, 290px); }
.phone-back { right: 4%; top: 0; transform: rotate(4deg); opacity: .9; }
.phone-front { left: 8%; bottom: 0; transform: rotate(-3deg); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-phones { height: 520px; max-width: 420px; width: 100%; margin: 0 auto; }
  .hero-phones .phone { width: 220px; }
}
@media (max-width: 420px) {
  .hero-phones { height: 430px; }
  .hero-phones .phone { width: 180px; }
}

/* phone frame: Galaxy-like slab with a punch-hole camera */
.phone {
  margin: 0; position: relative; aspect-ratio: 600 / 1300;
  border-radius: 13% / 6%; padding: 3.2%;
  background: linear-gradient(150deg, #3a3d41, #1c1e20 40%, #2c2f32);
  box-shadow: 0 0 0 1px #4a4e52 inset, 0 30px 60px -20px rgba(0,0,0,.8), 0 10px 20px -10px rgba(0,0,0,.6);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 10.5% / 4.9%; background: #000; }
.phone::after {
  content: ""; position: absolute; top: 5.4%; left: 50%; width: 3.4%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: #050505; box-shadow: 0 0 0 1.5px #1a1a1a;
}
.phone figcaption { position: absolute; top: 100%; left: 0; right: 0; margin-top: 14px; text-align: center; font-size: 13px; color: var(--paper-faint); }
.phone-small { width: min(260px, 100%); }

/* step wedge */
.wedge { display: grid; grid-template-columns: repeat(11, 1fr); max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.wedge span { height: 36px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font: 500 10px/1 var(--font-mono); letter-spacing: .06em; }
.wedge span:nth-child(1) { background: #000; color: #777; } .wedge span:nth-child(2) { background: #1a1a1a; color: #888; }
.wedge span:nth-child(3) { background: #333; color: #999; } .wedge span:nth-child(4) { background: #4d4d4d; color: #aaa; }
.wedge span:nth-child(5) { background: #666; color: #ccc; } .wedge span:nth-child(6) { background: #808080; color: #eee; }
.wedge span:nth-child(7) { background: #999; color: #333; } .wedge span:nth-child(8) { background: #b3b3b3; color: #333; }
.wedge span:nth-child(9) { background: #ccc; color: #444; } .wedge span:nth-child(10) { background: #e6e6e6; color: #555; }
.wedge span:nth-child(11) { background: #fff; color: #666; }

/* split */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.split-text, .split-media { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* tonal transitions */
.split-tones { align-items: start; }
.tones-figure { margin: 0; min-width: 0; }
.tones-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tones-grid img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.tones-head { font: 500 12px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--paper-dim); padding-bottom: 4px; }
.tones-figure figcaption { margin-top: 14px; max-width: 60ch; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.steps article { background: var(--ground-2); padding: 28px 26px; }
.steps p { color: var(--paper-dim); margin: 0; font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.modes { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 56px; align-items: center; margin-top: 72px; }
.modes-text { min-width: 0; }
dl { margin: 0 0 20px; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px 20px; max-width: 60ch; }
dt { font: 500 13px/1.7 var(--font-mono); letter-spacing: .06em; color: var(--selenium); }
dd { margin: 0; color: var(--paper-dim); }
@media (max-width: 760px) { .modes { grid-template-columns: 1fr; justify-items: center; gap: 36px; } .modes-text { justify-self: stretch; } }

/* darkroom */
.darkroom { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 56px; align-items: start; }
.darkroom-phones { display: flex; gap: 22px; padding-bottom: 48px; }
.darkroom-phones .phone { width: min(230px, 42vw); }
.darkroom-phones .phone:nth-child(2) { margin-top: 56px; }
.darkroom-text { min-width: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 16px; }
.ticks li { padding-left: 26px; position: relative; color: var(--paper-dim); max-width: 60ch; }
.ticks li strong { color: var(--paper); font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(90deg, #000, #fff); box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 960px) { .darkroom { grid-template-columns: 1fr; } .darkroom-phones { justify-content: center; } }

/* before/after slider */
.ba { position: relative; overflow: hidden; border-radius: 10px; background: #000; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; box-shadow: 0 0 0 1px var(--line); }
.ba img { width: 100%; height: auto; pointer-events: none; }
.ba .ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba .ba-before img { height: 100%; object-fit: cover; }
.ba .ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: var(--paper); box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.ba .ba-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--paper);
  background-image: linear-gradient(90deg, transparent 13px, #111 13px, #111 15px, transparent 15px, transparent 25px, #111 25px, #111 27px, transparent 27px);
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; }
.ba input[type=range]:focus-visible + .ba-handle::after { outline: 2px solid var(--selenium); outline-offset: 3px; }
#hero-compare .ba { max-width: 480px; margin-left: auto; }
#develop-compare .ba { max-width: 440px; margin-bottom: 12px; }
.scene-main .ba { max-width: 520px; }
@media (max-width: 860px) { #hero-compare .ba { margin: 0 auto; } }

/* comparisons */
.scene-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 28px; }
.scene-tabs button {
  font: 500 14px/1 var(--font-body); color: var(--paper-dim); background: var(--ground-2);
  border: 1px solid var(--line); border-radius: 99px; padding: 11px 16px; cursor: pointer;
}
.scene-tabs button:hover { color: var(--paper); }
.scene-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ground); border-color: var(--paper); }
.scene { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.scene-main { min-width: 0; }
.scene-side { min-width: 0; }
.scene-side h3 { font-family: var(--font-display); font-weight: 400; font-size: 28px; margin-bottom: 4px; }
.scene-meta { font: 400 13px/1.5 var(--font-mono); color: var(--paper-faint); margin-bottom: 18px; }
.scene-key { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 14px; color: var(--paper-dim); margin: 18px 0 26px; }
.scene-key b { font-weight: 600; color: var(--paper); }
.crops { display: grid; gap: 14px; }
.crop-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.crop-pair img { border-radius: 6px; box-shadow: 0 0 0 1px var(--line); width: 100%; height: auto; }
@media (max-width: 860px) { .scene { grid-template-columns: 1fr; } }

/* limits */
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 48px; }
.limits p { color: var(--paper-dim); margin: 0; }
.limits strong { color: var(--paper); display: block; font-weight: 600; margin-bottom: 4px; }
@media (max-width: 760px) { .limits { grid-template-columns: 1fr; } }

/* footer */
.footer { border-top: 1px solid var(--line); margin-top: 96px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter-r) 48px var(--gutter); display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: baseline; }
.footer p { font-size: 14px; color: var(--paper-faint); margin: 0; }
