:root {
  --display: "Instrument Sans", "Avenir Next", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Instrument Sans", "Avenir Next", sans-serif;
  --p: 0;
  --rail: 0;
}

body {
  font-family: var(--sans);
  font-weight: 430;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(193, 39, 45, 0.06), transparent 50%),
    var(--paper);
}

h1, h2, h3 {
  font-weight: 580;
  letter-spacing: -0.055em;
}

.scroll-rail {
  height: 2px;
  background: rgba(20, 33, 27, 0.08);
}
.scroll-rail span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--red), var(--green));
  transform: scaleX(0);
  transform-origin: left center;
}

.gate-title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-size: clamp(3.1rem, 7.4vw, 7rem);
  max-width: 11ch;
}

.scene-hero {
  width: 100%;
}
.scene-pin {
  position: relative;
}
html.has-scroll .scene-hero {
  height: 185vh;
}
html.has-scroll .scene-hero .scene-pin {
  position: sticky;
  top: 4.55rem;
  height: calc(100svh - 4.55rem);
}
.scene-hero .hero {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  align-items: center;
  padding-inline: max(1.25rem, calc((100% - 1180px) / 2));
  overflow: hidden;
}
.scene-hero .hero h1 {
  font-size: clamp(3.4rem, 7.6vw, 7.4rem);
  max-width: 8.2ch;
}
.scene-hero .hero-copy {
  transform: translate3d(calc(var(--p) * -2vw), calc(var(--p) * -3vh), 0);
}
.scene-hero .line {
  display: block;
  transform: translate3d(calc(var(--p) * (var(--i) - 1) * 2.4vw), 0, 0);
}
.scene-hero .hero h1 em {
  color: #f3c7c3;
  font-weight: 400;
}
.hero-frame {
  transform: translate3d(calc(var(--p) * -3vw), calc(var(--p) * -6%), 0) scale(calc(1.08 - var(--p) * 0.08));
}
.hero-frame img {
  transform-origin: center 30%;
}
.hero-meter {
  position: absolute;
  left: max(1.25rem, calc((100% - 1180px) / 2));
  right: max(1.25rem, calc((100% - 1180px) / 2));
  bottom: 1.1rem;
  height: 1px;
  background: rgba(246, 240, 230, 0.2);
}
.hero-meter span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gold);
  transform: scaleX(var(--p));
  transform-origin: left center;
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
  margin-top: 1.15rem;
}
.share-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 620;
}
.hero .share-label { color: var(--gold); }
.share-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.share-btn {
  appearance: none;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  text-decoration: none;
  border-radius: 999px;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 560;
  cursor: pointer;
}
.hero .share-btn { border-color: rgba(246, 240, 230, 0.35); }
.share-btn:hover { background: rgba(255, 255, 255, 0.08); }
.page-hero .share-btn:hover,
.essay .share-btn:hover { background: rgba(20, 33, 27, 0.04); }
.share-toast {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
}

html.has-scroll .marquee-track { animation: none; }
.marquee { border-block-color: transparent; background: var(--green-deep); color: var(--sand); margin: 0; }
.marquee span::before { color: var(--gold); }

.scene-reel { width: 100%; background: var(--sand); }
html.has-scroll .scene-reel { height: 250vh; }
html.has-scroll .reel-pin {
  position: sticky;
  top: 4.55rem;
  height: calc(100svh - 4.55rem);
}
.reel-pin {
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 1rem;
  gap: 0.8rem;
}
.reel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}
.reel-head h2 { font-size: clamp(2rem, 4vw, 3.4rem); max-width: 14ch; }
.reel-hint {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  margin: 0;
}
.reel-window { flex: 1; min-height: 0; overflow: hidden; }
html:not(.has-scroll) .reel-window { overflow-x: auto; }
.reel-track {
  display: flex;
  gap: 0.85rem;
  height: 100%;
  will-change: transform;
}
.reel-card {
  flex: 0 0 min(72vw, 460px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.35rem;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  text-decoration: none;
  color: var(--sand);
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(193, 39, 45, 0.45), transparent 55%),
    var(--green-deep);
  border-radius: 28px;
  overflow: hidden;
}
.reel-card:nth-child(2n) {
  background:
    radial-gradient(420px 220px at 0% 100%, rgba(228, 201, 138, 0.28), transparent 50%),
    #123528;
}
.reel-card:nth-child(3n) {
  background:
    radial-gradient(380px 200px at 80% 0%, rgba(246, 240, 230, 0.16), transparent 45%),
    #7d1b22;
}
.reel-index {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.reel-year {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(4.4rem, 8vw, 7.2rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
}
.reel-mark { margin-top: auto; }
.reel-mark { display: flex; flex-direction: column; }
.reel-mark strong {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.05em;
  font-variant-numeric: lining-nums tabular-nums;
}
.reel-mark span, .reel-card p { color: rgba(246, 240, 230, 0.78); }
.reel-card h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.text-link.light { color: var(--gold); }

.journal { padding-top: 4.5rem; }
.card {
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.card-link {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 100%;
  padding: 1.15rem 1.15rem 1.3rem;
  text-decoration: none;
  background: white;
  border: 1px solid var(--line);
  border-radius: 28px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-link:hover { transform: translateY(-8px); }
.card-mark {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.card-mark strong {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.8rem, 4vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: var(--red);
}
.card-mark span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card h2, .card h3 { font-size: clamp(1.45rem, 2vw, 1.85rem); }

.pledge {
  border: 0;
  background: transparent;
  padding: 0 0 4rem;
  align-items: stretch;
}
.pledge figure {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
}
.pledge img {
  border-radius: 0;
  transform: translate3d(0, calc(var(--shift, 0) * -1px), 0) scale(1.08);
}
.pledge figure[data-parallax] img {
  animation: drift-photo linear both;
  animation-timeline: view();
  animation-range: cover 0% cover 100%;
}

.essay {
  max-width: none;
  width: min(1180px, calc(100% - 2rem));
  padding-top: 2.2rem;
}
.essay h1 {
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  max-width: 16ch;
}
.essay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.8fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  margin-top: 1.6rem;
}
.essay-lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}
.pull {
  margin: 1.8rem 0 2rem;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 2px solid var(--red);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.28;
  letter-spacing: -0.03em;
}
.essay-aside { position: sticky; top: 5.4rem; }
.viz {
  margin: 0;
  padding: 1.2rem;
  border-radius: 28px;
  background: var(--green-deep);
  color: var(--sand);
}
.viz-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 620;
}
.viz-title {
  font-size: clamp(1.6rem, 2vw, 2.1rem);
  letter-spacing: -0.045em;
  margin: 0.45rem 0 1rem;
  font-weight: 560;
}
.viz-bars, .viz-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.viz-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.viz-row strong { font-variant-numeric: lining-nums tabular-nums; }
.viz-track {
  height: 8px;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: rgba(246, 240, 230, 0.12);
  overflow: hidden;
}
.viz-track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  transform-origin: left center;
  background: var(--gold);
}
.tone-green { background: #3ecf8e; }
.tone-red { background: #ff8b84; }
.tone-gold { background: var(--gold); }
.viz-note, .viz figcaption { color: rgba(246, 240, 230, 0.68); font-size: 0.82rem; }
.viz figcaption { margin-top: 1rem; }
.viz-steps { counter-reset: step; }
.viz-steps li {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(246, 240, 230, 0.16);
}
.viz-steps strong { font-size: 1.15rem; letter-spacing: -0.03em; }
.viz-steps span { color: rgba(246, 240, 230, 0.72); }
.viz-places .viz-steps,
.viz-steps {
  display: grid;
}

@supports (animation-timeline: view()) {
  .viz-track i {
    animation: bar-grow linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 45%;
  }
  .card-link, .essay-aside, .page-hero h1 {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift-photo {
  from { transform: scale(1.14) translateY(8%); }
  to { transform: scale(1.04) translateY(-6%); }
}

@media (max-width: 640px) {
  .share-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .share-btn { text-align: center; }
}
@media (max-width: 980px) {
  html.has-scroll .scene-hero { height: auto; }
  html.has-scroll .scene-hero .scene-pin {
    position: relative;
    top: auto;
    height: auto;
  }
  .scene-hero .hero { height: auto; overflow: visible; }
  .scene-hero .line { transform: none; }
  .hero-meter { display: none; }
  html.has-scroll .scene-reel { height: 220vh; }
  .reel-card { flex-basis: 84vw; }
  .essay-grid, .reel-head { grid-template-columns: 1fr; display: flex; flex-direction: column; align-items: start; }
  .essay-aside { position: static; width: 100%; }
  .essay-grid { display: flex; }
  .essay-aside { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  html.has-scroll .scene-hero,
  html.has-scroll .scene-reel { height: auto; }
  .scene-pin, html.has-scroll .reel-pin, html.has-scroll .scene-hero .scene-pin {
    position: relative;
    top: auto;
    height: auto;
  }
  .scene-hero .line,
  .hero-frame,
  .reel-track,
  .card-link,
  .pledge img { transform: none; }
  .reel-window { overflow-x: auto; }
  .card-link:hover { transform: none; }
}
