/* =========================================================================
 * post.css — Single blog post template (single.php) unique selectors only.
 * Shared chrome (nav, footer, global map, popup, buttons, mobile bar) lives
 * in global.css. Tokens (--navy, --fire, --display, --body, --ease, etc.) are
 * inherited from global.css :root — never redefined here.
 *
 * Source of truth: gibson-blog-post-toggle.html (Daedalus). Translated 1:1.
 * ========================================================================= */

/* On the single-post template the page background follows the warm chalk
   surface (theme-aware), not the global navy body default. */
body.single { background: var(--chalk); }

/* ══════════════════════════════════════
   REVEALS (parity stubs — no scroll-hide; Googlebot doesn't scroll)
   ══════════════════════════════════════ */
.article-header .rv,
.article-body .rv,
.related .rv,
.cta .rv { opacity: 1; transform: none; transition: none; }

/* ══════════════════════════════════════
   ARTICLE HEADER
   ══════════════════════════════════════ */
.article-header {
  background: linear-gradient(160deg, var(--navy) 0%, var(--deep-purple) 50%, var(--navy-90) 100%);
  position: relative; overflow: hidden;
  padding: 160px 0 56px;
}
.article-header::before {
  content: ''; position: absolute; inset: 0; opacity: 0.035; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.article-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 48px 128px;
  position: relative;
  z-index: 2;
}
.article-eyebrow {
  font-family: var(--body); font-size: 11px; font-weight: 600;
  letter-spacing: 5px; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px;
}
.article-eyebrow-prefix { color: #fff; }
.article-eyebrow-cat { color: var(--fire); text-decoration: none; transition: opacity .2s var(--ease); }
.article-eyebrow-cat:hover { opacity: 0.75; }
/* (decorative dash before the eyebrow removed per Austin 2026-06-05) */
.article-h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 600; line-height: 1.1; color: #fff;
  margin-bottom: 28px; max-width: 760px;
}
.article-overview {
  font-family: var(--display); font-size: 1.15rem; font-weight: 400;
  font-style: italic; color: var(--smoke); line-height: 1.65;
  max-width: 640px; margin-bottom: 32px;
}
.article-meta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--smoke);
}
.article-meta .divider { width: 1px; height: 14px; background: var(--smoke-faint); }
.article-meta-author { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; transition: color .2s var(--ease); }
.article-meta-author:hover .author-name { color: var(--fire); }
.article-meta-author:hover .author-avatar { box-shadow: 0 0 0 2px var(--fire); }
.author-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy-70); display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--fire);
  transition: box-shadow .2s var(--ease);
}
.author-avatar--img { background-size: cover; background-position: center; background-repeat: no-repeat; }

/* ══════════════════════════════════════
   FEATURED IMAGE (editorial overlap)
   ══════════════════════════════════════ */
.article-featured {
  display: flex;
  justify-content: center;
  padding: 0 24px;
}
.article-featured-inner {
  width: 100%;
  max-width: 1100px;
  margin-top: -120px;
  position: relative;
  z-index: 3;
}
.article-featured img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(11, 22, 40, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04);
  background: var(--navy-surface);
}
.article-featured-caption {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--muted-text);
  text-align: center;
  margin-top: 14px;
  font-style: italic;
}

/* ══════════════════════════════════════
   ARTICLE BODY (the_content prose)
   ══════════════════════════════════════ */
.article-body {
  background: var(--chalk);
  padding: 72px 24px 96px;
}
.article-content {
  max-width: 740px; margin: 0 auto;
}
.article-content p {
  font-family: var(--body); font-size: 1rem; color: var(--body-text-strong);
  line-height: 1.85; margin-bottom: 24px;
}
.article-content a {
  color: var(--fire); text-decoration: underline;
  text-decoration-color: rgba(244,100,33,0.3);
  text-underline-offset: 3px; transition: text-decoration-color .3s;
}
.article-content a:hover { text-decoration-color: var(--fire); }
.article-content h2 {
  font-family: var(--display); font-size: 1.6rem; font-weight: 600;
  color: var(--ink); line-height: 1.2;
  margin: 52px 0 20px; padding-left: 20px;
  border-left: 3px solid var(--fire);
}
.article-content h3 {
  font-family: var(--display); font-size: 1.25rem; font-weight: 600;
  color: var(--ink); line-height: 1.3;
  margin: 36px 0 14px;
}
.article-content blockquote {
  font-family: var(--display); font-style: italic;
  font-size: 1.3rem; line-height: 1.6; color: var(--ink);
  border-left: 3px solid var(--fire); margin: 40px 0;
  padding: 8px 0 8px 28px;
}
.article-content blockquote cite {
  display: block; font-family: var(--body);
  font-size: 0.85rem; font-style: normal;
  color: var(--softer-text); margin-top: 10px;
}
.article-content ul {
  list-style: none; margin: 20px 0 28px; padding-left: 0;
}
.article-content ul li {
  font-family: var(--body); font-size: 1rem; color: var(--body-text-strong);
  line-height: 1.85; padding-left: 24px; margin-bottom: 10px;
  position: relative;
}
.article-content ul li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fire);
}
.article-content ol {
  margin: 20px 0 28px; padding-left: 24px;
}
.article-content ol li {
  font-family: var(--body); font-size: 1rem; color: var(--body-text-strong);
  line-height: 1.85; margin-bottom: 10px; padding-left: 6px;
}
.article-content ol li::marker {
  color: var(--fire); font-weight: 600;
}

/* Key Takeaway Box (editor block class inside the_content) */
.article-content .key-takeaway,
.key-takeaway {
  background: var(--navy); border-radius: 4px;
  padding: 36px 40px; margin: 44px 0;
  position: relative; overflow: hidden;
}
.key-takeaway::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--fire);
}
.key-takeaway-label {
  font-family: var(--body); font-size: 11px; font-weight: 600;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--fire); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.key-takeaway-label svg { flex-shrink: 0; }
.key-takeaway p {
  color: rgba(255,255,255,0.85) !important;
  font-size: 1.05rem !important; line-height: 1.75 !important;
  margin-bottom: 0 !important;
}
.key-takeaway p + p { margin-top: 12px !important; }

/* ══════════════════════════════════════
   AUTHOR BIO
   ══════════════════════════════════════ */
.author-bio {
  background: var(--chalk-warm);
  border-top: 3px solid var(--fire);
  padding: 40px 44px;
  margin: 64px auto 0; max-width: 740px;
  display: flex; gap: 28px; align-items: flex-start;
}
.author-bio-photo {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy-80);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--fire);
}
.author-bio-photo--img { background-size: cover; background-position: center; }
.author-bio-info { flex: 1; }
.author-bio-name {
  font-family: var(--display); font-size: 1.3rem; font-weight: 600;
  color: var(--ink); margin-bottom: 2px;
}
.author-bio-title {
  font-family: var(--body); font-size: 0.85rem; font-weight: 500;
  color: var(--fire); letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 12px;
}
.author-bio-text {
  font-family: var(--body); font-size: 0.92rem; color: var(--body-text);
  line-height: 1.75;
}

/* ══════════════════════════════════════
   RELATED POSTS
   ══════════════════════════════════════ */
.related {
  background: var(--chalk); padding: 96px 0;
}
.related-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 48px;
}
.related-heading {
  font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600; color: var(--ink); text-align: center;
  margin-bottom: 48px;
}
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.related-card {
  background: #fff; overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.08);
}
.related-card-img {
  aspect-ratio: 16/10; background: var(--navy-80);
  position: relative; overflow: hidden;
}
.related-card-img-pattern {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='2' fill='rgba(244,100,33,0.08)'/%3E%3C/svg%3E");
  background-size: 40px 40px;
}
.related-card-cat {
  position: absolute; bottom: 12px; left: 12px;
  font-family: var(--body); font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: #fff; background: var(--fire); padding: 4px 10px;
}
.related-card-body { padding: 24px; }
.related-card-title {
  font-family: var(--display); font-size: 1.2rem; font-weight: 600;
  color: var(--ink); line-height: 1.3; margin-bottom: 10px;
}
.related-card-excerpt {
  font-family: var(--body); font-size: 0.88rem; color: var(--body-text-soft);
  line-height: 1.7; margin-bottom: 16px;
}
.related-card-link {
  font-family: var(--body); font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--fire); text-decoration: none; transition: opacity .3s;
}
.related-card-link:hover { opacity: 0.7; }

/* Related cards stay white in BOTH modes (light-card-on-dark-page by design).
   Lock their inner text to light-mode colors so it stays legible in dark mode,
   where --ink / --body-text-soft would otherwise flip to white-on-white. */
[data-theme="dark"] .related-card-title { color: #1a1a1a; }
[data-theme="dark"] .related-card-excerpt { color: #555; }

/* ══════════════════════════════════════
   BOTTOM CTA — single-post variant.
   global.css defines a fire-gradient .cta-btn; the approved blog-post CTA uses
   a navy solid button on a navy>purple>fire gradient band. Scope the override
   to .cta so the global button used elsewhere is untouched.
   ══════════════════════════════════════ */
/* The .cta band (.cta, ::before, h2, p) is canonical in global.css.
   Only this template's container padding + navy button override live here. */
.cta-inner { padding: 0 48px; }
.cta .cta-btn {
  display: inline-block; background: var(--navy); color: #fff;
  text-decoration: none; font-size: 13px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase; padding: 18px 48px;
  border-radius: 0; box-shadow: none;
  transition: transform .3s, box-shadow .3s;
}
.cta .cta-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }

/* ══════════════════════════════════════
   RESPONSIVE — 1024px
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .related-grid { grid-template-columns: 1fr 1fr; }
  .related-grid .related-card:nth-child(3) { display: none; }
}

/* ══════════════════════════════════════
   RESPONSIVE — 768px
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  .article-header { padding: 120px 0 56px; }
  .article-header-inner { padding: 0 24px 128px; }
  .article-h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
  .article-meta { gap: 12px; }
  .article-meta .divider { display: none; }

  .article-body { padding: 48px 20px 72px; }
  .article-content h2 { font-size: 1.4rem; }
  .key-takeaway { padding: 28px 24px; }

  .author-bio {
    flex-direction: column; align-items: center; text-align: center;
    padding: 32px 24px; margin-left: 20px; margin-right: 20px;
  }

  .related { padding: 72px 0; }
  .related-inner { padding: 0 24px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-grid .related-card:nth-child(3) { display: block; }
  .cta-inner { padding: 0 24px; }
}

/* ══════════════════════════════════════
   RESPONSIVE — 720px (featured image overlap)
   ══════════════════════════════════════ */
@media (max-width: 720px) {
  .article-featured { padding: 0 16px; }
  .article-featured-inner { margin-top: -64px; }
  .article-featured img { border-radius: 3px; }
}
