/* ========================================
   MUUD ACADEMY — Design Tokens & Components
   University-grade aesthetic. Magenta/violet/cream.
   ======================================== */

:root, [data-theme="light"] {
  /* TYPE SCALE */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.82rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.4rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.75rem, 1.5rem + 4.5vw, 5.5rem);
  --text-hero: clamp(3rem, 1rem + 7vw, 7rem);

  /* SPACING — 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* MUUD PALETTE — matched to live muudhealth.com brand */
  --color-bg:               #f2edf7;   /* soft lavender — site default */
  --color-surface:          #ffffff;
  --color-surface-2:        #ede8f5;   /* deeper lavender content block */
  --color-surface-offset:   #e4def0;   /* deepest lavender for contrast bands */
  --color-surface-dynamic:  #ede8f5;   /* lavender highlight */
  --color-divider:          #d8cee6;
  --color-border:           #876ab4;   /* WCAG 2.1 1.4.11 >=3:1 — input/button boundaries */

  --color-text:        #1a002e;        /* near-black eggplant */
  --color-text-muted:  #4a3568;
  --color-text-faint:  #6c5b90;        /* WCAG 2.1 1.4.3 >=4.5:1 on every light surface */
  --color-text-inverse:#ffffff;

  /* Brand — matched to live site */
  --color-primary:           #5B288E;  /* MUUD v3.1 primary — headings/anchors */
  --color-primary-hover:     #2c0049;
  --color-primary-active:    #1f0033;
  --color-primary-highlight: #ede8f5;

  --color-accent:            #3a005f;  /* MUUD button purple */
  --color-accent-hover:      #4f0a7e;
  --color-accent-active:     #2a0045;

  --color-magenta:           #6b21a8;  /* mid-purple gradient — sparingly */
  --color-lavender:          #c8b8de;

  /* Lane accents */
  --color-individuals: #3a005f;
  --color-organizations: #3d0066;

  --color-success: #2d7739;
  --color-error:   #b1224b;

  /* Hero scrim — overlays the hero video, whose luminance is independent of the
     site theme, so these are declared once here and are NOT re-declared in the
     two dark blocks (they inherit from :root, which always matches <html>).
     The alpha FLOOR is 0.66 at every gradient stop. Governing requirement is
     0.6405, computed for .hero__eyebrow (--text-xs white text sitting on its own
     12%-white pill) over a pure-white video frame at WCAG 2.1
     1.4.3 AA (4.5:1). Arithmetic is in the WS-B report. */
  --color-hero-scrim-top:  rgba(20, 8, 40, 0.68);
  --color-hero-scrim-mid:  rgba(20, 8, 40, 0.66);
  --color-hero-scrim-base: rgba(20, 8, 40, 0.85);
  --color-hero-text:       #ffffff;
  --hero-poster:           url('./images/hero_lounge.jpg');

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 240ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — warm-tinted */
  --shadow-sm: 0 1px 2px rgba(79, 23, 110, 0.06);
  --shadow-md: 0 6px 24px rgba(79, 23, 110, 0.08);
  --shadow-lg: 0 18px 48px rgba(79, 23, 110, 0.12);

  /* Widths */
  --content-narrow: 680px;
  --content-default: 1040px;
  --content-wide: 1280px;

  /* Fonts — matched to Squarespace Aktiv Grotesk feel */
  --font-display: 'Archivo', 'Aktiv Grotesk', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', 'Aktiv Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="dark"] {
  --color-bg:              #14101e;
  --color-surface:         #1d1830;
  --color-surface-2:       #25203a;
  --color-surface-offset:  #2f2945;
  --color-surface-dynamic: #3a335a;
  --color-divider:         #3a3450;
  --color-border:          #8a81ac;   /* was #4a4365 — 1.40:1 on --color-primary-highlight */

  --color-text:        #f0eafd;
  --color-text-muted:  #a99cc6;
  --color-text-faint:  #9d95b2;       /* was #6e6489 — 2.86:1 on --color-surface-2 */
  --color-text-inverse:#1a0f2e;

  --color-primary:           #c8a8e8;
  --color-primary-hover:     #dabbf0;
  --color-primary-active:    #ecd0f8;
  --color-primary-highlight: #3a2858;

  --color-accent:            #a98aff;
  --color-accent-hover:      #bea2ff;
  --color-accent-active:     #d1bcff;

  /* Previously absent from both dark blocks: the light-theme values were
     inherited, giving 3.36:1 (success) and 2.61:1 (error) on --color-surface. */
  --color-success:           #4dbc5f;
  --color-error:             #e2698c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
}

/* Block 3 is now a byte-for-byte mirror of the [data-theme="dark"] block above.
   Before this change it omitted --color-surface-dynamic, --color-text-inverse,
   the primary/accent hover-active-highlight set and all three shadows, so a
   prefers-dark visitor with no data-theme attribute got light-theme values for
   those eleven tokens on a dark ground. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #14101e;
    --color-surface:         #1d1830;
    --color-surface-2:       #25203a;
    --color-surface-offset:  #2f2945;
    --color-surface-dynamic: #3a335a;
    --color-divider:         #3a3450;
    --color-border:          #8a81ac;   /* was #4a4365 — 1.40:1 on --color-primary-highlight */

    --color-text:        #f0eafd;
    --color-text-muted:  #a99cc6;
    --color-text-faint:  #9d95b2;       /* was #6e6489 — 2.86:1 on --color-surface-2 */
    --color-text-inverse:#1a0f2e;

    --color-primary:           #c8a8e8;
    --color-primary-hover:     #dabbf0;
    --color-primary-active:    #ecd0f8;
    --color-primary-highlight: #3a2858;

    --color-accent:            #a98aff;
    --color-accent-hover:      #bea2ff;
    --color-accent-active:     #d1bcff;

    /* Previously absent from both dark blocks: the light-theme values were
       inherited, giving 3.36:1 (success) and 2.61:1 (error) on --color-surface. */
    --color-success:           #4dbc5f;
    --color-error:             #e2698c;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  }
}

/* ========================================
   LAYOUT PRIMITIVES
   ======================================== */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-10));
}
.container--wide { max-width: var(--content-wide); }
.container--narrow { max-width: var(--content-narrow); }

section { padding-block: clamp(var(--space-16), 8vw, var(--space-32)); }
section.tight { padding-block: clamp(var(--space-10), 5vw, var(--space-16)); }

/* ========================================
   TOP BAR
   ======================================== */
/* MUUD Health global header — mirrors www.muudhealth.com */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #F2EAF5;
  border-bottom: 1px solid rgba(45, 26, 77, 0.08);
  transition: box-shadow 200ms ease;
}
.topbar.is-scrolled { box-shadow: 0 2px 18px rgba(45, 26, 77, 0.08); }
[data-theme="dark"] .topbar { background: #1a0f2e; border-bottom-color: rgba(216, 192, 255, 0.12); }

.topbar__inner {
  max-width: 1320px;
  margin-inline: auto;
  padding: 14px clamp(20px, 4vw, 56px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}

.topbar__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.topbar__logo img {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.topbar__nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.4vw, 44px);
}
.topbar__nav a {
  font-family: var(--font-display, Georgia, 'Times New Roman', serif);
  font-size: 17px;
  font-weight: 500;
  color: #2D1A4D;
  text-decoration: none;
  letter-spacing: 0.01em;
  padding: 4px 0;
  position: relative;
  transition: color 160ms ease;
}
.topbar__nav a:hover { color: #5A2E8C; }
.topbar__nav a.is-active,
.topbar__nav a[aria-current="page"] { color: #2D1A4D; }
.topbar__nav a.is-active::after,
.topbar__nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: #2D1A4D;
  border-radius: 1px;
}
[data-theme="dark"] .topbar__nav a { color: #EFE4F5; }
[data-theme="dark"] .topbar__nav a:hover { color: #D8C0FF; }
[data-theme="dark"] .topbar__nav a.is-active::after,
[data-theme="dark"] .topbar__nav a[aria-current="page"]::after { background: #D8C0FF; }

.topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}
.topbar__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2D1A4D;
  color: #FFFFFF;
  padding: 10px 26px;
  border-radius: 999px;
  font-family: var(--font-display, Georgia, 'Times New Roman', serif);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 160ms ease, transform 160ms ease;
}
.topbar__cta:hover { background: #3F2569; color: #FFFFFF; transform: translateY(-1px); }
[data-theme="dark"] .topbar__cta { background: #D8C0FF; color: #1a0f2e; }
[data-theme="dark"] .topbar__cta:hover { background: #EFE4F5; color: #1a0f2e; }

.topbar__menu-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(45, 26, 77, 0.18);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: #2D1A4D;
  cursor: pointer;
}
.topbar__menu-btn:hover { border-color: #2D1A4D; }
[data-theme="dark"] .topbar__menu-btn { color: #EFE4F5; border-color: rgba(216, 192, 255, 0.2); }

.topbar__mobile {
  display: none;
  flex-direction: column;
  padding: 12px clamp(20px, 4vw, 56px) 18px;
  background: #F2EAF5;
  border-top: 1px solid rgba(45, 26, 77, 0.08);
  gap: 6px;
}
.topbar__mobile[hidden] { display: none !important; }
.topbar__mobile:not([hidden]) { display: flex; }
.topbar__mobile a {
  display: block;
  padding: 12px 8px;
  font-family: var(--font-display, Georgia, 'Times New Roman', serif);
  font-size: 17px;
  color: #2D1A4D;
  text-decoration: none;
  border-radius: 8px;
}
.topbar__mobile a[aria-current="page"] { background: rgba(45, 26, 77, 0.06); font-weight: 600; }
.topbar__mobile a:hover { background: rgba(45, 26, 77, 0.08); }
.topbar__mobile-cta {
  margin-top: 6px;
  background: #2D1A4D;
  color: #FFFFFF !important;
  text-align: center;
  font-weight: 600;
}
.topbar__mobile-cta:hover { background: #3F2569 !important; }
[data-theme="dark"] .topbar__mobile { background: #1a0f2e; }
[data-theme="dark"] .topbar__mobile a { color: #EFE4F5; }

@media (max-width: 880px) {
  .topbar__nav { display: none; }
  .topbar__menu-btn { display: inline-flex; }
  .topbar__logo img { width: 52px; height: 52px; }
  .topbar__cta { padding: 9px 20px; font-size: 15px; }
}
@media (max-width: 520px) {
  .topbar__cta { display: none; }
  .topbar__inner { gap: 12px; padding: 10px 16px; }
}


/* ========================================
   HERO
   ======================================== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(580px, 86vh, 880px);
  display: grid;
  align-items: end;
  isolation: isolate;
}
.hero__video, .hero__video-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    var(--color-hero-scrim-top) 0%,
    var(--color-hero-scrim-mid) 40%,
    var(--color-hero-scrim-base) 100%
  );
}

/* B5 — prefers-reduced-motion: the hero <video autoplay loop> is neither an
   animation nor a transition, so base.css's reduced-motion block does not reach
   it. Hide the moving frame and paint its own poster still in its place.
   CSS cannot pause playback; see WS-B report "Missing" for the app.js half. */
@media (prefers-reduced-motion: reduce) {
  .hero__video, .hero__video-fallback { display: none; }
  .hero {
    background-image: var(--hero-poster);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}

.hero__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  width: 100%;
  padding: var(--space-32) clamp(var(--space-4), 4vw, var(--space-10)) var(--space-20);
  color: var(--color-hero-text);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-full);
  color: var(--color-hero-text);
  margin-bottom: var(--space-6);
}
.hero__eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #d3b8ff;
  box-shadow: 0 0 12px #d3b8ff;
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: 0.96;
  letter-spacing: -0.02em;
  font-weight: 400;
  max-width: 14ch;
  margin-bottom: var(--space-6);
}
.hero__title em {
  font-style: italic;
  color: #d3b8ff;
}
.hero__sub {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  line-height: 1.55;
  max-width: 56ch;
  color: var(--color-hero-text);
  margin-bottom: var(--space-8);
}
.hero__cohort {
  display: inline-flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-6);
  background: #ffffff;
  border-left: 4px solid #3a005f;
  border-radius: var(--radius-md);
  color: #1a002e;
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
}
.hero__cohort small {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4a3568;
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.hero__cohort strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #3d0066;
  margin-bottom: var(--space-2);
}
.hero__cohort span {
  font-size: var(--text-sm);
  color: #1a002e;
  font-weight: 500;
  line-height: 1.5;
}
.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-full);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 16px rgba(142, 93, 254, 0.35);
}
.btn--primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(142, 93, 254, 0.45); }
.btn--ghost {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.5);
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: white; }
.btn--secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn--secondary:hover { background: var(--color-surface-2); border-color: var(--color-primary); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }
.btn--arrow::after { content: '→'; transition: transform var(--transition-interactive); }
.btn--arrow:hover::after { transform: translateX(4px); }

/* ========================================
   SECTION HEADER (academic)
   ======================================== */
.section-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  max-width: var(--content-narrow);
}
.section-head--centered { margin-inline: auto; text-align: center; }
.section-head__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.section-head__eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--color-accent);
}
.section-head--centered .section-head__eyebrow { justify-content: center; }
.section-head__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--color-text);
  font-weight: 400;
}
.section-head__title em { font-style: italic; color: var(--color-accent); font-weight: 700; }
[data-theme="dark"] .section-head__title em { color: #d8c0ff; }
.section-head__lead {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--color-text-muted);
}

/* ========================================
   PROGRAM SHELF (three tiles)
   ======================================== */
.shelf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 880px) { .shelf { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--color-text);
  overflow: hidden;
  isolation: isolate;
  min-height: 320px;
}
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-interactive);
}
.tile:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.tile:hover::before { opacity: 1; }
.tile--featured::before { background: linear-gradient(135deg, #f4eaff 0%, #e4def8 100%); }
.tile--mfp::before { background: linear-gradient(135deg, #f4eaff 0%, #d8c5f0 100%); }
.tile--map::before { background: linear-gradient(135deg, #ebe4f8 0%, #b8a3df 100%); }

.tile__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.tile--mfp .tile__badge, .tile--map .tile__badge { color: var(--color-organizations); }
.tile__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.05;
  margin-bottom: var(--space-3);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tile__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: var(--space-6);
}
.tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.tile__meta span {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  background: rgba(79, 23, 110, 0.06);
  border-radius: var(--radius-full);
  color: var(--color-primary);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tile__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-primary);
}
.tile__cta::after { content: '→'; transition: transform var(--transition-interactive); }
.tile:hover .tile__cta::after { transform: translateX(4px); }

/* ========================================
   AUDIENCE SPLIT (Individuals vs Organizations)
   ======================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }

.split__pane {
  padding: var(--space-10);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-divider);
  display: grid;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
}
.split__pane--ind {
  background: linear-gradient(135deg, #ffffff 0%, #f4eaff 100%);
  border-color: color-mix(in oklab, var(--color-individuals) 30%, var(--color-divider));
  color: #1a002e;
}
.split__pane--ind .split__pane-eyebrow { color: #3a005f; }
.split__pane--ind .split__pane-title { color: #1a002e; }
.split__pane--ind .split__pane-desc { color: #2c0049; opacity: 1; }
.split__pane--ind .split__pane-cta { color: #3a005f; }
.split__pane--org {
  background: linear-gradient(135deg, #2a1748 0%, #3d0066 100%);
  color: #ffffff;
  border: none;
}
.split__pane--org .split__pane-eyebrow { color: #d3b8ff; }
.split__pane--org .split__pane-title { color: #ffffff; }
.split__pane--org .split__pane-desc { color: #ede8f5; opacity: 1; }
.split__pane--org .split__pane-cta { color: #ffffff; }
.split__pane:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.split__pane-eyebrow { font-size: var(--text-xs); letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; color: var(--color-accent); }
.split__pane-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; line-height: 1.1; }
.split__pane-desc { font-size: var(--text-base); line-height: 1.55; }
.split__pane-cta { margin-top: var(--space-2); font-weight: 600; font-size: var(--text-sm); color: var(--color-primary); display: inline-flex; align-items: center; gap: var(--space-2); }
.split__pane-cta::after { content: '→'; transition: transform var(--transition-interactive); }
.split__pane:hover .split__pane-cta::after { transform: translateX(4px); }

/* ========================================
   COHORT BANNER (Fall 2026)
   ======================================== */
.cohort-banner {
  background: linear-gradient(135deg, #2a0e4a 0%, #3d0066 60%, #6b1f8e 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 4vw, var(--space-16));
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-10);
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cohort-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(211,184,255,0.35) 0%, transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(174,0,177,0.18) 0%, transparent 45%);
  pointer-events: none;
}
.cohort-banner > * { position: relative; z-index: 1; }
@media (max-width: 880px) { .cohort-banner { grid-template-columns: 1fr; } }
.cohort-banner__eyebrow { font-size: var(--text-xs); letter-spacing: 0.22em; text-transform: uppercase; color: #d3b8ff; font-weight: 600; margin-bottom: var(--space-4); }
.cohort-banner__title { font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1.05; margin-bottom: var(--space-4); font-weight: 400; }
.cohort-banner__title em { font-style: italic; color: #d3b8ff; }
.cohort-banner__sub { font-size: var(--text-base); opacity: 0.92; line-height: 1.6; margin-bottom: var(--space-6); }

/* NBHWC's mandated approval statement. Spans the full banner width so the
   sentence is never visually split — the letter forbids variations, and a
   sentence broken across two columns reads as two fragments. Placed last, so
   the five existing grid children keep their auto-placed positions. */
.cohort-banner__approval {
  grid-column: 1 / -1;
  margin-top: var(--space-6);
  margin-bottom: 0;
  font-size: var(--text-xs);
  line-height: 1.65;
  opacity: 0.8;
}

.cohort-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  padding: var(--space-6);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
}
.cohort-meta dt {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(211,184,255,0.85);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.cohort-meta dd {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: white;
}

/* ========================================
   COURSE DIRECTOR WELCOME
   ======================================== */
.welcome {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
@media (max-width: 880px) { .welcome { grid-template-columns: 1fr; } }

.welcome__portrait {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.welcome__portrait img { width: 100%; height: 100%; object-fit: cover; }
.welcome__portrait::before {
  content: '';
  position: absolute;
  inset: -20px -20px 40px -40px;
  background: var(--color-accent);
  z-index: -1;
  border-radius: var(--radius-lg);
  opacity: 0.4;
}
.welcome__body { display: grid; gap: var(--space-5); }
.welcome__pretitle {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent);
}
.welcome__quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem);
  line-height: 1.25;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.welcome__quote::before { content: '\201C'; color: var(--color-accent); margin-right: var(--space-1); }
.welcome__quote::after  { content: '\201D'; color: var(--color-accent); margin-left: var(--space-1); }
.welcome__sig {
  margin-top: var(--space-2);
  display: grid;
  gap: var(--space-1);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-divider);
}
.welcome__sig-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; color: var(--color-primary); }
.welcome__sig-title { font-size: var(--text-sm); color: var(--color-text-muted); }
.welcome__read-more {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  display: inline-flex;
  gap: var(--space-2);
}
.welcome__read-more::after { content: '→'; transition: transform var(--transition-interactive); }
.welcome__read-more:hover::after { transform: translateX(4px); }

/* ========================================
   THREE COMMITMENTS / PILLARS
   ======================================== */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 880px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
}
.pillar__num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  display: block;
}
.pillar__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; margin-bottom: var(--space-3); color: var(--color-primary); }
.pillar__desc { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.55; }

/* ========================================
   CURRICULUM TABLE (academic syllabus feel)
   ======================================== */
.curriculum-grid {
  display: grid;
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.curriculum-row {
  display: grid;
  grid-template-columns: 60px 1.4fr 1fr;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-6);
  background: var(--color-surface);
  align-items: baseline;
}
.curriculum-row__num { font-family: var(--font-display); font-style: italic; color: var(--color-accent); font-size: var(--text-lg); }
.curriculum-row__title { font-family: var(--font-display); font-weight: 500; color: var(--color-text); font-size: var(--text-lg); line-height: 1.25; }
.curriculum-row__map { font-size: var(--text-xs); color: var(--color-text-muted); font-family: var(--font-mono); letter-spacing: 0.05em; }
@media (max-width: 720px) {
  .curriculum-row { grid-template-columns: 40px 1fr; }
  .curriculum-row__map { grid-column: 2; margin-top: var(--space-1); }
}

/* ========================================
   SCHEDULE TABLE (academic calendar)
   ======================================== */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.schedule-table th {
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-divider);
}
.schedule-table td {
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
  color: var(--color-text);
  vertical-align: top;
}
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table tr:hover td { background: color-mix(in oklab, var(--color-surface-dynamic) 25%, transparent); }
.schedule-table .week { font-family: var(--font-display); font-style: italic; color: var(--color-primary); white-space: nowrap; }
.schedule-table .module { font-weight: 600; }
.schedule-table .module em { font-style: italic; font-weight: 400; color: var(--color-text-muted); }
/* The <caption> is a table summary for assistive technology and for sighted
   readers scanning the calendar. Without a rule it renders centred, unbounded
   and outside the table's own rounded surface. */
.schedule-table caption {
  caption-side: top;
  text-align: left;
  padding: var(--space-4) var(--space-5) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-2);
}
/* B4 — horizontal scroller for the schedule table.
   `.table-scroll` is the class the wrapper at index.html:492 must carry in place
   of its inline style="overflow-x: auto;" (see WS-B report, Missing #1, for the
   exact markup WS-A or the bench must land). Until that lands, the inline style
   still supplies the scrolling and the min-width rule below still forces it. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
}
.table-scroll:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .schedule-table th, .schedule-table td { padding: var(--space-3); font-size: var(--text-xs); }
  /* The 4th column ("Practicum Activity") used to be hidden here, which
     removed 11 rows of programme content from the page and from the
     accessibility tree on every phone. The table now keeps all four columns and
     scrolls inside its container instead. */
  .schedule-table { min-width: 640px; }
}

/* ========================================
   FACULTY GRID
   ======================================== */
.faculty {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
@media (max-width: 880px) { .faculty { grid-template-columns: 1fr; } }
.faculty__card {
  display: grid;
  gap: var(--space-4);
}
.faculty__portrait {
  aspect-ratio: 4/5;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
  box-shadow: var(--shadow-md);
}
.faculty__portrait img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms ease; }
.faculty__card:hover .faculty__portrait img { transform: scale(1.04); }
/* faculty__placeholder removed — all faculty cards now show real portraits */
.faculty__name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; color: var(--color-primary); }
.faculty__title { font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 600; margin-top: -10px; }
.faculty__bio { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.55; }

/* ========================================
   STATS BAND
   ======================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding-block: var(--space-12);
  border-block: 1px solid var(--color-divider);
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat__num { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--color-primary); line-height: 1; font-weight: 500; margin-bottom: var(--space-2); }
.stat__num em { font-style: italic; color: var(--color-accent); }
.stat__label { font-size: var(--text-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 600; }

/* ========================================
   PRE-CANDIDATE REGISTRATION FORM
   ======================================== */
.form-shell {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 4vw, var(--space-16));
  box-shadow: var(--shadow-md);
}
.form-shell__head { margin-bottom: var(--space-10); }
.form-shell__head .section-head__title { font-size: var(--text-xl); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5) var(--space-6);
}
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

.form-field { display: grid; gap: var(--space-2); }
.form-field label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text-muted);
}
.form-field .required { color: var(--color-error); }
.form-field input,
.form-field select,
.form-field textarea {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-base);
  font-family: inherit;
  width: 100%;
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(142, 93, 254, 0.15);
}
.form-field.checkbox {
  flex-direction: row;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
/* B6 — WCAG 2.2 SC 2.5.8 Target Size (Minimum), Level AA: >=24x24 CSS px.
   (In WCAG 2.1 the equivalent is 2.5.5 Target Size, Level AAA.) The UA default
   checkbox renders at ~13-16px. This is a presentation-only change: the control
   keeps its type, id, name, required flag and gating behaviour untouched. */
.form-field.checkbox input {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}
.form-field.checkbox label { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--color-text); font-size: var(--text-sm); }
/* Per-field validation message injected by app.js (id="<control-id>-error",
   referenced from the control's aria-describedby). Tokens only.
   `.form-field` is a grid, so the message stacks under its control. The two
   checkbox rows are `display: flex; flex-direction: row`, where an appended
   element would otherwise land as a THIRD column beside the label instead of
   below it — `flex-basis: 100%` puts it on its own line, and the left inset
   matches the 24px control plus the row gap so the message aligns to the label. */
.form-field__error {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--color-error);
  max-width: 72ch;
}
.form-field__error[hidden] { display: none; }
.form-field.checkbox { flex-wrap: wrap; }
.form-field.checkbox .form-field__error {
  flex-basis: 100%;
  margin-left: calc(24px + var(--space-3));
}
.form-helper { font-size: var(--text-xs); color: var(--color-text-faint); }

.form-actions {
  margin-top: var(--space-10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.form-actions__note { font-size: var(--text-xs); color: var(--color-text-faint); max-width: 50ch; }

.form-status {
  display: none;
  margin-top: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.form-status.is-error { display: block; background: color-mix(in oklab, var(--color-error) 8%, transparent); color: var(--color-error); border: 1px solid color-mix(in oklab, var(--color-error) 20%, transparent); }
.form-status.is-success { display: block; background: color-mix(in oklab, var(--color-success) 8%, transparent); color: var(--color-success); border: 1px solid color-mix(in oklab, var(--color-success) 20%, transparent); }

/* Confirmation panel (post-submit) */
.confirm {
  display: none;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 5vw, var(--space-20));
  text-align: center;
  box-shadow: var(--shadow-md);
}
.confirm.is-visible { display: block; }
.confirm__check {
  width: 64px; height: 64px;
  margin: 0 auto var(--space-6);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  display: grid; place-items: center;
  color: white;
  box-shadow: var(--shadow-md);
  animation: confirmPop 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes confirmPop {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
.confirm__title { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--color-primary); margin-bottom: var(--space-4); font-weight: 400; }
.confirm__sub { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 60ch; margin: 0 auto var(--space-10); }
.confirm__next {
  text-align: left;
  max-width: 600px;
  margin: 0 auto var(--space-10);
  background: var(--color-surface-2);
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-accent);
}
.confirm__next h4 { font-family: var(--font-display); font-size: var(--text-lg); margin-bottom: var(--space-4); color: var(--color-primary); font-weight: 500; }
.confirm__next ol { padding-left: var(--space-6); display: grid; gap: var(--space-2); }
.confirm__next li { font-size: var(--text-sm); color: var(--color-text); line-height: 1.55; }
.confirm__actions { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

/* Square checkout CTA injected into #confirm-cta by app.js */
.confirm__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 600px;
  margin: 0 auto var(--space-10);
}
.confirm__cta:empty { display: none; }
.confirm-badge {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.5;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  max-width: 60ch;
}
.confirm-badge--ok {
  color: var(--color-success);
  background: color-mix(in oklab, var(--color-success) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--color-success) 35%, transparent);
}
.confirm-badge--warn {
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  border: 1px solid var(--color-border);
}
.confirm-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 52ch;
  line-height: 1.55;
}

/* ========================================
   ECOSYSTEM STRIP (Tools you'll use)
   ======================================== */
.ecosystem {
  background: var(--color-surface-2);
  border-block: 1px solid var(--color-divider);
}
.ecosystem__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  text-align: center;
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--color-primary);
}
.ecosystem__sub { text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-10); }
.ecosystem__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
@media (max-width: 720px) { .ecosystem__grid { grid-template-columns: repeat(2, 1fr); } }
.eco-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  text-align: center;
  display: grid;
  gap: var(--space-2);
}
.eco-card:hover { border-color: var(--color-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.eco-card__icon { font-size: 1.75rem; margin: 0 auto var(--space-2); width: 48px; height: 48px; display: grid; place-items: center; background: var(--color-primary-highlight); border-radius: var(--radius-full); color: var(--color-primary); }
.eco-card__name { font-family: var(--font-display); font-size: var(--text-base); font-weight: 500; color: var(--color-primary); }
.eco-card__desc { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.4; }

/* ========================================
   CLINIC/BOOK PROMO STRIP
   ======================================== */
.other-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 720px) { .other-services { grid-template-columns: 1fr; } }
.svc-card {
  padding: var(--space-6) var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  text-decoration: none;
  color: var(--color-text);
}
.svc-card:hover { border-color: var(--color-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.svc-card__body { display: grid; gap: var(--space-1); }
.svc-card__title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; color: var(--color-primary); }
.svc-card__desc { font-size: var(--text-sm); color: var(--color-text-muted); }
.svc-card__arrow { color: var(--color-accent); font-size: 1.25rem; flex-shrink: 0; }

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: linear-gradient(180deg, #2a1748 0%, #1a0a30 100%);
  color: #d0c3e0;
  padding: var(--space-20) 0 var(--space-10);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-16);
}
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__brand-mark { color: #c8a8e8; margin-bottom: var(--space-4); }
.footer__brand-link { display: inline-block; margin-bottom: var(--space-4); }
.footer__brand-logo { width: 96px; height: auto; display: block; }
.footer__brand-name { font-family: var(--font-display); font-size: var(--text-lg); color: white; margin-bottom: var(--space-2); font-weight: 400; }
.footer__brand-desc { font-size: var(--text-sm); color: #a99cc6; max-width: 36ch; line-height: 1.55; }

.footer__col h4 { font-size: var(--text-xs); letter-spacing: 0.22em; text-transform: uppercase; color: #c8a8e8; font-weight: 600; margin-bottom: var(--space-4); }
.footer__col ul { display: grid; gap: var(--space-2); }
.footer__col a { color: #d0c3e0; text-decoration: none; font-size: var(--text-sm); }
.footer__col a:hover { color: white; }

.footer__bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: #8479a0;
}
.footer__bottom a { color: #c8a8e8; text-decoration: none; }
.footer__bottom a:hover { color: white; }

.footer__disclaimer {
  padding-top: var(--space-8);
  margin-bottom: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid #5B288E;
  padding-left: var(--space-5);
  display: grid;
  gap: var(--space-2);
}
.footer__disclaimer-heading { font-size: var(--text-sm); color: #e6ddf2; max-width: 72ch; line-height: 1.55; font-weight: 700; margin: 0; }
.footer__disclaimer-text { font-size: var(--text-sm); color: #a99cc6; max-width: 72ch; line-height: 1.55; }
.footer__disclaimer-text a { color: #c8a8e8; text-decoration: underline; font-weight: 600; white-space: nowrap; }
.footer__disclaimer-text a:hover { color: white; }

/* ========================================
   FULL BLEED IMAGE BLOCK
   ======================================== */
.bleed {
  position: relative;
  height: clamp(420px, 60vh, 640px);
  overflow: hidden;
}
.bleed img { width: 100%; height: 100%; object-fit: cover; }
.bleed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(20,8,40,0.55) 100%);
}
.bleed__caption {
  position: absolute;
  bottom: var(--space-10);
  left: 0; right: 0;
  text-align: center;
  color: white;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  max-width: 32ch;
  margin-inline: auto;
  padding-inline: var(--space-6);
  z-index: 1;
}

/* ========================================
   QUOTE / TESTIMONIAL PULL
   ======================================== */
.pullquote {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  max-width: 24ch;
  margin-inline: auto;
  color: var(--color-primary);
  font-weight: 400;
  padding-block: var(--space-8);
  position: relative;
}
.pullquote::before, .pullquote::after {
  font-style: italic;
  color: var(--color-accent);
}
.pullquote::before { content: '\201C'; }
.pullquote::after  { content: '\201D'; }
.pullquote__attr {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-6);
}

/* ========================================
   SCROLL REVEAL
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Decorative grain overlay for hero — keeps photographic feel */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   SECTION UTILITIES — section spacing and surface variants
   ============================================================ */
.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}
.section--tight {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}
.section--banner {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20));
}
.section--surface {
  background: var(--color-surface-2);
}

/* ============================================================
   FORM VALIDATION STATE
   ============================================================ */
.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--color-error);
  background: rgba(177, 34, 75, 0.04);
}
.form-field.checkbox input.is-invalid {
  outline: 2px solid var(--color-error);
  outline-offset: 2px;
}

/* ============================================================
   CONTAINER fallback (in case not already strict)
   ============================================================ */
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-10));
  max-width: var(--content-default);
}
.container--wide { max-width: var(--content-wide); }
.container--narrow { max-width: var(--content-narrow); }

/* ============================================================
   MOBILE POLISH — tighter topbar, hide subhead on small screens
   ============================================================ */
@media (max-width: 720px) {
  .topbar__back span { display: none; }
  .topbar__brand-text { font-size: var(--text-sm); line-height: 1.1; }
  .topbar__brand-text small { display: none; }
  .topbar__inner { padding-block: var(--space-3); gap: var(--space-3); }
}
@media (max-width: 880px) {
  .other-services .ecosystem__grid {
    grid-template-columns: 1fr !important;
  }
}
/* Center single-column svc-card area on desktop */
.other-services .ecosystem__grid {
  margin-inline: auto;
}
