:root {
  --void: #07060c;
  --amber: #f2b25c;
  --cream: #efe4cf;
  --lilac: #b9a7ff;
  --muted: #8c8698;
  --serif: 'Fraunces', 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { background: var(--void); scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; color: var(--cream); font-family: var(--mono); -webkit-font-smoothing: antialiased; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.veil { position: fixed; inset: 0; background: var(--void); pointer-events: none; transition: opacity 2.4s ease; z-index: 2; }
.veil.off { opacity: 0; }
.scrim { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse 52% 46% at 0% 100%, rgba(7,6,12,.82), rgba(7,6,12,.45) 55%, transparent 100%), linear-gradient(to bottom, rgba(7,6,12,.55), transparent 18%); }
@media (max-width: 760px) { .scrim { background: linear-gradient(to top, rgba(7,6,12,.9) 0%, rgba(7,6,12,.6) 38%, transparent 62%), linear-gradient(to bottom, rgba(7,6,12,.5), transparent 16%); } }
.spacer { height: 360vh; }

.top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: baseline; padding: 30px 44px; z-index: 3; }
.mark { font: 300 22px/1 var(--serif); letter-spacing: .32em; color: var(--cream); text-decoration: none; }
.mark sup { color: var(--amber); font-size: 12px; letter-spacing: 0; margin-left: 2px; }
.meta { display: flex; gap: 28px; margin: 0; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meta span:first-child { color: var(--lilac); }

.story { position: fixed; left: 44px; bottom: 64px; width: min(560px, calc(100% - 88px)); z-index: 3; pointer-events: none; }
.chapter { position: absolute; left: 0; bottom: 0; opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.1,1); }
.chapter.on { opacity: 1; transform: none; }
.kicker { margin: 0 0 18px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .7; }
h1, h2 { font: 300 clamp(34px, 4.4vw, 64px)/1.02 var(--serif); letter-spacing: -.015em; margin: 0 0 22px; font-variation-settings: 'opsz' 144; }
h1 em, h2 em { font-style: italic; color: var(--amber); }
.lede { margin: 0; max-width: 380px; font-size: 12.5px; line-height: 1.75; color: #b9b2c4; }

.progress { position: fixed; right: 44px; bottom: 64px; display: grid; gap: 14px; z-index: 3; }
.progress button { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); transition: color .4s; }
.progress button i { order: 2; display: block; width: 26px; height: 1px; background: currentColor; opacity: .5; transition: width .6s cubic-bezier(.2,.7,.1,1), opacity .4s; }
.progress button.on { color: var(--cream); }
.progress button.on i { width: 54px; opacity: 1; background: var(--lilac); }
.progress button:focus-visible { outline: 1px solid var(--lilac); outline-offset: 6px; }

.credit { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); margin: 0; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: #5f5a6b; z-index: 3; white-space: nowrap; }

@media (max-width: 760px) {
  .top { padding: 22px 22px; }
  .mark { font-size: 18px; }
  .meta span:not(:first-child) { display: none; }
  .story { left: 22px; bottom: 96px; width: calc(100% - 44px); }
  h1, h2 { font-size: clamp(30px, 8.6vw, 40px); margin-bottom: 16px; }
  .lede { font-size: 11.5px; }
  .progress { right: auto; left: 22px; bottom: 44px; display: flex; gap: 16px; }
  .progress button span { display: none; }
  .progress button i { width: 22px; }
  .progress button.on i { width: 40px; }
  .credit { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter, .veil { transition: none; }
}
