/* HoodAgents — design system */
:root {
  --bg: #0a0c10;
  --surface: #12151b;
  --surface-2: #191d25;
  --border: #262b34;
  --border-soft: #1e232c;
  --ink: #e9e7e2;
  --muted: #98a0a8;
  --faint: #6b7280;
  --accent: #00c805;
  --accent-ink: #0a0c10;
  --green: #3fcf8e;
  --red: #e5685a;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: var(--mono); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 600; font-size: 17px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; overflow: hidden; display: grid; place-items: center; }
.brand-mark svg { display: block; }
.nav-links { display: flex; gap: 24px; align-items: center; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: linear-gradient(135deg, #3cf27c 0%, #00c805 55%, #00b35c 100%); color: var(--accent-ink); font-weight: 700;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
}
.nav-cta:hover { background: linear-gradient(135deg, #4dff8f 0%, #00c805 55%, #00c805 100%); text-decoration: none; }
.nav-links .nav-cta { color: var(--accent-ink); }

/* ================================================================
   v2 visual upgrade — hero, sparkline, chart, timeline, counters
   ================================================================ */

/* ---------- hero v2 ---------- */
.hero { padding: 88px 0 84px; }
.hero-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-orbs::before, .hero-orbs::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
}
.hero-orbs::before {
  width: 480px; height: 480px; right: -80px; top: -120px;
  background: radial-gradient(circle, rgba(0, 200, 5, 0.35), transparent 70%);
  animation: orbFloat 10s ease-in-out infinite alternate;
}
.hero-orbs::after {
  width: 420px; height: 420px; left: -140px; bottom: -160px;
  background: radial-gradient(circle, rgba(63, 207, 142, 0.18), transparent 70%);
  animation: orbFloat 13s ease-in-out infinite alternate-reverse;
}
@keyframes orbFloat { to { transform: translate(-24px, 20px) scale(1.06); } }

.hero h1 { font-size: clamp(36px, 5.2vw, 58px); }
.hero h1 .hl {
  background: linear-gradient(100deg, #2ee06a 10%, #00c805 50%, #00a651 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-proof { display: flex; gap: 10px; margin-top: 26px; font-size: 12px; color: var(--faint); }
.hero-proof b { color: var(--muted); font-weight: 500; }

.hero-visual { position: relative; }
.hero-panel {
  border-radius: 18px; overflow: hidden; border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 30px 80px -30px rgba(0, 200, 5, 0.18);
  animation: rise 1s 0.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-panel img { width: 100%; height: auto; display: block; opacity: 0.95; }
.vault-card {
  position: relative; z-index: 2;
  margin-top: -96px; margin-left: 24px; margin-right: -12px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 200, 5, 0.08);
}

/* sparkline */
.spark { margin: 6px 0 4px; }
.spark svg { width: 100%; height: 56px; display: block; }
.spark-line, .chart-line {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 1000; stroke-dashoffset: 1000; /* pathLength=1000 */
}
.spark-line { animation: drawStroke 2.2s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes drawStroke { to { stroke-dashoffset: 0; } }
.spark-area { fill: url(#sparkGrad); opacity: 0.22; }

/* allocation bars */
.alloc { margin-top: 12px; display: grid; gap: 7px; }
.alloc-row { display: grid; grid-template-columns: 52px 1fr 72px; gap: 10px; align-items: center; font-size: 12px; }
.alloc-row span { color: var(--muted); }
.alloc-row b { color: var(--ink); font-weight: 500; text-align: right; }
.alloc-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.alloc-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2ee06a, #00a651); }

/* ---------- stat strip counters ---------- */
.stat {
  display: flex; flex-direction: column;
  padding: 24px 18px;
  transition: transform 0.25s ease, background 0.25s ease;
  border-radius: var(--radius-sm); position: relative;
}
.stat .k { font-size: 23px; }
.stat .v {
  margin-top: 8px; font-size: 12.5px; color: var(--muted);
  line-height: 1.45; min-height: 38px; display: flex; align-items: flex-end;
}
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(0, 200, 5, 0.22), transparent);
}
.stat:hover { transform: translateY(-3px); background: var(--surface-2); }

/* ---------- steps timeline ---------- */
.steps { position: relative; }
.steps::before {
  content: ""; position: absolute; left: 31px; top: 18px; bottom: 18px; width: 1px;
  background: linear-gradient(180deg, rgba(0, 200, 5, 0.5), rgba(0, 200, 5, 0.06));
}
.step { grid-template-columns: 62px 1fr; position: relative; }
.step-n {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 15px;
  box-shadow: 0 0 24px -6px rgba(0, 200, 5, 0.25);
}
.step:hover .step-n { border-color: rgba(0, 200, 5, 0.5); }

/* ---------- NAV chart section ---------- */
.chart-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px; position: relative; overflow: hidden;
}
.chart-card::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 70%;
  background: radial-gradient(ellipse at 60% 0%, rgba(0, 200, 5, 0.10), transparent 65%);
  pointer-events: none;
}
.nav-chart { width: 100%; height: auto; display: block; }
.chart-line { stroke: var(--accent); stroke-width: 2.5; }
.chart-area { fill: url(#chartGrad); opacity: 0.18; }
.chart-card.in .chart-line { animation: drawStroke 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.chart-meta {
  display: flex; justify-content: space-between; margin-top: 12px;
  font-size: 11.5px; color: var(--faint);
}

/* ---------- card glow hovers ---------- */
.step, .fee, .arch, .dapp-card, .chart-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}
.step:hover, .fee:hover, .dapp-card:hover, .chart-card:hover {
  transform: translateY(-3px); border-color: rgba(0, 200, 5, 0.35);
  box-shadow: 0 14px 44px -14px rgba(0, 200, 5, 0.14);
}
.arch:hover { border-color: rgba(0, 200, 5, 0.35); }

/* section divider glow */
.section::after {
  content: ""; display: block; max-width: 1120px; margin: 0 auto; margin-top: 84px;
  height: 1px; background: linear-gradient(90deg, transparent, rgba(0, 200, 5, 0.18), transparent);
}
.section:last-of-type::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-orbs::before, .hero-orbs::after { animation: none; }
  .spark-line { animation: none; stroke-dashoffset: 0; }
  .chart-card.in .chart-line { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 860px) {
  .vault-card { margin: -60px 12px 0; }
  .hero-panel { display: none; }
  .hero-visual { margin-top: -20px; }
  .hero-proof { flex-wrap: wrap; }
}


/* vault mock card */
.vault-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; font-family: var(--mono); font-size: 13px;
}
.vault-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.vault-card-head .sym { font-size: 15px; font-weight: 700; color: var(--ink); }
.tag {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em;
}
.tag-live { border-color: rgba(63, 207, 142, 0.4); color: var(--green); }
.vault-nav { font-size: 30px; font-weight: 700; margin: 4px 0 2px; }
.vault-nav small { color: var(--green); font-size: 13px; }
.vault-nav small.down { color: var(--red); }
.vault-row { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--border-soft); color: var(--muted); }
.vault-row b { color: var(--ink); font-weight: 500; }
.vault-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.chip { font-size: 11px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }

/* ---------- anchor scroll offset (sticky nav) ---------- */
html { scroll-padding-top: 88px; scroll-behavior: smooth; }
section[id] { scroll-margin-top: 88px; }

/* ---------- stat strip ---------- */
.stat-strip { border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 22px 18px; }
.stat .k { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--accent); }
.stat .v { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: 30px; margin-bottom: 12px; }
.section-head p { color: var(--muted); }

/* steps */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 20px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 20px 22px;
}
.step-n { font-family: var(--mono); font-size: 22px; color: var(--accent); opacity: 0.85; }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); }

/* guardrail spec table */
.security-grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: center; }
.security-visual img { width: 100%; height: auto; display: block; opacity: 0.9; }

.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th { text-align: left; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 10px 14px; border-bottom: 1px solid var(--border); }
.spec td { padding: 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.spec td:first-child { font-family: var(--mono); color: var(--ink); white-space: nowrap; }
.spec td:nth-child(2) { color: var(--muted); }
.spec tr:last-child td { border-bottom: none; }

/* architecture diagram */
.arch { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 26px; }
.arch svg { width: 100%; height: auto; display: block; }

/* fees */
.fee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fee { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 22px; }
.fee .k { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.fee .num { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--accent); margin: 8px 0 4px; }
.fee p { font-size: 13.5px; color: var(--muted); }

/* roadmap */
.roadmap { display: grid; gap: 12px; }
.rm { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.rm:last-child { border-bottom: none; }
.rm .phase { font-family: var(--mono); font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; padding-top: 2px; }
.rm h3 { font-size: 15px; margin-bottom: 4px; }
.rm p { font-size: 13.5px; color: var(--muted); }
.rm .done { color: var(--green); }

/* faq */
.faq details { border-bottom: 1px solid var(--border-soft); padding: 16px 0; }
.faq summary { cursor: pointer; font-family: var(--sans); font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); font-size: 14px; margin-top: 10px; max-width: 720px; }

/* footer */
.footer { border-top: 1px solid var(--border-soft); padding: 40px 0 56px; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer .brand { font-size: 15px; }
.footer .muted { color: var(--faint); font-size: 13px; margin-top: 8px; }
.footer-links { display: flex; gap: 22px; font-size: 13.5px; }
.footer-links a { color: var(--muted); }

/* ---------- agents page (Monitor surface) ---------- */
.page-head { padding: 48px 0 28px; }
.page-head h1 { font-size: 30px; }
.page-head .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.meta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--faint); font-family: var(--mono); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; flex-wrap: wrap; }
.toolbar select, .toolbar input {
  background: var(--surface); border: 1px solid var(--border); color: var(--ink);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13.5px; font-family: var(--body);
}
.toolbar input { width: 220px; }

.agent-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; }
.agent-table th { text-align: left; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.agent-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.agent-table tr:last-child td { border-bottom: none; }
.agent-table tr:hover { background: var(--surface-2); }
.agent-name { font-family: var(--sans); font-weight: 600; font-size: 14px; }
.agent-sym { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 2px; }
.agent-strat { color: var(--muted); max-width: 340px; }
.num { font-family: var(--mono); }
.pos-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.pos-chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-family: var(--mono); }
.up { color: var(--green); }
.demo-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; border: 1px dashed var(--border); color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }

.empty { padding: 60px 0; text-align: center; color: var(--faint); font-family: var(--mono); font-size: 13px; }

/* ---------- dapp panel ---------- */
.dapp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 32px; }
.dapp-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px;
}
.dapp-title { font-size: 15px; margin-bottom: 14px; }
.dapp-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.dapp-row span { color: var(--muted); }
.dapp-row b { font-weight: 500; }
.dapp-row select, .dev-panel input, .dapp-form input {
  background: var(--bg); border: 1px solid var(--border); color: var(--ink);
  border-radius: var(--radius-sm); padding: 7px 10px; font-size: 13px; font-family: var(--mono);
}
.dapp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.dapp-actions .btn { padding: 10px 14px; font-size: 14px; }

.dev-toggle {
  margin-top: 16px; background: none; border: none; color: var(--faint);
  font-size: 12.5px; cursor: pointer; font-family: var(--mono);
}
.dev-toggle:hover { color: var(--muted); }
.dev-panel { margin-top: 10px; padding: 14px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.dev-panel p { font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.dev-panel input { width: 100%; margin-bottom: 10px; }

.dapp-form { margin-top: 14px; }
.dapp-form label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.dapp-form-row { display: flex; gap: 8px; }
.dapp-form-row input { flex: 1; min-width: 0; }

.tx-status { margin-top: 14px; font-size: 13px; min-height: 20px; }
.tx-status.ok { color: var(--green); }
.tx-status.err { color: var(--red); }
.tx-status.warn { color: var(--accent); }
.tx-log { margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); max-height: 120px; overflow-y: auto; }
.tx-log div { padding: 2px 0; }

@media (max-width: 860px) {
  .dapp-grid { grid-template-columns: 1fr; }
}

/* ---------- subtle motion ---------- */
.step, .fee, .vault-card, .arch, .dapp-card {
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.step:hover, .fee:hover, .vault-card:hover, .dapp-card:hover { transform: translateY(-2px); border-color: #333a45; }
.btn { transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary:hover { background: #2ee06a; }
.nav-links a { position: relative; transition: color 0.2s ease; }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 1px; background: var(--accent); transition: right 0.25s ease;
}
.nav-links a:not(.nav-cta):hover::after { right: 0; }

@media (max-width: 860px) {
  .security-grid { grid-template-columns: 1fr; }
  .security-visual { max-width: 320px; margin: 0 auto; }
  .hero-bg { background-size: 130% auto; background-position: 70% 20%; opacity: 0.22; }
}

@media (prefers-reduced-motion: reduce) {
  .step, .fee, .vault-card, .arch, .dapp-card { transition: none; }
  .step:hover, .fee:hover, .vault-card:hover, .dapp-card:hover { transform: none; }
  .btn:hover { transform: none; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
  .fee-grid { grid-template-columns: 1fr; }
  .nav-links .link { display: none; }
  .agent-table { font-size: 12.5px; }
  .agent-strat { display: none; }
}

/* ---------- restored base styles (cascade-safe) ---------- */
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 18px;
}
.hero p.lede { font-size: 18px; color: var(--muted); max-width: 540px; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, #3cf27c 0%, #00c805 50%, #00b35c 100%); color: var(--accent-ink); box-shadow: 0 8px 24px -8px rgba(0, 200, 5, 0.55), inset 0 1px 0 rgba(255,255,255,0.22); }
.btn-primary:hover { background: linear-gradient(135deg, #4dff8f 0%, #00c805 50%, #00c805 100%); box-shadow: 0 10px 30px -8px rgba(0, 200, 5, 0.7); text-decoration: none; }
.btn-ghost { border-color: var(--border); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--faint); text-decoration: none; }

.hero-copy { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-enter { animation: rise 0.9s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-copy, .hero-enter, .hero-panel, .agents-banner { animation: none; }
  html { scroll-behavior: auto; }
}

/* ================================================================
   v3 — background scene, ambient motion, more life
   ================================================================ */

/* ---------- global background scene ---------- */
.bg-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.042) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, black 25%, transparent 92%);
          mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, black 25%, transparent 92%);
}
.bg-noise {
  position: absolute; inset: 0; opacity: 0.035; mix-blend-mode: overlay;
  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'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='1'/></svg>");
}
.bg-blob { position: absolute; border-radius: 50%; filter: blur(100px); }
.bg-blob.b1 {
  width: 620px; height: 620px; top: -240px; left: 10%;
  background: radial-gradient(circle, rgba(0, 200, 5, 0.42), transparent 70%);
  animation: drift1 18s ease-in-out infinite alternate;
}
.bg-blob.b2 {
  width: 560px; height: 560px; top: 32%; right: -200px;
  background: radial-gradient(circle, rgba(63, 207, 142, 0.22), transparent 70%);
  animation: drift2 24s ease-in-out infinite alternate;
}
.bg-blob.b3 {
  width: 540px; height: 540px; bottom: -220px; left: -160px;
  background: radial-gradient(circle, rgba(0, 200, 5, 0.20), transparent 70%);
  animation: drift3 28s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(70px, 45px) scale(1.06); } }
@keyframes drift2 { to { transform: translate(-60px, 70px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(80px, -55px) scale(1.05); } }

body {
  background-color: #0a0c10;
  background-image:
    radial-gradient(ellipse 55% 38% at 18% -6%, rgba(0, 200, 5, 0.05), transparent),
    radial-gradient(ellipse 45% 35% at 92% 8%, rgba(63, 207, 142, 0.035), transparent);
  background-attachment: fixed;
}

/* ---------- hero particles ---------- */
.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.particles i {
  position: absolute; bottom: -10px; border-radius: 50%;
  background: rgba(0, 200, 5, 0.55);
  box-shadow: 0 0 8px rgba(0, 200, 5, 0.5);
  animation: floatUp linear infinite;
}
.particles i:nth-child(1) { left: 8%;  width: 3px; height: 3px; animation-duration: 17s; animation-delay: 0s; }
.particles i:nth-child(2) { left: 22%; width: 2px; height: 2px; animation-duration: 21s; animation-delay: 3s; }
.particles i:nth-child(3) { left: 36%; width: 4px; height: 4px; animation-duration: 19s; animation-delay: 1.5s; }
.particles i:nth-child(4) { left: 52%; width: 2px; height: 2px; animation-duration: 24s; animation-delay: 5s; }
.particles i:nth-child(5) { left: 64%; width: 3px; height: 3px; animation-duration: 16s; animation-delay: 2.5s; }
.particles i:nth-child(6) { left: 76%; width: 2px; height: 2px; animation-duration: 22s; animation-delay: 7s; }
.particles i:nth-child(7) { left: 88%; width: 3px; height: 3px; animation-duration: 18s; animation-delay: 4s; }
.particles i:nth-child(8) { left: 96%; width: 2px; height: 2px; animation-duration: 25s; animation-delay: 1s; }
@keyframes floatUp {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 0.9; }
  92% { opacity: 0.9; }
  100% { transform: translateY(-105vh); opacity: 0; }
}

/* ---------- staggered reveals ---------- */
.steps .step:nth-child(1) { transition-delay: 0ms; }
.steps .step:nth-child(2) { transition-delay: 90ms; }
.steps .step:nth-child(3) { transition-delay: 180ms; }
.steps .step:nth-child(4) { transition-delay: 270ms; }
.fee-grid .fee:nth-child(1) { transition-delay: 0ms; }
.fee-grid .fee:nth-child(2) { transition-delay: 100ms; }

/* ---------- button shimmer ---------- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
.btn-primary:hover::after { animation: shimmer 0.9s ease; }
@keyframes shimmer { to { left: 150%; } }

/* ---------- chart endpoint pulse ---------- */
.nav-chart circle { transform-box: fill-box; transform-origin: center; animation: dotPulse 2.6s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(2.1); opacity: 0.5; } }

/* ---------- FAQ smooth accordion ---------- */
.faq details p { max-height: 0; overflow: hidden; margin-top: 0; transition: max-height 0.4s ease, margin-top 0.4s ease, opacity 0.4s ease; opacity: 0; }
.faq details[open] p { max-height: 400px; margin-top: 10px; opacity: 1; }

/* ---------- agents page banner ---------- */
.agents-banner {
  margin: 8px 0 20px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); position: relative;
  box-shadow: 0 24px 60px -30px rgba(0, 200, 5, 0.22);
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.agents-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.55), rgba(10, 12, 16, 0.05) 55%, rgba(10, 12, 16, 0.55));
  pointer-events: none;
}
.agents-banner img { width: 100%; height: auto; display: block; }
.agents-banner .banner-tag {
  position: absolute; left: 20px; bottom: 16px; z-index: 1;
  font-family: var(--mono); font-size: 12px; color: var(--ink);
  background: rgba(10, 12, 16, 0.6); border: 1px solid rgba(0, 200, 5, 0.3);
  padding: 6px 12px; border-radius: 999px;
}

/* ---------- CTA section ---------- */
.cta { position: relative; }
.cta-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.cta h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 14px; }
.cta p { color: var(--muted); font-size: 15.5px; max-width: 480px; margin-bottom: 26px; }
.cta-visual img {
  width: 100%; height: auto; display: block; border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px -30px rgba(0, 200, 5, 0.22);
}

/* ---------- rings decor in fees ---------- */
.fees-wrap { position: relative; }
.rings-decor {
  position: absolute; right: -60px; top: -70px; width: 260px; height: 260px;
  border-radius: 50%; overflow: hidden; opacity: 0.35; pointer-events: none;
  animation: orbFloat 14s ease-in-out infinite alternate;
}
.rings-decor img { width: 100%; height: 100%; object-fit: cover; }
.rings-decor::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, transparent 30%, rgba(10, 12, 16, 0.9) 74%);
}

/* ---------- reduced motion for v3 ---------- */
@media (prefers-reduced-motion: reduce) {
  .bg-blob.b1, .bg-blob.b2, .bg-blob.b3, .particles i, .rings-decor { animation: none; }
  .particles i { display: none; }
  .btn-primary:hover::after { animation: none; }
  .nav-chart circle { animation: none; }
  .faq details p { max-height: none; opacity: 1; }
}

@media (max-width: 860px) {
  .cta-grid { grid-template-columns: 1fr; }
  .rings-decor { display: none; }
  .agents-banner .banner-tag { font-size: 10.5px; left: 14px; bottom: 12px; }
}

/* ---------- stat strip final consolidation ---------- */
.stat {
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 24px 20px; position: relative;
}
.stat .k {
  font-family: var(--mono); font-size: 23px; font-weight: 700; color: var(--accent);
  line-height: 1.1;
}
.stat .v {
  margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.45;
  min-height: 38px; display: flex; align-items: flex-end; max-width: 190px;
}
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(0, 200, 5, 0.25), transparent);
}
.stat:hover { transform: translateY(-3px); background: var(--surface-2); }

/* ---------- live ticker ---------- */
.ticker {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); padding: 10px 14px; margin-bottom: 18px;
  overflow: hidden; position: relative;
}
.ticker-label {
  font-size: 10.5px; letter-spacing: 0.14em; color: var(--accent);
  border: 1px solid rgba(0, 200, 5, 0.35); border-radius: 6px;
  padding: 4px 8px; white-space: nowrap;
}
.ticker-items { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.ticker-items::-webkit-scrollbar { display: none; }
.tick { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.tick-logo { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }
.tick-sym { font-size: 12px; color: var(--muted); font-weight: 600; }
.tick-price { font-size: 12.5px; color: var(--ink); }
.tick-chg { font-size: 11px; }
.ticker-note { font-size: 10.5px; color: var(--faint); white-space: nowrap; }

/* ---------- trades feed ---------- */
.trades-wrap { margin-top: 56px; }
.trades-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.trades-head h2 { font-size: 22px; }
.trades-list { display: grid; gap: 6px; }
.trade {
  display: grid; grid-template-columns: 84px 64px 70px 90px 110px 110px 90px 1fr;
  gap: 10px; align-items: center; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 10px; font-size: 13px;
}
.trade-side { font-weight: 700; font-size: 12px; }
.trade-agent { color: var(--accent); font-weight: 600; }
.trade-sym { color: var(--ink); font-weight: 600; }
.trade-qty, .trade-usd, .trade-price { color: var(--muted); }
.trade-hash { color: var(--faint); }
.trade-time { color: var(--faint); text-align: right; }
.trade.flash { animation: tradeFlash 2.6s ease; }
@keyframes tradeFlash {
  0% { background: rgba(0, 200, 5, 0.16); border-color: rgba(0, 200, 5, 0.5); }
  100% { background: var(--surface); border-color: var(--border-soft); }
}

/* ---------- agent rows clickable ---------- */
.agent-table tr.clickable { cursor: pointer; }
.agent-table tr.clickable:hover { background: var(--surface-2); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 9, 0.72); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(640px, 100%); max-height: 82vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 200, 5, 0.07);
  animation: rise 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: 1px solid var(--border);
  color: var(--muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.modal-close:hover { color: var(--ink); border-color: var(--faint); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.modal-nav { font-size: 24px; font-weight: 700; white-space: nowrap; }
.modal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.modal-k { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; }
.modal-k span { display: block; font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.modal-k b { font-size: 14px; font-weight: 600; }
.modal-pos { margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.modal-trades { display: grid; gap: 6px; }
.modal-trades .trade { grid-template-columns: 84px 70px 90px 110px 1fr; }

@media (max-width: 860px) {
  .trade { grid-template-columns: 74px 52px 60px 80px 100px; gap: 8px; }
  .trade-price, .trade-hash { display: none; }
  .modal-grid { grid-template-columns: repeat(2, 1fr); }
  .ticker-note { display: none; }
}

.down { color: var(--red); }

/* ================================================================
   v6 — modern editorial pass: type, motion, refinement
   ================================================================ */

/* ---------- typography ---------- */
.hero h1 {
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1.02; letter-spacing: -0.02em;
}
.hero h1 .hl {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic; font-weight: 400;
  letter-spacing: 0.005em;
  background: linear-gradient(100deg, #2ee06a 5%, #00c805 50%, #00a651 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head h2 { font-size: clamp(27px, 3.6vw, 40px); letter-spacing: -0.015em; }
.sec-index {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); opacity: 0.75;
  margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.sec-index::after { content: ""; height: 1px; width: 44px; background: linear-gradient(90deg, rgba(255,122,24,.5), transparent); }
.trades-head h2, .page-head h1 { letter-spacing: -0.015em; }

/* ---------- hero word reveal ---------- */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.wi { display: inline-block; transform: translateY(118%); animation: wordUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(var(--i) * 55ms + 150ms); }
.w-hl .wi { transform: translateY(118%); }
@keyframes wordUp { to { transform: translateY(0); } }

/* ---------- scroll progress ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 300;
  background: linear-gradient(90deg, #2ee06a, #00a651);
  box-shadow: 0 0 10px rgba(0, 200, 5, 0.5);
}

/* ---------- scrollspy nav ---------- */
.nav-links .link.active { color: var(--accent); }
.nav-links .link.active::after { opacity: 1; transform: scaleX(1); }

/* ---------- card refinement ---------- */
.step, .fee, .arch, .dapp-card, .chart-card, .vault-card, .agents-banner, .hero-panel {
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.dapp-card, .chart-card { border-radius: 16px; }
.section { padding: 96px 0; }
.section-head p { font-size: 16px; }

/* ---------- CTA / footer presence ---------- */
.cta h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; }
.footer { padding: 56px 0 40px; border-top: 1px solid var(--border-soft); }
.footer-grid .brand { font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  .wi, .w-hl .wi { animation: none; transform: none; }
  #scroll-progress { display: none; }
}

@media (max-width: 860px) {
  .sec-index { font-size: 10px; }
  .section { padding: 72px 0; }
}

/* ---------- RedSun-style: pill, chrome, edge glow ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(0, 200, 5, 0.35); border-radius: 999px;
  background: rgba(0, 200, 5, 0.07); color: #5ee87a;
  padding: 6px 14px; font-size: 12px; letter-spacing: 0.02em;
  margin-bottom: 16px; transition: border-color 0.25s ease, background 0.25s ease;
}
.pill:hover { border-color: rgba(0, 200, 5, 0.6); background: rgba(0, 200, 5, 0.12); text-decoration: none; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #00c805; box-shadow: 0 0 8px rgba(0, 200, 5, 0.8); animation: dotPulse 2s ease-in-out infinite; }
.pill-arrow { transition: transform 0.25s ease; }
.pill:hover .pill-arrow { transform: translateX(3px); }

/* window chrome on the hero product panel */
.hero-panel { position: relative; }
.hero-panel::before {
  content: ""; position: absolute; top: 12px; left: 14px; z-index: 2;
  width: 42px; height: 9px;
  background:
    radial-gradient(circle at 5px 4.5px, #ff5f57 4px, transparent 5px),
    radial-gradient(circle at 21px 4.5px, #febc2e 4px, transparent 5px),
    radial-gradient(circle at 37px 4.5px, #28c840 4px, transparent 5px);
  pointer-events: none; opacity: 0.85;
}

/* card edge glow — RedSun illuminated borders */
.dapp-card, .chart-card, .vault-card, .agents-banner, .hero-panel, .ticker {
  box-shadow: 0 0 0 1px rgba(0, 200, 5, 0.06), 0 1px 0 rgba(255, 255, 255, 0.03), 0 24px 60px -32px rgba(0, 0, 0, 0.6);
}
.step, .fee, .arch, .trade {
  box-shadow: 0 0 0 1px rgba(0, 200, 5, 0.04);
}
.dapp-card:hover, .chart-card:hover, .vault-card:hover, .agents-banner:hover {
  box-shadow: 0 0 0 1px rgba(0, 200, 5, 0.16), 0 0 30px -8px rgba(0, 200, 5, 0.12), 0 24px 60px -32px rgba(0, 0, 0, 0.6);
}

/* hero glow — RedSun radial center glow */
.hero-orbs::before {
  background: radial-gradient(circle, rgba(0, 200, 5, 0.34), transparent 70%);
}
.bg-blob.b1 { background: radial-gradient(circle, rgba(0, 200, 5, 0.38), transparent 70%); }
.bg-blob.b3 { background: radial-gradient(circle, rgba(0, 160, 81, 0.20), transparent 70%); }
@media (prefers-reduced-motion: reduce) { .pill-dot { animation: none; } }

/* compact banner — less decorative height, content above the fold */
.agents-banner { margin: 0 0 22px; }
.agents-banner img { max-height: 280px; width: 100%; object-fit: cover; object-position: center 30%; }
@media (max-width: 860px) { .agents-banner img { max-height: 180px; } }
