/* ============================================================
   Blog & case studies: listing grids, cards and article prose.
   ============================================================ */

/* ---------- Index page hero backgrounds ---------- */
.page-hero--blog {
  background: var(--ground) url('../assets/blog-bg.jpg') center / cover no-repeat;
}
.page-hero--case-studies {
  background: var(--ground) url('../assets/case-studies-bg.png') center / cover no-repeat;
}
.page-hero__panel {
  padding: clamp(24px, 4vw, 36px) clamp(24px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid var(--green-deep);
  border-radius: var(--radius);
  box-shadow: var(--lift);
}

/* ---------- Listing grid ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .blog-grid { grid-template-columns: minmax(0, 1fr); }
}

.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.blog-card__cover {
  aspect-ratio: 16 / 9;
  background: var(--tint);
  overflow: hidden;
}
.blog-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; flex: 1; }
.blog-card__type {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-tint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold-deep);
  text-transform: uppercase;
}
.blog-card__date { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; color: var(--ink-mute); }
.blog-card h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; color: var(--ink); }
.blog-card:hover h3 { color: var(--green-deep); }
.blog-card p { margin: 0; font-size: 0.9688rem; line-height: 1.55; color: var(--ink-mute); }
.blog-card__meta { margin-top: auto; padding-top: 6px; font-size: 0.875rem; font-weight: 600; color: var(--green-deep); }

.blog-empty { padding: 32px 0; color: var(--ink-mute); font-size: 1.0625rem; }

/* ---------- Article page ---------- */
.article { padding-bottom: clamp(48px, 6vw, 80px); }
.article__hero { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(28px, 3vw, 40px); }
.article__breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-mute); }
.article__breadcrumb a { color: var(--green-deep); font-weight: 600; }
.article__breadcrumb span[aria-hidden] { color: var(--green-line); }
.article__hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; }
.article__excerpt { margin-top: 18px; max-width: 40rem; font-size: 1.1875rem; line-height: 1.55; color: var(--ink-mute); }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 22px; font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-mute); }
.article__meta .article__author { color: var(--green-deep); font-weight: 700; }
.article-tags { margin-top: 18px; }

.article__cover { margin: clamp(28px, 4vw, 44px) auto 0; max-width: 1040px; padding-inline: clamp(20px, 4vw, 40px); }
.article__cover img { width: 100%; border-radius: var(--radius); border: 2px solid var(--green-deep); display: block; }

.article__body { padding-top: clamp(36px, 5vw, 52px); font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.article__body h2 { margin: 1.8em 0 0.6em; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.2; color: var(--green-deep); }
.article__body h3 { margin: 1.5em 0 0.5em; font-size: 1.25rem; line-height: 1.3; }
.article__body p { margin: 0 0 1.1em; }
.article__body ul, .article__body ol { display: grid; gap: 8px; margin: 0 0 1.2em; padding-left: 1.4em; }
.article__body li { position: relative; padding-left: 0.2em; }
.article__body ul li { padding-left: 1.2em; }
.article__body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-deep);
}
.article__body ol { list-style: none; counter-reset: ol-item; }
.article__body ol li { padding-left: 1.4em; }
.article__body ol li::before {
  content: counter(ol-item) '.';
  counter-increment: ol-item;
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--green-deep);
}
.article__body a { color: var(--green-deep); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article__body a:hover { text-decoration-color: var(--green-deep); }
.article__body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); color: var(--ink-mute); font-style: italic; }
.article__body code { padding: 2px 6px; border-radius: 4px; background: var(--tint); font-family: var(--font-mono); font-size: 0.9em; }
.article__body pre { margin: 0 0 1.2em; padding: 16px 18px; overflow-x: auto; border-radius: var(--radius-sm); background: var(--ink); }
.article__body pre code { padding: 0; background: none; color: #fff; }
.article__body img { max-width: 100%; border-radius: var(--radius-sm); }
.article__body figure { margin: 1.6em 0; }
.article__body figure img, .article__body figure video, .article__body figure table { width: 100%; margin: 0; }
.article__body figcaption { margin-top: 8px; font-size: 0.9375rem; color: var(--ink-mute); text-align: center; }
.article__body video, .article__body iframe { display: block; width: 100%; margin: 1.6em 0; border-radius: var(--radius-sm); border: 2px solid var(--green-deep); background: #000; }
.article__body iframe { aspect-ratio: 16 / 9; height: auto; }
.article__body hr { margin: 2em 0; border: 0; border-top: 1px solid var(--green-line); }

.article__body table {
  width: 100%;
  margin: 0 0 1.4em;
  border-collapse: collapse;
  font-size: 0.9688rem;
  overflow-x: auto;
  display: block;
}
.article__body table thead, .article__body table tbody { display: table; width: 100%; table-layout: fixed; }
.article__body thead tr { background: var(--green-deep); }
.article__body th { padding: 12px 16px; border: 1px solid var(--green-deep); text-align: left; font-size: 0.875rem; font-weight: 700; color: #fff; }
.article__body td { padding: 12px 16px; border: 1px solid var(--green-line); vertical-align: top; color: var(--ink); }
.article__body tbody tr:nth-child(even) { background: var(--tint); }

.article__back { padding-top: clamp(28px, 4vw, 40px); }

/* ---------- Case study meta & results ---------- */
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: clamp(24px, 4vw, 36px);
  padding: 20px 22px;
}
.case-meta dt { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-mute); }
.case-meta dd { margin: 4px 0 0; font-size: 1.0625rem; font-weight: 700; color: var(--green-deep); }

.case-results { padding-block: clamp(28px, 4vw, 44px); background: var(--tint); border-block: 1px solid var(--green-line); }
.case-results__inner { max-width: 860px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.case-results h2 { margin: 0 0 18px; font-size: 1.375rem; }
.case-results ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.case-results li { position: relative; padding-left: 26px; font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.case-results li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
