/* ============== THERAPY IN MARLOW — LONG-FORM PAGE STYLES ==============
   Opt-in (loaded via `extra_css` frontmatter) — styles the rich, long-form
   article body used by service / condition pages (e.g. narcissistic abuse
   recovery). Landing-page macros stay in components.css; this file only adds
   the prose + supporting blocks a depth page needs. Tokens only, no hex. */

/* ---------- BREADCRUMB ----------
   Promote from inline text to soft chip-pills so the trail reads as
   navigation, not body copy — naked text on a hero photo gets lost on
   the cream scrim. Each segment is a pilled chip; the current page
   gets the brand-purple "active" pill so the location is unmissable.
   On a hero--bg photo the chips switch to a white wash for legibility. */
.crumbs { font-size: .82rem; letter-spacing: .01em; margin-bottom: 22px; }
.crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: inline-flex; flex-wrap: wrap;
  gap: 6px 2px;
  align-items: center;
}
.crumbs li { display: inline-flex; align-items: center; gap: 2px; }
.crumbs li:not(:last-child)::after {
  content: "›"; color: var(--accent); font-weight: 700;
  font-size: 1.05rem; line-height: 1; margin: 0 4px;
}
.crumbs a, .crumbs [aria-current="page"] {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
  border: 1px solid var(--c-cream-deep);
  background: rgba(251, 243, 228, .65);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.crumbs a { color: var(--accent); }
.crumbs a:hover {
  color: var(--primary); background: var(--c-cream); border-color: var(--accent);
}
.crumbs [aria-current="page"] {
  color: var(--primary);
  background: rgba(94, 45, 127, .08);
  border-color: rgba(94, 45, 127, .18);
}
/* Over a photo hero, switch to a white wash so the chips read on any image */
.hero--bg .crumbs a {
  color: var(--c-plum-deep);
  background: rgba(255, 255, 255, .78);
  border-color: rgba(255, 255, 255, .9);
}
.hero--bg .crumbs a:hover {
  color: var(--primary); background: #fff; border-color: var(--accent);
}
.hero--bg .crumbs [aria-current="page"] {
  color: var(--primary);
  background: rgba(255, 255, 255, .9);
  border-color: rgba(94, 45, 127, .2);
}

/* ---------- ARTICLE PROSE ---------- */
.article { max-width: 72ch; margin: 0 auto; }
.article > * + * { margin-top: 1.1rem; }
.article h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.3rem); margin-top: clamp(2.4rem, 4vw, 3.4rem);
  position: relative; padding-top: 1.2rem;
}
.article h2::before {
  content: ""; position: absolute; top: 0; left: 0; width: 52px; height: 3px;
  border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--c-sage));
}
.article h3 { margin-top: 2rem; color: var(--c-clay-deep); }
.article p, .article li { color: var(--ink); }
.article .lede { font-size: clamp(1.12rem, 1.7vw, 1.32rem); color: var(--c-clay-deep); max-width: none; }
.article a:not(.btn) { color: var(--primary); font-weight: 600; text-decoration: underline; text-decoration-color: var(--c-cream-deep); text-underline-offset: 3px; }
.article a:not(.btn):hover { text-decoration-color: var(--accent); }
.article ul, .article ol { padding-left: 1.3em; }
.article ul li, .article ol li { margin-top: .5rem; }

/* ---------- DEFINITION / KEY-TERM CALLOUT ---------- */
.art-define {
  margin: 1.8rem auto; padding: clamp(20px,3vw,30px) clamp(22px,3vw,32px);
  background: var(--surface-tint); border-radius: var(--r-md);
  border-left: 4px solid var(--accent); box-shadow: var(--shadow-soft);
}
.art-define b { color: var(--primary); }
.art-define p:last-child { margin-bottom: 0; }

/* ---------- SIGNS CHECKLIST ---------- */
.art-signs { list-style: none; padding: 0; margin: 1.4rem 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 12px 24px; }
.art-signs li {
  position: relative; padding: 4px 0 4px 34px; margin: 0; line-height: 1.5;
}
.art-signs li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50% 0 50% 50%;
  background: var(--surface-tint); border: 1.5px solid var(--c-sage);
}
.art-signs li::after {
  content: ""; position: absolute; left: 7px; top: 9px; width: 8px; height: 5px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* ---------- PAGE INFOGRAPHIC (brand-purple visual at top of article, task #9739) ----------
   Sits at the head of an .article block, between trustBar/hero and the lede.
   Brand-purple gradient frame + cream backdrop; image is 16:9, rounded, soft
   shadow. Caption is small, centred, italicised — sits below the image card
   like a museum-plate label. Data: src/_data/pageInfographics.json. */
.art-infographic {
  margin: 0 auto 2rem;
  max-width: 760px;
  text-align: center;
}
.art-infographic-frame {
  position: relative;
  padding: 10px;
  border-radius: calc(var(--r-md) + 6px);
  background: linear-gradient(135deg, var(--c-plum) 0%, var(--c-clay-deep) 55%, var(--c-clay) 100%);
  box-shadow: 0 18px 38px -22px rgba(58, 31, 92, 0.55), 0 2px 6px rgba(58, 31, 92, 0.08);
}
.art-infographic-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--c-cream);
}
.art-infographic-caption {
  display: block;
  margin-top: 14px;
  padding: 0 6px;
  color: var(--c-clay-deep);
  font-size: .92rem;
  line-height: 1.5;
}
.art-infographic-eyebrow {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.art-infographic-text { font-style: italic; }

@media (max-width: 600px) {
  .art-infographic { margin-bottom: 1.4rem; }
  .art-infographic-frame { padding: 6px; }
  .art-infographic-caption { font-size: .85rem; }
}

/* ---------- EMBEDDED BLOCKQUOTE (inline pull-quote inside an article body) ----------
   Retires the legacy .art-aside. The blockQuote() macro with `embedded: true`
   emits a <figure class="bquote bquote--left bquote--embedded"> directly into
   the article flow — these rules strip the editorial outer padding + 980px
   max-width so the figure sits between paragraphs instead of behaving like a
   full-width section. Typography (serif italic, accent left-rule) is inherited
   from .bquote / .bquote--left in components.css. */
.bquote--embedded {
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  margin: 2rem 0;
  max-width: 100%;
}
.bquote--embedded .bquote-text { max-width: 100%; }

/* ---------- META DATES (YMYL review-date strip) ----------
   Inline trust line — Published · Last reviewed · Reviewed by. Sits under H1
   inside the article AND again at article foot (alongside crisisSignpost) as a
   confidence reaffirmation. Visible strings must mirror the page's Article
   JSON-LD dates 1:1 — both are driven from the page frontmatter, not duplicated. */
.meta-dates {
  margin: 0 0 1.6rem; padding: 12px 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
  font-size: .85rem; color: var(--mute);
  border-top: 1px solid var(--c-cream-deep);
  border-bottom: 1px solid var(--c-cream-deep);
}
.meta-dates-item { display: inline-flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.meta-dates-label { font-weight: 700; color: var(--c-clay-deep); letter-spacing: .01em; }
.meta-dates-label::after { content: ":"; }
.meta-dates-sep { color: var(--c-cream-deep); }
.meta-dates a { color: var(--accent); font-weight: 600; text-decoration: none; }
.meta-dates a:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta-dates time { font-variant-numeric: tabular-nums; }

/* Framed variant — when the macro is called with `framed: true` it wraps in
   its own thin section (paired with crisisSignpost at article foot). The
   border-band styling above looks heavy when it's also a section divider, so
   strip the rules and lean on the section's own paper/tint background. */
.meta-dates-section { padding-block: clamp(20px, 2.4vw, 32px); }
.meta-dates-section .meta-dates { border: 0; padding: 0; margin: 0; justify-content: center; }

/* ---------- RELATED / INTERNAL-LINK MESH ---------- */
.art-related { max-width: var(--maxw-mid); margin: 0 auto; }
.art-related-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-top: 8px; }
/* Count-aware layout (#10488): single row on desktop for ≤5 cards (no orphan
   second row); the macro passes the balanced column count via --related-cols.
   Scoped :not(.blog-index-grid) so the blog index keeps its own auto-fit. */
@media (min-width: 600px) {
  .art-related-grid:not(.blog-index-grid) { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 900px) {
  .art-related-grid:not(.blog-index-grid) { grid-template-columns: repeat(var(--related-cols, 3), minmax(0,1fr)); }
}
.art-related-card {
  display: block; padding: clamp(22px,3vw,28px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.art-related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--c-sage); }
.art-related-card h3 { color: var(--primary); margin: 0 0 6px; font-size: 1.18rem; }
.art-related-card p { color: var(--mute); margin: 0 0 12px; font-size: .95rem; }
.art-related-card .art-related-more { color: var(--accent); font-weight: 600; font-size: .92rem; }

/* Inner hero: left-align the long-form banner so it reads like an article head.
   The right-hand portrait (drawn via ::after, ≥980px only) lets the text column
   sit comfortably narrow on the left without stranding empty hero on the right. */
.hero--inner.hero--article { text-align: left; }
.hero--inner.hero--article .wrap--mid { margin-inline: 0; max-width: 62ch; }
.hero--inner.hero--article h1 {
  margin-inline: 0; max-width: 18ch;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.08;
}
.hero--inner.hero--article .eyebrow { position: relative; padding-bottom: 14px; }
.hero--inner.hero--article .eyebrow::after {
  content: ""; display: block; position: absolute; left: 0; bottom: 0;
  width: 56px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.hero--inner.hero--article .lede {
  margin-inline: 0; margin-top: 18px;
  font-size: clamp(1.08rem, 1.45vw, 1.22rem);
  max-width: 56ch;
}
.hero--inner.hero--article .hero-bullets { margin-inline: 0; margin-top: 22px; justify-content: flex-start; }
.hero--inner.hero--article .hero-cta { justify-content: flex-start; display: flex; margin-top: 30px; }

/* Desktop: real 60/40 grid — text column LEFT 60%, portrait RIGHT 40%.
   Was an absolutely-positioned ::after floating in the right gutter, which
   left a big dead space between the narrow text column and the off-canvas
   image. Now the wrap--mid IS the grid container; text children fall in
   column 1, the portrait sits as ::after in column 2. */
@media (min-width: 980px) {
  .hero--inner.hero--article .wrap--mid {
    display: grid;
    grid-template-columns: 60% 40%;
    column-gap: clamp(32px, 4vw, 64px);
    align-items: start;
    /* Fill to the nav-container width (--maxw). NOTE: `.hero` is a flex column,
       and `margin-inline: auto` on a grid child overrides flex stretch — the
       grid then shrinks to its content (~62ch) and sits NARROWER than the nav
       (#10508). `width: 100%` forces it to fill the max-width so the hero
       container lines up with the header/nav .wrap (1240px) for consistency. */
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    position: relative;
  }
  /* Every text child stays in column 1, full width of that column. */
  .hero--inner.hero--article .wrap--mid > * { grid-column: 1; max-width: none; }
  .hero--inner.hero--article h1 { max-width: 20ch; }
  .hero--inner.hero--article .lede { max-width: 56ch; }
  /* Portrait — column 2, vertically centred across the full text-column height.
     `grid-row: 1 / -1` doesn't span implicit rows (resolves to line 2 = row 1
     only), which would stretch row 1 to the portrait's height and trap the
     breadcrumb in a 400px-tall row centred-aligned (#9733). `span 100` forces
     the portrait across all implicit rows so its size never bloats a row. */
  .hero--inner.hero--article .wrap--mid::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / span 100;
    justify-self: center;
    align-self: center;
    width: 100%;
    max-width: clamp(300px, 32vw, 440px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
      url('/images/keeley-portrait.webp') center / cover no-repeat,
      var(--c-cream);
    box-shadow:
      0 0 0 8px var(--c-cream),
      0 0 0 10px rgba(184, 150, 90, .55),
      0 36px 80px -28px rgba(58, 31, 92, .42),
      0 12px 24px -10px rgba(58, 31, 92, .25);
    z-index: 1;
  }
}

@media (max-width: 979px) {
  /* Below the 2-col breakpoint: keep left-aligned but unconstrained text width. */
  .hero--inner.hero--article .wrap--mid { max-width: 62ch; }
}
@media (max-width: 720px) {
  .hero--inner.hero--article { text-align: center; }
  .hero--inner.hero--article .wrap--mid { margin-inline: auto; }
  .hero--inner.hero--article h1, .hero--inner.hero--article .hero-bullets,
  .hero--inner.hero--article .hero-cta { margin-inline: auto; justify-content: center; }
  .hero--inner.hero--article .eyebrow::after { left: 50%; transform: translateX(-50%); }
  /* Centre the chip-pill breadcrumb row when the hero centres */
  .hero--inner.hero--article .crumbs { text-align: center; }
  .hero--inner.hero--article .crumbs ol { justify-content: center; }
}

/* ---------- MOBILE POLISH (≤620px) — article-hero rhythm ----------
   The default hero stack (eyebrow → underline → H1 → lede → bullets → CTAs)
   spreads too wide on narrow viewports — H1 wraps to 3 lines, trust bullets
   render as 3 plain centred paragraphs, generous gaps push the article body
   off-screen. This block tightens the vertical rhythm and chips the trust
   facts so they read as visible signals instead of body copy. */
@media (max-width: 620px) {
  /* Shorter hero box so the article body comes into view sooner */
  .hero--inner.hero--article {
    min-height: auto;
    padding-top: clamp(28px, 7vw, 44px);
    padding-bottom: clamp(28px, 6vw, 40px);
  }
  /* H1: drop the floor so the title fits in 2 lines on a 375px viewport */
  .hero--inner.hero--article h1 {
    font-size: clamp(1.85rem, 7.4vw, 2.4rem);
    line-height: 1.14;
    max-width: 16ch;
  }
  /* Quieter eyebrow so it doesn't compete with the brand-purple chips above */
  .hero--inner.hero--article .eyebrow {
    font-size: .72rem;
    letter-spacing: .16em;
    padding-bottom: 10px;
  }
  .hero--inner.hero--article .eyebrow::after { width: 42px; }
  /* Tighten the vertical stack — was 18→22→30, now 12→16→22 */
  .hero--inner.hero--article .lede {
    margin-top: 14px;
    font-size: 1.02rem;
    line-height: 1.55;
  }
  .hero--inner.hero--article .hero-bullets { margin-top: 18px; gap: 8px; }
  .hero--inner.hero--article .hero-cta { margin-top: 22px; }

  /* Trust bullets → pilled chips so they stop reading as plain paragraphs.
     White wash + sage border + slight shadow gives each fact its own visual
     weight against the cream-scrim hero background. Stacked column on
     mobile so a long credential line doesn't wrap unevenly across rows. */
  .hero--inner.hero--article .hero-bullets {
    flex-direction: column;
    align-items: center;
  }
  .hero--inner.hero--article .hero-bullets li {
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--c-sage);
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    font-size: .9rem;
    line-height: 1.3;
    max-width: 100%;
    box-shadow: 0 1px 4px -2px rgba(58, 31, 92, .14);
  }
  .hero--inner.hero--article .hero-bullets li::before {
    width: 16px; height: 16px;
    -webkit-mask-size: 10px;
    mask-size: 10px;
  }

  /* Crumb chips a touch smaller on mobile so a 3-segment trail fits on one row */
  .crumbs { font-size: .76rem; margin-bottom: 16px; }
  .crumbs a, .crumbs [aria-current="page"] { padding: 4px 10px; }
  .crumbs li:not(:last-child)::after { margin: 0 2px; font-size: .95rem; }
}
/* Changemakers brochure download CTA (#9761) */
.brochure-cta{display:flex;flex-wrap:wrap;align-items:center;gap:clamp(24px,3vw,40px);margin:clamp(40px,6vw,72px) 0;padding:clamp(28px,4vw,44px);background:var(--primary);color:#fff;border-radius:var(--r-lg)}
.brochure-cta__body{flex:1 1 280px}
.brochure-cta__body h2{margin:0 0 .6rem;color:#fff;font-size:1.3rem;line-height:1.25}
.brochure-cta__body p{margin:0;color:rgba(255,255,255,.9);line-height:1.6}
.brochure-dl{display:inline-flex;align-items:center;gap:.5rem;background:#fff;color:var(--primary);border:0;flex:0 0 auto} /* white-on-purple — the box itself is --primary, so a purple button would vanish (#10502) */
.brochure-dl:hover{background:var(--c-cream,#fbf3e4);color:var(--c-plum-deep,#3a1f5c)}
.brochure-dl svg{width:1.15em;height:1.15em;flex:0 0 auto}
@media(max-width:640px){.brochure-cta{flex-direction:column;align-items:stretch;text-align:center}.brochure-cta__body{flex:0 0 auto}.brochure-dl{justify-content:center}}
