:root {
  color-scheme: dark;
  --bg: #0a0b10;
  --surface-1: #11131a;
  --surface-2: #171a23;
  --border: #252937;
  --border-strong: #353a4c;
  --text-primary: #f2f3f7;
  --text-secondary: #b4b8c7;
  --text-muted: #7d8296;
  --accent-1: #8b7cf6;
  --accent-2: #3987e5;
  --accent-3: #22c3a0;
  --grad: linear-gradient(120deg, #8b7cf6 0%, #3987e5 50%, #22c3a0 100%);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #9085e9;
  --grid: #222634;
  --radius: 16px;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 11, 16, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(10, 11, 16, 0.85); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; font-size: 15px; color: #0a0b10; font-weight: 800; }
.nav-links { display: flex; gap: 28px; font-size: 15px; color: var(--text-secondary); }
.nav-links a { position: relative; padding: 4px 0; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: var(--grad); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text-primary); border-radius: 10px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(10,11,16,.97); border-bottom: 1px solid var(--border); display: none; padding: 8px 16px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links a.active::after { display: none; }
}

/* HERO */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
.hero.small { min-height: 0; padding: 140px 0 56px; }
#bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; z-index: 0; animation: float 18s ease-in-out infinite; }
.blob.b1 { width: 520px; height: 520px; background: #6b5cf0; top: -140px; left: -120px; }
.blob.b2 { width: 460px; height: 460px; background: #1f6fd1; bottom: -160px; right: -80px; animation-delay: -6s; }
.blob.b3 { width: 340px; height: 340px; background: #13a888; top: 30%; right: 25%; animation-delay: -12s; opacity: .22; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.08); } 66% { transform: translate(-30px,25px) scale(.95); } }
.hero-content { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(23,26,35,.6); font-size: 13px; color: var(--text-secondary); letter-spacing: .02em; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 12px var(--accent-3); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 84px); font-weight: 700; margin: 22px 0 22px; }
h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-secondary); max-width: 720px; margin: 0; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 12px; font-weight: 600; font-size: 15px; transition: transform .2s, box-shadow .2s, background .2s; cursor: pointer; border: none; }
.btn-primary { background: var(--grad); color: #0a0b10; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(139,124,246,.7); }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text-primary); background: rgba(23,26,35,.5); }
.btn-ghost:hover { border-color: var(--accent-1); transform: translateY(-2px); }
.breadcrumb { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--text-primary); }

/* SECTIONS */
section { position: relative; padding: 96px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head p { color: var(--text-secondary); max-width: 560px; margin: 12px 0 0; }
.kicker { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-3); font-weight: 600; margin-bottom: 12px; }

/* STATS */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px; }
.stat { padding: 24px; border-radius: var(--radius); background: rgba(17,19,26,.75); border: 1px solid var(--border); backdrop-filter: blur(8px); }
.stat-num { font-family: var(--font-head); font-size: clamp(32px, 4vw, 46px); font-weight: 700; letter-spacing: -0.03em; }
.stat-label { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* CARDS */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.card {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: var(--surface-1); border: 1px solid var(--border);
  overflow: hidden; transition: transform .25s, border-color .25s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(139,124,246,.16), transparent 45%);
}
.card:hover::before { opacity: 1; }
a.card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.card p { color: var(--text-secondary); margin: 10px 0 0; font-size: 15px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: var(--text-muted); }
.card-meta b { color: var(--text-primary); font-weight: 600; }
.icon-box { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 20px; margin-bottom: 18px; }

/* BADGES / CHIPS */
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; border: 1px solid; white-space: nowrap; }
.badge.ai { color: #b9b0ff; border-color: rgba(139,124,246,.45); background: rgba(139,124,246,.12); }
.badge.web3 { color: #f0b860; border-color: rgba(201,133,0,.5); background: rgba(201,133,0,.12); }
.badge.long { color: #7fe0c6; border-color: rgba(34,195,160,.45); background: rgba(34,195,160,.1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); transition: border-color .2s, color .2s; }
.chip:hover { border-color: var(--accent-1); color: var(--text-primary); }
.industry { font-size: 13px; color: var(--accent-3); font-weight: 500; margin-top: 6px; }

/* MARQUEE */
.marquee { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 22px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scroll 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee .chip { font-size: 15px; padding: 9px 18px; }

/* CHARTS */
.chart-card { padding: 28px; border-radius: var(--radius); background: var(--surface-1); border: 1px solid var(--border); }
.chart-card h3 { margin-bottom: 4px; }
.chart-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 18px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text, .chart .lbl { fill: var(--text-muted); font-size: 12px; font-family: var(--font-body); }
.chart .lbl-strong { fill: var(--text-secondary); font-size: 12px; font-weight: 600; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--border-strong); stroke-width: 1; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; opacity: 0; transition: opacity .12s;
  background: #1d2130; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; color: var(--text-primary); box-shadow: 0 10px 30px rgba(0,0,0,.45); min-width: 140px; white-space: nowrap;
}
.tooltip .tt-title { font-weight: 600; margin-bottom: 4px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }
.tooltip .tt-row b { color: var(--text-primary); margin-left: auto; padding-left: 12px; }
.tooltip .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; color: var(--text-secondary); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.table-toggle { margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.table-toggle summary { cursor: pointer; }
.table-toggle summary:hover { color: var(--text-secondary); }

/* TABLE */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--surface-1); position: sticky; top: 0; }
td { color: var(--text-secondary); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: rgba(23,26,35,.6); }
td a { color: var(--text-primary); font-weight: 500; }
td a:hover { color: var(--accent-1); }

/* FILTERS */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; align-items: center; }
.search { flex: 1 1 240px; min-width: 200px; padding: 12px 16px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--border); color: var(--text-primary); font-size: 15px; font-family: inherit; outline: none; }
.search:focus { border-color: var(--accent-1); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { padding: 9px 14px; border-radius: 10px; background: var(--surface-1); border: 1px solid var(--border); color: var(--text-secondary); font-size: 14px; font-family: inherit; cursor: pointer; transition: all .2s; }
.seg button:hover { color: var(--text-primary); }
.seg button.on { background: var(--surface-2); border-color: var(--accent-1); color: var(--text-primary); }
select.search { flex: 0 1 260px; }
.count-note { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }

/* CLIENT PAGE */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
@media (max-width: 820px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.layer { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.layer:last-child { border-bottom: none; }
.layer-name { font-weight: 600; color: var(--text-primary); font-size: 15px; }
@media (max-width: 640px) { .layer { grid-template-columns: 1fr; gap: 10px; } }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.ai-callout { padding: 22px; border-radius: var(--radius); border: 1px solid rgba(139,124,246,.4); background: linear-gradient(135deg, rgba(139,124,246,.12), rgba(57,135,229,.06)); }
.ai-callout .kicker { color: #b9b0ff; }
.timeline-mini { position: relative; height: 10px; border-radius: 6px; background: var(--surface-2); margin: 14px 0 6px; overflow: hidden; }
.timeline-mini span { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--grad); }
.timeline-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

/* EVOLUTION */
.evo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
@media (max-width: 980px) { .evo { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .evo { grid-template-columns: 1fr; } }
.evo .card { border-top: 3px solid transparent; border-image: var(--grad) 1; border-image-slice: 1 0 0 0; }
.evo-year { font-family: var(--font-head); font-size: 26px; font-weight: 700; }

/* CTA / FOOTER */
.cta { text-align: center; padding: 72px 32px; border-radius: 24px; border: 1px solid var(--border); background: radial-gradient(600px circle at 50% 0%, rgba(139,124,246,.22), transparent 60%), var(--surface-1); }
.cta p { color: var(--text-secondary); max-width: 620px; margin: 16px auto 28px; }
footer { padding: 48px 0; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .marquee-track, .grad-text, .eyebrow .dot { animation: none; }
}
.muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
