:root {
  --bg: #0a0c10;
  --bg-elevated: #11151c;
  --card-bg: #161b24;
  --fg: #e6e8ec;
  --fg-dim: #9aa4b2;
  --accent: #4f9cf9;
  --accent-dim: #2d6bc7;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --purple: #bc8cff;
  --border: #21262d;
  --border-bright: #30363d;
  --radius: 12px;
  --mono: "SF Mono", "Fira Code", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .8; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 12, 16, .8);
  border-bottom: 1px solid var(--border);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
nav .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1rem; color: var(--fg);
}
nav .logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
nav ul { display: flex; gap: 28px; list-style: none; }
nav ul a { color: var(--fg-dim); font-size: .9rem; font-weight: 500; }
nav ul a:hover { color: var(--fg); opacity: 1; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; padding: 7px 16px;
  border-radius: 8px; font-size: .85rem; font-weight: 600;
  transition: background .15s;
}
.nav-cta:hover { background: var(--accent-dim); opacity: 1; }

/* ── Hero ────────────────────────────────────────── */
#hero {
  position: relative;
  padding: 140px 0 80px;
  text-align: center;
  overflow: hidden;
}
#hero::before {
  content: ""; position: absolute; top: -200px; left: 50%;
  transform: translateX(-50%); width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79, 156, 249, .15), transparent 70%);
  pointer-events: none;
}
.badge-top {
  display: inline-block; margin-bottom: 24px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(79, 156, 249, .12); border: 1px solid rgba(79, 156, 249, .3);
  font-size: .8rem; color: var(--accent); font-weight: 500;
}
#hero h1 {
  font-size: 3.2rem; font-weight: 800; letter-spacing: -.03em;
  margin-bottom: 20px; line-height: 1.1;
}
#hero h1 .grad {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
#hero .tagline {
  font-size: 1.25rem; color: var(--fg-dim); max-width: 640px;
  margin: 0 auto 36px;
}
.hero-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-bottom: 40px;
}
.hero-badges img { height: 24px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  transition: all .2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); }
.btn-ghost { background: var(--card-bg); color: var(--fg); border: 1px solid var(--border-bright); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Stats strip ─────────────────────────────────── */
.stats-strip {
  display: flex; justify-content: center; gap: 56px;
  padding: 40px 0; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--accent); font-family: var(--mono); }
.stat .label { font-size: .8rem; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .05em; }

/* ── Section heading ─────────────────────────────── */
section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .eyebrow {
  font-size: .8rem; color: var(--accent); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px;
}
.section-head h2 { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.section-head p { color: var(--fg-dim); margin-top: 12px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── Feature grid ────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent-dim); transform: translateY(-3px); }
.feature-card .icon { font-size: 1.6rem; margin-bottom: 14px; display: block; }
.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--fg-dim); font-size: .92rem; }
.feature-card code {
  font-family: var(--mono); font-size: .82rem; color: var(--purple);
  background: rgba(188, 140, 255, .1); padding: 2px 6px; border-radius: 4px;
}

/* ── Code block ──────────────────────────────────── */
.code-section { background: var(--bg-elevated); }
.code-tabs { display: flex; gap: 4px; margin-bottom: 0; flex-wrap: wrap; }
.code-tab {
  padding: 8px 18px; font-size: .85rem; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border-bright); border-bottom: none; border-radius: 8px 8px 0 0;
  background: var(--bg); color: var(--fg-dim); transition: all .15s;
}
.code-tab.active { background: var(--card-bg); color: var(--accent); border-color: var(--accent-dim); }
.code-block-wrap {
  background: var(--card-bg); border: 1px solid var(--accent-dim);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  overflow: hidden;
}
.code-block-wrap pre {
  padding: 24px 28px; overflow-x: auto; font-family: var(--mono);
  font-size: .85rem; line-height: 1.65;
}
.code-block-wrap pre code { color: #c9d1d9; }
.code-block-wrap .keyword { color: var(--purple); }
.code-block-wrap .string { color: #7ee787; }
.code-block-wrap .comment { color: #6e7681; font-style: italic; }
.code-block-wrap .func { color: var(--accent); }
.code-block-wrap .num { color: var(--yellow); }

/* ── Metric showcase ─────────────────────────────── */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.metric-item {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 10px;
  transition: border-color .15s;
}
.metric-item:hover { border-color: var(--accent-dim); }
.metric-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.metric-item code { font-family: var(--mono); font-size: .85rem; color: var(--accent); }
.metric-item .desc { font-size: .85rem; color: var(--fg-dim); margin-left: auto; }

/* ── Privacy table ───────────────────────────────── */
.privacy-wrap { overflow-x: auto; }
table.privacy { width: 100%; border-collapse: collapse; }
table.privacy th, table.privacy td {
  padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border);
}
table.privacy th { color: var(--fg-dim); font-weight: 500; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
table.privacy td { font-size: .9rem; }
table.privacy td:first-child { font-family: var(--mono); color: var(--accent); }
table.privacy td:nth-child(2) {
  font-family: var(--mono); color: var(--green); white-space: nowrap;
}
table.privacy tr:hover { background: rgba(79, 156, 249, .03); }

/* ── Architecture ────────────────────────────────── */
.arch-diagram {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; text-align: center;
  overflow-x: auto;
}
.arch-diagram pre {
  font-family: var(--mono); font-size: .78rem; line-height: 1.5;
  color: var(--fg-dim); text-align: left; display: inline-block;
}

/* ── CTA ─────────────────────────────────────────── */
#cta { text-align: center; padding: 100px 0; }
#cta h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -.02em; }
#cta p { color: var(--fg-dim); margin-bottom: 32px; }

/* ── Footer ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); padding: 40px 0;
  text-align: center; color: var(--fg-dim); font-size: .85rem;
}
footer .hashtags { margin-bottom: 12px; }
footer .hashtags span {
  display: inline-block; margin: 3px; padding: 4px 12px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; font-size: .78rem; color: var(--accent);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  #hero h1 { font-size: 2rem; }
  #hero .tagline { font-size: 1rem; }
  nav ul { display: none; }
  .stats-strip { gap: 28px; }
  .stat .num { font-size: 1.5rem; }
  section { padding: 56px 0; }
  .section-head h2 { font-size: 1.5rem; }
}
