/* Blog page family — shared between /blog (index) and /blog/[slug] (post).
   Card-specific styles live scoped in BlogCard.astro; this file holds the
   bits both pages need: the hero head, the byline/date meta row, and the
   markdown-body prose typography. Sizing mirrors cs.css's `.cs-prose`
   (18px/1.6 body, clamp(24,2.6vw,30) h2) so article copy reads consistently
   across case studies and blog posts.

   Rule order below is also specificity order (ascending) within each group,
   to keep biome's `noDescendingSpecificity` happy: single-class selectors
   like `.blog-takeaways li` come before combinator ones like
   `.blog-prose li + li` that could otherwise shadow them. */

.blog-head {
  padding-top: 80px;
  padding-bottom: 56px;
  text-align: center;
}
@media (max-width: 700px) {
  .blog-head {
    padding-top: 56px;
    padding-bottom: 32px;
  }
}
.blog-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 16px;
}
.blog-head h1 {
  margin: 0 auto;
  max-width: 32ch;
  font-size: clamp(40px, 5.2vw, 60px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
}
.blog-head p {
  margin: 18px auto 0;
  max-width: 52ch;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ── Post hero — full-bleed cover banner, dark scrim, white text ─────────
   Same technique as case studies' `.cs-hero` (image + linear scrim so text
   stays legible over any photo), with a centered editorial layout instead of
   cs-hero's bottom-anchored metrics. */
.blog-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
}
.blog-hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--blog-img);
  background-size: cover;
  background-position: var(--blog-pos, center);
}
.blog-hero-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 90% at 50% 0%,
    rgba(14, 16, 20, 0.35) 0%,
    rgba(14, 16, 20, 0.72) 60%,
    rgba(14, 16, 20, 0.88) 100%
  );
}
.blog-hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 64px;
  padding-bottom: 48px;
}
.blog-hero .blog-eyebrow {
  color: rgba(255, 255, 255, 0.68);
}
.blog-hero h1 {
  margin: 0 auto;
  max-width: 36ch;
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: inherit;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.blog-hero-subtitle {
  margin: 20px auto 0;
  max-width: 56ch;
  font-size: 19px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

/* Breadcrumb — visible nav mirroring the BreadcrumbList schema. */
.blog-crumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}
.blog-crumbs a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-crumbs a:hover {
  color: #fff;
}
.blog-crumbs [aria-current="page"] {
  color: rgba(255, 255, 255, 0.6);
  max-width: 36ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .blog-crumbs [aria-current="page"] {
    display: none;
  }
  .blog-crumbs span[aria-hidden]:has(+ [aria-current="page"]) {
    display: none;
  }
}

.blog-hero-byline {
  margin-top: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
}
.blog-hero-author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.blog-hero-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.blog-hero-author-meta {
  display: flex;
  flex-direction: column;
  font-size: 14.5px;
  line-height: 1.4;
}
.blog-hero-author-meta .name {
  font-weight: 600;
  color: #fff;
}
.blog-hero-author-meta .role {
  color: rgba(255, 255, 255, 0.68);
}
.blog-hero-author-meta .follow {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-hero-author-meta .follow:hover {
  color: #fff;
}
.blog-hero-published {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.68);
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .blog-hero-inner {
    padding-top: 44px;
    padding-bottom: 36px;
  }
  .blog-hero-byline {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .blog-hero-published {
    align-items: flex-start;
    text-align: left;
  }
}

/* Tag chips, shown in the light section right under the hero. */
.blog-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

/* Byline · date meta row — reused on the card and the post hero. */
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-subtle);
}
.blog-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--accent-mist);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Index: horizontal card list ─────────────────────────────────────── */
.blog-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.blog-list .blog-card {
  border-top: 1px solid var(--line);
}
.blog-list .blog-card:last-child {
  border-bottom: 1px solid var(--line);
}
.blog-empty {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 0;
  text-align: center;
}
.blog-empty h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.blog-empty p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
}

/* ── Key takeaways callout ────────────────────────────────────────────── */
/* The highest-leverage AEO element on the page — a concise, quotable answer
   near the top, the shape AI answer engines and featured snippets lift from. */
.blog-takeaways {
  margin: 0 0 36px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--paper-cool);
}
.blog-takeaways h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.blog-takeaways ul {
  margin: 0;
  padding: 0 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blog-takeaways li {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

/* ── Table of contents ────────────────────────────────────────────────── */
.blog-toc {
  margin: 0 0 36px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.blog-toc-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.blog-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blog-toc li {
  counter-increment: toc;
  font-size: 14.5px;
}
.blog-toc li::before {
  content: counter(toc) ". ";
  color: var(--ink-subtle);
  font-variant-numeric: tabular-nums;
}
.blog-toc a {
  color: var(--ink-soft);
  text-decoration: none;
}
.blog-toc a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

/* ── Post body prose ──────────────────────────────────────────────────── */
.blog-prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.blog-prose > :first-child {
  margin-top: 0;
}
.blog-prose > :last-child {
  margin-bottom: 0;
}
.blog-prose p {
  margin: 0 0 20px;
}
.blog-prose strong {
  font-weight: 600;
  color: var(--ink);
}
.blog-prose a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-prose h2 {
  margin: 44px 0 18px;
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.blog-prose h3 {
  margin: 32px 0 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--ink);
}
.blog-prose ul,
.blog-prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.blog-prose li + li {
  margin-top: 8px;
}
.blog-prose blockquote {
  margin: 28px 0;
  padding-left: 22px;
  border-left: 2px solid var(--accent);
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* Markdown `---` thematic break — a short brand-green accent rule, not a
   full-width gray hairline. Used sparingly to mark a real beat change (e.g.
   stepping out of a numbered walkthrough into the closing take). */
.blog-prose hr {
  width: 64px;
  height: 3px;
  margin: 44px auto;
  border: 0;
  border-radius: var(--pill);
  background: var(--accent);
}
.blog-prose img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.blog-prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--paper-sunken);
  padding: 2px 6px;
  border-radius: 5px;
}
.blog-prose pre {
  margin: 0 0 20px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--paper-sunken);
  overflow-x: auto;
}
.blog-prose pre code {
  background: none;
  padding: 0;
}

/* ── FAQ section ──────────────────────────────────────────────────────── */
/* Native <details>/<summary> — fully crawlable with no JS, and the on-page
   mirror of the FAQPage JSON-LD emitted alongside it. */
.blog-faq {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.blog-faq h2 {
  margin: 0 0 20px;
}
.blog-faq details {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.blog-faq details:first-of-type {
  border-top: 1px solid var(--line);
}
.blog-faq summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  list-style: none;
}
.blog-faq summary::-webkit-details-marker {
  display: none;
}
.blog-faq summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--accent);
  font-weight: 600;
}
.blog-faq details[open] summary::before {
  content: "−";
}
.blog-faq details p {
  margin: 12px 0 0 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-muted);
}
