/* ==========================================================================
   SCA v2 — base.css
   Shared design system: tokens, type, themes, components, chrome, motion.
   Every page loads this first, then its own css/<page>.css.
   Page CSS must NOT redefine anything in here — extend with page-prefixed
   classes instead (see DESIGN.md).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* colour */
  --red: #c81f2c;
  --red-deep: #3d0a10;
  --red-ink: #24050a;
  --night: #140306;
  --gold: #f0d78c;
  --gold-hot: #ffeab8;
  --gold-deep: #b08b3c;
  --ivory: #f4efe4;
  --paper: #ece4d3;

  --ivory-80: rgb(244 239 228 / 0.8);
  --ivory-60: rgb(244 239 228 / 0.62);
  --ivory-40: rgb(244 239 228 / 0.4);
  --ivory-15: rgb(244 239 228 / 0.14);
  --hair: rgb(240 215 140 / 0.3);
  --hair-soft: rgb(244 239 228 / 0.14);

  /* type */
  --f-display: 'Fraunces', 'Times New Roman', serif;
  --f-body: 'Montserrat', system-ui, sans-serif;
  --f-label: 'Oswald', 'Arial Narrow', sans-serif;

  --fs-display: clamp(3.1rem, 9.2vw, 10rem);
  --fs-h1: clamp(2.7rem, 6.6vw, 7rem);
  --fs-h2: clamp(2.15rem, 4.6vw, 4.9rem);
  --fs-h3: clamp(1.45rem, 2.3vw, 2.2rem);
  --fs-h4: clamp(1.15rem, 1.5vw, 1.4rem);
  --fs-lead: clamp(1.08rem, 1.35vw, 1.32rem);
  --fs-body: clamp(0.98rem, 1.05vw, 1.06rem);
  --fs-small: 0.86rem;
  --fs-label: clamp(0.64rem, 0.72vw, 0.74rem);

  /* space & layout */
  --pad: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1440px;
  --gap: clamp(1rem, 2.4vw, 2.5rem);
  --section-y: clamp(6rem, 13vw, 12.5rem);
  --radius: 2px;

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);        /* expo-out: everything that arrives */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);    /* curtains, wipes, things that travel */
  --dur-micro: 180ms;
  --dur-ui: 450ms;
  --dur-cine: 1100ms;

  /* default theme (house lights down) */
  --bg: var(--red-ink);
  --fg: var(--ivory);
  --muted: var(--ivory-60);
  --accent: var(--gold);
  --line: var(--hair-soft);
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
/* no browser scrollbar on the page (the page still scrolls) */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
html.is-locked, html.is-locked body { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* phones draw a blue flash on every tap; the site's own hover and focus styles replace it */
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: var(--gold); color: var(--red-ink); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 1rem; left: 1rem; z-index: 10001;
  padding: 0.8rem 1.2rem; background: var(--gold); color: var(--red-ink);
  font: 500 var(--fs-label)/1 var(--f-label); letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; transform: translateY(-200%); transition: transform var(--dur-ui) var(--ease);
}
.skip-link:focus { transform: none; }

/* film grain — one fixed layer, composited */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.4s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- 3. Themes (set on <section>) ---------- */
.theme-ink,
.theme-red,
.theme-night,
.theme-ivory,
.theme-crimson { background: var(--bg); color: var(--fg); }

.theme-ink { --bg: var(--red-ink); --fg: var(--ivory); --muted: var(--ivory-60); --accent: var(--gold); --line: var(--hair-soft); }
.theme-night { --bg: var(--night); --fg: var(--ivory); --muted: var(--ivory-60); --accent: var(--gold); --line: var(--hair-soft); }
.theme-red { --bg: var(--red-deep); --fg: var(--ivory); --muted: var(--ivory-60); --accent: var(--gold); --line: var(--hair); }
.theme-crimson { --bg: var(--red); --fg: var(--ivory); --muted: var(--ivory-80); --accent: var(--gold-hot); --line: rgb(255 234 184 / 0.35); }
.theme-ivory {
  --bg: var(--ivory); --fg: var(--red-ink); --muted: rgb(36 5 10 / 0.64);
  --accent: var(--red); --line: rgb(36 5 10 / 0.16);
}
.theme-ivory ::selection { background: var(--red); color: var(--ivory); }

/* ---------- 4. Layout ---------- */
.container { width: min(100% - 2 * var(--pad), var(--maxw)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--pad), 980px); margin-inline: auto; }
.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.stack > * + * { margin-top: var(--stack, 1.4rem); }

/* ---------- 5. Typography ---------- */
.display, .h1, .h2, .h3, .h4 {
  font-family: var(--f-display);
  font-weight: 340;
  font-optical-sizing: auto;
  color: var(--fg);
  text-wrap: balance;
}
.display { font-size: var(--fs-display); line-height: 0.9; letter-spacing: -0.04em; }
.h1 { font-size: var(--fs-h1); line-height: 0.95; letter-spacing: -0.035em; }
.h2 { font-size: var(--fs-h2); line-height: 1; letter-spacing: -0.03em; }
.h3 { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -0.015em; }
.h4 { font-size: var(--fs-h4); line-height: 1.25; letter-spacing: -0.01em; font-weight: 400; }
.display em, .h1 em, .h2 em, .h3 em, .h4 em, .accent-em em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
.lead { font-size: var(--fs-lead); line-height: 1.6; font-weight: 300; color: var(--muted); max-width: 40ch; text-wrap: pretty; }
.body-copy { color: var(--muted); max-width: 60ch; font-weight: 300; text-wrap: pretty; }
.body-copy strong, .lead strong { color: var(--fg); font-weight: 500; }
.small { font-size: var(--fs-small); }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.accent { color: var(--accent); }

.kicker {
  display: inline-flex; align-items: center; gap: 0.9rem;
  font: 500 var(--fs-label)/1.2 var(--f-label);
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--accent);
}
.kicker::before { content: ''; width: 2.2rem; height: 1px; background: currentColor; opacity: 0.7; flex: none; }
.kicker--plain::before { display: none; }
.label {
  font: 500 var(--fs-label)/1.3 var(--f-label);
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted);
}
.index { font: 400 var(--fs-label)/1 var(--f-label); letter-spacing: 0.2em; color: var(--accent); font-variant-numeric: tabular-nums; }

/* standard section head: kicker / heading / optional lead on the right */
.section-head { display: grid; gap: 1.6rem; margin-bottom: clamp(3rem, 6vw, 5.5rem); }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1.3fr 1fr; align-items: end; column-gap: var(--gap); }
  .section-head--split .lead { justify-self: end; }
}

/* ---------- 6. Buttons & links ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.85rem;
  padding: 1.1rem 2.1rem;
  font: 500 var(--fs-label)/1 var(--f-label);
  letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease);
}
.btn:hover, .btn:focus-visible { color: var(--bg); border-color: var(--accent); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn .arrow { width: 1.1em; height: 1.1em; transition: transform var(--dur-ui) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--red-ink); }
.btn--gold::before { background: var(--gold-hot); }
.btn--gold:hover, .btn--gold:focus-visible { color: var(--red-ink); border-color: var(--gold-hot); }
/* foil shimmer */
.btn--gold::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / 0.65) 48%, transparent 66%);
  transform: translateX(-120%);
}
.btn--gold:hover::after { transform: translateX(120%); transition: transform 0.95s var(--ease-io); }
.theme-ivory .btn--gold { background: var(--red); border-color: var(--red); color: var(--ivory); }
.theme-ivory .btn--gold::before { background: var(--red-deep); }
.theme-ivory .btn--gold:hover { color: var(--ivory); border-color: var(--red-deep); }

.btn--sm { padding: 0.85rem 1.45rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font: 500 var(--fs-label)/1 var(--f-label); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--fg); text-decoration: none; padding-bottom: 0.5rem;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 1px no-repeat;
  transition: background-size 0.6s var(--ease), color var(--dur-ui);
}
.link-arrow:hover { background-size: 0% 1px; background-position: right bottom; color: var(--accent); }
.link-arrow .arrow { width: 1.1em; height: 1.1em; transition: transform var(--dur-ui) var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }

.link-draw {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) right bottom / 0% 1px no-repeat;
  transition: background-size 0.6s var(--ease);
}
.link-draw:hover, .link-draw:focus-visible { background-size: 100% 1px; background-position: left bottom; }

/* ---------- 7. Media ---------- */
.media { position: relative; overflow: hidden; background: var(--night); }
.media > img, .media > picture, .media > picture > img, .media > video {
  width: 100%; height: 100%; object-fit: cover;
}
.media--contain > img, .media--contain > picture > img { object-fit: contain; }

/* archival duotone: small/old photos read as one curated archive */
.tone { position: relative; overflow: hidden; isolation: isolate; }
.tone img { filter: grayscale(1) contrast(1.12) brightness(0.92); transition: filter 0.9s var(--ease), transform 1.2s var(--ease); }
.tone::before, .tone::after { content: ''; position: absolute; inset: 0; pointer-events: none; transition: opacity 0.9s var(--ease); z-index: 1; }
.tone::before { background: var(--red); mix-blend-mode: multiply; opacity: 0.62; }
.tone::after { background: var(--gold); mix-blend-mode: soft-light; opacity: 0.35; }
@media (hover: hover) {
  .tone:hover img, a:hover > .tone img, a:focus-visible > .tone img { filter: none; transform: scale(1.04); }
  .tone:hover::before, .tone:hover::after,
  a:hover > .tone::before, a:hover > .tone::after,
  a:focus-visible > .tone::before, a:focus-visible > .tone::after { opacity: 0; }
}
.tone--static::before { opacity: 0.45; }

/* archive print: paper border + slight tilt, for low-res photos */
.print {
  background: var(--paper); padding: 0.55rem 0.55rem 2.2rem;
  box-shadow: 0 30px 60px -25px rgb(0 0 0 / 0.65), 0 2px 6px rgb(0 0 0 / 0.25);
  rotate: var(--rot, 0deg);
}
.print figcaption, .print .print-cap {
  margin-top: 0.7rem; color: var(--red-ink);
  font: 500 0.62rem/1.2 var(--f-label); letter-spacing: 0.22em; text-transform: uppercase;
}

/* ---------- 8. Marquee (CSS only) ---------- */
.marquee { overflow: hidden; display: flex; user-select: none; }
.marquee-track { display: flex; flex: none; animation: marquee var(--marquee-dur, 40s) linear infinite; }
.marquee--reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track.is-pausable { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; flex: none; gap: var(--marquee-gap, 3rem); padding-right: var(--marquee-gap, 3rem); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 9. Odometer ([data-count], built by core.js) ---------- */
.odo { display: inline-flex; line-height: 1; font-variant-numeric: tabular-nums; }
.odo-col { display: inline-block; height: 1em; overflow: hidden; }
.odo-strip { display: flex; flex-direction: column; transform: translateY(0); transition: transform 2s var(--ease); transition-delay: calc(var(--i, 0) * 110ms + 150ms); }
.odo-strip > span { height: 1em; line-height: 1; text-align: center; }
.odo.is-in .odo-strip { transform: translateY(calc((10 + var(--n)) * -5%)); }

/* ---------- 10. Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.6rem);
  padding: 1.35rem var(--pad);
  border-bottom: 1px solid transparent;
  transition: transform 0.7s var(--ease), background-color 0.5s ease, padding 0.5s var(--ease), border-color 0.5s ease;
}
.site-header.is-solid {
  background: rgb(20 3 6 / 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--hair-soft);
  padding-block: 0.85rem;
}
.site-header.is-hidden { transform: translateY(-101%); }
.site-header:focus-within { transform: none; }

.brand { display: flex; align-items: center; gap: 0.85rem; margin-right: auto; text-decoration: none; color: var(--ivory); }
.brand-mark { font: italic 300 1.95rem/1 var(--f-display); letter-spacing: -0.03em; color: var(--gold); }
.brand-name {
  font: 500 0.56rem/1.4 var(--f-label); letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ivory-60); border-left: 1px solid var(--hair); padding-left: 0.85rem;
}

.site-nav ul { display: flex; gap: clamp(1rem, 1.8vw, 2rem); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  position: relative; display: inline-block; padding: 0.55rem 0;
  font: 500 0.68rem/1 var(--f-label); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ivory-60); text-decoration: none;
  transition: color 0.3s ease;
}
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform 0.55s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ivory); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.site-nav .nav-vote, .site-nav .nav-foot { display: none; }

.nav-toggle {
  display: none; position: relative; width: 2.75rem; height: 2.75rem; margin-right: -0.6rem;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  position: absolute; left: 0.65rem; right: 0.65rem; height: 1px; background: var(--ivory);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.nav-toggle span:nth-child(1) { top: calc(50% - 4px); }
.nav-toggle span:nth-child(2) { top: calc(50% + 4px); }
.nav-open .nav-toggle span:nth-child(1) { top: 50%; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 50%; transform: rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .nav-open .site-header { transform: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent; }
  .site-nav {
    position: fixed; inset: 0; z-index: -1;
    display: flex; flex-direction: column; justify-content: center;
    padding: 6.5rem var(--pad) 2.5rem;
    background:
      radial-gradient(120% 70% at 85% 0%, rgb(200 31 44 / 0.35), transparent 60%),
      var(--red-ink);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.85s var(--ease-io), visibility 0s linear 0.85s;
    overflow-y: auto;
  }
  .nav-open .site-nav { clip-path: inset(0); visibility: visible; transition: clip-path 0.85s var(--ease-io), visibility 0s; }
  .site-nav ul { flex-direction: column; gap: 0.15rem; counter-reset: nav; }
  .site-nav li { overflow: hidden; }
  .site-nav a {
    display: flex; align-items: baseline; gap: 1.1rem; padding: 0.2rem 0;
    font: 340 clamp(2.1rem, 7.5vw, 3.6rem)/1.12 var(--f-display);
    letter-spacing: -0.02em; text-transform: none; color: var(--ivory);
    transform: translateY(110%);
    transition: transform 0.9s var(--ease), color 0.3s ease;
  }
  .site-nav a::before {
    counter-increment: nav; content: counter(nav, decimal-leading-zero);
    font: 500 0.66rem/1 var(--f-label); letter-spacing: 0.2em; color: var(--gold);
  }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--gold); font-style: italic; }
  .nav-open .site-nav a { transform: none; }
  .site-nav li:nth-child(1) a { transition-delay: 0.28s; }
  .site-nav li:nth-child(2) a { transition-delay: 0.33s; }
  .site-nav li:nth-child(3) a { transition-delay: 0.38s; }
  .site-nav li:nth-child(4) a { transition-delay: 0.43s; }
  .site-nav li:nth-child(5) a { transition-delay: 0.48s; }
  .site-nav li:nth-child(6) a { transition-delay: 0.53s; }
  .site-nav li:nth-child(7) a { transition-delay: 0.58s; }
  .site-nav .nav-vote { display: inline-flex; align-self: flex-start; margin-top: 2.4rem; }
  .site-nav .nav-foot { display: block; margin-top: auto; padding-top: 2rem; }
}
@media (max-width: 560px) {
  .header-vote { display: none; }
  .brand-name { display: none; }
}

/* ---------- 11. Footer ---------- */
.site-footer { position: relative; overflow: hidden; padding-top: var(--section-y); }
.footer-cta { display: grid; gap: 2rem; justify-items: start; padding-bottom: clamp(4rem, 9vw, 8rem); border-bottom: 1px solid var(--line); }
.footer-cta .h1 { max-width: 14ch; }
.footer-grid {
  display: grid; gap: 2.5rem 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-block: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 1.2rem; align-content: start; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand .brand-mark { font-size: 2.6rem; }
.footer-logo { width: 88px; border-radius: var(--radius); opacity: 0.9; }
.footer-col { display: grid; gap: 0.75rem; align-content: start; }
.footer-col h2 { font: 500 var(--fs-label)/1 var(--f-label); letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.footer-col a { color: var(--muted); text-decoration: none; width: fit-content; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center;
  padding-block: 1.6rem; border-top: 1px solid var(--line);
  font-size: var(--fs-small); color: var(--muted);
}
.footer-bottom button { font: 500 var(--fs-label)/1 var(--f-label); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.footer-bottom button:hover { color: var(--accent); }
.footer-wordmark {
  font: italic 300 clamp(9rem, 36vw, 36rem)/0.78 var(--f-display);
  letter-spacing: -0.06em; text-align: center; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px var(--hair);
  margin-bottom: -0.12em; user-select: none; pointer-events: none;
}

/* ---------- 12. Intro curtain (once per session) ---------- */
.intro { position: fixed; inset: 0; z-index: 9995; display: grid; place-items: center; overflow: hidden; }
html:not(.js) .intro, .intro-seen .intro { display: none; }
.intro-panel {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0.25), transparent 30%, rgb(0 0 0 / 0.45)),
    repeating-linear-gradient(90deg, rgb(0 0 0 / 0.32) 0, rgb(255 255 255 / 0.035) 2.2%, rgb(0 0 0 / 0.32) 4.4%),
    var(--red-deep);
  transition: transform 1.3s var(--ease-io);
}
.intro-panel--l { left: 0; box-shadow: inset -1px 0 0 var(--hair); }
.intro-panel--r { right: 0; box-shadow: inset 1px 0 0 var(--hair); }
.intro.is-open .intro-panel--l { transform: translateX(-101%); }
.intro.is-open .intro-panel--r { transform: translateX(101%); }
.intro-center { position: relative; z-index: 1; text-align: center; transition: opacity 0.45s ease, transform 0.9s var(--ease); }
.intro.is-open .intro-center { opacity: 0; transform: scale(0.94); }
.intro-mark { display: block; overflow: hidden; font: italic 300 clamp(4.5rem, 13vw, 10rem)/1 var(--f-display); letter-spacing: -0.04em; color: var(--gold); padding: 0 0.1em 0.08em; }
.intro-mark span { display: block; animation: intro-rise 1.1s var(--ease) 0.1s both; }
.intro-sub { margin-top: 0.4rem; font: 500 0.66rem/1 var(--f-label); letter-spacing: 0.42em; text-transform: uppercase; color: var(--ivory-60); animation: intro-fade 0.9s ease 0.45s both; }
.intro-rule { display: block; width: 180px; height: 1px; margin: 1.7rem auto 0; background: var(--hair-soft); overflow: hidden; }
.intro-rule i { display: block; height: 100%; background: var(--gold); transform-origin: left; animation: intro-rule 1s var(--ease-io) 0.3s both; }
@keyframes intro-rise { from { transform: translateY(105%); } }
@keyframes intro-fade { from { opacity: 0; transform: translateY(8px); } }
@keyframes intro-rule { from { transform: scaleX(0); } }

/* ---------- 13. Custom cursor (injected by core.js, fine pointers only) ---------- */
html.has-cursor, html.has-cursor * { cursor: none; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select, html.has-cursor [contenteditable] { cursor: text; }
.cursor { position: fixed; inset: 0 auto auto 0; z-index: 9998; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.cursor.is-visible { opacity: 1; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 50%; will-change: transform; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--gold); transition: opacity 0.2s; }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgb(240 215 140 / 0.55);
  display: grid; place-items: center;
}
.cursor-ring::before {
  content: ''; position: absolute; inset: -1px; border-radius: 50%;
  background: var(--gold); transform: scale(0); transition: transform 0.5s var(--ease);
}
.cursor-label {
  position: relative; font: 500 0.6rem/1 var(--f-label); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red-ink); opacity: 0; transition: opacity 0.25s ease;
}
.cursor.is-hover .cursor-ring { border-color: var(--gold); }
.cursor.is-hover .cursor-ring::before { transform: scale(0.35); opacity: 0.35; }
.cursor.is-label .cursor-ring { border-color: transparent; }
.cursor.is-label .cursor-ring::before { transform: scale(2.2); }
.cursor.is-label .cursor-label { opacity: 1; }
.cursor.is-label .cursor-dot { opacity: 0; }
.cursor.is-down .cursor-ring::before { transform: scale(0.6); opacity: 0.5; }

/* ---------- 14. Lightbox (core.js: SCA.lightbox / [data-lightbox]) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgb(14 2 4 / 0.96);
  opacity: 0; transition: opacity 0.45s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lb-figure { display: grid; justify-items: center; gap: 1rem; min-width: 0; margin: 0; }
.lb-img {
  max-width: 100%; max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); width: auto; object-fit: contain;
  opacity: 0; transform: scale(0.97); transition: opacity 0.5s ease, transform 0.8s var(--ease);
}
.lb-img.is-loaded { opacity: 1; transform: none; }
.lb-cap { font: 500 var(--fs-label)/1.4 var(--f-label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ivory-60); text-align: center; }
.lb-count { position: absolute; left: clamp(1rem, 4vw, 3rem); top: clamp(1rem, 3vw, 2rem); font: 400 var(--fs-label)/1 var(--f-label); letter-spacing: 0.2em; color: var(--gold); }
.lb-close { position: absolute; right: clamp(0.5rem, 3vw, 2rem); top: clamp(0.5rem, 2vw, 1.4rem); width: 3rem; height: 3rem; font-size: 2rem; line-height: 1; color: var(--ivory); }
.lb-nav { width: 3.2rem; height: 3.2rem; border: 1px solid var(--hair); border-radius: 50%; color: var(--gold); font-size: 1.6rem; line-height: 1; transition: background 0.3s, color 0.3s; }
.lb-nav:hover { background: var(--gold); color: var(--red-ink); }
@media (max-width: 700px) {
  .lightbox { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; bottom: 1.2rem; }
  .lb-prev { left: 1.2rem; } .lb-next { right: 1.2rem; }
}

/* ---------- 15. Reveal primitives (core.js adds .is-in) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    transition-property: opacity, transform, clip-path;
    transition-duration: var(--dur-cine);
    transition-timing-function: var(--ease);
    transition-delay: var(--d, 0ms);
  }
  .js [data-reveal=""], .js [data-reveal="rise"] { opacity: 0; transform: translateY(36px); }
  .js [data-reveal="fade"] { opacity: 0; transition-duration: 1.4s; }
  .js [data-reveal="scale"] { opacity: 0; transform: scale(0.94); }
  .js [data-reveal="left"] { opacity: 0; transform: translateX(-40px); }
  .js [data-reveal="right"] { opacity: 0; transform: translateX(40px); }
  .js [data-reveal="image"] { clip-path: inset(100% 0 0 0); transition-duration: 1.4s; transition-timing-function: var(--ease-io); }
  .js [data-reveal="image"] img, .js [data-reveal="image"] video { transform: scale(1.22); transition: transform 2s var(--ease) var(--d, 0ms); }
  .js [data-reveal="image"].is-in img, .js [data-reveal="image"].is-in video { transform: none; }
  .js [data-reveal="rule"] { transform: scaleX(0); transform-origin: left; transition-duration: 1.4s; transition-timing-function: var(--ease-io); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal="image"].is-in { clip-path: inset(0 0 0 0); }

  /* masked line reveal — words are split by core.js, delayed per line via --li */
  .js [data-reveal="lines"] { transition: none; }
  .js [data-reveal="lines"]:not(.is-split) { opacity: 0; }
  .js [data-reveal="lines"] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.07em 0.14em 0; margin: 0 -0.07em -0.14em 0; }
  .js [data-reveal="lines"] .wi {
    display: inline-block; transform: translateY(112%);
    transition: transform 1.15s var(--ease);
    transition-delay: calc(var(--d, 0ms) + var(--li, 0) * 95ms);
  }
  .js [data-reveal="lines"].is-in .wi { transform: none; }

  /* scroll-painted text */
  .js [data-paint] .w { opacity: 0.16; transition: opacity 0.35s ease; }
  .js [data-paint] .w.is-on { opacity: 1; }
}

/* Slow connection: the head script adds .js-late when core.js hasn't run 1s in. Everything
   the reveals would hold back is shown at once and the cold-open curtain is skipped; when
   core.js does arrive it keeps what's on screen and removes .js-late, so content further
   down still reveals on scroll. */
.js-late .intro:not([data-always]) { display: none; }
.js-late [data-reveal],
.js-late [data-reveal] .wi,
.js-late [data-reveal] img,
.js-late [data-reveal] video {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  transition: none !important;
}

/* ---------- 16. Page transitions (cross-document View Transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.55s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in 0.9s var(--ease-io) both; }
@keyframes vt-out { to { opacity: 0.2; transform: translateY(-4vh) scale(0.985); } }
@keyframes vt-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- 17. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .intro { display: none; }
  .marquee-track { animation: none; }
  body::after { animation: none; }
}

/* phones / touch: the film grain was a moving layer four screens big (inset: -50%), a huge GPU
   texture at phone pixel densities; it stays put and covers just the screen. The header loses its blur
   (redone on every scroll frame) and gets a darker glass instead. */
@media (hover: none), (max-width: 900px) {
  body::after { inset: 0; animation: none; }
  .site-header.is-solid {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgb(20 3 6 / 0.92);
  }
}
