/* ── Blog (generated pages) — layered on styles.css ───────────────────────── */


/* Topic pills: the visible "flags" on every card and post */
.topic-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.topic-pill {
  display: inline-block;
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--royal-green); background: var(--gold-light);
  padding: 5px 12px; border-radius: 99px; border: 1px solid var(--gold-light);
  line-height: 1.3; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
a.topic-pill:hover { transform: translateY(-2px); }

/* Topic filter row on the index */
.topic-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.topic-filter .topic-pill { background: transparent; color: var(--gold-light); font-size: 12px; padding: 7px 16px; }
.topic-filter .topic-pill.is-active,
.topic-filter .topic-pill:hover { background: var(--gold-light); color: var(--royal-green); }
.topic-filter-empty { color: rgba(244,242,221,0.55); font-size: 14px; }

/* Index layout */
.blog-hero .section-eyebrow a { color: inherit; }
.blog-hero p.section-eyebrow { color: var(--gold-light); font-size: 12px; max-width: none; margin-bottom: 16px; }
.blog-hero h1 { max-width: 820px; text-wrap: balance; }
.blog-hero p:not(.section-eyebrow) { max-width: 720px; }
.blog-index {
  max-width: 1040px; margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 48px) clamp(80px, 10vw, 140px);
}
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Cards */
.post-card {
  display: flex; flex-direction: column;
  background: rgba(244, 242, 221, 0.05);
  border: 0.5px solid rgba(244, 242, 221, 0.14);
  border-radius: 8px; overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.post-card:hover { background: rgba(244, 242, 221, 0.08); border-color: rgba(244, 242, 221, 0.28); }
/* Whole card is clickable: the title link stretches over the card; topic pills sit above it so they still filter. */
.post-card { position: relative; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.post-card:hover { transform: translateY(-3px); }
.post-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card .topic-pills { position: relative; z-index: 2; }
.post-card:hover .post-card-title a { color: var(--gold-light); }
.post-card[hidden] { display: none; }
.post-card-cover { display: block; aspect-ratio: 1200 / 630; overflow: hidden; border-bottom: 0.5px solid rgba(244,242,221,0.14); }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.post-card:hover .post-card-cover img { transform: scale(1.03); }

/* Live cover: fills whatever box the layout gives it; everything scales with the box width. */
.cover-live {
  position: relative; display: block; container-type: inline-size; overflow: hidden;
  background-color: var(--beige);
  background-image: linear-gradient(rgba(26,62,50,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(26,62,50,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--royal-green);
}
.cover-live .cl-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 5cqw;
  padding: 10cqw 9cqw 8cqw;
}
.cover-live .cl-title { font-size: clamp(15px, 5.6cqw, 42px); font-weight: 800; line-height: 1.15; text-wrap: balance; transition: transform 0.4s ease; }
.post-card:hover .cover-live .cl-title { transform: translateY(-2px); }
.cover-live .cl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cover-live .cl-logo { width: clamp(96px, 30cqw, 240px); height: auto; display: block; }
.cover-live .cl-url { font-size: clamp(9px, 1.6cqw, 14px); font-weight: 500; letter-spacing: 0.04em; color: rgba(26,62,50,0.6); }
@container (max-width: 360px) { .cover-live .cl-url { display: none; } }
.cover-live .cl-mark { position: absolute; width: 4cqw; height: 4cqw; min-width: 10px; min-height: 10px; border: 0 solid var(--gold); }
.cover-live .cl-mark.tl { top: 4cqw; left: 4cqw; border-top-width: 2px; border-left-width: 2px; }
.cover-live .cl-mark.tr { top: 4cqw; right: 4cqw; border-top-width: 2px; border-right-width: 2px; }
.cover-live .cl-mark.bl { bottom: 4cqw; left: 4cqw; border-bottom-width: 2px; border-left-width: 2px; }
.cover-live .cl-mark.br { bottom: 4cqw; right: 4cqw; border-bottom-width: 2px; border-right-width: 2px; }
.post-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card-title { font-size: 18px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; color: var(--beige); }
.post-card-title a:hover { color: var(--gold-light); }
.post-card-excerpt { font-size: 14px; line-height: 1.65; color: rgba(244,242,221,0.65); margin-bottom: 16px; flex: 1; }
.post-card-meta { font-size: 12px; color: rgba(244,242,221,0.45); }
.post-card-flag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 14px;
}

/* Featured hero card: cover left, text right. The cover sits on a matching
   beige panel so any extra height blends in instead of showing bars. */
.post-card-featured { flex-direction: row; margin-bottom: 20px; }
.post-card-featured .post-card-cover { flex: 0 0 56%; border-bottom: none; border-right: 0.5px solid rgba(244,242,221,0.14); aspect-ratio: auto; min-height: 320px; }
.post-card-featured .post-card-body { padding: clamp(24px, 3vw, 40px); justify-content: center; }
.post-card-featured .post-card-title { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; }
.post-card-featured .post-card-excerpt { font-size: 15px; flex: 0 0 auto; }

/* Fewer than 3 non-featured posts: wide row cards instead of a sparse grid */
.post-grid-few { grid-template-columns: 1fr; }
.post-grid-few .post-card { flex-direction: row; align-items: center; }
.post-grid-few .post-card-cover { flex: 0 0 38%; border-bottom: none; border-right: 0.5px solid rgba(244,242,221,0.14); align-self: stretch; aspect-ratio: auto; min-height: 200px; }
.post-grid-few .post-card-body { padding: clamp(22px, 3vw, 34px); }

/* ── Article ─────────────────────────────────────────────────────────────── */
/* Layout: "On this page" menu on the left (wide screens), reading column right. */
.post-layout {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(120px, 16vh, 180px) clamp(24px, 5vw, 48px) clamp(48px, 6vw, 72px);
  display: grid; grid-template-columns: 220px minmax(0, 860px); gap: 64px; justify-content: center;
}
.post-layout:not(:has(.post-toc)) { grid-template-columns: minmax(0, 860px); }
.post { min-width: 0; }

.post-toc { position: sticky; top: 110px; align-self: start; max-height: calc(100vh - 140px); overflow: auto; }
.post-toc-label, .post-toc-mobile summary {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 14px;
}
.post-toc ol, .post-toc-mobile ol { list-style: none; padding: 0; margin: 0; }
.post-toc li a {
  display: block; font-size: 13px; line-height: 1.45; color: rgba(244,242,221,0.55);
  padding: 7px 0 7px 14px; border-left: 2px solid rgba(244,242,221,0.12);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.post-toc li a:hover { color: var(--beige); }
.post-toc li a.is-active { color: var(--beige); border-left-color: var(--gold); font-weight: 600; }
.post-toc-mobile { display: none; }

.breadcrumb { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244,242,221,0.45); margin-bottom: 22px; }
.breadcrumb a { color: rgba(244,242,221,0.65); }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb span { margin: 0 8px; }
.post-title { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.18; color: var(--beige); margin: 6px 0 18px; text-wrap: balance; }
.post-meta { font-size: 13px; color: rgba(244,242,221,0.5); margin-bottom: 48px; }

.post-body { font-size: 17px; line-height: 1.8; color: rgba(244,242,221,0.85); }
.post-body > * + * { margin-top: 20px; }
/* Links look like the text around them (same colour and weight), marked by a gold underline. */
.post-body a:not(.btn) { color: inherit; font-weight: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; text-decoration-thickness: 1.5px; transition: color 0.2s ease; }
.post-body a:not(.btn):hover { color: var(--gold-light); }
.post-body strong { color: var(--beige); font-weight: 700; }

/* Headings: one colour, clear sizes. Main sections get a short gold marker so
   they stand out when scrolling fast; sub-sections are simply smaller. */
.post-body h2, .post-body h3 { color: var(--beige); scroll-margin-top: 100px; text-wrap: balance; }
.post-body h2 { font-size: clamp(24px, 2.8vw, 30px); font-weight: 800; line-height: 1.25; margin-top: 80px; }
.post-body h2::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--gold); margin-bottom: 20px; }
.post-body h3 { font-size: 20px; font-weight: 700; line-height: 1.35; margin-top: 44px; }
.post-body h2 + *, .post-body h3 + * { margin-top: 14px; }
.post-body > h2:first-child { margin-top: 0; }

.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li + li { margin-top: 8px; }
.post-body li::marker { color: var(--gold); font-weight: 700; }

/* Pull-quote callouts: calmer than headings so they read as emphasis, not structure */
.post-body blockquote {
  margin: 36px 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--gold);
  font-size: 19px; font-weight: 500; font-style: italic; line-height: 1.6; color: var(--beige);
}
.post-body blockquote p { margin: 0; }

/* Tables: header band + alternating rows, first column links to its section */
.post-body table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; line-height: 1.5; margin: 32px 0;
  border: 1px solid #36594C; border-radius: 10px; overflow: hidden;
}
.post-body thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--royal-green); background: var(--gold-light); padding: 13px 16px;
}
.post-body th em { font-style: normal; }
/* Solid fills (no see-through rows) so the grid background doesn't show through. */
.post-body td { padding: 14px 16px; vertical-align: top; color: var(--beige); }
.post-body tbody tr:nth-child(odd) td { background: #274A3D; }
.post-body tbody tr:nth-child(even) td { background: #20443A; }
.post-body td:first-child { font-weight: 700; white-space: nowrap; }
.post-body td:last-child { color: #B8C4B8; }

/* CTA panel: blueprint crop marks instead of divider lines */
.post-cta {
  position: relative; margin: 56px 0; padding: 44px 32px; text-align: center;
  background: rgba(244,242,221,0.05); border-radius: 8px;
}
.post-cta .pc-mark { position: absolute; width: 16px; height: 16px; border-color: var(--gold); border-style: solid; border-width: 0; }
.post-cta .pc-mark.tl { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; }
.post-cta .pc-mark.tr { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; }
.post-cta .pc-mark.bl { bottom: 12px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; }
.post-cta .pc-mark.br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; }
.post-cta-heading { font-size: clamp(20px, 2.4vw, 24px); font-weight: 800; color: var(--beige); margin-bottom: 20px; }


/* Related + contact */
.post-related { max-width: 1040px; margin: 0 auto; padding: 24px clamp(24px, 5vw, 48px) clamp(64px, 8vw, 110px); }

/* Coming soon */
.coming-soon { text-align: left; min-height: 60vh; }
.coming-soon-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* ── Homepage / partner-page teaser (filled from /blog/posts.json) ─────── */
.blog-teaser-grid .post-card-cover { border-radius: 0; }

@media (max-width: 1100px) {
  .post-layout, .post-layout:not(:has(.post-toc)) { grid-template-columns: minmax(0, 860px); }
  .post-toc { display: none; }
  .post-toc-mobile { display: block; margin: -16px 0 40px; padding: 16px 20px; background: rgba(244,242,221,0.05); border-radius: 8px; }
  .post-toc-mobile summary { cursor: pointer; margin: 0; }
  .post-toc-mobile ol { margin-top: 12px; }
  .post-toc-mobile li a { display: block; padding: 6px 0; font-size: 14px; color: rgba(244,242,221,0.75); }
}

@media (max-width: 900px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-grid-few .post-card { flex-direction: column; align-items: stretch; }
  .post-card-featured { flex-direction: column; }
  .post-card-featured .post-card-cover, .post-grid-few .post-card-cover { aspect-ratio: 1200 / 630; min-height: 0; }
  .post-card-featured .post-card-cover { flex: none; border-right: none; border-bottom: 0.5px solid rgba(244,242,221,0.14); }
  .post-grid-few .post-card-cover { flex: none; border-right: none; border-bottom: 0.5px solid rgba(244,242,221,0.14); }
  .post-body { font-size: 16px; }
  .post-body td:first-child { white-space: normal; }
  .post-body table { display: block; overflow-x: auto; }
  .post-cta { padding: 36px 20px; }
}

/* ── Site pages (Services, How It Works, About, FAQ) ─────────────────────── */
.section-wrap-top-tight { padding-top: clamp(24px, 4vw, 48px); }
