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

:root {
  --bg: #0a0b0d;
  --bg-2: #111318;
  --bg-3: #181b22;
  --border: #1e222e;
  --text: #e2e4ea;
  --text-muted: #7b8190;
  --accent: #5b8af0;
  --accent-dim: #1e2d4a;
  --green: #3ecf8e;
  --yellow: #f5c842;
  --red: #f06060;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 8px;
  --max-w: 1080px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--font-mono); font-size: 0.875em; }

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

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 13, 0.85);
  backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-header nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.site-header nav a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .88; text-decoration: none; }

.btn-outline {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.btn-ghost {
  display: inline-block;
  padding: 10px 22px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.btn-ghost:hover { color: var(--text); text-decoration: none; }

/* ── Hero ── */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}
.badge {
  display: inline-block;
  margin-bottom: 24px;
  padding: 4px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: .03em;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #fff;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
}
.hero-sub code {
  color: var(--accent);
  background: var(--accent-dim);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Code block */
.code-block {
  max-width: 620px;
  margin: 0 auto 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}
.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red    { background: #f06060; }
.dot.yellow { background: #f5c842; }
.dot.green  { background: #3ecf8e; }
.code-title {
  margin-left: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.code-block pre {
  padding: 20px;
  background: var(--bg-2);
  overflow-x: auto;
}
.code-block code {
  font-size: 0.83rem;
  line-height: 1.7;
  color: var(--text);
}
.cmd { color: var(--accent); }
.out { color: var(--text-muted); }

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-star {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* ── Problem ── */
.problem {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.problem h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: #fff;
  margin-bottom: 40px;
  text-align: center;
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.problem-item {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.problem-item .icon { font-size: 1.1rem; flex-shrink: 0; color: var(--yellow); margin-top: 2px; }
.problem-conclusion {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Concepts ── */
.concepts {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.concepts h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 0.95rem;
}
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.concept-card {
  padding: 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.concept-kind {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 4px;
}
.concept-analog {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.concept-analog code { color: var(--text-muted); }
.concept-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.55;
}
.concept-yaml {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  overflow-x: auto;
}
.concept-yaml code {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ── How it works ── */
.how-it-works {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.how-it-works h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
  margin-bottom: 10px;
  text-align: center;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 680px;
  margin: 0 auto;
}
.step {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-top: 2px;
}
.step h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}
.step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.step p code {
  color: var(--accent);
  background: var(--accent-dim);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Feature highlight ── */
.feature-highlight {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.feature-highlight-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 680px) {
  .feature-highlight-inner { grid-template-columns: 1fr; gap: 32px; }
}
.feature-text h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
  margin-bottom: 16px;
}
.feature-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 12px;
}
.feature-code pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.yaml-key { color: var(--accent); }
.yaml-val { color: var(--green); }
.feature-endpoints {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.endpoint {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ep-path {
  font-size: 0.82rem;
  color: var(--green);
  white-space: nowrap;
}
.ep-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── CTA ── */
.cta-section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
  margin-bottom: 14px;
}
.cta-section p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
  font-size: 0.95rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-footer span {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.site-footer nav {
  display: flex;
  gap: 20px;
}
.site-footer nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.site-footer nav a:hover { color: var(--text); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 540px) {
  .site-header nav a:not(.btn-outline) { display: none; }
  .hero { padding: 64px 0 56px; }
  .concepts-grid { grid-template-columns: 1fr; }
}
