:root {
  --bg: #070b14;
  --bg-card: #0f1629;
  --bg-elevated: #151f38;
  --text: #e8edf7;
  --text-muted: #8b9ab8;
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --accent-warm: #f59e0b;
  --border: rgba(148, 163, 184, 0.14);
  --gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 55%, #8b5cf6 100%);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --max: 1160px;
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.82);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); text-decoration: none; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.lang-switch button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.15s, background 0.15s;
}

.lang-switch button:hover { color: var(--text); }

.lang-switch button.active {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: rgba(59, 130, 246, 0.5); }

/* Hero */
.hero {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.18), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p.lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.stat span { color: var(--text-muted); font-size: 0.85rem; }

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-card h3 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }

.risk-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin: 12px 0 20px;
}

.risk-meter span {
  display: block;
  height: 100%;
  width: 78%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #f59e0b, #ef4444);
}

.signal-list { list-style: none; }
.signal-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.signal-list li:last-child { border-bottom: none; }
.signal-list .tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.tag-ok { background: rgba(34,197,94,0.15); color: #4ade80; }
.tag-warn { background: rgba(245,158,11,0.15); color: #fbbf24; }
.tag-bad { background: rgba(239,68,68,0.15); color: #f87171; }

/* Sections */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-head p { color: var(--text-muted); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.92rem; }

.highlight-card {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(6,182,212,0.08));
  border-color: rgba(59, 130, 246, 0.3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

/* Architecture */
.arch-flow {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.arch-step {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  position: relative;
}

.arch-step::after {
  content: "→";
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.arch-step:last-child::after { display: none; }

.arch-step strong { display: block; margin-bottom: 6px; font-size: 0.95rem; }
.arch-step span { color: var(--text-muted); font-size: 0.82rem; }

/* Use cases */
.use-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.use-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}

.use-card h3 { margin-bottom: 10px; }
.use-card p { color: var(--text-muted); font-size: 0.92rem; }
.use-card ul { margin-top: 12px; padding-left: 18px; color: var(--text-muted); font-size: 0.88rem; }

/* Download */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.download-card .platform {
  font-size: 2rem;
  margin-bottom: 12px;
}

.download-card h3 { margin-bottom: 8px; }
.download-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.download-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; }

/* CTA */
.cta {
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.1));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 72px 24px;
}

.cta h2 { font-size: 1.8rem; margin-bottom: 12px; }
.cta p { color: var(--text-muted); margin-bottom: 24px; }

/* Footer */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer h4 { font-size: 0.85rem; margin-bottom: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text-muted); font-size: 0.9rem; }
.footer a:hover { color: var(--text); }
.footer-bottom { color: var(--text-muted); font-size: 0.82rem; padding-top: 24px; border-top: 1px solid var(--border); }

/* Docs */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 40px 0 80px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 88px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.docs-sidebar h4 { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 16px 0 8px; }
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-decoration: none;
}
.docs-sidebar a:hover, .docs-sidebar a.active {
  background: rgba(59,130,246,0.12);
  color: var(--text);
}

.docs-content h1 { font-size: 2rem; margin-bottom: 8px; }
.docs-content .subtitle { color: var(--text-muted); margin-bottom: 32px; }
.docs-content h2 { font-size: 1.35rem; margin: 40px 0 14px; padding-top: 8px; border-top: 1px solid var(--border); }
.docs-content h2:first-of-type { border-top: none; margin-top: 0; }
.docs-content h3 { font-size: 1.05rem; margin: 24px 0 10px; }
.docs-content p, .docs-content li { color: #c5d0e6; font-size: 0.95rem; }
.docs-content ul, .docs-content ol { margin: 12px 0 12px 22px; }
.docs-content li { margin-bottom: 6px; }

pre {
  background: #0a0f1c;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 0.84rem;
  line-height: 1.55;
}

code { font-family: "SF Mono", "Fira Code", Consolas, monospace; }
p code, li code {
  background: rgba(59,130,246,0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.86em;
}

.table-wrap { overflow-x: auto; margin: 16px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
th { background: var(--bg-elevated); color: var(--text-muted); font-weight: 600; }
td { color: #c5d0e6; }

.callout {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130, 246, 0.25);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .hero-grid, .features-grid, .highlight-card, .footer-grid, .docs-layout, .download-grid, .use-grid {
    grid-template-columns: 1fr;
  }
  .highlight-card { grid-column: span 1; }
  .nav-links { display: none; }
  .arch-step::after { display: none; }
}
