:root {
  --ink: #15161b;
  --paper: #f4f0e8;
  --paper-dim: #c4bfb5;
  --blue: #5061f5;
  --coral: #f2654f;
  --green: #c8ef50;
  --line: rgba(21, 22, 27, 0.27);
  --display: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 280px; scroll-behavior: smooth; background: var(--paper); }

body {
  min-width: 280px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  overflow-x: hidden;
}

a, button { color: inherit; font: inherit; }
button { border: 0; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }

.pause-header, .pause-footer {
  position: fixed;
  right: 28px;
  left: 28px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.pause-header { top: 0; }
.pause-header a { justify-self: start; text-decoration: none; }
.pause-header p { display: flex; gap: 12px; margin: 0; color: var(--coral); }
.pause-header p span:first-child { color: var(--ink); }
.pause-header time { justify-self: end; }

.pause-footer {
  top: auto;
  bottom: 0;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  pointer-events: none;
}
.pause-footer span:last-child { justify-self: end; }

.intro, .ending { position: relative; min-height: 100svh; padding: 132px clamp(24px, 8vw, 132px) 92px; }
.intro { overflow: hidden; border-bottom: 1px solid var(--line); }
.eyebrow, .chapter-label, .intro-foot, .visual-meta, .visual-key, .visual-count, .scroll-cue, .mark-readout {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.eyebrow { margin: 0; color: var(--coral); }

.intro h1 {
  position: relative;
  z-index: 2;
  width: min(850px, 88vw);
  margin: 12vh 0 0;
  font-family: var(--display);
  font-size: clamp(72px, 13vw, 190px);
  font-weight: 400;
  line-height: .76;
  letter-spacing: -0.07em;
}
.intro h1 span, .intro h1 em { display: block; }
.intro h1 em { margin-left: 19%; color: var(--blue); font-style: italic; }
.intro-copy { position: absolute; right: 10%; bottom: 23%; max-width: 250px; margin: 0; font-family: var(--display); font-size: 21px; font-style: italic; line-height: 1.06; }
.begin-link { position: absolute; bottom: 14%; left: 8%; display: flex; gap: 28px; align-items: center; padding-bottom: 10px; border-bottom: 2px solid var(--ink); font-size: 11px; font-weight: 700; text-decoration: none; text-transform: uppercase; }
.begin-link span { color: var(--coral); font-size: 20px; }
.intro-foot { position: absolute; bottom: 66px; left: 50%; margin: 0; transform: translateX(-50%); white-space: nowrap; }
.intro-signal { position: absolute; right: 7%; bottom: 11%; display: flex; gap: 7px; align-items: end; width: 170px; height: 92px; padding: 0 8px; border-bottom: 1px solid var(--ink); transform: rotate(-5deg); }
.intro-signal span { width: 1px; height: 40%; background: var(--ink); transform-origin: bottom; animation: signal 2s ease-in-out infinite alternate; }
.intro-signal span:nth-child(2) { height: 75%; animation-delay: -1s; }
.intro-signal span:nth-child(3) { height: 25%; animation-delay: -.4s; }
.intro-signal span:nth-child(4) { height: 90%; animation-delay: -1.3s; }
.intro-signal span:nth-child(5) { height: 50%; animation-delay: -.2s; }
.intro-signal span:nth-child(6) { height: 18%; animation-delay: -1.7s; }
.intro-signal span:nth-child(7) { height: 65%; animation-delay: -.8s; }
.intro-signal span:nth-child(8) { height: 33%; animation-delay: -1.1s; }
@keyframes signal { to { transform: scaleY(.35); } }

.study { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); background: var(--ink); color: var(--paper); }
.visual-column { min-width: 0; }
.visual-sticky { position: sticky; top: 0; height: 100svh; min-height: 620px; overflow: hidden; }
#pause-canvas { display: block; width: 100%; height: 100%; background: var(--ink); }
.visual-meta { position: absolute; top: 82px; right: 36px; left: 36px; z-index: 2; display: flex; justify-content: space-between; color: var(--paper-dim); }
.visual-meta span:last-child { color: var(--green); }
.visual-key { position: absolute; right: 36px; bottom: 78px; z-index: 2; display: flex; gap: 9px; align-items: center; color: var(--paper-dim); }
.key-dot, .key-mark { display: block; width: 7px; height: 7px; border-radius: 50%; }
.key-dot { background: var(--paper-dim); }
.key-mark { margin-left: 16px; background: var(--coral); }
.visual-count { position: absolute; bottom: 76px; left: 36px; z-index: 2; display: flex; gap: 12px; align-items: baseline; margin: 0; color: var(--paper-dim); }
.visual-count strong { color: var(--paper); font-size: 34px; line-height: 1; }

.chapters { position: relative; z-index: 3; }
.chapter { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding: 120px clamp(28px, 6vw, 100px) 110px clamp(24px, 5vw, 82px); border-left: 1px solid rgba(244, 240, 232, .22); opacity: .35; transition: opacity 300ms ease; }
.chapter.is-active { opacity: 1; }
.chapter-label { margin: 0 0 30px; color: var(--green); }
.chapter h2 { max-width: 510px; margin: 0 0 28px; font-family: var(--display); font-size: clamp(54px, 6vw, 92px); font-weight: 400; line-height: .82; letter-spacing: -0.055em; }
.chapter p:not(.chapter-label):not(.scroll-cue):not(.mark-readout) { max-width: 330px; margin: 0; color: var(--paper-dim); font-size: 14px; line-height: 1.42; }
.scroll-cue { display: flex; gap: 14px; margin-top: 70px; color: var(--coral); }
.scroll-cue span { font-size: 18px; }
.chapter-stat { display: flex; gap: 14px; align-items: center; margin-top: 62px; }
.chapter-stat strong { color: var(--coral); font-size: 56px; font-weight: 400; line-height: .8; }
.chapter-stat span { color: var(--paper-dim); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.mark-button { display: flex; gap: 30px; align-items: center; width: fit-content; margin-top: 48px; padding: 13px 0; color: var(--paper); background: transparent; border-bottom: 2px solid var(--green); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.mark-button b { color: var(--green); font-size: 24px; font-weight: 400; line-height: .7; }
.mark-button:active { transform: translateY(2px); }
.mark-readout { margin-top: 20px !important; color: var(--paper-dim) !important; }
.mark-readout strong { margin-right: 6px; color: var(--green); font-size: 22px; font-weight: 400; }

.ending { min-height: 92svh; background: var(--blue); color: var(--paper); }
.ending .eyebrow { color: var(--green); }
.ending h2 { max-width: 1000px; margin: 14vh 0 32px; font-family: var(--display); font-size: clamp(64px, 10vw, 144px); font-weight: 400; line-height: .78; letter-spacing: -.065em; }
.ending h2 em { color: var(--green); font-style: italic; }
.ending > p:not(.eyebrow) { max-width: 320px; margin: 0; color: rgba(244, 240, 232, .76); font-size: 14px; line-height: 1.4; }
.ending-actions { position: absolute; right: 8%; bottom: 15%; display: flex; flex-direction: column; gap: 18px; align-items: end; }
.ending-actions a { padding-bottom: 7px; border-bottom: 1px solid var(--green); font-size: 11px; font-weight: 700; text-decoration: none; text-transform: uppercase; }
.ending-actions span { margin-left: 20px; color: var(--green); font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-signal span { animation: none; }
  .chapter { transition: none; }
}

@media (max-width: 800px) {
  .pause-header, .pause-footer { right: 16px; left: 16px; }
  .pause-header { grid-template-columns: 1fr 1fr; }
  .pause-header p { display: none; }
  .intro { padding: 100px 20px 80px; }
  .intro h1 { margin-top: 18vh; font-size: clamp(66px, 21vw, 126px); }
  .intro h1 em { margin-left: 0; }
  .intro-copy { right: 20px; bottom: 24%; max-width: 180px; font-size: 17px; }
  .begin-link { bottom: 13%; left: 20px; }
  .intro-signal { right: 20px; bottom: 8%; width: 110px; height: 66px; }
  .intro-foot { display: none; }
  .study { display: block; }
  .visual-sticky { min-height: 100svh; }
  .visual-meta { top: 78px; right: 20px; left: 20px; }
  .visual-key { right: 20px; bottom: 65px; }
  .visual-count { bottom: 62px; left: 20px; }
  .chapter { min-height: 90svh; padding: 90px 20px 90px; border-top: 1px solid rgba(244, 240, 232, .22); border-left: 0; background: var(--ink); }
  .chapter h2 { font-size: clamp(54px, 15vw, 82px); }
  .ending { min-height: 100svh; padding: 108px 20px 90px; }
  .ending h2 { margin-top: 18vh; font-size: clamp(62px, 17vw, 100px); }
  .ending-actions { right: 20px; bottom: 13%; }
}
