@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* The page is a single dusk/night scene, so the theme is locked dark. */
:root {
  --bg: #0a0d10;
  --bg-2: #0f1418;
  --panel: rgba(13, 18, 22, 0.72);
  --ink: #e8eee9;
  --muted: #95a39d;
  --faint: #5d6a65;
  --accent: #5fd1a5;
  --accent-ink: #062018;
  --line: rgba(232, 238, 233, 0.1);
  --radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 56px);
  /* z-index scale */
  --z-world: 0;
  --z-overlay: 1;
  --z-content: 2;
  --z-nav: 10;
  --z-grain: 20;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
code, kbd, .chip { font-family: "Geist Mono", ui-monospace, monospace; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- fixed layers ---------- */
.poster {
  position: fixed; inset: 0; z-index: var(--z-world);
  background: url("../assets/keyart.webp") center right / cover no-repeat, var(--bg);
  transition: opacity 1.2s var(--ease);
}
body.webgl-ready .poster { opacity: 0; }
#world {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: var(--z-world); display: block;
}
.vignette {
  position: fixed; inset: 0; z-index: var(--z-overlay); pointer-events: none;
  background:
    radial-gradient(120% 90% at 70% 40%, transparent 40%, rgba(5, 7, 9, 0.55) 100%),
    linear-gradient(90deg, rgba(6, 9, 11, 0.7) 0%, rgba(6, 9, 11, 0.15) 45%, transparent 70%);
  transition: background 0.6s var(--ease);
}
.grain {
  position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main { position: relative; z-index: var(--z-content); }
section { position: relative; padding: 0 var(--gutter); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(10, 13, 16, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; font-size: 18px; }
.nav nav { display: flex; gap: 28px; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 15px; transition: color 0.2s; }
.nav nav a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.icon-link { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius); color: var(--muted); font-size: 22px; text-decoration: none; transition: color 0.2s, background 0.2s; }
.icon-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font: 600 16px/1 "Geist", sans-serif; text-decoration: none;
  height: 50px; padding: 0 22px; border-radius: var(--radius);
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s, color 0.25s;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 30px -10px rgba(95, 209, 165, 0.5); }
.btn-primary:hover { background: #74dcb4; }
.btn-ghost { color: var(--ink); background: rgba(10, 13, 16, 0.4); border: 1px solid rgba(232, 238, 233, 0.22); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(232, 238, 233, 0.08); }
.btn-small { height: 38px; padding: 0 16px; font-size: 14px; background: var(--accent); color: var(--accent-ink); }
.btn-huge { height: 64px; padding: 0 34px; font-size: 19px; }
.btn i { font-size: 1.15em; }

h1, h2, h3 { letter-spacing: -0.035em; line-height: 1.02; font-weight: 650; }
h2 { font-size: clamp(36px, 5.2vw, 72px); }
h3 { font-size: 20px; letter-spacing: -0.015em; }
p { color: var(--muted); max-width: 60ch; }

/* ---------- hero ---------- */
.hero { min-height: 100dvh; display: flex; align-items: center; padding-top: 64px; }
.hero-copy { max-width: 920px; }
.hero h1 { font-size: clamp(42px, 6vw, 86px); font-weight: 700; }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--accent); }
.lede { margin-top: 26px; font-size: clamp(18px, 1.6vw, 21px); color: #c3cec8; max-width: 34ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.reveal-lines span { opacity: 0; transform: translateY(40px); }
body.loaded .reveal-lines span { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
body.loaded .reveal-lines span:nth-child(2) { transition-delay: 0.15s; }
.lede, .cta-row { opacity: 0; transform: translateY(16px); }
body.loaded .lede, body.loaded .cta-row { opacity: 1; transform: none; transition: opacity 1s var(--ease) 0.35s, transform 1s var(--ease) 0.35s; }

/* ---------- chain ---------- */
.chain { height: 520vh; }
.chain-pin { position: sticky; top: 0; height: 100dvh; display: flex; align-items: center; }
.chain-panel { width: min(460px, 100%); margin-top: 40px; padding: 26px; border-radius: var(--radius); background: rgba(9, 12, 15, 0.62); border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 80px -40px rgba(0, 0, 0, 0.8); }
.chatbar {
  display: inline-flex; align-items: center; gap: 10px; min-width: 260px;
  padding: 12px 16px; margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line); border-radius: var(--radius);
  font: 500 18px/1 "Geist Mono", monospace; color: var(--ink);
}
.chat-prompt { color: var(--accent); }
.caret { width: 10px; height: 20px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chain h2 { font-size: clamp(28px, 2.9vw, 40px); margin-bottom: 20px; }
.steps { list-style: none; display: grid; gap: 4px; }
.steps li {
  display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 12px;
  padding: 6px 10px; border-radius: var(--radius);
  color: var(--faint); transition: color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.steps li i { font-size: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); transition: background 0.4s, color 0.4s; }
.steps li b { display: block; font-weight: 600; font-size: 16px; color: inherit; }
.steps li span { display: block; font-size: 14px; color: var(--faint); }
.steps li.done { color: #b9c6c0; }
.steps li.done i { color: var(--accent); }
.steps li.active { color: var(--ink); background: rgba(95, 209, 165, 0.09); transform: translateX(6px); }
.steps li.active i { background: var(--accent); color: var(--accent-ink); }
.steps li.active span { color: var(--muted); }

/* ---------- footage ---------- */
.footage { height: 260vh; padding: 0; }
.footage-pin { position: sticky; top: 0; height: 100dvh; display: grid; place-items: center; overflow: hidden; background: var(--bg); }
.footage-frame {
  position: relative; width: min(1180px, 92vw); aspect-ratio: 1656 / 1000;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--line);
  transform-origin: center;
  will-change: transform;
}
.footage-frame video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.play-toggle {
  position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(0, 0, 0, 0.55); color: var(--ink);
  font-size: 18px; cursor: pointer; display: grid; place-items: center;
}
.footage-caption { position: absolute; left: var(--gutter); bottom: 9vh; max-width: 440px; pointer-events: none; }
.footage-caption h2 { font-size: clamp(34px, 4.4vw, 60px); }
.footage-caption p { margin-top: 14px; color: #c3cec8; }
.footage-caption { text-shadow: 0 2px 30px rgba(0, 0, 0, 0.85); }

/* ---------- lists ---------- */
.lists { padding-top: 22vh; padding-bottom: 22vh; background: linear-gradient(180deg, var(--bg) 0%, rgba(10, 13, 16, 0.94) 100%); }
.lists-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.lists-copy p { margin-top: 20px; }
.chip { display: inline-block; margin-top: 28px; padding: 10px 14px; border-radius: var(--radius); background: rgba(95, 209, 165, 0.1); color: var(--accent); font-size: 15px; border: 1px solid rgba(95, 209, 165, 0.25); }
.inventory {
  padding: 18px; border-radius: var(--radius);
  background: #1b2024; border: 1px solid #2b333a;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.04), 0 40px 90px -40px rgba(0, 0, 0, 0.9);
  transform: perspective(1200px) rotateY(-12deg) rotateX(6deg);
  transition: transform 0.8s var(--ease);
}
.inventory:hover { transform: perspective(1200px) rotateY(-4deg) rotateX(2deg); }
.inv-grid, .inv-hotbar { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.inv-hotbar { margin-top: 14px; }
.slot {
  position: relative; aspect-ratio: 1; border-radius: 6px;
  background: #11161a; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}
.slot img { position: absolute; inset: 10%; width: 80%; height: 80%; image-rendering: pixelated; opacity: 0; transform: translateY(-30px) scale(0.6); }
.slot.filled img { opacity: 1; transform: none; transition: opacity 0.35s var(--ease), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.slot .count { position: absolute; right: 5px; bottom: 2px; font: 700 13px/1 "Geist Mono", monospace; color: #fff; text-shadow: 1px 1px 0 #000; opacity: 0; }
.slot.filled .count { opacity: 1; transition: opacity 0.3s 0.25s; }

/* ---------- build ---------- */
.build { height: 420vh; }
.build-pin { position: sticky; top: 0; height: 100dvh; display: flex; align-items: flex-end; padding-bottom: 12vh; }
.build-copy { max-width: 460px; padding: 26px; border-radius: var(--radius); background: rgba(9, 12, 15, 0.62); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.build-copy p { margin-top: 18px; color: #c3cec8; transition: opacity 0.5s var(--ease); }
.build-b { opacity: 0.25; }
.build.dodge .build-b { opacity: 1; }
.build-meter { margin-top: 26px; font: 500 15px/1 "Geist Mono", monospace; color: var(--muted); }
.build-count { color: var(--accent); }

.build-pin { justify-content: space-between; gap: 32px; }
.build-inset { width: min(420px, 34vw); border-radius: var(--radius); overflow: hidden; background: rgba(10, 13, 16, 0.8); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.build.dodge .build-inset, .build.show-inset .build-inset { opacity: 1; transform: none; }
.build-inset img { width: 100%; aspect-ratio: 1656 / 1000; object-fit: cover; background: #000; }
.build-inset figcaption { padding: 10px 14px; font-size: 13px; color: var(--muted); }

/* ---------- panel ---------- */
.panel { height: 320vh; background: var(--bg); }
.panel-pin { position: sticky; top: 0; height: 100dvh; display: grid; grid-template-columns: 4fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: center; max-width: 1400px; margin: 0 auto; }
.panel-copy kbd {
  display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 26px;
  border-radius: var(--radius); font-size: 24px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
}
.panel-copy h2 { font-size: clamp(32px, 4vw, 56px); }
.panel-tabs { display: flex; gap: 6px; margin: 30px 0 18px; padding: 4px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.04); width: max-content; }
.panel-tabs button {
  font: 600 15px/1 "Geist", sans-serif; color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 9px; transition: background 0.3s, color 0.3s;
}
.panel-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.panel-stage { position: relative; aspect-ratio: 1656 / 1000; perspective: 1600px; }
.shot {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius); box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--line);
  opacity: 0; transform: rotateY(-14deg) rotateX(4deg) translateZ(-120px);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
}
.shot.on { opacity: 1; transform: rotateY(-8deg) rotateX(2deg); }

/* ---------- proof ---------- */
.proof { padding-top: 18vh; padding-bottom: 16vh; background: var(--bg); }
.proof > h2, .bento { max-width: 1240px; margin-left: auto; margin-right: auto; }
.proof > h2 { margin-bottom: 48px; }
.bento { display: grid; grid-template-columns: 5fr 4fr 3fr; grid-template-rows: auto auto; gap: 14px; }
.cell { border-radius: var(--radius); padding: 30px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.cell-big { grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; background: radial-gradient(120% 90% at 0% 0%, rgba(95, 209, 165, 0.18), transparent 60%), var(--bg-2); min-height: 360px; }
.big-num { font-size: clamp(72px, 10vw, 148px); font-weight: 700; letter-spacing: -0.06em; line-height: 0.9; color: var(--ink); font-variant-numeric: tabular-nums; }
.cell-big p { margin-top: 14px; }
.cell-list { grid-column: span 2; }
.passes { list-style: none; margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.passes li { display: flex; gap: 10px; color: #c3cec8; font-size: 15px; line-height: 1.4; }
.passes i { color: var(--accent); margin-top: 2px; }
.cell-art { padding: 0; min-height: 220px; }
.cell-art img { width: 100%; height: 100%; object-fit: cover; }
.cell-honest { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 12px, transparent 12px 24px), var(--bg-2); }
.cell-honest p { margin-top: 12px; font-size: 15px; }

/* ---------- credits ---------- */
.credits { padding-top: 10vh; padding-bottom: 14vh; background: var(--bg); }
.credits::after { content: ""; position: absolute; left: 0; right: 0; bottom: -30vh; height: 30vh; background: linear-gradient(180deg, var(--bg), transparent); pointer-events: none; }
.credits > h2, .credit-rows { max-width: 1240px; margin-left: auto; margin-right: auto; }
.credits > h2 { font-size: clamp(30px, 3.6vw, 48px); margin-bottom: 26px; }
.credit {
  display: grid; grid-template-columns: minmax(160px, 260px) 1fr 28px; gap: 24px; align-items: center;
  padding: 26px 0; text-decoration: none; border-top: 1px solid var(--line);
  transition: padding 0.4s var(--ease), color 0.3s;
}
.credit:hover { padding-left: 12px; }
.credit:hover .credit-name { color: var(--accent); }
.credit-name { font-size: clamp(26px, 3vw, 40px); font-weight: 650; letter-spacing: -0.03em; transition: color 0.3s; }
.credit-what { color: var(--muted); }
.credit i { font-size: 22px; color: var(--muted); }

/* ---------- download ---------- */
.download { min-height: 140vh; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; padding-bottom: 0; }
.download-inner { position: relative; display: flex; flex-direction: column; align-items: center; padding: 48px 40px 12vh; }
.download-inner::before { content: ""; position: absolute; inset: -10% -25% 0; z-index: -1; background: radial-gradient(closest-side, rgba(7, 10, 13, 0.82), rgba(7, 10, 13, 0.55) 55%, transparent); pointer-events: none; }
.download h2 { font-size: clamp(56px, 9vw, 132px); font-weight: 700; margin-bottom: 40px; text-shadow: 0 6px 60px rgba(0, 0, 0, 0.6); }
.install { list-style: none; margin-top: 46px; display: grid; gap: 12px; text-align: left; }
.install li { color: #c3cec8; font-size: 16px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.install li span { font-weight: 600; color: var(--ink); min-width: 64px; }
.install a { color: var(--accent); text-decoration: none; }
.install a:hover { text-decoration: underline; }
.install code, .sha code { background: rgba(255, 255, 255, 0.06); padding: 2px 7px; border-radius: 6px; font-size: 14px; color: var(--ink); }
.sha { margin-top: 30px; font-size: 13px; color: var(--faint); max-width: none; word-break: break-all; }
.sha code { font-size: 12px; color: var(--muted); }
.more { display: flex; gap: 22px; margin-top: 22px; max-width: none; }
.more a { color: var(--muted); font-size: 15px; }
.more a:hover { color: var(--ink); }
.foot { width: 100%; padding: 26px 0 30px; border-top: 1px solid var(--line); }
.foot p { margin: 0 auto; text-align: center; font-size: 13px; color: var(--faint); max-width: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .vignette { background: linear-gradient(180deg, transparent 30%, rgba(6, 9, 11, 0.85) 75%), radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(5, 7, 9, 0.5) 100%); }
  .hero { align-items: flex-end; padding-bottom: 9vh; }
  .lists-inner, .panel-pin { grid-template-columns: 1fr; }
  .panel-pin { align-content: center; gap: 28px; }
  .inventory { transform: none; }
  .bento { grid-template-columns: 1fr; }
  .cell-big { grid-row: auto; min-height: 260px; }
  .cell-list { grid-column: auto; }
  .passes { grid-template-columns: 1fr; }
  .credit { grid-template-columns: 1fr 24px; }
  .credit-what { grid-column: 1; }
  .credit i { grid-row: 1; grid-column: 2; }
  .chain-pin { align-items: flex-end; padding-bottom: 6vh; }
  .chain-panel { background: rgba(10, 13, 16, 0.78); backdrop-filter: blur(10px); padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); }
  .chain h2 { font-size: 26px; margin-bottom: 14px; }
  .chatbar { margin-bottom: 14px; font-size: 15px; min-width: 0; }
  .steps li { display: none; }
  .steps li.active, .steps li.active + li { display: grid; }
  .footage-caption { position: static; margin-top: 22px; padding: 0 var(--gutter); }
  .footage-pin { grid-template-rows: auto auto; align-content: center; }
  .build-pin { padding-bottom: 6vh; }
  .build-copy { background: rgba(10, 13, 16, 0.75); padding: 18px; border-radius: var(--radius); backdrop-filter: blur(10px); }
  .build-pin { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 12px; }
  .build-inset { display: none; }
  .install li { display: block; }
  .install li span { display: inline-block; min-width: 0; margin-right: 8px; }
  .download-inner { padding: 32px 4px 10vh; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .btn { height: 46px; padding: 0 18px; font-size: 15px; }
  .btn-huge { height: 56px; font-size: 17px; }
  .nav .btn-small { display: none; }
}

/* Reduced motion: no scroll-linked camera, no reveal transforms. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal-lines span, .lede, .cta-row { opacity: 1; transform: none; }
  .chain, .build, .panel, .footage { height: auto; }
  .chain-pin, .build-pin, .panel-pin, .footage-pin { position: relative; height: auto; min-height: 100dvh; }
  .slot img { opacity: 1; transform: none; }
  .slot .count { opacity: 1; }
  .build-inset { opacity: 1; transform: none; }
  .shot { opacity: 0; transform: none; }
  .shot.on { opacity: 1; transform: none; }
}
