/* ============================================================
   Certant — Blog (index gallery + post template)
   Pairs with design_system/colors_and_type.css + styles/homepage.css
   ============================================================ */

.h2 { font-size: clamp(32px, 4.4vw, 56px); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; }

/* ===== INDEX: HERO ===== */
.bl-hero {
  position: relative;
  padding: clamp(80px, 11vw, 130px) 0 clamp(36px, 5vw, 56px);
  text-align: center;
}
.bl-hero-inner { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.bl-hero h1 { margin-top: 18px; }
.bl-hero .lead { max-width: 620px; margin: 24px auto 0; font-size: 19px; color: var(--fg-2); }

/* ===== SHARED: tags + meta line ===== */
.bl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--brand-teal-10);
  color: var(--brand-teal-dark);
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.bl-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3);
}
.bl-meta .sep { opacity: 0.5; }

/* ===== INDEX: FEATURED (latest post) ===== */
.bl-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg-surface);
  border: 1px solid var(--brand-charcoal-10);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none; color: inherit;
  margin-bottom: 18px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.bl-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-teal); }
.bl-feature-media { position: relative; aspect-ratio: 16 / 10; min-height: 0; overflow: hidden; background: var(--bg-sunken); }
.bl-feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-feature-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; }
.bl-eye {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-teal);
  margin-bottom: 14px;
}
.bl-feature-body h2 {
  font-size: clamp(24px, 2.6vw, 34px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.12;
  margin-bottom: 14px;
}
.bl-feature-body p { font-size: 16px; line-height: 1.65; color: var(--fg-2); margin-bottom: 22px; }
.bl-feature-body .bl-meta { margin-bottom: 20px; }

/* ===== INDEX + RELATED: CARD GRID ===== */
.bl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bl-card {
  background: var(--bg-surface);
  border: 1px solid var(--brand-charcoal-10);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.bl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-teal); }
.bl-card-media {
  aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--brand-charcoal-05);
}
.bl-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.bl-card-body .bl-meta { margin-bottom: 12px; font-size: 10.5px; }
.bl-card-body h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.22; margin-bottom: 10px; }
.bl-card-body p { font-size: 14.5px; line-height: 1.6; color: var(--fg-2); margin-bottom: 20px; }
.bl-cta {
  margin-top: auto;
  font-size: 14px; font-weight: 600;
  color: var(--brand-teal);
  display: inline-flex; align-items: center; gap: 6px;
}
.bl-cta .arr { transition: transform 0.2s; }
.bl-card:hover .bl-cta .arr,
.bl-feature:hover .bl-cta .arr { transform: translateX(4px); }

.bl-note { margin-top: 44px; text-align: center; font-size: 14.5px; color: var(--fg-3); }
.bl-note a { color: var(--brand-teal); font-weight: 600; }

/* ===== INDEX: SUBSCRIBE ===== */
.bl-subscribe { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.bl-subscribe-card {
  background: var(--bg-surface);
  border: 1px solid var(--brand-charcoal-10);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 36px);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.bl-subscribe-copy strong { display: block; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 4px; color: var(--fg-1); }
.bl-subscribe-copy span { font-size: 14px; color: var(--fg-2); }
.bl-subscribe-form { display: flex; gap: 8px; position: relative; }
.bl-subscribe-form input[type="email"] {
  font-family: var(--font-sans); font-size: 14.5px;
  padding: 11px 14px; min-width: 240px;
  background: var(--bg-page);
  border: 1px solid var(--brand-charcoal-10);
  border-radius: 9px; color: var(--fg-1);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bl-subscribe-form input[type="email"]:focus { outline: none; border-color: var(--brand-teal); box-shadow: 0 0 0 3px var(--brand-teal-10); }
.bl-subscribe-status { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.5; }

@media (max-width: 1000px) { .bl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px)  { .bl-feature { grid-template-columns: 1fr; } .bl-feature-media { aspect-ratio: 16 / 9; } }
@media (max-width: 720px)  { .bl-subscribe-card { grid-template-columns: 1fr; } .bl-subscribe-form { flex-direction: column; } .bl-subscribe-form input[type="email"] { min-width: 0; } }
@media (max-width: 640px)  { .bl-grid { grid-template-columns: 1fr; } }

/* ===== POST: HERO ===== */
.post-hero { padding: clamp(72px, 9vw, 110px) 0 clamp(28px, 4vw, 44px); text-align: center; }
.post-hero-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand-teal);
  text-decoration: none;
  margin-bottom: 22px;
}
.post-back i { width: 14px; height: 14px; }
.post-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-hero .bl-tags { justify-content: center; margin-bottom: 18px; }
.post-title {
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.post-standfirst { max-width: 820px; margin: 20px auto 0; font-size: 18px; line-height: 1.55; color: var(--fg-2); }
.post-hero .bl-meta { justify-content: center; margin-top: 24px; }

/* ===== POST: BODY ===== */
.post-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px clamp(56px, 7vw, 88px); }
.post-body {
  background: var(--bg-surface);
  border: 1px solid var(--brand-charcoal-10);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 56px);
  font-size: 17px; line-height: 1.72;
  color: var(--brand-charcoal-80);
  overflow-wrap: break-word;
}
.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body p { margin: 0 0 20px; }
.post-body h2 {
  color: var(--fg-1);
  font-size: clamp(24px, 2.4vw, 30px); font-weight: 700;
  letter-spacing: -0.022em; line-height: 1.15;
  margin: 44px 0 14px;
}
.post-body h3 {
  color: var(--fg-1);
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.25;
  margin: 32px 0 10px;
}
.post-body h4 { color: var(--fg-1); font-size: 17px; font-weight: 600; margin: 26px 0 8px; }
.post-body a { color: var(--brand-teal); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body strong { color: var(--fg-1); font-weight: 600; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 26px; }
.post-body li { margin-bottom: 8px; }
.post-body li > p { margin-bottom: 8px; }
.post-body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--brand-gold);
  font-size: 18px; line-height: 1.6;
  color: var(--fg-2);
  font-style: italic;
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body hr { border: 0; border-top: 1px solid var(--brand-charcoal-10); width: 120px; margin: 40px auto; }
.post-body figure { margin: 32px 0; }
.post-body figure img,
.post-body figure video {
  width: 100%; height: auto; display: block;
  border-radius: 12px;
  border: 1px solid var(--brand-charcoal-10);
  background: var(--bg-sunken);
}
.post-body img { max-width: 100%; height: auto; }
.post-body figcaption {
  margin-top: 10px; text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.02em;
  color: var(--fg-3);
}
.post-body figcaption a { color: var(--fg-3); }
.post-body pre {
  margin: 24px 0;
  padding: 20px 22px;
  background: var(--brand-charcoal);
  color: #E9E6DE;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 13.5px; line-height: 1.55;
  overflow-x: auto; white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.post-body pre code { font: inherit; background: none; padding: 0; color: inherit; }
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--brand-charcoal-05);
  padding: 2px 6px; border-radius: 4px;
  color: var(--fg-1);
}
.post-body .post-embed {
  position: relative; margin: 32px 0;
  aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--brand-charcoal-10);
  background: var(--brand-charcoal);
}
.post-body .post-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-body .post-table { overflow-x: auto; margin: 0 0 24px; -webkit-overflow-scrolling: touch; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0; min-width: 540px; }
.post-body th, .post-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--brand-charcoal-10); vertical-align: top; }
.post-body th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }

/* ===== POST: SOURCE NOTE + AUTHOR ===== */
.post-source {
  margin-top: 18px;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 20px;
  background: var(--bg-sunken);
  border-radius: 12px;
  font-size: 14px; line-height: 1.55;
  color: var(--fg-2);
}
.post-source i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--brand-teal); }
.post-source a { color: var(--brand-teal); font-weight: 600; }
.post-author {
  margin-top: 18px;
  display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: center;
  padding: 22px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--brand-charcoal-10);
  border-radius: 16px;
}
.post-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block; }
.post-author .who { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--fg-1); }
.post-author .role {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand-teal);
  margin: 2px 0 8px;
}
.post-author p { font-size: 14px; line-height: 1.6; color: var(--fg-2); margin: 0; }
.post-author .links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; font-weight: 600; }
.post-author .links a { color: var(--brand-teal); text-decoration: none; }
.post-author .links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ===== POST: MORE + CTA ===== */
.post-more .section-head { margin-bottom: 40px; }
.post-cta {
  background: var(--brand-charcoal);
  color: #fff;
  padding: clamp(72px, 9vw, 104px) 0;
  text-align: center;
}
.post-cta h2 { color: #fff; font-size: clamp(30px, 4vw, 48px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.post-cta p { color: rgba(255,255,255,0.72); font-size: 17px; max-width: 560px; margin: 16px auto 0; }
.post-cta .cta-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

@media (max-width: 640px) {
  .post-body { padding: 22px 18px; font-size: 16px; border-radius: 16px; }
  .post-body pre { font-size: 12.5px; padding: 16px; border-radius: 10px; }
  .post-author { grid-template-columns: 1fr; }
}
