/* a quiet counter — blog */

:root {
  --parchment:   #F9F7F2;
  --parchment-2: #F4F0E7;
  --linen:       #F3EBE0;
  --sage:        #537A4B;
  --sage-deep:   #3F5E39;
  --ink:         #1C1917;
  --ink-soft:    #2A2522;
  --pencil:      #6B6560;
  --pencil-2:    #978F86;
  --rule:        rgba(40, 30, 15, 0.10);
  --rule-strong: rgba(40, 30, 15, 0.20);
  --r-md: 16px;
  --r-lg: 24px;
  --maxw: 1180px;
  --article-max: 680px;
  --gutter: 20px;
  --shadow-md: 0 4px 14px rgba(40,30,15,0.08), 0 1px 2px rgba(40,30,15,0.05);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--parchment);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.10  0 0 0 0 0.06  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: var(--sage-deep); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.wordmark { font-family: 'Fraunces', Georgia, serif; font-weight: 500; }

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(249,247,242,0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}
.site-nav[data-scrolled="1"] { border-bottom-color: var(--rule); background: rgba(249,247,242,0.94); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand-link { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-link:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-name { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-link { font-size: 14px; color: var(--pencil); text-decoration: none; }
.nav-link:hover { color: var(--ink); text-decoration: none; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sage-deep); color: #FAFAF9;
  font-size: 14px; font-weight: 600; padding: 10px 18px;
  border-radius: 999px; text-decoration: none;
}
.btn-primary:hover { background: #344E2F; color: #FAFAF9; text-decoration: none; }

/* Blog index */
.blog-hero { padding: 48px 0 40px; }
.blog-hero h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.05; font-weight: 400; }
.blog-hero h1 em { font-style: italic; color: var(--sage-deep); }
.blog-hero-lead { margin-top: 14px; color: var(--pencil); font-size: 18px; max-width: 52ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage-deep);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.55; }

.article-grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding-bottom: 80px; }
@media (min-width: 640px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .article-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }

.article-card {
  display: flex; flex-direction: column;
  background: #FBF9F4; border: 1px solid var(--rule);
  border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.article-card:hover { border-color: rgba(63,94,57,0.3); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.article-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--linen); }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.article-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card-cat { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--pencil); }
.article-card-title { font-family: 'Fraunces', serif; font-size: 22px; line-height: 1.15; color: var(--ink); }
.article-card-excerpt { font-size: 15px; color: var(--pencil); line-height: 1.5; flex: 1; }
.article-card-meta { font-size: 13px; color: var(--pencil-2); margin-top: auto; }

/* Article page */
.article-page { padding: 40px 0 80px; }
.article-shell { max-width: var(--article-max); margin: 0 auto; }

.breadcrumbs { font-size: 13px; color: var(--pencil); margin-bottom: 28px; }
.breadcrumbs a { color: var(--pencil); text-decoration: none; }
.breadcrumbs a:hover { color: var(--sage-deep); text-decoration: underline; }

.article-header { margin-bottom: 32px; }
.article-header h1 { font-size: clamp(32px, 5.5vw, 48px); line-height: 1.08; font-weight: 400; margin-top: 14px; }
.article-deck { margin-top: 16px; font-size: 19px; color: var(--ink-soft); line-height: 1.5; }
.article-meta { margin-top: 18px; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pencil); }

.article-hero-img {
  margin: 0 0 36px; border-radius: var(--r-lg);
  overflow: hidden; border: 1px solid var(--rule); box-shadow: var(--shadow-md);
}
.article-hero-img img { width: 100%; aspect-ratio: 1206/2622; object-fit: cover; object-position: top center; max-height: 520px; }

.article-body h2 {
  font-size: clamp(24px, 3.5vw, 30px); line-height: 1.15;
  margin: 2.2em 0 0.75em; font-weight: 500;
}
.article-body h2:first-child { margin-top: 0; }
.article-body p { color: var(--ink-soft); }
.article-body ul, .article-body ol { margin: 0 0 1.15em; padding-left: 1.35em; color: var(--ink-soft); }
.article-body li { margin-bottom: 0.5em; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a { font-weight: 500; }

.article-figure { margin: 2em 0; }
.article-figure img { border-radius: var(--r-md); border: 1px solid var(--rule); }
.article-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--pencil); text-align: center; }

/* CTA block */
.article-cta {
  margin: 2.5em 0; padding: 28px 26px;
  background: var(--linen); border: 1px solid var(--rule);
  border-radius: var(--r-lg); text-align: center;
}
.article-cta h3 { font-size: 24px; margin-bottom: 10px; }
.article-cta p { color: var(--pencil); font-size: 15px; margin-bottom: 18px; }
.cta-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cta-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 20px; border-radius: 12px;
  background: var(--ink); color: #FAFAF9;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.cta-links a:hover { background: #2A2522; color: #FAFAF9; text-decoration: none; }
.cta-links a.secondary {
  background: transparent; color: var(--sage-deep);
  border: 1px solid var(--rule-strong);
}
.cta-links a.secondary:hover { background: rgba(83,122,75,0.08); }

/* Related */
.related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--rule); }
.related h2 { font-size: 22px; margin-bottom: 18px; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.related-list a { font-size: 16px; font-weight: 500; text-decoration: none; }
.related-list a:hover { text-decoration: underline; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 28px 0 36px; margin-top: 20px; }
.foot-inner { display: flex; flex-direction: column; gap: 16px; font-size: 13px; color: var(--pencil); }
@media (min-width: 700px) { .foot-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot-links a { color: var(--pencil); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
