:root {
  --ink: #e6edf5;
  --muted: #8b98a9;
  --line: #243041;
  --paper: #0b0f14;
  --surface: #121923;
  --raised: #182231;
  --teal: #38d6c4;
  --forest: #1fa89a;
  --coral: #ff8a6b;
  --violet: #8b7bff;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
code { background: var(--raised); padding: 1px 6px; border-radius: 6px; font-size: .85em; color: var(--coral); }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 15% 5%, rgba(56, 214, 196, .16), transparent 70%),
    radial-gradient(700px 500px at 90% 20%, rgba(139, 123, 255, .13), transparent 70%),
    radial-gradient(600px 500px at 50% 100%, rgba(255, 138, 107, .08), transparent 70%);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px clamp(16px, 5vw, 56px);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(11, 15, 20, .82); backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), var(--forest)); color: #07211e; font-weight: 800; font-size: .9rem;
  box-shadow: 0 0 22px rgba(56, 214, 196, .45);
}
.nav-links { display: flex; gap: 26px; color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s; cursor: pointer;
}
.btn-sm { padding: 8px 18px; font-size: .9rem; }
.btn-primary { background: linear-gradient(135deg, var(--teal), var(--forest)); color: #06211e; box-shadow: 0 8px 28px rgba(56, 214, 196, .3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(56, 214, 196, .5); }
.btn-ghost { border-color: var(--line); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { border-color: var(--teal); transform: translateY(-2px); }

/* Hero */
.hero { text-align: center; padding: clamp(40px, 8vw, 90px) clamp(16px, 5vw, 56px) 40px; max-width: 1000px; margin: 0 auto; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .85rem; margin-bottom: 22px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(56, 214, 196, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(56, 214, 196, 0); } 100% { box-shadow: 0 0 0 0 rgba(56, 214, 196, 0); } }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.15; letter-spacing: -.025em; }
.grad {
  background: linear-gradient(100deg, var(--teal), var(--violet), var(--coral), var(--teal)); background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 250% center; } }
.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); max-width: 720px; margin: 22px auto 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Chat demo */
.chat-demo {
  margin: 56px auto 0; max-width: 760px; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow), 0 0 80px rgba(56, 214, 196, .08); overflow: hidden;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.demo-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--raised); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.demo-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a475a; }
.demo-bar i:nth-child(1) { background: #ff6b6b; } .demo-bar i:nth-child(2) { background: #ffd166; } .demo-bar i:nth-child(3) { background: #38d6c4; }
.demo-bar span { margin-left: 10px; }
.demo-body { padding: 22px; min-height: 120px; display: grid; gap: 14px; }
.bubble { padding: 12px 16px; border-radius: 14px; max-width: 92%; }
.bubble.user { justify-self: end; background: linear-gradient(135deg, var(--forest), #177a70); min-height: 1.6em; }
.bubble.user.typing::after { content: "|"; animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.bubble.bot { background: var(--raised); border: 1px solid var(--line); width: 100%; animation: rise .6s var(--ease); }
.bubble[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.sql { font-family: Consolas, monospace; font-size: .8rem; color: var(--muted); margin-bottom: 8px; overflow-wrap: anywhere; }
.sql .k { color: var(--teal); }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; max-width: 1000px; margin: 40px auto;
  background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.stats div { background: var(--surface); padding: 26px 20px; text-align: center; }
.stats b { display: block; font-size: 2.4rem; color: var(--teal); letter-spacing: -.03em; }
.stats span { color: var(--muted); font-size: .88rem; }

/* Sections */
.section { max-width: 1180px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) clamp(16px, 5vw, 56px) 0; text-align: center; }
.eyebrow { color: var(--teal); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; margin-bottom: 10px; }
.sub { color: var(--muted); max-width: 640px; margin: 14px auto 0; }
.steps, .grid { display: grid; gap: 20px; margin-top: 44px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); text-align: left; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  position: relative; background: linear-gradient(160deg, var(--surface), var(--raised)); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.card:hover { border-color: var(--teal); box-shadow: 0 14px 44px rgba(56, 214, 196, .12); }
.card h3 { margin: 10px 0 8px; font-size: 1.2rem; }
.card p { color: var(--muted); font-size: .95rem; }
.num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-weight: 800;
  background: rgba(56, 214, 196, .12); color: var(--teal); border: 1px solid rgba(56, 214, 196, .35);
}
.ico { font-size: 1.8rem; }

/* Pin board */
.board { margin-top: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow), 0 0 90px rgba(139, 123, 255, .08); text-align: left; }
.board-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tabs { display: flex; gap: 6px; background: var(--paper); padding: 5px; border-radius: 12px; border: 1px solid var(--line); }
.tab { background: none; border: 0; color: var(--muted); padding: 8px 16px; border-radius: 8px; cursor: pointer; font: inherit; font-size: .9rem; transition: .2s; }
.tab.active { background: var(--raised); color: var(--teal); box-shadow: inset 0 0 0 1px rgba(56, 214, 196, .35); }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .82rem; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; animation: pulse 2s infinite; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--raised); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; animation: rise .5s var(--ease) backwards; }
.kpi small { color: var(--muted); display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.kpi b { font-size: 1.6rem; letter-spacing: -.02em; }
.kpi em { font-style: normal; font-size: .8rem; margin-left: 8px; color: #3ddc84; }
.kpi em.down { color: var(--coral); }
.board-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pin {
  margin: 0; background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0;
  transition: transform .3s var(--ease), border-color .3s; animation: rise .6s var(--ease) backwards;
}
.pin:hover { transform: translateY(-4px) rotate(-.3deg); border-color: var(--teal); }
.pin.wide { grid-column: span 2; }
.pin figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.pin figcaption em { font-style: normal; font-weight: 500; font-size: .7rem; color: var(--muted); border: 1px solid var(--line); padding: 1px 9px; border-radius: 999px; align-self: flex-start; }
.chart { width: 100%; height: 260px; }
.chart.h220 { height: 220px; }

/* CTA */
.cta {
  max-width: 1000px; margin: clamp(60px, 9vw, 110px) auto 0; padding: clamp(36px, 6vw, 72px) 24px; text-align: center;
  border: 1px solid var(--line); border-radius: 28px; background:
    radial-gradient(500px 260px at 50% 0, rgba(56, 214, 196, .18), transparent 70%), var(--surface);
}
.cta p { color: var(--muted); margin: 14px 0 28px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 40px clamp(16px, 5vw, 56px); margin-top: 60px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .board-grid { grid-template-columns: 1fr; }
  .pin.wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
