/* ==========================================================================
   MoodCenter — Gianni L. Faedda, M.D.
   Design system. Single stylesheet for every page.
   Sections: tokens · reset · typography · header · footer · buttons ·
             heroes · layout · components · pages · motion · responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Palette */
  --paper: #f7f5f0;
  --paper-deep: #efece4;
  --white: #ffffff;
  --ink: #1f3038;
  --ink-soft: #3a4d55;
  --muted: #55666e;
  --sage: #78958a;
  --sage-dark: #46685f;
  --sage-deeper: #33504a;
  --sage-pale: #e6eeea;
  --sand: #f3ece0;

  /* Lines & shadows */
  --line: rgba(31, 48, 56, 0.13);
  --line-strong: rgba(31, 48, 56, 0.26);
  --shadow-sm: 0 2px 8px rgba(28, 45, 52, 0.05);
  --shadow: 0 14px 38px rgba(28, 45, 52, 0.09);
  --shadow-lg: 0 26px 64px rgba(28, 45, 52, 0.14);

  /* Type */
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  /* Fluid type scale */
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --fs-lede: clamp(1.08rem, 1rem + 0.4vw, 1.28rem);
  --fs-h3: clamp(1.25rem, 1.14rem + 0.5vw, 1.55rem);
  --fs-h2: clamp(1.7rem, 1.35rem + 1.6vw, 2.9rem);
  --fs-h1: clamp(2.1rem, 1.5rem + 2.9vw, 4rem);
  --fs-display: clamp(2.6rem, 1.6rem + 4.6vw, 5.4rem);

  /* Spacing */
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(56px, 8vw, 104px);
  --max: 1180px;
  --measure: 68ch;

  /* Shape */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  /* Chrome */
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
}

@media (min-width: 900px) {
  :root {
    --header-h: 84px;
  }
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* Keep anchored headings clear of the sticky header. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.68;
  /* Photos and wide grids must never make the page scroll sideways. */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Suppress the grey flash iOS paints over tapped links and buttons. */
  -webkit-tap-highlight-color: transparent;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--sage-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--sage-pale);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  background: var(--white);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 700;
}

.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;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  text-wrap: pretty;
}

/* Balancing helps short headings, but on narrow screens a heading runs to
   four or five lines and balancing makes the rag worse, not better. */
@media (min-width: 640px) {
  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }
}

p {
  text-wrap: pretty;
}

.eyebrow {
  display: block;
  margin: 0 0 0.7rem;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--sage-dark);
}

.section-title {
  margin: 0 0 1rem;
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.section-subtitle {
  margin-top: 2.6rem;
  font-size: var(--fs-h2);
  line-height: 1.15;
}

.lede {
  max-width: var(--measure);
  font-family: var(--serif);
  font-size: var(--fs-lede);
  line-height: 1.7;
  color: var(--ink-soft);
}

.section > .container > p,
.text-column p {
  max-width: var(--measure);
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section-tight {
  padding-block: clamp(36px, 5vw, 64px);
}

.section-paper {
  background: var(--paper-deep);
}

.section-sage {
  background: var(--sage-pale);
}

/* Image beside text. Collapses to a single column on narrow screens. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}

.split-reverse .split-media {
  order: 2;
}

/* --------------------------------------------------------------------------
   5. Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.88);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: rgba(247, 245, 240, 0.72);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
  }
}

/* site.js adds .is-stuck once the page scrolls away from the top. */
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  text-decoration: none;
  line-height: 1.1;
  flex-shrink: 0;
}

.wordmark strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing: 0.005em;
}

.wordmark span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 22px);
}

.nav a {
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}

/* Underline that grows in on hover, without shifting layout. */
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: var(--sage-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--sage-deeper);
}

.nav a:not(.nav-cta):hover::after,
.nav a:not(.nav-cta)[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav .nav-cta {
  padding: 11px 18px;
  border: 1px solid var(--sage-dark);
  border-radius: 999px;
  color: var(--sage-dark);
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}

.nav .nav-cta:hover,
.nav .nav-cta[aria-current="page"] {
  background: var(--sage-dark);
  color: var(--white);
}

/* Hamburger — three bars that morph into an X when the drawer is open. */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.menu-toggle span {
  top: 50%;
  margin-top: -0.9px;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  left: 0;
}

.menu-toggle span::before {
  transform: translateY(-7px);
}

.menu-toggle span::after {
  transform: translateY(7px);
}

.menu-toggle[aria-expanded="true"] span {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span::before {
  opacity: 0;
  transform: translateY(0);
}

.menu-toggle[aria-expanded="true"] span::after {
  transform: translateY(0) rotate(-90deg);
}

/* Locks background scrolling while the mobile drawer is open. */
body.nav-open {
  overflow: hidden;
}

/* Dims the page behind the open drawer so the menu reads as a layer. */
body.nav-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 32, 38, 0.45);
  animation: nav-scrim 0.3s var(--ease);
}

@keyframes nav-scrim {
  from {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  /* 48px keeps every button a comfortable touch target. */
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--sage-dark);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease), transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--sage-dark);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--sage-deeper);
  border-color: var(--sage-deeper);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.75);
  color: var(--sage-deeper);
}

.btn-secondary:hover {
  background: var(--white);
}

/* Button pair that stacks full-width on phones. */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2rem;
}

/* Inline text link with an arrow that nudges on hover. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--sage-dark);
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.24s var(--ease);
}

.link-arrow:hover {
  color: var(--sage-deeper);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   7. Heroes
   -------------------------------------------------------------------------- */

/* 7a. Flat hero used by text-first pages (FAQ, privacy, resources…). */
.page-hero {
  padding-block: clamp(48px, 7vw, 92px) clamp(40px, 6vw, 76px);
  background: linear-gradient(150deg, var(--sage-pale) 0%, var(--paper) 62%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 0.85rem;
  font-size: var(--fs-h1);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.page-hero p {
  max-width: var(--measure);
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-size: var(--fs-lede);
  line-height: 1.68;
  color: var(--ink-soft);
}

/* 7b. Photo hero. A scrim keeps white text legible over any photograph. */
.photo-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(760px, calc(100svh - var(--header-h)));
  padding-block: clamp(80px, 12vw, 140px) clamp(48px, 7vw, 80px);
  background-color: var(--ink);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  isolation: isolate;
}

.photo-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(12, 22, 26, 0.5) 0%,
    rgba(12, 22, 26, 0.28) 32%,
    rgba(12, 22, 26, 0.62) 78%,
    rgba(12, 22, 26, 0.78) 100%
  );
}

.photo-hero .container {
  position: relative;
  z-index: 1;
}

.photo-hero,
.photo-hero h1,
.photo-hero h2,
.photo-hero p,
.photo-hero .eyebrow {
  color: var(--white);
}

.photo-hero h1 {
  margin: 0 0 1rem;
  font-size: var(--fs-h1);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 18px rgba(8, 16, 20, 0.4);
}

.photo-hero p {
  max-width: 62ch;
  margin: 0 0 0.9rem;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.12rem);
  line-height: 1.66;
  color: rgba(255, 255, 255, 0.93);
  text-shadow: 0 1px 12px rgba(8, 16, 20, 0.45);
}

.photo-hero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.photo-hero .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.photo-hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--white);
}

.photo-hero a:not(.btn) {
  color: var(--white);
  text-underline-offset: 3px;
}

/* 7c. Home hero. Taller, with the brand block pinned above the quote. */
.home-hero {
  min-height: min(880px, calc(100svh - var(--header-h)));
  padding-block: clamp(56px, 10vw, 120px) clamp(44px, 6vw, 76px);
}

.home-hero .container {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 8vw, 96px);
}

.home-hero h1 {
  margin: 0 0 0.3rem;
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.home-hero .hero-name {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1rem + 1.5vw, 2.15rem);
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 12px rgba(8, 16, 20, 0.45);
}

.home-hero .hero-tagline {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 0.9rem + 0.9vw, 1.6rem);
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 12px rgba(8, 16, 20, 0.45);
}

.home-hero .hero-founded {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.hero-quote {
  margin: 0;
  padding: 0;
  border: 0;
  max-width: 62ch;
}

.hero-quote p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 0.92rem + 0.85vw, 1.65rem);
  line-height: 1.45;
  color: var(--white);
}

.hero-quote cite {
  display: block;
  margin-top: 0.9rem;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

/* --------------------------------------------------------------------------
   8. Components
   -------------------------------------------------------------------------- */

/* Framed portrait / landscape image. */
.portrait-frame {
  width: 100%;
  aspect-ratio: 43 / 52;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-deep);
  box-shadow: var(--shadow);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Card grid, auto-fitting so it never needs its own breakpoints. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.card-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.card,
.resource-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.card:hover,
.resource-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.card h2,
.card h3,
.resource-card h2,
.resource-card h3 {
  margin: 0 0 0.6rem;
  font-size: var(--fs-h3);
  line-height: 1.25;
}

.card p,
.resource-card p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.card > :last-child,
.resource-card > :last-child {
  margin-bottom: 0;
}

.card ul,
.resource-card ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--muted);
}

.card li,
.resource-card li {
  margin-block: 0.35rem;
}

.card .btn,
.resource-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Small numbered/iconed feature card used on the homepage. */
.card-index {
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--sage);
}

/* Prose block with a heading and paragraph, used in stacked lists. */
.text-block {
  margin: 0 0 1.9rem;
}

.text-block h3 {
  margin: 0 0 0.4rem;
  font-size: var(--fs-h3);
}

.text-block p {
  margin: 0;
  max-width: var(--measure);
  color: var(--muted);
}

/* Pill tags. */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tag {
  padding: 0.5rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.institution-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.institution-list li {
  margin-block: 0.5rem;
}

/* Full-width call-to-action band. */
.cta-band {
  padding-block: clamp(52px, 7vw, 88px);
  background: var(--sage-deeper);
  color: var(--white);
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 0.8rem;
  font-size: var(--fs-h2);
  line-height: 1.14;
  color: var(--white);
}

.cta-band p {
  max-width: 56ch;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
}

.cta-band .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.cta-band .btn-row {
  justify-content: center;
}

.cta-band .btn-primary {
  background: var(--white);
  border-color: var(--white);
  color: var(--sage-deeper);
}

.cta-band .btn-primary:hover {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--sage-deeper);
}

.cta-band .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.cta-band .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--white);
}

/* Contact detail rows (phone, email, location). */
.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list a {
  text-decoration: none;
  font-weight: 700;
  color: var(--sage-deeper);
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-list dt,
.contact-list .contact-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-dark);
}

/* Safety notice — deliberately high contrast, never decorative. */
.notice {
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--sand);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage-dark);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
}

.notice strong {
  color: var(--ink);
}

.notice :last-child {
  margin-bottom: 0;
}

/* Featured book. */
.book {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 46px);
  align-items: center;
}

.book img {
  border-radius: 6px;
  box-shadow: var(--shadow);
}

/* --------------------------------------------------------------------------
   8b. Screening services
   Two online screening tools, each with its own accent so they read as
   distinct products while staying inside the site's palette.
   -------------------------------------------------------------------------- */

:root {
  --accent-adult: #4a5b8c;
  --accent-adult-pale: #e9ecf5;
  --accent-child: #94592a;
  --accent-child-pale: #f7ede2;
}

.service-adult {
  --accent: var(--accent-adult);
  --accent-pale: var(--accent-adult-pale);
}

.service-child {
  --accent: var(--accent-child);
  --accent-pale: var(--accent-child-pale);
}

/* Overview grid: one card per service. */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.2vw, 40px);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.service-card .eyebrow {
  color: var(--accent);
}

.service-card h2,
.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  line-height: 1.15;
}

.service-card .service-audience {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-lede);
  color: var(--ink-soft);
}

.service-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.service-card .btn-row {
  margin-top: auto;
  padding-top: 1.4rem;
}

/* Small illustrated mark at the top of a service card / hero. */
.service-mark {
  width: 72px;
  height: 72px;
  margin-bottom: 1.4rem;
  border-radius: 20px;
  background: var(--accent-pale);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.service-mark svg {
  width: 44px;
  height: 44px;
  display: block;
}

/* Compact facts strip: "19 conditions · 3 steps · PDF report". */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.stat-row li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-row strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
}

.stat-row span {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Checklist with accent ticks. */
.feature-list {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.9em;
  color: var(--ink-soft);
}

/* Accent disc with a CSS-drawn tick, sized in em so it scales with the text
   and stays centred in the disc at any font size. */
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  background: var(--accent-pale, var(--sage-pale));
}

.feature-list li::after {
  content: "";
  position: absolute;
  left: 0.31em;
  top: 0.6em;
  width: 0.52em;
  height: 0.28em;
  border-left: 0.14em solid var(--accent, var(--sage-dark));
  border-bottom: 0.14em solid var(--accent, var(--sage-dark));
  transform: rotate(-45deg);
}

/* Service detail hero: copy beside a large illustration. */
.service-hero {
  padding-block: clamp(48px, 7vw, 92px) clamp(40px, 6vw, 72px);
  background: linear-gradient(150deg, var(--accent-pale) 0%, var(--paper) 60%);
  border-bottom: 1px solid var(--line);
}

.service-hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.service-hero .eyebrow {
  color: var(--accent);
}

.service-hero h1 {
  margin: 0 0 0.85rem;
  font-size: var(--fs-h1);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.service-hero .lede {
  margin: 0 0 1.4rem;
}

.service-hero .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}

.service-hero .btn-primary:hover {
  filter: brightness(0.92);
}

.service-illustration {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  aspect-ratio: 1;
}

.service-illustration svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Launch button that is waiting for the service URL. */
.btn.is-pending {
  background: var(--paper-deep);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn.is-pending:hover {
  transform: none;
  box-shadow: none;
}

.service-adult .card-index,
.service-adult .link-arrow {
  color: var(--accent);
}

.service-child .card-index,
.service-child .link-arrow {
  color: var(--accent);
}

@media (max-width: 900px) {
  .service-hero .container {
    grid-template-columns: 1fr;
  }

  /* Keep the headline within the first screen: the picture becomes an
     accent above the copy rather than a full-width hero. */
  .service-illustration {
    max-width: 220px;
    margin-inline: 0;
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: clamp(44px, 6vw, 68px) clamp(28px, 3vw, 38px);
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.footer-brand strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
}

.footer-brand p {
  margin: 0.6rem 0 0;
  max-width: 40ch;
}

.footer-col h2 {
  margin: 0 0 0.9rem;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-dark);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.55rem;
}

.footer-col a {
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--sage-deeper);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: clamp(18px, 2.4vw, 24px);
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.footer-bottom a {
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

.footer-crisis {
  font-weight: 700;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   10. Page-specific
   -------------------------------------------------------------------------- */

/* Payment form. */
.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(24px, 3vw, 34px);
  align-items: start;
}

.payment-panel {
  padding: clamp(24px, 3.4vw, 36px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.payment-label {
  display: block;
  margin: 1.1rem 0 0.45rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-dark);
}

.payment-label:first-child {
  margin-top: 0;
}

.payment-label span {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.payment-panel select,
.payment-panel input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  /* 16px minimum stops iOS Safari zooming in on focus. */
  font: 16px var(--sans);
}

.payment-panel select:focus,
.payment-panel input:focus {
  border-color: var(--sage-dark);
}

.payment-submit {
  width: 100%;
  margin-top: 1.6rem;
}

.payment-sidebar {
  display: grid;
  gap: 22px;
}

/* --------------------------------------------------------------------------
   11. Motion
   -------------------------------------------------------------------------- */

/* Reveal-on-scroll is scoped to .js, which an inline <head> script sets. If
   scripting is off or site.js fails, content simply renders — it is never
   left invisible. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }

  .js .reveal.visible {
    opacity: 1;
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .payment-layout {
    grid-template-columns: 1fr;
  }
}

/* Below this width the inline nav no longer fits: switch to the drawer. */
@media (max-width: 1180px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    /* svh keeps the drawer clear of mobile browser chrome. */
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) calc(28px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    /* Hidden by default; slides down when .open is added. */
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.25s var(--ease),
      visibility 0.3s var(--ease);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    padding-block: 16px;
    border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
    letter-spacing: 0.06em;
  }

  .nav a:not(.nav-cta)::after {
    display: none;
  }

  .nav .nav-cta {
    margin-top: 20px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--sage-dark);
    text-align: center;
    background: var(--sage-dark);
    color: var(--white);
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split-reverse .split-media {
    order: 0;
  }

  .portrait-frame {
    max-width: 460px;
    margin-inline: auto;
    aspect-ratio: 4 / 5;
  }

  .book {
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  /* Stacked, full-width buttons are easier to hit one-handed. */
  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-row .btn {
    width: 100%;
  }

  .book {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .book img {
    max-width: 170px;
  }

  .photo-hero {
    /* Let the copy define the height rather than cropping it. */
    min-height: 0;
    padding-block: clamp(60px, 16vw, 90px) clamp(44px, 10vw, 64px);
  }

  .home-hero {
    min-height: calc(100svh - var(--header-h));
  }

  .portrait-frame {
    aspect-ratio: 1 / 1;
  }
}

/* --------------------------------------------------------------------------
   13. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .menu-toggle,
  .cta-band,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .photo-hero {
    min-height: 0;
    background: none;
    padding-block: 0 24px;
  }

  .photo-hero::after {
    display: none;
  }

  .photo-hero,
  .photo-hero h1,
  .photo-hero p {
    color: #000;
    text-shadow: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
