/*
Theme Name: Breaking Chains
Description: Hand-built theme for Breaking Chains Therapy. One site, two paths.
Version: 0.5.4
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: breaking-chains
*/

/* Breaking Chains Therapy — Version A "Clone"
   Tokens measured from cloe-brooks.themerex.net/home-7/ at 1280px.
   See ../design-system.md. Australian spelling throughout. */

/* ---------- tokens ---------- */
:root {
  --cream: #FBF4E6;
  --white: #FFFFFF;
  --green: #142E29;
  --ink: #1F1F1F;
  --ink-2: #312E2A;
  --olive: #708840;          /* fills and rules only, 3.63:1, never text */
  --olive-text: #5C6F35;     /* accent as text or button ground on light, 5.08:1 */
  --olive-text-dark: #8CA657;/* accent as text on green or ink, 5.31:1 */
  --olive-dim: #4F5D2C;
  --text: #6C6964;
  --text-dark: #BBBBBB;
  --head: #1E1E1E;
  --head-dark: #FFFEFE;
  --rule: #DCD3BE;
  --rule-dark: rgba(255, 255, 255, 0.14);

  --display: Tinos, "Times New Roman", Times, serif;
  --body: Mulish, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1130px;
  --band: 110px;
  --gap: 30px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* the JS owns smooth scrolling; keep the native one for anyone it turns itself off for */
html:not(.has-inertia) { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 300;
  line-height: 28.5px;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--head);
  margin: 0;
  letter-spacing: 0;
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--olive); color: #fff; padding: 12px 20px; z-index: 999;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.band { padding: var(--band) 0; }
.band--cream { background: var(--cream); }
.band--white { background: var(--white); }
.band--green { background: var(--green); }
.band--ink   { background: var(--ink); }

.band--green h1, .band--green h2, .band--green h3, .band--green h4,
.band--ink h1, .band--ink h2, .band--ink h3, .band--ink h4 { color: var(--head-dark); }
.band--green, .band--ink { color: var(--text-dark); }

/* ---------- the section header triplet ---------- */
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.sec-head h2 { font-size: 55px; line-height: 55px; }
.sec-head .rule {
  width: 40px; height: 1px; background: var(--olive);
  margin: 18px auto 0; border: 0;
}
.sec-head .sub {
  margin: 18px 0 0;
  font-size: 14px; line-height: 24px; font-weight: 300;
  letter-spacing: 1.1px; text-transform: uppercase;
}
.eyebrow {
  font-size: 14px; font-weight: 300; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--text); margin: 0 0 12px;
}

/* ---------- buttons ---------- */
.pill {
  display: inline-block;
  border-radius: 25.5px;
  padding: 17px 37px;
  background: var(--olive-text);
  color: #fff;
  font-size: 15px; font-weight: 400; line-height: 1;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background 300ms ease;
}
.pill:hover { background: var(--green); }
.pill--ghost {
  background: transparent; color: var(--head);
  box-shadow: inset 0 0 0 1px var(--olive-text);
}
.pill--ghost:hover { background: var(--olive-text); color: #fff; }
.band--green .pill--ghost, .band--ink .pill--ghost, .hero .pill--ghost { color: var(--head-dark); }
.band--green .pill--ghost, .band--ink .pill--ghost { box-shadow: inset 0 0 0 1px var(--olive-text-dark); }
.band--green .card .cat, .band--ink .card .cat,
.band--green .root-card .n, .band--ink .root-card .n,
.band--green .root-card .grow, .band--ink .root-card .grow,
.band--green .index-row .n, .band--ink .index-row .n,
.band--green .index-row .go, .band--ink .index-row .go,
.band--green .source a, .band--ink .source a,
.band--green .eyebrow, .band--ink .eyebrow,
.band--green .faq summary::after, .band--ink .faq summary::after,
.band--green .cap, .band--ink .cap { color: var(--olive-text-dark); }
.hero .pill--ghost { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55); backdrop-filter: blur(2px); }

.sq {
  display: inline-block;
  border-radius: 25.5px;
  padding: 11px 22px;
  background: var(--olive-text);
  color: #fff;
  font-size: 13px; line-height: 1; text-decoration: none;
  transition: background 300ms ease;
}
.sq:hover { background: var(--olive-dim); }

/* ---------- utility bar ---------- */
.utility {
  background: var(--ink);
  color: var(--text-dark);
  font-size: 13px;
  position: relative; z-index: 3;
}
.utility .wrap {
  display: flex; align-items: center; gap: 28px;
  min-height: 50px;
}
.utility a { text-decoration: none; }
.utility a:hover { color: #fff; }
.utility .spacer { margin-left: auto; }
.utility .sq { display: inline-flex; align-items: center; }
/* logged in to WordPress: its 32px bar pushes the utility bar down, so the floating header moves with it */
@media (min-width: 769px) { body.admin-bar .site-head { top: 82px; } }
@media (min-width: 769px) and (max-width: 782px) { body.admin-bar .site-head { top: 96px; } }

/* ---------- header ---------- */
.site-head {
  position: absolute; top: 50px; left: 0; right: 0; z-index: 20;   /* above the hero layers, so the nav is always clickable */
  padding: 26px 0;
}
.site-head .wrap { display: flex; align-items: center; gap: 40px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 74px; height: auto; object-fit: contain; }
.brand .name {
  font-family: var(--display); font-size: 25px; line-height: 1.05;
  color: var(--head-dark); letter-spacing: 0.01em;
}
/* The name and "Therapy" are one unit, as in the logo artwork: "Therapy" sits tight under
   the name, between two hairlines, and spans the name's width. */
.brand > span:last-child { display: inline-flex; flex-direction: column; line-height: 1; }
.brand > span:last-child br { display: none; }
.brand .tag {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
  font-family: var(--body); font-size: 10px; font-weight: 500; line-height: 1;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-dark);
}
.brand .tag::before, .brand .tag::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.5; }
.brand .tag::after { margin-left: -0.3em; }   /* takes back the tracking after the last letter, so the two lines match */
.nav { margin-left: auto; display: flex; align-items: center; gap: 30px; }
.nav a {
  font-family: var(--display); font-size: 14px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--head-dark); text-decoration: none;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: border-color 300ms ease;
  white-space: nowrap; /* keeps "Christ-centred" and "Non-faith-based" from breaking at the hyphens */
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--olive); }
/* The Christ-centred pages keep their path switch link in the markup for the path-memory
   script, but do not show it. The hero button is the visible way across. */
.nav a[hidden] { display: none; }

/* solid header variant for inner pages */
.site-head--solid { position: static; background: var(--cream); }
.site-head--solid .brand .name { color: var(--head); }
.site-head--solid .brand .tag { color: var(--text); }
.site-head--solid .nav a { color: var(--head); }
.site-head--solid .brand img { filter: none; }
.site-head .brand img { filter: brightness(0) invert(1); }
.site-head--solid .brand img { filter: none; }

.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  /* the source video is 1920x1080. Matching 16:9 here means object-fit: cover
     has nothing to crop, so the whole frame is on screen. */
  aspect-ratio: 16 / 9;
  min-height: 620px;
  display: flex; align-items: flex-start; overflow: hidden;
  /* the poster backs the video so there is never a black rectangle while it loads */
  background: var(--green) url("assets/video/hero-rocks-poster.jpg") center / cover no-repeat;
}
.hero video, .hero .hero-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  background: transparent;
  filter: saturate(0.78) contrast(1.04);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(16,34,30,0.74) 0%, rgba(16,34,30,0.30) 26%, rgba(16,34,30,0.06) 52%, rgba(16,34,30,0.52) 100%),
    linear-gradient(90deg, rgba(16,34,30,0.52) 0%, rgba(16,34,30,0.10) 58%, rgba(16,34,30,0) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 172px; padding-bottom: 72px; }
.hero h1 {
  color: var(--head-dark);
  font-size: clamp(40px, 5.1vw, 66px);
  line-height: 1.0;
  margin: 0 0 26px;
  text-transform: uppercase;
  text-shadow: 0 2px 28px rgba(10,22,20,0.55);
}
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 .lc {
  display: inline; white-space: normal;
  text-transform: lowercase; font-style: italic; font-size: 0.76em;
  padding: 0 0.06em;
}
.hero h1 .i1 { padding-left: 1.1em; }
.hero h1 .i2 { padding-left: 2.2em; }
.hero p {
  color: #E4E1DA; max-width: 46ch; margin: 0 0 34px;
  font-size: 15px; line-height: 28.5px;
  text-shadow: 0 1px 14px rgba(10,22,20,0.6);
}
.hero .cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ---------- hero ending ----------
   The video plays once and stops on a white frame. As the white arrives the
   headline and dark scrim fade out, a thin top scrim keeps the white nav legible,
   and the end card fades in. JS adds .is-ending, then .is-ended. */
.hero::after { transition: opacity 600ms ease; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 240px; z-index: 1;
  background: linear-gradient(180deg, rgba(16,34,30,0.72) 0%, rgba(16,34,30,0.45) 45%, rgba(16,34,30,0) 100%);
  opacity: 0; transition: opacity 600ms ease;
  pointer-events: none;
}
.hero .wrap { transition: opacity 500ms ease, visibility 0s linear 0s; }
.hero.is-ending::after { opacity: 0; }
.hero.is-ending::before { opacity: 1; }
.hero.is-ending .wrap { opacity: 0; visibility: hidden; transition: opacity 500ms ease, visibility 0s linear 500ms; }

/* sits over the video, under the scrims: fades in on the white end frame so the
   loop's jump back to the dark opening becomes a dissolve */
.hero-white {
  position: absolute; inset: 0; z-index: 0;
  background: #fff; opacity: 0; pointer-events: none;
  transition: opacity 900ms ease;
}
.hero.is-ended .hero-white { opacity: 1; transition-duration: 200ms; }

/* the card covers the header area, so only its own contents take clicks */
.hero-end { pointer-events: none; }
.hero-end > * { pointer-events: auto; }
.hero-end {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 40px;
  opacity: 0; visibility: hidden;
  transition: opacity 600ms ease, visibility 0s linear 600ms;
}
.hero.is-ended .hero-end { opacity: 1; visibility: visible; transition: opacity 1100ms ease 200ms, visibility 0s; }
/* .hero .hero-end-title, not .hero-end-title, so the .hero p body rule can't win */
.hero .hero-end-title {
  font-family: var(--display);
  color: var(--head);
  font-size: clamp(40px, 5.1vw, 66px);
  line-height: 1.0;
  text-transform: uppercase;
  max-width: none;
  margin: 0 0 34px;
  text-shadow: none;
}
.hero-end-title > span { display: block; white-space: nowrap; }
.hero-end-title .lc {
  text-transform: lowercase; font-style: italic; font-size: 0.76em;
  color: var(--olive-text); padding: 0 0.06em;
}
.hero-end-title .i1 { padding-left: 1.1em; }

/* ---------- logo animation ----------
   Ported from ../../logo-animation.html. Every layer is a 1024px square PNG, so all
   layers stack in one square .logo-canvas. The outer .logo-anim is a window cropped to
   the part of that square the artwork uses, which keeps the header mark the same size
   as the old mark.png. Timeline is 3.25s end to end. logo-anim.js either plays it
   (header) or scrubs it with scroll (psalm band). */
.logo-anim { position: relative; display: block; }
.logo-anim .logo-canvas { position: absolute; display: block; }
.logo-anim .logo-canvas img,
.logo-anim .half { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.logo-anim .logo-canvas img { max-width: none; -webkit-user-drag: none; user-select: none; }

/* mark only (chain and sparks, no cross): 964 x 300 of the square, from x30 y340 */
.logo-anim--mark { aspect-ratio: 964 / 300; }
.logo-anim--mark .logo-canvas { width: 106.2241%; height: 341.3333%; left: -3.1120%; top: -113.3333%; }
/* full lockup with the wordmark: 970 x 485, from x30 y340 */
.logo-anim--full { aspect-ratio: 970 / 485; }
.logo-anim--full .logo-canvas { width: 105.5670%; height: 211.1340%; left: -3.0928%; top: -70.1031%; }
/* Christ-centred path: the cross rises from the break, so both crops start higher, at y150 */
.logo-anim--cross.logo-anim--mark { aspect-ratio: 964 / 490; }
.logo-anim--cross.logo-anim--mark .logo-canvas { height: 208.9796%; top: -30.6122%; }
.logo-anim--cross.logo-anim--full { aspect-ratio: 970 / 675; }
.logo-anim--cross.logo-anim--full .logo-canvas { height: 151.7037%; top: -22.2222%; }

/* each half swaps its body (prongs cut off) for the broken piece under the flash */
.logo-anim .half .broken { opacity: 0; }
.logo-anim .flash {
  position: absolute; left: 50%; top: 49.1%;
  width: 34%; aspect-ratio: 1 / 1; border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255,255,255,1) 0%, rgba(255,241,206,.95) 16%, rgba(255,206,132,.72) 32%,
    rgba(226,140,54,.34) 52%, rgba(198,96,20,0) 74%);
  transform: translate(-50%,-50%) scale(.10);
  opacity: 0; pointer-events: none; mix-blend-mode: screen;
}
.logo-anim .sparks      { transform-origin: 50% 49.1%; }
.logo-anim .cross       { transform-origin: 50% 44.1%; }
.logo-anim .centre-link { transform-origin: 50% 49.1%; }

.logo-anim.playing .hl          { animation: bcChainL 2.35s cubic-bezier(.22,.61,.36,1) both; }
.logo-anim.playing .hr          { animation: bcChainR 2.35s cubic-bezier(.22,.61,.36,1) both; }
.logo-anim.playing .body        { animation: bcSwapOut 2.35s linear both; }
.logo-anim.playing .broken      { animation: bcSwapIn 2.35s linear both; }
.logo-anim.playing .centre-link { animation: bcCentre 2.35s cubic-bezier(.3,.5,.4,1) both; }
.logo-anim.playing .flash       { animation: bcFlash 1.90s ease-out .85s both; }
.logo-anim.playing .sparks      { animation: bcSpark .90s cubic-bezier(.2,.9,.3,1) 1.55s both; }
.logo-anim.playing .cross       { animation: bcRise 1.15s cubic-bezier(.16,.84,.28,1) 1.62s both; }
.logo-anim.playing .wordmark    { animation: bcWord .90s cubic-bezier(.25,.75,.35,1) 2.35s both; }

/* the halves start pushed in 56px of 1024 (5.47%), strain, let go at 66%, overshoot */
@keyframes bcChainL {
  0%   { opacity: 0; transform: translateX(5.47%) scale(.985); }
  12%  { opacity: 1; transform: translateX(5.47%) scale(1); }
  26%  { transform: translateX(5.42%); }
  38%  { transform: translateX(5.27%); }
  44%  { transform: translateX(5.37%); }
  50%  { transform: translateX(5.13%); }
  55%  { transform: translateX(5.23%); }
  60%  { transform: translateX(4.98%); }
  64%  { transform: translateX(5.08%); }
  66%  { transform: translateX(4.88%); }
  74%  { transform: translateX(-.98%); }
  85%  { transform: translateX(.30%); }
  100% { transform: translateX(0); }
}
@keyframes bcChainR {
  0%   { opacity: 0; transform: translateX(-5.47%) scale(.985); }
  12%  { opacity: 1; transform: translateX(-5.47%) scale(1); }
  26%  { transform: translateX(-5.42%); }
  38%  { transform: translateX(-5.27%); }
  44%  { transform: translateX(-5.37%); }
  50%  { transform: translateX(-5.13%); }
  55%  { transform: translateX(-5.23%); }
  60%  { transform: translateX(-4.98%); }
  64%  { transform: translateX(-5.08%); }
  66%  { transform: translateX(-4.88%); }
  74%  { transform: translateX(.98%); }
  85%  { transform: translateX(-.30%); }
  100% { transform: translateX(0); }
}
@keyframes bcCentre {
  0%   { opacity: 0; transform: scaleX(1); }
  12%  { opacity: 1; transform: scaleX(1); }
  38%  { transform: scaleX(1.008); }
  50%  { transform: scaleX(1.017); }
  60%  { transform: scaleX(1.029); }
  66%  { opacity: 1; transform: scaleX(1.038); }
  70%  { opacity: 0; transform: scaleX(1.14); }
  100% { opacity: 0; transform: scaleX(1.14); }
}
@keyframes bcSwapOut { 0%, 66% { opacity: 1; } 67.5%, 100% { opacity: 0; } }
@keyframes bcSwapIn  { 0%, 66% { opacity: 0; } 67.5%, 100% { opacity: 1; } }
@keyframes bcFlash {
  0%   { opacity: 0;   transform: translate(-50%,-50%) scale(.10); }
  22%  { opacity: .16; transform: translate(-50%,-50%) scale(.15); }
  32%  { opacity: .34; transform: translate(-50%,-50%) scale(.20); }
  36%  { opacity: .46; transform: translate(-50%,-50%) scale(.23); }
  39%  { opacity: 1;   transform: translate(-50%,-50%) scale(1.08); }
  47%  { opacity: .86; transform: translate(-50%,-50%) scale(.78); }
  63%  { opacity: .52; transform: translate(-50%,-50%) scale(1.06); }
  100% { opacity: 0;   transform: translate(-50%,-50%) scale(1.7); }
}
@keyframes bcSpark {
  0%   { opacity: 0; transform: scale(.5); }
  22%  { opacity: 1; transform: scale(1.09); }
  45%  { opacity: .92; transform: scale(.99); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes bcRise {
  0%   { opacity: 0; transform: translateY(13.5%) scale(.52); }
  22%  { opacity: 1; }
  80%  { transform: translateY(-.9%) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bcWord {
  0%   { opacity: 0; transform: translateY(1.9%); }
  100% { opacity: 1; transform: translateY(0); }
}

/* before the first play, hold the opening frame */
.logo-anim:not(.playing):not(.is-done) .hl { transform: translateX(5.47%); }
.logo-anim:not(.playing):not(.is-done) .hr { transform: translateX(-5.47%); }
.logo-anim:not(.playing):not(.is-done) .cross,
.logo-anim:not(.playing):not(.is-done) .sparks,
.logo-anim:not(.playing):not(.is-done) .wordmark { opacity: 0; }

/* finished logo: already played this visit, or reduced motion */
.logo-anim.is-done .hl, .logo-anim.is-done .hr,
.logo-anim.is-done .cross, .logo-anim.is-done .sparks, .logo-anim.is-done .wordmark,
.logo-anim.is-done .broken { animation: none; transform: none; opacity: 1; }
.logo-anim.is-done .body, .logo-anim.is-done .centre-link,
.logo-anim.is-done .flash { animation: none; opacity: 0; }

/* header: the pieces take the same white filter the old mark.png had */
/* chain only: sits above the name, wide enough to read as the logo's chain */
.brand .logo-anim--mark { width: 120px; flex: none; }
/* cross and chain: sits beside the name, as tall as the name and "Therapy" together */
.brand--cross .logo-anim--mark { width: 84px; }
.brand .logo-anim .logo-canvas img { width: 100%; height: 100%; }

/* logo lockup on the main path, header and footer: the chain on top, the name and "Therapy"
   centred under it, in the order of the logo artwork. Desktop only; the phone bar keeps the
   chain beside the name. The Christ-centred logo (.brand--cross) keeps the mark beside the name. */
@media (min-width: 769px) {
  .site-head .brand:not(.brand--cross),
  .site-foot .brand:not(.brand--cross) { flex-direction: column; align-items: center; gap: 8px; }
  .site-foot .brand:not(.brand--cross) { display: inline-flex; }   /* hugs its content, so it stays at the left of its column */
}

/* ---------- psalm band ----------
   Sits between the hero and services. The band is taller than the screen and its
   inner frame is sticky, so it holds still while scrolling scrubs the chain break.
   The line fades in just after the wordmark lands. */
.psalm {
  --psalm-ground: #24443C;   /* one step lighter than --green, so it parts from services */
  position: relative;
  height: 230vh;
  background: var(--psalm-ground);
}
.psalm-pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.psalm-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: 40px; padding-bottom: 40px;
}
.psalm .logo-anim--full { width: min(420px, 44vh, 80vw); margin: 0 auto 38px; }
/* the artwork is dark steel; flip its lightness so it reads as silver on green,
   then turn the hue back so the sparks stay copper */
.psalm .logo-canvas img { filter: invert(1) hue-rotate(180deg) brightness(1.02); }
.psalm .sparks { filter: none !important; }

.psalm-quote { margin: 0; max-width: 760px; }
.psalm-quote p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.24;
  color: var(--head-dark);
}
/* one phrase per line, the way the verse reads aloud */
.psalm-quote p span { display: block; }
@media (max-width: 600px) { .psalm-quote p span { display: inline; } }
.psalm-quote .rule {
  width: 40px; height: 1px; background: var(--olive-text-dark);
  margin: 22px auto 0; border: 0;
}
.psalm-quote cite {
  display: block; margin-top: 16px;
  font-style: normal; font-size: 14px; line-height: 24px; font-weight: 300;
  letter-spacing: 2.2px; text-transform: uppercase; color: #CFCBC0;
}
.psalm-inner .pill { margin-top: 34px; }

/* reveal: quote, reference, then button, each a beat apart */
.psalm .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity 700ms ease, transform 900ms cubic-bezier(.2,.7,.2,1);
}
.psalm.is-revealed .reveal { opacity: 1; transform: none; }
.psalm.is-revealed .psalm-quote .rule,
.psalm.is-revealed .psalm-quote cite { transition-delay: 180ms; }
.psalm.is-revealed .pill.reveal { transition-delay: 380ms; }

@media (prefers-reduced-motion: reduce) {
  .psalm { height: auto; }
  .psalm-pin { position: static; height: auto; padding: var(--band) 0; }
  .psalm .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- intro quote band ----------
   Cream band after the psalm. Pull quote first, then the two intro paragraphs. */
.intro-quote { text-align: center; }
.pull { margin: 0 auto; max-width: 900px; }
.pull .mark {
  display: block; font-family: var(--display);
  font-size: 90px; line-height: 0.6; height: 42px;
  color: var(--olive-text);
}
.pull blockquote { margin: 0; }
.pull blockquote p {
  margin: 0; font-family: var(--display);
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1.22;
  color: var(--head);
}
.pull figcaption { margin-top: 26px; }
.pull figcaption strong {
  display: block; font-family: var(--display); font-weight: 400;
  font-size: 22px; line-height: 28px; color: var(--head);
}
.pull figcaption span {
  display: block; margin-top: 4px;
  font-size: 14px; line-height: 24px; font-weight: 300;
  letter-spacing: 1.1px; text-transform: uppercase; color: var(--text);
}
.intro-quote .rule {
  width: 40px; height: 1px; background: var(--olive);
  margin: 56px auto; border: 0;
}
.intro-body { max-width: 860px; margin: 0 auto; }
.intro-body p {
  margin: 0 0 28px;
  font-size: clamp(22px, 2.3vw, 30px); line-height: 1.4;
  font-weight: 700; color: var(--head);
}
.intro-body p:last-child { margin-bottom: 0; }
/* words fill in one by one as the band scrolls up, driven by scroll-words.js */
.intro-body .w { opacity: 0.18; transition: opacity 120ms linear; }


/* page banner for inner pages */
.banner { position: relative; min-height: 260px; display: flex; align-items: center; overflow: hidden; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: rgba(31,31,31,0.62); }
.banner .wrap { position: relative; z-index: 2; }
.banner h1 { color: var(--head-dark); font-size: 46px; line-height: 1; margin: 0 0 10px; }
.banner .crumb { color: var(--text-dark); font-size: 14px; letter-spacing: 0.6px; }
.banner .crumb a { text-decoration: none; }
.banner .crumb a:hover { color: #fff; }

/* ---------- circle cards ---------- */
.circles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 70px var(--gap); }   /* six services, two rows of three */
/* five services: three, then two centred under them */
.circles--five { grid-template-columns: repeat(6, 1fr); }
.circles--five > * { grid-column: span 2; }
.circles--five > :nth-child(4) { grid-column: 2 / span 2; }
/* seven services: two rows of three, then one centred under them */
@media (min-width: 1025px) { .circles--seven > :last-child { grid-column: 2; } }
.circle-card { text-align: center; }
.circle-card .media {
  width: 168px; height: 168px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 26px;
}
.circle-card .media img { width: 100%; height: 100%; object-fit: cover; }
.circle-card h3 { font-size: 28px; line-height: 34px; margin-bottom: 10px; min-height: 68px; }
.circle-card p { margin: 0; font-size: 15px; line-height: 28.5px; }
.circle-card a { color: var(--olive-text-dark); text-decoration: none; font-size: 14px; letter-spacing: 1.1px; text-transform: uppercase; display: inline-block; margin-top: 14px; }
.circle-card a:hover { color: var(--head-dark); }

.arrows { display: flex; justify-content: center; gap: 12px; margin-top: 56px; }
.arrows button {
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--olive); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: background 300ms ease;
}
.arrows button:hover { background: var(--olive-dim); }

/* ---------- split section ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-media { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.split-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.split-media .tall { aspect-ratio: 3 / 4; }
.split-media .short { aspect-ratio: 3 / 4; margin-top: 44px; }
.split-body h2 { font-size: 55px; line-height: 55px; margin-bottom: 14px; }
.split-body .lead { font-size: 21px; line-height: 28px; font-weight: 300; margin: 0 0 20px; }
.split-body p { margin: 0 0 20px; }
.ticks { list-style: none; margin: 0 0 30px; padding: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 12px; height: 7px; border-left: 1.5px solid var(--olive);
  border-bottom: 1.5px solid var(--olive); transform: rotate(-45deg);
}

.play {
  position: relative; display: block;
}
.play::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; background: rgba(255,255,255,0.9);
}
.play::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 2;
  margin: -8px 0 0 -4px;
  border-left: 13px solid var(--head); border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); text-align: center; }
.stats .n { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--head); }
.stats .l { font-family: var(--display); font-size: 22px; line-height: 29.7px; color: var(--head); margin-top: 8px; }
.stats .s { font-size: 14px; line-height: 22px; }
.source { text-align: center; font-size: 13px; margin: 34px 0 0; }
.source a { color: var(--olive-text); }

/* ---------- roots (dark band, image centre) ---------- */
.roots { display: grid; grid-template-columns: 1fr 300px 1fr; gap: 46px; align-items: center; }
.roots img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.root { display: flex; gap: 18px; margin-bottom: 40px; }
.root:last-child { margin-bottom: 0; }
.roots .col-l .root { flex-direction: row-reverse; text-align: right; }
.root .num {
  flex: 0 0 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--rule-dark);
  display: grid; place-items: center;
  font-family: var(--display); font-size: 17px; color: var(--head-dark);
}
.root h3 { font-size: 28px; line-height: 34px; margin-bottom: 6px; }
.root p { margin: 0; font-size: 15px; line-height: 28.5px; }

/* ---------- principles strip ---------- */
.principles { text-align: center; }
.principles .line {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px;
}
.principles h2 { font-size: 55px; line-height: 68px; }
.principles img { width: 126px; height: 52px; object-fit: cover; border-radius: 0; }
.principles .icon { width: 52px; height: 26px; opacity: 0.8; flex: 0 0 auto; }

/* ---------- article cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); align-items: start; }
.card { background: transparent; }
.card .media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 0; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .cat { font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--olive-text); margin: 22px 0 8px; }
.card h3 { font-size: 28px; line-height: 34px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--olive-text); }
.card .meta { font-size: 13px; line-height: 24px; margin-top: 10px; color: var(--text); }
.card--empty {
  border: 1px dashed var(--rule); display: grid; place-items: center;
  aspect-ratio: 4 / 3; text-align: center; padding: 30px; color: #A79E8B;
}
.card--empty span { font-size: 13px; letter-spacing: 1.1px; text-transform: uppercase; }

/* ---------- testimonials ---------- */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.quote { background: var(--white); padding: 44px 40px; }
.quote .mark { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--olive-text); display: block; margin-bottom: 14px; }
.quote p { margin: 0 0 26px; }
.quote .who { display: flex; align-items: center; gap: 14px; }
.quote .avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--olive);
  color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-size: 18px;
}
.quote .who strong { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--head); display: block; }
.quote .who span { font-size: 13px; }
.quote .stars { color: var(--olive-text-dark); letter-spacing: 3px; font-size: 13px; margin-bottom: 16px; }
.disclaimer { text-align: center; font-size: 13px; line-height: 22px; margin: 40px auto 0; max-width: 70ch; }

/* ---------- appointment band ---------- */
.appt { background: var(--olive); position: relative; overflow: hidden; }
.appt h2 { font-size: 55px; line-height: 55px; color: #fff; margin-bottom: 8px; }
.appt .sub { color: rgba(255,255,255,0.85); margin: 0 0 34px; }
.appt .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.appt form { display: grid; gap: 16px; }
.appt .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.appt input, .appt textarea {
  width: 100%; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.32);
  color: #fff; padding: 15px 18px; font: inherit; border-radius: 0;
}
.appt input::placeholder, .appt textarea::placeholder { color: rgba(255,255,255,0.72); }
.appt .consent { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,0.9); font-size: 13px; line-height: 20px; }
.appt .consent input { width: auto; margin-top: 3px; }
.appt button.pill { background: var(--cream); color: var(--head); justify-self: start; }
.appt button.pill:hover { background: #fff; }
.appt .art { width: 100%; height: auto; opacity: 0.6; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink-2); color: var(--text-dark); padding: 92px 0 0; }
.site-foot .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 46px; }
.site-foot h4 { color: var(--head-dark); font-size: 22px; margin-bottom: 20px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot ul li { margin-bottom: 10px; }
.site-foot .phone { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--head-dark); margin-top: 18px; display: inline-block; }
.site-foot .brand .name { color: var(--head-dark); }
.site-foot .brand img { filter: brightness(0) invert(1); }
.news-form { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--rule-dark); padding-bottom: 10px; }
.news-form input { flex: 1; background: transparent; border: 0; color: #fff; font: inherit; padding: 6px 0; }
.news-form input::placeholder { color: var(--text-dark); }
.news-form button { background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 18px; }
.foot-bottom {
  margin-top: 72px; border-top: 1px solid var(--rule-dark);
  padding: 26px 0; display: flex; align-items: center; gap: 20px; font-size: 13px;
}
.foot-bottom .socials { margin-left: auto; display: flex; gap: 10px; }
.foot-bottom .socials a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule-dark);
  display: grid; place-items: center; font-size: 12px;
  transition: background 300ms ease;
}
.foot-bottom .socials a:hover { background: var(--olive); color: #fff; }

/* ---------- prose (blog / about) ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: 38px; line-height: 44px; margin: 54px 0 16px; }
.prose h3 { font-size: 26px; line-height: 32px; margin: 38px 0 12px; }
.prose p { margin: 0 0 20px; }
.prose blockquote {
  margin: 32px 0; padding: 26px 30px; background: var(--white);
  border-left: 2px solid var(--olive);
  font-family: var(--display); font-size: 21px; line-height: 32px; color: var(--head);
}
.prose ul { padding-left: 20px; margin: 0 0 20px; }
.prose li { margin-bottom: 8px; }
.verse { font-family: var(--display); font-style: italic; color: var(--head); }

.faq details {
  border-bottom: 1px solid var(--rule); padding: 22px 0;
}
.faq summary {
  font-family: var(--display); font-size: 22px; line-height: 30px; color: var(--head);
  cursor: pointer; list-style: none; display: flex; gap: 16px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--olive-text); font-size: 24px; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 14px 0 0; max-width: 72ch; }
.faq details ul { margin: 14px 0 0; padding-left: 20px; max-width: 72ch; color: var(--text); }
.faq details li { margin-bottom: 6px; }
.faq details a { color: var(--olive-text); }

/* faq.html: a row of links to the sections, and room under the fixed header when one is followed */
.faq-top { padding-bottom: 40px; }
.faq-top .sec-head { margin-bottom: 34px; }
.faq-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; max-width: 900px; margin: 0 auto; }
.faq-jump a { color: var(--olive-text); font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.faq-sec { scroll-margin-top: 90px; }

/* enquiry form on light grounds */
.enq { display: grid; gap: 20px; margin-top: 26px; }
.enq label { display: grid; gap: 8px; font-size: 14px; letter-spacing: 0.4px; }
.enq input[type="text"], .enq input[type="email"], .enq textarea {
  width: 100%; border: 1px solid var(--rule); background: var(--cream);
  padding: 14px 16px; font: inherit; color: var(--head); border-radius: 0;
}
.enq input:focus, .enq textarea:focus { border-color: var(--olive); }
.enq .consent-line {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 20px;
}
.enq .consent-line input { margin-top: 3px; }
.enq button { justify-self: start; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.info { background: var(--white); padding: 40px 34px; }
.info h3 { font-size: 26px; line-height: 32px; margin-bottom: 10px; }
.info p { margin: 0 0 14px; line-height: 28.5px; }
.info a { color: var(--olive-text); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
/* the portraits on the About pages. Small, because the counsellor's source photo is 602px.
   The height attribute on the img used to win over aspect-ratio, so the photo showed at 460 by 602.
   That look was approved, so the ratio is now written out and the height follows the width. */
.profile-photo { display: block; width: 100%; max-width: 460px; height: auto; aspect-ratio: 460 / 602; object-fit: cover; margin-inline: auto; }
/* the coach sits under the counsellor, so his photo goes on the right. Stacked, the photo stays on top */
@media (min-width: 1025px) { .split--flip > :first-child { order: 2; } }
.split-body h3 { font-size: 26px; line-height: 32px; margin: 10px 0 14px; }

/* credentials table, mirrors the reference "My Education" block */
.creds { width: 100%; border-collapse: collapse; }
.creds th {
  font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--head);
  text-align: left; padding: 0 16px 16px 0; border-bottom: 1px solid var(--head);
}
.creds td {
  font-family: var(--display); font-size: 18px; line-height: 26px; color: var(--head);
  padding: 26px 16px 26px 0; border-bottom: 1px solid var(--rule); vertical-align: top;
}
.creds td:first-child { width: 70px; color: var(--olive-text); }
.creds td:last-child { text-align: right; padding-right: 0; }
.creds th:last-child { text-align: right; padding-right: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  :root { --band: 84px; }
  .sec-head h2, .split-body h2, .appt h2, .principles h2 { font-size: 42px; line-height: 44px; }
  .circles { grid-template-columns: repeat(2, 1fr); row-gap: 54px; }
  .circles--five > *, .circles--five > :nth-child(4) { grid-column: auto; }
  .roots { grid-template-columns: 1fr; }
  .roots img { max-width: 300px; margin: 0 auto; }
  .roots .col-l .root { flex-direction: row; text-align: left; }
  .cards { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr !important; gap: 50px !important; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .nav { gap: 20px; }
  .nav a { font-size: 13px; }
}

@media (max-width: 768px) {
  :root { --band: 64px; }
  .site-head { position: static; background: var(--ink); top: 0; }
  .site-head .brand .name { color: var(--head-dark); }
  .hero { min-height: 560px; }
  .hero .wrap { padding-top: 80px; padding-bottom: 60px; }
  .hero h1 .indent { padding-left: 0; }
  .split, .quotes, .two-col, .appt .grid { grid-template-columns: 1fr; gap: 40px; }
  .cards, .stats, .info-grid, .post-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .creds thead { display: none; }
  .creds td { display: block; padding: 4px 0; border: 0; text-align: left !important; }
  .creds tr { display: block; padding: 18px 0; border-bottom: 1px solid var(--rule); }
  .creds td:first-child { width: auto; }
  .stats { row-gap: 40px; }
  .utility .wrap { flex-wrap: wrap; gap: 14px; padding-bottom: 10px; padding-top: 10px; }
  .utility .spacer { margin-left: 0; }
  .nav { flex-wrap: wrap; gap: 14px; margin-left: 0; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; gap: 20px; }
  .appt .art { display: none; }
  .site-foot .cols { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
  .foot-bottom .socials { margin-left: 0; }
}

@media (max-width: 480px) {
  .sec-head h2, .split-body h2, .appt h2, .principles h2 { font-size: 34px; line-height: 38px; }
  .circles { grid-template-columns: 1fr; }
  .appt .row { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html, html:not(.has-inertia) { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* round 2: fixes from the brief and craft critics */
.stats .src, .minor-stats .src {
  display: block; margin-top: 6px;
  font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase; opacity: 0.62;
}
.hero p { max-width: 52ch; }
.faq details p { color: var(--text); }
.band--green .faq details { border-bottom-color: var(--rule-dark); }
.faq summary:hover { color: var(--olive-text); }
.card h3 a { transition: color 300ms ease; }


/* ---------- hero video controls ---------- */
.vid-ctrls {
  position: absolute; right: 24px; bottom: 24px; z-index: 4;
  display: flex; align-items: center; gap: 10px;
}
.hero-split .vid-ctrls { right: 20px; bottom: 20px; }
.vid-ctrl {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(10, 22, 20, 0.55); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: background 300ms ease, border-color 300ms ease;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.vid-ctrl:hover { background: rgba(10, 22, 20, 0.85); border-color: rgba(255,255,255,0.75); }
.vid-ctrl svg { width: 17px; height: 17px; display: block; }
.vid-ctrl .on, .vid-ctrl .off { display: none; }
.vid-ctrl[aria-pressed="false"] .off { display: block; }
.vid-ctrl[aria-pressed="true"]  .on  { display: block; }
.vid-label {
  font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase;
  color: #fff; background: rgba(10, 22, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 21px; padding: 0 16px; height: 42px;
  display: flex; align-items: center;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
@media (max-width: 480px) { .vid-label { display: none; } }


/* ==========================================================================
   PHOTO SYSTEM — parallax + hover, Version A

   Two behaviours share the same elements, so they share one transform.
   Composing them by hand would mean each overwrites the other, so both write
   into custom properties instead and the transform is assembled once:

       transform: translate3d(0, var(--py), 0) scale(var(--ps));

   --py  scroll parallax, written by JS every frame
   --ps  hover scale, written by CSS

   Every photo also sits slightly drained and returns to full colour under the
   cursor. On a site about coming out of something, that beats a generic zoom.

   Parallax headroom: images rest at scale 1.14, so there is 7% of the height
   spare above and below. Travel is capped at 6% of height, which never reveals
   an edge. Frames are overflow:hidden.

   The whole thing is inert under prefers-reduced-motion.
   ========================================================================== */

/* --ps has to be a registered property or it cannot be transitioned, it would
   just jump. Browsers without @property degrade to an instant hover, which is
   acceptable; nothing breaks. */
@property --ps {
  syntax: "<number>";
  inherits: false;
  initial-value: 1.14;
}
@property --py {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --photo-rest: saturate(0.74) contrast(1.02);
  --photo-live: saturate(1.06) contrast(1.04);
  --px-rest: 1.14;   /* resting scale, creates the parallax headroom */
}

/* every parallax photo shares this base */
[data-px] {
  --py: 0px;
  --ps: var(--px-rest);
  transform: translate3d(0, var(--py), 0) scale(var(--ps));
  will-change: transform;
  filter: var(--photo-rest);
  transition: filter 700ms var(--ease-out), --ps 900ms var(--ease-out);
}

/* ---- 1. circle masks: the shape opens ---- */
.circle-card .media {
  position: relative; overflow: hidden;
  transition: border-radius 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.circle-card .media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 0 var(--olive);
  transition: box-shadow 700ms var(--ease-out), border-radius 700ms var(--ease-out);
  pointer-events: none; z-index: 2;
}
.circle-card:hover .media,
.circle-card:focus-within .media {
  border-radius: 30% 30% 30% 30% / 30%;
  transform: scale(1.06);
}
.circle-card:hover .media img,
.circle-card:focus-within .media img { --ps: 1.22; filter: var(--photo-live); }
.circle-card:hover .media::after,
.circle-card:focus-within .media::after { box-shadow: inset 0 0 0 3px var(--olive); }

/* ---- 2. rectangles: the image pushes past its frame, a rule draws under ---- */
.card { position: relative; }
.card .media { overflow: hidden; position: relative; display: block; }
.card .media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--olive); z-index: 2;
  transform: scaleX(0); transform-origin: left;
  transition: transform 600ms var(--ease-out);
}
.card:hover .media img, .card:focus-within .media img { --ps: 1.22; filter: var(--photo-live); }
.card:hover .media::after, .card:focus-within .media::after { transform: scaleX(1); }

/* ---- 3. the offset image pair: they part, like a link giving way ---- */
.px-frame { display: block; overflow: hidden; position: relative; width: 100%; }
.split-media .px-frame { transition: transform 900ms var(--ease-out); }
.split-media .px-frame.tall  { aspect-ratio: 3 / 4; }
.split-media .px-frame.short { aspect-ratio: 3 / 4; margin-top: 44px; }
.split-media .px-frame img { width: 100%; height: 100%; object-fit: cover; }
.split-media:hover .px-frame img { --ps: 1.20; filter: var(--photo-live); }
.split-media:hover .px-frame.tall  { transform: translateY(-14px); }
.split-media:hover .px-frame.short { transform: translateY(14px); }

/* ---- 4. standalone photos: an olive frame closes in ---- */
.photo-frame { display: block; overflow: hidden; position: relative; width: 100%; }
.roots .photo-frame { align-self: center; }
.photo-frame:hover img { --ps: 1.20; filter: var(--photo-live); }
.photo-frame::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  box-shadow: inset 0 0 0 0 rgba(112,136,64,0);
  transition: box-shadow 700ms var(--ease-out);
  pointer-events: none;
}
.photo-frame:hover::after { box-shadow: inset 0 0 0 6px rgba(112,136,64,0.9); }

/* ---- 5. inner-page banners: the deepest parallax on the page ---- */
.banner { overflow: hidden; }
.banner:hover img { --ps: 1.20; }

/* ---- reduced motion: colour still returns, nothing moves ---- */
@media (prefers-reduced-motion: reduce) {
  [data-px] {
    --py: 0px !important;
    --ps: 1 !important;
    transform: none !important;
    will-change: auto;
  }
  .circle-card:hover .media,
  .circle-card:focus-within .media { transform: none !important; border-radius: 50% !important; }
  .split-media:hover .px-frame.tall,
  .split-media:hover .px-frame.short { transform: none !important; }
}

/* ---------- self-assessment (assessment.html, driven by assessment.js) ---------- */
.sa-band { padding-top: 80px; }
.sa {
  position: relative;
  max-width: 820px; margin: 0 auto;
  background: var(--white);
  padding: 64px 64px 56px;
  text-align: center;
}
.sa [hidden] { display: none !important; }
.sa-screen:focus { outline: none; }
.sa .rule { width: 40px; height: 1px; background: var(--olive); margin: 18px auto 0; border: 0; }

.sa-exit {
  position: absolute; top: 18px; right: 20px;
  background: none; border: 0; cursor: pointer;
  font-size: 13px; color: var(--text); text-decoration: underline; text-underline-offset: 3px;
}
.sa-exit:hover { color: var(--head); }

/* intro */
.sa-title { font-size: clamp(34px, 4vw, 50px); line-height: 1.1; }
.sa-facts {
  list-style: none; margin: 40px 0 34px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.sa-facts li { border-top: 1px solid var(--rule); padding-top: 18px; }
.sa-facts strong { display: block; font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; color: var(--head); }
.sa-facts span { display: block; margin-top: 8px; font-size: 13px; line-height: 20px; letter-spacing: 0.6px; text-transform: uppercase; }
.sa-lede { max-width: 560px; margin: 0 auto 34px; font-size: 17px; line-height: 29px; }

/* questions */
.sa-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sa-back { background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--text); padding: 6px 0; }
.sa-back:hover { color: var(--head); }
.sa-count { font-size: 13px; letter-spacing: 1.1px; text-transform: uppercase; }
.sa-bar { height: 3px; background: var(--rule); overflow: hidden; }
.sa-bar span { display: block; height: 100%; width: 0; background: var(--olive); transition: width 400ms ease; }
.sa-q {
  min-height: 3.6em; margin: 56px auto 44px; max-width: 640px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2;
}
.sa-q:focus { outline: none; }
.sa-q.is-in { animation: sa-in 420ms cubic-bezier(.2,.7,.2,1); }
@keyframes sa-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.sa-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 520px; margin: 0 auto; }
.sa-ans {
  position: relative;
  padding: 22px 20px; cursor: pointer;
  background: var(--cream); color: var(--head);
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: 18px; font-weight: 500;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.sa-ans .k {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  font-size: 11px; line-height: 20px; width: 22px; border-radius: 4px;
  border: 1px solid var(--rule); color: var(--text);
}
.sa-ans:hover { border-color: var(--olive-text); }
.sa-ans[aria-pressed="true"] { border-color: var(--olive-text); box-shadow: inset 0 0 0 1px var(--olive-text); }
.sa-ans.is-picked { background: var(--olive-text); border-color: var(--olive-text); color: #fff; transform: scale(0.98); }
.sa-ans.is-picked .k { color: #fff; border-color: rgba(255,255,255,0.5); }
@media (hover: none) { .sa-ans .k { display: none; } }

/* result */
.sa-score { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 6px 0 30px; }
.sa-score .n { font-family: var(--display); font-size: 96px; line-height: 0.9; color: var(--head); }
.sa-score .of { text-align: left; font-size: 13px; line-height: 20px; letter-spacing: 1.1px; text-transform: uppercase; }
.sa-scale { position: relative; display: flex; gap: 4px; max-width: 560px; margin: 0 auto 46px; }
.sa-scale .seg { display: block; }
.sa-scale .seg i { display: block; height: 8px; background: var(--rule); transition: background 400ms ease; }
.sa-scale .seg em { display: block; margin-top: 10px; font-style: normal; font-size: 12px; line-height: 16px; color: var(--text); }
.sa-scale .seg.is-on em { color: var(--head); font-weight: 500; }
.sa-scale .seg--low.is-on i  { background: #708840; }
.sa-scale .seg--mid.is-on i  { background: #C29B4B; }
.sa-scale .seg--mid2.is-on i { background: #B07A3A; }
.sa-scale .seg--high.is-on i { background: #9A4E36; }
.sa-scale .marker {
  position: absolute; top: -7px; width: 2px; height: 22px; margin-left: -1px;
  background: var(--head);
}
.sa-tier { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.15; max-width: 620px; margin: 0 auto; }
.sa-mean { max-width: 580px; margin: 18px auto 30px; font-size: 17px; line-height: 29px; }
.sa-rec { max-width: 600px; margin: 0 auto 34px; padding: 26px 30px; background: var(--cream); border-left: 3px solid var(--olive); text-align: left; }
.sa-rec .cap { margin: 0 0 6px; font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--olive-text); }
.sa-rec p:last-child { margin: 0; font-size: 18px; line-height: 29px; font-weight: 500; color: var(--head); }
.sa-caveat { max-width: 580px; margin: 0 auto 30px; font-size: 15px; line-height: 25px; }
.sa-next { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sa-reach { margin: 22px 0 0; font-size: 15px; }
.sa-reach a { color: var(--olive-text); }
.sa-review { max-width: 600px; margin: 40px auto 0; text-align: left; border-top: 1px solid var(--rule); padding-top: 18px; }
.sa-review summary { cursor: pointer; color: var(--head); font-weight: 500; }
.sa-review ol { margin: 14px 0 10px; padding-left: 22px; }
.sa-review li { line-height: 26px; margin-bottom: 4px; }
.sa-review p { margin: 0; font-size: 14px; }
.sa-retake {
  margin-top: 34px; background: none; border: 0; cursor: pointer;
  font-size: 14px; color: var(--text); text-decoration: underline; text-underline-offset: 3px;
}
.sa-retake:hover { color: var(--head); }

.sa-notes { max-width: 640px; margin: 34px auto 0; text-align: center; font-size: 14px; line-height: 24px; }
.sa-notes p { margin: 0 0 10px; }
.sa-notes a { color: var(--olive-text); }

@media (max-width: 700px) {
  .sa { padding: 56px 22px 40px; }
  .sa-facts { grid-template-columns: 1fr; }
  .sa-scale .seg em { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sa-q.is-in { animation: none; }
  .sa-bar span, .sa-ans { transition: none; }
}

/* ---------- take the test band (index.html) ---------- */
.test-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px; align-items: center; }
.test-copy h2 { font-size: 55px; line-height: 58px; }
.test-copy h2 .accent {
  position: relative; display: block; width: fit-content;
  font-style: italic; color: var(--olive-text);
  padding-right: 0.06em;
}
/* hand-drawn brush line under the call to action, drawn by scrolling (inline script in index.html) */
.test-copy h2 .stroke {
  position: absolute; left: -2%; bottom: -0.2em;
  width: 104%; height: 0.32em; overflow: visible;
}
.test-copy h2 .stroke path {
  fill: none; stroke: var(--olive); stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 120ms linear;   /* scroll drives it; this only smooths the steps */
}
.test-copy h2 .stroke path:first-child { stroke-width: 5; }
.test-copy h2 .stroke path:last-child  { stroke-width: 2.5; opacity: 0.7; }
.test-cta.is-drawn .test-copy h2 .stroke path { stroke-dashoffset: 0; }
.test-copy .rule { display: none; }   /* the brush line does this job here */
.test-copy .rule { width: 40px; height: 1px; background: var(--olive); margin: 18px 0 0; border: 0; }
.test-copy .sub {
  margin: 34px 0 26px;
  font-size: 14px; line-height: 24px; font-weight: 300;
  letter-spacing: 1.1px; text-transform: uppercase;
}
.test-copy p { margin: 0 0 22px; }
.test-points { list-style: none; margin: 0 0 34px; padding: 0; }
.test-points li { position: relative; padding-left: 22px; color: var(--head); }
.test-points li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--olive);
}

.test-card {
  background: var(--cream);
  padding: 40px 44px 34px;
  box-shadow: 0 30px 60px -30px rgba(20, 46, 41, 0.28);
  transform: rotate(-1.2deg);
  transition: transform 500ms cubic-bezier(.2,.7,.2,1);
}
.test-card:hover, .test-card:focus-within { transform: rotate(0deg) translateY(-6px); }
.test-card-top {
  display: flex; justify-content: space-between; margin-bottom: 14px;
  font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase;
}
.test-q {
  margin: 44px 0 38px; text-align: center;
  font-family: var(--display); font-size: 30px; line-height: 38px; color: var(--head);
}
.test-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.test-answers .sa-ans { display: block; text-align: center; text-decoration: none; background: var(--white); }
.test-answers .sa-ans:hover { background: var(--olive-text); border-color: var(--olive-text); color: #fff; }
.test-foot { margin: 22px 0 0; text-align: center; font-size: 13px; }

@media (max-width: 1024px) {
  .test-grid { grid-template-columns: 1fr; gap: 56px; }
  .test-copy h2 { font-size: 42px; line-height: 46px; }
  .test-card { max-width: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  .test-card, .test-card:hover, .test-card:focus-within { transform: none; transition: none; }
  .test-copy h2 .stroke path { stroke-dashoffset: 0; transition: none; }
}

/* ---------- whole-image circle (Equipping Ministry Leaders) ----------
   The artwork carries a title, so it sits whole inside the circle instead of being cropped.
   Padding keeps the wide image's corners inside the round edge. The paper colour fills the
   rest, and the filter sits on the frame so image and fill always match. No parallax here. */
.circle-card .media--contain { background: #d1b787; filter: saturate(0.74) contrast(1.02); transition: filter 700ms var(--ease-out), border-radius 700ms var(--ease-out), transform 700ms var(--ease-out); }
.circle-card .media--contain img { object-fit: contain; padding: 8%; filter: none !important; }
.circle-card:hover .media--contain,
.circle-card:focus-within .media--contain { filter: var(--photo-live); }

/* ---------- zoomed-out circle (Couples Counselling) ----------
   The couple sit at the far edges of a wide photo, so the whole photo shows across the circle.
   A blurred copy of the same photo fills the space above and below. No parallax here. */
.circle-card .media--fit { filter: var(--photo-rest); transition: filter 700ms var(--ease-out), border-radius 700ms var(--ease-out), transform 700ms var(--ease-out); }
.circle-card .media--fit img { position: absolute; inset: 0; filter: none !important; }
.circle-card .media--fit img:not(.bg) { object-fit: contain; }
.circle-card .media--fit .bg { transform: scale(1.3); filter: blur(10px) brightness(0.85) !important; }
.circle-card:hover .media--fit,
.circle-card:focus-within .media--fit { filter: var(--photo-live); }

/* ---------- still circle (Individual Counselling) ----------
   Parallax zooms photos in by 14%, which cut off the laptop. This one stays at full size,
   framed low so the man and the laptop both show. */
.circle-card .media--still img { filter: var(--photo-rest); transition: filter 700ms var(--ease-out); }

/* ---------- willpower band: stronger parallax, scroll-filled text, rolling numbers ---------- */
/* both photos travel up to 12% (data-px-range) so they rest zoomed further to keep edges hidden */
.split-media .px-frame img[data-px-range] { --px-rest: 1.36; --ps: var(--px-rest); }
.split-media:hover .px-frame img[data-px-range] { --ps: 1.42; }
/* body copy fills to near-black word by word, like the intro band (scroll-words.js) */
[data-words] .w { opacity: 0.18; transition: opacity 120ms linear; }
.split-words p, .split-words li { color: #2a2a2a; font-weight: 600; font-size: 17px; line-height: 30px; }
/* the sub-label fills with scroll too, and lands darkest of all */
.sec-head .sub--fill { color: #000; font-weight: 700; }
.split-words .ticks { margin-bottom: 0; }
/* rolling stats: fixed-width digits so the numbers don't wobble as they count */
.stats .n { font-variant-numeric: tabular-nums; }

/* ---------- service pages (individual-counselling.html and friends, built from one template) ---------- */
.banner .crumb a { color: inherit; }
.svc-intro .split { align-items: start; }
.svc-photo .px-frame { aspect-ratio: var(--ratio, 4 / 5); }
.svc-photo .px-frame img { width: 100%; height: 100%; object-fit: cover; }
.svc-intro h2 { font-size: clamp(34px, 3.6vw, 48px); line-height: 1.12; }
.split-body .rule--left { width: 40px; height: 1px; background: var(--olive); border: 0; margin: 20px 0 24px; }
.svc-lede p { margin: 0 0 18px; font-size: 17px; line-height: 30px; color: var(--head); font-weight: 400; }
.svc-notice { margin: 4px 0 18px; padding: 16px 20px; background: var(--white); border-left: 3px solid var(--olive); font-size: 15px; line-height: 26px; color: var(--head); }
.svc-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px 24px;
  margin: 26px 0 30px; padding: 20px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.svc-facts dt { font-size: 12px; line-height: 18px; letter-spacing: 1.1px; text-transform: uppercase; margin-bottom: 6px; }
.svc-facts dd { margin: 0; font-family: var(--display); font-size: 21px; line-height: 27px; color: var(--head); }
.svc-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.svc-link { color: var(--olive-text); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; }

.stats--auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 980px; margin: 0 auto; }
.svc-note { max-width: 640px; margin: 40px auto 0; text-align: center; font-size: 17px; line-height: 29px; color: var(--head); }

.svc-steps { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 60px; }
.svc-steps li { display: flex; gap: 20px; align-items: flex-start; }
.svc-steps .num {
  flex: 0 0 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--olive-text-dark); color: var(--olive-text-dark);
  font-family: var(--display); font-size: 20px;
}
.svc-steps h3 { font-size: 24px; line-height: 30px; margin: 6px 0 6px; }
.svc-steps p { margin: 0; }
.svc-close { max-width: 680px; margin: 56px auto 0; text-align: center; font-size: 18px; line-height: 30px; color: var(--head-dark); }
.svc-xlink { margin: 44px 0 0; text-align: center; }
.svc-xlink a { color: var(--olive-text); font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.band--green .svc-xlink a { color: var(--olive-text-dark); }

.svc-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px var(--gap); max-width: 1000px; margin: 0 auto; }
.svc-grid3 h3 { font-size: 24px; line-height: 30px; margin-bottom: 8px; }
.svc-grid3 p { margin: 0; }
.svc-benefits { max-width: 640px; margin: 72px auto 0; padding-top: 44px; border-top: 1px solid var(--rule-dark); }
.svc-benefits h3 { font-size: 28px; line-height: 34px; margin-bottom: 18px; text-align: center; }
.band--green .ticks li { color: var(--head-dark); }

.svc-chips { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.svc-chips li { padding: 10px 20px; border-radius: 999px; font-size: 15px; line-height: 20px; color: var(--head-dark); box-shadow: inset 0 0 0 1px var(--olive-text-dark); }
.band--white .svc-chips li { color: var(--head); box-shadow: inset 0 0 0 1px var(--olive-text); }
.svc-bigstat { max-width: 560px; margin: 56px auto 0; text-align: center; }
.svc-bigstat .n { font-family: var(--display); font-size: 72px; line-height: 1; color: var(--head-dark); }
.svc-bigstat p { margin: 12px 0 0; }
.svc-bigstat .src { display: block; margin-top: 6px; font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--olive-text-dark); }
.svc-pull { max-width: 760px; margin: 56px auto 0; padding-top: 44px; border-top: 1px solid var(--rule-dark); text-align: center; }
.svc-pull blockquote { margin: 0; }
.svc-pull p { margin: 0; font-family: var(--display); font-size: 26px; line-height: 36px; color: var(--head-dark); }
.svc-pull figcaption { margin-top: 16px; font-size: 13px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--olive-text-dark); }

.svc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: var(--gap); max-width: 1000px; margin: 0 auto; }
.svc-card { background: var(--white); padding: 44px 40px; }
.svc-card h3 { font-size: 30px; line-height: 36px; margin-bottom: 14px; }
.svc-card p { margin: 0 0 16px; }
.svc-card .svc-facts { margin: 22px 0 16px; }
.svc-card .small { font-size: 14px; line-height: 24px; margin: 0 0 22px; }

.svc-quote { max-width: 760px; margin: 0 auto; background: var(--cream); }
.svc-disclaim { max-width: 760px; margin: 20px auto 0; text-align: center; font-size: 13px; line-height: 22px; }

.band--green.svc-cta { background: #24443C; text-align: center; }
.svc-cta h2 { font-size: 55px; line-height: 58px; }
.svc-cta p { max-width: 580px; margin: 18px auto 34px; }
.svc-cta .svc-actions { justify-content: center; }
.svc-cta .svc-xlink { max-width: none; margin: 34px auto 0; }
.svc-cta .pill--ghost { color: var(--head-dark); box-shadow: inset 0 0 0 1px var(--olive-text-dark); }

.svc-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 34px var(--gap); }
.svc-more-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; text-decoration: none; }
.svc-more-card .thumb { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; transition: transform 400ms var(--ease-out); }
.svc-more-card .thumb img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo-rest); }
.svc-more-card .name { font-family: var(--display); font-size: 21px; line-height: 26px; color: var(--head); }
.svc-more-card .go { font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--olive-text); }
.svc-more-card:hover .thumb { transform: scale(1.06); }

@media (max-width: 1024px) {
  .svc-grid3 { grid-template-columns: repeat(2, 1fr); }
  .svc-cta h2 { font-size: 42px; line-height: 46px; }
}
@media (max-width: 760px) {
  .svc-steps, .svc-grid3 { grid-template-columns: 1fr; }
  .svc-card { padding: 34px 24px; }
}

/* ---------- six roots: the centre photo changes on hover ----------
   Six photos sit stacked in the frame. The one for the hovered root fades and settles
   to the front; the others fade back. All are greyscale so the set reads as one thing. */
.roots-photo { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; }
.roots-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.07);
  filter: grayscale(1) contrast(1.08) brightness(0.95);
  transition: opacity 800ms var(--ease-out), transform 1400ms var(--ease-out);
}
.roots-photo img.is-on { opacity: 1; transform: scale(1); }
.root { transition: opacity 400ms ease; outline-offset: 6px; }
.roots.is-picking .root:not(.is-active) { opacity: 0.5; }
.root.is-active .num { color: var(--olive-text-dark); }
@media (prefers-reduced-motion: reduce) {
  .roots-photo img { transition: opacity 200ms linear; transform: none; }
  .roots-photo img.is-on { transform: none; }
}

/* the root whose photo is showing lights up: olive title, filled number */
.root h3, .root .num { transition: color 450ms ease, background 450ms ease, box-shadow 450ms ease; }
.root.is-active h3 { color: var(--olive-text-dark); }
.root.is-active .num {
  color: var(--ink); background: var(--olive-text-dark);
  border-color: transparent; box-shadow: inset 0 0 0 1px var(--olive-text-dark);
}
@media (prefers-reduced-motion: reduce) {
  .root h3, .root .num { transition: none; }
}

/* six roots: the centre photo drifts against the scroll.
   parallax.js writes --py on the frame; an inner layer carries that translate so it never
   fights the crossfade, and the photos rest slightly zoomed so no edge can show. */
.roots-photo[data-px] { transform: none !important; filter: none; will-change: auto; }
.roots-shift { position: absolute; inset: 0; display: block; transform: translate3d(0, var(--py, 0px), 0); }
.roots-photo img { transform: scale(1.15); }
.roots-photo img.is-on { transform: scale(1.07); }
@media (prefers-reduced-motion: reduce) {
  .roots-shift { transform: none; }
  .roots-photo img, .roots-photo img.is-on { transform: scale(1.07); }
}

/* six roots: each root fades and rises in with scroll (scroll-words.js writes the opacity),
   so the dimming of the other roots has to ride on filter instead of opacity */
.roots.is-picking .root:not(.is-active) { opacity: 1; filter: opacity(0.45); }
.root { transition: filter 400ms ease; }
.root[data-fade] { will-change: opacity, transform; }
@media (prefers-reduced-motion: reduce) {
  .root { transition: none; }
}

/* ---------- hero end card, second pass ----------
   Centred lines (the hero's staggered indent only works left-aligned), bigger type so the
   card fills the white frame, a rule and a short line under the button for balance, and
   light video controls while the white is showing. */
.hero-end { padding: 120px 24px 96px; }
.hero .hero-end-title {
  font-size: clamp(46px, 7.2vw, 104px);
  line-height: 0.96;
  margin: 0 0 30px;
}
.hero-end-rule { display: block; width: 54px; height: 1px; background: var(--olive); margin: 0 0 32px; }
.hero-end .pill { padding: 19px 42px; font-size: 16px; }
.hero-end-note {
  margin: 26px 0 0; font-size: 13px; line-height: 20px;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--text);
}
/* each piece settles up a touch as the card fades in */
.hero-end > * { transform: translateY(12px); transition: transform 900ms var(--ease-out) 200ms; }
.hero.is-ended .hero-end > * { transform: none; }
/* the controls sit on white at this point, so flip them light */
.hero.is-ended .vid-ctrl, .hero.is-ended .vid-label {
  background: rgba(255,255,255,0.7); color: var(--head); border-color: rgba(31,31,31,0.18);
}
.hero.is-ended .vid-ctrl:hover { background: #fff; border-color: var(--olive-text); }
@media (prefers-reduced-motion: reduce) {
  .hero-end > * { transform: none; transition: none; }
}

/* end card, third pass: the title carries it alone, so centre it evenly and let it breathe */
.hero-end { padding: 120px 24px; }
.hero .hero-end-title {
  font-size: clamp(48px, 7.6vw, 112px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin: 0;
}

/* "Take the test" was sitting tight under "problem?", so give the accent line room */
.test-copy h2 .accent { margin-top: 0.22em; }

/* "Find out more" on the service cards now reads as a button, not a caption */
.circle-card a {
  padding: 12px 26px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--olive-text-dark);
  font-size: 14px; font-weight: 500; margin-top: 20px;
  transition: background 300ms ease, color 300ms ease, box-shadow 300ms ease;
}
.circle-card a:hover,
.circle-card:hover a, .circle-card:focus-within a {
  background: var(--olive-text-dark); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--olive-text-dark);
}

/* smaller buttons, and every card pushes its button to the bottom so they line up across a row */
.circle-card { display: flex; flex-direction: column; align-items: center; height: 100%; }
.circle-card p { flex: 1 1 auto; margin-bottom: 18px; }
.circle-card a {
  align-self: center; margin-top: auto;
  padding: 10px 22px; font-size: 12px;
}

/* half-size again: the 28.5px body line-height was making the pill tall, so pin it to 1 */
.circle-card a { padding: 8px 18px; font-size: 11px; line-height: 1; letter-spacing: 1px; }

/* roots photo drifts further now (0.9 speed, 10% range), so it rests zoomed further in
   to keep its edges outside the frame through the whole travel */
.roots-photo img { transform: scale(1.24); }
.roots-photo img.is-on { transform: scale(1.18); }
@media (prefers-reduced-motion: reduce) {
  .roots-photo img, .roots-photo img.is-on { transform: scale(1.18); }
}

/* Parallax lives on the photos themselves. --py is a registered, non-inheriting property,
   so a wrapper layer never receives it; the images have to carry data-px like the rest of
   the site. --ps handles the settle zoom, and only opacity is transitioned so the drift
   stays exactly in step with the scroll. */
.roots-photo img {
  --px-rest: 1.24;
  transform: translate3d(0, var(--py, 0px), 0) scale(var(--ps, 1.24));
  transition: opacity 800ms var(--ease-out), --ps 900ms var(--ease-out);
}
.roots-photo img.is-on { --ps: 1.18; }
@media (prefers-reduced-motion: reduce) {
  .roots-photo img, .roots-photo img.is-on { transform: none; }
}

/* the active photo needs the same transform, at matching specificity, or the earlier
   .is-on scale rule wins and the drift never renders */
.roots-photo img.is-on {
  --ps: 1.18;
  transform: translate3d(0, var(--py, 0px), 0) scale(var(--ps, 1.18));
}
@media (prefers-reduced-motion: reduce) {
  .roots-photo img.is-on { transform: none; }
}

/* travel is about 39px each way, so the photo needs at least that much headroom:
   scale 1.24 on a 400px frame leaves 48px, which covers it with room to spare */
.roots-photo img { --px-rest: 1.30; }
.roots-photo img.is-on { --ps: 1.24; }

/* tighter pills: less side padding and tracking, so they take up less width on the card */
.circle-card a { padding: 7px 14px; letter-spacing: 0.7px; }

/* Root 01: the protest sign touches the very top edge of the photo, so any vertical drift
   or zoom clips the top line off it. This one is laid out 16% wider than the frame and
   anchored to the top (object-position 50% 0), so the full sign is always in shot and the
   spare width, about 24px each side, is what the scroll drifts through. Same --py, applied
   on X and damped to stay inside that slack. No scale, or the top clips again. */
.roots-photo img[data-root="1"],
.roots-photo img.is-on[data-root="1"] {
  left: -8%; right: auto; width: 116%; max-width: none; height: 100%;
  object-position: 50% 0%;
  transform: translate3d(calc(var(--py, 0px) * 0.55), 0, 0);
}
@media (prefers-reduced-motion: reduce) {
  .roots-photo img[data-root="1"],
  .roots-photo img.is-on[data-root="1"] { transform: none; }
}

/* Both new "Somewhere to Start" photos are tall portraits dropped into a 4:3 card, so a
   centred crop lands in the wrong place. Pull each one's window up to the faces. */
.card .media img[src*="self-assessment-mirror"] { object-position: 50% 10%; }
.card .media img[src*="partner-found-out"] { object-position: 50% 20%; }

/* =====================================================================
   RESPONSIVE PASS (tablet and phone)
   Everything below only fires under 1180px, so the tuned desktop layout is untouched.
   It sits at the very end on purpose: many desktop blocks above were appended after the
   original responsive section, so they were quietly beating it.
   Breakpoints: 1180 (iPad landscape), 1024 (iPad portrait wide), 768 (small tablet),
   600 (large phone), 420 (phone).
   ===================================================================== */

/* hero: 16:9 plus a min-height forced the section to ~1000px wide on narrow screens */
@media (max-width: 1024px) {
  .hero { aspect-ratio: auto; min-height: 0; height: min(78svh, 760px); }
}
@media (max-width: 600px) {
  .hero { height: 88svh; min-height: 560px; }
}

/* ---------- phone menu (menu.js builds the button and panel) ---------- */
.menu-btn, .menu-panel { display: none; }

@media (max-width: 768px) {
  /* the utility bar's links move into the menu panel */
  .utility { display: none; }

  .site-head, .site-head--solid {
    position: sticky; top: 0; left: 0; right: 0; z-index: 30;
    background: var(--ink); padding: 10px 0;
    transition: background-color 350ms ease, box-shadow 350ms ease;
  }
  /* homepage: float over the video, pick up a ground once the page moves */
  .site-head:not(.site-head--solid) {
    position: fixed; background: transparent;
  }
  .site-head:not(.site-head--solid).is-scrolled {
    background: rgba(31, 31, 31, 0.96);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6);
  }
  html.menu-open .site-head { background: transparent; box-shadow: none; }

  .site-head .wrap { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
  .site-head .nav { display: none; }
  .brand { gap: 11px; }
  .brand .logo-anim--mark { width: 56px; }
  .site-head .brand .name { font-size: 21px; color: var(--head-dark); }
  .site-head .brand .tag { font-size: 9px; letter-spacing: 1.6px; color: var(--text-dark); }
  .site-head--solid .brand img { filter: brightness(0) invert(1); }

  .menu-btn {
    display: inline-flex; align-items: center; gap: 12px;
    min-height: 44px; margin-right: -6px; padding: 0 6px 0 14px;
    background: none; border: 0; cursor: pointer;
    color: var(--head-dark); font-family: var(--display);
    font-size: 14px; letter-spacing: 1.2px; text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
  }
  .menu-btn:focus-visible { outline: 1px solid var(--olive-text-dark); outline-offset: 2px; }
  .menu-btn__icon { position: relative; width: 24px; height: 12px; }
  .menu-btn__icon i {
    position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
    transition: transform 450ms var(--ease-out), top 450ms var(--ease-out), right 450ms var(--ease-out);
  }
  .menu-btn__icon i:first-child { top: 1px; }
  .menu-btn__icon i:last-child { top: 9px; right: 7px; }
  .menu-btn[aria-expanded="true"] .menu-btn__icon i:first-child { top: 5px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-btn__icon i:last-child { top: 5px; right: 0; transform: rotate(-45deg); }

  .menu-panel {
    display: block; position: fixed; inset: 0; z-index: 25;
    background: var(--green); color: var(--text-dark);
    overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden;
    transition: opacity 400ms var(--ease-out), visibility 0s linear 400ms;
  }
  .menu-panel[hidden] { display: none; }
  .menu-panel.is-open { opacity: 1; visibility: visible; transition: opacity 400ms var(--ease-out), visibility 0s; }
  .menu-panel__inner {
    min-height: 100%; display: flex; flex-direction: column;
    padding: 96px 24px calc(28px + env(safe-area-inset-bottom));
  }
  .menu-links { display: flex; flex-direction: column; border-top: 1px solid var(--rule-dark); }
  .menu-links a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 0; border-bottom: 1px solid var(--rule-dark);
    font-family: var(--display); font-size: 34px; line-height: 1.1;
    color: var(--head-dark); text-decoration: none;
    opacity: 0; transform: translateY(16px);
    transition: opacity 500ms var(--ease-out), transform 800ms var(--ease-out), color 300ms ease;
    transition-delay: calc(90ms + var(--i, 0) * 50ms);
  }
  .menu-links a[aria-current] { color: var(--olive-text-dark); }
  .menu-links a[aria-current]::after {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--olive-text-dark);
  }
  .menu-links a:active { color: var(--olive-text-dark); }
  .menu-panel.is-open .menu-links a { opacity: 1; transform: none; }

  .menu-foot {
    margin-top: auto; padding-top: 44px; display: grid; gap: 14px;
    opacity: 0; transition: opacity 600ms var(--ease-out) 340ms;
  }
  .menu-panel.is-open .menu-foot { opacity: 1; }
  .menu-book { display: block; text-align: center; padding: 19px 24px; font-size: 16px; border-radius: 999px; }
  .menu-book:hover { background: var(--olive-dim); }
  .menu-contact { display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 4px 0 0; }
  .menu-contact a {
    display: inline-flex; align-items: center; min-height: 44px;
    color: var(--head-dark); text-decoration: none; font-size: 16px;
  }
  .menu-tagline { margin: 0; font-size: 12px; line-height: 18px; letter-spacing: 1.4px; text-transform: uppercase; }

  html.menu-open, html.menu-open body { overflow: hidden; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .menu-panel, .menu-links a, .menu-foot, .menu-btn__icon i { transition: none; }
  .menu-links a { transform: none; }
}

/* ---------- hero titles: let them wrap instead of running off the edge ---------- */
@media (max-width: 1024px) {
  .hero h1 { font-size: clamp(40px, 7vw, 66px); }
}
@media (max-width: 768px) {
  .hero .wrap { padding-top: 132px; padding-bottom: 56px; }
}
@media (max-width: 600px) {
  .hero { align-items: flex-end; }
  .hero .wrap { padding-bottom: 72px; }
  .hero h1 { font-size: clamp(38px, 11.6vw, 50px); line-height: 1.02; margin-bottom: 22px; }
  .hero h1 span { white-space: normal; }
  .hero h1 .i1 { padding-left: 0.9em; }
  .hero p { font-size: 15px; line-height: 26px; margin-bottom: 28px; }
  .hero .hero-end-title { font-size: clamp(36px, 10.8vw, 50px); line-height: 1.02; }
  .hero-end-title > span { white-space: normal; }
  .hero-end { padding: 110px 20px 60px; }
}

/* ---------- homepage sections on tablet ---------- */
@media (max-width: 1024px) {
  /* "Take the test": the card sat hard left under the copy once stacked */
  .test-card { margin-inline: auto; width: 100%; }

  /* willpower band: two narrow columns were cramped, so stack photos over the words */
  .split { grid-template-columns: 1fr; gap: 52px; }
  .split-media { max-width: 620px; width: 100%; }
  .split-body { max-width: 640px; }

  /* the six roots photo went edge to edge once the roots stacked */
  .roots .photo-frame { max-width: 440px; margin-inline: auto; }

  /* booking band: form and sketch were squeezed side by side */
  .appt .grid { grid-template-columns: 1fr; gap: 56px; }
  .appt .grid > div:first-child { max-width: 640px; }
  .appt .art { max-width: 380px; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr) !important; row-gap: 48px !important; column-gap: 24px !important; }
}

/* "Somewhere to Start": three cards read as rows on a tablet, image left, words right */
@media (min-width: 601px) and (max-width: 1024px) {
  .cards { grid-template-columns: 1fr !important; gap: 40px !important; }
  .cards .card {
    display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto 1fr; column-gap: 34px;
  }
  .cards .card .media { grid-column: 1; grid-row: 1 / -1; }
  .cards .card .cat { grid-column: 2; grid-row: 2; margin-top: 0; }
  .cards .card h3 { grid-column: 2; grid-row: 3; }
  .cards .card .meta { grid-column: 2; grid-row: 4; }
}

/* ---------- phone ---------- */
@media (max-width: 600px) {
  .roots .photo-frame { max-width: 360px; }
  .stats .n { font-size: 38px; }
  .stats .l { font-size: 19px; line-height: 25px; }

  /* footer links in two columns instead of one long list */
  .site-foot { padding-top: 72px; }
  .site-foot .cols { gap: 44px; }
  .site-foot ul { columns: 2; column-gap: 24px; }
  .site-foot ul li { break-inside: avoid; }
  .foot-bottom { margin-top: 48px; }
}

/* ---------- touch: nothing smaller than a fingertip ---------- */
@media (pointer: coarse) {
  .circle-card a { padding: 12px 20px; font-size: 12px; }
  .foot-bottom .socials a { width: 44px; height: 44px; }
  .site-foot ul li a { display: inline-block; padding: 6px 0; }
}

/* service pages: six "Other Ways We Help" links fell 4 + 2 on a tablet, so make it 3 + 3 */
@media (min-width: 601px) and (max-width: 1024px) {
  .svc-more-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- phone pass (4 Oct 2026) ---------- */
@media (max-width: 768px) {
  /* the name broke onto two lines when the menu opened, and all the time at 360px wide */
  .site-head .wrap { gap: 10px; }
  .site-head .brand { flex: none; }
  .site-head .brand .name { white-space: nowrap; }
  /* the tag's tracking is tighter here, so the right hairline takes back less */
  .site-head .brand .tag { letter-spacing: 0.18em; }
  .site-head .brand .tag::after { margin-left: -0.18em; }
}
@media (max-width: 400px) {
  .site-head .wrap { padding: 0 18px; }
  .site-head .brand { gap: 9px; }
  .site-head .brand .logo-anim--mark { width: 48px; }
  .site-head .brand .name { font-size: 19px; }
  .menu-btn { gap: 9px; padding-left: 8px; font-size: 13px; }
}
/* smallest phones: the icon stands alone, the word stays for screen readers */
@media (max-width: 340px) {
  .menu-btn__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
}

/* five service cards in two columns left the fifth alone on the left, so centre it */
@media (min-width: 481px) and (max-width: 1024px) {
  .circles--five > :last-child, .circles--seven > :last-child { grid-column: 1 / -1; justify-self: center; width: 50%; }
}

@media (pointer: coarse) {
  .site-foot .cols a.phone, .site-foot .cols a.phone ~ a { display: inline-block; padding: 7px 0; }
}

/* Currency note under the price blocks (pricing.js) */
.cur-note { font-size: 14px; line-height: 20px; margin: 6px 0 14px; opacity: .8; }
.cur-note button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- recovery group videos (members only, password protected in WordPress) ---------- */
.vid-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; margin: 0 auto; }
.vid-menu a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  font-size: 14px; line-height: 20px; color: var(--olive-text); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--rule); background: var(--white);
}
.vid-menu a:hover { background: var(--olive-text); color: #fff; box-shadow: none; }
.vid-list { max-width: 900px; }
.vid-week { padding-top: 24px; scroll-margin-top: 120px; }
.vid-week + .vid-week { margin-top: 56px; border-top: 1px solid var(--rule); padding-top: 56px; }
.vid-week h2 { font-size: 38px; line-height: 44px; margin: 0 0 28px; }
.vid { margin: 0 0 40px; }
.vid-frame { position: relative; padding-top: 56.25%; background: var(--ink); }
.vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid figcaption { margin-top: 14px; font-family: var(--display); font-size: 24px; line-height: 30px; color: var(--head); }
.vid figcaption .eyebrow { display: block; margin-bottom: 4px; }
.vid-lock { max-width: 560px; margin: 0 auto; text-align: center; }
.vid-lock form p { margin: 0 0 16px; }
.vid-lock label { display: block; }
.vid-lock input[type="password"], .vid-lock .pw-wrap input { display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; font: inherit; }
.vid-lock .pw-wrap { position: relative; display: block; margin-top: 8px; }
.vid-lock .pw-wrap input { margin-top: 0; padding-right: 52px; }
.vid-lock .pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--olive-text); cursor: pointer; }
.vid-lock .pw-eye:hover { background: rgba(92, 111, 53, .08); }
.vid-lock .pw-eye:focus-visible { outline: 2px solid var(--olive-text); outline-offset: 2px; }
.vid-lock input[type="submit"] { margin-top: 6px; padding: 12px 28px; border: 0; border-radius: 999px; background: var(--olive-text); color: #fff; font: inherit; cursor: pointer; }

/* ---------- form result message (printed by the theme after a form is sent) ---------- */
.bc-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: flex-start; gap: 16px;
  width: min(560px, calc(100% - 32px)); padding: 18px 20px;
  background: var(--green); color: var(--head-dark); border-left: 4px solid var(--olive);
  box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 15px; line-height: 1.5;
}
.bc-toast--bad { background: var(--ink); border-left-color: #C0573E; }
.bc-toast p { margin: 0; color: inherit; }
.bc-toast button {
  margin-left: auto; background: none; border: 0; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px;
}
