:root {
  --bg: #0b0d14;
  --panel: #12151f;
  --panel-2: #171b27;
  --line: rgba(255, 255, 255, .08);
  --text: #e8eaf2;
  --muted: #8b91a7;
  --primary: #7d8cff;
  --primary-2: #a78bfa;
  --mint: #7df9c4;
  --heavy: #ff6b7d;
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
code { font-family: var(--mono); font-size: .9em; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.glow { position: fixed; z-index: -1; border-radius: 50%; filter: blur(110px); opacity: .5; pointer-events: none; }
.glow-a { width: 620px; height: 620px; background: #3b46c4; top: -220px; right: -160px; }
.glow-b { width: 520px; height: 520px; background: #5b2a9e; bottom: -260px; left: -200px; opacity: .35; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 18px 24px;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -.01em; }
.links { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--text); }
.links .nav-cta { color: var(--text); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }

main { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center;
  min-height: calc(100vh - 80px); padding: 40px 0 80px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--muted); background: rgba(255,255,255,.02);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
h1 { font-size: clamp(38px, 4.9vw, 66px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 24px; font-weight: 800; }
.shine {
  background: linear-gradient(100deg, var(--primary) 0%, #c4b5fd 35%, var(--mint) 60%, var(--primary) 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 8s linear infinite;
}
@keyframes shine { to { background-position: 220% center; } }
.lede { font-size: 18px; color: var(--muted); max-width: 540px; margin: 0 0 34px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 12px;
  font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn.primary {
  background: linear-gradient(135deg, #8b98ff, #6b5cf6); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(110, 100, 255, .65), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(110, 100, 255, .8), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.ghost { border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.btn.ghost:hover { background: rgba(255,255,255,.07); }
.btn.big { padding: 17px 30px; font-size: 17px; }
.fine { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* Hero art: the app window */
.hero-art { position: relative; perspective: 1400px; }
.window {
  position: relative; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #151925, #10131c);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(125,140,255,.08), 0 0 80px -20px rgba(125,140,255,.35);
  transform: rotateY(-9deg) rotateX(4deg);
  animation: float 9s ease-in-out infinite;
}
@keyframes float { 50% { transform: rotateY(-6deg) rotateX(2deg) translateY(-10px); } }
.titlebar { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #0e1119; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; font-size: 12px; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 7px; color: var(--muted); }
.tab.active { background: #1b2030; color: var(--text); }
.tab.add { padding: 5px 8px; }
.ti { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid currentColor; }
.wctl { display: flex; gap: 14px; padding-right: 6px; }
.wctl b { width: 10px; height: 2px; background: var(--muted); opacity: .6; }
.body { padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 14px; min-height: 340px; }
.msg { font-size: 13.5px; }
.msg.user { align-self: flex-end; max-width: 80%; background: #222842; padding: 10px 14px; border-radius: 12px 12px 4px 12px; }
.msg.agent p { margin: 0 0 12px; min-height: 1.6em; }
.typed::after { content: "▍"; color: var(--primary); animation: blink 1s steps(1) infinite; margin-left: 1px; }
.typed.done::after { content: ""; }
@keyframes blink { 50% { opacity: 0; } }
.tool {
  display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 12px;
  background: #0d1017; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; color: var(--muted);
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s;
}
.tool.show { opacity: 1; transform: none; }
.tool code { color: var(--text); }
.tool em { font-style: normal; margin-left: auto; font-family: var(--mono); font-size: 11.5px; }
.tool em + em { margin-left: 0; }
.tool .add { color: var(--mint); }
.tool .del { color: var(--heavy); }
.ok { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgba(125,140,255,.25); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px;
  background: #121623; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--muted);
}
.pill { margin-left: auto; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(125,140,255,.12); color: var(--primary); }
.send { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #0b0d14; font-weight: 700; }

.float {
  position: absolute; padding: 14px 16px; border-radius: 14px;
  background: rgba(20, 24, 36, .82); border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(14px); box-shadow: 0 20px 50px -20px rgba(0,0,0,.8);
}
.mem { left: -38px; bottom: -34px; width: 190px; animation: bob 7s ease-in-out infinite; }
.float-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.float-head b { color: var(--mint); font-weight: 600; }
.mem-num { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.mem-num small { font-size: 14px; color: var(--muted); margin-left: 4px; font-weight: 600; }
.spark { width: 100%; height: 34px; display: block; }
.fps { right: -24px; top: -26px; display: flex; align-items: center; gap: 12px; animation: bob 8s ease-in-out -3s infinite; }
.fps b { display: block; font-size: 15px; }
.fps small { color: var(--muted); font-size: 11.5px; }
.fps-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.fps-ring circle { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 4; }
.fps-ring .arc { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 113; stroke-dashoffset: 113; animation: ring 2.4s ease-out forwards .6s; }
@keyframes ring { to { stroke-dashoffset: 8; } }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Sections */
section { padding: 90px 0; }
h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 16px; font-weight: 800; }
.muted { color: var(--muted); }
.section-lede { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 44px; }

/* Numbers */
.compare { padding: 32px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); border: 1px solid var(--line); }
.bar-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 20px; padding: 12px 0; }
.bar-label { color: var(--muted); font-size: 15px; }
.bar-row.win .bar-label b { color: var(--text); font-size: 17px; }
.bar-track { height: 44px; border-radius: 12px; background: rgba(255,255,255,.03); position: relative; }
.bar {
  height: 100%; width: 0; border-radius: 12px; position: relative;
  transition: width 1.6s cubic-bezier(.2,.8,.2,1);
}
.compare.in .bar { width: var(--w); }
.bar span { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.bar.heavy span { left: auto; right: 14px; color: #fff; font-weight: 500; }
.bar.heavy { background: repeating-linear-gradient(135deg, #ff6b7d 0 10px, #f2576b 10px 20px); box-shadow: 0 0 40px -10px rgba(255,107,125,.6); }
.bar.heavy.alt { background: repeating-linear-gradient(135deg, #ff9f6b 0 10px, #f08a55 10px 20px); box-shadow: 0 0 40px -10px rgba(255,159,107,.5); }
.bar.light { min-width: 8px; background: linear-gradient(90deg, var(--mint), #5ee0ff); box-shadow: 0 0 30px rgba(125,249,196,.6); }
.bar.light span { color: var(--mint); font-weight: 600; font-size: 16px; }
.footnote { font-size: 12.5px; color: var(--muted); margin: 20px 0 0; opacity: .8; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.stat { padding: 26px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.stat b { display: block; font-size: 40px; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat > span { color: var(--muted); font-size: 14px; }

/* Features */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.card {
  position: relative; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.008)); overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(125,140,255,.14), transparent 40%);
}
.card:hover { transform: translateY(-3px); border-color: rgba(125,140,255,.3); }
.card:hover::before { opacity: 1; }
.card h3 { margin: 18px 0 8px; font-size: 18px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(125,140,255,.12); color: var(--primary); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Download */
.policy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.policy article { padding: 26px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); border: 1px solid var(--line); }
.policy h3 { margin: 0 0 12px; font-size: 18px; letter-spacing: -.01em; }
.policy ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.policy li + li { margin-top: 8px; }
.policy a { color: var(--text); }
.privacy .fine { margin-top: 20px; }
.download { display: flex; justify-content: center; }
.dl-card {
  width: 100%; max-width: 720px; text-align: center; padding: 56px 32px; border-radius: 28px;
  border: 1px solid rgba(125,140,255,.25);
  background: radial-gradient(600px circle at 50% 0%, rgba(125,140,255,.18), transparent 60%), rgba(18,21,31,.7);
  box-shadow: 0 0 120px -40px rgba(125,140,255,.6);
}
.dl-card .section-lede { margin: 0 auto 30px; }
.dl-logo { filter: drop-shadow(0 10px 30px rgba(125,140,255,.5)); margin-bottom: 14px; }
.caret { animation: blink 1.1s steps(1) infinite; }
.others { margin-top: 26px; font-size: 14px; color: var(--muted); }
.others summary { cursor: pointer; list-style: none; display: inline-block; padding: 6px 12px; border-radius: 8px; }
.others summary::-webkit-details-marker { display: none; }
.others summary::after { content: " ▾"; }
.others[open] summary::after { content: " ▴"; }
.others summary:hover { color: var(--text); background: rgba(255,255,255,.04); }
.others ul { list-style: none; padding: 0; margin: 14px auto 0; max-width: 460px; text-align: left; }
.others li a {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 10px;
  text-decoration: none; color: var(--text); border: 1px solid transparent;
}
.others li a:hover { border-color: var(--line); background: rgba(255,255,255,.03); }
.others li small { color: var(--muted); font-family: var(--mono); font-size: 12px; }

.foot {
  max-width: 1200px; margin: 0 auto; padding: 40px 24px 60px; display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line);
}
.foot a { color: var(--muted); }

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

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 30px; }
  .hero-art { margin: 20px 18px 40px; }
  .window { transform: none; animation: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr 1fr; }
  .policy { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .links a:not(.nav-cta) { display: none; }
  main { padding: 0 16px; }
  .nav { padding: 14px 16px; }
  .grid, .stats { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 8px; }
  .compare { padding: 22px 18px; }
  .mem { left: -10px; bottom: -40px; width: 160px; }
  .fps { right: -8px; top: -34px; }
  .pill { display: none; }
  h1 { font-size: 36px; }
  .bar.light span { left: calc(100% + 10px); }
  section { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .compare .bar { width: var(--w); }
  .tool { opacity: 1; transform: none; }
}
