:root {
  --ink: #080912;
  --ink-deep: #05060c;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.06);
  --fg: #eef0f6;
  --fg-dim: #9398ac;
  --fg-faint: #565a6e;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: radial-gradient(
    130% 120% at 50% -10%,
    var(--ink) 0%,
    var(--ink-deep) 72%
  );
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(180deg, rgba(5, 6, 12, 0.7), rgba(5, 6, 12, 0));
  backdrop-filter: blur(6px);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 16px/1 var(--sans);
  letter-spacing: -0.01em;
}
.logo i {
  width: 18px;
  height: 18px;
  color: #6ee7f0;
}
.nav-links {
  display: flex;
  gap: 26px;
}
.nav-links a {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--fg);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.02em;
  color: var(--ink-deep);
  background: var(--fg);
  border: 1px solid var(--fg);
  padding: 10px 16px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.cta i {
  width: 14px;
  height: 14px;
}
.cta:hover {
  background: transparent;
  color: var(--fg);
}
.cta.ghost {
  background: transparent;
  color: var(--fg);
}
.cta.ghost:hover {
  background: var(--fg);
  color: var(--ink-deep);
}
.cta.credit {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 50;
  background: rgba(5, 6, 12, 0.6);
  backdrop-filter: blur(6px);
}
@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
  nav {
    padding: 14px 18px;
  }
}

#prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--fg);
  z-index: 11;
}

#stage {
  position: relative;
  z-index: 2;
}
.chapter {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 max(28px, 6vw);
}
.chapter.text-left {
  justify-content: flex-start;
}
.chapter.text-right {
  justify-content: flex-end;
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.copy {
  width: min(46vw, 460px);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 12px currentColor;
}
.copy h1 {
  font: 800 clamp(34px, 5vw, 60px) / 1.02 var(--sans);
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.copy h2 {
  font: 700 clamp(28px, 3.6vw, 44px) / 1.05 var(--sans);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.copy p {
  font: 400 clamp(15px, 1.3vw, 17px) / 1.6 var(--sans);
  color: var(--fg-dim);
  max-width: 42ch;
}
.copy .meta {
  margin-top: 24px;
  display: flex;
  gap: 22px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--fg-faint);
}
.copy .meta b {
  color: var(--fg);
  font-weight: 500;
}
@media (max-width: 760px) {
  .chapter {
    justify-content: center !important;
    text-align: center;
    padding: 0 22px;
  }
  .copy {
    width: 100%;
    max-width: 520px;
    background: rgba(5, 6, 12, 0.42);
    backdrop-filter: blur(3px);
    padding: 26px 22px;
    border: 1px solid var(--line-soft);
  }
  .copy .meta,
  .eyebrow {
    justify-content: center;
  }
}

.hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 9px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: opacity 0.5s ease;
}
.hint i {
  width: 15px;
  height: 15px;
  animation: bob 1.8s ease-in-out infinite;
}
.hint.hide {
  opacity: 0;
  pointer-events: none;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

footer {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.footer-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
  padding: 0 24px;
}
.footer-inner h2 {
  font: 800 clamp(32px, 5vw, 58px) / 1.04 var(--sans);
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.footer-inner .sub {
  font: 400 16px/1.5 var(--sans);
  color: var(--fg-dim);
  max-width: 46ch;
}
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-top: 1px solid var(--line-soft);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.footer-bar a {
  color: var(--fg-faint);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bar a:hover {
  color: var(--fg);
}
.footer-bar .links {
  display: flex;
  gap: 20px;
}
@media (max-width: 760px) {
  .footer-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

#veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-faint);
  transition: opacity 0.6s ease;
}
#veil.gone {
  opacity: 0;
  pointer-events: none;
}

.dg.ac {
  top: 62px !important;
  z-index: 40 !important;
}
.dg.main .close-button {
  background: #0c0e18 !important;
}
.dg li:not(.folder) {
  border-radius: 0 !important;
}

/* Tweakpane panel */
.tp-dfwv {
  position: fixed !important;
  top: 14px !important;
  right: 28px !important;
  z-index: 50 !important;
}

#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  background: var(--fg);
  color: var(--ink-deep);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.04em;
  padding: 11px 16px;
  border: 1px solid var(--fg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hint i {
    animation: none;
  }
  .reveal {
    transition: opacity 0.4s ease;
    transform: none;
  }
}