/* Fellowship of the Ring — hand-written stylesheet, no framework. */

@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/eb-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/eb-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0908;
  --ink-soft: #100e0c;
  --paper: #ece4d8;
  --paper-dim: #c3b9ac;
  --muted: #978e83;
  --gold: #c8964f;
  --line: rgba(236, 228, 216, 0.13);
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --measure: 62ch;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* clip, not hidden: hidden on the root breaks position: sticky. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
}

abbr { text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: help; }

/* Film grain. One SVG noise tile, tiled at low opacity over everything. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.03em;
  font-variant: small-caps;
}

.wordmark__of { color: var(--muted); font-size: 0.82em; font-variant: normal; }

.wordmark__ring {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 0 2px var(--ink), 0 0 12px -2px rgba(200, 150, 79, 0.7);
  flex: none;
}

.wordmark--small { font-size: 15px; color: var(--paper-dim); }

.nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 30px);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}

.nav a:hover { color: var(--paper); border-bottom-color: var(--gold); }

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(22px, 3vw, 34px);
  padding: clamp(40px, 6vh, 76px) var(--gutter) clamp(48px, 8vh, 96px);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 78vh;
  background: radial-gradient(58% 60% at 50% 40%, rgba(200, 150, 79, 0.11), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.eyebrow span { opacity: 0.5; }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 em {
  font-style: italic;
  color: var(--gold);
}

.standfirst {
  max-width: 54ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--paper-dim);
  text-wrap: pretty;
}

/* the stage — the film sits here, centred, and everything else defers to it */

.stage {
  width: 100%;
  max-width: 1060px;
  margin: clamp(10px, 2vw, 22px) auto 0;
}

.stage__frame {
  position: relative;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(236, 228, 216, 0.06) inset,
    0 60px 140px -60px rgba(200, 150, 79, 0.35),
    0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

/* Registration marks, four corners. Small enough to read as a lab print. */
.stage__frame::before,
.stage__frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(236, 228, 216, 0.35);
  z-index: 2;
  pointer-events: none;
}
.stage__frame::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.stage__frame::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.stage__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.03);
}

.stage__empty {
  display: grid;
  place-content: center;
  gap: 6px;
  height: 100%;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 20px;
  border: 1px dashed rgba(236, 228, 216, 0.12);
  margin: 14px;
}

.stage__hint { margin: 0; font-family: var(--sans); font-size: 12px; letter-spacing: 0.06em; }
.stage__hint code { color: var(--gold); }

.stage figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.stage__label { margin-right: auto; }

.stage__toggle {
  appearance: none;
  padding: 3px 10px 4px;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 1px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}

.stage__toggle:hover,
.stage__toggle:focus-visible {
  color: var(--paper);
  border-color: rgba(200, 150, 79, 0.55);
  outline: none;
}

.stage figcaption span[aria-hidden] { opacity: 0.4; }

.stage__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(200, 150, 79, 0.9);
}

/* ------------------------------------------------------------------- story */

.story {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: clamp(24px, 6vw, 90px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(60px, 10vh, 120px) var(--gutter);
  border-top: 1px solid var(--line);
}

.index {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.story__body { padding-top: 2px; }

.story__label h2,
.stages h2,
.specs h2,
.stills h2 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.story__body { max-width: var(--measure); }

.story__body p {
  margin: 0 0 1.15em;
  font-size: clamp(16px, 1.15vw, 17.5px);
  line-height: 1.72;
  color: var(--paper-dim);
  text-wrap: pretty;
}

.story__body p:first-child::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.1em;
  line-height: 0.78;
  padding: 0.06em 0.12em 0 0;
  color: var(--gold);
}

/* ----------------------------------------------------------------- stages */

.stages {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 92px) var(--gutter);
  border-top: 1px solid var(--line);
}

.stages__head { margin-bottom: clamp(26px, 4vw, 44px); }

.stages__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.stages__list li {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) minmax(0, 1.1fr) 5rem;
  align-items: baseline;
  gap: 16px;
  padding: clamp(18px, 2.6vw, 26px) clamp(6px, 1.4vw, 16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s ease, padding-left 0.4s ease;
}

.stages__list li:hover {
  background: linear-gradient(90deg, rgba(200, 150, 79, 0.07), transparent 62%);
  padding-left: clamp(12px, 2.4vw, 26px);
}

.stages__numeral {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--gold);
}

.stages__title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  letter-spacing: -0.005em;
}

.stages__note {
  font-size: 13.5px;
  color: var(--muted);
}

.stages__time {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ specs */

.specs {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 92px) var(--gutter);
  border-top: 1px solid var(--line);
}

.specs__head { margin-bottom: clamp(26px, 4vw, 44px); }

.specs__list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 6vw, 84px);
  border-top: 1px solid var(--line);
}

.specs__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 18px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

.specs__row dt {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.specs__row dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--paper);
  text-align: right;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}

.specs__note {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ stills */

.stills {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 92px) var(--gutter) clamp(64px, 10vh, 120px);
  border-top: 1px solid var(--line);
}

.stills__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.stills__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.stills__title h2 { margin: 0; }

.stills__note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 32ch;
}

.stills__grid {
  --gap: clamp(12px, 1.6vw, 20px);
  --row: clamp(150px, 17vw, 268px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: start;
}

.still { margin: 0; }

.still img {
  width: 100%;
  height: var(--still-h, clamp(200px, 24vw, 320px));
  object-fit: cover;
  background: var(--ink-soft);
  filter: saturate(0.9) contrast(1.02);
  transition: transform 1.1s cubic-bezier(0.22, 0.7, 0.2, 1), filter 0.6s ease;
}

.still a:hover img,
.still:hover img { transform: scale(1.025); filter: saturate(1) contrast(1.05); }

/* The top pair is exactly two rows tall, so the block reads as one grid. */
.still--wide,
.still--tall {
  grid-column: span 8;
  --still-h: calc(var(--row) * 2 + var(--gap));
}

.still--tall { grid-column: span 4; }

.still:nth-of-type(3),
.still:nth-of-type(4),
.still:nth-of-type(5) { grid-column: span 4; --still-h: var(--row); }

.still figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--paper-dim);
}


/* ----------------------------------------------------------------- closing */

.closing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(72px, 12vh, 150px);
  text-align: center;
}

.closing p {
  max-width: 46ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.5;
  color: var(--paper-dim);
  text-wrap: balance;
}

/* ---------------------------------------------------------------- colophon */

.colophon {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(36px, 6vw, 64px);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.colophon a { display: block; padding: 2px 0; color: var(--paper-dim); }
.colophon a:hover { color: var(--gold); }

.colophon__label {
  margin: 0 0 10px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.colophon__muted { margin: 8px 0 0; line-height: 1.6; max-width: 34ch; }

.colophon--slim {
  display: block;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* -------------------------------------------------------------------- gone */

.gone {
  max-width: 54ch;
  margin: 0 auto;
  padding: 18vh var(--gutter);
}

.gone h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: left;
  margin: 12px 0 14px;
}

.gone p { margin: 0 0 8px; color: var(--paper-dim); }
.gone a { color: var(--gold); border-bottom: 1px solid rgba(200, 150, 79, 0.35); }

/* ------------------------------------------------------------------- legal */
.legal {
  max-width: 68ch;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 96px) var(--gutter) clamp(48px, 8vh, 80px);
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 12px 0 clamp(24px, 4vw, 40px);
  text-align: left;
}

.legal h2 {
  margin: clamp(28px, 4vw, 40px) 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.legal p {
  margin: 0 0 1em;
  color: var(--paper-dim);
  line-height: 1.72;
  font-size: 15.5px;
  max-width: var(--measure);
}

.legal a { color: var(--gold); border-bottom: 1px solid rgba(200, 150, 79, 0.35); }

.legal__credit { margin-top: clamp(32px, 5vw, 52px); font-size: 12.5px; color: var(--muted); }
.legal__back { margin-top: 24px; }

/* ------------------------------------------------------------------ reveal */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.7, 0.2, 1);
}

[data-reveal].is-in { opacity: 1; transform: none; }

@media (scripting: none) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; gap: 20px; }
  .story__label { display: flex; align-items: baseline; gap: 14px; }
  .story__label h2 { margin: 0; }

  .stages__list li {
    grid-template-columns: 2.2rem minmax(0, 1fr) auto;
    row-gap: 4px;
  }
  .stages__note { grid-column: 2 / -1; }
  .stages__time { grid-row: 1; grid-column: 3; }

  .still--wide,
  .still--tall,
  .still:nth-of-type(3),
  .still:nth-of-type(4),
  .still:nth-of-type(5) { grid-column: span 6; --still-h: clamp(180px, 42vw, 300px); }

  .specs__list { grid-template-columns: minmax(0, 1fr); }

  .colophon { grid-template-columns: 1fr 1fr; }
  .colophon__col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav { font-size: 11px; }
  .still--wide,
  .still--tall,
  .still:nth-of-type(3),
  .still:nth-of-type(4),
  .still:nth-of-type(5) { grid-column: span 12; }
  .colophon { grid-template-columns: 1fr; }
  .stage { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .still img { transition: none; }
  .stages__list li { transition: none; }
}