:root {
  --ink: #080808;
  --paper: #f2f0e9;
  --signal: #ff3b22;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

::selection { color: var(--paper); background: var(--ink); }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  background: rgba(242, 240, 233, 0.82);
  border-bottom: 1px solid rgba(8, 8, 8, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 580;
  letter-spacing: 0.22em;
}

.scroll-lineage {
  position: relative;
  color: var(--ink);
  background: var(--paper);
}

.scroll-stage {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 100svh;
  min-height: 640px;
  display: grid;
  overflow: hidden;
  grid-template-rows: 1fr auto;
  padding: 102px 32px 40px;
  background:
    radial-gradient(circle at 43% 51%, rgba(8, 8, 8, 0.04), transparent 48%),
    radial-gradient(circle at 82% 68%, rgba(8, 8, 8, 0.025), transparent 18%),
    radial-gradient(circle at 14% 19%, rgba(8, 8, 8, 0.022), transparent 15%),
    #f2f0e9;
}

.topographic-field {
  position: absolute;
  z-index: 1;
  inset: 70px 0 0;
  width: 100%;
  height: calc(100% - 70px);
  opacity: 0.9;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 8%, rgba(0, 0, 0, 0.86) 58%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 8%, rgba(0, 0, 0, 0.86) 58%, transparent 100%);
}

/* SHALL is pinned to the exact center of the stage row; the surrounding
   lines are anchored at the edge facing SHALL, so multi-line quotes grow
   AWAY from it and its coordinates never change between frames. */
.scroll-phrase {
  --shall-half: 0.696em; /* half of the SHALL box: 1.42em × (0.78 line + 0.2 padding) ÷ 2 */
  position: relative;
  z-index: 3;
  text-align: center;
  font-size: clamp(48px, 7.2vw, 112px);
  font-weight: 780;
  letter-spacing: -0.058em;
  line-height: 0.82;
  text-transform: uppercase;
}

.phrase-line {
  position: absolute;
  right: 0;
  left: 0;
  max-width: 15ch;
  margin: 0 auto;
  color: rgba(8, 8, 8, 0.52);
  text-wrap: balance;
}

.phrase-before { bottom: calc(50% + var(--shall-half)); }
.phrase-after { top: calc(50% + var(--shall-half)); }

.shall-lock {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0;
  left: 0;
  padding: 0.08em 0 0.12em;
  transform: translateY(-50%);
  color: var(--ink);
  font-size: 1.42em;
  font-weight: 820;
  letter-spacing: -0.025em;
  line-height: 0.78;
  text-shadow: 0 0 56px rgba(8, 8, 8, 0.06);
}

.scroll-footer {
  position: relative;
  z-index: 3;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
}

.source-lock {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-bottom: 44px;
}

.source-lock strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(16px, 1.6vw, 24px);
  font-weight: 640;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.source-lock .source-date {
  color: rgba(8, 8, 8, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(11px, 0.95vw, 14px);
  font-weight: 450;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.progress-rail {
  position: absolute;
  z-index: 4;
  right: 32px;
  bottom: 20px;
  left: 32px;
  height: 1px;
  overflow: hidden;
  background: rgba(8, 8, 8, 0.14);
}

.progress-fill {
  width: 3.7%;
  height: 100%;
  background: rgba(8, 8, 8, 0.78);
  transition: width 400ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.footer-chevrons {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
  color: rgba(8, 8, 8, 0.45);
  opacity: 1;
  transition: opacity 220ms ease;
}

.scroll-stage.is-playing .footer-chevrons { opacity: 0.08; }

.footer-chevrons span {
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-right: 6px solid currentColor;
  border-bottom: 6px solid currentColor;
  transform: rotate(45deg);
  animation: chevron-ripple 1.5s ease-in-out infinite;
}

.footer-chevrons span:nth-child(2) { animation-delay: 0.18s; }
.footer-chevrons span:nth-child(3) { animation-delay: 0.36s; }
.footer-chevrons span:nth-child(4) { animation-delay: 0.54s; }
.footer-chevrons span:nth-child(5) { animation-delay: 0.72s; }

.scroll-prompt {
  position: relative;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  margin: 0 0 22px;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 480;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 220ms ease;
}

.scroll-prompt #scroll-prompt-label {
  padding: 8px 15px 7px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 0 1px rgba(8, 8, 8, 0.08);
  transition: transform 180ms ease, background 220ms ease, box-shadow 220ms ease;
  animation: prompt-pulse 2.4s ease-in-out infinite;
}

.scroll-prompt:hover #scroll-prompt-label {
  background: #000;
  box-shadow: 0 0 0 4px rgba(8, 8, 8, 0.12);
  transform: translateY(-1px);
}

.scroll-prompt:focus { outline: none; }
.scroll-prompt:focus-visible #scroll-prompt-label { box-shadow: 0 0 0 3px rgba(8, 8, 8, 0.2); }

.scroll-prompt.is-playing #scroll-prompt-label { background: var(--signal); animation: none; }

@keyframes prompt-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(8, 8, 8, 0.22); }
  50% { box-shadow: 0 0 0 10px rgba(8, 8, 8, 0); }
}

.prompt-chevrons {
  display: none;
  flex-direction: column;
  align-items: center;
  height: 26px;
}

.prompt-chevrons span {
  width: 11px;
  height: 11px;
  margin-top: -5px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  animation: chevron-ripple 1.5s ease-in-out infinite;
}

.prompt-chevrons span:nth-child(2) { animation-delay: 0.18s; }
.prompt-chevrons span:nth-child(3) { animation-delay: 0.36s; }

@keyframes chevron-ripple {
  0% { opacity: 0; transform: rotate(45deg) translate(-4px, -4px); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: rotate(45deg) translate(4px, 4px); }
}

.prompt-stop {
  display: none;
  font-size: 15px;
  line-height: 26px;
}

.scroll-prompt.is-playing .prompt-chevrons { display: none; }
.scroll-prompt.is-playing .prompt-stop { display: none; }

.scroll-steps {
  position: relative;
  z-index: 3;
  margin-top: -100svh;
  padding-top: 58svh;
  pointer-events: none;
}

.scroll-step { height: 26svh; }
.scroll-step:last-child { height: 100svh; }

.closing {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  padding: 100px 32px 60px;
  color: var(--paper);
  background: var(--signal);
}

.closing::after {
  position: absolute;
  top: 5%;
  right: -8%;
  content: "S";
  color: rgba(8, 8, 8, 0.08);
  font-size: 90vh;
  font-weight: 850;
  letter-spacing: -0.18em;
  line-height: 0.8;
}

.closing-meta, .closing h1, .closing-rule, .closing-link, .closing-wordmark { position: relative; z-index: 1; }

.closing-meta {
  margin: 0 0 15vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.closing h1 {
  max-width: 1180px;
  margin: 0;
  font-size: clamp(52px, 8.4vw, 130px);
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.closing h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
}

.closing-rule {
  width: 100%;
  height: 1px;
  margin: 9vh 0;
  background: rgba(242, 240, 233, 0.5);
}

.closing .closing-answer { margin-left: auto; text-align: right; }
.closing-answer span { color: var(--ink); }

.closing-wordmark {
  margin: 13vh 0 0;
  font-size: clamp(34px, 13.5vw, 195px);
  font-weight: 850;
  letter-spacing: -0.065em;
  line-height: 0.86;
  text-transform: uppercase;
  white-space: nowrap;
}

.closing-link {
  display: flex;
  width: max-content;
  gap: 50px;
  margin: 16vh 0 0 auto;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.inspiration {
  position: relative;
  overflow: hidden;
  padding: 112px 32px 128px;
  color: var(--paper);
  background: var(--ink);
}

.inspiration::before {
  position: absolute;
  top: -0.12em;
  right: -0.04em;
  content: "I";
  color: rgba(242, 240, 233, 0.035);
  font-family: Georgia, serif;
  font-size: min(68vw, 980px);
  font-style: italic;
  line-height: 0.8;
  pointer-events: none;
}

.inspiration-heading,
.inspiration-quote,
.inspiration-posts {
  position: relative;
  z-index: 1;
}

.inspiration-heading {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) 1fr;
  align-items: end;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(242, 240, 233, 0.22);
}

.section-kicker {
  margin: 0 0 0.55em;
  color: rgba(242, 240, 233, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.17em;
}

.inspiration h2 {
  margin: 0;
  font-size: clamp(58px, 10.6vw, 162px);
  font-weight: 820;
  letter-spacing: -0.068em;
  line-height: 0.76;
  text-align: right;
}

.inspiration-quote {
  max-width: 1280px;
  margin: 104px auto 116px;
  padding: 0;
  border: 0;
}

.inspiration-quote p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4.1vw, 64px);
  font-weight: 400;
  letter-spacing: -0.034em;
  line-height: 1.08;
  text-wrap: balance;
}

.inspiration-source {
  display: flex;
  gap: 18px;
  align-items: baseline;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(242, 240, 233, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  line-height: 1.5;
  text-transform: uppercase;
}

.inspiration-source span { color: var(--paper); }

.inspiration-source cite {
  color: rgba(242, 240, 233, 0.52);
  font-style: normal;
}

.inspiration-posts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.inspiration-post {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 240, 233, 0.22);
}

.post-number {
  display: block;
  margin-bottom: 16px;
  color: var(--signal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.inspiration-post .twitter-tweet {
  width: 100% !important;
  margin: 0 !important;
}

.inspiration-post > blockquote:not(.twitter-tweet-rendered) {
  display: grid;
  min-height: 190px;
  place-items: center;
  margin: 0;
  padding: 28px;
  border: 1px solid rgba(242, 240, 233, 0.18);
  border-radius: 14px;
  text-align: center;
}

.inspiration-post > blockquote:not(.twitter-tweet-rendered) a {
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 52px 32px;
  color: var(--ink);
  background: var(--paper);
  border-top: 1px solid rgba(8, 8, 8, 0.1);
}

footer p { margin: 0; font-size: 11px; }

.footer-colophon {
  display: grid;
  gap: 10px;
  justify-items: end;
  text-align: right;
}

.footer-colophon p {
  color: rgba(8, 8, 8, 0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.footer-mail {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(8, 8, 8, 0.35);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-mail:hover { color: var(--signal); border-color: currentColor; }

@media (max-width: 1180px) {
  .inspiration-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 18px; }
}

@media (max-width: 900px) {
  .nav { padding: 0 20px; }
  .scroll-stage, .closing, .inspiration { padding-left: 20px; padding-right: 20px; }
  .scroll-phrase { font-size: clamp(46px, 10vw, 80px); }
  .progress-rail { right: 20px; left: 20px; }
  .inspiration-heading { grid-template-columns: 1fr; gap: 22px; }
  .inspiration h2 { text-align: left; }
  .inspiration-quote { margin: 80px 0 92px; }
  .inspiration-posts { grid-template-columns: 1fr; gap: 48px; }
  .inspiration-post { display: grid; justify-items: center; }
  .post-number { justify-self: start; }
  footer { grid-template-columns: 1fr; gap: 36px; padding: 42px 20px; }
  .footer-colophon { justify-items: start; text-align: left; }
}

@media (max-width: 580px) {
  .scroll-stage { min-height: 600px; padding-top: 92px; }
  .scroll-phrase { --shall-half: 0.76em; font-size: clamp(39px, 12.4vw, 62px); }
  .shall-lock { font-size: 1.55em; letter-spacing: -0.015em; }
  .source-lock { gap: 6px; }
  .source-lock strong { font-size: 15px; line-height: 1.3; }
  .source-lock .source-date { font-size: 10px; }
  .scroll-footer { min-height: 150px; gap: 12px; }
  .scroll-prompt { font-size: 13px; }
  .footer-chevrons span { width: 26px; height: 26px; margin-top: -13px; border-width: 4px; }
  .scroll-step { height: 23svh; }
  .closing { padding-top: 70px; }
  .closing-meta { margin-bottom: 12vh; }
  .inspiration { padding-top: 82px; padding-bottom: 92px; }
  .inspiration-quote { margin: 64px 0 76px; }
  .inspiration-quote p { font-size: clamp(28px, 8vw, 44px); }
  .inspiration-source { display: grid; gap: 5px; }
}

@media (max-height: 780px) {
  /* Short windows: tighten the phrase so downward-growing quotes clear the source lockup */
  .scroll-phrase { font-size: clamp(40px, 6vw, 88px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
