:root {
  --bg: #0b0e14;
  --bg-2: #11151f;
  --card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6e9ef;
  --muted: #9aa3b2;
  --brand: #6d8bff;
  --brand-2: #b06dff;
  --accent: #34e2b0;
  --radius: 16px;
  --max: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

code, pre, .brand-mark { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Background */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px; z-index: -1;
  background: radial-gradient(circle at 30% 30%, rgba(109,139,255,0.22), transparent 60%),
              radial-gradient(circle at 70% 40%, rgba(176,109,255,0.18), transparent 60%);
  filter: blur(40px);
}

/* Nav */
.nav {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 18px; font-weight: 700;
}
.brand-name { font-size: 18px; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block; border: none; cursor: pointer;
  padding: 12px 22px; border-radius: 10px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: transform .12s ease, box-shadow .2s ease, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 6px 24px rgba(109,139,255,0.35);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(109,139,255,0.5); }
.btn-ghost {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

/* Hero */
.hero { max-width: 860px; margin: 60px auto 0; padding: 0 24px; text-align: center; }
.badge {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(36px, 6vw, 62px); line-height: 1.05; font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 22px;
}
.grad {
  background: linear-gradient(110deg, var(--brand) 10%, var(--brand-2) 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 680px; margin: 0 auto 34px; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 56px;
}
.hero-stats > div {
  flex: 1 1 180px; max-width: 240px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.hero-stats strong { display: block; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats span { color: var(--muted); font-size: 14px; }

/* Sections */
section { max-width: var(--max); margin: 0 auto; padding: 96px 24px 0; }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em; text-align: center; }
.section-title.left { text-align: left; }
.section-sub { color: var(--muted); text-align: center; max-width: 620px; margin: 14px auto 0; font-size: 17px; }
.section-sub.left { text-align: left; margin-left: 0; }

/* Flow diagram */
.flow {
  margin-top: 48px; display: flex; align-items: stretch; justify-content: center;
  gap: 18px; flex-wrap: wrap;
}
.flow-node {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; min-width: 200px; display: flex; flex-direction: column; gap: 10px;
}
.node-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.node-in code { color: var(--accent); font-size: 14px; }
.node-router { border-color: rgba(109,139,255,0.4); box-shadow: 0 0 0 1px rgba(109,139,255,0.15), 0 10px 40px rgba(109,139,255,0.15); }
.node-router ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.node-router li { font-size: 14px; color: var(--text); padding-left: 18px; position: relative; }
.node-router li::before { content: '◆'; position: absolute; left: 0; color: var(--brand); font-size: 10px; top: 4px; }
.flow-arrow { display: grid; place-items: center; color: var(--muted); font-size: 26px; }
.flow-models { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: center; }
.model-chip {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 14px; font-weight: 500; text-align: center; white-space: nowrap;
}

/* Features grid */
.grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(109,139,255,0.4); }
.card-icon { font-size: 28px; margin-bottom: 14px; }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15px; }

/* Code section */
.code-section {
  margin-top: 96px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center;
}
.checklist { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.checklist li { color: var(--text); font-weight: 500; }
.checklist li::first-letter { color: var(--accent); }
.code-window {
  background: #0a0c12; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.code-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.code-bar span { width: 12px; height: 12px; border-radius: 50%; background: #2a2f3a; }
.code-bar span:nth-child(1) { background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }
.code-bar em { margin-left: auto; color: var(--muted); font-size: 13px; font-style: normal; font-family: 'JetBrains Mono', monospace; }
.code-window pre { padding: 22px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.code-window code { color: #c9d1e0; }
.code-window .c { color: #5c677d; font-style: italic; }
.code-window .k { color: #b06dff; }
.code-window .s { color: #34e2b0; }
.code-window .n { color: #f0b86e; }

/* CTA */
.cta { padding-top: 96px; }
.cta-box {
  background: linear-gradient(135deg, rgba(109,139,255,0.12), rgba(176,109,255,0.10));
  border: 1px solid rgba(109,139,255,0.3); border-radius: 24px;
  padding: 56px 32px; text-align: center;
}
.cta-box h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
.cta-box > p { color: var(--muted); font-size: 18px; margin: 12px 0 28px; }
.cta-form { display: flex; gap: 12px; justify-content: center; max-width: 480px; margin: 0 auto; flex-wrap: wrap; }
.cta-form input {
  flex: 1 1 240px; padding: 13px 18px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: 15px;
}
.cta-form input:focus { outline: none; border-color: var(--brand); }
.cta-note { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* Footer */
.footer {
  max-width: var(--max); margin: 96px auto 0; padding: 40px 24px;
  border-top: 1px solid var(--border); text-align: center; color: var(--muted);
}
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.footer p { font-size: 14px; }

/* Responsive */
@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .code-section { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .flow-arrow { transform: rotate(90deg); }
}
@media (max-width: 540px) {
  .grid { grid-template-columns: 1fr; }
  .hero { margin-top: 32px; }
  section { padding-top: 72px; }
}
