/* =============================================================
   Pandora's Box Sexual Health Rehabilitation
   Refined art-deco apothecary calm. Accessibility is the brand.
   Tailwind (CDN) handles layout utilities; this file owns the
   design system: tokens, type, components, motion, a11y.
   ============================================================= */

/* ── Design tokens ──────────────────────────────────────── */
:root {
  --bg:        #E6ECF4;   /* pale periwinkle — page base   */
  --bg-deep:   #DCE4F0;   /* slightly deeper periwinkle    */
  --surface:   #F7F9FC;   /* elevated card surface         */
  --surface-2: #FCFDFF;   /* floating surface              */
  --surface-pill:#EAE6DF; /* taupe chip fill (pills)       */
  --ink:       #1A1A1A;   /* headings + body (AAA)         */
  --muted:     #4A515C;   /* secondary text (AA+)          */
  --accent:    #9A8C7A;   /* taupe-bronze — LINES ONLY     */
  --accent-ink:#5A5040;   /* taupe-bronze, darkened to clear AA on small text */
  --sage:      #7E9A7B;   /* warmth accent                 */
  --sage-deep: #5E7A5C;   /* sage for text on light        */

  --line:      rgba(154,140,122,.45);   /* hairline rule   */
  --line-soft: rgba(40,55,80,.10);

  --shadow-card:  0 1px 2px rgba(40,55,80,.06), 0 12px 28px -10px rgba(40,55,80,.18);
  --shadow-float: 0 2px 6px rgba(40,55,80,.08), 0 28px 56px -16px rgba(40,55,80,.24);

  --radius:    18px;
  --radius-sm: 12px;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  /* fluid type scale */
  --fs-eyebrow: .8rem;
  --fs-body:    1.0625rem;          /* 17px */
  --fs-lead:    clamp(1.125rem, .9rem + .9vw, 1.375rem);
  --fs-h3:      clamp(1.3rem, 1.05rem + 1vw, 1.7rem);
  --fs-h2:      clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
  --fs-h1:      clamp(2.5rem, 1.7rem + 3.6vw, 4.5rem);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ── Reset-ish base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* WCAG 2.2, SC 2.4.11 Focus Not Obscured: the header is sticky (~77px), so
     anchor/skip-link targets must land clear of it, never hidden underneath.
     Generous clearance that holds up at the larger text-size presets too. */
  scroll-padding-top: 6rem;
}

body {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.7;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* subtle layered atmosphere — periwinkle depth, not flat */
  background-image:
    radial-gradient(1100px 600px at 82% -8%, rgba(255,255,255,.65), transparent 60%),
    radial-gradient(900px 700px at -10% 12%, rgba(126,154,123,.07), transparent 55%),
    radial-gradient(800px 800px at 50% 120%, rgba(154,140,122,.08), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible {
  outline: 3px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Marcellus', Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.display-1 { font-size: var(--fs-h1); letter-spacing: -0.015em; }
.display-2 { font-size: var(--fs-h2); }
.display-3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: 0; }
p { max-width: 64ch; }
.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.6; }
strong { font-weight: 600; }
::selection { background: rgba(126,154,123,.28); }

/* Eyebrow label — deco caps with a leading hairline (brochure cue) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  font-family: 'Marcellus', serif;
  font-size: var(--fs-eyebrow);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--accent);
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--accent);
}

/* ── Layout ─────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.measure { max-width: 60ch; }
.stack > * + * { margin-top: 1.1rem; }

/* Skip link */
.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 200;
  background: var(--ink); color: var(--surface);
  padding: .7rem 1.1rem; border-radius: 10px;
  font-size: .95rem; font-weight: 500;
  transform: translateY(-150%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* Decorative keyhole watermark (echoes the crest, very faint) */
.watermark {
  position: absolute; pointer-events: none; z-index: 0;
  opacity: .05; filter: grayscale(1);
  width: min(520px, 60vw);
  inset: auto -6% -12% auto;
}
.watermark img { width: 100%; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  gap: .6rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem; font-weight: 500; line-height: 1;
  letter-spacing: .01em;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  box-shadow: 0 1px 2px rgba(40,55,80,.10), 0 10px 22px -12px rgba(40,55,80,.5);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn:active { transform: translateY(0); }
.btn .btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--accent);
  box-shadow: none;
}
.btn--secondary:hover { background: rgba(154,140,122,.12); transform: translateY(-2px); box-shadow: none; }

.btn--light {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
}
.btn--on-dark {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
}
.btn--ghost-on-dark {
  --btn-bg: transparent;
  --btn-fg: var(--surface);
  border-color: rgba(247,249,252,.4);
  box-shadow: none;
}
.btn--ghost-on-dark:hover { background: rgba(247,249,252,.1); }

/* Text link with animated underline */
.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 500; color: var(--accent-ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px; background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .3s var(--ease), color .2s var(--ease);
}
.link-arrow:hover { background-size: 100% 1px; color: var(--ink); }
.link-arrow svg { transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(230,236,244,.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(40,55,80,.4); background: rgba(230,236,244,.92); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand__mark { width: 42px; height: auto; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: 'Marcellus', serif; font-size: 1.32rem; color: var(--ink); letter-spacing: .01em; }
.brand__sub { font-size: .58rem; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: .28rem; }

.primary-nav__list { list-style: none; display: flex; align-items: center; gap: .35rem; padding: 0; }
.primary-nav a {
  display: inline-block;
  text-decoration: none; color: var(--ink);
  font-size: .98rem; padding: .55rem .8rem; border-radius: 999px;
  position: relative;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.primary-nav a:not(.primary-nav__cta)::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .35rem;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease);
}
.primary-nav a:not(.primary-nav__cta):hover::after,
.primary-nav a.is-active:not(.primary-nav__cta)::after { transform: scaleX(1); }
.primary-nav a.is-active { color: var(--accent-ink); }
.primary-nav__cta {
  background: var(--ink); color: var(--surface) !important; margin-left: .5rem;
  padding: .6rem 1.25rem !important;
  box-shadow: 0 8px 18px -12px rgba(40,55,80,.7);
}
.primary-nav__cta::after { display: none; }
.primary-nav__cta:hover { background: #000; transform: translateY(-1px); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 46px; height: 46px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle__bar { width: 20px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset: 76px 0 auto 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-float);
    max-height: 0; overflow: hidden;
    transition: max-height .35s var(--ease);
  }
  .primary-nav.is-open { max-height: 80vh; }
  .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.5rem; }
  .primary-nav a { padding: .95rem .4rem; font-size: 1.1rem; border-radius: 10px; border-bottom: 1px solid var(--line-soft); }
  .primary-nav a::after { display: none; }
  .primary-nav__cta { margin: .8rem 0 0; text-align: center; padding: .95rem !important; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }

/* Two-column variant (kept for reuse) */
.hero:not(.hero--centered) .hero__inner {
  display: grid; gap: clamp(2rem, 4vw, 4rem);
  grid-template-columns: 1.05fr .95fr; align-items: center;
  padding-block: clamp(3rem, 2rem + 6vw, 6.5rem);
}
.hero__title { margin-bottom: 1.5rem; }
.hero__media { position: relative; margin: 0; }
.hero__img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero__reassure { margin-top: 1.5rem; color: var(--muted); font-size: .95rem; display: inline-flex; gap: .5rem; align-items: center; }

/* ── Hero — logo-forward / centered ─────────────────────── */
.hero--centered .hero__inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5rem) clamp(3rem, 2rem + 6vw, 6.5rem);
}
.hero--centered .hero__brand {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.hero__crest {
  width: clamp(118px, 9vw + 70px, 176px); height: auto;
  /* lift the ornate black crest off the periwinkle with a soft halo */
  filter: drop-shadow(0 14px 26px rgba(40, 55, 80, .22));
  animation: crest-in .9s var(--ease) both;
}
@keyframes crest-in { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
.hero__wordmark {
  margin-top: 1.1rem;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  position: relative;
}
.hero__wordmark::before {
  content: ""; display: block; width: 4.5rem; height: 1px;
  background: var(--accent); margin-bottom: .9rem; opacity: .8;
}
.hero__wordmark-name {
  font-family: 'Marcellus', serif; font-size: clamp(1.5rem, 1rem + 2vw, 2.1rem);
  letter-spacing: .04em; line-height: 1; color: var(--ink);
}
.hero__wordmark-sub {
  font-size: clamp(.62rem, .5rem + .25vw, .72rem); letter-spacing: .34em;
  text-transform: uppercase; color: var(--muted);
}
.hero--centered .hero__title { max-width: 18ch; margin: 0 auto 1.4rem; }
.hero__lead { max-width: 56ch; margin-inline: auto; }
.hero--centered .hero__actions { justify-content: center; }
.hero--centered .hero__reassure { justify-content: center; }
.hero--centered .hero__media {
  width: 100%; max-width: 980px; margin: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) auto 0;
}
.hero--centered .hero__img {
  aspect-ratio: 16 / 8; width: 100%;
}
/* faint oversized crest watermark behind the hero, centered top */
.watermark--hero {
  inset: -8% auto auto 50%; transform: translateX(-50%);
  width: min(680px, 86vw); opacity: .045;
}
@media (max-width: 860px) {
  .hero:not(.hero--centered) .hero__inner { grid-template-columns: 1fr; }
  .hero:not(.hero--centered) .hero__media { order: -1; max-width: 520px; }
  .hero:not(.hero--centered) .hero__img { aspect-ratio: 16 / 11; }
  .hero--centered .hero__img { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) { .hero__crest { animation: none; } }

/* ── Cards & grids ──────────────────────────────────────── */
.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  height: 100%;
}
.card--interactive:hover { transform: translateY(-5px); box-shadow: var(--shadow-float); }
.card__index {
  font-family: 'Marcellus', serif; font-size: .85rem; letter-spacing: .2em;
  color: var(--accent-ink); text-transform: uppercase;
}
.card__title { font-size: var(--fs-h3); margin: .65rem 0 .6rem; }
.card__icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: linear-gradient(145deg, rgba(126,154,123,.18), rgba(154,140,122,.14));
  border: 1px solid var(--line-soft);
  color: var(--accent-ink);
}
.card__icon svg { width: 26px; height: 26px; }

/* ── Method cards — refined, layered trio ("How we communicate") ───── */
.card--method {
  display: flex;
  flex-direction: column;
  padding: clamp(1.7rem, 1.1rem + 2.2vw, 2.5rem);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  isolation: isolate;
}
/* top keyline accent — brand taupe → sage */
.card--method::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--sage));
  opacity: .5;
  transition: opacity .4s var(--ease);
}
/* soft sage glow blooming from the icon corner on hover */
.card--method::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -50px;
  right: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(126,154,123,.18), transparent 70%);
  opacity: 0;
  transform: scale(.85);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.card--method:hover,
.card--method:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-float);
  border-color: rgba(154,140,122,.34);
}
.card--method:hover::before,
.card--method:focus-within::before { opacity: 1; }
.card--method:hover::after,
.card--method:focus-within::after { opacity: 1; transform: scale(1.08); }

.card--method .card__icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(154,140,122,.20), rgba(126,154,123,.15));
  border: 1px solid rgba(154,140,122,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 7px 16px -10px rgba(40,55,80,.5);
  color: var(--accent-ink);
  transition: transform .4s var(--ease), color .4s var(--ease);
}
.card--method:hover .card__icon,
.card--method:focus-within .card__icon {
  transform: translateY(-2px) rotate(-4deg);
  color: var(--sage-deep);
}
.card--method .card__icon svg { width: 28px; height: 28px; }

/* hairline rule under the title for editorial rhythm */
.card--method .card__title { margin-bottom: 0; letter-spacing: .005em; }
.card--method .card__title::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-top: .75rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width .4s var(--ease);
}
.card--method:hover .card__title::after,
.card--method:focus-within .card__title::after { width: 56px; }
.card--method .muted { margin-top: .7rem; }

@media (prefers-reduced-motion: reduce) {
  .card--method,
  .card--method::after,
  .card--method .card__icon,
  .card--method .card__title::after { transition: none; }
  .card--method:hover,
  .card--method:focus-within { transform: none; }
  .card--method:hover .card__icon,
  .card--method:focus-within .card__icon { transform: none; }
}
.card ul { padding-left: 0; list-style: none; }
.card li.tick { position: relative; padding-left: 1.6rem; margin-top: .55rem; color: var(--muted); }
.card li.tick::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .55rem; height: .55rem; border-radius: 2px;
  background: var(--sage); transform: rotate(45deg);
}

/* ── Audience doorways (arched image cards, homepage router) ──────
   Photo sits inside a rounded-top "doorway"/keyhole arch (asymmetric
   border-radius on a clipping frame, overflow hidden). The image scales
   WITHIN the fixed frame on engage; serif label + copy live on solid
   surface BELOW the photo (AAA contrast). ───────────────────────── */
.doorways {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: clamp(1.6rem, 1rem + 1.5vw, 2.6rem);
}
@media (max-width: 980px) { .doorways { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .doorways { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; } }

.doorway {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit; border-radius: var(--radius);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}

.doorway__frame {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: 50% 50% var(--radius-sm) var(--radius-sm) / 28% 28% var(--radius-sm) var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card); transition: box-shadow .4s var(--ease);
}
/* hairline inner arch echoing the engraved crest line — decorative */
.doorway__frame::after {
  content: ""; position: absolute; inset: 6px; z-index: 2; pointer-events: none;
  border: 1px solid rgba(154,140,122,.45);
  border-radius: 50% 50% calc(var(--radius-sm) - 4px) calc(var(--radius-sm) - 4px) / 26% 26% calc(var(--radius-sm) - 4px) calc(var(--radius-sm) - 4px);
}

.doorway__img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transform: scale(1.001); transform-origin: center;
  transition: transform .6s var(--ease);
}

.doorway__body {
  display: flex; flex-direction: column; gap: .5rem; flex: 1;
  padding: 1.2rem .4rem 0; text-align: center;
}
.doorway__label { font-size: 1.2rem; line-height: 1.2; color: var(--ink); }
.doorway__copy  { color: var(--muted); font-size: 1rem; line-height: 1.55; }
.doorway__cue {
  margin-top: auto; padding-top: .7rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-weight: 500; color: var(--accent-ink);
}
.doorway__arrow { transition: transform .3s var(--ease); }

.doorway:hover, .doorway:focus-visible { transform: translateY(-6px); }
.doorway:active { transform: translateY(-2px); }
.doorway:hover .doorway__frame, .doorway:focus-visible .doorway__frame {
  box-shadow: 0 2px 6px rgba(40,55,80,.08), 0 26px 50px -18px rgba(40,55,80,.30), 0 18px 40px -22px rgba(126,154,123,.45);
}
.doorway:hover .doorway__img, .doorway:focus-visible .doorway__img { transform: scale(1.07); }
.doorway:hover .doorway__cue, .doorway:focus-visible .doorway__cue { color: var(--sage-deep); }
.doorway:hover .doorway__arrow, .doorway:focus-visible .doorway__arrow { transform: translateX(4px); }
.doorway:focus-visible { outline-offset: 4px; }

html.a11y-calm .doorway__frame::after { border-color: rgba(154,140,122,.3); }

@media (prefers-reduced-motion: reduce) {
  .doorway, .doorway__img, .doorway__frame, .doorway__arrow { transition: none; }
  .doorway:hover, .doorway:focus-visible, .doorway:active,
  .doorway:hover .doorway__img, .doorway:focus-visible .doorway__img,
  .doorway:hover .doorway__arrow, .doorway:focus-visible .doorway__arrow { transform: none; }
  /* shadow lift (no motion) remains as the focus/hover affordance */
}

/* ── BECK badges (graduated greys, brochure-accurate) ───── */
.beck-grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .beck-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .beck-grid { grid-template-columns: 1fr; } }
.beck {
  --bk-accent: var(--accent);
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(176deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.9rem 1.6rem;
  box-shadow: var(--shadow-card); text-align: left; height: 100%;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
/* oversized ghost letter — deco apothecary depth, tucked in the corner */
.beck::before {
  position: absolute; right: -.6rem; bottom: -2.8rem; z-index: -1;
  font-family: 'Marcellus', serif; font-size: 11rem; line-height: 1;
  color: var(--bk-accent); opacity: .06; pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
/* hairline crest rule that lights up on hover */
.beck::after {
  content: ""; position: absolute; top: 0; left: 1.6rem; right: 1.6rem; height: 2px;
  background: linear-gradient(90deg, transparent, var(--bk-accent), transparent);
  opacity: 0; transition: opacity .4s var(--ease);
}
.beck:hover { transform: translateY(-6px); box-shadow: var(--shadow-float); border-color: rgba(154,140,122,.4); }
.beck:hover::before { opacity: .1; transform: translateY(-4px); }
.beck:hover::after { opacity: .85; }

.beck__badge {
  position: relative; width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 1.25rem;
  font-family: 'Marcellus', serif; font-size: 2rem; color: #fff;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,.28),
    inset 0 -4px 9px rgba(0,0,0,.28),
    0 12px 22px -12px rgba(40,55,80,.55);
}
/* deco outer ring around the medallion */
.beck__badge::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 1px solid var(--bk-accent); opacity: .4;
  transition: inset .4s var(--ease), opacity .4s var(--ease);
}
.beck:hover .beck__badge::after { inset: -10px; opacity: .65; }

/* Medallions — four blues matched to the BECK logo (navy B, slate E, soft C, steel K).
   Each gradient is deepened from the logo tint so the white letter keeps AA contrast. */
/* B — Behaviour / Background (navy) */
.beck:nth-child(1) { --bk-accent: #34406A; }
.beck:nth-child(1) .beck__badge {
  background: radial-gradient(120% 120% at 32% 24%, #41507C, #2D3B60 58%, #1D2747);
}
/* E — Evaluation / Education (slate) */
.beck:nth-child(2) { --bk-accent: #547084; }
.beck:nth-child(2) .beck__badge {
  background: radial-gradient(120% 120% at 32% 24%, #6A8497, #547084 58%, #3F5868);
}
/* C — Communication / Clinical input (soft blue) */
.beck:nth-child(3) { --bk-accent: #647F9F; }
.beck:nth-child(3) .beck__badge {
  background: radial-gradient(120% 120% at 32% 24%, #748DAD, #647F9F 58%, #4D6483);
}
/* K — Kinesiology & communication supports (steel) */
.beck:nth-child(4) { --bk-accent: #495E6F; }
.beck:nth-child(4) .beck__badge {
  background: radial-gradient(120% 120% at 32% 24%, #5C7184, #495E6F 58%, #36454F);
}
/* ghost watermark letters */
.beck:nth-child(1)::before { content: "B"; }
.beck:nth-child(2)::before { content: "E"; }
.beck:nth-child(3)::before { content: "C"; }
.beck:nth-child(4)::before { content: "K"; }

.beck__term { font-family: 'Marcellus', serif; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .55rem; }
.beck__term::after {
  content: ""; display: block; width: 32px; height: 2px; margin-top: .7rem;
  background: var(--bk-accent); border-radius: 2px;
}
.beck__desc { color: var(--muted); font-size: .98rem; }

/* ── Quote / belief band ────────────────────────────────── */
.band {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--surface);
  border-radius: 0;
}
.band__inner { padding-block: clamp(3.5rem, 2rem + 6vw, 6rem); text-align: center; position: relative; z-index: 1; }
.band__quote {
  font-family: 'Marcellus', serif;
  font-size: clamp(1.6rem, 1rem + 3vw, 3rem);
  line-height: 1.25; color: var(--surface);
  max-width: 22ch; margin-inline: auto;
}
.band__quote .accent { color: #C9B79E; }
.band__sub { margin: 1.4rem auto 0; color: rgba(247,249,252,.66); letter-spacing: .04em; }
.band .watermark {
  opacity: .08;
  filter: grayscale(1) invert(1);
  width: auto;
  height: 80%;
  inset: 50% clamp(1rem, 4vw, 4.5rem) auto auto;
  transform: translateY(-50%);
}
.band .watermark img { width: auto; height: 100%; }
/* On phones, recenter the crest behind the quote and keep the text fully legible */
@media (max-width: 600px) {
  .band .watermark {
    height: auto;
    width: min(340px, 82vw);
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    opacity: .05;
  }
  .band .watermark img { width: 100%; height: auto; }
}

/* Section intro block */
.section-head { max-width: 56ch; margin-bottom: clamp(2rem, 3vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }

/* Split feature (text + image) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--reverse .split__media { order: 2; }
/* Editorial variant: heading column + body column, no image. Top-aligned so the
   heading sits beside the first lines of body copy rather than centred. */
.split--editorial { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse .split__media { order: -1; } .split--editorial { grid-template-columns: 1fr; } }
.split__img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-float); object-fit: cover; }
.split__media { position: relative; }

/* Stat / trust row */
.stats { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem); }
.stat__num { font-family: 'Marcellus', serif; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); color: var(--ink); }
.stat__label { color: var(--muted); font-size: .92rem; max-width: 22ch; }

/* Evidence ledger — divided reference columns (art-deco hairlines) */
.evidence__lead { max-width: 52ch; margin-top: 1.1rem; }
.evidence__grid {
  list-style: none; padding: 0;
  margin-top: clamp(2.4rem, 1.8rem + 3vw, 3.6rem);
  display: grid; grid-template-columns: 1fr; gap: 0;
}
.evidence__item { padding-block: clamp(1.4rem, 1rem + 2vw, 1.9rem); border-top: 1px solid var(--line-soft); }
.evidence__item:first-child { border-top: 1px solid var(--line); }
.evidence__kind {
  font-family: 'Marcellus', serif; font-size: .72rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--accent-ink);
  display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1rem;
}
.evidence__no { color: var(--accent-ink); letter-spacing: .12em; }
.evidence__name {
  position: relative; font-family: 'Marcellus', serif; color: var(--ink);
  font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.35rem); line-height: 1.08;
  padding-bottom: 1rem; margin-bottom: 1rem;
}
.evidence__name .sep { color: var(--accent-ink); font-style: normal; }
.evidence__name::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.4rem; height: 1px; background: var(--accent); }
.evidence__desc { color: var(--muted); font-size: .95rem; max-width: 30ch; }
.evidence__foot { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); color: var(--muted); max-width: 60ch; }
@media (min-width: 760px) {
  .evidence__grid { grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
  .evidence__item { border-top: 0; border-left: 1px solid var(--line-soft); padding: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem) clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); }
  .evidence__item:first-child { border-left: 0; padding-left: 0; }
  .evidence__item:last-child { padding-right: 0; }
}

/* Definition / value list */
.deco-list { list-style: none; padding: 0; display: grid; gap: 1.25rem; }
.deco-list li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.deco-list .marker {
  font-family: 'Marcellus', serif; color: var(--accent-ink);
  border: 1px solid var(--line); border-radius: 50%;
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center; flex-shrink: 0;
}

/* Surface section variants */
.section--surface { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); border-block: 1px solid var(--line-soft); }
.section--deep { background: var(--bg-deep); }

/* CTA panel */
.cta-panel {
  background: linear-gradient(155deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  padding: clamp(2rem, 1.5rem + 3vw, 4rem);
  text-align: center; position: relative; overflow: hidden;
}
.cta-panel__actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 1.8rem; }
/* Small phones: stack action rows so wide buttons (e.g. phone number) don't wrap awkwardly */
@media (max-width: 480px) {
  .hero__actions, .cta-panel__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn, .cta-panel__actions .btn { width: 100%; }
}

/* Eyebrow page hero (interior pages) */
.page-hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 2rem + 5vw, 5.5rem); }
.page-hero__inner { max-width: 60ch; position: relative; z-index: 1; }
.page-hero .display-1 { margin-bottom: 1.2rem; }
/* Keep the full crest inside the hero (no clipping off the right/bottom edges) */
.page-hero .watermark {
  inset: 50% clamp(1rem, 3vw, 3rem) auto auto;
  transform: translateY(-50%);
  width: min(460px, 42vw);
}
@media (max-width: 768px) {
  .page-hero .watermark { inset: auto 50% -6% auto; transform: translateX(50%); width: min(380px, 70vw); }
}

/* Breadcrumb */
.crumbs { font-size: .85rem; color: var(--muted); letter-spacing: .04em; margin-bottom: 1.2rem; }
.crumbs a { color: var(--accent-ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ── Forms ──────────────────────────────────────────────── */
.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .45rem; }
.field label { font-weight: 500; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .85rem; }
.field input, .field textarea, .field select {
  font-family: 'Poppins', sans-serif; font-size: 1rem; color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .85rem 1rem; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  border-color: var(--sage-deep);
  /* Outline (not just box-shadow) so the focus ring survives Windows
     High Contrast / forced-colors mode, where box-shadows are dropped. */
  outline: 3px solid var(--sage-deep);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(94,122,92,.22);
}
/* Mouse focus: keep the softer ring without the hard outline. */
.field input:focus:not(:focus-visible), .field textarea:focus:not(:focus-visible), .field select:focus:not(:focus-visible) {
  outline: none; border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(94,122,92,.22);
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }
.form__note { color: var(--muted); font-size: .85rem; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Contact page two-column layout (form + direct contact) */
.contact-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }

/* Contact methods list */
.contact-methods { display: grid; gap: 1rem; }
.contact-method {
  display: flex; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.contact-method:hover { transform: translateY(-2px); box-shadow: var(--shadow-float); }
.contact-method__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(126,154,123,.16); color: var(--sage-deep); flex-shrink: 0; }
.contact-method__label { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-method__value { font-family: 'Marcellus', serif; font-size: 1.15rem; }

/* FAQ / disclosure */
.faq { border-top: 1px solid var(--line-soft); }
.faq__item { border-bottom: 1px solid var(--line-soft); }
.faq__q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: 'Marcellus', serif; font-size: 1.15rem; color: var(--ink);
  padding: 1.3rem 2.5rem 1.3rem 0; position: relative;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq__q::after {
  content: "+"; font-family: 'Poppins'; font-size: 1.5rem; color: var(--accent-ink);
  transition: transform .3s var(--ease); flex-shrink: 0;
}
.faq__q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq__a > div { padding: 0 0 1.4rem; color: var(--muted); max-width: 70ch; }

/* Pill tag */
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--surface-pill);
  border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem;
}

/* Note / disclaimer block */
.note {
  background: rgba(126,154,123,.08); border: 1px solid rgba(126,154,123,.25);
  border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; color: var(--muted); font-size: .95rem;
}
.note strong { color: var(--ink); }

/* Founder credentials — definition-style rows beneath the founder bio */
.founder-creds {
  list-style: none; margin: clamp(2rem, 3vw, 2.75rem) 0 0; padding: 0;
  max-width: 60rem; border-top: 1px solid var(--line-soft);
}
.founder-creds li {
  display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr;
  gap: clamp(.5rem, 2vw, 1.5rem); padding: 1.05rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.founder-creds li strong {
  font-family: 'Marcellus', serif; font-weight: 400; color: var(--ink);
  letter-spacing: .03em; font-size: 1.02rem;
}
.founder-creds li span { color: var(--muted); line-height: 1.7; }
@media (max-width: 640px) {
  .founder-creds li { grid-template-columns: 1fr; gap: .3rem; }
}

/* Result statement — a confident takeaway, lifted off the page in the
   display serif so it breaks from the surrounding sans body copy. */
.result {
  position: relative;
  padding: 1.6rem 1.7rem 1.7rem 2rem;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--sage);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.result__label {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: .55rem;
}
.result__text {
  font-family: 'Marcellus', serif;
  font-size: clamp(1.25rem, 1.05rem + .8vw, 1.55rem);
  line-height: 1.5;
  letter-spacing: .005em;
  color: var(--ink);
  text-wrap: pretty;
}
.result__text em { font-style: italic; color: var(--sage-deep); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--line); margin-top: 0; }
.site-footer__grid {
  display: grid; gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  padding-block: clamp(3rem, 2rem + 4vw, 4.5rem);
}
@media (max-width: 880px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer__mark { width: 48px; margin-bottom: 1rem; }
.site-footer__name { font-family: 'Marcellus', serif; font-size: 1.3rem; line-height: 1.15; }
.site-footer__name span { display: block; font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-top: .35rem; }
.site-footer__tag { color: var(--muted); font-size: .92rem; margin-top: 1rem; max-width: 32ch; }
.site-footer__heading { font-family: 'Marcellus', serif; font-size: 1.35rem; font-weight: 400; letter-spacing: .01em; color: var(--ink); margin-bottom: 1.25rem; }
.site-footer__nav ul, .site-footer__contact ul { list-style: none; padding: 0; display: grid; gap: .65rem; }
.site-footer__nav a, .site-footer__contact a { color: var(--muted); text-decoration: none; transition: color .2s var(--ease); }
.site-footer__nav a:hover, .site-footer__contact a:hover { color: var(--ink); }
/* Contact block — refined icon rows; email breaks only at the @ */
.contact-list { list-style: none; padding: 0; display: grid; gap: 1.05rem; }
.contact-row { display: grid; grid-template-columns: 1.3rem 1fr; gap: .7rem; align-items: start; }
.contact-row__icon { display: flex; color: var(--accent-ink); margin-top: .2rem; }
.contact-row__icon svg { width: 1.05rem; height: 1.05rem; }
.contact-row a { color: var(--muted); text-decoration: none; transition: color .2s var(--ease); }
.contact-row a:hover { color: var(--ink); }
.site-footer__email { font-size: .92rem; overflow-wrap: normal; word-break: normal; }
.site-footer__email span { white-space: nowrap; }
.contact-row--note .site-footer__area { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.site-footer__area { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.site-footer__base {
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  padding-block: 1.6rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem; text-align: center;
}
.site-footer__credit { font-style: italic; color: var(--accent-ink); max-width: none; }
.site-footer__copy { max-width: none; }
.site-footer__dot { margin-inline: .55rem; color: var(--accent-ink); }
.site-footer__base a { color: var(--accent-ink); text-decoration: none; white-space: nowrap; }
.site-footer__base a:hover { color: var(--ink); text-decoration: underline; }

/* ── Legal / long-form content (Privacy, etc.) ──────────── */
.legal { max-width: 50rem; }
.legal__body h2 { margin-top: 2.6rem; margin-bottom: .4rem; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p { max-width: none; }
.legal__list { list-style: none; padding: 0; display: grid; gap: .85rem; margin-block: .4rem; }
.legal__list li { position: relative; padding-left: 1.6rem; color: var(--muted); max-width: 70ch; }
.legal__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .55rem; height: .55rem; border-radius: 2px;
  background: var(--sage); transform: rotate(45deg);
}
.legal__list strong { color: var(--ink); }
.legal__contact { color: var(--muted); line-height: 1.9; }

/* ── Scroll reveal (calm) ───────────────────────────────── */
.rev { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rev.is-in { opacity: 1; transform: none; }
.rev-1 { transition-delay: .06s; }
.rev-2 { transition-delay: .12s; }
.rev-3 { transition-delay: .18s; }
.rev-4 { transition-delay: .24s; }

/* ── Reduced motion: turn it all off ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .rev { opacity: 1 !important; transform: none !important; }
}

/* Utilities */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--muted); }
.maxw-prose { max-width: 65ch; }
.maxw-prose--center { max-width: 65ch; margin-inline: auto; }
.flow > * + * { margin-top: 1.5rem; }
.divider { height: 1px; background: var(--line); border: 0; margin-block: clamp(2rem, 4vw, 3.5rem); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =============================================================
   ACCESSIBILITY SUITE
   Toolbar-driven preferences live as classes/attributes on <html>
   (set before paint by the loader in head.html). Each block below
   reshapes the existing token system so the whole page responds.
   ============================================================= */

/* ── Preference: text size (scales every rem from the root) ─── */
html[data-a11y-text="lg"]  { font-size: 109%; }
html[data-a11y-text="xl"]  { font-size: 118%; }
html[data-a11y-text="xxl"] { font-size: 130%; }

/* ── Preference: high-contrast theme (retokenised, keeps AAA) ─ */
html[data-a11y-contrast="high"] {
  --bg:        #ffffff;
  --bg-deep:   #eef1f6;
  --surface:   #ffffff;
  --surface-2: #ffffff;
  --ink:       #000000;
  --muted:     #1c2129;   /* ~15:1 on white */
  --accent:    #4a3f2f;
  --accent-ink:#33291d;   /* ~10:1 on white */
  --sage:      #234021;
  --sage-deep: #1d3a1b;   /* dark sage for focus + text */
  --line:      rgba(0,0,0,.6);
  --line-soft: rgba(0,0,0,.32);
  --surface-pill:#ffffff; /* pills join the high-contrast white surface */
}
html[data-a11y-contrast="high"] body { background-image: none; background-color: #ffffff; }
html[data-a11y-contrast="high"] .site-header { background: #ffffff; border-bottom-color: rgba(0,0,0,.5); }
html[data-a11y-contrast="high"] .site-header.is-scrolled { background: #ffffff; }
html[data-a11y-contrast="high"] .watermark { display: none; }
html[data-a11y-contrast="high"] .band { background: #000; }
html[data-a11y-contrast="high"] .band__quote .accent { color: #ffd9a8; }
html[data-a11y-contrast="high"] :focus-visible { outline-color: #000; }
html[data-a11y-contrast="high"] .card,
html[data-a11y-contrast="high"] .card--method,
html[data-a11y-contrast="high"] .beck { border-color: rgba(0,0,0,.45); }

/* ── Preference: calm / low-stimulation mode ────────────────── */
html.a11y-calm body { background-image: none; }
html.a11y-calm .watermark,
html.a11y-calm .beck::before,
html.a11y-calm .card--method::after,
html.a11y-calm .card--method::before { display: none; }
html.a11y-calm .hero__crest { animation: none; filter: none; }
html.a11y-calm { scroll-behavior: auto; }
html.a11y-calm *, html.a11y-calm *::before, html.a11y-calm *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
html.a11y-calm .rev { opacity: 1 !important; transform: none !important; }
/* flatten gradient surfaces + heavy shadows into quiet flats */
html.a11y-calm .card--method,
html.a11y-calm .beck,
html.a11y-calm .section--surface,
html.a11y-calm .cta-panel { background: var(--surface); }
html.a11y-calm .card,
html.a11y-calm .card--method,
html.a11y-calm .beck,
html.a11y-calm .audience,
html.a11y-calm .contact-method { box-shadow: 0 1px 2px rgba(40,55,80,.08); }

/* ── Preference: dyslexia-friendly typography ───────────────── */
html.a11y-dyslexia body,
html.a11y-dyslexia .btn,
html.a11y-dyslexia .field input,
html.a11y-dyslexia .field textarea,
html.a11y-dyslexia .field select,
html.a11y-dyslexia h1, html.a11y-dyslexia h2,
html.a11y-dyslexia h3, html.a11y-dyslexia h4,
html.a11y-dyslexia .brand__name,
html.a11y-dyslexia .eyebrow,
html.a11y-dyslexia .display-1,
html.a11y-dyslexia .display-2,
html.a11y-dyslexia .display-3 {
  font-family: 'Atkinson Hyperlegible', 'Poppins', system-ui, sans-serif;
  letter-spacing: 0;
}

/* ── Preference: extra line & letter spacing (WCAG 1.4.12) ──── */
html.a11y-spacing body { line-height: 1.85; }
html.a11y-spacing p,
html.a11y-spacing li,
html.a11y-spacing .lead,
html.a11y-spacing .muted,
html.a11y-spacing .faq__a > div {
  line-height: 1.85;
  letter-spacing: .075em;
  word-spacing: .16em;
}
html.a11y-spacing p { margin-bottom: 1.1rem; }
html.a11y-spacing .stack > * + * { margin-top: 1.6rem; }

/* ── Header: quick-exit + right-cluster layout ──────────────── */
.site-header__inner { justify-content: flex-start; }
.primary-nav { order: 2; margin-left: auto; }
.quick-exit { order: 3; }
.nav-toggle { order: 4; }
.quick-exit {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: 'Poppins', sans-serif; font-size: .85rem; font-weight: 500;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem .9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.quick-exit svg { width: 15px; height: 15px; flex-shrink: 0; }
.quick-exit:hover { background: var(--ink); color: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.quick-exit:active { transform: translateY(0); }
@media (max-width: 940px) {
  .quick-exit { order: 2; margin-left: auto; }
  .nav-toggle { order: 3; }
  .quick-exit span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .quick-exit { padding: .6rem; }
}

/* ── Accessibility toolbar (FAB + panel) ────────────────────── */
.a11y__fab {
  position: fixed; left: 24px; bottom: 24px; z-index: 9991;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1rem .7rem .85rem;
  background: var(--ink); color: var(--surface);
  border: none; border-radius: 999px; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-float);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.a11y__fab:hover { transform: translateY(-2px); }
.a11y__fab:active { transform: translateY(0); }
.a11y__fab:focus-visible { outline: 3px solid var(--sage-deep); outline-offset: 3px; }
.a11y__fab svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }

.a11y__panel {
  position: fixed; left: 24px; bottom: 88px; z-index: 9991;
  width: 344px; max-width: calc(100vw - 32px);
  max-height: min(78vh, 640px); overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  padding: 1.1rem 1.15rem 1.3rem;
  opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.a11y__panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.a11y__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.a11y__title { font-family: 'Marcellus', serif; font-size: 1.2rem; color: var(--ink); }
.a11y__close {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
  border: 1px solid var(--line-soft); background: var(--surface-2); color: var(--ink);
  cursor: pointer; font-size: 1.2rem; line-height: 1; display: grid; place-items: center;
  transition: background-color .2s var(--ease);
}
.a11y__close:hover { background: var(--bg-deep); }
.a11y__intro { color: var(--muted); font-size: .85rem; margin-bottom: .4rem; max-width: none; }

.a11y-group { margin-top: 1rem; }
.a11y-group__title {
  font-family: 'Marcellus', serif; font-size: .7rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: .55rem;
}

/* Segmented text-size control */
.a11y-seg { display: flex; gap: .4rem; }
.a11y-seg button {
  flex: 1; padding: .55rem .3rem; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); border-radius: var(--radius-sm);
  cursor: pointer; font-family: 'Poppins', sans-serif; line-height: 1;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.a11y-seg button:hover { border-color: var(--accent); }
.a11y-seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.a11y-seg button:nth-child(1) { font-size: .8rem; }
.a11y-seg button:nth-child(2) { font-size: .95rem; }
.a11y-seg button:nth-child(3) { font-size: 1.1rem; }
.a11y-seg button:nth-child(4) { font-size: 1.28rem; }

/* Toggle rows (role="switch") */
.a11y-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 0; border-top: 1px solid var(--line-soft);
}
.a11y-row:first-of-type { border-top: 0; }
.a11y-row__text { flex: 1; }
.a11y-row__label { font-size: .94rem; color: var(--ink); display: block; }
.a11y-row__hint { font-size: .78rem; color: var(--muted); margin-top: .1rem; display: block; }
.a11y-switch {
  position: relative; flex-shrink: 0; width: 48px; height: 27px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg-deep);
  cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.a11y-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px;
  border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(40,55,80,.45);
  transition: transform .2s var(--ease);
}
.a11y-switch[aria-checked="true"] { background: var(--sage-deep); border-color: var(--sage-deep); }
.a11y-switch[aria-checked="true"]::after { transform: translateX(21px); }
.a11y-switch:focus-visible { outline: 3px solid var(--sage-deep); outline-offset: 3px; }

/* Read-aloud control buttons */
.a11y-read { display: flex; gap: .5rem; }
.a11y-read button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem .9rem; border-radius: 999px; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: .85rem; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.a11y-read button:hover { transform: translateY(-1px); }
.a11y-read__play { flex: 1; background: var(--ink); color: var(--surface); border-color: var(--ink); }
.a11y-read button[hidden] { display: none; }
.a11y-read svg { width: 16px; height: 16px; fill: currentColor; }

.a11y-reset {
  margin-top: 1.1rem; width: 100%; padding: .7rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: none; color: var(--accent-ink);
  font-family: 'Poppins', sans-serif; font-size: .85rem; font-weight: 500; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.a11y-reset:hover { background: rgba(154,140,122,.12); color: var(--ink); }

/* Press/active feedback (transform/opacity only) so every interactive control
   acknowledges a tap or click-hold, per the anti-generic guardrail. */
.contact-method:active { transform: translateY(0); }
.faq__q:active { transform: translateY(1px); }
.a11y__close:active,
.a11y-seg button:active,
.a11y-read button:active,
.a11y-reset:active { transform: translateY(1px); }
.link-arrow:active { opacity: .72; }

@media (max-width: 560px) {
  .a11y__fab { left: 16px; bottom: 16px; }
  .a11y__fab-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .a11y__fab { padding: .8rem; }
  .a11y__panel { left: 16px; bottom: 80px; }
}

/* Element currently being read aloud */
.a11y-reading {
  background: rgba(126,154,123,.26) !important;
  box-shadow: 0 0 0 4px rgba(126,154,123,.26);
  border-radius: 4px;
}
html[data-a11y-contrast="high"] .a11y-reading {
  background: #fff2c2 !important; box-shadow: 0 0 0 3px #000;
}

/* Select-to-speak chip */
.a11y-speak-chip {
  position: absolute; z-index: 9994;
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--ink); color: var(--surface);
  border: none; border-radius: 999px; padding: .45rem .85rem;
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 500; cursor: pointer;
  box-shadow: var(--shadow-float);
  opacity: 0; transform: translateY(5px); pointer-events: none;
  transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.a11y-speak-chip.is-open { opacity: 1; transform: none; pointer-events: auto; }
.a11y-speak-chip svg { width: 15px; height: 15px; fill: currentColor; }

/* ── Reading ruler / focus line ─────────────────────────────── */
.a11y-ruler-bar {
  position: fixed; left: 0; right: 0; top: 0; height: 2.6rem; z-index: 9985;
  pointer-events: none; display: none;
  background: rgba(126,154,123,.13);
  border-top: 1px solid rgba(94,122,92,.55);
  border-bottom: 1px solid rgba(94,122,92,.55);
}
html.a11y-ruler .a11y-ruler-bar { display: block; }
html[data-a11y-contrast="high"] .a11y-ruler-bar {
  background: rgba(255,221,87,.18); border-color: #000;
}

/* ── Plain-language glossary ────────────────────────────────── */
.gloss {
  font: inherit; color: var(--accent-ink); background: none; border: 0; padding: 0;
  cursor: help; text-decoration: underline; text-decoration-style: dotted;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color .2s var(--ease);
}
.gloss:hover { color: var(--ink); }
.gloss-pop {
  position: absolute; z-index: 9995; max-width: 280px;
  background: var(--ink); color: var(--surface);
  padding: .85rem 1rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-float); font-size: .9rem; line-height: 1.55;
  opacity: 0; transform: translateY(5px); pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.gloss-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.gloss-pop__term {
  font-family: 'Marcellus', serif; font-size: .98rem; letter-spacing: .03em;
  color: #fff; margin-bottom: .25rem;
}
.gloss-pop__def { color: rgba(247,249,252,.9); max-width: none; }
html[data-a11y-contrast="high"] .gloss { color: #00318a; text-decoration-thickness: 2px; }

/* ── Easy-Read mode ─────────────────────────────────────────── */
[data-easyread] { display: none; }
html.a11y-easyread [data-easyread] {
  display: block;
  max-width: min(62rem, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  border-radius: var(--radius-sm);
  padding: 1.6rem 1.7rem;
}
/* Hide-and-replace: in any section that carries an easy-read block, hide the
   original (complex) content and show only the plain-language version. The
   :has() guard means sections WITHOUT a block stay fully visible (graceful).
   [data-easyread-keep] opts an element back in (e.g. the contact form). */
html.a11y-easyread main section:has([data-easyread]) > :not([data-easyread]):not([data-easyread-keep]) { display: none; }
html.a11y-easyread main { font-size: 1.1em; }
html.a11y-easyread main p { max-width: 52ch; line-height: 1.85; }
.easyread__tag {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: 'Poppins', sans-serif; font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep);
  margin-bottom: .6rem;
}
.easyread__title { font-family: 'Marcellus', serif; font-size: 1.25rem; line-height: 1.25; margin: 0 0 .7rem; }
h1.easyread__title { font-size: 1.7rem; }
/* spacing between stacked easy-read cards on the same page */
html.a11y-easyread main section + section [data-easyread] { margin-top: 0; }
.easyread__list { list-style: none; padding: 0; display: grid; gap: .85rem; }
.easyread__list li {
  display: grid; grid-template-columns: 1.7rem 1fr; gap: .7rem; align-items: start;
  font-size: 1.05rem; line-height: 1.6; max-width: 58ch;
}
.easyread__ico { font-size: 1.25rem; line-height: 1.3; }
