/* ── PowDB Site — Dark Developer Theme ── */

:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-raised: #1c2128;
  --bg-code: #1a1f2b;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --accent: #58a6ff;
  --accent-glow: rgba(88, 166, 255, 0.15);
  --accent-warm: #f0883e;
  --green: #3fb950;
  --border: #30363d;
  --radius: 8px;
  --max-width: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

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

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

/* ── Navigation ── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-brand span { color: var(--accent); }

.nav-links { display: flex; gap: 24px; align-items: center; }

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent); }

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Layout ── */

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

section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

section:last-child { border-bottom: none; }

/* ── Hero ── */

.hero {
  text-align: center;
  padding: 100px 0 80px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 .highlight { color: var(--accent); }

.hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover {
  background: #79c0ff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  text-decoration: none;
}

/* ── Install block ── */

.install-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-top: 32px;
  color: var(--text);
}

.install-block .prompt { color: var(--green); }

/* ── Benchmark Table ── */

.bench-section h2,
.compare-section h2,
.features-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.05rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

td { font-family: var(--font-mono); font-size: 0.85rem; }

.speedup {
  color: var(--green);
  font-weight: 700;
}

tr:hover { background: var(--bg-surface); }

/* ── Side-by-side Compare ── */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.compare-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-card-header {
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.compare-card-header.powql { color: var(--accent); }
.compare-card-header.sql { color: var(--accent-warm); }

.compare-card pre {
  margin: 0;
  padding: 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.compare-example {
  margin-bottom: 24px;
}

.compare-example:last-child { margin-bottom: 0; }

.compare-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

/* ── Feature Cards ── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.15s;
}

.feature-card:hover {
  border-color: var(--accent);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Code Blocks ── */

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 16px 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

:not(pre) > code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ── Content Pages ── */

.content {
  padding: 60px 0 80px;
}

.content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}

.content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.content p {
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.7;
}

.content ul, .content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.content .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Step blocks for tutorial */
.step {
  margin: 40px 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #0d1117;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
  margin-right: 12px;
}

.output {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 8px 0 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}

/* Cheat sheet table */
.cheat-table {
  margin-top: 24px;
}

.cheat-table td:first-child { color: var(--text-muted); font-weight: 500; font-family: var(--font-sans); }
.cheat-table td:nth-child(2) { color: var(--accent); }
.cheat-table td:nth-child(3) { color: var(--accent-warm); }

/* ── Footer ── */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

/* ── Responsive ── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero { padding: 60px 0 40px; }
  .hero h1 { font-size: 1.75rem; }

  .compare-grid { grid-template-columns: 1fr; }

  section { padding: 48px 0; }

  th, td { padding: 8px 10px; font-size: 0.8rem; }

  .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .install-block { font-size: 0.8rem; padding: 10px 16px; }
  .hero-actions { flex-direction: column; align-items: center; }
}
