:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --dark: #090d16;
  --accent: #059669;
  --accent-dark: #047857;
  --accent-soft: #ecfdf5;
  --warn-bg: #fffbeb;
  --warn-ink: #92400e;
  --crit-bg: #fef2f2;
  --crit-ink: #991b1b;
}

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

a { color: inherit; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* Hero */
.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at top right, #d1fae5 0%, rgba(248, 250, 252, 0) 45%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 820px;
}
.hero-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* Terminal demo strip */
.cmd-strip {
  margin-top: 28px;
  background: var(--dark);
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.cmd-strip code { color: #34d399; }

/* Sections */
.section { padding: 60px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}
.section-sub { margin: 0 0 28px; color: var(--muted); max-width: 680px; }

/* Interactive Demo Box */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.demo-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
label.field-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
input.text-input, textarea.code-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: #f8fafc;
  color: var(--ink);
}
textarea.code-input { min-height: 220px; resize: vertical; }
.score-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.demo-checks { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.mini-check {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--border);
}
.tag-pass { background: var(--accent-soft); color: #065f46; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.tag-fail { background: var(--crit-bg); color: var(--crit-ink); font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.tag-warn { background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; padding: 2px 8px; border-radius: 999px; font-size: 11px; }

.preview-tabs { display: flex; gap: 8px; margin-top: 16px; margin-bottom: 8px; }
.preview-tab {
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.preview-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.preview-code {
  margin: 0;
  background: var(--dark);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  overflow-x: auto;
  max-height: 220px;
}

/* 6 Pillars */
.pillar-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.pillar-cards article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.pillar-weight {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.pillar-cards h3 { margin: 0 0 8px; font-size: 17px; }
.pillar-cards p { margin: 0; font-size: 14px; color: var(--muted); }

/* Comparison Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr.highlight-row td { background: #ecfdf5; font-weight: 700; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.price-card.featured {
  border: 2px solid var(--accent);
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.08);
}
.tier-name { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-dark); }
.price-amount { font-size: 40px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -0.03em; }
.price-note { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.feature-list { padding-left: 18px; margin: 0 0 22px; font-size: 14px; color: var(--ink); }
.feature-list li { margin-bottom: 8px; }

/* FAQ */
.faq-list { display: grid; gap: 12px; max-width: 860px; }
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
}
summary { font-weight: 700; cursor: pointer; list-style: none; }
details p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--surface);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--border);
}
.modal-box h3 { margin: 0 0 10px; }
.modal-box p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }

footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }

@media (max-width: 860px) {
  .demo-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
