/* The welcome story. One pinned screen; the scenes are stacked on it and
   cross-fade as the visitor scrolls, so there is never empty sky between
   them. welcome.js writes, per scene, --x (0..1, how far it has left) and on
   every animated piece --t (eased 0..1, how far it has arrived). */

.sp-land { overscroll-behavior-y: none; }
.story { position: relative; z-index: 1; }
.viewport { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

.scene { --x: 0; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 96px clamp(16px, 6vw, 96px) 56px; visibility: hidden;
  opacity: calc(1 - var(--x)); transform: translate3d(0, calc(var(--x) * -72px), 0) scale(calc(1 - var(--x) * .02));
  will-change: opacity, transform; }
.scene.on { visibility: visible; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(28px, 5vw, 88px); align-items: center;
  max-width: 1220px; width: 100%; margin: 0 auto; }

/* pieces driven by --t */
.fx { --t: 0; opacity: var(--t); transform: translate3d(0, calc((1 - var(--t)) * 30px), 0); }
.fx-pop { --t: 0; opacity: var(--t); transform: scale(calc(.9 + var(--t) * .1)); transform-origin: center; transform-box: fill-box; }
.fx-slide { --t: 0; opacity: var(--t); transform: translate3d(calc((1 - var(--t)) * 36px), 0, 0); }
.fx-draw { --t: 0; stroke-dasharray: var(--len, 600); stroke-dashoffset: calc(var(--len, 600) * (1 - var(--t))); }
.fx-grow { --t: 0; transform: scaleY(var(--t)); transform-origin: 50% 100%; transform-box: fill-box; }
.fx-fade { --t: 0; opacity: var(--t); }

/* side dots */
.sp-dots { position: fixed; right: clamp(14px, 2.4vw, 30px); top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; gap: 14px; }
.sp-dots button { position: relative; width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .25);
  cursor: pointer; transition: background .8s var(--sp-soft), transform .9s var(--sp-ease); }
.sp-dots button::after { content: ''; position: absolute; inset: -8px; }
.sp-dots button:hover { background: rgba(255, 255, 255, .6); }
.sp-dots button.on { background: #fff; transform: scale(1.35); }

/* the wordmark comes into the header once the big title has left */
.sp-land .sp-logo { opacity: var(--logo, 0); pointer-events: none; }
.sp-land .sp-logo.shown { pointer-events: auto; }

/* copy column */
.copy { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.copy h2 { margin: 0; font: 700 clamp(34px, 4.9vw, 60px)/1.04 var(--sp-display); letter-spacing: -.032em; text-wrap: balance; }
.copy h2 em { font-style: normal; color: var(--sp-mute); }
.copy p { margin: 0; color: var(--sp-dim); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; max-width: 46ch; text-wrap: pretty; }
.points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.points span { font: 500 12px/1 var(--sp-mono); color: var(--sp-dim); border: 1px solid var(--sp-line-2); border-radius: 999px; padding: 8px 12px; }

/* visual column */
.visual { position: relative; width: 100%; }
.panel { position: relative; border-radius: 22px; border: 1px solid var(--sp-line); background: linear-gradient(180deg, rgba(15, 15, 20, .94), rgba(8, 8, 11, .94));
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--sp-line);
  font: 500 11px/1 var(--sp-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--sp-mute); }
.live { display: inline-flex; align-items: center; gap: 8px; }
.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sp-green); box-shadow: 0 0 10px var(--sp-green);
  animation: sp-blink 2.4s ease-in-out infinite; }
@keyframes sp-blink { 50% { opacity: .35; } }
svg.art { display: block; width: 100%; height: auto; overflow: visible; }
.art text { font-family: var(--sp-display); fill: var(--sp-text); }
.art .mono { font-family: var(--sp-mono); }

/* ── hero ── */
.hero { flex-direction: column; text-align: center; }
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.hero-title { margin: 0; font: 800 clamp(28px, 6.2vw, 92px)/1 var(--sp-brand); letter-spacing: .34em; margin-right: -.34em; white-space: nowrap; }
.hero-title span { display: inline-block; animation: sp-letter 2.2s var(--sp-ease) both; animation-delay: calc(.3s + var(--i) * 90ms); }
@keyframes sp-letter { from { opacity: 0; transform: translateY(.3em); filter: blur(16px); } to { opacity: 1; transform: none; filter: none; } }
.intro { animation: sp-rise 1.8s var(--sp-ease) both; animation-delay: var(--d, 0s); }
.hero-lead { margin: 0; max-width: 32ch; color: var(--sp-dim); font-size: clamp(17px, 1.9vw, 23px); line-height: 1.45; text-wrap: balance; }
.hero-lead b { color: var(--sp-text); font-weight: 600; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.scroll-cue { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center;
  gap: 10px; font: 500 10px/1 var(--sp-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--sp-mute); }
.scroll-cue i { width: 1px; height: 42px; background: rgba(255, 255, 255, .14); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; left: 0; right: 0; height: 14px; background: linear-gradient(transparent, #fff);
  animation: sp-drip 2.6s var(--sp-soft) infinite; }
@keyframes sp-drip { from { top: -14px; } to { top: 42px; } }

/* ── 1 · wallet flow ── */
.wire { fill: none; stroke-width: 1.25; stroke-linecap: round; }
.wire.in { stroke-dasharray: 2 5; }
.chip rect.box { fill: #0E0E13; stroke: rgba(255, 255, 255, .14); }
.chip rect.ico { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .1); }
.chip .name { font-size: 13px; font-weight: 600; }
.chip .kind { font: 500 9px/1 var(--sp-mono); letter-spacing: .14em; fill: var(--sp-mute); }
.chip .letter { font-size: 12px; font-weight: 700; }
.whale rect.box { fill: #111117; stroke: rgba(255, 255, 255, .42); }
.tag rect { fill: #0B0B0F; stroke: rgba(255, 255, 255, .16); }
.tag text { font: 600 11px/1 var(--sp-mono); }
.spark { fill: #fff; }
.tx-list { display: flex; flex-direction: column; }
.tx { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 18px;
  border-top: 1px solid var(--sp-line); font-size: 13px; }
.tx .dir { font: 600 13px/1 var(--sp-mono); color: var(--sp-mute); }
.tx .who { color: var(--sp-text); font-weight: 600; }
.tx .tag2 { font: 500 10px/1 var(--sp-mono); letter-spacing: .1em; color: var(--sp-mute); border: 1px solid var(--sp-line-2); border-radius: 6px; padding: 4px 6px; }
.tx .usd { font: 600 13px/1 var(--sp-mono); font-variant-numeric: tabular-nums; }

/* ── 2 · unlocks ── */
.bar { fill: rgba(255, 255, 255, .78); }
.bar.past { fill: rgba(255, 255, 255, .16); }
.bar.cliff { fill: var(--sp-red); }
.axis { stroke: rgba(255, 255, 255, .14); }
.today { stroke: rgba(255, 255, 255, .5); stroke-dasharray: 3 5; }
.pressure { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; padding: 16px 18px; border-top: 1px solid var(--sp-line); font-size: 13px; }
.pressure .lbl { color: var(--sp-dim); }
.pressure .val { font: 600 13px/1.4 var(--sp-mono); text-align: right; font-variant-numeric: tabular-nums; }
.level { display: inline-flex; align-items: center; gap: 8px; font: 700 11px/1 var(--sp-mono); letter-spacing: .14em; color: var(--sp-red);
  border: 1px solid rgba(255, 90, 71, .4); background: rgba(255, 90, 71, .08); border-radius: 999px; padding: 6px 10px; }
.level::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sp-red); box-shadow: 0 0 10px var(--sp-red); }
.ok { color: var(--sp-green); }

/* ── 3 · scenarios ── */
.sentence { font: 600 clamp(19px, 2.2vw, 28px)/1.95 var(--sp-display); letter-spacing: -.012em; color: var(--sp-dim); padding: 24px 24px 8px; }
.sentence .w { color: var(--sp-mute); }
.pill { display: inline-block; color: var(--sp-text); border: 1px solid rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .055);
  border-radius: 999px; padding: 0 .55em; line-height: 1.5; white-space: nowrap; }
.tg { margin: 8px 22px 24px auto; max-width: 360px; border-radius: 18px 18px 6px 18px; background: #1A1A20;
  border: 1px solid var(--sp-line-2); padding: 12px 14px 8px; font-size: 14px; line-height: 1.5; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.tg .from { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.tg .t { color: var(--sp-dim); }
.tg .t b { color: var(--sp-text); }
.tg .neg { color: var(--sp-red); font-weight: 600; }
.tg .meta { text-align: right; font: 500 11px/1 var(--sp-mono); color: var(--sp-mute); margin-top: 6px; }

/* ── 4 · numbers ── */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--sp-line); border-radius: 22px; overflow: hidden;
  border: 1px solid var(--sp-line); }
.stat { background: rgba(9, 9, 13, .86); padding: clamp(18px, 3vw, 32px); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stat .n { font: 600 clamp(32px, 4.2vw, 54px)/1 var(--sp-mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .c { color: var(--sp-dim); font-size: 13px; line-height: 1.45; }

/* ── final ── */
.final { flex-direction: column; gap: 24px; text-align: center; }
.final h2 { margin: 0; font: 700 clamp(48px, 10vw, 136px)/.95 var(--sp-display); letter-spacing: -.045em; }
.final p { margin: 0; color: var(--sp-dim); max-width: 44ch; font-size: clamp(15px, 1.5vw, 19px); text-wrap: balance; }
.final .sp-btn { height: 52px; padding: 0 28px; font-size: 15px; }
.final .legal { font-size: 12px; color: var(--sp-mute); margin-top: 18px; }
.final .legal a { color: var(--sp-mute); text-decoration: none; }
.final .legal a:hover { color: var(--sp-text); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 20px; }
  .scene { padding: 72px 16px 20px; }
  .copy { gap: 10px; }
  .copy h2 { font-size: clamp(28px, 8vw, 40px); }
  .copy p { font-size: 14.5px; }
  .points { display: none; }
  .visual { max-width: 560px; margin: 0 auto; }
  .tx:nth-child(n+3) { display: none; }
  .sentence { padding: 16px 16px 4px; }
  .tg { margin: 6px 14px 16px auto; }
  .sp-dots { right: 8px; gap: 12px; }
  .sp-dots button { width: 6px; height: 6px; }
}
@media (max-width: 900px) and (max-height: 760px) { .copy p { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .fx, .fx-pop, .fx-slide, .fx-fade { --t: 1 !important; }
  .fx-draw { stroke-dashoffset: 0 !important; }
  .fx-grow { transform: none !important; }
  .scene { transform: none !important; }
}

/* ── cosmos-era touches ── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp-status { position: absolute; left: clamp(16px, 4vw, 40px); top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center;
  gap: 10px; font: 500 11px/1 var(--sp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sp-dim); }
.sp-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--sp-green); box-shadow: 0 0 0 0 rgba(61, 220, 132, .5);
  animation: sp-beat 2.4s ease-out infinite; }
@keyframes sp-beat { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } }

/* the word that changes: price → crowd → news → market */
.rot { display: inline-grid; justify-items: start; vertical-align: bottom; transition: width .9s var(--sp-ease); }
.rot > span { grid-area: 1 / 1; white-space: nowrap; opacity: 0; transform: translateY(.55em); filter: blur(8px);
  transition: opacity .8s var(--sp-soft), transform 1s var(--sp-ease), filter .8s var(--sp-soft); }
.rot > span.on { opacity: 1; transform: none; filter: none; }
.rot > span.off { opacity: 0; transform: translateY(-.55em); filter: blur(8px); }

/* the backtest, in two bars */
.insight { margin-top: 6px; border: 1px solid var(--sp-line); border-radius: 16px; padding: 14px 16px; background: rgba(10, 10, 14, .6);
  display: flex; flex-direction: column; gap: 10px; max-width: 440px; }
.insight-k { font: 500 10px/1 var(--sp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sp-mute); }
.insight-row { display: grid; grid-template-columns: 172px 1fr 38px; white-space: nowrap; gap: 12px; align-items: center; font-size: 13px; color: var(--sp-dim); }
.insight-row b { font: 600 13px/1 var(--sp-mono); color: var(--sp-text); text-align: right; }
.ib { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.ib i { display: block; height: 100%; border-radius: 6px; background: rgba(255, 255, 255, .7);
  width: calc(var(--w) / .25 * 100% * var(--t, 1)); }
.ib.hot i { background: var(--sp-red); box-shadow: 0 0 12px rgba(255, 90, 71, .6); }
.insight-s { font-size: 12.5px; color: var(--sp-mute); line-height: 1.45; }

/* a soft light under the pointer, and a slight lean (fx.js) */
.visual { perspective: 1400px; }
.panel, .stats, .module { transition: rotate 1.2s var(--sp-ease); }
.panel::after, .stats::after, .module::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: var(--glow, 0); transition: opacity .8s var(--sp-soft);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .07), transparent 60%); }
.stats { position: relative; }

@media (max-width: 900px) {
  .sp-status { display: none; }
  .insight-row { grid-template-columns: 1fr 70px 34px; }
}
@media (prefers-reduced-motion: reduce) {
}

/* a soft dark pool behind the title, so the threads never fight the words */
.hero-copy { position: relative; }
.hero-copy::before { content: ''; position: absolute; inset: -18% -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(2, 2, 3, .82), rgba(2, 2, 3, .5) 55%, rgba(2, 2, 3, 0)); }

/* ── Wallet Galaxy ── */
.galaxy .ring { fill: none; stroke: rgba(255, 255, 255, .13); stroke-width: 1; }
.galaxy .ring-label { font: 500 9px/1 var(--sp-mono); letter-spacing: .18em; fill: var(--sp-mute); }
.galaxy .orbit { transform-origin: 280px 214px; animation: sp-spin 90s linear infinite; }
.galaxy .plabel { transform-box: fill-box; transform-origin: center; animation: sp-spin 90s linear infinite reverse; }
.galaxy .plabel text { font: 600 11px/1 var(--sp-display); fill: var(--sp-text); }
.planet.d circle { fill: rgba(255, 255, 255, .85); }
.planet.c circle { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 1.2; }
.planet.x circle { fill: #15151B; stroke: rgba(255, 255, 255, .55); stroke-width: 1.2; }
@keyframes sp-spin { to { transform: rotate(360deg); } }

/* ── Tokens: holders and transfers ── */
.holders { display: flex; flex-direction: column; padding: 8px 0; }
.holder { display: grid; grid-template-columns: 22px minmax(0, 1.3fr) minmax(0, 1fr) 52px; gap: 12px; align-items: center; padding: 10px 18px; font-size: 13px; }
.holder .rank { font: 500 11px/1 var(--sp-mono); color: var(--sp-mute); }
.holder .who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holder .who i { font: 500 9px/1 var(--sp-mono); font-style: normal; letter-spacing: .12em; color: var(--sp-mute); margin-left: 8px;
  border: 1px solid var(--sp-line-2); border-radius: 5px; padding: 3px 5px; vertical-align: 1px; }
.hbar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 6px; background: rgba(255, 255, 255, .75); width: calc(var(--w) * 100% * var(--t, 1)); }
.holder .pct { font: 600 12.5px/1 var(--sp-mono); text-align: right; font-variant-numeric: tabular-nums; }
.moves { border-top: 1px solid var(--sp-line); padding: 6px 0 10px; }
.moves-k { font: 500 10px/1 var(--sp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sp-mute); padding: 10px 18px 6px; }
.move { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 30px; gap: 12px; align-items: center; padding: 8px 18px; font-size: 13px; }
.move .chain { font: 600 9.5px/1 var(--sp-mono); letter-spacing: .1em; text-align: center; padding: 4px 0; border-radius: 5px;
  border: 1px solid var(--sp-line-2); color: var(--sp-dim); }
.move .path { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--sp-dim); }
.move .path b { color: var(--sp-mute); font-weight: 500; margin: 0 4px; }
.move .usd { font: 600 12.5px/1 var(--sp-mono); }
.move .ago { font: 500 11px/1 var(--sp-mono); color: var(--sp-mute); text-align: right; }

/* ── Scenarios: the blocks a scenario is built from ── */
.blocks { display: flex; flex-wrap: wrap; gap: 6px; max-width: 480px; }
.blocks span { font: 500 12px/1 var(--sp-mono); color: var(--sp-dim); border: 1px solid var(--sp-line-2); border-radius: 999px; padding: 8px 12px;
  background: rgba(255, 255, 255, .02); }

/* ── The terminal: other modules and the numbers ── */
.modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.module { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 20px; border: 1px solid var(--sp-line);
  background: linear-gradient(180deg, rgba(15, 15, 20, .94), rgba(8, 8, 11, .94)); min-height: 168px; overflow: hidden; }
.module svg { width: 38px; height: 38px; padding: 8px; border-radius: 11px; border: 1px solid var(--sp-line-2); fill: none; stroke: var(--sp-text);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.module b { font-size: 16px; font-weight: 600; }
.module span { color: var(--sp-dim); font-size: 13.5px; line-height: 1.5; }
.figures { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 4px; }
.figures div { display: flex; flex-direction: column; gap: 4px; }
.figures b { font: 600 clamp(26px, 3vw, 38px)/1 var(--sp-mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.figures span { font-size: 12.5px; color: var(--sp-mute); }

@media (max-width: 900px) {
  .moves { display: none; }
  .holder { padding: 8px 14px; }
  .modules { gap: 8px; }
  .module { min-height: 0; padding: 14px; gap: 4px; }
  .module svg { display: none; }
  .module span { font-size: 12px; }
  .blocks { display: none; }
  .figures { gap: 18px; }
}
