/* Tokens, the fixed field behind the page, and the hero */
:root {
  --bg: #000; --text: #ededf0; --muted: #9a9aa3; --faint: #5d5d66; --line: rgba(237, 237, 240, .09);
  --glow: #f3c79b; --sans: 'Inter Tight', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 72px); --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 300; }
.label { font: 400 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* chapter footage: the furthest layer, dimmed to a texture so the points and the type stay in front */
.clips { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.8s ease;
  filter: grayscale(1) sepia(.45) contrast(1.1) brightness(.9);
  -webkit-mask-image: radial-gradient(ellipse 66% 54% at 50% 42%, #000 24%, transparent 100%);
  mask-image: radial-gradient(ellipse 66% 54% at 50% 42%, #000 24%, transparent 100%); }
.clip.on { opacity: .55; }
.clip.ipsum.on { opacity: .2; filter: grayscale(1) sepia(.2) hue-rotate(170deg) contrast(1.15) brightness(.6); }
.clip.dolor.on { opacity: .45; filter: grayscale(1) contrast(1.15) brightness(.95); }
.clip.amet.on { opacity: .3; filter: grayscale(1) sepia(.35) contrast(1.05) brightness(.78); }

/* the cloud: fixed behind the copy, in front of the footage, never intercepts the pointer */
#field { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1s var(--ease); pointer-events: none; z-index: 1; }
#field.on { opacity: 1; }
.page { position: relative; z-index: 2; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* hero */
.hero { position: relative; height: 100svh; min-height: 560px; }
.name-fallback { position: absolute; left: 0; right: 0; top: 28%; text-align: center; font: 300 clamp(56px, 15vw, 200px)/1 var(--sans); letter-spacing: -.05em; display: none; }
.no3d .name-fallback { display: block; }
.bar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px var(--gutter); }
.bar b { font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.bar nav { display: flex; gap: 2px; }
.bar nav a { padding: 10px 12px; color: var(--muted); font-size: 14px; transition: color .2s; }
.bar nav a:hover { color: var(--text); }
.copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--gutter) clamp(40px, 9vh, 96px); text-align: center; }
.copy h1 { margin: 0 auto; font-size: clamp(30px, 4.4vw, 62px); line-height: 1.04; letter-spacing: -.04em; }
.copy h1 span { color: var(--muted); }
.copy p { margin: 20px auto 0; max-width: 42ch; font-size: clamp(16px, 1.5vw, 18px); color: var(--muted); }
.copy p b { display: block; font-weight: 400; color: var(--text); margin-bottom: .5em; }
.cue { display: block; width: 1px; height: 40px; margin: 28px auto 0; background: linear-gradient(var(--faint), transparent); }

/* chapters: one screen each, the field writes the word above the text */
.chapter { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) clamp(56px, 12vh, 120px); }
.chapter .inner { max-width: 1240px; width: 100%; margin: 0 auto; display: grid; gap: 26px; }
.chapter .k { display: flex; gap: 14px; align-items: center; }
.chapter .k .live { color: var(--glow); }
.chapter h2 { margin: 6px 0 0; font-size: clamp(30px, 4vw, 54px); line-height: 1.08; letter-spacing: -.035em; max-width: 26ch; }
.chapter .btn { justify-self: start; display: inline-flex; gap: 10px; align-items: center; padding: 15px 22px; border: 1px solid rgba(243, 199, 155, .35); border-radius: 999px; color: var(--glow); font-size: 15px;
  background: rgba(0, 0, 0, .4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .3s, border-color .3s; white-space: nowrap; }
.chapter .btn:hover { background: rgba(243, 199, 155, .1); border-color: var(--glow); }

/* chapter rail */
.progress { position: fixed; z-index: 2; right: var(--gutter); top: 50%; transform: translateY(-50%); display: grid; gap: 14px; opacity: 0; transition: opacity .6s; }
.progress.show { opacity: 1; }
.progress a { display: flex; gap: 10px; align-items: center; justify-content: flex-end; font: 400 11px var(--mono); letter-spacing: .12em; color: var(--faint); transition: color .3s; }
.progress a::after { content: ''; width: 18px; height: 1px; background: currentColor; transition: width .4s var(--ease); }
.progress a.on { color: var(--text); }
.progress a.on::after { width: 36px; background: var(--glow); }
@media (max-width: 760px) { .progress { display: none; } }

/* directory */
.dir { padding: clamp(110px, 18vh, 200px) 0 0; display: grid; gap: 64px; }
@media (min-width: 900px) { .dir { grid-template-columns: 260px 1fr; gap: 40px 64px; } }
.dir h3 { margin: 0; font-size: clamp(28px, 3vw, 36px); line-height: 1.1; letter-spacing: -.03em; }
.dir h3 + p { margin: 10px 0 0; color: var(--muted); font-size: 15px; max-width: 26ch; }
.list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 22px 0; border-bottom: 1px solid var(--line); transition: color .3s; }
.list li:first-child a { border-top: 1px solid var(--line); }
.list .t { font: 400 22px/1.2 var(--sans); letter-spacing: -.02em; }
.list .d { grid-column: 1; color: var(--muted); font-size: 15px; }
.list .k { grid-column: 2; grid-row: 1; align-self: center; }
.list a:hover .t { color: var(--glow); }
.list.compact a { grid-template-columns: 1fr auto; padding: 16px 0; }
.list.compact .t { font-size: 18px; }
.list.compact .k { color: var(--faint); font: 400 14px var(--sans); letter-spacing: 0; text-transform: none; }

/* closing */
.end { min-height: 90svh; display: grid; place-items: center; text-align: center; padding: 0 var(--gutter); }
.end p { margin: 0 0 22px; color: var(--text); font-size: clamp(16px, 1.6vw, 20px); }
.end a { font: 400 clamp(28px, 5.2vw, 72px)/1.1 var(--sans); letter-spacing: -.045em; color: var(--glow);
  text-shadow: 0 0 2px #000, 0 0 28px rgba(243, 199, 155, .55), 0 0 80px rgba(243, 199, 155, .25); transition: color .3s, text-shadow .3s; }
.end a:hover { color: #fff; text-shadow: 0 0 2px #000, 0 0 36px rgba(243, 199, 155, .8), 0 0 110px rgba(243, 199, 155, .4); }

.foot { max-width: 1240px; margin: 0 auto; padding: 28px var(--gutter) 44px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 14px; border-top: 1px solid var(--line); }

/* the page waits for the splash */
.after { opacity: 0; transform: translateY(10px); transition: opacity 1.4s ease, transform 1.4s var(--ease); }
.ready .after { opacity: 1; transform: none; }
.ready .bar.after { transition-delay: .5s; }
.ready .copy .after:nth-child(2) { transition-delay: .25s; }
.ready .copy .after:nth-child(3) { transition-delay: .9s; }
.rest.after { transform: none; transition-delay: .6s; }

.in { opacity: 0; transform: translateY(16px); transition: opacity 1.1s ease, transform 1.1s var(--ease); }
.in.seen { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .after, .in { opacity: 1 !important; transform: none !important; transition: none !important; }
  #field { transition: none; }
}
