/* ==========================================================================
   Innterio B2C — blog styles (server-rendered pages from blog.js)
   Loaded after style.css; reuses its tokens, adds only blog-specific pieces.
   ========================================================================== */

.blog-body { background: var(--bg); }
.nav-links a.is-active { color: var(--terra); }

/* ---------- Listing hero ---------- */

.blog-hero {
  padding: clamp(40px, 6vw, 76px) 0 clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.blog-hero h1 { margin: 14px 0 16px; max-width: 22ch; }
.blog-hero h1 em { font-style: italic; color: var(--terra); }
.blog-hero .lede { max-width: 46rem; }

.blog-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: .88rem; font-weight: 700; color: var(--ink-soft);
  transition: all .2s ease;
}
.cat-pill span { font-size: .74rem; color: var(--muted); font-weight: 600; }
.cat-pill:hover { border-color: var(--terra); color: var(--terra); }
.cat-pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.cat-pill.is-active span { color: rgba(234, 246, 251, .7); }

/* ---------- Cards ---------- */

.blog-list { padding: clamp(32px, 5vw, 60px) 0; }
.blog-list.related { border-top: 1px solid var(--line); background: var(--bg-soft); }
.post-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.post-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.post-card-media {
  display: block; aspect-ratio: 16 / 10; background: var(--bg-soft);
  position: relative; overflow: hidden;
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.1rem; color: var(--muted);
  background: linear-gradient(135deg, var(--bg-soft), var(--terra-soft));
}
.post-card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-cat {
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--terra);
}
.post-card h3 { font-size: 1.22rem; line-height: 1.3; }
.post-card h3 a:hover { color: var(--terra); }
.post-card p { font-size: .92rem; color: var(--ink-soft); flex: 1; }
.post-card-meta { display: flex; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 600; }

.post-card-featured { flex-direction: row; margin-bottom: 26px; }
.post-card-featured .post-card-media { flex: 1 1 55%; aspect-ratio: auto; min-height: 320px; }
.post-card-featured .post-card-body { flex: 1 1 45%; justify-content: center; padding: clamp(24px, 3vw, 44px); }
.post-card-featured h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.post-card-featured p { font-size: 1rem; flex: none; }
@media (max-width: 800px) {
  .post-card-featured { flex-direction: column; }
  .post-card-featured .post-card-media { min-height: 0; aspect-ratio: 16 / 10; }
}

.blog-empty {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(32px, 6vw, 64px); text-align: center; display: grid; gap: 16px; justify-items: center;
}
.blog-empty p { color: var(--ink-soft); max-width: 34rem; }

.blog-pager {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-top: 40px; font-size: .9rem; font-weight: 700; color: var(--muted);
}

/* ---------- Article ---------- */

.post-head { padding: clamp(28px, 4vw, 48px) 0 22px; max-width: 52rem; }
.crumbs { font-size: .82rem; color: var(--muted); font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.crumbs a:hover { color: var(--terra); }
.post-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.post-standfirst { margin-top: 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: .86rem; color: var(--muted); font-weight: 600; }
.draft-flag {
  display: inline-block; margin-bottom: 14px; padding: 8px 14px; border-radius: 999px;
  background: #FFF4D6; border: 1px solid #F0D98B; color: #7A5A00; font-size: .82rem; font-weight: 700;
}

.post-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: clamp(24px, 3vw, 40px); }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; }

.post-layout {
  display: grid; gap: clamp(28px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start; padding-bottom: clamp(40px, 6vw, 72px);
}
@media (max-width: 980px) { .post-layout { grid-template-columns: 1fr; } }

/* Body typography — the long-form reading column */
.post-body { max-width: 42rem; font-size: 1.06rem; color: var(--ink-soft); }
.post-body h2 {
  font-size: clamp(1.45rem, 2.8vw, 1.95rem); color: var(--ink);
  margin: 44px 0 14px; scroll-margin-top: 90px;
}
.post-body h3 { font-size: 1.2rem; color: var(--ink); margin: 30px 0 10px; scroll-margin-top: 90px; }
.post-body h4 { font-size: 1.02rem; color: var(--ink); margin: 24px 0 8px; font-family: var(--font-body); font-weight: 800; }
.post-body p { margin: 0 0 18px; }
.post-body a { color: var(--terra-deep); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--terra); }
.post-body strong { color: var(--ink); }
.post-list { margin: 0 0 20px; padding-left: 22px; display: grid; gap: 9px; }
.post-list li::marker { color: var(--terra); font-weight: 700; }
.post-body hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

.post-quote {
  margin: 26px 0; padding: 18px 24px; border-left: 4px solid var(--terra);
  background: var(--terra-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.04rem; color: var(--ink);
}
.post-figure { margin: 28px 0; }
.post-figure img { width: 100%; border-radius: var(--radius-sm); }
.post-figure figcaption { margin-top: 8px; font-size: .84rem; color: var(--muted); text-align: center; }

.post-code {
  background: var(--dark); color: var(--cream); padding: 16px 18px;
  border-radius: var(--radius-sm); overflow-x: auto; font-size: .88rem; margin: 0 0 20px;
}
.post-body code { background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.post-code code { background: none; padding: 0; }

.post-table-wrap { overflow-x: auto; margin: 0 0 24px; }
.post-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 420px; }
.post-table th, .post-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.post-table th { background: var(--bg-soft); color: var(--ink); font-weight: 800; font-size: .84rem; letter-spacing: .02em; }
.post-table tr:last-child td { border-bottom: none; }

.post-toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px 24px; margin-bottom: 32px;
}
.post-toc b { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.post-toc ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .95rem; }
.post-toc a:hover { color: var(--terra); text-decoration: underline; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; }
.post-tags span { font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--bg-soft); padding: 6px 12px; border-radius: 999px; }

.post-share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: .88rem; font-weight: 700; color: var(--muted);
}
.post-share a, .copy-link {
  color: var(--ink); border: 1px solid var(--line); background: var(--card);
  padding: 7px 14px; border-radius: 999px; font-size: .84rem; font-weight: 700;
}
.post-share a:hover, .copy-link:hover { border-color: var(--terra); color: var(--terra); }

/* Inline CTA dropped mid-article by blog.js */
.post-cta-inline {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--dark); color: var(--cream); border-radius: var(--radius);
  padding: 24px 28px; margin: 38px 0;
}
.post-cta-inline b { font-family: var(--font-display); font-size: 1.2rem; display: block; margin-bottom: 6px; }
.post-cta-inline em { color: var(--gold); font-style: italic; }
.post-cta-inline p { font-size: .92rem; color: rgba(234, 246, 251, .78); margin: 0; max-width: 34rem; }

/* ---------- Sticky sidebar ---------- */

.post-aside { position: sticky; top: 92px; display: grid; gap: 18px; }
@media (max-width: 980px) { .post-aside { position: static; } }
.aside-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: grid; gap: 10px;
}
.aside-card b { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.aside-card p { font-size: .9rem; color: var(--ink-soft); }
.aside-card small { font-size: .78rem; color: var(--muted); text-align: center; }
.aside-card .btn { margin-top: 4px; }
.aside-card-soft { background: var(--terra-soft); border-color: transparent; }

/* ---------- Bottom CTA band ---------- */

.blog-cta { background: var(--dark); color: var(--cream); padding: clamp(48px, 7vw, 88px) 0; }
.blog-cta h2 { color: var(--cream); margin: 14px 0 16px; }
.blog-cta .lede { color: rgba(234, 246, 251, .78); max-width: 44rem; margin-bottom: 28px; }
.blog-cta .eyebrow { color: var(--gold); }
.blog-cta .btn-outline { color: var(--cream); border-color: rgba(234, 246, 251, .5); }
.blog-cta .btn-outline:hover { background: rgba(234, 246, 251, .1); color: var(--cream); }

/* ---------- Social embeds ([embed](url) in a post) ---------- */

.post-embed { margin: 30px 0; display: flex; justify-content: center; }
.post-embed iframe { width: 100%; max-width: 560px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.post-embed-video { display: block; }
.post-embed-video iframe { max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: none; }
.post-embed .twitter-tweet { margin-inline: auto !important; }
/* Fallback look before widgets.js upgrades the blockquote */
.post-embed-x blockquote {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 20px; background: var(--card); max-width: 550px; width: 100%;
}
