/* Blog index (blog.html) and the post pages. Loads after styles.css, about.css and services.css. */

/* ---------- Index ---------- */
.blog-hero { padding: 56px 0 28px; border-bottom: 1px solid var(--line); }
.blog-hero-inner { display: grid; grid-template-columns: 1fr 38%; gap: 40px; align-items: end; }
.blog-hero h1 { font-size: 64px; margin: 18px 0 16px; }
.blog-hero .lead { font-size: 19px; max-width: 560px; }
.blog-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding-bottom: 8px; }
.blog-filter .pill { padding: 9px 18px; font-size: 13px; }
.blog-list { padding: 40px 0 56px; }
.post-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-grid > li.is-hidden { display: none; }
.post-card a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: inherit; transition: box-shadow .2s, border-color .2s; }
.post-card a:hover { border-color: var(--blue-soft); box-shadow: 0 16px 40px rgba(16,38,87,.08); }
.post-card a:hover h3 { color: var(--blue); }
.post-card-art { margin: 0; aspect-ratio: 1200 / 630; background: var(--paper-deep); }
.post-card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.post-meta .post-cat { color: var(--blue); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11.5px; }
.post-card h3 { font-size: 19px; line-height: 1.3; }
.post-excerpt { font-size: 15px; line-height: 1.55; color: var(--muted); }
.post-card .text-link { margin-top: auto; font-size: 14px; align-self: flex-start; }
.post-card-big { grid-column: 1 / -1; }
.post-card-big a { flex-direction: row; }
.post-card-big .post-card-art { flex: 0 0 56%; aspect-ratio: auto; min-height: 360px; }
.post-card-big .post-card-body { justify-content: center; padding: 36px 40px; gap: 14px; }
.post-card-big h3 { font-size: 32px; letter-spacing: -.02em; }
.blog-cta .banner-inner { min-height: 300px; }

/* ---------- Post ---------- */
.post-hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%); }
.post-hero-inner { padding: 48px 0 32px; max-width: 900px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--blue); }
.breadcrumbs span[aria-hidden] { margin: 0 8px; }
.post-hero h1 { font-size: 52px; letter-spacing: -.03em; line-height: 1.08; margin-bottom: 18px; }
.post-hero .post-meta { font-size: 14px; }
.post-hero-art { margin: 0 auto; max-width: 1100px; padding: 0 var(--gutter) 0; transform: translateY(40px); margin-top: -8px; }
.post-hero-art img { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 24px 60px rgba(16,38,87,.14); aspect-ratio: 1200 / 630; object-fit: cover; }
.post-layout { display: grid; grid-template-columns: 24% 1fr; gap: 56px; align-items: start; padding-top: 88px; padding-bottom: 56px; }
.post-toc { position: sticky; top: 96px; }
.post-toc ol { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; gap: 4px; counter-reset: toc; max-height: calc(100vh - 260px); overflow: auto; }
.post-toc li { counter-increment: toc; }
.post-toc a { display: block; font-size: 13.5px; line-height: 1.4; color: var(--muted); padding: 5px 0; }
.post-toc a::before { content: counter(toc, decimal-leading-zero) " "; color: var(--blue-soft); font-size: 11px; letter-spacing: .06em; }
.post-toc a:hover { color: var(--blue); }
.post-toc-cta { display: inline-flex; }
.post-body { max-width: 760px; min-width: 0; }
.post-body > :first-child { margin-top: 0; }
.post-body h2 { font-size: 30px; letter-spacing: -.02em; margin: 44px 0 14px; scroll-margin-top: 90px; }
.post-body h3 { font-size: 22px; margin: 30px 0 10px; scroll-margin-top: 90px; }
.post-body h4 { font-size: 17px; margin: 22px 0 8px; }
.post-body p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px 22px; padding: 0; font-size: 17px; line-height: 1.65; color: var(--ink-soft); }
.post-body li { margin-bottom: 8px; }
.post-body li > p { margin-bottom: 6px; }
.post-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-body strong, .post-body b { color: var(--ink); }
.post-body figure { margin: 28px 0; }
.post-body figure img, .post-body > img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.post-body figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.post-body blockquote { margin: 26px 0; padding: 18px 24px; border-left: 3px solid var(--blue); background: #fff; border-radius: 0 12px 12px 0; }
.post-body blockquote p { margin: 0; font-size: 17px; color: var(--ink); }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; background: var(--paper-deep); padding: 2px 6px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 24px 0 28px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; min-width: 520px; }
.table-wrap th, .table-wrap td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap thead th { background: var(--paper-deep); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody th { font-weight: 600; background: #fff; }
.table-wrap td:first-child { font-weight: 600; color: var(--ink); }
.table-wrap td p { margin: 0; font-size: 15px; }
.post-tldr { margin: 0 0 32px; padding: 24px 28px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 0 14px 14px 0; }
.post-tldr .eyebrow { margin-bottom: 10px; }
.post-tldr ul { margin: 0 0 0 18px; }
.post-tldr li { font-size: 15.5px; line-height: 1.6; }
.post-cta { margin: 36px 0; padding: 28px 30px; background: var(--navy); color: #fff; border-radius: 14px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.post-cta .eyebrow { color: #c6cfe6; margin-bottom: 8px; }
.post-cta h3 { color: #fff; font-size: 22px; margin: 0 0 8px; line-height: 1.25; }
.post-cta p { color: #c4cee4; font-size: 15px; margin: 0; }
.post-cta .btn { white-space: nowrap; }
.post-faq { margin: 40px 0 10px; }
.post-faq .faq-item p { margin: 0 0 16px; font-size: 15.5px; }
.post-faq .faq-item p:last-child { padding-bottom: 20px; }
.post-updated { font-size: 13px; color: var(--muted); margin: 32px 0 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-nav a { display: block; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: inherit; }
.post-nav a:hover { border-color: var(--blue-soft); }
.post-nav a span { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.post-nav a strong { font-size: 15px; line-height: 1.35; }
.post-nav-next { text-align: right; }
.blog-related { padding: 48px 0 56px; border-top: 1px solid var(--line); background: var(--paper-deep); }
.blog-related .split-head { align-items: end; margin-bottom: 24px; }
.post-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .blog-hero h1 { font-size: 52px; }
  .post-hero h1 { font-size: 42px; }
  .post-layout { grid-template-columns: 26% 1fr; gap: 36px; }
  .post-card-big h3 { font-size: 26px; }
}
@media (max-width: 980px) {
  .blog-hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .blog-filter { justify-content: flex-start; }
  .post-grid, .post-grid-3 { grid-template-columns: 1fr 1fr; }
  .post-card-big a { flex-direction: column; }
  .post-card-big .post-card-art { flex: none; aspect-ratio: 1200 / 630; min-height: 0; }
  .post-card-big .post-card-body { padding: 24px; }
  .post-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 72px; }
  .post-toc { position: static; }
  .post-toc ol { max-height: none; grid-template-columns: 1fr 1fr; }
  .post-toc-cta { display: none; }
  .post-cta { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .post-body { overflow-x: hidden; }
  .blog-hero h1 { font-size: 40px; }
  .post-hero h1 { font-size: 32px; }
  .post-grid, .post-grid-3 { grid-template-columns: 1fr; }
  .post-toc ol { grid-template-columns: 1fr; }
  .post-hero-art { transform: translateY(24px); padding: 0; }
  .post-hero-art img { border-radius: 0; }
  .post-layout { padding-top: 48px; }
  .post-body h2 { font-size: 24px; }
  .post-body p, .post-body ul, .post-body ol { font-size: 16px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
  .post-tldr, .post-cta { padding: 20px; }
}

.post-cta > div { min-width: 0; overflow-wrap: anywhere; }
.post-body a { overflow-wrap: anywhere; }

/* post CTA must wrap on phones (24 Oct) */
@media (max-width: 980px) { .post-cta { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .post-cta .btn { white-space: normal; justify-self: start; max-width: 100%; text-align: left; } .post-cta h3, .post-cta p { overflow-wrap: anywhere; } }
