/* Palette: the live values come from src/_data/site.json -> "theme"
   (injected as an inline <style> in base.njk). These are fallbacks only. */
:root {
  --bg: #f8f8f2;
  --bg-rgb: 248,248,242;
  --bg-alt: #eef0e4;
  --card: #ffffff;
  --border: #dde2cf;
  --text: #1c2a1f;
  --text-muted: #5e6a5f;
  --accent: #3f6b3a;
  --accent-rgb: 63,107,58;
  --accent-2: #6f9a4f;
  --gold: #c8693a;
  --gold-rgb: 200,105,58;
  --radius: 14px;
}

* { 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, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; color: var(--text); }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--accent-rgb),.25); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-header { padding: 10px 20px; font-size: 14px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(var(--bg-rgb),.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  white-space: nowrap;
}
.logo .dot { color: var(--gold); }
.logo-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 600px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(var(--accent-rgb),.10), transparent 70%),
              radial-gradient(40% 40% at 80% 20%, rgba(var(--gold-rgb),.10), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: 18px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero-note { font-size: 13px; color: var(--text-muted); }

/* Stats */
.stats { padding: 50px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-number {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--text-muted); font-size: 14px; }

/* Section head */
.section-head { text-align: center; max-width: 600px; margin: 0 auto 40px; }
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section-head h2 { font-size: 30px; }

/* Category grid */
.categories { padding: 60px 0; background: var(--bg-alt); }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 22px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s ease, transform .15s ease;
  color: var(--text);
}
.category-card:hover { border-color: var(--accent); transform: translateY(-4px); text-decoration: none; }
.category-card img { width: 34px; height: 34px; }
.category-card .cat-name { font-weight: 600; font-size: 14px; }
.category-card .cat-count { color: var(--text-muted); font-size: 12px; }

/* Features */
.features { padding: 70px 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s ease, transform .15s ease;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 14px; }

/* Card grid (post listings) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s ease, transform .15s ease;
  color: var(--text);
}
.post-card:hover { border-color: var(--accent); transform: translateY(-4px); text-decoration: none; }
.post-card .pill { align-self: flex-start; }
.post-card h3 { font-size: 17px; line-height: 1.35; }
.post-card p { color: var(--text-muted); font-size: 14px; }
.post-card .post-date { color: var(--text-muted); font-size: 12px; margin-top: auto; }
.post-card-thumb {
  width: calc(100% + 48px);
  margin: -24px -24px 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

/* CTA band */
.cta-band {
  margin: 40px 0;
  padding: 60px 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.08), rgba(var(--gold-rgb),.08));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-band h2 { font-size: 28px; margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); margin-bottom: 26px; }

/* FAQ */
.faq { padding: 60px 0 90px; }
.faq-list { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
summary { cursor: pointer; font-weight: 600; font-size: 15px; }
details p { margin-top: 12px; color: var(--text-muted); font-size: 14px; }

/* Article / single post */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-muted); }
.article-header { max-width: 760px; margin: 0 auto 28px; }
.article-header h1 { font-size: 32px; margin: 14px 0 10px; }
.post-meta { color: var(--text-muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.post-hero-image {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 24px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}
.article-body { max-width: 760px; margin: 0 auto; font-size: 16px; }
.article-body h2 { font-size: 22px; margin: 32px 0 12px; }
.article-body p { margin-bottom: 16px; color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; }
.disclosure {
  max-width: 760px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.ad-slot {
  max-width: 760px;
  margin: 32px auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 12px;
}
.related { max-width: 760px; margin: 48px auto 0; }
.related h2 { font-size: 20px; margin-bottom: 16px; }

/* Search */
.search-page { max-width: 760px; margin: 0 auto; }
#search { margin-top: 20px; }

/* Comments */
.comments { max-width: 760px; margin: 48px auto 0; }

/* Page content */
.page-body { max-width: 760px; margin: 0 auto; font-size: 16px; }
.page-body h1 { font-size: 32px; margin-bottom: 20px; }
.page-body h2 { font-size: 20px; margin: 28px 0 10px; }
.page-body p { margin-bottom: 16px; }
.page-body ul { margin: 0 0 16px 22px; }

/* Footer */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 14px; }
.disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 800px;
}
.copyright { font-size: 12px; color: var(--text-muted); margin-top: 16px; }

/* Responsive */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
