/*
 * GFS Single-post layout — Sprint 8 Phase 2
 * Loaded only on single posts that have _gfs_post_variant meta set.
 * Builds on gfs-kit-v2.css typography + patterns. Adds variant-specific
 * layout (article / howto / chapter / ticker / course).
 *
 * Class scoping: every selector lives under .gfs-post or .gfs-post--{variant}
 * so it can't bleed into other post types or homepage rendering.
 */

/* ===================================================================
   KIT OVERRIDES — same LTR button-arrow fix as gfs-home.css
   =================================================================== */
.gfs-post .gfs-btn::after { transform: none; }

/* ===================================================================
   HERO — navy band with title + deck + byline
   =================================================================== */
.gfs-post__hero {
  padding: 64px 32px 80px;
  position: relative;
  overflow: hidden;
}
.gfs-post__hero-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.gfs-post__hero .gfs-h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 24ch;
}
.gfs-post__hero--chapter .gfs-h1 {
  font-size: clamp(44px, 7vw, 88px);
  letter-spacing: -0.035em;
  max-width: 22ch;
}
.gfs-post__hero--ticker {
  padding: 40px 32px 48px;
}
.gfs-post__hero--ticker .gfs-h1 {
  font-size: clamp(28px, 4vw, 48px);
  max-width: 30ch;
}
.gfs-post__deck {
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 300;
  line-height: 1.55;
  max-width: 60ch;
  margin: 0;
}

/* Byline strip */
.gfs-post__byline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  letter-spacing: 0.02em;
  margin: 12px 0 0;
}
.gfs-post__byline-author {
  color: #fff;
  font-weight: 700;
}

/* ===================================================================
   BODY — reading column for narrative variants; wide for ticker/course
   =================================================================== */
.gfs-post__body {
  background: var(--gfs-cream);
  padding: 64px 32px 80px;
}
.gfs-post__body .gfs-container--reading { max-width: var(--gfs-w-reading); }
.gfs-post__body .gfs-container--wide   { max-width: var(--gfs-w-wide); }

/* Featured image */
.gfs-post__hero-img {
  margin: -40px 0 32px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(6,20,43,.2);
}
.gfs-post__hero-img img {
  display: block;
  width: 100%;
  height: auto;
}
.gfs-post__hero-img figcaption {
  background: rgba(6,20,43,.04);
  color: var(--gfs-muted);
  font-size: 13px;
  font-style: italic;
  padding: 10px 16px;
  text-align: center;
}

/* Content prose */
.gfs-post__content {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--gfs-ink);
}
.gfs-post__content > p {
  margin: 0 0 20px;
}
/* Sprint 9.A Hotfix selector (0,2,1) — must beat .elementor-kit-275476 h2
 * Sprint 9.B (2026-05-22): switched from `>` (direct child) to descendant.
 * ~150 howto posts migrated from CEX.IO have h2s wrapped in
 * <div class="intercom-interblocks-subheading">, so the direct-child
 * combinator missed them and the Elementor blue (rgb(0,109,180)) won.
 * Descendant matches both direct + wrapped — still (0,2,1) specificity. */
.gfs-post .gfs-post__content h2 {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--gfs-ink-strong);
  margin: 48px 0 16px;
}
.gfs-post__content > h3 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.015em;
  color: var(--gfs-ink-strong);
  margin: 40px 0 12px;
}
.gfs-post__content > h4 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--gfs-ink-strong);
  margin: 32px 0 10px;
}
.gfs-post__content > ul,
.gfs-post__content > ol {
  margin: 0 0 24px 24px;
}
.gfs-post__content > ul li,
.gfs-post__content > ol li {
  margin: 0 0 10px;
}
.gfs-post__content > blockquote {
  border-left: 4px solid var(--gfs-amber);
  margin: 32px 0;
  padding: 8px 0 8px 24px;
  font-family: "Inter", sans-serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  color: var(--gfs-ink-strong);
}
.gfs-post__content > pre {
  background: #0f1419;
  color: #f8f8f2;
  padding: 18px 22px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: "JetBrains Mono", "Menlo", monospace;
  font-size: 14px;
  line-height: 1.65;
  margin: 28px 0;
}
.gfs-post__content > p code,
.gfs-post__content > li code {
  background: var(--gfs-cream-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: "JetBrains Mono", "Menlo", monospace;
  font-size: 0.92em;
  color: var(--gfs-ink-strong);
}
.gfs-post__content a {
  color: var(--gfs-amber-deep, #b8862e);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gfs-post__content a:hover { color: var(--gfs-ink-strong); }

/* ===================================================================
   VARIANT: ARTICLE — long-form research; drop-cap on first paragraph
   =================================================================== */
.gfs-post--article .gfs-post__content > p:first-of-type::first-letter {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 68px;
  line-height: 0.85;
  float: left;
  margin: 6px 12px 0 0;
  color: var(--gfs-ink-strong);
}

/* ===================================================================
   VARIANT: HOWTO — workspace-style; heavier h2/h3 + numbered step look
   =================================================================== */
.gfs-post--howto .gfs-post__content > h2 {
  font-size: 36px;
  position: relative;
  padding-left: 56px;
  counter-increment: gfs-step;
}
.gfs-post--howto .gfs-post__content {
  counter-reset: gfs-step;
}
.gfs-post--howto .gfs-post__content > h2::before {
  content: counter(gfs-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 4px;
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 32px;
  color: var(--gfs-amber);
  letter-spacing: -0.02em;
}

/* ===================================================================
   VARIANT: CHAPTER — even larger headings, narrow reading column
   =================================================================== */
.gfs-post--chapter .gfs-post__content {
  font-size: 19px;
  line-height: 1.8;
}
.gfs-post--chapter .gfs-post__content > h2 {
  font-size: 40px;
  font-weight: 200;
  letter-spacing: -0.025em;
  border-top: 1px solid var(--gfs-line);
  padding-top: 32px;
  margin-top: 64px;
}

/* ===================================================================
   VARIANT: TICKER — minimal layout, wide container, tight typography
   =================================================================== */
.gfs-post--ticker .gfs-post__body {
  padding: 40px 32px 56px;
}
.gfs-post--ticker .gfs-post__content {
  font-size: 16px;
  line-height: 1.65;
}
.gfs-post--ticker .gfs-post__content > h2 {
  font-size: 22px;
  margin: 28px 0 10px;
}

/* ===================================================================
   VARIANT: COURSE — affiliate CTA at end + hybrid layout
   =================================================================== */
.gfs-post__course-cta {
  margin: 48px 0 0;
  padding: 40px 32px;
  border-radius: 16px;
  text-align: center;
}
.gfs-post__course-cta .gfs-h2 {
  max-width: 26ch;
  margin: 0 auto 20px;
}
.gfs-post__course-cta .gfs-h2 .gfs-light,
.gfs-post__course-cta .gfs-h2 .gfs-heavy { display: inline; }

/* ===================================================================
   TAGS FOOTER
   =================================================================== */
.gfs-post__tags {
  margin: 56px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--gfs-line);
}
.gfs-post__tags .gfs-kicker {
  color: var(--gfs-muted);
  margin: 0 0 12px;
  display: block;
}
.gfs-post__tags ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ===================================================================
   RELATED POSTS — 3-col cardgrid (kit-provided), navy band
   =================================================================== */
.gfs-post__related {
  background: var(--gfs-ink-strong);
  color: #fff;
  padding: 64px 32px;
}
.gfs-post__related .gfs-kicker { color: var(--gfs-amber); margin: 0 0 8px; }
.gfs-post__related-title {
  color: #fff;
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.02em;
  text-transform: none;
  display: block;
  margin: 0 0 28px;
}
.gfs-post__related .gfs-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}
.gfs-post__related .gfs-card:hover { border-color: var(--gfs-amber); }
.gfs-post__related .gfs-card-hd {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gfs-post__related .gfs-card .gfs-kicker {
  color: var(--gfs-amber);
  margin: 0;
}
.gfs-post__related .gfs-card .gfs-h3 {
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.gfs-post__related .gfs-card-foot {
  padding: 12px 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: var(--gfs-amber);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ===================================================================
   PAGINATION (wp_link_pages output)
   =================================================================== */
.gfs-post__pagelinks {
  margin: 32px 0 0;
  padding: 12px 16px;
  background: var(--gfs-cream-2);
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
}
.gfs-post__pagelinks a {
  display: inline-block;
  margin: 0 6px;
  color: var(--gfs-ink-strong);
}

/* ===================================================================
   RESPONSIVE — collapse paddings on small screens
   =================================================================== */
@media (max-width: 720px) {
  .gfs-post__hero { padding: 40px 20px 56px; }
  .gfs-post__body { padding: 40px 20px 56px; }
  .gfs-post__hero-img { margin: -28px 0 24px; border-radius: 12px; }
  .gfs-post__content { font-size: 16px; }
  .gfs-post--chapter .gfs-post__content { font-size: 17px; }
  .gfs-post--howto .gfs-post__content > h2 { font-size: 26px; padding-left: 44px; }
  .gfs-post__related { padding: 48px 20px; }
}
