:root {
  --ink: #08080a;
  --fg: #f4f1ec;
  --muted: rgba(244, 241, 236, .62);
  --red: #c8342a;
  --display: "Anton", "Impact", sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --edge: clamp(16px, 2.8vw, 40px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); }
body { background: var(--ink); color: var(--fg); font-family: var(--mono); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: -.02em; text-transform: uppercase; line-height: 1.6; }

.scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

.gate {
  position: fixed; inset: 0; z-index: 50; background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 24px;
  transition: opacity 1s ease, visibility 1s;
}
.gate.done { opacity: 0; visibility: hidden; }
.gate__logo { font-family: var(--display); text-transform: uppercase; font-size: clamp(72px, 14vw, 200px); line-height: .85; }
.gate__sub { letter-spacing: .3em; color: var(--muted); }
.gate__load { margin-top: 28px; display: grid; justify-items: center; gap: 12px; color: var(--muted); }
.gate__load i { width: 140px; height: 1px; background: rgba(244, 241, 236, .15); position: relative; overflow: hidden; }
.gate__load i::after { content: ""; position: absolute; inset: 0; background: var(--fg); transform: translateX(-100%); animation: load 1.2s ease-in-out infinite; }
@keyframes load { to { transform: translateX(100%); } }
.gate__start {
  margin-top: 28px; display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 28px; border: 1px solid var(--fg); background: none; color: var(--fg); cursor: pointer;
  font-weight: 700; letter-spacing: .08em; transition: background .25s ease, color .25s ease;
}
.gate__start:hover { background: var(--fg); color: #000; }
.gate__start:focus { outline: none; }
.gate__start:focus-visible { outline: 1px solid var(--red); outline-offset: 5px; }
.gate__key { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(200, 52, 42, .7); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 14px rgba(200, 52, 42, 0); } }
.gate__mute { background: none; border: 0; color: var(--muted); cursor: pointer; border-bottom: 1px solid rgba(244, 241, 236, .25); padding-bottom: 2px; }
.gate__mute:hover { color: var(--fg); }
.gate__note { position: absolute; bottom: var(--edge); color: rgba(244, 241, 236, .35); font-size: 11px; }
.gate [hidden] { display: none; }
body.locked { overflow: hidden; }
.sound { background: none; border: 0; color: inherit; font: inherit; text-transform: uppercase; cursor: pointer; }
.sound b { font-weight: 400; color: var(--red); }
.sound[aria-pressed="false"] b { color: var(--muted); }

/* top bar */
.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: var(--edge); }
.brand { font-family: var(--display); font-size: 22px; text-transform: uppercase; }
.top__right { display: flex; gap: 24px; }
.skip { border-bottom: 1px solid var(--red); }
.dots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 0; }
.dots button { position: relative; width: 44px; height: 24px; background: none; border: 0; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--fg); opacity: .45; transition: transform .3s ease, opacity .3s ease; }
.dots button::after { content: ""; position: absolute; left: 50%; right: -50%; top: 50%; height: 1px; background: rgba(244, 241, 236, .18); z-index: -1; }
.dots button:last-child::after { display: none; }
.dots button.on::before { opacity: 1; transform: scale(1.8); background: var(--red); }
.dots button span { position: absolute; top: 24px; white-space: nowrap; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity .2s; pointer-events: none; }
.dots button:hover span, .dots button.on span { opacity: 1; }

/* story */
.story { position: relative; z-index: 10; pointer-events: none; }
.ch { position: relative; height: 130vh; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--edge); }
.ch > * { pointer-events: auto; }
.ch h2 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(44px, 7.4vw, 112px); line-height: .92; letter-spacing: -.01em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .55);
}
.ch .num { color: var(--red); margin-bottom: 14px; font-weight: 700; }
.ch .body { margin-top: 20px; max-width: 380px; text-transform: none; font-size: 14px; color: var(--muted); text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.ch--left { align-items: flex-start; }
.ch--right { align-items: flex-end; text-align: right; }
.ch--right .body { margin-left: auto; }
.ch .reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.ch.in .reveal { opacity: 1; transform: none; }

.ch--title { height: 120vh; align-items: center; text-align: center; justify-content: flex-end; padding-bottom: 14vh; }
.title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(88px, 19vw, 300px); line-height: .82; letter-spacing: -.01em; text-shadow: 0 10px 60px rgba(0, 0, 0, .6); }
.ch--title .eyebrow { color: var(--muted); margin-bottom: 10px; }
.ch--title .sub { margin-top: 14px; letter-spacing: .3em; }
.ch--title .hint { margin-top: 36px; color: var(--muted); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.ch--end { height: 150vh; align-items: center; text-align: center; justify-content: flex-end; padding-bottom: 18vh; }
.ch--end .body { margin: 20px auto 0; max-width: 520px; }
.ctas { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 26px; font-family: var(--mono); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; transition: transform .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn--light { background: var(--fg); color: #000; }
.btn--red { background: var(--red); color: #fff; }

/* HUD */
.hud { position: fixed; z-index: 20; left: var(--edge); bottom: var(--edge); }
.hud__alt { font-family: var(--display); font-size: 30px; letter-spacing: .01em; vertical-align: -4px; }
.hud__k, .hud__u, .hud__place { color: var(--muted); }
.scrollbar { position: fixed; z-index: 20; right: var(--edge); bottom: var(--edge); width: 120px; height: 1px; background: rgba(244, 241, 236, .18); }
.scrollbar span { position: absolute; inset: 0; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

@media (max-width: 767px) {
  .dots { display: none; }
  .top__book, .skip__long { display: none; }
  .top__right { gap: 16px; }
  .brand { font-size: 20px; }
  .ch, .ch--right { align-items: flex-start; text-align: left; justify-content: flex-end; padding-bottom: calc(96px + 6vh); }
  .ch { height: 100svh; }
  .ch--title { height: 100svh; }
  .ch--end { height: 100svh; padding-bottom: calc(96px + 2vh); }
  .ch--end { background: linear-gradient(0deg, rgba(8, 8, 10, .95) 0%, rgba(8, 8, 10, .75) 38%, rgba(8, 8, 10, 0) 62%); }
  .ch .body { font-size: 13px; }
  .hud__alt { font-size: 24px; }
  .ch--right .body { margin-left: 0; }
  .ch--title, .ch--end { align-items: center; text-align: center; }
  .scrollbar { width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .ch .reveal { opacity: 1; transform: none; transition: none; }
}
