/* Blog: index, article layout, cards. Uses the tokens from css/page.css. */

/* ---------- article header ---------- */
.blog-hero{padding-top:calc(var(--nav-h) + clamp(28px,5vw,60px))}
.crumbs{display:flex;gap:10px;align-items:center;font-family:var(--font-m);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--gray);margin-bottom:26px}
.crumbs a{color:var(--gray);transition:color .25s}
.crumbs a:hover{color:var(--blue)}
.blog-hero h1{font-size:clamp(34px,5.2vw,64px);font-stretch:108%;letter-spacing:-.03em;line-height:1.04;max-width:980px;margin:18px 0 18px}
.blog-hero .lede{font-size:clamp(17px,1.7vw,20px);color:var(--gray);max-width:760px}
.post-meta{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px;font-family:var(--font-m);font-size:12.5px;letter-spacing:.06em;color:var(--ink-soft)}
.post-cover{margin:clamp(30px,4vw,48px) 0 0}
.post-cover img{display:block;width:100%;height:auto;border-radius:24px;border:1px solid var(--line);background:var(--paper)}

/* ---------- article body ---------- */
.post-wrap{padding-top:clamp(40px,5vw,64px)}
.post-grid{display:grid;grid-template-columns:240px minmax(0,760px);gap:clamp(40px,6vw,90px);justify-content:center;align-items:start}
.toc{position:sticky;top:calc(var(--nav-h) + 24px);display:flex;flex-direction:column;gap:4px;border-left:1px solid var(--line);padding-left:18px}
.toc-title{font-family:var(--font-m);font-size:11.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--blue);margin-bottom:10px}
.toc a{font-size:14px;line-height:1.4;color:var(--gray);padding:6px 0;transition:color .2s}
.toc a:hover,.toc a.on{color:var(--ink)}
.toc a.on{font-weight:600}
.post-body h2{scroll-margin-top:calc(var(--nav-h) + 20px);font-size:clamp(26px,2.8vw,34px);letter-spacing:-.02em;margin:52px 0 14px}
.post-body h3{font-size:21px;margin:30px 0 10px;letter-spacing:-.01em}
.post-body p,.post-body li{font-size:17.5px;line-height:1.75}
.post-body strong{color:var(--ink)}
.post-body ol{margin:0 0 18px 22px}
.post-body blockquote{margin:26px 0;padding:20px 24px;border-left:3px solid var(--blue);background:#fff;border-radius:0 14px 14px 0;font-size:18px;color:var(--ink)}
.post-body table{width:100%;border-collapse:collapse;margin:22px 0 26px;font-size:15.5px;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.post-body th,.post-body td{text-align:left;padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:top}
.post-body th{font-family:var(--font-m);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--blue);background:var(--paper-2);font-weight:500}
.post-body tr:last-child td{border-bottom:none}
.post-body .faq{margin-top:12px}
.takeaways{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px 26px;margin-bottom:10px}
.takeaways ul{list-style:none;margin:12px 0 0;display:grid;gap:8px}
.takeaways li{position:relative;padding-left:24px;font-size:16px;line-height:1.6}
.takeaways li::before{content:"";position:absolute;left:0;top:.55em;width:10px;height:10px;border-radius:3px;background:var(--blue)}
.callout{background:var(--blue-soft);border-radius:16px;padding:20px 24px;margin:26px 0}
.callout p{margin:0;color:var(--ink)}
.post-body code{font-family:var(--font-m);font-size:.88em;background:var(--paper-2);border:1px solid var(--line);border-radius:6px;padding:1px 6px}

/* ---------- CTA row ---------- */
.cta-row{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;position:relative}
.btn.ghost-light{background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.6)}
.btn.ghost-light:hover{background:#fff;color:var(--blue);box-shadow:none}

/* ---------- cards ---------- */
.related{padding-top:0}
.related .eyebrow{margin-bottom:22px}
.post-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.post-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;transition:transform .45s cubic-bezier(.22,1,.36,1),box-shadow .45s,border-color .45s}
.post-card:hover{transform:translateY(-6px);border-color:var(--blue);box-shadow:0 24px 50px -22px rgba(38,38,42,.25)}
.post-card img{display:block;width:100%;height:auto;aspect-ratio:1600/840;object-fit:cover;border-bottom:1px solid var(--line)}
.post-card .tag{display:block;font-family:var(--font-m);font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--blue);margin:20px 22px 8px}
.post-card h3,.post-card h2{font-size:20px;line-height:1.25;letter-spacing:-.01em;margin:0 22px 22px}
.post-card-body{display:flex;flex-direction:column;flex:1}
.post-card-body p{color:var(--gray);font-size:15px;line-height:1.6;margin:-10px 22px 18px}
.post-card .read{margin:auto 22px 22px;display:inline-flex;align-items:center;gap:8px;font-weight:600;font-size:15px;color:var(--ink)}
.post-card:hover .read{color:var(--blue)}

/* blog index: first article larger */
.blog-index-header{min-height:auto;padding-bottom:20px}
.blog-list{padding-top:30px}
.post-card.featured{grid-column:1 / -1;display:grid;grid-template-columns:1.25fr 1fr;align-items:stretch}
.post-card.featured img{height:100%;aspect-ratio:auto;border-bottom:none;border-right:1px solid var(--line)}
.post-card.featured h2{font-size:clamp(24px,2.6vw,32px)}
.post-card.featured .tag{margin-top:30px}

@media(max-width:1000px){
  .post-grid{grid-template-columns:minmax(0,1fr)}
  .toc{display:none}
  .post-cards{grid-template-columns:repeat(2,1fr)}
  .post-card.featured{grid-template-columns:1fr}
  .post-card.featured img{border-right:none;border-bottom:1px solid var(--line);aspect-ratio:1600/840}
}
@media(max-width:640px){
  .post-cards{grid-template-columns:1fr}
  .post-body p,.post-body li{font-size:16.5px}
  .post-body table{display:block;overflow-x:auto}
  .cta-row .btn{width:100%;justify-content:center}
}
