/* Blog-specific styling. Loaded AFTER /legal.css, which provides the base
   tokens, body, header.site/footer.site, h1/h2/h3, p, .lead, .doc-kicker,
   .callout and code. This file adds the article furniture: hero + inline
   figures, byline, pull-quotes, the in-article CTA card, the post-list grid on
   the index, and the related-posts strip. Same dark theme + Inter as the
   landing, so the blog feels like one site. */

/* Wider column than the legal docs — room for images to breathe. */
main { padding: 44px 0 80px; }
.wrap.article-wrap { max-width: 760px; }
.wrap.index-wrap { max-width: 1040px; }

/* ---------- header nav (extends legal's header.site) ---------- */
header.site nav a.active { color: var(--text); }
.nav-start {
  display: inline-block;
  margin-left: 22px;
  padding: 7px 15px;
  border-radius: 9px;
  background: var(--grad);
  color: #fff !important;
  font-size: 0.86rem;
  font-weight: 600;
}
.nav-start:hover { filter: brightness(1.08); }

/* ---------- article header ---------- */
article .doc-kicker { margin-bottom: 14px; }
article h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.1; margin-bottom: 16px; }
.article-meta {
  color: var(--mute);
  font-size: 0.9rem;
  margin: 0 0 28px;
}
.article-meta time { color: var(--dim); }

/* lead paragraph — a touch larger, no left rule here (hero sits above it) */
article .lead {
  border-left: none;
  padding-left: 0;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 4px;
}

/* ---------- figures (hero + inline) ---------- */
figure { margin: 30px 0; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
figure.hero { margin: 4px 0 30px; }
figure.hero img {
  box-shadow: 0 24px 60px -28px rgba(79, 140, 255, 0.45), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}
figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--mute);
}

/* article body rhythm */
article h2 { font-size: 1.5rem; margin: 44px 0 14px; }
article h3 { font-size: 1.12rem; margin: 30px 0 8px; }
article p { font-size: 1.03rem; }
article ul, article ol { margin: 0 0 18px; padding-left: 24px; }
article li { margin: 0 0 9px; font-size: 1.03rem; }

/* pull-quote */
blockquote {
  margin: 30px 0;
  padding: 6px 0 6px 24px;
  border-left: 3px solid var(--accent);
  font-size: 1.28rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ---------- in-article CTA card ---------- */
.cta-card {
  margin: 44px 0 8px;
  padding: 30px 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(79, 140, 255, 0.14), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(139, 92, 246, 0.14), transparent 55%),
    var(--surface);
  text-align: center;
}
.cta-card h3 { font-size: 1.3rem; margin: 0 0 8px; color: var(--text); }
.cta-card p { color: var(--dim); margin: 0 auto 18px; max-width: 52ch; }
.cta-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 11px;
  background: var(--grad);
  color: #fff !important;
  font-weight: 650;
  font-size: 0.98rem;
}
.cta-btn:hover { filter: brightness(1.08); text-decoration: none; }

/* ---------- related posts (article footer) ---------- */
.related {
  margin: 56px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.related h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--mute); margin: 0 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-grid a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-2);
  transition: border-color 0.15s, transform 0.15s;
}
.related-grid a:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.related-grid .rk { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.related-grid .rt { display: block; margin-top: 7px; color: var(--text); font-weight: 600; font-size: 0.95rem; line-height: 1.35; }
@media (max-width: 680px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- blog index ---------- */
.blog-head { padding: 16px 0 8px; }
.blog-head .doc-kicker { margin-bottom: 10px; }
.blog-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 12px; }
.blog-head p { color: var(--dim); font-size: 1.08rem; max-width: 60ch; }

.post-list {
  margin: 38px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.15s, transform 0.15s;
}
.post-card:hover { border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }
.post-card .thumb { aspect-ratio: 1200 / 630; overflow: hidden; border-bottom: 1px solid var(--border); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card .rk { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.post-card h2 { font-size: 1.18rem; margin: 9px 0 8px; line-height: 1.3; color: var(--text); }
.post-card p { color: var(--dim); font-size: 0.94rem; margin: 0 0 14px; }
.post-card .meta { margin-top: auto; color: var(--mute); font-size: 0.82rem; }

/* feature (first) post spans full width on wide screens */
.post-card.feature { grid-column: 1 / -1; }
.post-card.feature .row { display: grid; grid-template-columns: 1.1fr 1fr; }
.post-card.feature .thumb { aspect-ratio: auto; border-bottom: none; border-right: 1px solid var(--border); }
.post-card.feature h2 { font-size: 1.5rem; }
@media (max-width: 720px) {
  .post-list { grid-template-columns: 1fr; }
  .post-card.feature .row { grid-template-columns: 1fr; }
  .post-card.feature .thumb { border-right: none; border-bottom: 1px solid var(--border); }
}
