:root {
  --bg: #07070a;
  --text: #f2f2f3;
  --muted: #8a8a93;
  --faint: #4a4a52;
  --line: rgba(255, 255, 255, 0.08);
  --ai: #a78bfa;
  --chain: #2dd4bf;
  --eng: #fbbf24;
  --tint: var(--ai);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--text); color: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad) 30px;
  background: linear-gradient(var(--bg) 45%, rgba(7, 7, 10, 0));
}
.brand { font-weight: 600; letter-spacing: -0.02em; font-size: 15px; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 var(--pad);
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__stage { grid-column: 2; grid-row: 1; justify-self: stretch; align-self: center; aspect-ratio: 1; max-height: 78vh; pointer-events: none; }
.hero__text { grid-column: 1; grid-row: 1; position: relative; z-index: 1; pointer-events: none; }
.hero__text button { pointer-events: auto; }

.hero__title {
  margin: 0;
  font-size: clamp(48px, 7.4vw, 120px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
}
.hero__sub {
  margin: 28px 0 0;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 300;
  color: var(--muted);
  letter-spacing: -0.01em;
  min-height: 1.6em;
}
.rotator {
  display: inline-block;
  color: var(--tint);
  font-weight: 400;
  transition: color 0.6s var(--ease), opacity 0.35s, transform 0.35s var(--ease), filter 0.35s;
}
.rotator.is-out { opacity: 0; transform: translateY(8px); filter: blur(4px); }

.switch { display: flex; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.switch button {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.switch button:hover { color: var(--text); }
.switch button[aria-selected="true"] { color: var(--text); border-color: rgba(255, 255, 255, 0.18); }
.switch button i {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--tint);
  transform: scaleX(0);
  transform-origin: left;
}
.switch button[aria-selected="true"] i { animation: progress var(--dur, 5s) linear forwards; }
.switch.is-paused button i { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 22px; height: 36px;
  margin-left: -11px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}
.scroll-hint span {
  position: absolute;
  left: 50%; top: 7px;
  width: 2px; height: 7px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--text);
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- FIELDS ---------- */
.fields { padding: clamp(100px, 14vw, 200px) var(--pad) clamp(80px, 10vw, 140px); max-width: 1400px; margin: 0 auto; }
.fields__title {
  margin: 0 0 clamp(56px, 8vw, 110px);
  font-size: clamp(34px, 4.6vw, 68px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 14em;
}
.dim { color: var(--faint); }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "num name text" "num name chips";
  column-gap: 32px;
  row-gap: 18px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
.row::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--tint), transparent 80%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease);
}
.row:hover::before { transform: scaleX(1); }
.row__num { grid-area: num; font-family: var(--mono); font-size: 13px; color: var(--faint); padding-top: 10px; transition: color 0.4s; }
.row:hover .row__num { color: var(--tint); }
.row__name {
  grid-area: name;
  margin: 0;
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  transition: transform 0.6s var(--ease);
}
.row:hover .row__name { transform: translateX(8px); }
.row__text { grid-area: text; margin: 0; color: var(--muted); font-size: 17px; font-weight: 300; max-width: 32em; padding-top: 8px; }
.chips { grid-area: chips; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #c6c6cc;
  transition: border-color 0.4s, color 0.4s;
}
.row:hover .chips li { border-color: color-mix(in srgb, var(--tint) 45%, transparent); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: clamp(80px, 10vw, 140px) 0 0;
}
.facts div { border-top: 1px solid var(--line); padding-top: 22px; }
.facts dt { font-size: clamp(40px, 5vw, 72px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.facts dd { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- MARQUEE ---------- */
.stack { padding: 20px 0 clamp(80px, 10vw, 140px); }
.marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  flex: none;
  display: flex;
  gap: 56px;
  margin: 0;
  padding: 0 28px;
  list-style: none;
  animation: marquee 45s linear infinite;
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--faint);
  white-space: nowrap;
}
.marquee__track li { transition: color 0.3s; }
.marquee__track li:hover { color: var(--text); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- FOOTER ---------- */
.footer { padding: 0 var(--pad) 28px; border-top: 1px solid var(--line); overflow: hidden; }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 36px; padding: 36px 0 0; font-size: 15px; }
.footer__links a { color: var(--muted); transition: color 0.2s; }
.footer__links a:hover { color: var(--text); }
.wordmark {
  margin: clamp(40px, 6vw, 80px) 0 0;
  font-size: 17.4vw;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 0.04em;
  letter-spacing: -0.065em;
  white-space: nowrap;
  text-align: center;
  background: linear-gradient(180deg, #2a2a31 0%, #0c0c10 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  margin-inline: -0.04em;
}
.footer__copy { margin: 24px 0 0; font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ---------- REVEAL ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    align-items: end;
    padding-top: 72px;
    padding-bottom: 88px;
  }
  .hero__stage { grid-column: 1; grid-row: 1; align-self: center; justify-self: center; width: min(100%, 46vh); max-height: none; }
  .hero__text { grid-column: 1; grid-row: 2; }
    .switch { margin-top: 28px; }
  .row { grid-template-columns: 1fr; grid-template-areas: "num" "name" "text" "chips"; row-gap: 14px; padding: 36px 0; }
  .row__num { padding-top: 0; }
  .row__text { padding-top: 0; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts div { padding: 22px 0 26px; }
}

@media (max-height: 640px) and (max-width: 860px) {
  .hero { min-height: 680px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track, .scroll-hint span { animation: none; }
  .switch button i { animation: none !important; }
}
