/* ─────────────────────────────────────────────────────────────────
   blog.css — Blog article pages (post/<slug>.html) and the blog
   index (blog.html). Layout/nav/footer/closing CTA come from
   site.css + service-page.css; this file styles the article header,
   long-form body typography, and the index card grid.

   Adapted from the Pure Mold Masters reference implementation's
   blog.css — retuned to PAA's token names (--color-brand-primary-*,
   --radius-card / --radius-card-lg, --rgb-navy-deep shadows) so the
   blog reads as part of the same design system as the rest of the
   site rather than a bolted-on subsection.
   ───────────────────────────────────────────────────────────────── */

/* ── Article header ── */
.blog-header { padding: 4.5rem 0 0; }
.blog-header .container { max-width: 820px; }
.blog-breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--color-text-tertiary); margin-bottom: 1.5rem;
}
.blog-breadcrumb a { color: var(--color-text-secondary); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--color-brand-primary-500); }
.blog-breadcrumb .sep { width: 14px; height: 14px; opacity: 0.5; }
.blog-header h1 {
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 1.25rem;
  text-wrap: balance;
}
.blog-meta {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--color-text-secondary); font-size: 0.95rem; margin-bottom: 2.5rem;
}
.blog-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.blog-hero-img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-image);
}

/* ── Article body (long-form prose) ──────────────────────────────
   Comfortable measure (720px ≈ 68-75ch at this size) + a few brand
   touches (accent rule on h2, dot markers on lists, a proper pull-
   quote treatment) so long articles read as designed, not dumped
   text. Everything below is additive to the base rules further up
   this file — no HTML/markup changes required. */
.blog-body {
  max-width: 720px; margin: 3rem auto 0; padding: 0 1.5rem;
  font-size: 1.09rem; line-height: 1.8; color: var(--color-text-body);
}
.blog-body > *:first-child { margin-top: 0; }
.blog-body p { margin: 0 0 1.4rem; text-wrap: pretty; }

/* Lead-in paragraph — the first paragraph of the article, picked out
   purely by position (no extra markup needed) so it reads as a dek. */
.blog-body > p:first-of-type {
  font-size: 1.28rem;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--color-text-primary);
}

.blog-body h2 {
  position: relative;
  font-size: 1.6rem; line-height: 1.25; color: var(--color-text-primary);
  font-weight: 800; letter-spacing: -0.01em;
  margin: 3.25rem 0 1.1rem; padding-top: 1.5rem;
}
.blog-body h2::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 44px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, #76CEF5, #27AFE9);
}
.blog-body h3 {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.3rem; font-weight: 700; color: var(--color-text-primary);
  margin: 2.25rem 0 0.85rem;
}
.blog-body h3::before {
  content: ""; flex: 0 0 auto;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gradient-brand);
}
.blog-body a { color: var(--color-brand-primary-500); text-decoration: underline; text-underline-offset: 2px; }
.blog-body a:hover { color: var(--color-brand-primary-700); }
.blog-body strong { color: var(--color-text-primary); font-weight: var(--font-weight-bold); }

.blog-body ul, .blog-body ol { margin: 0 0 1.4rem; padding-left: 0; }
.blog-body li { margin: 0 0 0.65rem; }
.blog-body ul {
  list-style: none;
}
.blog-body ul li {
  position: relative; padding-left: 1.6rem;
}
.blog-body ul li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gradient-brand);
}
.blog-body ol {
  list-style: none; counter-reset: blog-ol;
}
.blog-body ol li {
  position: relative; padding-left: 2.1rem; counter-increment: blog-ol;
}
.blog-body ol li::before {
  content: counter(blog-ol);
  position: absolute; left: 0; top: 0.05em;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  background: var(--color-brand-primary-100);
  color: var(--color-brand-primary-700);
  font-size: 0.78rem; font-weight: 800;
}

.blog-body blockquote {
  position: relative;
  margin: 2.25rem 0; padding: 1.5rem 1.75rem 1.5rem 3.5rem;
  border-left: 4px solid var(--color-brand-primary-300);
  background: var(--color-brand-primary-100); border-radius: 0 16px 16px 0;
  color: var(--color-text-primary);
  font-size: 1.15rem; line-height: 1.55; font-weight: 500;
  font-style: italic; letter-spacing: -0.005em;
}
.blog-body blockquote::before {
  content: "\201C";
  position: absolute; top: 0.55rem; left: 1.1rem;
  font-family: var(--font-family-display, inherit);
  font-size: 2.75rem; line-height: 1; font-weight: 800;
  font-style: normal;
  color: var(--color-brand-primary-300);
}
.blog-body blockquote p { margin: 0; }
.blog-body blockquote p + p { margin-top: 0.75rem; }
.blog-body blockquote strong { color: inherit; }

.blog-figure { margin: 2rem 0; }
.blog-figure img { width: 100%; height: auto; border-radius: var(--radius-md); }

/* ── Index grid ── */
.blog-index-head { padding: 4.5rem 0 2.5rem; text-align: center; }
.blog-index-head .container { max-width: 720px; }
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.blog-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-surface-card); border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card); text-decoration: none; color: inherit;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--gradient-brand) border-box;
  box-shadow: 0 22px 44px -26px rgba(var(--rgb-navy-deep), 0.45);
}
.blog-card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.blog-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-date { font-size: 0.8rem; color: var(--color-text-tertiary); margin-bottom: 0.5rem; }
.blog-card h3 { font-size: 1.18rem; line-height: 1.3; margin: 0 0 0.6rem; color: var(--color-text-primary); }
.blog-card p { font-size: 0.95rem; line-height: 1.6; color: var(--color-text-body); margin: 0 0 1.1rem; }
.blog-card .read-more {
  margin-top: auto; font-weight: var(--font-weight-bold); font-size: 0.9rem;
  color: var(--color-brand-primary-700); display: inline-flex; align-items: center; gap: 0.35rem;
}
