:root {
  --bg: #05060a;
  --bg-2: #090b14;
  --ink: #eaf0ff;
  --muted: #93a0c2;
  --muted-2: #5f6b8c;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.03);
  --violet: #7c5cff;
  --indigo: #4f46e5;
  --cyan: #22d3ee;
  --pink: #ec4899;
  --grad: linear-gradient(100deg, #a78bfa 0%, #7c5cff 35%, #22d3ee 100%);
  --maxw: 1160px;
  --r: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}
h1, h2, h3, .brand { font-family: "Space Grotesk", "Inter", sans-serif; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
sup { font-size: 0.5em; color: var(--violet); vertical-align: super; margin-left: 2px; }
em { font-style: normal; color: var(--ink); }

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- ambient background ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5;
}
.bg-orbs span:nth-child(1) { width: 620px; height: 620px; left: -180px; top: -160px; background: radial-gradient(circle, rgba(124,92,255,.55), transparent 65%); }
.bg-orbs span:nth-child(2) { width: 560px; height: 560px; right: -160px; top: 8%; background: radial-gradient(circle, rgba(34,211,238,.35), transparent 65%); }
.bg-orbs span:nth-child(3) { width: 720px; height: 720px; left: 30%; bottom: -320px; background: radial-gradient(circle, rgba(236,72,153,.28), transparent 65%); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px clamp(18px, 4vw, 44px);
  background: rgba(6, 8, 14, 0.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px; background: var(--grad);
  box-shadow: 0 0 22px rgba(124, 92, 255, 0.7); display: inline-block;
}
.nav-links { display: flex; gap: 30px; font-size: 14.5px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-lg { padding: 14px 26px; font-size: 15.5px; border-radius: 14px; }
.btn-primary { background: var(--grad); color: #0a0a12; box-shadow: 0 8px 30px rgba(124, 92, 255, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(124, 92, 255, 0.5); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-2px); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.hero-inner {
  position: relative; z-index: 3; max-width: var(--maxw); margin: 0 auto;
  padding: 120px clamp(18px, 4vw, 44px) 60px; width: 100%;
}
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; color: var(--muted);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); margin-bottom: 26px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 { font-size: clamp(44px, 7.2vw, 92px); line-height: 1.02; font-weight: 700; margin-bottom: 24px; }
.lede { max-width: 620px; font-size: clamp(16px, 1.7vw, 20px); color: var(--muted); margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-strip { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-strip div { display: flex; flex-direction: column; }
.hero-strip b { font-family: "Space Grotesk"; font-size: 26px; color: var(--ink); }
.hero-strip span { font-size: 13.5px; color: var(--muted-2); }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; }
.scroll-hint span { display: block; width: 22px; height: 36px; border: 1.5px solid var(--line); border-radius: 12px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; top: 7px; left: 50%; width: 3px; height: 7px; background: var(--muted); border-radius: 2px; transform: translateX(-50%); animation: scroll 1.8s infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- sections ---------- */
.section { position: relative; z-index: 3; max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 10vw, 130px) clamp(18px, 4vw, 44px); }
.context { position: relative; z-index: 3; text-align: center; padding: 40px 20px; color: var(--muted-2); font-size: 14.5px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.context em { color: var(--muted); }
.section-head { max-width: 720px; margin-bottom: 54px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 700; line-height: 1.08; margin-bottom: 16px; }
.section-head p { font-size: clamp(15px, 1.6vw, 19px); color: var(--muted); }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; overflow: hidden;
  padding: 30px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, 0.4); background: rgba(124, 92, 255, 0.04); }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }
.card-lg { grid-column: span 1; grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(160deg, rgba(124,92,255,.09), rgba(34,211,238,.04)); }
.card-wide { grid-column: span 2; }
.card-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; top: -80px; right: -60px; background: radial-gradient(circle, rgba(124,92,255,.4), transparent 65%); filter: blur(40px); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.chips span { font-family: ui-monospace, "SF Mono", monospace; font-size: 12.5px; padding: 5px 11px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--cyan); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 30px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.step-n { font-family: "Space Grotesk"; font-size: 15px; color: var(--violet); letter-spacing: .1em; }
.step h3 { font-size: 22px; margin: 12px 0 8px; }
.step p { color: var(--muted); font-size: 15px; }
.step code, .card code { font-family: ui-monospace, monospace; font-size: .9em; color: var(--cyan); background: rgba(34,211,238,.08); padding: 1px 6px; border-radius: 5px; }

/* ---------- split / code ---------- */
.section-split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 54px; align-items: center; }
.split-copy h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; line-height: 1.08; margin-bottom: 18px; }
.split-copy > p { color: var(--muted); font-size: 17px; margin-bottom: 22px; }
.ticks { list-style: none; margin: 0 0 28px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 5px; background: var(--grad); box-shadow: 0 0 14px rgba(124,92,255,.5); }

.code-wrap { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, #0c0f1a, #080a12); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.code-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.code-head i { width: 12px; height: 12px; border-radius: 50%; background: #2a3350; display: inline-block; }
.code-head i:nth-child(1){ background:#ff5f57; } .code-head i:nth-child(2){ background:#febc2e; } .code-head i:nth-child(3){ background:#28c840; }
.code-head span { margin-left: auto; font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--muted-2); }
.code { padding: 24px; overflow-x: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; line-height: 1.75; color: #c9d3ef; }
.code .k { color: #c792ea; } .code .s { color: #7ee0a6; } .code .fn { color: #82aaff; } .code .c { color: #5f6b8c; font-style: italic; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { padding: 34px 26px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); text-align: left; }
.stat b { display: block; font-family: "Space Grotesk"; font-size: clamp(38px, 5vw, 58px); font-weight: 700; line-height: 1; margin-bottom: 12px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 14.5px; }

/* ---------- cta ---------- */
.cta { position: relative; z-index: 3; padding: 40px clamp(18px, 4vw, 44px) 90px; max-width: var(--maxw); margin: 0 auto; }
.cta-card {
  text-align: center; padding: clamp(50px, 8vw, 90px) 30px; border-radius: 28px;
  border: 1px solid rgba(124,92,255,.3);
  background: radial-gradient(120% 140% at 50% 0%, rgba(124,92,255,.16), rgba(34,211,238,.05) 55%, transparent);
  overflow: hidden;
}
.cta-card h2 { font-size: clamp(30px, 4.6vw, 56px); font-weight: 700; margin-bottom: 14px; line-height: 1.06; }
.cta-card p { color: var(--muted); font-size: 18px; margin-bottom: 30px; }
.cta-card .hero-actions { justify-content: center; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 3; border-top: 1px solid var(--line); padding: 40px clamp(18px, 4vw, 44px); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .brand { font-size: 17px; }
.footer p { color: var(--muted-2); font-size: 13.5px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .bento, .steps, .stats { grid-template-columns: 1fr 1fr; }
  .card-lg, .card-wide { grid-column: span 2; grid-row: auto; }
  .section-split { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .bento, .steps, .stats { grid-template-columns: 1fr; }
  .card-lg, .card-wide { grid-column: span 1; }
  .nav-cta .btn-ghost { display: none; }
  .hero-strip { gap: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span::after, .pill .dot { animation: none; }
}
