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

/* ── Tokens ── */
:root {
  /* Brand (build-pack/style-guide.json aligned) */
  --brand-primary: #3a8d63;
  --brand-secondary: #e8f4ee;
  --brand-accent: #1a3d2f;
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #5eb88a;
  --accent-dim: #3a8d63;
  --link: #7dcea0;
  --max-w: 780px;
  --font-body: 'Source Sans 3', 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }

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

h1, h2, h3, .site-logo {
  font-family: var(--font-heading);
}

/* ── Site shell ── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  background: rgba(15,15,15,0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.site-nav-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__store {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.site-header__store:hover {
  color: var(--text);
}

.site-header__waitlist {
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--brand-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.15s, transform 0.15s;
}

.site-header__waitlist:hover {
  background: #2f7a54;
  color: #fff;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  max-width: 42rem;
  margin: 0 auto;
}

.site-footer__brand {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.site-footer__legal {
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

.site-footer__links a {
  color: var(--link);
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

/* ── Content wrapper ── */
.page-wrapper {
  max-width: calc(var(--max-w) + 4rem);
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ── Article prose ── */
.prose {
  max-width: var(--max-w);
}

.prose h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.prose h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #ccc;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

.prose p {
  margin-bottom: 1.25rem;
  color: #d4d4d4;
}

.prose a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(110,231,183,0.4);
  transition: text-decoration-color 0.15s;
}

.prose a:hover {
  text-decoration-color: var(--link);
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose li { margin-bottom: 0.4rem; color: #d4d4d4; }

.prose strong { color: #fff; font-weight: 600; }

.prose em { font-style: italic; color: #bbb; }

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 0 6px 6px 0;
  color: var(--text-muted);
  font-style: italic;
}

.prose blockquote p { margin-bottom: 0; color: var(--text-muted); }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

.prose pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: #d4d4d4;
}

/* ── Tables ── */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.prose th {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
  padding: 0.625rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.prose td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  color: #d4d4d4;
}

.prose tr:last-child td { border-bottom: none; }

.prose tr:hover td { background: rgba(255,255,255,0.02); }

/* ── HR ── */
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Article hero image ── */
.article-hero {
  width: 100%;
  max-width: var(--max-w);
  margin-bottom: 2rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-hero img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 420px;
  object-fit: cover;
}

/* ── Prose images ── */
.prose img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  display: block;
}

/* ── Article meta ── */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  background: rgba(110,231,183,0.1);
  color: var(--accent);
  border: 1px solid rgba(110,231,183,0.25);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.silo { background: rgba(255,255,255,0.05); color: var(--text-muted); border-color: var(--border); }

/* ── Homepage cards ── */
.silo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.silo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  display: block;
}

.silo-card:hover {
  border-color: rgba(110,231,183,0.4);
  background: var(--bg-card-hover);
}

.silo-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.silo-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.silo-card .count {
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 0.75rem;
  font-weight: 600;
}

/* ── Page list ── */
.page-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-list li {
  border-bottom: 1px solid var(--border);
}

.page-list a {
  display: block;
  padding: 0.875rem 0;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s;
}

.page-list a:hover { color: var(--accent); }

.page-list .keyword {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

/* ── Hero ── */
.hero {
  padding: 5rem 0 3rem;
  max-width: var(--max-w);
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 1.25rem;
}

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

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.65;
}

/* ── Blog homepage ── */
.home-hero {
  padding: 2rem 0 1.5rem;
  max-width: 40rem;
}

.home-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-primary);
  margin-bottom: 0.75rem;
}

.home-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1rem;
}

.home-hero__lede {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.waitlist-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(58, 141, 99, 0.2) 0%, rgba(26, 61, 47, 0.35) 100%);
  border: 1px solid rgba(58, 141, 99, 0.45);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.waitlist-banner:hover {
  border-color: var(--brand-primary);
  color: #fff;
}

.waitlist-banner__text strong {
  color: #b8e6cc;
}

.waitlist-banner__arrow {
  font-size: 1.25rem;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.home-intro {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

.silo-section {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.silo-section__head h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.silo-section__head p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.silo-section__count {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-primary);
}

.article-card-grid {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.125rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  height: 100%;
}

.article-card:hover {
  border-color: rgba(58, 141, 99, 0.5);
  background: var(--bg-card-hover);
}

.article-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

.article-card__kw {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.article-card__badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-primary);
  margin-top: 0.25rem;
}

/* ── Article waitlist CTA ── */
.waitlist-cta {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(58, 141, 99, 0.4);
  background: linear-gradient(180deg, rgba(26, 61, 47, 0.4) 0%, rgba(15, 15, 15, 0.9) 100%);
}

.waitlist-cta__inner {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
}

.waitlist-cta h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.waitlist-cta p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.waitlist-cta__btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #fff;
  background: var(--brand-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.waitlist-cta__btn:hover {
  background: #2f7a54;
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-header { padding: 1rem; }
  .site-nav { gap: 1rem; }
  .site-nav-wrap {
    width: 100%;
    justify-content: space-between;
  }
  .page-wrapper { padding: 2rem 1rem; }
  .prose h2 { font-size: 1.25rem; }
}
