/* ============================================================
   09 — SEQUENCE — a photo essay choreographed like a film edit
   Palette: reel black + warm paper + tungsten amber + dusk blue.
   ============================================================ */

@font-face {
  font-family: "Fraunces Var";
  src: url("/vendor/fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Var";
  src: url("/vendor/fonts/Newsreader-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Italic Var";
  src: url("/vendor/fonts/Newsreader-Italic-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk Var";
  src: url("/vendor/fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root{
  --ink: #0b0a09;
  --ink-2: #141210;
  --paper: #f1ece1;
  --paper-dim: #c9bfae;
  --amber: #c9843f;
  --dusk: #7c8ea8;
  --ease: cubic-bezier(.22,.61,.19,1);
}

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

html{ background: var(--ink); }

body{
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
  font-family: "Newsreader Var", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection{ background: var(--amber); color: var(--ink); }

.var{
  font-family: "Space Grotesk Var", monospace;
  font-variation-settings: "wght" 560;
  font-size: .92em;
  opacity: .85;
}

/* ---------- chrome (blend-mode difference = legible over any frame) ---------- */

.chrome{
  position: fixed;
  top: 22px;
  z-index: 80;
  font-family: "Space Grotesk Var", sans-serif;
  font-variation-settings: "wght" 500;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
  opacity: .72;
  text-decoration: none;
  transition: opacity .3s ease;
}
.chrome:hover{ opacity: 1; }
.chrome--index{ left: 22px; }
.chrome--label{ right: 22px; }

.soundToggle{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  padding: 7px 13px 7px 10px;
  font-family: "Space Grotesk Var", sans-serif;
  font-variation-settings: "wght" 500;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
  cursor: pointer;
  transition: border-color .3s ease, opacity .3s ease;
  opacity: .72;
}
.soundToggle:hover{ opacity: 1; }
.soundToggle__dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
  transition: opacity .3s ease, transform .3s ease;
}
.soundToggle[aria-pressed="true"] .soundToggle__dot{
  opacity: 1;
  animation: soundPulse 1.8s ease-in-out infinite;
}
@keyframes soundPulse{
  0%,100%{ transform: scale(1); }
  50%{ transform: scale(1.7); }
}

.timecode{
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: "Space Grotesk Var", sans-serif;
  font-variation-settings: "wght" 500;
  font-size: 10px;
  letter-spacing: .1em;
  color: #fff;
  mix-blend-mode: difference;
  opacity: .68;
  font-variant-numeric: tabular-nums;
}
.timecode__shot{ text-transform: uppercase; }

.scrubber{
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.12);
  z-index: 80;
  mix-blend-mode: difference;
}
.scrubber__fill{
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  transform-origin: left;
}

/* ---------- filmroll / stage ---------- */

.filmroll{
  position: relative;
  width: 100%;
}

.stage{
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  background: var(--ink);
}

.stage__vignette{
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
}
.stage__grain{
  position: absolute;
  inset: -2px;
  z-index: 41;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

.layer{
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: auto;
  isolation: isolate; /* contain child z-index (.cap) so a covered layer never bleeds its caption through */
}
.layer--shot{ overflow: hidden; }

.shot__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center center;
}

.shot__grade{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,14,22,0) 0%, rgba(8,10,16,.55) 100%);
  opacity: 0;
  pointer-events: none;
}

/* ---------- leader / closer text cards ---------- */

.layer--leader,
.layer--closer{
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vh 8vw;
}

.leader__card{ max-width: 640px; }
.leader__eyebrow{
  margin: 0 0 14px;
  font-family: "Space Grotesk Var", sans-serif;
  font-variation-settings: "wght" 500;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--amber);
}
.leader__title{
  margin: 0 0 18px;
  font-family: "Fraunces Var", serif;
  font-variation-settings: "opsz" 144, "wght" 380, "SOFT" 20, "WONK" 0;
  font-size: clamp(48px, 11vw, 128px);
  line-height: .96;
  color: var(--paper);
}
.leader__sub{
  margin: 0;
  font-family: "Newsreader Italic Var", serif;
  font-style: italic;
  font-variation-settings: "opsz" 20, "wght" 380;
  font-size: clamp(14px, 2vw, 18px);
  color: var(--paper-dim);
  letter-spacing: .01em;
}

.closer__line{
  max-width: 620px;
  margin: 0;
  font-family: "Newsreader Italic Var", serif;
  font-style: italic;
  font-variation-settings: "opsz" 32, "wght" 400;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.4;
  color: var(--paper);
}

/* ---------- captions ---------- */

.cap{
  position: absolute;
  margin: 0;
  max-width: min(520px, 82vw);
  padding: 22px 26px;
  font-family: "Newsreader Italic Var", serif;
  font-style: italic;
  font-variation-settings: "opsz" 16, "wght" 400;
  font-size: clamp(14px, 1.7vw, 18px);
  line-height: 1.5;
  color: var(--paper);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  z-index: 30;
}
.cap.is-visible{ opacity: .96; transform: translateY(0); }

.cap--tl{ top: 9vh; left: 6vw; background: linear-gradient(180deg, rgba(6,6,6,.5), rgba(6,6,6,0) 85%); }
.cap--tc{ top: 8vh; left: 50%; transform: translate(-50%,8px); text-align: center; background: linear-gradient(180deg, rgba(6,6,6,.48), rgba(6,6,6,0) 85%); }
.cap--tc.is-visible{ transform: translate(-50%,0); }
.cap--bl{ bottom: 9vh; left: 6vw; background: linear-gradient(0deg, rgba(6,6,6,.55), rgba(6,6,6,0) 88%); }
.cap--br{ bottom: 9vh; right: 6vw; left: auto; text-align: right; background: linear-gradient(0deg, rgba(6,6,6,.55), rgba(6,6,6,0) 88%); }
.cap--bc{ bottom: 8vh; left: 50%; transform: translate(-50%,8px); text-align: center; background: linear-gradient(0deg, rgba(6,6,6,.6), rgba(6,6,6,0) 88%); }
.cap--bc.is-visible{ transform: translate(-50%,0); }

/* ---------- notes footer (shared pattern) ---------- */

.notes{
  position: relative;
  z-index: 50;
  background: var(--ink-2);
  border-top: 1px solid rgba(241,236,225,.12);
  padding: 26px 6vw 60px;
}
.notes__toggle{
  appearance: none;
  background: transparent;
  border: 1px solid rgba(241,236,225,.35);
  color: var(--paper);
  font-family: "Space Grotesk Var", sans-serif;
  font-variation-settings: "wght" 500;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .3s ease, color .3s ease;
}
.notes__toggle:hover{ border-color: var(--amber); color: var(--amber); }
.notes__panel{
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  max-width: 1180px;
}
.notes__panel[hidden]{ display: none; }
.notes__col h2{
  margin: 0 0 10px;
  font-family: "Space Grotesk Var", sans-serif;
  font-variation-settings: "wght" 560;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber);
}
.notes__col p{
  margin: 0;
  font-family: "Newsreader Var", serif;
  font-variation-settings: "opsz" 14, "wght" 380;
  font-size: 15px;
  line-height: 1.65;
  color: var(--paper-dim);
}

/* ---------- reduced motion: sequential fade, no scroll-jacking ---------- */

@media (prefers-reduced-motion: reduce){
  .filmroll{ height: auto !important; }
  .stage{
    position: static;
    height: auto;
    display: block;
  }
  .stage__vignette{ display: none; }
  .layer{
    position: relative;
    inset: auto;
    opacity: 0;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease;
  }
  .layer.is-visible{ opacity: 1; }
  .layer--shot .shot__img{ position: relative; transform: none !important; }
  .cap{ position: static; transform: none !important; opacity: .96; margin-top: -1px; max-width: 640px; padding: 20px 6vw 40px; background: none !important; }
  .shot__grade{ display: none; }
  .timecode, .scrubber{ display: none; }
}

body.reduced .filmroll{ height: auto; }

/* ---------- mobile ---------- */

@media (max-width: 640px){
  .chrome{ font-size: 10px; top: 16px; }
  .chrome--index{ left: 16px; }
  .chrome--label{ right: 16px; }
  .soundToggle{ right: 16px; bottom: 16px; padding: 6px 11px 6px 9px; }
  .timecode{ left: 16px; bottom: 16px; font-size: 9px; }
  .cap{ padding: 16px 18px; max-width: 90vw; font-size: 14px; }
  .cap--tl, .cap--bl{ left: 5vw; }
  .cap--br{ right: 5vw; }
  .leader__title{ font-size: clamp(38px, 15vw, 72px); }
  .notes{ padding: 22px 6vw 56px; }
  .notes__panel{ grid-template-columns: 1fr; gap: 26px; }
}
