/* ============================================================
   Answer Engine Consulting — Global Styles (Dark Theme)
   ============================================================ */

:root {
  --bg:            hsl(225, 25%, 5%);
  --bg-nav:        hsl(225, 25%, 5%, 0.85);
  --fg:            hsl(220, 20%, 94%);
  --muted:         hsl(225, 12%, 55%);
  --border:        hsl(225, 20%, 16%);
  --brand-from:    #7c3aed;
  --brand-to:      #2563eb;
  --radius:        6px;
  --font-mono:     'Fira Code', 'Cascadia Code', 'Courier New', monospace;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.5em;
  color: var(--fg);
}
h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.25rem, 3vw, 1.65rem); margin-top: 2rem; }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.25rem); margin-top: 1.5rem; }

p  { margin-bottom: 1.25rem; }
a  { color: #818cf8; text-decoration: underline; }
a:hover { color: #a5b4fc; }

ul, ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
li     { margin-bottom: 0.4rem; }
strong { font-weight: 600; }

blockquote {
  border-left: 3px solid var(--brand-from);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: hsl(225, 25%, 9%);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: hsl(225, 25%, 10%);
  border: 1px solid var(--border);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: #a5b4fc;
}

pre {
  background: hsl(225, 25%, 8%);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
pre code { background: none; border: none; padding: 0; color: var(--fg); }

hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
th, td { border: 1px solid var(--border); padding: 0.65rem 0.875rem; text-align: left; }
th { background: hsl(225, 25%, 9%); font-weight: 600; color: var(--fg); }
tr:nth-child(even) td { background: hsl(225, 25%, 7%); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* ── Navbar ───────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img { height: 28px; width: auto; border-radius: 4px; }
.nav-logo-full {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.nav-logo-short {
  display: none;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fg);
}

.nav-links-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--fg); }

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.375rem 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  color: #fff;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { opacity: 0.88; color: #fff; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.375rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.nav-mobile {
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: hsl(225, 25%, 5%, 0.95);
}
.nav-cta-mobile { text-align: center; padding: 0.5rem 1rem; }

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 5rem 1.5rem 3rem; /* 5rem top = clears fixed nav */
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
}

.content { width: 100%; }

/* ── Article content classes from React source ────────────── */
.hero { margin-bottom: 2rem; }
.answer-summary {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.page-meta { font-size: 0.8rem; font-family: var(--font-mono); color: var(--muted); margin-top: 0.5rem; }
.depth-section, .supporting-questions, .tradeoffs, .authority, .faqs { margin-top: 2.5rem; }
.key-concept, .qa-block, .faq {
  background: hsl(225, 25%, 8%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.case-study {
  background: hsl(250, 30%, 10%);
  border: 1px solid hsl(250, 30%, 20%);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.pros, .cons { margin-bottom: 1rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted);
  margin: 0;
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-link {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-link:hover { color: var(--fg); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links-desktop { display: none; }
  .nav-hamburger     { display: block; }
  .nav-logo-full     { display: none; }
  .nav-logo-short    { display: inline; }
  .footer-container  { flex-direction: column; text-align: center; }
  .footer-links      { justify-content: center; }
}
