/* AmiFeedX: "the market, flowing". Dark, cinematic, scroll-driven.
   Market colours carry meaning: --up/--down are price moves, the aurora is depth. */
:root {
  --ink: #04060b;
  --deep: #0a0f1c;
  --panel: #0e1526;
  --line: rgba(140, 170, 220, .14);
  --text: #eaf0f7;
  --mute: #8a97ad;
  --up: #3ddc97;
  --down: #ff6b6b;
  --amber: #ffc857;
  --a1: #4c6fff;
  --a2: #9b5cff;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --gut: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font: 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--up); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--up); color: #04120b; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.grad { background: linear-gradient(100deg, var(--up), #6fe3ff 55%, var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mute { color: var(--mute); }
.kicker { font: 500 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--up); margin: 0 0 22px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gut); }
.lead { color: #b9c4d6; font-size: clamp(17px, 1.4vw, 20px); max-width: 56ch; }
.c { text-align: center; margin-left: auto; margin-right: auto; justify-content: center; }

/* buttons */
.btn { --bg: var(--up); display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; color: #03130c;
  background: var(--bg); padding: 12px 20px; border-radius: 12px; min-height: 44px; transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 8px 30px rgba(61, 220, 151, .25); cursor: pointer; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(61, 220, 151, .38); }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.btn.ghost:hover { background: rgba(255, 255, 255, .09); }
.btn.sm { padding: 8px 14px; min-height: 38px; font-size: 14px; border-radius: 10px; }
.btn.lg { padding: 15px 26px; font-size: 17px; border-radius: 14px; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 28px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gut) 14px; transition: background .3s, backdrop-filter .3s; }
.nav.solid { background: rgba(4, 6, 11, .72); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px var(--display); }
.brand img { border-radius: 7px; background: #333a46; padding: 3px; }
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a { text-decoration: none; color: var(--mute); font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }

/* hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; }
#stream { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 60% at 20% 45%, rgba(4,6,11,.88), rgba(4,6,11,.35) 60%, transparent), linear-gradient(transparent 70%, var(--ink)); }
.hero-inner { padding: 120px var(--gut) 140px; max-width: 1240px; width: 100%; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--mono); letter-spacing: .08em; color: #b9c4d6;
  padding: 7px 14px; border-radius: 30px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); margin: 0 0 28px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.hero-h { font-size: clamp(52px, 9vw, 150px); line-height: .9; letter-spacing: -.035em; font-weight: 800; }
.hero-h .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-h .w { display: inline-block; }
.hero-sub { font-size: clamp(18px, 1.6vw, 22px); color: #c3cddd; max-width: 46ch; margin: 30px 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; border-top: 1px solid var(--line); background: rgba(4,6,11,.6);
  backdrop-filter: blur(8px); overflow: hidden; display: flex; align-items: center; }
.ticker-track { display: flex; gap: 38px; white-space: nowrap; font: 500 14px var(--mono); padding-left: 38px; will-change: transform; }
.ticker-track b { color: var(--text); font-weight: 500; margin-right: 8px; }
.ticker-track .u { color: var(--up); } .ticker-track .d { color: var(--down); }
.ticker-note { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 16px 0 40px; font: 500 11px var(--mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--mute); background: linear-gradient(90deg, transparent, var(--ink) 35%); }
.scroll-cue { position: absolute; bottom: 74px; left: 50%; width: 24px; height: 38px; margin-left: -12px; border-radius: 14px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text); animation: cue 1.8s infinite; }
@keyframes cue { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* pillars: the two tools side by side, equal weight */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 1340px; margin: 0 auto; padding: 40px var(--gut) clamp(70px, 9vw, 120px); }
.pillar { position: relative; display: flex; flex-direction: column; border-radius: 26px; padding: clamp(24px, 3vw, 40px);
  background: linear-gradient(180deg, var(--panel), var(--deep)); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.pillar::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none; }
.pl-feed::before { background: var(--up); }
.pl-bt::before { background: var(--a2); }
.pl-bt .kicker { color: #c4a6ff; }
.pillar h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.02; letter-spacing: -.025em; font-weight: 800; }
.arr { color: var(--mute); font-weight: 500; }
.pl-tag { display: inline-block; align-self: flex-start; margin: 14px 0 0; font: 500 13px var(--mono); padding: 6px 12px; border-radius: 8px;
  color: #d9c8ff; background: rgba(155,92,255,.12); box-shadow: inset 0 0 0 1px rgba(155,92,255,.45); }
.hook { margin-top: 22px; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.01em; }
.pl-sub { color: #b9c4d6; margin: 10px 0 0; max-width: 44ch; }
.pl-vis { position: relative; margin: 26px 0 22px; border-radius: 16px; background: rgba(4,6,11,.55); box-shadow: inset 0 0 0 1px var(--line); padding: 14px; flex: 1; min-height: 230px; display: flex; flex-direction: column; justify-content: center; }
.mini-chart, .mini-bt { width: 100%; height: auto; display: block; overflow: visible; }
.mini-chart .wk { stroke: #7f8da3; stroke-width: 1.4; }
.mini-chart .cu { fill: var(--up); } .mini-chart .cd { fill: var(--down); }
.mini-xl { position: absolute; right: 18px; top: 16px; display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px;
  background: #0f3a24; box-shadow: inset 0 0 0 1px rgba(61,220,151,.45); font: 500 13px var(--mono); }
.mini-xl span { color: #9fd9b9; } .mini-xl b { font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.mini-xl i { font-style: normal; } .u { color: var(--up); } .d { color: var(--down); }
.mini-xl.flash b { color: var(--up); }
.mini-bt .mg path { fill: none; stroke: #9b8cff; stroke-width: 2; }
.mini-bt rect { fill: #17183a; stroke: #8f7dff; stroke-width: 1.2; }
.mini-bt text { fill: var(--text); font: 600 11px var(--body); text-anchor: middle; }
.mini-bt .b rect { fill: #0e3a27; stroke: var(--up); } .mini-bt .b text { fill: var(--up); }
.mini-bt .base { stroke: rgba(255,255,255,.12); stroke-dasharray: 4 5; }
.mini-bt .eq { fill: none; stroke: #7fb0ff; stroke-width: 2.4; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(127,176,255,.6)); }
.res { margin-top: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.res div { padding: 10px 12px; border-radius: 10px; background: rgba(9,14,28,.92); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.res span { display: block; font-size: 12px; color: var(--mute); }
.res b { font: 700 clamp(16px, 1.6vw, 21px) var(--display); font-variant-numeric: tabular-nums; }
.proof { margin: 0 0 18px; font-size: 15px; color: #ffd98a; }
.pl-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: auto; }
.pl-note { font-size: 13px; color: var(--mute); max-width: 34ch; }
.pl-link { color: #c4a6ff; font-weight: 600; text-decoration: none; }
.pl-link:hover { text-decoration: underline; }
.pl-bt .btn { --bg: #b394ff; box-shadow: 0 8px 30px rgba(155,92,255,.3); color: #12082b; }
.real { margin: 18px 0 0; font-size: 12.5px; line-height: 1.5; color: #77839a; }
@media (max-width: 960px) { .pillars { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .res { grid-template-columns: repeat(2, 1fr); } .mini-xl { font-size: 11px; } }

/* flow (pinned) */
.flow { position: relative; }
.flow-pin { min-height: 100svh; display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: clamp(24px, 4vw, 70px); align-items: center;
  padding: 100px var(--gut) 60px; max-width: 1440px; margin: 0 auto; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 18px; padding: 16px 18px; border-radius: 16px; opacity: .38; transition: opacity .4s, background .4s; }
.steps li.on { opacity: 1; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--line); }
.steps .n { font: 500 14px var(--mono); color: var(--up); padding-top: 6px; }
.steps h3 { font-size: 28px; letter-spacing: -.01em; }
.steps p { margin: 6px 0 0; color: #b9c4d6; font-size: 16px; }
.flow-bar { height: 3px; background: var(--line); border-radius: 3px; margin-top: 26px; overflow: hidden; }
.flow-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--up), var(--a1)); }

.stage { position: relative; aspect-ratio: 1 / .78; width: 100%; max-height: 78vh; justify-self: center; }
.orbit { position: absolute; left: 3%; top: 14%; width: 52%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.orbit::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.orbit > span { position: absolute; left: 50%; top: 50%; font: 500 13px var(--mono); white-space: nowrap; padding: 6px 10px; border-radius: 8px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: #c9d4e4; transform: translate(-50%, -50%); }
.core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34%; aspect-ratio: 1; border-radius: 26%;
  display: grid; place-items: center; align-content: center; gap: 6px; background: radial-gradient(circle at 30% 25%, #1b2742, #0b1222);
  box-shadow: 0 0 0 1px rgba(61,220,151,.4), 0 0 60px rgba(61,220,151,.25); }
.core img { width: 42%; }
.core b { font: 700 13px var(--display); letter-spacing: .02em; }
.pipe { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pipe path { fill: none; stroke: url(#none); stroke: var(--up); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(61,220,151,.7)); }
.pane { position: absolute; border-radius: 14px; overflow: hidden; background: #111; box-shadow: 0 40px 90px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.1); }
.pane-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #1d222c; font: 500 11px var(--mono); color: #aab5c6; }
.pane-bar.xl { background: #1e6b41; color: #e6f4ec; }
.pane-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.22); }
.pane-bar span { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-ami { right: 0; top: 2%; width: 62%; }
.p-xl { right: 8%; bottom: 0; width: 56%; }
.pane video { width: 100%; }

/* marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 26px 0; background: var(--deep); }
.mq-track { display: flex; gap: 70px; width: max-content; animation: mq 34s linear infinite; }
.mq-track span { font: 700 clamp(30px, 4vw, 56px) var(--display); letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px rgba(234,240,247,.35); }
.mq-track span:nth-child(odd) { color: rgba(234,240,247,.85); -webkit-text-stroke: 0; }
@keyframes mq { to { transform: translateX(-50%); } }

/* backtest */
.bt { padding: clamp(90px, 12vw, 170px) 0 80px; }
.big { font-size: clamp(40px, 6vw, 88px); line-height: .98; letter-spacing: -.03em; font-weight: 800; }
.bt-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; margin-top: 56px; }
.graph-card, .counts { border-radius: 22px; background: linear-gradient(180deg, var(--panel), var(--deep)); box-shadow: inset 0 0 0 1px var(--line); padding: 26px; }
.graph { width: 100%; height: auto; overflow: visible; }
.graph .wires path { fill: none; stroke: #7fb3e6; stroke-width: 2.5; }
.graph rect { fill: #13213a; stroke: #6f9fd6; stroke-width: 1.5; }
.graph text { fill: var(--text); font: 600 15px var(--body); text-anchor: middle; }
.graph .buy rect { fill: #0e3a27; stroke: var(--up); }
.graph .buy text { fill: var(--up); font-weight: 700; }
.cap { margin: 10px 0 0; color: var(--mute); font-size: 15px; }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-content: center; }
.counts div { display: grid; gap: 4px; }
.counts b { font: 800 clamp(40px, 4.6vw, 64px)/1 var(--display); color: #7fc4ff; font-variant-numeric: tabular-nums; }
.counts span { color: var(--mute); font-size: 14px; }
.counts p { grid-column: 1 / -1; margin: 16px 0 0; color: #b9c4d6; font-size: 16px; border-top: 1px solid var(--line); padding-top: 18px; }
.report-wrap { perspective: 1400px; margin-top: 60px; }
.report { border-radius: 18px; overflow: hidden; box-shadow: 0 50px 120px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.1); transform-origin: 50% 0; }
.chips { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { font: 500 14px var(--mono); padding: 9px 14px; border-radius: 10px; background: rgba(255,200,87,.07); box-shadow: inset 0 0 0 1px rgba(255,200,87,.35); color: #ffe2a3; }
.chips li:nth-child(-n+2) { background: rgba(61,220,151,.08); box-shadow: inset 0 0 0 1px rgba(61,220,151,.4); color: #9ff0c8; }

/* honest band */
.honest { padding: clamp(80px, 12vw, 160px) var(--gut); border-block: 1px solid var(--line); background: radial-gradient(60% 80% at 50% 50%, #0d1a2c, var(--ink)); }
.kin { margin: 0 auto; max-width: 1200px; font: 800 clamp(34px, 5.4vw, 80px)/1.02 var(--display); letter-spacing: -.03em; text-align: center; text-wrap: balance; }
.kin span { display: inline; }

/* claude */
.claude { position: relative; padding: clamp(100px, 12vw, 170px) 0; overflow: hidden; isolation: isolate; }
.aurora { position: absolute; inset: 0 -10%; z-index: -1; filter: blur(80px); opacity: .55;
  -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent);
  background: radial-gradient(40% 40% at 70% 40%, rgba(155,92,255,.55), transparent 70%), radial-gradient(35% 35% at 85% 70%, rgba(76,111,255,.45), transparent 70%),
  radial-gradient(30% 30% at 55% 75%, rgba(61,220,151,.25), transparent 70%); }
.claude-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.claude .lead { margin: 28px 0; }
.mcp { display: inline-flex; align-items: center; gap: 12px; margin: 0; font-size: 14px; color: var(--mute); }
.mcp code { font: 500 15px var(--mono); color: var(--text); padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); }
.chat { display: grid; gap: 18px; }
.bubble { justify-self: end; max-width: 88%; padding: 16px 20px; border-radius: 18px 18px 4px 18px; background: #232a3a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); font-size: 17px; min-height: 58px; }
.caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; background: var(--up); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.answer { border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 40px 100px rgba(0,0,0,.6); }

/* final */
.final { padding: clamp(110px, 14vw, 200px) var(--gut) clamp(90px, 10vw, 140px); text-align: center; background: radial-gradient(50% 60% at 50% 100%, rgba(61,220,151,.14), transparent 70%); }
.huge { font-size: clamp(64px, 13vw, 210px); line-height: .9; letter-spacing: -.045em; font-weight: 800; }
.final .lead { margin-top: 26px; margin-bottom: 34px; }

.foot { padding: 40px var(--gut) calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; justify-content: space-between; max-width: 1240px; margin: 0 auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot nav a { color: var(--mute); text-decoration: none; font-size: 15px; }
.foot nav a:hover { color: var(--text); }
.disc { max-width: 1240px; margin: 26px auto 0; color: #6c788d; font-size: 13px; }

/* motion setup: hidden start states only when JS runs and motion is allowed */
.js:not(.rm) .home .hero-h .w { transform: translateY(105%); }
.js:not(.rm) .home .hero-sub, .js:not(.rm) .home .hero > .hero-inner .hero-cta, .js:not(.rm) .home .eyebrow { opacity: 0; }

/* responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .flow-pin { grid-template-columns: 1fr; padding-top: 90px; }
  .stage { max-height: none; }
  .bt-grid, .claude-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav-cta .ghost { display: none; }
  .steps li { padding: 12px; } .steps h3 { font-size: 22px; } .steps p { font-size: 15px; }
  .counts { grid-template-columns: repeat(3, 1fr); padding: 20px; }
  .orbit > span { font-size: 10px; padding: 4px 6px; }
  .scroll-cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mq-track, .dot, .scroll-cue span, .caret { animation: none; }
}
