/* =========================================================
   BLOG
   - /blog            magazine-style index
   - /blog/{slug}     2-column article + sidebar (mirrors .lp layout)
   Reuses base.css design tokens (--container-max, --gutter,
   --section-y, --stack-*, --radius-*, --ink, --brand, --muted).
   Prose typography is tuned for 45+: 18px body, 1.7 line-height,
   65ch measure, generous vertical rhythm.
   ========================================================= */

/* ── Index ────────────────────────────────────────────────── */
.blog-index {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

.blog-hero {
  margin-bottom: var(--block-gap);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-md);
  max-width: 760px;
}
.blog-hero__eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}
.blog-hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.blog-hero p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 640px;
}

.blog-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--stack-lg);
}

.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  color: inherit;
  text-decoration: none;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border-color: var(--line-2);
}
.blog-card__media {
  aspect-ratio: 16/10;
  background: linear-gradient(160deg, #cfe4ee 0%, #9bbfd7 100%);
  position: relative;
  overflow: hidden;
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card__body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
  flex: 1;
}
.blog-card h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.blog-card p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}
.blog-card__meta {
  margin-top: auto;
  font-size: 13.5px;
  color: var(--muted-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.blog-card__meta .sep { color: var(--line); }

.blog-empty {
  padding: 48px 0;
  color: var(--muted);
  font-size: 17px;
}

/* ── Post detail ─────────────────────────────────────────── */
.bp-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px var(--gutter) 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 56px;
  align-items: start;
}
.bp-article { min-width: 0; }
.bp-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: var(--stack-md);
}
.bp-back:hover { color: var(--ink); }
.bp-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: var(--stack-md) 0 var(--stack-sm);
}
.bp-meta {
  color: var(--muted);
  font-size: 14.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.bp-meta .sep { color: var(--line); }
.bp-hero {
  margin: var(--stack-lg) 0;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  /* Positioning context for the .ai-tag disclosure (base.css). */
  position: relative;
}
.bp-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bp-excerpt {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: var(--stack-lg);
  padding-left: 16px;
  border-left: 3px solid var(--brand);
}

/* ── Prose (also used by /cms/page when wrapped in .prose) ── */
.prose {
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink);
  max-width: 65ch;
}
.prose > * + * { margin-top: 18px; }
.prose h2 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin-top: 48px;
  margin-bottom: 4px;
  font-weight: 700;
}
.prose h3 {
  font-size: 22px;
  line-height: 1.3;
  margin-top: 36px;
  margin-bottom: 0;
  font-weight: 700;
}
.prose ul, .prose ol {
  padding-left: 22px;
  margin-top: 14px;
}
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--brand); }
.prose a {
  color: var(--brand-deep);
  border-bottom: 1px solid currentColor;
}
.prose a:hover { color: var(--ink); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose blockquote {
  border-left: 3px solid var(--brand);
  padding: 6px 0 6px 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--muted);
}
.prose figure { margin: 28px 0; }
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}
/* Wrapper App\Support\AiImage puts around a flagged inline image so the
   .ai-tag (base.css) has something to position against. Shrink-wraps the
   image so the badge lands on the photo, not in the margin beside it. */
.ai-figure {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .bp-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px var(--gutter) 64px;
  }
  .blog-hero h1 { font-size: 44px; }
}
@media (max-width: 720px) {
  .blog-hero h1 { font-size: 36px; }
  .blog-hero p { font-size: 17px; }
  .bp-title { font-size: 32px; }
  .prose, .prose p { font-size: 17px; }
  .prose h2 { font-size: 24px; margin-top: 36px; }
  .blog-feed { gap: var(--stack-md); }
  .blog-card__body { padding: 22px 22px 26px; }
}
