/* ─────────────────────────────────────────────────────────────
   blog.css — guides/article styling for nobreak.ca
   Loaded only by pages under /blog/. Reuses the tokens defined in
   style.css (:root) so the blog can never drift from the brand.
   ───────────────────────────────────────────────────────────── */

/* ── HERO ADDITIONS ──────────────────────────── */
.page-hero .section-eyebrow a {
  color: var(--blue);
  text-decoration: none;
}
.page-hero .section-eyebrow a:hover { text-decoration: underline; }

.blog-meta {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .01em;
}

/* ── ARTICLE ─────────────────────────────────── */
.blog-article { padding: 44px 0 40px; }

.blog-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.blog-body > * + * { margin-top: 22px; }

.blog-body h2 {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-top: 56px;
  scroll-margin-top: 90px;
}

.blog-body h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-top: 38px;
  scroll-margin-top: 90px;
}

.blog-body h4 {
  font-family: 'Raleway', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--slate);
  margin-top: 28px;
}

.blog-body p { color: var(--text); }

.blog-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.blog-body a:hover { color: var(--navy); }

.blog-body strong { font-weight: 700; color: var(--text); }

.blog-body ul,
.blog-body ol { padding-left: 24px; }
.blog-body li { margin-top: 10px; }
.blog-body li::marker { color: var(--blue); }

.blog-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

.blog-body code {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Pull-quote — used for the counter-intuitive facts worth stopping on */
.blog-body blockquote {
  border-left: 3px solid var(--blue);
  background: var(--bg2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin-top: 30px;
}
.blog-body blockquote p {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.6;
}

/* ── TABLES ──────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 28px;
}
.blog-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.blog-body thead { background: var(--bg2); }
.blog-body th {
  text-align: left;
  font-weight: 700;
  color: var(--navy);
  padding: 12px 16px;
  white-space: nowrap;
}
.blog-body td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.blog-body tbody tr:nth-child(even) { background: #FAFBFC; }

/* ── ARTICLE CTA ─────────────────────────────── */
.blog-cta { padding: 24px 0 96px; }
.blog-cta-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.blog-cta-card h2 {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.blog-cta-card p {
  margin: 14px auto 26px;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

/* ── INDEX ───────────────────────────────────── */
.blog-index { padding: 72px 0 96px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}
.blog-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: 0 8px 28px rgba(12, 26, 46, .10);
}
.blog-card h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 12px;
}
.blog-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.blog-card-meta {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 720px) {
  .blog-article { padding: 48px 0 32px; }
  .blog-body { font-size: 16px; }
  .blog-body h2 { margin-top: 44px; }
  .blog-cta-card { padding: 30px 24px; }
}

/* Respect reduced-motion (portfolio-wide rule) */
@media (prefers-reduced-motion: reduce) {
  .blog-card { transition: none; }
  .blog-card:hover { transform: none; }
}

/* ── ARTICLE HERO IMAGE ──────────────────────── */
.blog-hero-img {
  max-width: 820px;
  margin: 0 auto 10px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  /* Reserve the 2:1 box before the image decodes so the article text below
     does not jump (the width/height attrs on the img do the same job for
     browsers that honour them; this covers the rest). */
  aspect-ratio: 2 / 1;
  background: var(--bg2);
}
.blog-hero-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The index cards get the same image, as a band above the text. */
.blog-card-img {
  display: block;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.blog-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-card--img { padding: 0; overflow: hidden; }
.blog-card--img .blog-card-body { padding: 26px 30px 30px; }

@media (max-width: 720px) {
  .blog-hero-img { margin-bottom: 4px; }
}
