/* ==========================================================================
   The Shot List / La La Land (2016)
   Design system: "CinemaScope at magic hour"
   Deep dusk indigo, off-white type and ONE accent, Mia's yellow. Magic-hour
   pinks live only inside the drawings and the hero art, never in the UI.
   Bodoni Moda for titles (a high-contrast studio-era serif), Newsreader for
   reading, IBM Plex Mono for the slate lines under every frame. Every still
   is shown at the film's 2.55:1, cropping any letterbox and never
   stretching. One theme.
   The hero card and both demos are page.js; the drawings and the sign-off
   are art.js. Text and stills never animate on scroll. The hero opens out
   once on load; drawings draw on once (art.js); the demos move only when
   the reader asks. Everything is still under prefers-reduced-motion.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --night: #1b1733;
  --night-2: #211c3d;
  --night-3: #2a2150;
  --deep: #100d20;          /* screens, letterbox, the black of a cinema */
  --paper: #f3ecdf;
  --paper-2: #cdc4d6;
  --paper-3: #978eab;
  --sun: #f3c23a;
  --sun-hi: #f8d77a;
  --sun-line: rgba(243, 194, 58, 0.55);
  --sun-soft: rgba(243, 194, 58, 0.28);
  --sun-faint: rgba(243, 194, 58, 0.12);
  --rule: rgba(243, 236, 223, 0.12);
  --rule-2: rgba(243, 236, 223, 0.22);
  --ink: var(--night);      /* art.js paints its sheets with this */
  --line: var(--paper);     /* and draws with these */
  --accent: var(--sun);

  --f-display: "Bodoni Moda", "Bodoni 72", "Didot", "Bodoni MT", Georgia, serif;
  --f-body: "Newsreader", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --scope: 2.55;
  --fs-body: clamp(18px, 0.5vw + 15.2px, 22px);
  --measure: 64ch;
  --wide: 1360px;
  --gutter: 16px;
  --air: clamp(4.5rem, 10vw, 9rem);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --gutter: clamp(24px, 4vw, 56px); }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--night);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-optical-sizing: auto;
  line-height: 1.72;
  overflow-wrap: break-word;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@supports (overflow-x: clip) {
  body { overflow-x: clip; }
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
img, svg, canvas { max-width: 100%; }
img[hidden] { display: none; }
cite { font-style: italic; }
strong { font-weight: 600; }
button { font: inherit; color: inherit; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--sun-line);
  text-underline-offset: 0.2em;
}
a:hover { color: var(--sun-hi); }

::selection { background: var(--sun); color: var(--night); }

:focus-visible {
  outline: 1.5px solid var(--sun);
  outline-offset: 4px;
  border-radius: 1px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 60;
  padding: 10px 14px;
  background: var(--sun);
  color: var(--night);
  font: 600 12px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Reading progress ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 2px;
  pointer-events: none;
}
.progress-bar {
  display: block;
  height: 100%;
  background: var(--sun);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ==========================================================================
   Masthead
   ========================================================================== */
.masthead {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 20px var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { color: var(--sun-hi); }
/* a tiny 2.55:1 frame */
.brand-mark {
  position: relative;
  flex: none;
  width: 26px;
  height: 10.2px;
  border: 1.5px solid var(--sun);
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: var(--sun);
}
.brand-name {
  font: 600 12.5px/1 var(--f-display);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.masthead-meta {
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-2);
}
@media (max-width: 420px) {
  .brand-name { font-size: 11.5px; letter-spacing: 0.24em; }
  .masthead-meta { display: none; }
}

/* ==========================================================================
   Hero: a title card in the old Academy shape that opens out to 2.55:1
   onto a magic-hour Los Angeles (page.js)
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(66, 48, 122, 0.55), rgba(27, 23, 51, 0) 72%),
    linear-gradient(180deg, #1d1838 0%, var(--night) 70%);
}

.hero-stage {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding: clamp(8px, 2vh, 24px) 0 0;
}
@media (min-width: 720px) {
  .hero-stage { padding: clamp(8px, 2vh, 24px) var(--gutter) 0; }
}

/* a phone held upright: the frame is a thin band at 2.55:1, so the hero
   is only as tall as what it holds, and the essay follows on */
@media (max-aspect-ratio: 3/4) and (max-width: 719px) {
  .hero { min-height: 0; }
  .hero-stage { margin-top: clamp(28px, 7vh, 64px); }
  .hero-inner { margin-bottom: 0; padding-bottom: 8px; }
}

/* the screen: always 2.55:1, sized so the title fits beneath it */
.hero-screen {
  --academy: 1.37;
  position: relative;
  flex: none;
  width: min(100%, 1480px, max(720px, (100vh - 430px) * var(--scope)));
  aspect-ratio: var(--scope) / 1;
  overflow: hidden;
  background: var(--deep);
  container-type: inline-size;
}
@supports (height: 100svh) {
  .hero-screen { width: min(100%, 1480px, max(720px, (100svh - 430px) * var(--scope))); }
}

.hs-art,
.hs-card {
  position: absolute;
  inset: 0;
}
.hs-art > svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* the card: designed at full width; squeezed into the Academy frame at
   first, then let out to its true shape as the frame opens */
.hs-card {
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 58% 70% at 50% 50%, rgba(66, 48, 122, 0.9), rgba(27, 23, 51, 0) 75%),
    linear-gradient(180deg, #241d47, #15112b);
}
.hs-card::before,
.hs-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
/* a double rule round the card */
.hs-card::before {
  inset: 4.2cqw 3.2cqw;
  border: 1px solid rgba(243, 236, 223, 0.32);
  outline: 1px solid rgba(243, 236, 223, 0.14);
  outline-offset: 0.55cqw;
}
/* a faint sunburst behind the word */
.hs-card::after {
  left: 50%;
  top: 50%;
  width: 120cqw;
  height: 120cqw;
  margin: -60cqw 0 0 -60cqw;
  background: repeating-conic-gradient(from 0deg, rgba(243, 194, 58, 0.07) 0deg 3deg, rgba(243, 194, 58, 0) 3deg 12deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 22%, transparent 42%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 22%, transparent 42%);
}
.hs-card-in {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  transform-origin: 50% 50%;
}
.hc-top {
  font: 600 max(7px, 1.25cqw)/1 var(--f-display);
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  text-transform: uppercase;
  color: var(--paper);
}
.hc-pre {
  margin-top: 1.6cqw;
  font: italic 400 max(9px, 2.3cqw)/1 var(--f-display);
  color: var(--paper);
}
.hc-word {
  margin-top: 0.9cqw;
  font: 800 max(20px, 8.4cqw)/0.95 var(--f-display);
  letter-spacing: 0.06em;
  margin-right: -0.06em;
  text-transform: uppercase;
  color: var(--sun);
  /* a period extrusion */
  text-shadow:
    0.012em 0.012em 0 #b8862a,
    0.024em 0.024em 0 #9a6d22,
    0.036em 0.036em 0 #7a531c,
    0.048em 0.048em 0 #5c3d17,
    0.06em 0.07em 0.08em rgba(0, 0, 0, 0.45);
}
.hc-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6cqw;
  margin-top: 2cqw;
  font: 500 max(6.5px, 1.05cqw)/1 var(--f-mono);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--paper-2);
}
.hc-foot::before,
.hc-foot::after {
  content: "";
  width: 9cqw;
  height: 1px;
  background: rgba(243, 236, 223, 0.4);
}

/* once the drawing is there, the card goes */
.hero-screen.is-revealed .hs-card { opacity: 0; visibility: hidden; }

/* the opening move, once on load */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-screen {
    clip-path: inset(0 calc((1 - var(--academy) / var(--scope)) * 50%));
  }
  .js .hero-screen .hs-card { filter: grayscale(1) contrast(1.12) brightness(1.06); }
  .js .hero-screen .hs-card-in { transform: scaleX(calc(var(--academy) / var(--scope))); }

  .js .hero-screen.is-open {
    clip-path: inset(0 0);
    transition: clip-path 1.9s cubic-bezier(0.7, 0, 0.2, 1);
  }
  .js .hero-screen.is-open .hs-card-in {
    transform: scaleX(1);
    transition: transform 1.9s cubic-bezier(0.7, 0, 0.2, 1);
  }
  .js .hero-screen.is-open .hs-card {
    filter: grayscale(0) contrast(1) brightness(1);
    transition: filter 1.5s ease 0.55s, opacity 1.7s ease, visibility 0s linear 1.7s;
  }
}

/* the title, the dek and the line under them */
.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-bottom: auto;
  padding: clamp(22px, 4vh, 44px) var(--gutter) clamp(36px, 7vh, 72px);
  text-align: center;
}
.hero-film {
  font: 500 clamp(10.5px, 0.3vw + 9.4px, 12.5px)/1.4 var(--f-mono);
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  text-transform: uppercase;
  color: var(--sun);
}
.hero-title {
  margin: 0.12em 0 0.2em;
  font: italic 400 clamp(54px, 7.4vw + 12px, 128px)/1 var(--f-display);
  letter-spacing: -0.01em;
  color: var(--paper);
}
.hero-dek {
  max-width: 46ch;
  margin: 0 auto;
  font-size: clamp(17px, 0.45vw + 15px, 20.5px);
  line-height: 1.55;
  color: var(--paper-2);
  text-wrap: balance;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin-top: 20px;
  font: 500 11px/1.4 var(--f-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.hero-meta > * { white-space: nowrap; }
.hero-by { color: var(--paper); }

/* city lights and the lamp come on once (page.js sets the delays) */
.hs-art .lt { opacity: 0; }
.hs-art .lamp-glow { opacity: 0; }
.hero-screen.is-lit .hs-art .lt { opacity: 1; }
.hero-screen.is-lit .hs-art .lamp-glow { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero-screen.is-lit .hs-art .lt { transition: opacity 0.9s ease var(--d, 0s); }
  .hero-screen.is-lit .hs-art .lamp-glow { transition: opacity 1.6s ease var(--d, 0s); }
}

/* ==========================================================================
   The flow grid
   full : edge to edge          wide : the content width (up to 1360px)
   text : the reading measure
   ========================================================================== */
.flow {
  --wide-extra: calc((var(--wide) - var(--measure)) / 2);
  position: relative;
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [wide-start] minmax(0, var(--wide-extra))
    [text-start] min(var(--measure), 100% - 2 * var(--gutter))
    [text-end] minmax(0, var(--wide-extra))
    [wide-end] minmax(var(--gutter), 1fr)
    [full-end];
}
.flow > * { grid-column: text; min-width: 0; }
.flow > * + * { margin-top: 1.25em; }

.chapter { scroll-margin-top: 0; }
.chapter--intro { padding-top: clamp(5rem, 11vw, 9rem); }
.chapter + .chapter { margin-top: var(--air); }

.flow > p {
  text-wrap: pretty;
  hanging-punctuation: first;
}
@media (max-width: 559px) {
  .flow > p { hyphens: auto; -webkit-hyphens: auto; }
}
.flow > .lede {
  font-size: clamp(1.16em, 0.8vw + 0.92em, 1.38em);
  line-height: 1.52;
  color: var(--paper);
}
/* air round every picture; a still that is not there leaves no gap */
.flow > :is(figure, aside):not(.is-missing) { margin-top: var(--air); }
.flow > :is(figure, aside):not(.is-missing) + * { margin-top: var(--air); }
.flow > :is(figure, aside):not(.is-missing) + :is(figure, aside):not(.is-missing) { margin-top: calc(var(--air) * 1.1); }

/* ==========================================================================
   Chapter openers: the number and title, then the frame edge to edge
   ========================================================================== */
.flow > .opener {
  grid-column: full;
  margin-top: 0;
}
.flow > .opener + * { margin-top: clamp(3.5rem, 7vw, 6rem); }

.op-head {
  position: relative;
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding-top: clamp(26px, 3.4vw, 44px);
  border-top: 1px solid var(--rule-2);
}
/* a small yellow lozenge on the rule, like a reel-change mark */
.op-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 7px;
  height: 7px;
  background: var(--sun);
  transform: rotate(45deg);
}
.op-num {
  display: flex;
  gap: 0.9em;
  font: 500 11.5px/1 var(--f-mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.op-part { color: var(--sun); }
.op-of { color: var(--paper-3); }
.op-title {
  margin-top: 0.32em;
  font: 400 clamp(42px, 5.6vw + 10px, 112px)/1.02 var(--f-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
  color: var(--paper);
}

.still--opener { margin-top: clamp(28px, 4vw, 56px); }
.still--opener .still-frame { border-block-width: 0; }
.still--opener figcaption {
  display: block;
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin: 18px auto 0;
}

/* the slate: one line of camera data, edged like film */
.op-slate {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 8px;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  font: 500 10.5px/1.3 var(--f-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-2);
}
/* edge-code ticks: a short tick every 12px, a long one every 60px */
.op-slate::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 7px;
  background:
    repeating-linear-gradient(90deg, rgba(243, 236, 223, 0.4) 0 1px, transparent 1px 60px) 0 0 / auto 7px no-repeat,
    repeating-linear-gradient(90deg, rgba(243, 236, 223, 0.2) 0 1px, transparent 1px 12px) 0 0 / auto 4px no-repeat;
}
.op-slate li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.op-slate li + li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 5px;
  margin: 0 15px;
  border: 1px solid var(--sun-line);
  border-radius: 1.5px;
}
.op-slate .sl-key { color: var(--sun); }
.still--opener .cap {
  display: block;
  max-width: 78ch;
  margin-top: 12px;
  font: 400 12.5px/1.7 var(--f-mono);
  color: var(--paper-3);
  text-wrap: pretty;
}
@media (max-width: 479px) {
  .op-slate { font-size: 9.5px; letter-spacing: 0.15em; }
  .op-slate li + li::before { margin: 0 9px; }
}

/* ==========================================================================
   Frames from the film: always 2.55:1, letterbox cropped, never stretched
   ========================================================================== */
.flow > .still { grid-column: full; }
@media (min-width: 720px) {
  .flow > .still:not(.still--opener) { grid-column: wide; }
}
.still.is-missing { display: none; }
.show-placeholders .still.is-missing { display: block; }

.still-frame {
  position: relative;
  aspect-ratio: var(--scope) / 1;
  overflow: hidden;
  background: var(--deep);
}
.still-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* placeholder (?placeholders): the frame number and the scene to grab */
.ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: clamp(12px, 2.6vw, 36px);
  background:
    linear-gradient(var(--sun-faint), var(--sun-faint)) 50% 50% / 1px 100% no-repeat,
    linear-gradient(var(--sun-faint), var(--sun-faint)) 50% 50% / 100% 1px no-repeat,
    linear-gradient(180deg, #221c42, #14112a);
  color: var(--paper-2);
}
.ph-no {
  font: italic 400 clamp(20px, 4vw, 60px)/1 var(--f-display);
  color: var(--sun);
}
.ph-desc {
  max-width: 64ch;
  font: 400 clamp(11px, 0.4vw + 9.6px, 14px)/1.45 var(--f-mono);
  color: var(--paper);
}
.ph-file { font: 400 10.5px/1.4 var(--f-mono); color: var(--paper-3); }
@media (max-width: 559px) {
  .ph-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- Captions: a slate line, then the words ---------- */
.still:not(.still--opener) figcaption,
.art figcaption,
.set figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: min(var(--wide), 100% - 2 * var(--gutter));
  margin: clamp(14px, 1.8vw, 22px) auto 0;
  font: 400 12.5px/1.7 var(--f-mono);
  color: var(--paper-3);
}
@media (min-width: 720px) {
  .still:not(.still--opener) figcaption,
  .art figcaption,
  .set figcaption { width: 100%; }
}
@media (min-width: 900px) {
  .still:not(.still--opener) figcaption,
  .art figcaption,
  .set figcaption {
    grid-template-columns: clamp(170px, 16vw, 230px) minmax(0, 72ch);
    column-gap: clamp(20px, 2.4vw, 40px);
  }
}
.tag {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 1.2em;
  padding-top: 0.2em;
  font: 500 10.5px/1.6 var(--f-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sun);
}
@media (min-width: 900px) {
  .tag { flex-direction: column; gap: 2px; }
}
.tag-fmt { color: var(--paper-3); }
.cap { text-wrap: pretty; }
.cap cite { font-style: italic; }

/* ==========================================================================
   Drawings (art.js: yellow and off-white line on indigo, drawn on once)
   ========================================================================== */
.flow > .art { grid-column: full; }
@media (min-width: 720px) {
  .flow > .art { grid-column: wide; }
}
.art-canvas { position: relative; width: 100%; }
.art-canvas > svg,
.art-canvas > canvas { display: block; width: 100%; height: auto; }
.art-canvas:empty {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(var(--sun-faint), var(--sun-faint)) 50% 50% / 1px 100% no-repeat,
    linear-gradient(var(--sun-faint), var(--sun-faint)) 50% 50% / 100% 1px no-repeat,
    var(--night-2);
}

/* ==========================================================================
   Sidenotes
   ========================================================================== */
.sn { white-space: normal; }
.sn-ref {
  position: relative;
  top: -0.5em;
  margin: 0 0.04em 0 0.1em;
  padding: 0.12em 0.34em;
  border: 1px solid var(--sun-line);
  border-radius: 999px;
  background: transparent;
  color: var(--sun);
  font: 500 0.56em/1 var(--f-mono);
  cursor: pointer;
  vertical-align: baseline;
  transition: background-color 160ms ease, color 160ms ease;
}
.sn-ref::after {
  content: "";
  position: absolute;
  inset: -10px -7px;
}
.sn-ref:hover,
:root:not(.sn-margin) .sn-ref[aria-expanded="true"],
.sn.is-hot .sn-ref { background: var(--sun); color: var(--night); }

.sn-note {
  display: none;
  font-size: 0.8em;
  line-height: 1.56;
  color: var(--paper-2);
  text-wrap: pretty;
  hyphens: manual;
}
.sn-num {
  margin-right: 0.6em;
  font: 500 0.82em/1 var(--f-mono);
  color: var(--sun);
}
.no-js .sn-note,
.sn.is-open .sn-note {
  display: block;
  margin: 0.85em 0 0.95em;
  padding: 0.15em 0 0.15em 1.05em;
  border-left: 1px solid var(--sun);
  color: var(--paper-2);
}
.sn-margin .sn-note {
  display: block;
  position: absolute;
  top: 0;
  margin: 0;
  padding: 0 0 0 14px;
  border: 0;
  border-left: 1px solid var(--rule-2);
  font-size: 0.72em;
  line-height: 1.52;
  color: var(--paper-3);
  transition: color 200ms ease, border-color 200ms ease;
}
.sn-margin .sn.sn-inline .sn-note {
  position: static;
  width: auto;
  margin: 0.85em 0 0.95em;
  padding: 0.15em 0 0.15em 1.05em;
  border-left: 1px solid var(--sun);
  font-size: 0.8em;
  line-height: 1.56;
  color: var(--paper-2);
}
.sn-margin .sn.is-hot .sn-note { color: var(--paper); border-left-color: var(--sun); }

/* ==========================================================================
   The two demos: the frame in four shapes, and the anamorphic squeeze
   ========================================================================== */
.flow > .set { grid-column: full; }
@media (min-width: 720px) {
  .flow > .set { grid-column: wide; }
}
.aspect,
.squeeze {
  padding-top: clamp(18px, 2.4vw, 28px);
  border-top: 1px solid var(--rule-2);
}
@media (max-width: 719px) {
  .ia-bar,
  .ia-read,
  .sq-control { margin-left: var(--gutter); margin-right: var(--gutter); }
}
.ia-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: clamp(16px, 2.2vw, 26px);
}
.ia-title {
  font: 500 11px/1.4 var(--f-mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sun);
}
.ia-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ia-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--sun-line);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.ia-btn:hover { border-color: var(--sun); color: var(--sun-hi); }
.ia-btn[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); color: var(--night); }
.ia-num { color: var(--sun); letter-spacing: 0.06em; }
.ia-btn[aria-pressed="true"] .ia-num { color: var(--night); font-weight: 600; }
.no-js .ia-toggle,
.no-js .sq-control { display: none; }
@media (max-width: 599px) {
  .ia-toggle { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .ia-btn { padding: 0 10px; letter-spacing: 0.12em; }
}

.ia-screen,
.sq-screen {
  position: relative;
  aspect-ratio: var(--base, 2.55) / 1;
  overflow: hidden;
  background: var(--deep);
  -webkit-user-select: none;
  user-select: none;
}
.ia-blank {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(var(--sun-faint), var(--sun-faint)) 50% 50% / 1px 100% no-repeat,
    linear-gradient(var(--sun-faint), var(--sun-faint)) 50% 50% / 100% 1px no-repeat,
    linear-gradient(180deg, #2a2150, #15112b);
}

/* ---------- Aspect ratio ---------- */
.ia-ghost,
.ia-window {
  position: absolute;
  inset: 0;
}
.ia-pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* what the mask takes away stays faintly visible */
.ia-ghost { opacity: 0.2; filter: grayscale(1); }
.ia-window { clip-path: inset(0 calc((1 - var(--fr, 1)) * 50%)); }
.ia-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--sun);
  pointer-events: none;
}
.ia-line--l { left: calc((1 - var(--fr, 1)) * 50%); }
.ia-line--r { right: calc((1 - var(--fr, 1)) * 50%); }
.aspect[data-full="1"] .ia-line { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ia-window { transition: clip-path 0.95s var(--ease); }
  .ia-line--l { transition: left 0.95s var(--ease), opacity 0.4s ease; }
  .ia-line--r { transition: right 0.95s var(--ease), opacity 0.4s ease; }
}

.ia-read {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px 28px;
  margin-top: 16px;
}
@media (min-width: 900px) {
  .ia-read {
    grid-template-columns: clamp(170px, 16vw, 230px) minmax(0, 72ch);
    column-gap: clamp(20px, 2.4vw, 40px);
    align-items: baseline;
  }
}
.ia-now {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}
.ia-ratio {
  font: italic 400 clamp(26px, 2vw + 16px, 40px)/1 var(--f-display);
  color: var(--paper);
  font-variant-numeric: lining-nums;
}
.ia-label {
  font: 500 10.5px/1.4 var(--f-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sun);
}
.ia-note {
  font: 400 12.5px/1.7 var(--f-mono);
  color: var(--paper-2);
  text-wrap: pretty;
}
.ia-note cite { font-style: italic; }
.ia-extra { display: block; margin-top: 4px; color: var(--paper-3); }

/* ---------- Anamorphic squeeze ---------- */
.squeeze { --k: 0; --sq: 0.5; }
.sq-screen {
  display: flex;
  justify-content: center;
  background:
    repeating-linear-gradient(90deg, rgba(243, 236, 223, 0.03) 0 1px, transparent 1px 40px),
    var(--deep);
}
.sq-frame {
  position: relative;
  height: 100%;
  width: calc((var(--sq) + (1 - var(--sq)) * var(--k)) * 100%);
}
.sq-picture {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* the picture is drawn into whatever width the frame has: squeezed on the
   negative, let out on the screen */
.sq-pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.sq-picture::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(243, 194, 58, calc(0.7 * (1 - var(--k))));
  pointer-events: none;
}
/* the film either side of the frame: four perforations a frame */
.sq-perfs {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: clamp(14px, 2.6cqw, 30px);
  border-inline: 1px solid rgba(243, 236, 223, 0.14);
  background: #0b0918;
  opacity: calc(1 - var(--k) * 1.6);
  pointer-events: none;
}
.sq-screen { container-type: inline-size; }
.sq-perfs--l { right: calc(100% + clamp(3px, 0.6cqw, 8px)); }
.sq-perfs--r { left: calc(100% + clamp(3px, 0.6cqw, 8px)); }
.sq-perfs i {
  display: block;
  width: 56%;
  height: 11%;
  border: 1px solid rgba(243, 236, 223, 0.38);
  border-radius: 2px;
}

.sq-control {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.sq-end {
  flex: none;
  font: 500 10.5px/1 var(--f-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.sq-range {
  flex: 1;
  min-width: 0;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.sq-range::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, var(--sun) 0 calc(var(--k) * 100%), var(--rule-2) calc(var(--k) * 100%) 100%);
}
.sq-range::-moz-range-track { height: 2px; background: var(--rule-2); }
.sq-range::-moz-range-progress { height: 2px; background: var(--sun); }
.sq-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -10px;
  border: 2px solid var(--night);
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 1px var(--sun);
}
.sq-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--night);
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 1px var(--sun);
}
.sq-range:focus-visible { outline-offset: 2px; }

/* ==========================================================================
   Sign-off (art.js): an iris closes on the name, an end title on black
   ========================================================================== */
.signoff-wrap {
  max-width: calc(1100px + 2 * var(--gutter));
  margin: clamp(6rem, 14vw, 11rem) auto 0;
  padding: 0 var(--gutter) clamp(4rem, 9vw, 7rem);
  text-align: center;
}
.art--signoff { position: relative; width: 100%; }
/* until art.js has drawn it (or if it never does), the name is set plainly */
.art--signoff .art-canvas:empty {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 7;
  background: #000;
}
.art--signoff .art-canvas:empty::before {
  content: "REZA";
  margin-right: -0.4em;
  font: 400 clamp(40px, 9vw, 120px)/1 var(--f-display);
  letter-spacing: 0.4em;
  color: var(--paper);
}
.signoff-line {
  margin-top: 22px;
  margin-right: -0.3em;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--night);
}
.footer-inner {
  display: grid;
  gap: 18px;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 36px var(--gutter) calc(36px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 900px) {
  .footer-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 44px;
  }
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  color: var(--paper);
  text-decoration: none;
}
.footer-name {
  font: 600 12.5px/1 var(--f-display);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.colophon {
  max-width: 70ch;
  font: 400 12.5px/1.6 var(--f-mono);
  color: var(--paper-3);
}
.back-top {
  justify-self: start;
  padding: 8px 0;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sun);
  text-decoration: none;
}
.back-top:hover { color: var(--paper); }

/* ---------- Print ---------- */
@media print {
  :root { --paper: #111; --paper-2: #333; --paper-3: #555; }
  html, body { background: #fff; color: #111; font-size: 11.5pt; }
  .progress, .skip-link, .back-top, .ia-toggle, .sq-control { display: none; }
  .hero { min-height: 0; background: none; }
  .sn-note { display: block; }
}
