/* ==========================================================================
   SIMON STOFBERG BIRTHDAY SITE
   Brand tokens, layout system, sections.
   ========================================================================== */

:root {
  --ink: #0c0b09;
  --bone: #f0eae0;
  --signal: #ff3b1f;
  --fynbos: #5c6b52;
  --muted: rgba(240, 234, 224, .55);

  --font-display: 'Anton', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --settle: cubic-bezier(0.16, 1, 0.3, 1);
  --content-max: 1280px;
  --edge: clamp(20px, 5vw, 64px);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: clip; }
body { overflow-x: clip; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; }
figure { margin: 0; }

/* ---- Base ---- */
body {
  --fg: var(--bone);
  --fg-muted: rgba(240, 234, 224, .55);
  --ghost-stroke: rgba(240, 234, 224, .08);
  --outline-stroke: rgba(240, 234, 224, .25);
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s ease, color .6s ease;
}

body.is-light {
  --fg: var(--ink);
  --fg-muted: rgba(12, 11, 9, .6);
  --ghost-stroke: rgba(12, 11, 9, .08);
  --outline-stroke: rgba(12, 11, 9, .25);
  background: var(--bone);
  color: var(--fg);
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
p { text-wrap: pretty; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Layout well ---- */
.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-inline: var(--edge);
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  min-height: 100svh;
  padding-block: clamp(72px, 13vh, 150px);
}

/* ---- Film grain overlay ---- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ---- Section label ---- */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-label .rule {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--signal);
}
.section-label .mono {
  font-size: 12px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--signal);
}

/* ---- Headings ---- */
.h2 {
  text-wrap: balance;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .95;
  font-size: clamp(38px, 6.4vw, 76px);
  margin: 0 0 clamp(32px, 6vh, 64px) 0;
}

/* ---- Ghost numerals ---- */
.ghost-section { overflow: clip; }
.ghost-numeral {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(160px, 38vw, 480px);
  color: transparent;
  -webkit-text-stroke: 1px var(--ghost-stroke);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* ==========================================================================
   S1 HERO
   ========================================================================== */
.hero {
  padding-block: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1);
}
.hero-scrim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(12,11,9,0) 0%, rgba(12,11,9,.92) 100%);
  z-index: 1;
}

.hero-bar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(20px, 4vh, 40px) var(--edge);
}
.hero-bar-top { position: absolute; top: 0; left: 0; right: 0; }

.overline {
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--fg);
  opacity: .85;
}

.badge-rotate {
  width: 90px;
  height: 90px;
  animation: badge-spin 24s linear infinite;
}
@keyframes badge-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.badge-rotate svg { width: 100%; height: 100%; }
.badge-text {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .06em;
  fill: var(--bone);
  opacity: .8;
}

.hero-bottom {
  position: relative;
  z-index: 2;
  padding: 0 var(--edge) clamp(48px, 8vh, 96px);
  display: block;
}

.hero-h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .9;
  font-size: clamp(64px, 13vw, 190px);
  margin: 0;
  color: var(--fg);
}
.line-wrap { display: block; overflow: hidden; }
.line { display: block; }

.hero-sub {
  margin-top: clamp(28px, 4.5vh, 48px);
  color: var(--fg-muted);
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: .02em;
  max-width: 34ch;
}

.scroll-cue {
  position: absolute;
  bottom: clamp(20px, 4vh, 40px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-cue .mono {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--fg-muted);
}
.scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: var(--bone);
  opacity: .5;
  transform-origin: top;
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(.4); opacity: .3; }
  50% { transform: scaleY(1); opacity: .7; }
}

/* ==========================================================================
   Frames / images
   ========================================================================== */
.frame {
  position: relative;
  border: 2px solid var(--fynbos);
  overflow: hidden;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame-45 { aspect-ratio: 4 / 5; }
.frame-34 { aspect-ratio: 3 / 4; }
.tilt-neg { transform: rotate(-2deg); }

.corner-caption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--fg);
  background: rgba(12,11,9,.55);
  padding: 4px 8px;
}

.under-caption {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ==========================================================================
   S2 PROLOOG
   ========================================================================== */
.prologue-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.bio-text {
  font-size: 18px;
  line-height: 1.7;
  max-width: 58ch;
  color: var(--fg);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 3vw, 32px);
  margin-top: clamp(36px, 6vh, 56px);
  border-top: 1px solid rgba(240,234,224,.15);
  padding-top: clamp(20px, 3vh, 32px);
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 600;
  color: var(--fg);
}
.stat-label {
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--fg-muted);
}

/* ==========================================================================
   S3 / S4 prose sections
   ========================================================================== */
.prose-center {
  max-width: 52ch;
  margin: 0 auto;
  text-align: center;
}
.prose-lg {
  font-size: 20px;
  line-height: 1.7;
  color: var(--fg);
}
.prose-lg + .prose-lg { margin-top: 1.4em; }

.ch02-grid {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.prose-md {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
  max-width: 48ch;
}
.prose-md + .prose-md { margin-top: 1.2em; }
.pull-line {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.2;
  margin-top: clamp(28px, 4vh, 44px);
}

/* ==========================================================================
   S5 TIMELINE
   ========================================================================== */
.timeline-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.timeline { position: relative; padding-left: 28px; }
.timeline-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--signal);
  transform-origin: top;
  transform: scaleY(1);
}

.timeline-rows { display: flex; flex-direction: column; }
.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 4px 20px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(240,234,224,.12);
}
.timeline-row::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 30px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
}
.tl-year {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--fg);
  grid-row: 1 / 3;
}
.tl-event {
  font-size: 13px;
  letter-spacing: .03em;
  color: var(--fg);
}
.tl-result {
  font-size: 12px;
  color: var(--signal);
}
.tl-oneliner {
  grid-column: 2;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 4px;
}
.timeline-row.has-thumb { grid-template-columns: 90px 1fr auto; }
.timeline-row.has-thumb .tl-oneliner { grid-column: 2; }
.tl-thumb {
  grid-row: 1 / 3;
  grid-column: 3;
  width: 60px;
  height: 60px;
  overflow: visible;
  border: 2px solid var(--fynbos);
  align-self: center;
  display: block;
}
.tl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
  transform-origin: center;
}
.tl-thumb:hover img,
.tl-thumb:active img,
.tl-thumb:focus-within img {
  transform: scale(1.6);
}

.timeline-side {
  position: sticky;
  top: 15vh;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 2px solid var(--fynbos);
}
.timeline-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
}

/* ==========================================================================
   S6 COMEDY
   ========================================================================== */
.prose-intro { max-width: 52ch; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 20px);
  margin-top: clamp(40px, 6vh, 64px);
}
.tile {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 2px solid var(--fynbos);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.tile:hover img { transform: scale(1.03); }
.tile-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--fg);
  background: linear-gradient(to top, rgba(12,11,9,.85), rgba(12,11,9,0));
  transform: translateY(70%);
  transition: transform .35s ease;
}
.tile:hover .tile-caption,
.tile:focus-within .tile-caption { transform: translateY(0); }

/* ==========================================================================
   S7 SPONSORS
   ========================================================================== */
.sub-line { color: var(--fg-muted); font-size: 14px; letter-spacing: .02em; }

.marquee {
  width: 100%;
  overflow: hidden;
  margin: clamp(36px, 6vh, 64px) 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  animation: marquee-scroll 28s linear infinite;
}
.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 64px);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--outline-stroke);
  padding-right: 1ch;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.sponsors-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(24px, 5vw, 56px);
  align-items: stretch;
}
.sponsor-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.sponsor-card {
  background: var(--ink);
  padding: 20px 22px;
  transition: background-color .6s ease;
}
body.is-light .sponsor-card { background: var(--bone); }
.sponsor-name {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin-bottom: 6px;
}
.sponsor-role {
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 10px;
}
.sponsor-year {
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--signal);
}

.sponsor-feature {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--fynbos);
}
.sponsor-feature img { width: 100%; height: 100%; object-fit: cover; }
.sponsor-feature figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--fg);
  background: rgba(12,11,9,.6);
  padding: 4px 8px;
}

/* ==========================================================================
   S8 FILM
   ========================================================================== */
.film-card {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--fynbos);
  margin-bottom: clamp(24px, 4vh, 40px);
}
.film-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.film-card:hover img,
.film-card:focus-visible img { transform: scale(1.02); }
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--signal);
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-btn svg { fill: var(--bone); margin-left: 4px; }

.film-title {
  font-family: var(--font-display);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.2;
  max-width: 42ch;
}
.film-sub {
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: 13px;
}

.link-list {
  margin-top: clamp(32px, 5vh, 48px);
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(240,234,224,.15);
}
.link-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(240,234,224,.15);
  font-size: 13px;
  letter-spacing: .04em;
  transition: transform .25s ease, color .25s ease;
}
.link-row .arrow { color: var(--signal); }
.link-row:hover,
.link-row:focus-visible {
  transform: translateX(6px);
  color: var(--signal);
}

/* ==========================================================================
   S9 OUTRO
   ========================================================================== */
.outro {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  flex-direction: column;
}
.outro-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.outro-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .18;
  filter: grayscale(60%);
}
.outro-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vh, 32px);
}
.outro-h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .95;
  font-size: clamp(48px, 9vw, 130px);
  margin: 0;
  color: var(--fg);
}
.outro-quote {
  font-style: italic;
  color: var(--fg-muted);
  max-width: 46ch;
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.6;
}
.outro-date {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--fg);
}
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(48px, 8vh, 88px);
  font-size: 11px;
  letter-spacing: .03em;
  color: rgba(240, 234, 224, .4);
  text-align: center;
  padding: 0 var(--edge);
}

/* ==========================================================================
   [data-reveal] baseline: fully visible without JS. Motion states set only
   via main.js so no-JS users always see complete content.
   ========================================================================== */
[data-reveal] { will-change: transform, opacity; }

/* ==========================================================================
   Responsive: tablet / mobile
   ========================================================================== */
@media (max-width: 900px) {
  .prologue-grid,
  .ch02-grid,
  .sponsors-layout {
    grid-template-columns: 1fr;
  }
  .timeline-wrap { grid-template-columns: 1fr; }
  .timeline-side { display: none; }
  .tile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-bar-top { flex-direction: row; }
  .badge-rotate { width: 64px; height: 64px; }
  .overline { font-size: 10px; }

  .timeline-row { grid-template-columns: 70px 1fr; }
  .timeline-row.has-thumb { grid-template-columns: 70px 1fr; }
  .tl-thumb {
    grid-row: auto;
    grid-column: 2;
    margin-top: 10px;
    width: 90px;
    height: 90px;
  }
  .tl-year { font-size: 22px; }

  .sponsor-feature { display: block; max-width: 420px; margin: 36px auto 0; }

  .stats-band { grid-template-columns: repeat(2, 1fr); }

  .bio-text, .prose-lg, .prose-md { font-size: 16px; }
}

/* ==========================================================================
   Reduced motion: fully static, no scrubs, no tweens, no loops.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}


/* Hero title rise: CSS-driven so it always completes even under throttled rAF.
   Applied only when the html.js-anim gate is set (JS present + motion allowed),
   so no-JS users see the title statically. */
@keyframes heroRise {
  from { transform: translateY(105%); }
  to { transform: none; }
}
html.js-anim [data-hero-line] {
  animation: heroRise .9s cubic-bezier(.19, 1, .22, 1) both;
}
html.js-anim [data-hero-line]:nth-child(1) { animation-delay: .05s; }
html.js-anim .line-wrap:nth-of-type(2) [data-hero-line] { animation-delay: .14s; }

/* ==========================================================================
   Cutout hero: giant name behind Simon, subject in front (v2)
   ========================================================================== */
.hero-stage {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}
.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 88%, rgba(255, 59, 31, .13), transparent 65%);
  pointer-events: none;
}
.hero-name {
  position: absolute;
  top: 7svh;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(88px, 17vw, 270px);
  line-height: .86;
  letter-spacing: .01em;
  color: var(--bone);
  margin: 0;
}
.hero-cut {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 2;
  height: min(84svh, 980px);
  width: auto;
  max-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
}
.hero-tag {
  position: absolute;
  left: var(--edge);
  bottom: 34px;
  z-index: 3;
  font-size: 12px;
  letter-spacing: .32em;
  color: var(--fg-muted);
}
@media (max-width: 720px) {
  .hero-name { top: 12svh; font-size: clamp(64px, 19vw, 120px); }
  .hero-cut { height: min(64svh, 640px); }
  .hero-tag { bottom: 88px; right: var(--edge); text-align: center; letter-spacing: .22em; }
}

/* ==========================================================================
   IS IT JUST ME? reel carousel (inside the light comedy chapter)
   ========================================================================== */
.iijm { margin-top: clamp(64px, 10vh, 120px); }
.iijm-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(32px, 5vw, 56px);
  line-height: .95;
  margin: 0 0 10px 0;
}
.iijm-sub { font-size: 12px; letter-spacing: .18em; color: var(--fg-muted); }

.iijm-track {
  display: flex;
  gap: clamp(14px, 2vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 28px var(--edge) 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.iijm-track::-webkit-scrollbar { display: none; }

.iijm-track li { flex: 0 0 clamp(190px, 22vw, 270px); }
.iijm-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  scroll-snap-align: start;
  border: 2px solid var(--fg);
  background: var(--ink);
  transition: transform .45s var(--spring);
}
.iijm-card:hover { transform: translateY(-6px) rotate(-.5deg); }
.iijm-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--settle);
}
.iijm-card:hover img { transform: scale(1.05); }
.iijm-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--bone);
  background: linear-gradient(to top, rgba(12, 11, 9, .85), transparent);
}


/* ==========================================================================
   Kinetics pass: spring physics on interactive surfaces
   ========================================================================== */
.link-row {
  display: inline-flex;
  gap: 10px;
  transition: transform .4s var(--spring), color .2s ease;
}
.link-row:hover { transform: translateX(6px); }

@keyframes play-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}
.film-card:hover .play-btn { animation: play-pulse 1.4s ease-in-out infinite; }



.tile img { transition: transform .5s var(--settle); }
.tile:hover img { transform: scale(1.04); }

.tl-thumb img { transition: transform .45s var(--spring); }

.stat-num { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .link-row, .play-btn, .sponsor-card, .tile img, .iijm-card, .iijm-card img, .tl-thumb img { transition: none; }
}

/* Pause looping animations when off-screen (motion-performance rule) */
.loop-paused, .loop-paused * { animation-play-state: paused; }

/* ==========================================================================
   Channel link columns (film section): icon row, links beneath
   ========================================================================== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(40px, 7vh, 80px);
  padding-top: clamp(28px, 4vh, 44px);
  border-top: 1px solid rgba(240, 234, 224, .14);
}
.chan-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.chan-head .mono {
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--fg);
}
.chan-icon {
  width: 22px;
  height: 22px;
  color: var(--signal);
  flex: 0 0 auto;
}
.chan-list { display: flex; flex-direction: column; gap: 12px; }
.chan-link {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.5;
  color: var(--fg-muted);
  transition: transform .4s var(--spring), color .2s ease;
}
.chan-link:hover { color: var(--signal); transform: translateX(5px); }
@media (max-width: 860px) {
  .links-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .links-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Hero v3: full-bleed photo, plain centered name (Sloane Stephens style)
   ========================================================================== */
.hero-photo .hero-media { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-photo .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.hero-photo .hero-scrim {
  position: absolute;
  inset: 0;
  height: 100%;
  z-index: 1;
  background:
    radial-gradient(ellipse 90% 70% at 50% 60%, rgba(12, 11, 9, .28), rgba(12, 11, 9, .05) 55%, transparent 75%),
    linear-gradient(to bottom, rgba(12, 11, 9, .35), transparent 22%, transparent 72%, rgba(12, 11, 9, .55));
}
.hero-center {
  position: absolute;
  inset: 0;
  padding: 0 var(--edge);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 10svh;
}
.hero-center-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 84px);
  letter-spacing: .06em;
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
  text-wrap: balance;
}
.hero-tag-center {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: .32em;
  color: rgba(255, 255, 255, .82);
}
@media (max-width: 720px) {
  .hero-photo .hero-img { object-position: 50% 20%; }
  .hero-tag-center { letter-spacing: .2em; }
}

/* ==========================================================================
   Timeline video: sticky, full viewport height, slow loop
   ========================================================================== */
.timeline-video {
  position: sticky;
  top: 0;
  height: 100svh;
  margin: 0;
  overflow: hidden;
  border: none;
}
.timeline-video .tl-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 900px) {
  .timeline-video { position: static; height: 56svh; margin-top: 32px; }
}

/* ==========================================================================
   DIE ANDER SIMON: 5x5 zero-gap personality mosaic
   ========================================================================== */
.mosaic {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: clamp(32px, 5vh, 56px);
}
.mosaic-cell {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
}
.mosaic-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--spring), filter .3s ease;
}
.mosaic-cell:hover img { transform: scale(1.08); }
.mosaic-cell:focus-visible { outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .mosaic-cell img { transition: none; } }

/* ==========================================================================
   Timeline sticky fix: overflow clip on the section kills position sticky,
   and the video column goes full-bleed to the right viewport edge.
   ========================================================================== */
.timeline-section.ghost-section { overflow: visible; }

.wrap.timeline-wrap {
  max-width: none;
  margin: 0;
  padding-left: max(var(--edge), calc((100vw - var(--content-max)) / 2 + var(--edge)));
  padding-right: 0;
  grid-template-columns: minmax(0, 1fr) min(42vw, 660px);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}

.timeline-side.timeline-video {
  position: sticky;
  top: 0;
  height: 100svh;
  aspect-ratio: auto;
  align-self: start;
  border: none;
  margin: 0;
}

@media (max-width: 900px) {
  .wrap.timeline-wrap { grid-template-columns: 1fr; padding-right: var(--edge); }
  .timeline-side.timeline-video { display: block; position: static; height: 56svh; margin-top: 32px; }
}

/* ==========================================================================
   DIE BORGE v2: numbered deal ledger with stamped SIGNED
   ========================================================================== */
.sponsor-card,
body.is-light .sponsor-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: clamp(22px, 3.4vh, 34px) 0;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(240, 234, 224, .13);
}
.sponsor-cards .sponsor-card:first-child { border-top: 1px solid rgba(240, 234, 224, .13); }
.sponsor-idx {
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: .2em;
}
.sponsor-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 46px);
  letter-spacing: .01em;
  line-height: 1;
  color: var(--fg);
  transition: transform .45s var(--spring);
}
.sponsor-year {
  justify-self: end;
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--signal);
  border: 1.5px solid var(--signal);
  padding: 7px 14px 7px 17px;
  transform: rotate(-4deg);
  transition: transform .45s var(--spring);
}
.sponsor-card:hover .sponsor-name { transform: translateX(10px); }
.sponsor-card:hover .sponsor-year { transform: rotate(-1deg) scale(1.08); }
@media (max-width: 640px) {
  .sponsor-card, body.is-light .sponsor-card { grid-template-columns: 40px 1fr auto; gap: 10px; }
}
