/* ===========================================================
   Elevate Audiology v2 — Base Stylesheet
   Brand palette (Alex Tarvin spec):
     Dark:  #4a0055   RGB 73,0,85    CMYK 13,100,0,67
     Mid:   #680d77   RGB 104,13,119 CMYK 13,89,0,53
     Light: #871f99   RGB 135,31,154 CMYK 12,80,0,40
   With white, black, grays, and teal as accent only.
   =========================================================== */

:root {
  /* Brand palette — exact spec from Alex Tarvin */
  --c-purple-900: #4a0055;   /* Dark   */
  --c-purple-700: #680d77;   /* Mid    */
  --c-purple-600: #871f99;   /* Light  */
  --c-purple-500: #9c34ad;   /* Light + 8% (hover/active states) */
  --c-purple-100: #f3e6f5;   /* Tint   */
  --c-purple-50:  #faf3fb;   /* Wash   */

  /* Teal — accent only (sparingly) */
  --c-teal-700: #0d6a6f;
  --c-teal-600: #128088;
  --c-teal-500: #1a9aa3;
  --c-teal-100: #d8f0f2;

  --c-gray-900: #1a1a1f;
  --c-gray-800: #2c2c33;
  --c-gray-700: #4a4a52;
  --c-gray-600: #6b6b73;
  --c-gray-500: #8a8a92;
  --c-gray-400: #b3b3b8;
  --c-gray-300: #d4d4d8;
  --c-gray-200: #e5e5e9;
  --c-gray-100: #f2f2f4;
  --c-gray-50:  #f8f8fa;

  --c-white: #ffffff;
  --c-black: #0a0a0d;

  /* Semantic */
  --c-bg: var(--c-white);
  --c-bg-alt: var(--c-gray-50);
  --c-bg-deep: var(--c-purple-900);
  --c-text: var(--c-gray-900);
  --c-text-soft: var(--c-gray-700);
  --c-text-muted: var(--c-gray-500);
  --c-text-on-dark: var(--c-white);
  --c-border: var(--c-gray-200);
  --c-accent: var(--c-purple-700);       /* Mid purple — primary brand */
  --c-accent-hover: var(--c-purple-900); /* Dark purple — hover */
  --c-accent-2: var(--c-teal-600);
  --c-accent-2-hover: var(--c-teal-700);

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs:   0.8125rem;  /* 13 */
  --text-sm:   0.9375rem;  /* 15 */
  --text-base: 1.0625rem;  /* 17 */
  --text-lg:   1.25rem;    /* 20 */
  --text-xl:   1.5rem;     /* 24 */
  --text-2xl:  2rem;       /* 32 */
  --text-3xl:  2.625rem;   /* 42 */
  --text-4xl:  3.5rem;     /* 56 */

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.5rem;
  --sp-6:  2rem;
  --sp-7:  3rem;
  --sp-8:  4rem;
  --sp-9:  6rem;
  --sp-10: 8rem;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20,12,40,.06), 0 2px 6px rgba(20,12,40,.05);
  --shadow:    0 6px 22px rgba(20,12,40,.08), 0 2px 6px rgba(20,12,40,.04);
  --shadow-lg: 0 24px 60px rgba(20,12,40,.18), 0 4px 12px rgba(20,12,40,.08);

  --container: 1200px;
  --container-wide: 1320px;

  --ease: cubic-bezier(.2,.7,.3,1);
}

/* Reset */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--c-accent-hover); }
button { font: inherit; cursor: pointer; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.01em;
  color: var(--c-gray-900);
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.625rem); }
h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); }
h4 { font-size: var(--text-xl); }
p  { margin: 0 0 var(--sp-4); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent-2);
  margin-bottom: var(--sp-3);
}

/* Layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
.container-wide { width: 100%; max-width: var(--container-wide); margin-inline: auto; padding-inline: var(--sp-5); }
.section { padding-block: clamp(var(--sp-8), 9vw, var(--sp-10)); }
.section-tight { padding-block: clamp(var(--sp-7), 6vw, var(--sp-8)); }
.section-alt { background: var(--c-bg-alt); }
.section-deep { background: var(--c-bg-deep); color: var(--c-text-on-dark); }
.section-deep h1, .section-deep h2, .section-deep h3 { color: var(--c-white); }
.grid { display: grid; gap: var(--sp-6); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--c-accent); color: var(--c-white); }
.btn-primary:hover { background: var(--c-accent-hover); color: var(--c-white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--c-accent-2); color: var(--c-white); }
.btn-accent:hover { background: var(--c-accent-2-hover); color: var(--c-white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--c-accent); border-color: var(--c-accent); }
.btn-outline:hover { background: var(--c-accent); color: var(--c-white); }
.btn-ghost { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-gray-100); }
.btn-on-dark { background: var(--c-white); color: var(--c-purple-700); }
.btn-on-dark:hover { background: var(--c-purple-50); color: var(--c-purple-900); transform: translateY(-1px); }

/* Header / Nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.utility-bar {
  background: var(--c-purple-900);
  color: var(--c-white);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}
.utility-bar .container-wide { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-block: 0.5rem; }
.utility-bar a { color: var(--c-white); }
.utility-bar a:hover { color: var(--c-purple-100); }
.utility-bar .util-left { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.utility-bar .util-right { display: flex; gap: var(--sp-4); }

.nav-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); padding-block: var(--sp-4); }
.nav-logo img { height: 50px; width: auto; }
.nav-list { display: flex; align-items: center; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a, .nav-list > li > button {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.6rem 0.85rem;
  color: var(--c-gray-900);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: none; border: none;
}
.nav-list > li > a:hover, .nav-list > li > button:hover { background: var(--c-purple-50); color: var(--c-purple-700); }
.nav-list > li > a.active { color: var(--c-purple-700); font-weight: 600; }

.has-drop { position: relative; }
/* Invisible bridge so cursor can cross from trigger to dropdown without losing :hover */
.has-drop > a::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%;
  height: 10px; background: transparent;
}
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 260px;
  margin-top: 6px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-4px);
  /* Close transition (when leaving) — 200ms delay before hiding for grace period */
  transition: opacity 0.18s ease, visibility 0s linear 0.32s, transform 0.18s ease;
  z-index: 100;
}
.dropdown a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--c-gray-900);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
}
.dropdown a:hover { background: var(--c-purple-50); color: var(--c-purple-700); }
.has-drop:hover .dropdown,
.has-drop:focus-within .dropdown,
.has-drop[data-open="true"] .dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  /* Open transition — instant visibility, smooth fade-in */
  transition: opacity 0.15s ease, visibility 0s linear 0s, transform 0.15s ease;
}

.nav-cta { display: flex; align-items: center; gap: var(--sp-3); }
.nav-toggle { display: none; }

/* Mobile */
@media (max-width: 1024px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    min-width: 44px; flex: 0 0 44px;
    background: transparent; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    color: var(--c-purple-700);
    position: relative; z-index: 101; /* always above the open drawer */
  }
  .nav-toggle:hover, .nav-toggle[aria-expanded="true"] {
    background: var(--c-purple-50); border-color: var(--c-purple-600);
  }
  .nav-toggle svg { width: 22px; height: 22px; transition: transform .25s ease, opacity .2s ease; }
  /* Swap hamburger icon for an X when menu is open */
  .nav-toggle .icon-close { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-close { display: inline-block; }

  /* Make the whole site-header sit above the drawer so the toggle stays tappable */
  .site-header { position: sticky; top: 0; z-index: 100; background: var(--c-white); }

  /* Mobile nav panel: full-width drawer anchored just below the header.
     Hidden by default (translated up out of view); slides down when the
     hamburger is tapped. This is more usable than a bottom sheet because
     users see the TOP nav items first and the menu starts where the
     hamburger button is. */
  .nav-list {
    position: fixed; left: 0; right: 0; top: 0; bottom: auto;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--c-white);
    padding: var(--sp-5) var(--sp-4) var(--sp-6);
    padding-top: 120px; /* clear utility bar + nav row */
    max-height: 100vh; overflow-y: auto;
    border-bottom: 1px solid var(--c-border);
    transform: translateY(-100%);
    transition: transform .25s var(--ease);
    box-shadow: var(--shadow-lg);
    z-index: 80; /* below the sticky header (100) so the toggle stays tappable */
    visibility: hidden;
  }
  .nav-list[data-open="true"] { transform: translateY(0); visibility: visible; }
  .nav-list > li > a, .nav-list > li > button { padding: 0.85rem 0.5rem; width: 100%; justify-content: space-between; }

  /* On mobile, dropdowns are accordion panels INSIDE the bottom sheet.
     They are hidden by default and only open when the parent <li> has
     data-open="true" (set by the JS toggle on tap). Disable the
     desktop :hover and :focus-within triggers — those misfire on touch
     devices and would auto-open every menu. */
  .dropdown {
    position: static; box-shadow: none; border: none;
    padding-left: var(--sp-4); padding-block: 0;
    min-width: 0; margin-top: 0; transform: none; transition: none;
    display: none;
    opacity: 1; visibility: visible; pointer-events: auto;
  }
  /* CRITICAL: undo the desktop hover/focus-within rules that auto-open menus on touch */
  .has-drop:hover .dropdown,
  .has-drop:focus-within .dropdown { display: none; }
  /* Only the explicitly-opened accordion shows */
  .has-drop[data-open="true"] .dropdown { display: block; }
  .has-drop > a::after { display: none; }

  /* Rotate the inline chevron SVG when the accordion is open */
  .has-drop > a > svg { transition: transform .2s ease; }
  .has-drop[data-open="true"] > a > svg { transform: rotate(180deg); }

  .nav-cta .btn { display: none; }
  .nav-cta .btn.btn-primary { display: inline-flex; }
  .nav-cta { flex: 0 0 auto; }
}

/* Footer */
.site-footer {
  background: var(--c-purple-900);
  color: var(--c-purple-100);
  padding-top: var(--sp-9);
  padding-bottom: var(--sp-5);
}
.site-footer h4 {
  color: var(--c-white);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.site-footer a { color: var(--c-purple-100); }
.site-footer a:hover { color: var(--c-white); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-7);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-locations { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.footer-loc strong { color: var(--c-white); display: block; margin-bottom: var(--sp-2); font-weight: 600; }
.footer-loc p { font-size: var(--text-sm); margin-bottom: var(--sp-2); }
.footer-loc a.map-link { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 1px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: var(--sp-2); }
.footer-list a { font-size: var(--text-sm); }
.footer-social { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  color: var(--c-white);
}
.footer-social a:hover { background: var(--c-purple-600); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-4);
  padding-top: var(--sp-5);
  font-size: var(--text-xs);
  color: var(--c-purple-100);
  opacity: 0.85;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-locations { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
}

/* Affiliations strip */
.affiliations {
  background: var(--c-white);
  padding-block: var(--sp-7);
  border-top: 1px solid var(--c-border);
}
.affiliations-row {
  display: flex; flex-wrap: wrap; gap: var(--sp-7);
  align-items: center; justify-content: center;
  filter: grayscale(40%);
  opacity: 0.85;
}
.affiliations-row img { max-height: 60px; width: auto; }

/* Cards */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--c-purple-900) 0%, var(--c-purple-700) 60%, var(--c-purple-600) 100%);
  color: var(--c-white);
  padding-block: clamp(var(--sp-8), 10vw, 8rem);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(26,154,163,0.25), transparent 60%);
  pointer-events: none;
}
.hero h1 { color: var(--c-white); max-width: 18ch; }
.hero p.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 56ch; opacity: 0.92; margin-bottom: var(--sp-6); }
.hero .eyebrow { color: var(--c-teal-100); }
.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--sp-8); align-items: center;
  position: relative; z-index: 2;
}
.hero-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }

/* New hero media (split + inset) */
.hero-media {
  position: relative;
  display: block;
  padding-bottom: 3rem;
  padding-right: 2rem;
}
.hero-media-main {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(43, 23, 71, 0.35), 0 12px 24px rgba(0,0,0,0.18);
  aspect-ratio: 4 / 3;
  background: var(--c-purple-800);
}
.hero-media-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s ease;
}
.hero-media:hover .hero-media-main img { transform: scale(1.03); }
.hero-media-inset {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 55%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 6px solid #fff;
  box-shadow: 0 18px 36px rgba(0,0,0,0.25);
  background: var(--c-purple-200);
}
.hero-media-inset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-media-badge {
  position: absolute;
  left: -1rem;
  top: 1.5rem;
  background: var(--c-accent-2);
  color: var(--c-purple-900);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: 0 14px 28px rgba(0,0,0,0.25);
  font-weight: 700;
}
.hero-media-badge .badge-num {
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 2.5rem;
  line-height: 1;
  font-weight: 700;
}
.hero-media-badge .badge-text {
  font-size: .8125rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { padding-right: 1rem; padding-bottom: 2.5rem; max-width: 36rem; margin-inline: auto; margin-top: 2rem; }
}
@media (max-width: 600px) {
  .hero-media-badge { left: 0; top: 1rem; padding: .75rem 1rem; }
  .hero-media-badge .badge-num { font-size: 2rem; }
  .hero-media-badge .badge-text { font-size: .75rem; }
}

/* Sections */
.section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--c-text-soft); font-size: var(--text-lg); }

/* Service grid */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-5); }
.service-card {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  transition: all .2s var(--ease);
}
.service-card:hover {
  border-color: var(--c-purple-500);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.service-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-purple-50);
  color: var(--c-purple-700);
  border-radius: var(--radius);
  margin-bottom: var(--sp-3);
}
.service-card h3 { font-size: var(--text-xl); margin-bottom: var(--sp-2); }
.service-card p { color: var(--c-text-soft); font-size: var(--text-sm); flex-grow: 1; }
.service-card a.read-more { font-size: var(--text-sm); font-weight: 600; color: var(--c-accent-2); margin-top: var(--sp-3); display: inline-flex; align-items: center; gap: 4px; }

/* Team */
.team-section h2 { text-align: center; }
.team-section .group-label {
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent-2);
  margin-bottom: var(--sp-5);
  padding-top: var(--sp-7);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-5);
}
.team-grid-centered {
  grid-template-columns: repeat(2, minmax(240px, 280px));
  justify-content: center;
}
@media (max-width: 600px) {
  .team-grid-centered { grid-template-columns: minmax(240px, 320px); }
}
.team-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  width: 100%;
  padding: 0;
  transition: all .2s var(--ease);
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c-purple-500); }
.team-photo { aspect-ratio: 3 / 4; background: var(--c-purple-50); overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.team-photo.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-purple-100), var(--c-purple-50));
  color: var(--c-purple-700);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
}
.team-info { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.team-info h3 { font-size: var(--text-lg); margin-bottom: var(--sp-1); }
.team-info .role { font-size: var(--text-sm); color: var(--c-accent-2); font-weight: 600; }
.team-info .credentials { font-size: var(--text-xs); color: var(--c-text-muted); margin-top: 4px; }

/* Modal */
.team-modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(20, 12, 40, 0.7);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: var(--sp-4);
  backdrop-filter: blur(4px);
}
.team-modal-backdrop[data-open="true"] { display: flex; }
.team-modal {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  position: relative;
}
.team-modal .close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 2;
}
.team-modal .close:hover { background: var(--c-white); }
.team-modal .modal-photo { background: var(--c-purple-50); }
.team-modal .modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-modal .modal-body { padding: var(--sp-7); overflow-y: auto; }
.team-modal h3 { font-size: var(--text-2xl); margin-bottom: var(--sp-1); }
.team-modal .role { color: var(--c-accent-2); font-weight: 600; margin-bottom: var(--sp-4); }
.team-modal blockquote {
  border-left: 3px solid var(--c-accent-2);
  padding-left: var(--sp-4);
  margin: var(--sp-5) 0;
  color: var(--c-text-soft);
  font-style: italic;
  font-family: var(--font-display);
  font-size: var(--text-lg);
}
@media (max-width: 700px) {
  .team-modal { grid-template-columns: 1fr; max-height: 95vh; overflow-y: auto; }
  .team-modal .modal-photo { aspect-ratio: 4/3; }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-7 { margin-bottom: var(--sp-7); }
.flex { display: flex; }
.gap-3 { gap: var(--sp-3); }
.gap-5 { gap: var(--sp-5); }
.flex-wrap { flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Two column generic */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7);
  align-items: center;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  padding-left: 32px; position: relative; margin-bottom: var(--sp-3);
}
.feature-list li::before {
  content: ''; position: absolute; left: 0; top: 0.4em;
  width: 18px; height: 18px;
  background: var(--c-accent-2);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") no-repeat center / contain;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--c-purple-700), var(--c-purple-900));
  color: var(--c-white);
  border-radius: var(--radius-lg);
  padding: var(--sp-8) var(--sp-7);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(26,154,163,0.4), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { color: var(--c-white); margin-bottom: var(--sp-3); }
.cta-band p { opacity: 0.92; max-width: 56ch; margin: 0 auto var(--sp-5); }

/* Reviews/widget */
.reviews-embed { margin-top: var(--sp-6); }

/* ===========================================================
   MOBILE FIXES — added 2026-05-13 by Apex AI Labs
   Fixes for true mobile (≤480px and ≤380px iPhone-class viewports):
   - Prevent horizontal overflow caused by max-width images forcing
     grid columns to min-content width
   - Allow long text (emails, URLs) to wrap
   - Reduce excessive padding/gaps on small screens
   - Ensure touch targets meet 44px minimum where practical
   =========================================================== */

/* Universal mobile safeguards — applied at common phone widths */
@media (max-width: 768px) {
  /* Stop images from forcing parent grid/flex columns wider than viewport.
     !important is required to beat the inline max-width:480px / max-width:320px
     style attributes on program-logo images across the site. */
  img { max-width: 100% !important; height: auto !important; }

  /* Generic two-col grid: ensure 1fr children can actually shrink below content width */
  .two-col { grid-template-columns: 1fr; gap: var(--sp-5); }
  .two-col > * { min-width: 0; }

  /* Hero grid same treatment */
  .hero-grid > * { min-width: 0; }

  /* Allow long emails / URLs / phone strings to break instead of overflowing */
  a[href^="mailto:"],
  a[href^="tel:"],
  .location-card a,
  .location-card p { word-break: break-word; overflow-wrap: anywhere; }

  /* Cards that contain CTA buttons should let them shrink */
  .location-card .btn,
  .home-locations-grid .btn { max-width: 100%; }
}

/* Tighter spacing under 480px (most phones in portrait) */
@media (max-width: 480px) {
  /* Containers — pull padding in so content has more room */
  .container { padding-inline: var(--sp-4); }

  /* Sections — reduce vertical padding so pages feel less empty */
  .section { padding-block: var(--sp-6); }
  .section-tight { padding-block: var(--sp-5); }

  /* Hero — slightly tighter */
  .hero { padding-block: var(--sp-7) var(--sp-6); }
  .hero h1 { font-size: clamp(1.85rem, 7vw, 2.4rem); line-height: 1.15; }
  .hero .lede { font-size: 1rem; }

  /* Typography scale — keep readable but proportional */
  h2 { font-size: clamp(1.5rem, 5.5vw, 1.9rem); }
  h3 { font-size: 1.2rem; }

  /* Touch targets — minimum 44px for buttons */
  .btn { min-height: 44px; padding-block: 0.7rem; }

  /* Affiliation strip — smaller logos, tighter gap */
  .affiliations-row { gap: var(--sp-4); }
  .affiliations-row img { max-height: 44px !important; }

  /* Utility bar — keep phone numbers / hours from overflowing */
  .utility-bar { font-size: 0.78rem; padding-block: 0.4rem; }
  .utility-bar .utility-row { flex-wrap: wrap; gap: 0.35rem 0.75rem; justify-content: center; }

  /* Footer — single column already kicks in at 600px, just tighten padding */
  .footer { padding-block: var(--sp-6) var(--sp-5); }
  .footer-grid { gap: var(--sp-5); }

  /* Nav row */
  .nav-row { padding-block: 0.65rem; }

  /* Forms / iframes — never wider than parent */
  iframe { max-width: 100%; }

  /* Card grids that use minmax(240px,1fr) — force single column */
  .home-locations-grid,
  .team-grid,
  .team-grid-centered { grid-template-columns: 1fr !important; gap: var(--sp-5) !important; }

  /* Tab buttons on schedule page often have inline styles — give them wrap */
  .schedule-tabs,
  .tab-buttons,
  [role="tablist"] { flex-wrap: wrap; gap: 0.5rem; }

  /* CTA band — less aggressive padding */
  .cta-band { padding: var(--sp-6) var(--sp-4); }
}

/* Extra-narrow phones (≤380px — iPhone SE / iPhone Mini) */
@media (max-width: 380px) {
  .container { padding-inline: var(--sp-3); }
  .hero h1 { font-size: 1.6rem; }
  .affiliations-row { gap: var(--sp-3); }
  .affiliations-row img { max-height: 38px !important; }
  .btn { font-size: 0.95rem; padding-inline: var(--sp-4); }
  .cta-band { padding: var(--sp-5) var(--sp-3); }
}


/* BIO_MODAL_FIX: unify modal scroll + improve layout */
.modal, .bio-modal { overscroll-behavior: contain; }
.modal .modal-content, .bio-modal .modal-content {
  max-height: min(80vh, 720px);
  overflow: auto;
}
.modal .modal-grid, .bio-modal .modal-grid { display: block !important; }
.modal .modal-grid > * , .bio-modal .modal-grid > * { width: 100% !important; }
.modal img, .bio-modal img { max-width: 100%; height: auto; }

/* DROPDOWN_STABILITY_FIX: reduce flicker */
.nav li { position: relative; }
.nav li .dropdown, .nav li .submenu { pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .15s var(--ease), transform .15s var(--ease); }
.nav li:hover .dropdown, .nav li:focus-within .dropdown,
.nav li:hover .submenu, .nav li:focus-within .submenu { pointer-events: auto; opacity: 1; transform: translateY(0); }

/* SKIP_LINK_STYLES */
.skip-link{position:absolute;left:-999px;top:10px;background:#fff;color:#000;padding:10px 14px;border-radius:8px;z-index:9999;box-shadow:0 6px 20px rgba(0,0,0,.2);} 
.skip-link:focus{left:10px;}
