/* ============================================================
   DBMOTIF — posts.css (insights blog, dbmotif format)
   Article chrome on top of the main design system (styles.css):
   post hero, prose, callouts, author, CTA band, back links.
   ============================================================ */

/* ---------------- Post hero ---------------- */
.post-hero { padding: clamp(150px, 20vh, 220px) clamp(20px, 4vw, 56px) clamp(36px, 5vh, 56px); }
.post-hero__inner { max-width: 880px; margin: 0 auto; }
.post-hero__crumb { margin-bottom: 22px; opacity: 0.6; }
.post-hero__crumb a { text-decoration: underline; text-underline-offset: 4px; }
.post-hero__crumb a:hover { opacity: 1; }
.post-hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.02; text-wrap: balance;
}
.post-hero__meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; opacity: 0.65; }
.post-hero__img {
  position: relative; max-width: 880px; margin: clamp(36px, 5vh, 56px) auto 0;
  aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden;
}

/* ---------------- Prose ---------------- */
.post-layout { padding: 0 clamp(20px, 4vw, 56px) clamp(80px, 10vh, 120px); }
.post-layout__inner { max-width: 880px; margin: 0 auto; }
/* Reading column: centered, comfortable editorial width */
.post-prose { font-size: 1.08rem; line-height: 1.75; max-width: 42rem; margin-inline: auto; }
.post-prose > * + * { margin-top: 1.2em; }
.post-prose p { text-align: justify; hyphens: auto; text-wrap: pretty; }
.post-prose p.pull-quote { text-align: left; }
.post-prose h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em;
  margin-top: 2.1em; line-height: 1.1;
}
.post-prose h3 { font-size: 1.3rem; font-weight: 600; margin-top: 1.7em; }
.post-prose ul, .post-prose ol { padding-left: 1.3em; display: grid; gap: 0.55em; }
.post-prose ul { list-style: none; }
.post-prose ul > li { position: relative; padding-left: 1.1em; }
.post-prose ul > li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
}
.post-prose ol { list-style: decimal; }
.post-prose li::marker { font-family: var(--font-mono); font-size: 0.85em; color: var(--warm); }
.post-prose a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--coral); }
.post-prose a:hover { color: var(--blue); }
.post-prose strong { font-weight: 600; }
.post-prose figure { margin: 2.2em 0; }
.post-prose figure img { width: 100%; border-radius: 24px; display: block; }
.post-prose figcaption { margin-top: 12px; font-size: 0.85rem; opacity: 0.6; }

/* Callout / summary box — a plum card, the band system in miniature */
.post-callout {
  background: var(--plum); color: var(--plum-text);
  border-radius: 24px; padding: clamp(26px, 4vw, 40px);
  margin: 2.4em 0;
}
.post-callout__title {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 14px;
}
.post-callout p { font-size: 1.06rem; line-height: 1.65; }
.post-callout p + p { margin-top: 0.8em; }

/* Author row — aligned with the centered reading column */
.post-author {
  display: flex; gap: 20px; align-items: center; max-width: 42rem; margin: 3em auto 0;
  border-top: 1px solid var(--line); padding-top: 28px;
}
.post-author__portrait {
  flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; position: relative;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--line);
}
.post-author__portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.post-author strong { font-weight: 600; }
.post-author p { font-size: 0.95rem; opacity: 0.8; max-width: 52ch; }

.post-back { margin: 40px auto 0; max-width: 42rem; }
.post-back a {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.post-back a:hover { color: var(--blue); border-color: var(--blue); }

/* ---------------- Insights index (posts landing) ---------------- */
.insights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 36px); }
.insights-cta { text-align: center; padding-bottom: clamp(70px, 9vh, 110px); }
.insights-cta .statement { max-width: 28ch; margin: 0 auto; }
.insights-cta .pill { margin-top: 30px; background: var(--olive-pill); color: var(--olive-pill-text); }
.insights-cta .pill:hover { transform: scale(1.04); }

/* CTA band reused on post pages */
.post-cta { text-align: center; }
.post-cta .statement { max-width: 28ch; margin: 0 auto; }
.post-cta .pill { margin-top: 30px; background: var(--olive-pill); color: var(--olive-pill-text); }

@media (max-width: 1000px) {
  .insights-grid { grid-template-columns: 1fr; gap: 44px; }
  .blog-card__media { aspect-ratio: 4 / 3; }
}

/* Mobile: justified text reads poorly on narrow screens — back to left */
@media (max-width: 640px) {
  .post-prose p { text-align: left; }
}

/* ---------------- Per-article hero framing ----------------
   Focal point per post: portraits framed by people, not scenery.
   50% 18% lifts the crop so heads stay in frame (16:9 hero). */
body[data-post-slug="our-journey-to-dbmotif"] .post-hero__img img {
  object-position: 50% 18%;
}
