/* ============================================================
   INSIGHTS ARTICLE — Layout-only styles
   Inherits all tokens, nav, footer, buttons from styles.css
   ============================================================ */

/* Newsreader loaded in <head> — not via @import (which blocks the whole stylesheet) */
:root {
  --font-body: 'Newsreader', 'DM Sans', Georgia, serif;
  --content-w: 680px;
}

/* ============ PROGRESS BAR ============ */
.progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--teal); width: 0%; z-index: 9999;
  transition: width 0.1s linear;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  max-width: var(--content-w); margin: 0 auto;
  padding: calc(var(--nav-height, 68px) + 24px) 24px 0;
  font-size: 12px; color: var(--text-dim);
}
.breadcrumb a { color: var(--text-dim); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* ============ ARTICLE HEADER ============ */
.article-header {
  max-width: var(--content-w); margin: 0 auto; padding: 56px 24px 0;
}
.article-cat {
  display: inline-block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--teal); margin-bottom: 24px;
}
.article-header h1 {
  font-family: var(--font-serif); font-size: 42px; font-weight: 400;
  line-height: 1.15; margin-bottom: 24px; letter-spacing: -0.5px;
}
.article-header .subtitle {
  font-family: var(--font-body); font-size: 20px; color: var(--text-secondary);
  font-weight: 300; line-height: 1.5; margin-bottom: 32px; font-style: italic;
}

/* ============ AUTHOR ROW ============ */
.author-row {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 36px; border-bottom: 1px solid var(--border); margin-bottom: 0;
}
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--dark-mid); border: 2px solid rgba(74,155,155,0.25);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 16px; color: var(--teal);
}
.author-info { font-size: 13px; line-height: 1.5; }
.author-info .name { font-weight: 500; color: var(--text-primary); }
.author-info .meta { color: var(--text-dim); }

/* ============ HERO IMAGE ============ */
.hero-img { max-width: 900px; margin: 48px auto; padding: 0 24px; }
.hero-img img {
  width: 100%; border-radius: var(--radius-lg); max-height: 480px;
  object-fit: cover; box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

/* ============ ARTICLE BODY ============ */
.article-body {
  max-width: var(--content-w); margin: 0 auto; padding: 56px 24px 48px;
}
.article-body p {
  font-family: var(--font-body); font-size: 18px; line-height: 1.7;
  color: var(--text-primary); margin-bottom: 24px; font-weight: 300;
}
.article-body p:first-child::first-letter {
  font-family: var(--font-serif); float: left; font-size: 64px;
  line-height: 0.8; padding: 4px 12px 0 0; color: var(--teal);
}
.article-body h2 {
  font-family: var(--font-serif); font-size: 28px; font-weight: 400;
  margin: 64px 0 24px; color: var(--text-primary); letter-spacing: -0.3px;
}
.article-body h3 {
  font-family: var(--font-sans); font-size: 18px; font-weight: 600;
  margin: 48px 0 16px; color: var(--text-primary);
}
.article-body strong { color: var(--text-primary); font-weight: 500; }
.article-body em { font-style: italic; }
.article-body ul, .article-body ol {
  margin: 0 0 24px 20px; font-family: var(--font-body);
  font-size: 18px; line-height: 1.7; color: var(--text-primary); font-weight: 300;
}
.article-body li { margin-bottom: 12px; }
.article-body blockquote {
  border-left: 3px solid var(--teal); margin: 40px 0; padding: 4px 0 4px 24px;
}
.article-body blockquote p {
  font-size: 20px; color: var(--text-primary); font-style: italic; font-weight: 300;
}
.article-body hr { border: none; height: 1px; background: var(--border); margin: 56px 0; }

/* ============ SHARE ROW ============ */
.share-row {
  max-width: var(--content-w); margin: 0 auto; padding: 24px 24px;
  display: flex; align-items: center; gap: 16px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.share-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-dim); font-weight: 500;
}
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(74,155,155,0.25); background: transparent;
  color: var(--text-muted); cursor: pointer; transition: all var(--transition); font-size: 14px;
}
.share-btn:hover {
  border-color: var(--teal); color: var(--teal);
  background: rgba(74,155,155,0.08);
}

/* ============ ARTICLE CTA ============ */
.article-cta {
  max-width: var(--content-w); margin: 64px auto 0; padding: 0 24px;
}
.article-cta-inner {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  border: 1px solid rgba(74,155,155,0.25); border-radius: 16px;
  padding: 56px 48px; text-align: center; position: relative; overflow: hidden;
}
.article-cta-inner::before {
  content: ''; position: absolute; top: -50%; right: -30%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(74,155,155,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--teal); margin-bottom: 20px; font-weight: 600;
}
.article-cta-inner h3 {
  font-family: var(--font-serif); font-size: 24px; font-weight: 400;
  margin-bottom: 12px; position: relative;
}
.cta-sub {
  font-size: 15px; color: var(--text-muted); font-weight: 300;
  margin-bottom: 32px; line-height: 1.5; position: relative;
}
.cta-btn {
  display: inline-block; background: var(--teal); color: var(--dark);
  padding: 14px 32px; border-radius: var(--radius); font-weight: 600;
  font-size: 14px; transition: all var(--transition); letter-spacing: 0.3px; position: relative;
}
.cta-btn:hover {
  background: var(--teal-hover); transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(74,155,155,0.25);
}

/* ============ RELATED ARTICLES ============ */
.related {
  max-width: var(--max-width); margin: 0 auto; padding: 60px 48px 40px;
  border-top: 1px solid var(--border);
}
.related h3 {
  font-family: var(--font-serif); font-size: 22px; font-weight: 400; margin-bottom: 32px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.related-card { display: block; color: inherit; }
.related-card:hover h4 { color: var(--teal); }
.related-img {
  height: 180px; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px;
}
.related-img img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease;
}
.related-card:hover .related-img img { transform: scale(1.03); }
.related-cat {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--teal); font-weight: 600; display: block; margin-bottom: 8px;
}
.related-card h4 {
  font-family: var(--font-serif); font-size: 18px; font-weight: 400;
  line-height: 1.3; margin-bottom: 8px; transition: color var(--transition);
}
.related-meta { font-size: 12px; color: var(--text-dim); }

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .article-header { padding: 40px 20px 0; }
  .article-header h1 { font-size: 30px; }
  .article-header .subtitle { font-size: 17px; }
  .article-body { padding: 40px 20px 32px; }
  .article-body p { font-size: 16px; }
  .article-body h2 { font-size: 24px; margin-top: 48px; }
  .article-body p:first-child::first-letter { font-size: 48px; }
  .hero-img { padding: 0 20px; margin: 36px auto; }
  .related { padding: 40px 20px 24px; }
  .related-grid { grid-template-columns: 1fr; }
  .article-cta { margin: 40px auto 0; padding: 0 20px; }
  .article-cta-inner { padding: 40px 24px; }
  .share-row { padding-left: 20px; padding-right: 20px; }
  .breadcrumb { padding: calc(var(--nav-height, 68px) + 16px) 20px 0; }
}

/* ============================================================
   EDITORIAL UPGRADE (v2) — Principal-page register
   Matches /principal.html: numbered chapters, dropcap per chapter,
   pull-quotes, sign-off, thin transitional rules.
   ============================================================ */

/* Article body runs a chapter counter that increments on each h2 */
.article-body { counter-reset: article-chapter; }

/* Each h2 is now a chapter — numbered, lighter weight, serif, with breath */
.article-body h2 {
  counter-increment: article-chapter;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 72px 0 28px;
  font-family: "DM Serif Display", serif;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: 0;
}

/* Numbered chapter marker in small teal caps — inserted as ::before content */
.article-body h2::before {
  content: counter(article-chapter, decimal-leading-zero);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--teal);
  flex-shrink: 0;
  /* Nudge number to align with baseline of heading */
  align-self: center;
  position: relative;
  top: -0.4em;
}

/* Drop cap on first paragraph after every chapter h2 — larger, tighter, to match Principal */
.article-body h2 + p::first-letter {
  font-family: "DM Serif Display", serif;
  float: left;
  font-size: 3.5em;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--teal);
  font-weight: 400;
}

/* Pull-quote — pulled-out sentence, editorial moment.
   Distinct from <blockquote> which remains for external citations. */
.article-body .pullquote {
  margin: 40px 0;
  padding: 8px 0 8px 24px;
  border-left: 3px solid var(--teal);
  font-family: "Newsreader", serif;
  font-style: italic;
  font-size: clamp(18px, 3.5vw, 22px);
  line-height: 1.45;
  color: var(--text-primary);
  font-weight: 400;
}

/* Thin transitional rule — narrative breath between beats */
.article-body .article-rule {
  border: 0;
  height: 1px;
  background: rgba(143, 163, 176, 0.15);
  max-width: 120px;
  margin: 40px auto;
}

/* Editorial sign-off — matches Principal close register */
.article-close {
  max-width: var(--content-w);
  margin: 40px auto 0;
  padding: 32px 24px 48px;
  border-top: 1px solid rgba(143, 163, 176, 0.15);
  text-align: center;
}
.article-close-sig {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  color: var(--text-primary);
  margin: 0 0 4px;
  font-weight: 400;
}
.article-close-meta {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin: 0;
  font-weight: 300;
}

@media (min-width: 720px) {
  .article-body h2 { margin-top: 88px; }
  .article-body .pullquote {
    margin: 48px 0;
    padding: 12px 0 12px 32px;
  }
  .article-close { padding: 36px 32px 56px; }
}

@media (max-width: 600px) {
  .article-body h2 { gap: 10px; margin-top: 56px; font-size: 22px; }
  .article-body .pullquote { margin: 32px 0; padding: 6px 0 6px 18px; }
  .article-close { padding: 28px 20px 36px; margin-top: 32px; }
}

/* Desktop body size bump — matches Principal page */
@media (min-width: 960px) {
  .article-body p,
  .article-body ul,
  .article-body ol { font-size: 20px; line-height: 1.75; }
}

/* ============================================================
   RELATED ARTICLES — quieten, editorialise
   Match the register of the article body and sign-off above.
   ============================================================ */

/* Hide the category pills on related cards — same call as the hub */
.related-cat { display: none; }

/* Section heading: larger, more editorial, more space */
.related h3 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 400;
  margin-bottom: 40px;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0;
}

/* Soften related section top border and increase breath */
.related {
  border-top: 1px solid rgba(143, 163, 176, 0.12);
  padding-top: 72px;
}

/* Card title — serif, more considered */
.related-card h4 {
  font-family: "DM Serif Display", serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 6px;
  color: var(--text-primary);
  transition: color var(--transition);
}

/* Meta — lighter, smaller, DM Sans */
.related-meta {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Softer card images */
.related-img {
  height: 160px;
  margin-bottom: 18px;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.related-card:hover .related-img { opacity: 1; }

/* ============================================================
   ARTICLE CTA — quieten to match ghost-button register
   The teal filled button is the site-wide primary action. Inside
   the editorial flow of an article, it competes visually with the
   sign-off; reduce it to an outlined/ghost treatment so the hierarchy
   reads: article → sign-off → quiet invitation → related reading.
   ============================================================ */

.article-cta {
  margin-top: 64px;
  margin-bottom: 64px;
}
.article-cta-inner {
  background: transparent;
  border: 1px solid rgba(143, 163, 176, 0.15);
  border-radius: var(--radius, 6px);
  padding: 40px 32px;
  text-align: center;
}
.article-cta-inner::before { display: none; }

.cta-label {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.article-cta-inner h3 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.cta-sub {
  font-family: "Newsreader", serif;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 24px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* Ghost button to match Principal close links register */
.cta-btn {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}
.cta-btn:hover {
  background: rgba(74, 155, 155, 0.08);
  transform: none;
  box-shadow: none;
}
