/* ==========================================================================
   SERPHeroes — blog index + article styles
   Same tokens and editorial rhythm as the rest of the site.
   ========================================================================== */

.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;
}

/* ---------- Shared post meta ---------- */
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text-3);
}
.post-cat {
  font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--brand-600); background: color-mix(in srgb, var(--brand-500) 11%, transparent);
  padding: 4px 10px; border-radius: var(--r-full);
}
[data-theme="dark"] .post-cat { color: var(--brand-300); }
.dot-sep { opacity: .5; }

.post-excerpt { color: var(--text-3); font-size: 15px; line-height: 1.7; margin-top: 12px; max-width: 62ch; }
.post-more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: var(--brand-600);
  transition: gap .2s var(--ease);
}
[data-theme="dark"] .post-more { color: var(--brand-300); }

/* ---------- Motif artwork ---------- */
.motif { width: 100%; height: 100%; display: block; }
.post-lead__art, .post-row__art, .teaser__art {
  display: block; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(120% 120% at 15% 10%, color-mix(in srgb, var(--brand-400) 13%, transparent), transparent 60%),
    var(--bg-inset);
  transition: background-color .3s var(--ease);
}
[data-theme="dark"] .post-lead__art,
[data-theme="dark"] .post-row__art,
[data-theme="dark"] .teaser__art { background: var(--surface-2, var(--bg-inset)); }

/* ---------- Featured post ---------- */
.post-lead {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 52px); align-items: center;
  padding-bottom: clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--border);
}
.post-lead__art { aspect-ratio: 4 / 3; padding: clamp(18px, 3vw, 34px); }
.post-lead__body { display: block; }
.post-flag {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 14px;
}
.post-lead h2 {
  font-size: clamp(25px, 3.4vw, 38px); line-height: 1.16; margin-top: 14px;
  transition: color .2s var(--ease);
}
.post-lead:hover h2 { color: var(--brand-600); }
.post-lead:hover .post-more { gap: 13px; }
.post-lead .post-excerpt { font-size: 16px; }

@media (max-width: 860px) {
  .post-lead { grid-template-columns: 1fr; }
  .post-lead__art { aspect-ratio: 16 / 9; }
}

/* ---------- Toolbar ---------- */
.blog-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  padding-block: clamp(26px, 4vw, 40px);
}

/* ---------- Post rows ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li + li { border-top: 1px solid var(--border); }

.post-row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 32px;
  gap: clamp(20px, 3vw, 36px); align-items: center;
  padding-block: clamp(26px, 3.5vw, 36px);
}
.post-row__art { aspect-ratio: 5 / 4; padding: 16px; }
.post-row h3 {
  font-size: clamp(18px, 2.1vw, 22px); line-height: 1.25; margin-top: 12px;
  transition: color .2s var(--ease);
}
.post-row:hover h3 { color: var(--brand-600); }
.post-row__go {
  color: var(--text-3); opacity: 0; transform: translateX(-6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), color .25s;
}
.post-row:hover .post-row__go { opacity: 1; transform: none; color: var(--brand-500); }
.post-row .post-excerpt { margin-top: 10px; font-size: 14.5px; }

@media (max-width: 760px) {
  .post-row { grid-template-columns: 116px minmax(0, 1fr); gap: 18px; align-items: start; }
  .post-row__go { display: none; }
  .post-row h3 { font-size: 17.5px; }
  .post-row .post-excerpt { display: none; }
}
@media (max-width: 420px) {
  .post-row { grid-template-columns: 88px minmax(0, 1fr); }
  .post-row .post-meta { font-size: 11.5px; gap: 7px; }
}

/* ---------- Teaser grid (homepage + related) ---------- */
.teasers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(18px, 3vw, 30px); }
.teaser { display: block; }
.teaser__art { aspect-ratio: 16 / 10; padding: 18px; margin-bottom: 18px; }
.teaser h3 {
  font-size: 18.5px; line-height: 1.3; margin-top: 12px;
  transition: color .2s var(--ease);
}
.teaser:hover h3 { color: var(--brand-600); }
.teaser:hover .post-more { gap: 13px; }
.teaser .post-more { margin-top: 14px; font-size: 14px; }

/* ---------- Newsletter ---------- */
.newsletter {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(24px, 4vw, 48px); align-items: center;
}
@media (max-width: 820px) { .newsletter { grid-template-columns: 1fr; } }
.newsletter h2 { font-size: clamp(24px, 3.2vw, 34px); margin-top: 14px; }
.newsletter p { margin-top: 14px; color: var(--text-3); font-size: 16px; max-width: 48ch; }
.newsletter__form { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter__form input {
  flex: 1 1 220px; padding: 13px 16px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 15px;
}
.newsletter__form input:focus { border-color: var(--brand-500); }
.newsletter__form input.is-invalid { border-color: var(--neg); background: var(--neg-soft); }
.newsletter__form .form__status { flex: 1 0 100%; margin-top: 2px; }

/* ==========================================================================
   Article
   ========================================================================== */

.article__head { position: relative; padding-block: clamp(32px, 5vw, 60px) clamp(24px, 3vw, 36px); overflow: hidden; }
.article__head::before {
  content: ""; position: absolute; inset: -70% -10% auto -10%; height: 420px; z-index: -1;
  background: radial-gradient(42% 60% at 22% 40%, color-mix(in srgb, var(--brand-400) 17%, transparent), transparent 70%);
  filter: blur(8px);
}
.article__head .post-meta { margin-top: 22px; }
.article__head h1 {
  font-size: clamp(30px, 4.6vw, 50px); line-height: 1.1; margin-top: 18px; max-width: 20ch;
}
.article__lede {
  margin-top: 22px; font-size: clamp(17px, 2vw, 20px); line-height: 1.6;
  color: var(--text-2); max-width: 58ch;
}

.article__body {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(32px, 5vw, 64px); align-items: start;
  padding-block: clamp(28px, 4vw, 48px) clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--border);
}
@media (max-width: 940px) { .article__body { grid-template-columns: 1fr; } }

.article .prose { max-width: 68ch; }
.article .prose h2 { margin-top: 46px; }
.article .prose h3 { font-size: 18px; margin-top: 32px; }
.article .prose h3 + p { margin-top: 10px; }

.pullquote {
  margin: 40px 0; padding: 0 0 0 26px; border-left: 3px solid var(--brand-500);
  font-family: var(--font-display); font-weight: 700; font-style: normal;
  font-size: clamp(19px, 2.3vw, 24px); line-height: 1.4; letter-spacing: -.02em; color: var(--text);
}

/* Sticky in-article CTA */
.article__cta {
  position: sticky; top: calc(var(--header-h) + 22px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
@media (max-width: 940px) { .article__cta { position: static; } }
.article__cta h3 { font-size: 17px; }
.article__cta p { margin: 10px 0 18px; font-size: 14.5px; color: var(--text-3); }
.article__cta .btn { width: 100%; }

/* ---------- Photographic covers ----------
   Motifs are drawn inside the frame's padding; a photograph fills the frame
   instead, so the padding is dropped only on the cards that carry one. */
.post-lead__art:has(.cover),
.post-row__art:has(.cover),
.teaser__art:has(.cover) { padding: 0; background: var(--bg-inset); }

.cover {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform .55s var(--ease), filter .35s var(--ease);
}

/* Stock photography arrives at every saturation under the sun. Holding it
   slightly back stops six unrelated images from fighting each other, and the
   brand orange, down the blog index — full colour returns on hover. */
.post-lead__art .cover,
.post-row__art .cover,
.teaser__art .cover { filter: saturate(.82) contrast(1.03); }

.post-lead:hover .cover,
.post-row:hover .cover,
.teaser:hover .cover { transform: scale(1.045); filter: saturate(1) contrast(1.03); }

[data-theme="dark"] .post-lead__art .cover,
[data-theme="dark"] .post-row__art .cover,
[data-theme="dark"] .teaser__art .cover { filter: saturate(.8) contrast(1.02) brightness(.92); }

@media (prefers-reduced-motion: reduce) {
  .cover { transition: none; }
  .post-lead:hover .cover,
  .post-row:hover .cover,
  .teaser:hover .cover { transform: none; }
}

/* ---------- Article cover ----------
   The featured image sits on the article's own measure, not on its own wider
   one: same left edge and same width as the text column below it, so the page
   reads with a single vertical line rather than a banner floating over it.
   760px is the content column at full width (1180 wrap, less gutters, less the
   280px aside and its gap). */
.article__figure { margin: clamp(24px, 4vw, 40px) 0 0; }
.article__figure .wrap--wide {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
}
.article__figure .figure__img,
.article__figure .figure__cap { max-width: 760px; }

.figure__img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r-lg);
  background: var(--bg-inset);
}
[data-theme="dark"] .figure__img { filter: brightness(.94); }

.figure__credit {
  margin-top: 10px; text-align: right;
  font-size: 13px; color: var(--text-3);
}
.figure__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.figure__credit a:hover { color: var(--brand-500); }

/* ---------- In-article figures ----------
   The prose column is 70ch; figures break out a little so they read as
   punctuation between sections rather than as inline decoration. */
.prose-figure { margin: clamp(26px, 3.5vw, 38px) 0 0; }
@media (min-width: 900px) {
  .prose-figure { width: calc(100% + 96px); margin-left: -48px; }
}
.prose-figure .figure__img { aspect-ratio: 16 / 9; }

.figure__cap {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  align-items: baseline; justify-content: space-between;
  margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--text-3);
}
.figure__cap--credit-only { justify-content: flex-end; }
.figure__text { flex: 1 1 320px; }
.figure__credit { flex: 0 0 auto; font-size: 12.5px; opacity: .85; }
.figure__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.figure__credit a:hover { color: var(--brand-500); }

/* ---------- Extra prose components ---------- */
.prose h3 {
  font-size: clamp(16.5px, 1.8vw, 18px); margin-top: 26px;
  color: var(--text); letter-spacing: -.01em;
}

/* A data product's articles lean on small comparison tables; without this they
   inherit nothing and render as unstyled rows. */
.prose .table-scroll { overflow-x: auto; margin-top: 18px; }
.prose table {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  min-width: 460px;
}
.prose thead th {
  text-align: left; padding: 10px 12px; white-space: nowrap;
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-3); border-bottom: 1px solid var(--border-strong);
}
.prose tbody td {
  padding: 11px 12px; color: var(--text-2);
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody td:first-child { color: var(--text); font-weight: 600; }

/* One boxed takeaway per article — the sentence worth remembering. */
.takeaway {
  margin-top: 28px; padding: 18px 20px;
  border: 1px solid var(--border); border-left: 3px solid var(--brand-500);
  border-radius: var(--r-md, 12px); background: var(--bg-inset);
}
.takeaway p { margin-top: 0; }
.takeaway strong { display: block; margin-bottom: 6px; font-size: 12px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--brand-600); }
[data-theme="dark"] .takeaway { background: var(--surface-2, var(--bg-inset)); }
[data-theme="dark"] .takeaway strong { color: var(--brand-300); }

/* ---------- Article FAQ ----------
   Plain headings and paragraphs rather than <details>: the answers need to be
   in the rendered text for the FAQPage schema to be honest about what a reader
   actually sees, and collapsed answers hurt scanning more than they help. */
/* Named article-faq, not faq: style.css already owns .faq for the standalone
   /faq page, and blog.css loads after it — reusing the name would have quietly
   restyled that page. */
.article-faq { margin-top: clamp(30px, 4vw, 42px); padding-top: 26px; border-top: 1px solid var(--border); }
.article-faq > h2 { margin-top: 0; }
.faq__item { margin-top: 20px; }
.faq__item h3 {
  margin-top: 0; font-size: 16px; line-height: 1.45; color: var(--text);
  display: flex; gap: 9px; align-items: baseline;
}
.faq__item h3::before {
  content: "?"; flex: 0 0 auto;
  font-size: 12px; font-weight: 700; color: var(--brand-600);
  border: 1px solid var(--border-strong); border-radius: 999px;
  width: 19px; height: 19px; line-height: 17px; text-align: center;
}
[data-theme="dark"] .faq__item h3::before { color: var(--brand-300); }
.faq__item p { margin-top: 7px; padding-left: 28px; }
