:root {
  --bg:         #0a0a0f;
  --bg2:        #0f0f17;
  --surface:    #13131d;
  --surface2:   #1a1a28;
  --border:     #1e1e2e;
  --border2:    #2a2a3e;
  --text:       #e2e2f0;
  --muted:      #7070a0;
  --muted2:     #50508a;
  --accent:     #6366f1;
  --accent-h:   #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --radius:     10px;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, backdrop-filter 0.2s;
}
.nav.scrolled {
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.12s, background 0.12s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
}
.nav-btn-ghost:hover { color: var(--text); background: var(--surface); }
.nav-btn-primary {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s, transform 0.1s;
}
.nav-btn-primary:hover { background: var(--accent-h); }
.nav-btn-primary:active { transform: scale(0.975); }

.nav-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.12s;
}
.nav-user-chip:hover { border-color: var(--accent); }
.nav-user-chip img { border-radius: 50%; background: var(--surface2); }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 100px 28px 72px;
  text-align: center;
  overflow: hidden;
}
/* subtle radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 400px;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 32px;
}

.hero-h1 {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 24px;
  background: linear-gradient(160deg, #fff 30%, rgba(200, 200, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto 36px;
}
.hero-p code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--accent-h);
  padding: 1px 7px;
  border-radius: 5px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s, transform 0.1s, box-shadow 0.12s;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
}
.cta-primary:hover {
  background: var(--accent-h);
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35);
}
.cta-primary:active { transform: scale(0.975); }
.cta-center { display: flex; justify-content: center; width: fit-content; margin: 28px auto 0; }

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.cta-secondary:hover { color: var(--text); border-color: var(--border2); background: var(--surface); }

.hero-providers {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hero-providers-or {
  font-size: 13px;
  color: var(--muted2);
}
.hero-provider-list { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.provider-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s, border-color 0.12s;
}
.provider-btn:hover { background: var(--surface2); border-color: var(--accent); }
.provider-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Preview ─────────────────────────────────────── */
.preview-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px 80px;
}
.preview-frame {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.06),
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.35);
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.preview-dots { display: flex; gap: 6px; align-items: center; }
.preview-dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.preview-bar-label {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted2);
  letter-spacing: 0.03em;
}

.preview-tabs {
  flex: 1;
  display: flex;
  gap: 0;
}
.preview-tab {
  height: 42px;
  padding: 0 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s;
}
.preview-tab:hover { color: var(--text); }
.preview-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.preview-theme-select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  height: 28px;
  padding: 0 26px 0 10px;
  border-radius: 7px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%237070a0' stroke-width='1.4'><path d='m2 4 3 3 3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: right 7px center;
  transition: border-color 0.12s;
}
.preview-theme-select:hover { border-color: var(--accent); }
.preview-theme-select option { background: var(--surface); }

.preview-body {
  position: relative;
  height: 600px;
  background: #fff;
}
.preview-view {
  width: 100%;
  height: 100%;
}
.preview-view[hidden] { display: none; }
.preview-view iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.preview-yaml-view {
  background: var(--bg);
  overflow: auto;
  scrollbar-color: var(--border2) transparent;
  scrollbar-width: thin;
}
.preview-yaml-view::-webkit-scrollbar { width: 8px; }
.preview-yaml-view::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
#demo-yaml-pre {
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre;
  tab-size: 2;
}
.hl-comment { color: var(--muted2); }
.hl-key     { color: #818cf8; }
.hl-str     { color: #86efac; }
.preview-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: opacity 0.2s;
}
.preview-spinner[hidden] { display: none; }
.spinner {
  width: 26px;
  height: 26px;
  border: 2px solid #e0e0e8;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Features ────────────────────────────────────── */
.features-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px 80px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px;
  transition: border-color 0.15s, transform 0.15s;
}
.feat:hover { border-color: rgba(99, 102, 241, 0.45); transform: translateY(-2px); }
.feat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-h);
  margin-bottom: 16px;
}
.feat-icon svg { width: 18px; height: 18px; }
.feat h3 {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  color: var(--text);
}
.feat p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ── How / Code ──────────────────────────────────── */
.how-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 28px 100px;
  text-align: center;
}
.how-h2 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--text);
}
.code-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.code-bar-label {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted2);
  letter-spacing: 0.04em;
}
.code-body {
  display: block;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}
.code-body .p  { color: var(--accent-h); user-select: none; }
.code-body .op { color: var(--muted); }
.code-body .c  { color: var(--muted2); }

/* ── Roadmap / Coming soon ───────────────────────── */
.roadmap-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px 100px;
}
.roadmap-header {
  text-align: center;
  margin-bottom: 48px;
}
.roadmap-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(99,102,241,0.12);
  color: var(--accent-h);
  border: 1px solid rgba(99,102,241,0.25);
  margin-bottom: 16px;
}
.roadmap-h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 12px;
}
.roadmap-p {
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.roadmap-item {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 22px;
  transition: border-color 0.15s;
}
.roadmap-item:hover { border-color: rgba(99,102,241,0.35); }
.roadmap-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}
.roadmap-icon svg { width: 17px; height: 17px; }
.roadmap-icon-free { background: rgba(16,126,62,0.14); color: #2dbe77; }
.roadmap-icon-pro  { background: rgba(99,102,241,0.12); color: var(--accent-h); }
.roadmap-text { flex: 1; min-width: 0; }
.roadmap-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tag-free { background: rgba(16,126,62,0.14); color: #2dbe77; }
.tag-pro  { background: rgba(99,102,241,0.12); color: var(--accent-h); }
.roadmap-text h4 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}
.roadmap-text p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.roadmap-text p code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent-h);
}
.roadmap-cta { text-align: center; }

/* ── Footer ──────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-note {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted2);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.1s; }
.footer-links a:hover { color: var(--text); }

.footer-credits {
  border-top: 1px solid var(--border);
  padding: 20px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-credits-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}
.footer-credits-libs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.footer-credits-libs a {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.footer-credits-libs a:hover {
  color: var(--accent-h);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .hero { padding: 72px 20px 56px; }
  .preview-section, .features-section, .how-section { padding-left: 20px; padding-right: 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .roadmap-item { flex-direction: column; gap: 12px; }
  .preview-body { height: 420px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-note { text-align: center; }
}
