:root {
  --bg: #0b0907;
  --ink: #f3ead8;
  --ink-dim: rgba(243, 234, 216, 0.66);
  --line: rgba(255, 255, 255, 0.16);
  --gold: #e2bd6b;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sans: "Inter", system-ui, sans-serif;
  --rail: 40px;
  --gutter: max(9vw, 96px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { background: var(--bg); font: 400 15px/1.55 var(--sans); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.defs { position: absolute; }

/* ---------- shared type ---------- */
.display { font: 400 clamp(40px, 5.4vw, 96px)/0.95 var(--serif); letter-spacing: -0.01em; }
.display.center { text-align: center; }
/* One italic accent per headline, warmed toward the gold. */
.display em { font-style: italic; color: #f1dca6; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.lede { margin-top: 22px; max-width: 30ch; color: var(--ink-dim); font-size: 16px; }
.pill {
  display: inline-block; margin-bottom: 22px; padding: 6px 12px;
  border: 1px solid rgba(243, 234, 216, 0.28); border-radius: 999px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
}
.pill-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); margin: 0; cursor: pointer; transition: background-color 0.35s, color 0.35s, border-color 0.35s; }
.pill-solid:hover { background: var(--gold); border-color: var(--gold); }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: 64px;
  display: flex; align-items: center; gap: 28px; padding: 0 24px 0 calc(var(--rail) + 24px);
  font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.nav-mark { font: 400 24px/1 var(--serif); letter-spacing: 0; text-transform: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; color: var(--ink-dim); }
.nav-links a { position: relative; padding: 6px 0; transition: color 0.3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.1, 1); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
/* A soft dark backing so page content never collides with the nav. Off during the film (the picture is the backing),
   on once you scroll past it into the questions, and always on for the plain page. */
.nav::before { content: ""; position: absolute; inset: 0 0 -34px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(11, 9, 7, 0.95) 0%, rgba(11, 9, 7, 0.82) 55%, rgba(11, 9, 7, 0) 100%); transition: opacity 0.45s; }
.cine .nav::before { opacity: 0; }
.cine.past .nav::before { opacity: 1; }
/* On the bright gold stretch of the film the nav turns to dark ink so it stays readable. */
.nav, .nav-links { transition: color 0.5s; }
.cine.lit .nav { color: #1d150b; }
.cine.lit .nav-links { color: rgba(29, 21, 11, 0.62); }
.cine.lit .nav-links a:hover { color: #1d150b; }
.cine.lit .nav .pill-solid { background: #1d150b; color: var(--ink); border-color: #1d150b; }
.cine.lit .nav .pill-solid:hover { background: #4a3510; border-color: #4a3510; }

/* ---------- static page (default, no JS / reduced motion / ?static) ---------- */
.layer, .rail, .intro { display: none; }
.scene {
  position: relative; min-height: 100vh; padding: 120px 24px 80px var(--gutter);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  background-size: cover; background-position: 66% center;
}
.scene::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11, 9, 7, 0.86) 0%, rgba(11, 9, 7, 0.5) 45%, rgba(11, 9, 7, 0.1) 100%);
}
.scene > * { position: relative; z-index: 1; }
.scene { isolation: isolate; }
.scene-panels { align-items: center; padding-left: 24px; }
/* Three arched photos. --arch-o is how far the gilded frame line sits outside each photo (the engine reads it too). */
.panels { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto; gap: 0 3vw; width: min(1100px, 84vw); margin-top: 48px; --arch-o: 10px; }
/* Each panel shares the two rows (photo, caption) so all three photos stand on one sill whatever the caption length. */
.panel { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.panel .arch { align-self: end; }
.arch {
  position: relative; border-radius: 9999px 9999px 0 0; /* oversized radii settle into a true half circle at any width */
  box-shadow: 0 40px 60px -32px rgba(0, 0, 0, 0.75), 0 12px 24px -16px rgba(0, 0, 0, 0.5);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.1, 1), box-shadow 0.7s;
}
.arch canvas { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: inherit; background: #1a140e; }
.panel:nth-child(2) .arch canvas { aspect-ratio: 3 / 4.5; } /* the centre panel stands taller */
.arch::before { /* the gilded frame line, open at the foot so it stands on the sill */
  content: ""; position: absolute; inset: calc(var(--arch-o) * -1) calc(var(--arch-o) * -1) 0; pointer-events: none;
  border: 1px solid rgba(226, 189, 107, 0.75); border-bottom: 0; border-radius: 9999px 9999px 0 0;
}
.arch::after { /* glazing: a little light at the crown, a little weight at the foot */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 244, 214, 0.2) 0%, rgba(255, 244, 214, 0) 24%, rgba(12, 8, 3, 0) 64%, rgba(12, 8, 3, 0.32) 100%);
}
.arch .mat { position: absolute; inset: 7px; border: 1px solid rgba(255, 236, 196, 0.5); border-radius: 9999px 9999px 0 0; pointer-events: none; }
.panel figcaption { margin-top: 20px; display: grid; gap: 7px; justify-items: center; align-content: start; text-align: center; }
.panel figcaption em { font: 500 10.5px/1 var(--mono); font-style: normal; letter-spacing: 0.24em; color: var(--gold); }
.panel b { font: 400 30px/1 var(--serif); }
.panel figcaption span { color: var(--ink-dim); font-size: 13px; max-width: 26ch; text-wrap: balance; }
.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 44px; width: min(820px, 70vw); }
.term b { display: block; font: 400 28px/1.05 var(--serif); margin-bottom: 8px; }
.term span { color: var(--ink-dim); font-size: 13px; }
/* Get the prompt: three steps set like the lines of a letter, then one button. */
.form { display: grid; gap: 24px; margin-top: 40px; width: min(420px, 80vw); }
.steps { list-style: none; display: grid; gap: 16px; }
.steps li { display: grid; gap: 7px; padding-bottom: 12px; border-bottom: 1px solid rgba(243, 234, 216, 0.3); }
.steps li span { font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.steps li b { font: 400 22px/1.25 var(--serif); }
.form .pill-solid { justify-self: start; padding: 13px 22px; }
.wordmark { margin-top: 56px; font: 400 clamp(64px, 13vw, 220px)/0.8 var(--serif); white-space: nowrap; display: flex; align-items: flex-end; }
.wordmark i { display: inline-block; width: 2px; align-self: stretch; margin: 0 0.04em; background: var(--gold); box-shadow: 0 0 18px var(--gold); }

/* Questions: the headline holds on the left while the numbered list runs on the right. */
.faq { max-width: 1240px; margin: 0 auto; padding: 150px 40px 130px calc(var(--rail) + 24px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 80px; align-items: start; counter-reset: q; }
.faq h2 { position: sticky; top: 104px; font-size: clamp(44px, 5.2vw, 84px); }
.faq details { border-top: 1px solid var(--line); padding: 26px 0; counter-increment: q; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; font: 400 30px/1.15 var(--serif); transition: color 0.3s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "0" counter(q); font: 500 11px/1 var(--mono); letter-spacing: 0.16em; color: var(--gold); }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 18px; color: var(--gold); transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.1, 1); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: #f1dca6; }
.faq .answer { padding: 16px 0 4px 44px; color: var(--ink-dim); max-width: 58ch; font-size: 16px; }
.faq .answer.tearing { filter: url(#tear); }

/* Footer: a colophon of who and what made it, then the small print. */
.foot { border-top: 1px solid var(--line); padding: 0 40px 44px calc(var(--rail) + 24px); font: 400 12px/1.5 var(--mono); color: var(--ink-dim); }
.colophon { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.colophon > div { padding: 30px 24px 34px 0; }
.colophon > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.colophon dt { font: 500 10.5px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.colophon dd { font: 400 20px/1.2 var(--serif); color: var(--ink); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 26px; }
.foot-links { display: flex; gap: 28px; flex-wrap: wrap; }
.foot-base a { border-bottom: 1px solid var(--line); transition: color 0.3s, border-color 0.3s; }
.foot-base a:hover { color: var(--ink); border-color: var(--gold); }

/* ---------- cinematic mode ---------- */
.cine .film { height: 2100vh; }
.cine .stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.cine .layer { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.cine #lines { pointer-events: none; z-index: 2; }
.cine .stage::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(11, 9, 7, 0.62) 0%, rgba(11, 9, 7, 0.34) 30%, rgba(11, 9, 7, 0) 55%);
}
.cine .scene {
  position: absolute; z-index: 3; inset: auto; min-height: 0; padding: 0;
  left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(40vw, 600px);
  background: none !important; visibility: hidden; pointer-events: none;
}
.cine .scene::before { display: none; }
.cine .scene.on { visibility: visible; pointer-events: auto; }
.cine .scene-panels { left: 50%; width: auto; transform: translate(-50%, -50%); }
.cine .scene-terms { width: min(56vw, 720px); }
.cine .scene-terms .terms { width: 100%; gap: 32px; }
/* The terms run across the lit desk (candle, envelope), so each line carries its own soft shadow to stay readable. */
.cine .scene-terms .term b { text-shadow: 0 1px 2px rgba(11, 9, 7, 0.7), 0 2px 26px rgba(11, 9, 7, 0.95); }
.cine .scene-terms .term span { color: rgba(243, 234, 216, 0.9); text-shadow: 0 1px 2px rgba(11, 9, 7, 0.85), 0 1px 18px rgba(11, 9, 7, 0.95), 0 0 34px rgba(11, 9, 7, 0.8); }
.cine .scene .lede { text-shadow: 0 1px 16px rgba(11, 9, 7, 0.8); }
.cine .scene-terms .terms { position: relative; }
.cine .scene-terms .terms::before { /* a soft pool of shade under the three terms, fading in with them */
  content: ""; position: absolute; z-index: -1; inset: -30px -48px -40px; pointer-events: none;
  background: radial-gradient(ellipse at 62% 50%, rgba(11, 9, 7, 0.66), rgba(11, 9, 7, 0.4) 55%, rgba(11, 9, 7, 0) 80%);
  filter: blur(16px); opacity: 0; transition: opacity 0.9s 0.2s;
}
.cine .scene-terms.on .terms::before { opacity: 1; }
.cine .panels { width: min(900px, 62vw, calc((100vh - 330px) * 2 + 6vw)); margin: 40px auto 0; } /* sized so the taller centre arch still fits the screen */
/* The workshops sit on the bright gold field, so their type is dark ink (cream vanished on it). */
.cine .scene-panels { color: #1d150b; }
.cine .scene-panels .display em { color: #6a4a10; }
.cine .scene-panels .panel figcaption span { color: rgba(29, 21, 11, 0.74); }
.cine .scene-panels .panel figcaption em { color: rgba(74, 52, 12, 0.85); }
.cine .scene-panels .arch { box-shadow: 0 44px 56px -34px rgba(52, 34, 6, 0.7), 0 14px 26px -16px rgba(52, 34, 6, 0.4); }
.cine .scene-panels .arch::before { border-color: rgba(74, 52, 12, 0.55); }
/* Entry: each photo is unveiled from the sill up, one after the other, then its inner line settles in. */
.cine .panel .arch canvas { clip-path: inset(100% 0 0 0); transition: clip-path 1.25s cubic-bezier(0.2, 0.7, 0.1, 1); }
.cine .panel .arch .mat, .cine .panel .arch::after { opacity: 0; transition: opacity 0.9s 0.7s; }
.cine .panel:nth-child(2) .arch canvas { transition-delay: 0.12s; }
.cine .panel:nth-child(3) .arch canvas { transition-delay: 0.24s; }
.cine .scene.on .panel .arch canvas { clip-path: inset(0 0 0 0); }
.cine .scene.on .panel .arch .mat, .cine .scene.on .panel .arch::after { opacity: 1; }
.cine .scene.on .panel:hover .arch { transform: translateY(-8px); box-shadow: 0 56px 64px -36px rgba(52, 34, 6, 0.78), 0 18px 30px -16px rgba(52, 34, 6, 0.45); }
.cine .scene-form { top: 46%; }
.cine .stage > .wordmark { position: absolute; z-index: 3; left: 0; bottom: -0.02em; font-size: clamp(64px, 11vw, 190px); margin: 0; opacity: 0; transition: opacity 0.9s; pointer-events: none; }
.cine .stage > .wordmark.show { opacity: 1; }

/* scene text reveal: lines rise out of masks, then the ink filter settles */
.cine .lines > span, .cine .words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; }
.cine .lines > span { display: block; }
.cine .ln, .cine .wi { display: inline-block; transform: translateY(108%); transition: transform 0.95s cubic-bezier(0.2, 0.7, 0.1, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.cine .scene.on .ln, .cine .scene.on .wi { transform: none; }
.cine .scene.inking .display { filter: url(#ink); }
.cine .scene .pill, .cine .scene .lede, .cine .scene .form, .cine .scene .terms .term {
  opacity: 0; transform: translateY(14px); transition: opacity 0.7s, transform 0.9s cubic-bezier(0.2, 0.7, 0.1, 1); transition-delay: 0.25s;
}
.cine .scene.on .pill, .cine .scene.on .lede, .cine .scene.on .form, .cine .scene.on .terms .term { opacity: 1; transform: none; }
.cine .scene .term:nth-child(2) { transition-delay: 0.4s; }
.cine .scene .term:nth-child(3) { transition-delay: 0.55s; }
.cine .panel { opacity: 0; transform: translateY(60px); transition: opacity 0.8s, transform 1.1s cubic-bezier(0.2, 0.7, 0.1, 1); }
.cine .panel:nth-child(2) { transition-delay: 0.12s; }
.cine .panel:nth-child(3) { transition-delay: 0.24s; }
.cine .scene.on .panel { opacity: 1; transform: none; }

.cine .rail { display: block; position: absolute; z-index: 4; left: 0; top: 0; bottom: 0; width: var(--rail); pointer-events: none; }
.rail-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(180deg); writing-mode: vertical-rl;
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); overflow: hidden; padding: 6px 0;
  background: var(--bg);
}
.rail-bar { position: absolute; inset: 0; background: var(--gold); transform: scaleY(0); transform-origin: top; transition: transform 0.22s cubic-bezier(0.6, 0, 0.3, 1); }
.rail-label.swap .rail-bar { transform: scaleY(1); }
.rail-label.out .rail-bar { transform-origin: bottom; }

/* scroll cue under the hero: appears after the intro, leaves on the first scroll */
.cue { display: none; }
.cine .cue {
  display: flex; flex-direction: column; align-items: center; gap: 10px; position: absolute; z-index: 4; left: 50%; bottom: 28px; transform: translateX(-50%);
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.24em; text-indent: 0.24em; text-transform: uppercase; color: var(--ink-dim);
  opacity: 0; visibility: hidden; transition: opacity 0.6s; pointer-events: none;
}
.cine.ready .cue { opacity: 1; visibility: visible; transition: opacity 1s 1.4s; }
.cine.ready.scrolled .cue { opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0s 0.5s; }
.cue i { width: 1px; height: 36px; background: linear-gradient(var(--gold), rgba(226, 189, 107, 0)); transform-origin: top; }
/* The line only loops while the cue is on screen. Left running it costs frames for the whole film. */
.cine.ready:not(.scrolled) .cue i { animation: cue 2.4s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.cine .intro { display: block; position: absolute; inset: 0; z-index: 5; pointer-events: none; transition: opacity 0.6s; }
.intro-count { position: absolute; font: 500 11px/1 var(--mono); letter-spacing: 0.16em; color: var(--gold); transform: translate(14px, -50%); }
.intro.done { opacity: 0; }
.cine .nav { opacity: 0; transform: translateY(-8px); transition: opacity 0.8s 0.6s, transform 0.8s 0.6s; }
.cine.ready .nav { opacity: 1; transform: none; }

@media (max-width: 760px) {
  :root { --rail: 16px; --gutter: 32px; }
  .nav { padding-left: 32px; gap: 12px; }
  .nav-links { display: none; }
  .nav .pill-solid { margin-left: auto; }
  .cine .stage::before { background: linear-gradient(0deg, rgba(11, 9, 7, 0.78) 0%, rgba(11, 9, 7, 0.3) 45%, rgba(11, 9, 7, 0) 70%); }
  .cine .scene { width: calc(100vw - 56px); top: auto; bottom: 14vh; transform: none; }
  .cine .scene-hero { bottom: 18vh; }
  .cine .scene-panels { left: 50%; bottom: auto; top: 50%; width: calc(100vw - 40px); transform: translate(-50%, -50%); }
  .cine .scene-terms { width: calc(100vw - 56px); }
  .cine .scene-form { top: 18%; bottom: auto; }
  .panels { width: 100%; gap: 16px; --arch-o: 5px; }
  .cine .panels { width: 100%; margin-top: 30px; } /* the laptop rule above is more specific, so say it again here */
  .cine .scene-panels { left: calc(50% + 7px); width: calc(100vw - 62px); } /* clear of the rail label on the left */
  .arch canvas { aspect-ratio: 3 / 5; }                       /* a phone has height to spare: taller, narrower windows */
  .panel:nth-child(2) .arch canvas { aspect-ratio: 3 / 5.7; }
  .arch .mat { inset: 4px; }
  .panel figcaption { margin-top: 14px; gap: 6px; }
  .panel b { font-size: 20px; }
  .panel figcaption span { display: none; }
  .faq { grid-template-columns: 1fr; gap: 28px; padding: 96px 24px 84px 32px; }
  .faq h2 { position: static; }
  .faq summary { grid-template-columns: 34px 1fr auto; font-size: 24px; }
  .faq .answer { padding-left: 34px; }
  .foot { padding: 0 24px 36px 32px; }
  .colophon { grid-template-columns: 1fr 1fr; }
  .colophon > div { padding: 22px 12px 24px 0; border-top: 1px solid var(--line); }
  .colophon > div:first-child { grid-column: span 2; border-top: 0; } /* "Built by" gets its own row, then two by two */
  .colophon > div + div { padding-left: 0; border-left: 0; }
  .colophon > div:nth-child(odd):not(:first-child) { padding-left: 16px; border-left: 1px solid var(--line); }
  .colophon dd { font-size: 18px; }
  .steps li b { font-size: 20px; }
  .terms { grid-template-columns: 1fr; gap: 18px; width: 100%; }
  .scene-terms .display { font-size: 52px; }
}
