/* ==========================================================================
   Hypnotherapy Associates — calm, centred site theme
   Palette: soft mist backgrounds, deep slate text, eucalyptus sage accents.
   ========================================================================== */

:root {
  --mist: #f8f4ee;
  --paper: #fdfbf8;
  --white: #ffffff;
  --ink: #2f3e46;
  --ink-soft: #55656c;
  --sage: #7fa295;
  --sage-deep: #4e7366;
  --sage-tint: #e8efeb;
  --sand: #f1ece4;
  --line: #e6e0d6;

  --font-heading: 'Marcellus', Georgia, serif;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(47, 62, 70, 0.07);
  --nav-height: 64px;

  /* Theme colours (light). Dark values are further down, under "Dark mode". */
  --surface: #ffffff;
  --panel-bg: rgba(250, 247, 242, 0.8);
  --footer-bg: rgba(250, 247, 242, 0.9);
  --nav-bg: rgba(251, 252, 250, 0.9);
  --crisis-bg: rgba(255, 255, 255, 0.75);
  --on-ink: #ffffff;
  --on-accent: #ffffff;
  --error-bg: #f7ebe7;
  --error-fg: #8a4b3c;
  --switch-off: #c9cfcb;
  --photo-filter: none;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--mist);
  text-align: center;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* Peaceful page backgrounds (softened slightly), fixed behind all content.
   Default: zen garden cairn. Pages opt into another scene with a body class. */
body {
  --page-bg: url("../images/watermark-zen.jpg");
  --page-bg-pos: 28% 70%;
}

body.bg-waterfall {
  --page-bg: url("../images/watermark-waterfall.jpg");
  --page-bg-pos: 50% 50%;
}

body.bg-creek {
  --page-bg: url("../images/watermark-creek.jpg");
  --page-bg-pos: 50% 70%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--page-bg) var(--page-bg-pos) / cover no-repeat;
  filter: var(--photo-filter);
  opacity: 0.95;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, #000 35%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, #000 35%);
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sage-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1.1em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--on-ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
}

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

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 20px;
}

.narrow {
  max-width: 720px;
  margin-inline: auto;
}

.section {
  padding-block: clamp(56px, 9vw, 96px);
}

.section + .section {
  padding-top: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 14px;
}

@media (max-width: 420px) {
  .eyebrow {
    letter-spacing: 0.08em;
  }
}

.lead {
  font-size: clamp(1.15rem, 2.2vw, 1.3rem);
  color: var(--ink-soft);
}

.tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  color: var(--sage-deep);
  letter-spacing: 0.02em;
  margin: -0.3em 0 0.9em;
}

.muted {
  color: var(--ink-soft);
}

/* Line breaks for balanced lines on tablet/PC; phones wrap naturally */
@media (max-width: 640px) {
  .wide-break {
    display: none;
  }
}

.divider {
  width: 64px;
  height: 2px;
  background: var(--sage);
  border: 0;
  margin: 28px auto;
  opacity: 0.95;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 12px;
  min-height: var(--nav-height);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px clamp(14px, 4vw, 44px);
}

/* HA monogram in the banner's top left (inner pages): links back to Home */
.site-nav .nav-home {
  position: absolute;
  left: clamp(12px, 3vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  border: 0;
  line-height: 0;
  border-radius: 8px;
  transition: opacity 0.2s ease;
}

.site-nav .nav-home:hover {
  opacity: 0.75;
}

.nav-home img {
  height: 38px;
  width: auto;
}

.site-nav ul a {
  display: inline-block;
  padding: 11px 2px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav ul a:hover {
  color: var(--ink);
}

.site-nav ul a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--sage);
}


/* Menu button: phones only */
.nav-toggle {
  display: none;
}

@media (max-width: 880px) {
  .site-nav {
    min-height: var(--nav-height);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    right: 10px;
    top: calc(var(--nav-height) / 2);
    transform: translateY(-50%);
    min-height: 44px;
    padding: 0 16px;
    font: 700 1rem var(--font-body);
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
  }

  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }

  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle-icon::before { top: -6px; }
  .nav-toggle-icon::after { top: 6px; }

  .site-nav.open .nav-toggle-icon { background: transparent; }
  .site-nav.open .nav-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
  .site-nav.open .nav-toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav .nav-home {
    left: 10px;
    top: calc(var(--nav-height) / 2);
  }

  .nav-home img {
    height: 32px;
  }

  /* Links are hidden until the menu is opened, then shown as a full-width list */
  .site-nav ul,
  .site-nav:has(.nav-home) ul {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding: var(--nav-height) 16px 12px;
  }

  .site-nav.open ul {
    display: flex;
  }

  .site-nav ul li {
    border-top: 1px solid var(--line);
  }

  .site-nav ul a {
    display: block;
    padding: 14px 4px;
    font-size: 1.1rem;
    text-align: center;
    border-bottom: 0;
  }

  .site-nav ul a[aria-current="page"] {
    color: var(--sage-deep);
    background: var(--sage-tint);
    border-radius: var(--radius-sm);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 16px 32px;
  border-radius: 999px;
  border: 2px solid var(--sage-deep);
  background: var(--sage-deep);
  color: var(--on-accent);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.btn-quiet {
  background: transparent;
  color: var(--sage-deep);
}

.btn-quiet:hover {
  background: var(--sage-tint);
  border-color: var(--sage-deep);
  color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

/* ---------- Soft panels: keep text easy to read over the watermark photo ---------- */
.hero .wrap,
.page-head .wrap,
.section > .wrap.narrow:not(:has(.card)),
.section > .wrap:has(.offer-grid) {
  width: calc(100% - 24px);
  max-width: 780px;
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 52px);
}

/* White cards line up with the cream panels: every box is the same width */
.section > .wrap.narrow:has(.card) {
  width: calc(100% - 24px);
  max-width: 780px;
  padding-inline: 0;
}

/* Home service cards sit inside their panel, one under another */
.section > .wrap:has(.offer-grid) .offer-grid {
  grid-template-columns: 1fr;
  margin-top: 28px;
}

.section.band {
  background: transparent;
  border: 0;
}

/* ---------- Home hero ---------- */
.hero {
  padding-block: clamp(48px, 8vw, 88px) clamp(48px, 7vw, 80px);
}

.hero-logo {
  width: min(400px, 78vw);
  margin: 0 auto 36px;
}

.hero h1 {
  max-width: 640px;
  margin-inline: auto;
}

.hero .lead {
  max-width: 600px;
  margin-inline: auto;
}

/* ---------- Page heading (inner pages) ---------- */
.page-head {
  padding-block: clamp(44px, 7vw, 72px) 8px;
}

.page-head-logo {
  width: clamp(170px, 24vw, 200px);
  margin: 0 auto 26px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 48px);
}

.card + .card {
  margin-top: 24px;
}

.offer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 36px;
}

@media (min-width: 760px) {
  .offer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.offer-grid .card {
  padding: 32px 26px;
}

.offer-grid h3 {
  margin-bottom: 10px;
}

.offer-grid p {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Portrait ---------- */
.portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 28px;
  border: 6px solid var(--surface);
  box-shadow: var(--shadow);
}

.portrait-lg {
  width: 260px;
  height: 260px;
}

/* ---------- Credentials ---------- */
.credentials {
  list-style: none;
  margin: 24px auto 0;
  padding: 0;
  max-width: 520px;
}

.credentials li {
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
}

.credentials li:last-child {
  border-bottom: 0;
}

.credentials .cpd-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.credentials .cpd-list li {
  padding: 3px 0;
  border: 0;
}


.badge {
  width: 96px;
  margin: 0 auto 10px;
}

/* ---------- Simple steps ---------- */
.steps {
  list-style: none;
  margin: 28px auto 0;
  padding: 0;
  max-width: 560px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 0;
}

.steps li::before {
  content: counter(step);
  display: block;
  width: 34px;
  height: 34px;
  line-height: 34px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- Forms ---------- */
.form {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 18px;
}

@media (min-width: 560px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.field .optional {
  font-weight: 400;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

/* Drop-down lists: same look as text boxes, with a small arrow */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 4px var(--sage-tint);
}

.form .btn {
  width: 100%;
  margin-top: 6px;
}

/* Choice buttons (radio groups), e.g. on the testimonial form */
.choice-group {
  border: 0;
  margin: 0 0 20px;
  padding: 0;
  min-width: 0;
}

.choice-group legend {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice,
.field .choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  font-size: 1.02rem;
  font-weight: 600;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--sage-deep);
  background: var(--sage-tint);
}

.choice input,
.consent input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--sage-deep);
  flex-shrink: 0;
}

.field[hidden] {
  display: none;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 22px;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.6;
  cursor: pointer;
}

.consent input {
  margin-top: 3px;
}

.page-head .notice {
  display: inline-block;
  margin: 6px 0 0;
  font-weight: 600;
  color: var(--sage-deep);
}

.form-note {
  font-size: 0.98rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 16px;
}

.form-status {
  margin-top: 18px;
  text-align: center;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status.success,
.form-status.error {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
}

.form-status.success {
  background: var(--sage-tint);
  color: var(--sage-deep);
}

.form-status.error {
  background: var(--error-bg);
  color: var(--error-fg);
}

/* ---------- Rachael's Reads (book cards) ---------- */
.book h2 {
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  margin-bottom: 4px;
}

.book-author {
  color: var(--sage-deep);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.book p:last-child {
  margin-bottom: 0;
}

/* Cover beside the title. Phones: small cover next to title and author, description below.
   Wider screens: cover on the left, everything else in one column beside it. */
.book:has(.book-cover) {
  display: grid;
  grid-template-columns: 76px 1fr;
  column-gap: 18px;
  align-items: start;
  text-align: left;
}

.book .book-cover {
  grid-row: 1 / span 2;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(47, 62, 70, 0.18), 0 1px 3px rgba(47, 62, 70, 0.12);
}

.book:has(.book-cover) h2 { align-self: end; }
.book:has(.book-cover) .book-author { margin-bottom: 0; }
.book:has(.book-cover) > p:not(.book-author) { grid-column: 1 / -1; margin-top: 18px; }

/* Text cover for books without a published cover image */
.book-cover-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: linear-gradient(160deg, #24384f, #1c2e45);
  border-left: 5px solid var(--sage);
  color: #f6f2ea;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: center;
}

@media (min-width: 600px) {
  .book:has(.book-cover) {
    grid-template-columns: 112px 1fr;
    column-gap: 28px;
  }
  .book .book-cover { grid-row: 1 / span 3; }
  .book:has(.book-cover) h2 { align-self: start; }
  .book:has(.book-cover) .book-author { margin-bottom: 16px; }
  .book:has(.book-cover) > p:not(.book-author) { grid-column: 2; margin-top: 0; }
  .book-cover-text { font-size: 0.95rem; padding: 14px 10px; }
}

/* ---------- Testimonials (home page) ----------
   Phones: cards stack. Wider screens with JavaScript: one card at a time,
   fading slowly between them, with arrows, dots and a pause button. */
.section > .wrap.narrow.ts-wrap {
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 48px) clamp(16px, 4vw, 40px);
}

.ts-track {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.ts-card {
  margin: 0;
  text-align: left;
  padding: clamp(24px, 4vw, 36px);
}

.ts-card + .ts-card { margin-top: 0; }

.ts-card blockquote {
  margin: 0;
  position: relative;
  padding-top: 34px;
}

.ts-card blockquote::before {
  content: "\201C";
  position: absolute;
  top: -14px;
  left: -4px;
  font-family: var(--font-heading);
  font-size: 4.2rem;
  line-height: 1;
  color: var(--sage);
  opacity: 0.55;
}

.ts-card blockquote p {
  font-size: clamp(1.02rem, 2vw, 1.12rem);
  line-height: 1.7;
  margin: 0;
}

.ts-card figcaption {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.ts-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--ink);
}

.ts-place {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.ts-format {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.ts-place + .ts-format::before,
.ts-format + .ts-format::before {
  content: "\00B7";
  margin-right: 10px;
  color: var(--sage);
  font-weight: 700;
}

/* Carousel mode (added by site.js on wider screens): one card at a time,
   sliding in from the right. A copy of the first card sits at the end so the
   last card slides on to the first in the same direction. */
.testimonials.is-carousel {
  overflow: hidden;
  /* room for the card shadow inside the clipped area */
  padding: 8px 14px 4px;
  margin-inline: -14px;
}

.testimonials.is-carousel .ts-track {
  display: flex;
  gap: 28px;
  transition: transform 1.4s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.testimonials.is-carousel .ts-track.no-anim { transition: none; }

.testimonials.is-carousel .ts-card {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ts-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.ts-controls[hidden] { display: none; }

.ts-arrow,
.ts-pause {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

.ts-arrow {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.ts-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ts-pause {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
}

.ts-arrow:hover,
.ts-pause:hover { border-color: var(--sage); color: var(--sage-deep); }

.ts-dots { display: flex; gap: 10px; }

.ts-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--sage);
  background: transparent;
  cursor: pointer;
}

.ts-dot[aria-current="true"] { background: var(--sage); }

@media (prefers-reduced-motion: reduce) {
  .testimonials.is-carousel .ts-track { transition: none; }
}

/* ---------- FAQ (expandable questions) ---------- */
.faq {
  text-align: left;
  padding-block: clamp(12px, 3vw, 24px);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:last-of-type {
  border-bottom: 0;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq summary:hover {
  color: var(--sage-deep);
}

.faq details p {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

/* ---------- Legal pages ---------- */
.legal {
  text-align: left;
}

.legal h2 {
  font-size: 1.45rem;
  margin-top: 1.8em;
}

.legal h2:first-of-type {
  margin-top: 0.6em;
}

.legal h3 {
  font-size: 1.2rem;
  margin-top: 1.5em;
}

.legal h4 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  margin: 1.3em 0 0.4em;
}

.legal ul {
  padding-left: 1.3em;
  margin: 0 0 1.1em;
}

.legal li {
  margin-bottom: 0.3em;
}

.notice {
  background: var(--sage-tint);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 1rem;
}

/* ---------- Closing band ---------- */
.band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 8px 40px;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* Footer sits on the same cream panel as the page content so it stands out from the photo */
.site-footer .wrap {
  width: calc(100% - 24px);
  max-width: 780px;
  background: var(--footer-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 44px) clamp(20px, 5vw, 52px);
}

.footer-logo {
  width: 150px;
  margin: 0 auto 22px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 20px;
}

/* First row: main pages. Second row: testimonial and legal links, a little smaller */
.footer-links:has(+ .footer-links-minor) {
  margin-bottom: 0;
}

.footer-links-minor {
  font-size: 0.92rem;
  padding-top: 2px;
  border-top: 1px solid var(--line);
  max-width: 460px;
  margin-inline: auto;
}

.footer-break {
  display: none;
}

/* Phones: main links split evenly as 3 + 2 rather than leaving one on its own */
@media (max-width: 480px) {
  .footer-links {
    gap: 0 14px;
  }

  .footer-break {
    display: block;
    flex-basis: 100%;
    height: 0;
  }
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  padding: 10px 4px;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Women's Refuge Shielded Site button */
.shielded {
  margin: 0 auto 18px;
}

.shielded a {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
}

.shielded img {
  width: 60px;
  height: 60px;
}

.crisis {
  max-width: 640px;
  margin: 0 auto 22px;
  font-size: 0.98rem;
  background: var(--crisis-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.copyright {
  font-size: 0.95rem;
  margin: 0;
}

/* Keep the email address in one piece */
.copyright a {
  white-space: nowrap;
}

/* Social buttons: small round icons beside the footer email */
.footer-social {
  display: inline-flex;
  gap: 8px;
  margin-left: 10px;
  vertical-align: middle;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--surface);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-icon:hover,
.social-icon:focus-visible {
  color: var(--on-accent);
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.social-icon svg,
.social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* Social buttons on the Contact page: labelled pills, as on the holding page */
.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 700;
  color: var(--sage-deep);
  text-decoration: none;
  border: 1.5px solid var(--sage-deep);
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.social a:hover,
.social a:focus-visible {
  color: var(--on-accent);
  background: var(--sage-deep);
}

/* ==========================================================================
   Dark mode
   Used when the visitor's device is set to dark (unless they chose Light in
   the Accessibility panel), or when they choose Dark there. The two blocks
   below hold the same values.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mist: #141b1f;
    --paper: #1b2429;
    --ink: #ece6dc;
    --ink-soft: #c4bdb2;
    --sage: #9cc0b2;
    --sage-deep: #a9cbbd;
    --sage-tint: #26352f;
    --line: #36434a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --surface: #1d272c;
    --panel-bg: rgba(22, 30, 35, 0.86);
    --footer-bg: rgba(22, 30, 35, 0.92);
    --nav-bg: rgba(18, 25, 29, 0.92);
    --crisis-bg: rgba(255, 255, 255, 0.05);
    --on-ink: #141b1f;
    --on-accent: #0f1c17;
    --error-bg: #3a2420;
    --error-fg: #f0bfb2;
    --switch-off: #4a575d;
    --photo-filter: brightness(0.5) saturate(0.85);
    color-scheme: dark;
  }

  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}

:root[data-theme="dark"] {
  --mist: #141b1f;
  --paper: #1b2429;
  --ink: #ece6dc;
  --ink-soft: #c4bdb2;
  --sage: #9cc0b2;
  --sage-deep: #a9cbbd;
  --sage-tint: #26352f;
  --line: #36434a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --surface: #1d272c;
  --panel-bg: rgba(22, 30, 35, 0.86);
  --footer-bg: rgba(22, 30, 35, 0.92);
  --nav-bg: rgba(18, 25, 29, 0.92);
  --crisis-bg: rgba(255, 255, 255, 0.05);
  --on-ink: #141b1f;
  --on-accent: #0f1c17;
  --error-bg: #3a2420;
  --error-fg: #f0bfb2;
  --switch-off: #4a575d;
  --photo-filter: brightness(0.5) saturate(0.85);
  color-scheme: dark;
}

:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* Light logos show by default; their cream versions only in dark mode */
.logo-dark { display: none; }

/* ==========================================================================
   Accessibility options (button + panel added by site.js)
   ========================================================================== */

/* Text size */
html[data-text-size="large"] { font-size: 112.5%; }
html[data-text-size="larger"] { font-size: 125%; }

/* High contrast: plain background, darker text and borders, solid panels */
html.a11y-contrast {
  --ink: #111;
  --ink-soft: #2a2a2a;
  --line: #5a5a5a;
  --sage: #2c4a40;
  --sage-deep: #2c4a40;
  --sage-tint: #e3ece7;
  --mist: #fff;
  --paper: #fff;
  --surface: #fff;
}

/* High contrast in dark mode: white text on black */
@media (prefers-color-scheme: dark) {
  :root.a11y-contrast:not([data-theme="light"]) {
    --ink: #fff;
    --ink-soft: #f0f0f0;
    --line: #b5b5b5;
    --sage: #bfe3d3;
    --sage-deep: #bfe3d3;
    --sage-tint: #1f3029;
    --mist: #000;
    --paper: #000;
    --surface: #000;
  }
}

:root.a11y-contrast[data-theme="dark"] {
  --ink: #fff;
  --ink-soft: #f0f0f0;
  --line: #b5b5b5;
  --sage: #bfe3d3;
  --sage-deep: #bfe3d3;
  --sage-tint: #1f3029;
  --mist: #000;
  --paper: #000;
  --surface: #000;
}

html.a11y-contrast body::before { display: none; }
html.a11y-contrast body { background: var(--mist); }

html.a11y-contrast .hero .wrap,
html.a11y-contrast .page-head .wrap,
html.a11y-contrast .section > .wrap.narrow:not(:has(.card)),
html.a11y-contrast .section > .wrap:has(.offer-grid),
html.a11y-contrast .site-footer .wrap,
html.a11y-contrast .card,
html.a11y-contrast .site-nav {
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 2px solid var(--line);
  box-shadow: none;
}

html.a11y-contrast .site-nav { border-width: 0 0 2px; }
html.a11y-contrast .field input,
html.a11y-contrast .field textarea { border: 2px solid var(--line); background: var(--surface); }

/* Easy-read font */
html.a11y-readable {
  --font-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
}

html.a11y-readable body {
  letter-spacing: 0.01em;
  line-height: 1.85;
}

/* Underline links (buttons keep their look) */
html.a11y-links a:not(.btn):not(.nav-home) {
  text-decoration: underline !important;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* Reduce motion: on request, or when the device asks for it */
html.a11y-motion { scroll-behavior: auto; }

html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Corner toolbar: Search and Accessibility buttons, top-right of the banner */
.top-tools {
  position: fixed;
  right: 16px;
  top: calc(var(--nav-height) / 2 - 22px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Phones: sits just left of the Menu button */
@media (max-width: 880px) {
  .top-tools { right: 128px; }
}

/* The Accessibility button */
.a11y-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-width: 44px;
  padding: 0 16px 0 12px;
  font: 700 0.95rem/1 var(--font-body);
  color: var(--on-ink);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.a11y-button:hover,
.a11y-button[aria-expanded="true"] { background: var(--sage-deep); }

/* Below wide-PC sizes: icon only, and the menu keeps clear of it */
@media (max-width: 1240px) {
  .a11y-button {
    width: 44px;
    padding: 0;
  }

  .a11y-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .site-nav ul {
    padding-right: 72px;
  }
}

@media (max-width: 1000px) {
  .site-nav ul {
    padding-left: 104px;
    gap: 4px 26px;
  }
}


/* The options panel: drops down from the button */
.a11y-panel {
  position: fixed;
  right: 16px;
  top: calc(var(--nav-height) + 8px);
  z-index: 60;
  width: min(340px, calc(100% - 24px));
  max-height: calc(100vh - var(--nav-height) - 24px);
  overflow-y: auto;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  text-align: left;
  font-size: 1rem;
  line-height: 1.4;
}

.a11y-panel[hidden] { display: none; }

@media (max-width: 880px) {
  .a11y-panel {
    right: 12px;
  }
}

.a11y-row {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.a11y-row + .a11y-row {
  padding-top: 14px;
}

.a11y-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.a11y-sizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.a11y-sizes button {
  min-height: 44px;
  font: 700 1rem var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.a11y-sizes button[data-size="large"] { font-size: 1.15rem; }
.a11y-sizes button[data-size="larger"] { font-size: 1.3rem; }

.a11y-sizes button[aria-pressed="true"] {
  color: var(--on-accent);
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.a11y-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 2px;
  font: inherit;
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.a11y-toggle strong { display: block; }

.a11y-toggle small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.a11y-switch {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--switch-off);
  transition: background-color 0.2s ease;
}

.a11y-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.a11y-toggle[aria-pressed="true"] .a11y-switch { background: var(--sage-deep); }
.a11y-toggle[aria-pressed="true"] .a11y-switch::after { transform: translateX(20px); }

.a11y-reset {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  font: 700 0.95rem var(--font-body);
  color: var(--sage-deep);
  background: none;
  border: 2px solid var(--sage-deep);
  border-radius: 999px;
  cursor: pointer;
}

.a11y-reset:hover { background: var(--sage-tint); }

/* ==========================================================================
   Site search (button + panel added by site.js)
   ========================================================================== */
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.search-button:hover,
.search-button[aria-expanded="true"] {
  color: var(--on-accent);
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

@media (max-width: 1240px) {
  .site-nav ul { padding-right: 128px; }
}

.search-panel {
  position: fixed;
  top: calc(var(--nav-height) + 8px);
  right: 16px;
  z-index: 61;
  width: min(560px, calc(100% - 24px));
  max-height: calc(100vh - var(--nav-height) - 24px);
  overflow-y: auto;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.search-panel[hidden] { display: none; }

@media (max-width: 880px) {
  .search-panel {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

.search-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.search-form input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.search-form input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 4px var(--sage-tint);
}

.search-status {
  margin: 10px 2px 4px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.search-status:empty { display: none; }

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-results li + li {
  border-top: 1px solid var(--line);
}

.search-results a {
  display: block;
  padding: 12px 8px;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.search-results a:hover,
.search-results a:focus-visible {
  background: var(--sage-tint);
}

.search-page {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.search-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.12rem;
  line-height: 1.3;
  margin: 2px 0 4px;
}

.search-snippet {
  display: block;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.search-results mark,
.search-title mark {
  color: inherit;
  background: var(--sage-tint);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
}

/* The FAQ answer or book a search result led to: a brief soft highlight */
.search-target {
  box-shadow: 0 0 0 3px var(--sage);
  border-radius: var(--radius-sm);
  transition: box-shadow 0.4s ease;
}

/* Spam trap in the forms: hidden from people, filled in only by bots */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Discovery Call: date-and-time picker (filled in by site.js initBooker)
   ========================================================================== */
.booker {
  text-align: center;
}

.booker-tz {
  margin: 4px auto 20px;
  max-width: 34em;
  font-size: 0.95rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

.booker-loading {
  padding: 28px 0;
}

.booker-week {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.booker-month {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.booker-nav {
  width: 44px;
  height: 44px;
  flex: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.booker-nav:hover:not(:disabled) { border-color: var(--sage-deep); }
.booker-nav:disabled { opacity: 0.35; cursor: default; }

.booker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.booker-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 2px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.booker-dow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.booker-num {
  font-size: 1.25rem;
  font-weight: 700;
}

.booker-day:hover:not(:disabled) { border-color: var(--sage-deep); }

.booker-day[aria-pressed="true"] {
  color: var(--on-accent);
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.booker-day:disabled {
  opacity: 0.35;
  cursor: default;
}

.booker-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.booker-times-label {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  font-weight: 700;
}

.booker-time {
  min-height: 46px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--sage);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.booker-time:hover,
.booker-time:focus-visible {
  color: var(--on-accent);
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.booker-form {
  text-align: left;
}

.booker-chosen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 16px;
  margin: 0 0 20px;
  font-weight: 600;
  background: var(--sage-tint);
  border-radius: var(--radius-sm);
}

.booker-change,
.booker-change-inline {
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.booker-done {
  padding: 8px 0 4px;
}

.booker-done:focus { outline: none; }

.booker-done-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 0 8px;
  font-size: 1.7rem;
  color: var(--on-accent);
  background: var(--sage-deep);
  border-radius: 50%;
}

.booker-cal {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.booker-cal-label {
  margin: 0 0 12px;
  font-weight: 700;
}

.booker-cal-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.booker-cal-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1.5px solid var(--sage);
  border-radius: 999px;
  transition: background-color 0.15s, color 0.15s;
}

.booker-cal-btn:hover,
.booker-cal-btn:focus-visible {
  color: var(--on-accent);
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.booker-fallback {
  margin-top: 24px;
}

@media (max-width: 520px) {
  .booker-days { gap: 4px; }
  .booker-day { padding: 8px 0; }
  .booker-dow { font-size: 0.68rem; letter-spacing: 0.02em; }
  .booker-num { font-size: 1.05rem; }
  .booker-times { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* ==========================================================================
   "What I Can Help With" mind map (help.html)
   A central hub with eleven branches around it. Each branch has its own
   colour (--c); words use a deeper or lighter mix of it so they stay
   readable in light and dark mode. Lines are drawn by site.js on wide screens.
   ========================================================================== */
.mm-section { padding-top: clamp(28px, 4vw, 44px); }

.section > .wrap.mm-wide {
  width: calc(100% - 24px);
  max-width: 1280px;
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 48px) clamp(14px, 3vw, 44px);
}

.mindmap [data-branch="personal"]      { --c: #7a9450; }
.mindmap [data-branch="emotional"]     { --c: #5f8bab; }
.mindmap [data-branch="behaviour"]     { --c: #c47a4f; }
.mindmap [data-branch="health"]        { --c: #4f9478; }
.mindmap [data-branch="fears"]         { --c: #b8615c; }
.mindmap [data-branch="habits"]        { --c: #b98b2e; }
.mindmap [data-branch="relationships"] { --c: #c27a92; }
.mindmap [data-branch="performance"]   { --c: #4f6f9a; }
.mindmap [data-branch="career"]        { --c: #977656; }
.mindmap [data-branch="healing"]       { --c: #8a72a6; }
.mindmap [data-branch="nlp"]           { --c: #3b8a8c; }
.mindmap [data-branch="cta"]           { --c: var(--sage-deep); }

.mindmap {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

/* Find a topic */
.mm-find {
  max-width: 460px;
  margin: 0 auto clamp(28px, 4vw, 44px);
}

.mm-find label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.mm-find input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  box-shadow: var(--shadow);
}

.mm-find input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 4px var(--sage-tint);
}

.mm-find-status {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  min-height: 1.6em;
}

/* Central hub */
.mm-hub {
  position: relative;
  display: grid;
  place-items: center;
  padding: 26px 0;
}

.mm-hub::before {
  content: "";
  position: absolute;
  width: min(100%, 460px);
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 4deg, color-mix(in srgb, var(--sage) 26%, transparent) 0deg 1.5deg, transparent 1.5deg 12deg);
  -webkit-mask-image: radial-gradient(circle, transparent 38%, #000 46%, transparent 70%);
  mask-image: radial-gradient(circle, transparent 38%, #000 46%, transparent 70%);
  pointer-events: none;
}

.mm-hub-circle {
  position: relative;
  z-index: 1;
  width: clamp(210px, 21vw, 270px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(140deg, #4e7366 0%, #3c6f78 50%, #5b5c88 100%);
  box-shadow:
    0 0 0 10px color-mix(in srgb, var(--sage) 16%, transparent),
    0 0 0 22px color-mix(in srgb, var(--sage) 8%, transparent),
    0 18px 40px rgba(47, 62, 70, 0.22);
  animation: mm-breathe 7s ease-in-out infinite;
}

@keyframes mm-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

.mm-hub-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.3vw, 1.95rem);
  line-height: 1.15;
}

.mm-hub-amp {
  font-size: 0.85em;
  opacity: 0.85;
}

.mm-hub-small {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Branches */
.mm-branch {
  position: relative;
  z-index: 1;
  background: color-mix(in srgb, var(--c) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 20px 24px;
  overflow: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

.mm-branch::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 45%, transparent));
}

.mm-branch:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(47, 62, 70, 0.12);
}

.mm-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c) 70%, var(--ink));
  margin-bottom: 4px;
}

.mm-branch h2,
.mm-branch h3 {
  font-size: 1.32rem;
  margin: 0 0 14px;
}

/* A tidy list: every item the same size and style, one per line,
   with a small dot in the branch colour */
.mm-words {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: fit-content;
  max-width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mm-words li {
  position: relative;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ink);
  padding: 1px 6px 1px 20px;
  border-radius: 6px;
  transition: background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.mm-words li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(0.725em - 2px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
}

/* Words with their own page: underlined in the branch colour */
.mm-words li a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--c);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.mm-words li a:hover,
.mm-words li a:focus-visible {
  color: var(--sage-deep);
}

/* "Don't see it?" card */
.mm-cta {
  background: var(--surface);
  border-style: dashed;
  border-width: 1.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mm-cta p {
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.mm-cta .btn {
  font-size: 0.98rem;
  padding: 12px 22px;
}

.mm-note {
  max-width: 720px;
  margin: clamp(32px, 5vw, 48px) auto 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* Finding a topic: matches light up, the rest step back */
.mindmap.is-filtering .mm-branch:not(.has-match) { opacity: 0.32; }
.mindmap.is-filtering .mm-branch.has-match li:not(.is-match) { opacity: 0.55; }

.mm-words li.is-match,
.mm-words li.search-target {
  opacity: 1;
  color: var(--ink);
  background: color-mix(in srgb, var(--c) 20%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 60%, transparent);
}

/* Connecting lines (drawn by site.js on wide screens) */
.mm-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
  display: none;
}

.mm-lines path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.5;
  transition: opacity 0.25s ease, stroke-width 0.25s ease;
}

.mm-lines path.is-dashed { stroke-dasharray: 5 7; }
.mm-lines path.is-active { opacity: 1; stroke-width: 3; }
.mindmap.is-filtering .mm-lines path:not(.is-active) { opacity: 0.12; }

/* Tablets: two columns, hub across the top */
@media (min-width: 700px) {
  .mindmap { grid-template-columns: 1fr 1fr; }
  .mm-hub { grid-column: 1 / -1; }
}

/* Wide screens: the full map, hub in the middle with branches around it */
@media (min-width: 1100px) {
  .mindmap {
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "personal  emotional behaviour     health"
      "nlp       hub       hub           fears"
      "healing   hub       hub           habits"
      "cta       career    performance   relationships";
    gap: 26px;
  }
  .mm-hub { grid-area: hub; padding: 0; }
  .mm-hub::before { width: 520px; }
  .mindmap > [data-branch="personal"]      { grid-area: personal; }
  .mindmap > [data-branch="emotional"]     { grid-area: emotional; }
  .mindmap > [data-branch="behaviour"]     { grid-area: behaviour; }
  .mindmap > [data-branch="health"]        { grid-area: health; }
  .mindmap > [data-branch="fears"]         { grid-area: fears; }
  .mindmap > [data-branch="habits"]        { grid-area: habits; }
  .mindmap > [data-branch="relationships"] { grid-area: relationships; }
  .mindmap > [data-branch="performance"]   { grid-area: performance; }
  .mindmap > [data-branch="career"]        { grid-area: career; }
  .mindmap > [data-branch="healing"]       { grid-area: healing; }
  .mindmap > [data-branch="nlp"]           { grid-area: nlp; }
  .mindmap > [data-branch="cta"]           { grid-area: cta; }
  .mm-lines { display: block; }
}

/* Dark mode: a slightly stronger card tint */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mm-branch { background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
}
:root[data-theme="dark"] .mm-branch { background: color-mix(in srgb, var(--c) 10%, var(--surface)); }

html.a11y-contrast .mm-branch { background: var(--surface); }
html.a11y-contrast .mm-words li { color: var(--ink); }
