:root {
  --bg: #0b1220;
  --bg-2: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-2: #38bdf8;
  --accent-dark: #0284c7;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.container { width: 92%; max-width: var(--max-width); margin: 0 auto; }

header.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,18,32,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-2);
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.logo svg { width: 28px; height: 28px; }
nav.primary { display: flex; gap: 24px; }
nav.primary a { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
nav.primary a:hover { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius); font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(14,165,233,0.35); }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary { background: var(--panel-2); color: var(--text); border-color: var(--panel-2); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--panel-2); }

.hero {
  padding: 100px 0 80px;
  background: radial-gradient(ellipse at top, rgba(14,165,233,0.12), transparent 60%), var(--bg);
  text-align: center;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin: 0 0 18px; letter-spacing: -0.02em; }
.hero .subtitle { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--muted); max-width: 680px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.install-block {
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius);
  padding: 16px 20px; display: inline-flex; align-items: center; gap: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem; color: var(--text); box-shadow: var(--shadow);
}
.install-block button {
  background: var(--panel-2); border: 1px solid var(--panel-2); color: var(--text);
  padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
}
.install-block button:hover { background: var(--accent); border-color: var(--accent); }

section { padding: 80px 0; }
section.alt { background: var(--bg-2); }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 2rem; margin: 0 0 10px; }
.section-title p { color: var(--muted); max-width: 640px; margin: 0 auto; }

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.feature-card {
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius); padding: 24px;
  transition: transform .15s, border-color .15s;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.feature-card .icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(14,165,233,0.12); display: grid; place-items: center; margin-bottom: 16px; color: var(--accent); font-size: 1.25rem; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.arch-diagram {
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius); padding: 28px 20px; max-width: 600px; margin: 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95rem;
}
.arch-layer {
  background: var(--panel-2); border: 1px solid #334155; border-radius: 8px; padding: 10px 14px; margin: 8px 0; text-align: center; position: relative;
}
.arch-layer::after {
  content: "↓"; display: block; color: var(--accent); text-align: center; margin-top: 6px; font-size: 0.8rem;
}
.arch-layer:last-child::after { display: none; }
.arch-layer.app { border-color: var(--accent); color: var(--accent-2); }

.screenshots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}
.screenshot {
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius); overflow: hidden;
}
.shot-header { background: var(--panel-2); padding: 10px 14px; font-size: 0.85rem; color: var(--muted); }
.shot-body { height: 180px; background: linear-gradient(135deg, #0f172a, #1e293b); display: grid; place-items: center; color: var(--muted); font-size: 0.9rem; }

.download-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;
}
.download-card {
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.download-card h3 { margin: 0; }
.download-card p { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1; }
.download-card .meta { font-size: 0.8rem; color: var(--muted); }
.download-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.quick-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px;
}
.quick-step {
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius); padding: 22px;
}
.quick-step h3 { margin: 0 0 10px; color: var(--accent-2); }
.quick-step pre {
  background: var(--bg); border: 1px solid var(--panel-2); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 0.85rem; color: var(--text);
}

.doc-list { columns: 2; column-gap: 32px; }
.doc-list a { display: block; padding: 8px 0; border-bottom: 1px solid var(--panel-2); }

footer.site {
  background: var(--panel); border-top: 1px solid var(--panel-2); padding: 40px 0 30px; color: var(--muted); font-size: 0.9rem;
}
footer.site .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer.site nav { display: flex; gap: 18px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--panel-2); color: var(--muted); }

@media (max-width: 800px) {
  nav.primary { display: none; }
  .doc-list { columns: 1; }
}

/* Light theme via class */
body.light {
  --bg: #f8fafc; --bg-2: #f1f5f9; --panel: #ffffff; --panel-2: #e2e8f0;
  --text: #0f172a; --muted: #64748b; --accent: #0284c7; --accent-2: #0ea5e9;
}
body.light header.site { background: rgba(248,250,252,0.85); }
body.light .install-block, body.light .feature-card, body.light .arch-diagram,
body.light .screenshot, body.light .download-card, body.light .quick-step { box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
