/* DepletionIQ blog styles.
   Layered on top of /css/site.css — reuses the same tokens, nav, buttons
   and footer so the blog reads as part of the site, not a bolt-on. */

/* ---------- Shared post card (homepage + blog index) ---------- */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 760px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
  border-color: var(--oak-15);
}
.post-card:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.post-card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #F5F1E8 0%, #E9E5DA 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.post-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .post-card-media img { transform: scale(1.035); }

.post-card-body {
  padding: 24px 24px 26px;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
}
.post-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.post-meta .cat { color: var(--amber); }
.post-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: .45;
  display: inline-block; flex: 0 0 auto;
}

.post-card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700; letter-spacing: -0.02em;
  font-size: 1.2rem; line-height: 1.28;
  margin: 0; color: var(--ink-2);
}
.post-card-snippet {
  margin: 0;
  font-size: 0.95rem; line-height: 1.55;
  color: var(--oak-55);
}
.post-card-more {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.875rem; font-weight: 600;
  color: var(--amber);
}
.post-card-more svg { width: 15px; height: 15px; transition: transform .25s ease; }
.post-card:hover .post-card-more svg { transform: translateX(3px); }

/* ---------- Homepage "Field notes" section ---------- */
.blog-teaser-head {
  display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 44px;
}
.blog-teaser-head .section-head { margin-bottom: 0; }

/* ---------- Blog index ---------- */
.blog-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--line);
}
.blog-hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 18px;
}
.blog-hero h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700; letter-spacing: -0.035em;
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  line-height: 1.03; margin: 0 0 20px;
  color: var(--ink-2); max-width: 20ch;
}
.blog-hero p {
  font-size: 1.125rem; line-height: 1.6;
  color: var(--oak-55); margin: 0; max-width: 62ch;
}
.blog-index-body { padding: 64px 0 104px; }
.blog-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 72px 24px;
  text-align: center;
  color: var(--oak-55);
}

/* ---------- Article ---------- */
.article-head { padding: 64px 0 0; }
.breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--amber); }

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

.article-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700; letter-spacing: -0.032em;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08; margin: 0 0 22px;
  color: var(--ink-2);
}
.article-standfirst {
  font-size: 1.1875rem; line-height: 1.6;
  color: var(--oak-55); margin: 0 0 28px;
}
.article-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-bottom: 32px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}

.article-hero {
  margin: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.article-hero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }

/* Long-form body copy — measured for sustained reading on a laptop. */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--ink);
  padding-bottom: 24px;
}
.article-body > *:first-child { margin-top: 0; }
.article-body h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700; letter-spacing: -0.022em;
  font-size: 1.5rem; line-height: 1.24;
  color: var(--ink-2);
  margin: 52px 0 16px;
  padding-top: 4px;
}
.article-body h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 650; letter-spacing: -0.015em;
  font-size: 1.15rem; line-height: 1.3;
  color: var(--ink-2);
  margin: 36px 0 12px;
}
.article-body p { margin: 0 0 22px; }
.article-body strong { color: var(--ink-2); font-weight: 650; }
.article-body a { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(180,83,9,0.3); }
.article-body a:hover { border-bottom-color: var(--amber); }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 24px; }
.article-body li { margin-bottom: 10px; }
.article-body li::marker { color: var(--amber); }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 44px 0; }
.article-body blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--amber);
  color: var(--ink-2);
  font-size: 1.125rem;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.875em;
  background: var(--ink-08);
  padding: 2px 6px; border-radius: 4px;
  color: var(--ink-2);
}
.article-body pre {
  background: var(--oak); color: #FAF7F2;
  padding: 20px 22px; border-radius: 8px;
  overflow-x: auto; margin: 0 0 24px;
}
.article-body pre code { background: none; color: inherit; padding: 0; }
.article-body img {
  width: 100%; border: 1px solid var(--line);
  border-radius: 8px; margin: 32px 0;
}

/* Tables carry a lot of the argument in these posts — keep them legible. */
.article-table-wrap { overflow-x: auto; margin: 0 0 28px; }
.article-body table {
  width: 100%; border-collapse: collapse;
  font-size: 0.9375rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article-body thead th {
  background: #F5F1E8;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-weight: 650; font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.article-body tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.article-body tbody tr:last-child td { border-bottom: 0; }

/* ---------- Sources ---------- */
.article-sources {
  margin: 8px 0 0;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FCFBF8;
}
.article-sources h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.article-sources ol { margin: 0; padding-left: 20px; }
.article-sources li { margin-bottom: 10px; font-size: 0.875rem; line-height: 1.5; color: var(--oak-55); }
.article-sources a { color: var(--amber); text-decoration: none; }
.article-sources a:hover { text-decoration: underline; }

/* ---------- End-of-article CTA ---------- */
.article-cta {
  margin: 56px 0 0;
  padding: 40px 40px 44px;
  border-radius: 12px;
  background: var(--oak);
  color: #FAF7F2;
  text-align: center;
}
.article-cta h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 700; letter-spacing: -0.025em;
  font-size: clamp(1.4rem, 2.4vw, 1.875rem);
  line-height: 1.15; margin: 0 0 14px; color: #FAF7F2;
}
.article-cta p {
  margin: 0 auto 26px;
  max-width: 52ch;
  font-size: 1.0625rem; line-height: 1.6;
  color: rgba(250,247,242,0.72);
}
@media (max-width: 640px) {
  .article-cta { padding: 32px 24px 36px; }
  .article-sources { padding: 24px 20px; }
}

/* ---------- More posts ---------- */
.more-posts { padding: 88px 0 104px; border-top: 1px solid var(--line); margin-top: 88px; }
.more-posts-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700; letter-spacing: -0.02em;
  font-size: 1.5rem; margin: 0 0 32px; color: var(--ink-2);
}
