:root {
  --bg: #07060B;
  --bg-2: #0d0a17;
  --violet: #2A1450;
  --lilac: #8B7CFF;
  --moon: #C9B8FF;
  --ink: #F2EEFF;
  --ink-2: #B9B0D8;
  --ink-3: #7D7499;
  --line: rgba(201, 184, 255, .14);
  --copper: #D9985C;
  --copper-2: #F0C08A;

  --f-display: "Unbounded", system-ui, sans-serif;
  --f-body: "Inter Tight", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; user-select: none; }
a { color: inherit; }
::selection { background: var(--lilac); color: var(--bg); }

/* ---------- global details ---------- */
.grain {
  position: fixed; inset: -50%;
  z-index: 90; pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, 3%); }
}

.cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .3s; }
.has-cursor .cursor { opacity: 1; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor__ring {
  position: absolute; width: 34px; height: 34px; left: -17px; top: -17px;
  border: 1px solid rgba(139, 124, 255, .75);
  border-radius: 50%;
  transform: rotateX(68deg) rotateZ(var(--spin, 0deg));
  transition: width .35s var(--ease), height .35s var(--ease), left .35s var(--ease), top .35s var(--ease), border-color .35s;
}
.cursor__ring::after {
  content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--moon); top: -3px; left: 50%; margin-left: -2.5px;
  box-shadow: 0 0 8px var(--lilac);
}
.cursor__dot { position: absolute; width: 4px; height: 4px; left: -2px; top: -2px; border-radius: 50%; background: var(--moon); }
.cursor.is-hover .cursor__ring { width: 56px; height: 56px; left: -28px; top: -28px; border-color: var(--moon); }

.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--lilac); margin: 0 0 14px;
}
.h2 {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(28px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -.01em;
  margin: 0;
}
.lede { color: var(--ink-2); font-size: clamp(16px, 1.4vw, 19px); max-width: 60ch; margin: 18px 0 0; }
.muted { color: var(--ink-3); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(110px, 16vh, 200px) 0; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
  background: rgba(201, 184, 255, .05);
  white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lilac); box-shadow: 0 0 8px var(--lilac); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-body); font-weight: 500; font-size: 15px; text-decoration: none;
  padding: 14px 24px; border-radius: 999px;
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--solid { background: var(--lilac); color: #0b0716; box-shadow: 0 0 0 0 rgba(139, 124, 255, .5); }
.btn--solid:hover { background: var(--moon); box-shadow: 0 0 40px -4px rgba(139, 124, 255, .7); }
.btn--ghost { border: 1px solid rgba(201, 184, 255, .3); color: var(--ink); background: rgba(7, 6, 11, .3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--moon); background: rgba(139, 124, 255, .12); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 1px solid var(--moon); outline-offset: 4px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  transition: background .4s, transform .5s var(--ease);
}
.nav::before { content: ""; position: absolute; inset: 0 0 -50px; z-index: -1; pointer-events: none; background: linear-gradient(rgba(7, 6, 11, .85), rgba(7, 6, 11, .5) 55%, rgba(7, 6, 11, 0)); opacity: 0; transition: opacity .5s; }
.nav.is-solid::before { opacity: 1; }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 600; letter-spacing: .06em; font-size: 15px; }
.nav__brand img { width: 32px; height: 32px; }
.nav__links { display: flex; gap: 30px; }
.nav__links a { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); transition: color .3s; }
.nav__links a:hover { color: var(--moon); }

/* ---------- 1 · hero ---------- */
.hero { position: relative; }
.hero__pin { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #0c0720; }
.scene { position: absolute; inset: 0; }
.seq, .seq__poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.seq__poster { object-fit: cover; object-position: 50% 50%; }
.crow__eye { position: absolute; left: 0; top: 0; width: 40px; transform: translate(-50%, -50%); overflow: visible; pointer-events: none; opacity: 0; transition: opacity .3s; }
.hero__dark { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: var(--bg); opacity: 0; }

.hero__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 6, 11, .55) 0%, rgba(7, 6, 11, 0) 22%),
    linear-gradient(0deg, rgba(7, 6, 11, .92) 0%, rgba(7, 6, 11, .35) 34%, rgba(7, 6, 11, 0) 55%),
    radial-gradient(120% 90% at 70% 35%, rgba(0, 0, 0, 0) 40%, rgba(7, 6, 11, .55) 100%);
}
.hero__fog {
  position: absolute; inset: -10%; pointer-events: none; z-index: 4;
  background:
    radial-gradient(60% 50% at 30% 60%, rgba(120, 96, 190, .9), rgba(60, 40, 110, 0) 70%),
    radial-gradient(70% 60% at 75% 40%, rgba(150, 130, 220, .85), rgba(60, 40, 110, 0) 70%),
    #1a1033;
  filter: blur(30px);
}
.hero__copy {
  position: absolute; z-index: 5;
  left: var(--gutter); bottom: clamp(80px, 13vh, 130px);
  max-width: min(560px, calc(100vw - 2 * var(--gutter)));
}
.hero__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(34px, 5.6vw, 84px); line-height: .98; letter-spacing: -.015em;
  margin: 0; text-wrap: balance;
  text-shadow: 0 2px 40px rgba(7, 6, 11, .6);
}
.hero__sub { color: var(--ink-2); margin: 22px 0 0; max-width: 46ch; font-size: clamp(16px, 1.3vw, 18px); }
.scroll-hint {
  position: absolute; z-index: 5; right: var(--gutter); bottom: 34px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
}
.scroll-hint i { width: 1px; height: 46px; background: linear-gradient(var(--lilac), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: -1px; width: 3px; height: 12px; background: var(--moon); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { from { top: -12px; } to { top: 46px; } }

/* ---------- 3 · inside the machine ---------- */
.machine { position: relative; background: var(--bg); }
.machine__pin { position: relative; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.machine__pin::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(50% 60% at 72% 52%, rgba(42, 20, 80, .55), transparent 70%),
    radial-gradient(30% 30% at 72% 88%, rgba(217, 152, 92, .07), transparent 70%);
}
.machine__fog { position: absolute; inset: 0; z-index: 6; pointer-events: none; background: radial-gradient(70% 70% at 60% 50%, #241640, var(--bg) 80%); }
.machine__grid {
  position: relative; z-index: 2; width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 4vw;
}
.machine__title { margin-bottom: 40px; }
.story { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.story__line { display: grid; grid-template-columns: 34px 1fr; gap: 14px; opacity: .12; transition: opacity .6s var(--ease); }
.story__line.is-on { opacity: 1; }
.story__line.is-past { opacity: .42; }
.story__idx { font-family: var(--f-mono); font-size: 12px; color: var(--copper-2); padding-top: 4px; }
.story__line p { margin: 0; color: var(--ink-2); max-width: 44ch; }
.story__line h3 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 500; font-size: 20px; letter-spacing: .02em; }
.story__line h3 em { font-style: normal; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lilac); margin-left: 10px; }
.machine__art { height: min(88vh, 920px); display: flex; justify-content: center; }
.chandelier { height: 100%; width: auto; max-width: 100%; overflow: visible; }
.chandelier .cable { fill: none; stroke: url(#copper); stroke-width: 1.6; stroke-linecap: round; }
.chandelier .cable--glow { stroke: var(--copper); stroke-width: 5; opacity: .25; filter: url(#soft); }
.chandelier .rod { stroke: #4a3d77; stroke-width: 3; }
.chandelier .rim { fill: none; stroke: var(--moon); stroke-width: 1.2; opacity: .55; }
.machine__progress { position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: 30px; height: 1px; background: var(--line); }
.machine__progress span { position: absolute; inset: 0; background: var(--copper); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- 4 · superposition ---------- */
.token { background: var(--bg); }
.specs { margin: 48px 0 0; border-top: 1px solid var(--line); }
.specs__row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-3); font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.specs dd { margin: 0; font-family: var(--f-display); font-size: clamp(17px, 2vw, 26px); font-weight: 400; text-align: right; }

.sp { position: relative; display: inline-block; white-space: nowrap; }
.sp__ghost { position: absolute; right: 0; top: 0; pointer-events: none; color: var(--lilac); white-space: nowrap; }
.sp.is-super .sp__real { filter: blur(3px); opacity: .55; }
.sp.is-collapsed::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none;
  box-shadow: 0 0 0 0 rgba(201, 184, 255, .8);
  animation: collapse-pulse .9s var(--ease) forwards;
}
@keyframes collapse-pulse { to { box-shadow: 0 0 0 46px rgba(201, 184, 255, 0); } }

.vault { background: var(--bg); padding-top: 0; }
.vault__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.reserves { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.reserve {
  position: relative; overflow: hidden;
  padding: 28px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(42, 20, 80, .55), rgba(13, 10, 23, .6));
}
.reserve--alt { background: linear-gradient(160deg, rgba(201, 184, 255, .12), rgba(13, 10, 23, .6)); }
.reserve h3 { margin: 0; font-weight: 500; font-size: 16px; color: var(--ink-2); }
.reserve__value { margin: 22px 0 10px; font-family: var(--f-display); font-size: clamp(36px, 5vw, 64px); line-height: 1; }
.reserve__state { margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--lilac); }

.flywheel { margin-top: 16px; padding: 28px; border-radius: 18px; border: 1px solid var(--line); background: rgba(13, 10, 23, .6); }
.flywheel h3 { margin: 0 0 22px; font-weight: 500; font-size: 16px; color: var(--ink-2); }
.flywheel__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 56px 1fr 56px 1fr; align-items: center; }
.flywheel__steps > li:not(.flywheel__arrow) {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 10px; border-radius: 12px; background: rgba(42, 20, 80, .45);
  font-size: 14px; color: var(--ink-2);
}
.flywheel svg { width: 24px; height: 24px; fill: none; stroke: var(--lilac); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.flywheel__arrow { position: relative; height: 1px; margin: 0 10px; background: var(--line); overflow: hidden; }
.flywheel__arrow i { position: absolute; top: -1px; left: -30%; width: 30%; height: 3px; background: linear-gradient(90deg, transparent, var(--moon)); animation: flow 2.4s linear infinite; }
.flywheel__arrow:nth-child(4) i { animation-delay: 1.2s; }
@keyframes flow { to { left: 100%; } }

/* ---------- 5 · rewards (horizontal) ---------- */
.rewards { position: relative; background: var(--bg); }
.rewards__pin { height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: clamp(40px, 7vh, 80px); }
.rewards__head { flex: none; }
.track__label { margin: 0 auto -20px; }
.track { position: relative; flex: none; }
.track__line { position: absolute; left: 0; right: 0; top: 34px; height: 1px; background: var(--line); }
.track__line span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--lilac), var(--moon)); transform-origin: 0 50%; transform: scaleX(0); }
.track__items {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: flex; gap: clamp(28px, 6vw, 110px); width: max-content;
  padding-left: max(var(--gutter), calc((100vw - 1180px) / 2 + var(--gutter)));
  padding-right: 20vw;
}
.step { width: min(78vw, 360px); flex: none; }
.step--panel { width: min(88vw, 560px); }
.qubit-node {
  position: relative; width: 68px; height: 68px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg);
  display: grid; place-items: center; margin-bottom: 26px;
  transition: border-color .5s, box-shadow .6s, background .5s;
}
.qubit-node::before {
  content: ""; position: absolute; inset: 22px; border-radius: 50%;
  background: #2b2440; transition: background .5s, box-shadow .6s, inset .5s var(--ease);
}
.ket { position: absolute; bottom: -24px; font-family: var(--f-body); font-size: 12px; color: var(--ink-3); transition: color .4s; }
.step.is-lit .qubit-node { border-color: rgba(201, 184, 255, .6); box-shadow: 0 0 40px -6px rgba(139, 124, 255, .8); background: #120c22; }
.step.is-lit .qubit-node::before { inset: 16px; background: var(--moon); box-shadow: 0 0 24px 4px rgba(139, 124, 255, .9); }
.step.is-lit .ket { color: var(--moon); }
.step__n { margin: 0 0 8px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); }
.step__text { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(19px, 1.9vw, 26px); line-height: 1.25; opacity: .35; transition: opacity .5s; }
.step.is-lit .step__text { opacity: 1; }
.streams { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; opacity: .35; transition: opacity .5s; }
.step.is-lit .streams { opacity: 1; }
.stream { padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(42, 20, 80, .6), rgba(13, 10, 23, .6)); }
.stream--alt { background: linear-gradient(160deg, rgba(201, 184, 255, .12), rgba(13, 10, 23, .6)); }
.stream h3 { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: 22px; }
.stream p { margin: 6px 0 14px; color: var(--ink-2); font-size: 14px; }

/* ---------- 6 · finale ---------- */
.finale { background: radial-gradient(60% 50% at 50% 30%, rgba(42, 20, 80, .55), transparent 70%), var(--bg); text-align: center; }
.finale__wrap { display: flex; flex-direction: column; align-items: center; }
.finale .lede { margin-left: auto; margin-right: auto; }
.watcher { position: relative; width: min(300px, 62vw); margin-bottom: 30px; }
.watcher img { width: 100%; height: auto; filter: drop-shadow(0 0 60px rgba(139, 124, 255, .25)); }
.watcher__eyes { position: absolute; inset: 0; width: 100%; height: 100%; }
.cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.contract {
  margin-top: 56px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  padding: 10px 10px 10px 20px; border-radius: 999px; border: 1px solid var(--line); background: rgba(13, 10, 23, .7);
  max-width: 100%;
}
.contract__label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.contract__addr { font-family: var(--f-mono); font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.contract__copy {
  position: relative; overflow: hidden;
  font: 500 13px var(--f-body); color: var(--ink);
  padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(201, 184, 255, .3); background: rgba(139, 124, 255, .1);
  transition: border-color .3s, background .3s;
}
.contract__copy:hover { border-color: var(--moon); }
.contract__copy.is-collapsing { background: var(--lilac); color: #0b0716; }
.contract__copy-label { display: inline-block; min-width: 7ch; }

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 26px var(--gutter); border-top: 1px solid var(--line); background: var(--bg);
}
.footer__brand { font-family: var(--f-display); font-weight: 600; letter-spacing: .06em; }
.footer__tag { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; color: var(--ink-3); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .seq__poster { object-position: 64% 50%; }
  .hero__copy { bottom: 96px; }
  .scroll-hint span { display: none; }
  .machine__pin { align-items: stretch; }
  .machine__grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 0; padding-top: 90px; padding-bottom: 50px; }
  .machine__art { position: absolute; inset: 0; height: auto; opacity: .2; pointer-events: none; z-index: -1; justify-content: flex-end; }
  .machine__title { margin-bottom: 26px; }
  .story { gap: 18px; }
  .story__line p { font-size: 15px; }
  .reserves { grid-template-columns: 1fr; }
  .flywheel__steps { grid-template-columns: 1fr 22px 1fr 22px 1fr; }
  .flywheel__arrow { margin: 0 4px; }
  .streams { grid-template-columns: 1fr; }
  .specs__row { padding: 18px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .chip::before, .scroll-hint i::after, .flywheel__arrow i { animation: none; }
  .hero__fog { display: none; }
  .story__line { opacity: 1; }
}
