/* =========================================================
   Complete Smile Care — homepage styles
   ========================================================= */

:root {
  /* ===== Brand palette (from Complete Smile Care brand sheet) ===== */
  /* Purples */
  --purple-deep:   #4f3075;   /* Dark purple — primary brand */
  --purple:        #9e57a2;   /* Light purple — secondary brand */
  --purple-soft:   #c89dcc;   /* derived tint for outlines / focus rings */
  --plum:          #2a1c3f;   /* derived deep tone for body headings */
  --plum-soft:     #5a4576;   /* derived mid-tone for body text */
  --lavender:      #ede0ef;   /* derived very-pale tint for page bg */
  --lavender-soft: #f6ecf6;   /* derived softer tint */

  /* Greens */
  --green:         #8ebd3e;   /* Primary brand green */
  --green-bright:  #abcb37;   /* Light brand green — punchy accent */
  --green-leaf:    #62bb46;   /* Dark brand green — vivid accent */
  --green-soft:    #c5db8e;   /* derived lighter for hover states */
  --green-deep:    #5e7e29;   /* derived darker for accessible text */

  /* Neutrals */
  --cream:         #fbf6fa;
  --white:         #ffffff;

  --shadow-sm:     0 6px 18px rgba(79, 48, 117, 0.10);
  --shadow-md:     0 14px 38px rgba(79, 48, 117, 0.18);

  /* Shared width: header purple stripe + hero copy panel (edge sits between HOME and SERVICES) */
  --hero-stripe-width: clamp(320px, 28vw, 440px);

  /* spacing rhythm (shared polish) */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Type — Calisto MT (brand) with Lora as the closest free web fallback;
     Money Penny (brand) with Allura as the closest free script fallback. */
  --font-serif: "Calisto MT", "Lora", Georgia, "Times New Roman", serif;
  --font-sans:  "Source Sans 3", system-ui, -apple-system, sans-serif;
  --font-script: "Money Penny", "Allura", "Dancing Script", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--plum-soft);
  background: var(--lavender);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.container.container--wide {
  max-width: 1320px;
}

.accent-green       { color: var(--green-deep); font-style: italic; font-family: var(--font-script); font-weight: 700; }
.accent-green-text  { color: var(--green-deep); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:focus-visible {
  outline: 2px solid var(--purple-soft);
  outline-offset: 3px;
}

.btn-primary { background: var(--purple); color: #fff; padding: 12px 22px; font-weight: 700; }
.btn-primary:hover { background: var(--purple-deep); }

.btn-green { background: var(--green); color: var(--plum); }
.btn-green:hover { background: var(--green-soft); }

.btn-outline-purple { background: rgba(255,255,255,.65); color: var(--purple-deep); border-color: var(--purple-soft); }
.btn-outline-purple:hover { background: #fff; }


/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 0;
  background: transparent;
}
.header-top {
  padding: 82px 0 0;
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(14px, 2.2vw, 32px);
}
/* Edge-to-edge header content (only side padding from .container) */
.site-header .header-inner {
  max-width: none;
  width: 100%;
}

/* CTAs stacked on the right: Call Us Now → phone → Patient forms */
.header-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 1vw + 1rem, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(15, 6, 30, 0.55), 0 1px 3px rgba(15, 6, 30, 0.45);
  white-space: nowrap;
  margin: 0;
}
.header-phone:hover,
.header-phone:focus-visible {
  color: var(--green-bright);
}
.header-phone:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 4px;
  border-radius: 4px;
}
.site-header .header-actions .btn {
  text-shadow: none;
  white-space: nowrap;
  flex: 0 1 auto;
}
.site-header .header-actions .btn-green {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.site-header .header-actions .btn-outline-purple {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--purple-deep);
}
.site-header .header-actions .btn-outline-purple:hover {
  background: #fff;
}
.cta-now {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.site-header .brand:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 4px;
}
.brand-logo {
  display: block;
  height: 140px;
  width: auto;
  max-width: min(560px, 52vw);
  /* Keeps PNG transparency; improves contrast on busy hero imagery */
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.28));
}
/* Dark shadow only — the mark is white, so a white outline would blur it */
.site-header .brand-logo {
  filter:
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45))
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
.brand-logo-footer {
  display: block;
  height: 112px;
  width: auto;
  max-width: min(400px, 85vw);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.38));
}

.nav-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 0;
  background: linear-gradient(90deg, rgba(79, 48, 117, 0.58), rgba(90, 69, 118, 0.52));
  border-bottom: 3px solid var(--green-bright);
  backdrop-filter: blur(10px) saturate(1.12);
  -webkit-backdrop-filter: blur(10px) saturate(1.12);
  box-shadow: 0 10px 28px rgba(42, 28, 63, 0.24);
  transform: translateY(0);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

.nav-ribbon.is-hidden {
  transform: translateY(-100%);
}

.nav-ribbon.is-solid {
  background: linear-gradient(90deg, rgba(79, 48, 117, 0.72), rgba(42, 28, 63, 0.66));
  box-shadow: 0 12px 32px rgba(42, 28, 63, 0.34);
}

.nav-ribbon-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.8vw, 14px);
  min-height: 58px;
  max-width: none;
  width: 100%;
  padding: 8px clamp(18px, 4vw, 52px);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-ribbon-inner::-webkit-scrollbar {
  display: none;
}

.nav-ribbon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px clamp(14px, 1.5vw, 22px);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(42, 28, 63, 0.34);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-ribbon-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--green-bright);
  opacity: 0;
  transform: translateX(-50%) scaleX(0.4);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.nav-ribbon-link:hover,
.nav-ribbon-link:focus-visible {
  background: rgba(251, 246, 250, 0.14);
  color: #fff;
  transform: translateY(-1px);
}

.nav-ribbon-link:hover::after,
.nav-ribbon-link:focus-visible::after,
.nav-ribbon-link.active::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.nav-ribbon-link.active {
  background: rgba(251, 246, 250, 0.94);
  color: var(--purple-deep);
  text-shadow: none;
  box-shadow:
    0 6px 16px rgba(42, 28, 63, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.nav-ribbon-link.active::after {
  background: var(--green-bright);
}

.nav-ribbon-link:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
}

.header-actions .btn {
  padding: 10px 20px;
  font-size: 13px;
  min-height: 42px;
}


/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* White background shows through below the wave overlay into the team section */
  background: var(--white);
  /* Kill sub-pixel gap / hairline between this block and the next section */
  margin-bottom: -1px;
  z-index: 0;
}

/* Two-column hero: solid purple copy panel (left) + changing photos (right).
   Wavy bottom is an SVG overlay (.hero-wave-bottom) so Firefox gets the same curve as Chrome. */
.hero-split {
  position: relative;
  display: grid;
  grid-template-columns: var(--hero-stripe-width) minmax(0, 1fr);
  min-height: 760px;
}

/* White wave mask at the hero foot — same curve as the former clip-path */
.hero-wave-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(60px, 7vw, 104px);
  z-index: 3;
  pointer-events: none;
  line-height: 0;
}
.hero-wave-bottom svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-wave-bottom path {
  fill: var(--white);
}

.hero-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--purple-deep);
  /* Top clears the absolute header (logo + smile-track ribbon); bottom keeps copy above the wave trough */
  padding: 188px 0 104px;
  /* Soft cast onto the photo for a crisp purple → photo seam */
  box-shadow: 18px 0 48px rgba(31, 18, 51, 0.32);
}
/* Soft-blurred flower field — separate layer so headline text stays crisp */
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -24px;
  background-image: url("images/purple-flower-background.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  filter: blur(14px);
  transform: scale(1.08);
  pointer-events: none;
  z-index: 0;
}
/* Darken the blurred flowers so white copy stays readable */
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(42, 18, 72, 0.7), rgba(42, 18, 72, 0.58));
  pointer-events: none;
  z-index: 0;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding-left: clamp(24px, 3vw, 48px);
  padding-right: clamp(16px, 2vw, 28px);
  max-width: 100%;
}

.hero-media {
  position: relative;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  /* Default — per-slide overrides matter more than this fallback */
  background-position: 50% 38%;
  opacity: 0;
  transition: opacity 1.15s ease-in-out;
  will-change: opacity;
}

/* Per-image anchors (cover) — tuned for the tall right-hand photo column */
.hero-slide:nth-child(1) { background-position: 50% 20%; }  /* juliana */
.hero-slide:nth-child(2) { background-position: 50% 30%; }  /* young african-american ladies */
.hero-slide:nth-child(3) { background-position: 52% 26%; }  /* middle-aged couple */
.hero-slide:nth-child(4) { background-position: 50% 28%; }  /* older folks cityscape */
.hero-slide:nth-child(5) { background-position: 50% 22%; }  /* dark hair woman */
.hero-slide:nth-child(6) { background-position: 50% 35%; }  /* she is flying */

.hero-slide.is-active {
  opacity: 1;
}

.hero-slider-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(28px, 5vw, 56px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(42, 28, 63, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(31, 18, 51, 0.22);
}

.hero-slider-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--purple-deep);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hero-slider-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.hero-slider-btn:hover,
.hero-slider-btn:focus-visible {
  background: var(--green);
  color: var(--plum);
}
.hero-slider-btn:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
}
.hero-slider-btn:active {
  transform: scale(0.96);
}

.hero-slider-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-slider-dot {
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hero-slider-dot:hover,
.hero-slider-dot:focus-visible {
  background: rgba(255, 255, 255, 0.85);
}
.hero-slider-dot:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
}
.hero-slider-dot.is-active {
  background: var(--green-bright);
  transform: scale(1.15);
}

.hero-copy h1 {
  position: relative;
  z-index: 5;
  width: auto;
  max-width: 100%;
  white-space: normal;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.55rem, 1.65vw + 1.45rem, 3.65rem);
  line-height: 1.07;
  color: #fff;
  margin: 0 0 22px;
  text-shadow: 0 2px 10px rgba(15, 6, 30, 0.58), 0 1px 3px rgba(15, 6, 30, 0.5);
}
.hero-copy h1 .accent-green { color: var(--green-bright); }
.hero-sub {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(14px, 0.35vw + 13px, 16px);
  max-width: 30ch;
  margin-bottom: 0;
}


/* ============================================
   TEAM SECTION — editorial doctor profile
   ============================================ */
.team-section {
  position: relative;
  z-index: 1;
  /* Solid white at the top (same as hero under the wave), then lavender builds lower */
  background:
    radial-gradient(70% 52% at 78% 96%, rgba(158, 87, 162, .12), transparent 58%),
    linear-gradient(
      180deg,
      var(--white) 0%,
      var(--white) 52%,
      var(--lavender-soft) 100%
    );
  padding: clamp(48px, 7vw, 72px) 0 clamp(72px, 10vw, 112px);
  overflow: visible;
}

/* Pull team / doctors up toward the hero wave */
.team-hero-bridge {
  position: relative;
  z-index: 2;
  margin-top: clamp(-72px, -7vw, -128px);
  padding-top: clamp(8px, 1.5vw, 16px);
}
.team-meet-eyebrow {
  margin-bottom: clamp(14px, 2vw, 22px);
}
.team-meet-heading {
  margin: 0 0 clamp(18px, 2.4vw, 28px);
  font-family: var(--font-serif);
  font-weight: 700;
  /* A little bigger than the original — not oversized */
  font-size: clamp(1.45rem, 1.1vw + 1rem, 1.95rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--plum);
  text-align: center;
}

/* decorative background shapes (subtle, brand colors) */
.team-decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}
.team-decor-green {
  width: 320px; height: 320px;
  left: -140px; top: 140px;
  background: radial-gradient(circle at center, rgba(142, 189, 62, .26), rgba(142, 189, 62, 0) 70%);
}
.team-decor-purple {
  width: 380px; height: 380px;
  right: -170px; bottom: 80px;
  background: radial-gradient(circle at center, rgba(158, 87, 162, .20), rgba(158, 87, 162, 0) 70%);
}

/* ---- small typographic eyebrow (reused) ---- */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0 0 14px;
  position: relative;
  padding-left: 26px;
}
.section-eyebrow::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 18px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transform: translateY(-50%);
}

.display-heading {
  font-family: var(--font-serif);
  color: var(--plum);
  font-weight: 600;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
}

.team-heading {
  font-family: var(--font-serif);
  color: var(--plum);
  font-weight: 500;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
}
.team-heading em {
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 600;
  color: var(--green-deep);
  font-size: 1.15em;
  padding: 0 .05em;
}

.team-heading-below {
  text-align: center;
  max-width: 1280px;
  margin: clamp(22px, 3vw, 36px) auto 0;
  padding: 0;
  box-sizing: border-box;
}
.team-heading-above {
  text-align: center;
  max-width: 1280px;
  margin: 0 auto clamp(22px, 3vw, 34px);
  padding: 0;
  box-sizing: border-box;
}

/* ---- Editorial profile split: photos left, bio panel right ---- */
.team-profile {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 3.5vw, 48px);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
}

/* --- media side — three equal square tiles in one row --- */
.team-profile-media {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.team-media-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto;
  gap: clamp(18px, 2.4vw, 28px);
  min-width: 0;
  align-items: stretch;
}

/* One identical structure per doctor — equal grid columns + min-width fixes intrinsic overflow */
.team-media-mosaic > .team-mosaic-tile {
  margin: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  gap: 0;
}

/* “Since 1999” stamp — floated top-right over hero wave (see .team-stamp-row--floating) */
.team-stamp-row--floating {
  position: absolute;
  right: clamp(0px, 1.5vw, 16px);
  top: clamp(-80px, -6vw, -112px);
  display: flex;
  justify-content: flex-end;
  width: auto;
  margin: 0;
  z-index: 4;
  pointer-events: none;
}

/* Clickable doctor targets (photo “buttons”) */
.team-doc-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
}
.team-doc-trigger:focus-visible {
  outline: 3px solid var(--purple-soft);
  outline-offset: 6px;
}
.team-mosaic-tile .team-doc-trigger {
  display: block;
  width: 100%;
}

/* Identical square crop for every doctor — absolute img so intrinsic file dimensions can’t stretch the layout */
.team-media-mosaic .team-mosaic-photo-wrap {
  position: relative;
  display: block;
  width: 94%;
  max-width: 340px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  box-sizing: border-box;
  box-shadow: none;
  background: transparent;
  transition: transform .35s ease, box-shadow .35s ease;
}

.team-media-mosaic .team-mosaic-photo-wrap img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform .5s ease;
}

/* Hover / focus: lift + shadow (no frame on selected state) */
.team-media-mosaic .team-doc-trigger:hover .team-mosaic-photo-wrap,
.team-media-mosaic .team-doc-trigger:focus-visible .team-mosaic-photo-wrap {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(79, 48, 117, 0.15);
}

.team-media-mosaic .team-doc-trigger:hover .team-mosaic-photo-wrap img,
.team-media-mosaic .team-doc-trigger:focus-visible .team-mosaic-photo-wrap img {
  transform: scale(1.04);
}

.team-mosaic-tile .team-mosaic-caption {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 0.6vw + 1rem, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--plum);
  text-align: center;
  margin: clamp(10px, 1.2vw, 14px) 0 0;
  line-height: 1.2;
}
.team-mosaic-caption em {
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 600;
  color: var(--green-deep);
  font-size: 1.08em;
  padding-left: 0.08em;
}

.team-mosaic-bio {
  margin: clamp(8px, 1vw, 12px) 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--plum-soft);
  text-align: left;
}

.team-mosaic-bio:last-of-type {
  margin-bottom: 16px;
}

/* Desktop: bios live in the right panel; keep under-photo copy for small screens */
@media (min-width: 1025px) {
  .team-mosaic-bio {
    display: none;
  }
  .team-mosaic-tile {
    transition: opacity .25s ease;
  }
  .team-media-mosaic:hover .team-mosaic-tile:not(:hover):not(.is-active),
  .team-media-mosaic:focus-within .team-mosaic-tile:not(:focus-within):not(.is-active) {
    opacity: 0.55;
  }
  .team-mosaic-tile.is-active {
    opacity: 1;
  }
}

.team-mosaic-cta {
  align-self: center;
  margin-top: auto;
  padding: 11px 16px;
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  max-width: 100%;
}

.team-text-number {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: auto;
  width: min(100%, 240px);
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 48, 117, 0.2);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.team-text-number:hover,
.team-text-number:focus-visible {
  background: var(--purple-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(79, 48, 117, 0.28);
}
.team-text-number:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
}
.team-text-kicker {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--green-bright);
}

.text-doc-dialog {
  padding: 0;
  border: none;
  border-radius: 22px;
  background: #fff;
  color: var(--plum);
  box-shadow: 0 40px 100px rgba(42, 28, 63, 0.35);
  /* Square-center in the viewport (native dialog + inset/auto margin) */
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  height: fit-content;
  max-height: min(90vh, 720px);
  overflow: auto;
  transform: none;
}
.text-doc-dialog[open] {
  display: block;
}
.text-doc-dialog::backdrop {
  background: rgba(42, 28, 63, 0.55);
}
.text-doc-form {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 32px);
}
.text-doc-form .text-doc-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.text-doc-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-deep);
}
.text-doc-form h3 {
  margin: 0;
  padding-right: 36px;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--plum);
}
.text-doc-line {
  margin: 0;
  color: var(--plum-soft);
}
.text-doc-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-deep);
}
.text-doc-field input,
.text-doc-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(79, 48, 117, 0.28);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--plum);
  background: #fff;
}
.text-doc-field textarea {
  resize: vertical;
  min-height: 120px;
}
.text-doc-field input:focus-visible,
.text-doc-field textarea:focus-visible {
  outline: 2px solid var(--purple-soft);
  outline-offset: 2px;
}
.text-doc-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}
.text-doc-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--plum);
}
.text-doc-submit {
  justify-self: start;
}
.text-doc-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

.team-stamp-row .team-photo-stamp {
  position: relative;
  left: auto;
  top: auto;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  padding: 14px 10px;
  background: var(--plum);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(42, 28, 63, 0.22);
  font-family: var(--font-sans);
}
.team-photo-stamp .stamp-line {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 1.35px;
  text-transform: uppercase;
  line-height: 1.22;
  color: rgba(255,255,255,.88);
}
.team-photo-stamp .stamp-since {
  font-family: var(--font-script);
  font-size: 15px;
  color: var(--green);
  line-height: 1;
  margin-top: 3px;
}
.team-photo-stamp strong {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  letter-spacing: .02em;
}

/* --- copy side (hover bio panel) --- */
.team-profile-copy {
  position: sticky;
  top: clamp(96px, 12vh, 140px);
  max-width: none;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: clamp(14px, 2vw, 18px) clamp(16px, 2.2vw, 22px) clamp(14px, 2vw, 18px);
  box-shadow:
    inset 0 0 0 1px rgba(74, 144, 226, 0.28),
    0 18px 44px rgba(79, 48, 117, 0.1);
  transition: box-shadow 0.35s ease;
}
.team-doc-panel {
  max-height: 11.5rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--purple-soft) rgba(79, 48, 117, 0.08);
}
.team-doc-panel::-webkit-scrollbar {
  width: 8px;
}
.team-doc-panel::-webkit-scrollbar-thumb {
  background: var(--purple-soft);
  border-radius: 999px;
}
.team-doc-panel.is-preview {
  box-shadow: none;
}
.team-profile-copy:has(.team-doc-panel.is-preview) {
  box-shadow:
    inset 0 0 0 1px rgba(142, 189, 62, 0.45),
    0 22px 50px rgba(79, 48, 117, 0.12);
}
.team-credentials-list:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
}
.team-panel-hint {
  font-family: var(--font-sans);
  font-size: clamp(15px, 0.35vw + 14px, 17px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--purple-deep);
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px dashed rgba(79, 48, 117, 0.22);
}
.team-doc-panel .team-name {
  margin-bottom: 10px;
}
.team-doc-panel .team-lede {
  margin-bottom: 10px;
}
.team-doc-panel .team-body {
  margin-bottom: 0;
}

.team-name {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.5vw + .8rem, 1.875rem);
  font-weight: 600;
  color: var(--plum);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
}
.team-name em {
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 600;
  color: var(--green-deep);
  font-size: 1.1em;
  padding-left: .1em;
}

.team-lede {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, .6vw + .95rem, 1.2rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--plum);
  margin: 0 0 var(--space-5);
}
.team-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--plum-soft);
  margin: 0 0 var(--space-6);
}

/* typographic credentials — replaces the badge cluster */
.team-credentials-list {
  display: grid;
  gap: 14px;
  margin: 0 0 var(--space-6);
  padding: 22px 0;
  border-top: 1px solid rgba(79, 48, 117, .14);
  border-bottom: 1px solid rgba(79, 48, 117, .14);
}
.team-credentials-list .tc-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  align-items: baseline;
}
.team-credentials-list dt {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0;
}
.team-credentials-list dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--plum);
  font-weight: 500;
}

/* CTA */
.team-profile-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  min-height: 44px;
}
.team-profile-cta:focus-visible {
  outline: 2px solid var(--purple-soft);
  outline-offset: 3px;
}
.team-profile-cta span {
  display: inline-block;
  transition: transform .3s ease;
}
.team-profile-cta:hover span {
  transform: translateX(4px);
}

/* ---- Shared panel photo ---- */
.team-panel-photo {
  display: block;
  width: clamp(84px, 9vw, 104px);
  height: clamp(84px, 9vw, 104px);
  margin: 0 0 var(--space-4);
  border-radius: 14px;
  background-color: var(--green-mist, #eef4e2);
  background-size: cover;
  background-position: center top;
  box-shadow:
    inset 0 0 0 1px rgba(142, 189, 62, 0.45),
    0 10px 24px rgba(79, 48, 117, 0.12);
}
.team-panel-photo.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--green-deep);
  background-color: #eef4e2;
}

/* ---- What to expect (promise row) ---- */
.team-promise-wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: clamp(48px, 6vw, 72px) auto 0;
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid rgba(79, 48, 117, .12);
}
.team-promise-section-title {
  margin-bottom: clamp(28px, 3.5vw, 42px);
}
.team-promise-heading {
  margin: 0 auto clamp(20px, 2.5vw, 28px);
  text-align: center;
  line-height: 1.05;
  font-weight: 400;
}
.team-promise-heading-kicker {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 4px;
}
.team-promise-heading-accent {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2.75rem, 4.5vw + 1.2rem, 4rem);
  font-weight: 600;
  font-style: normal;
  color: var(--green-deep);
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.team-promise {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 28px);
  counter-reset: promise;
}

/* Doctor detail dialog — only rendered when [open]; native <dialog> stays display:none otherwise. */
.team-doc-dialog {
  padding: 0;
  border: none;
  border-radius: 22px;
  background: #fff;
  color: var(--plum-soft);
  box-shadow: 0 40px 100px rgba(42, 28, 63, 0.35);
  overflow: hidden;
  margin: 0;
  width: min(920px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  max-height: min(92vh, 900px);
  height: fit-content;
  z-index: 2147483646;
  isolation: isolate;
}
.team-doc-dialog[open] {
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.team-doc-dialog::backdrop {
  background: rgba(42, 28, 63, 0.55);
  backdrop-filter: blur(4px);
}
.team-doc-dialog-inner {
  position: relative;
  padding: clamp(22px, 3vw, 34px);
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-height: inherit;
}
.team-doc-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--plum);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(79, 48, 117, 0.15);
}
.team-doc-dialog-close:hover {
  background: #fff;
}
.team-doc-dialog-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.95fr) 1.15fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
  padding-right: 36px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.team-doc-dialog-photo {
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(79, 48, 117, 0.2);
  aspect-ratio: 1 / 1;
  max-height: min(380px, 48vh);
  max-width: 100%;
}
.team-doc-dialog-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.team-doc-dialog-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: calc(92vh - 110px);
  overflow: hidden;
}

.team-doc-dialog-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem);
  font-weight: 600;
  color: var(--plum);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  padding-right: 40px;
  flex-shrink: 0;
}
.team-doc-dialog-body {
  font-size: 15px;
  line-height: 1.7;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;
  margin-right: -4px;
  scrollbar-gutter: stable;
}
.team-doc-dialog-body p {
  margin: 0 0 14px;
}
.team-doc-dialog-subhead {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 22px 0 10px;
}
.team-doc-dialog-list {
  margin: 0 0 12px;
  padding-left: 1.15rem;
  color: var(--plum);
}
.team-doc-dialog-list li {
  margin-bottom: 6px;
}
.team-doc-dialog-note {
  font-size: 13px;
  color: var(--plum-soft);
  font-style: italic;
  margin-top: 16px;
}

.team-promise li {
  position: relative;
  padding-top: 0;
}
.promise-number {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.25rem, 2.5vw + 1.25rem, 2.75rem);
  line-height: 1;
  color: var(--purple-soft);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.team-promise h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 0.8vw + 1.05rem, 1.5rem);
  font-weight: 600;
  color: var(--plum);
  line-height: 1.22;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.team-promise p {
  font-size: clamp(15px, 0.35vw + 14px, 17px);
  line-height: 1.62;
  color: var(--plum-soft);
  margin: 0;
  max-width: 36ch;
}


/* ============================================
   SERVICES
   ============================================ */
.services-section {
  background: #fff;
  padding: 30px 0 110px;
}
.section-title {
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 38px;
  color: var(--plum);
  margin: 0 0 50px;
  position: relative;
}
.section-title::before, .section-title::after {
  content: "";
  display: inline-block;
  width: 28px; height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 18'><path d='M2 9 C 6 2, 12 2, 16 9 C 20 16, 26 16, 30 9' fill='none' stroke='%23a5c879' stroke-width='2' stroke-linecap='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
  margin: 0 14px;
  opacity: .8;
}
/* Green script titles (What to Expect, Our Services) — size kept, font/color restored */
.section-title--script {
  font-family: var(--font-script);
  font-weight: 600;
  font-style: normal;
  color: var(--green-deep);
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.section-title--script::before,
.section-title--script::after {
  display: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.service-card {
  position: relative;
  padding: 34px 28px 42px;
  text-align: center;
  border-radius: 28px;
  min-height: 320px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
}
.service-card > * { position: relative; z-index: 2; }

/* Rounded service photos (experimenting with client-provided images) */
.service-media {
  width: min(100%, 220px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 22px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(42, 28, 63, 0.14);
  background: rgba(255, 255, 255, 0.55);
}
.service-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.service-media--logo {
  background: #fff;
  padding: 18px;
  box-sizing: border-box;
}
.service-media--logo img {
  object-fit: contain;
}

/* the tinted main card body */
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
.service-green::after {
  background: linear-gradient(165deg, #f0f6dd 0%, #e0eebb 55%, #d0e69e 100%);
}
.service-purple::after {
  background: linear-gradient(165deg, #f1e4f3 0%, #e3cee9 55%, #d1b4dc 100%);
}

/* in-card color accent — stays inside bounds, no bleed into neighbors */
.service-shape {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: 8px;
  border-radius: 0 0 28px 28px;
}
.service-green .service-shape {
  background: linear-gradient(90deg, var(--green-bright) 0%, var(--green) 100%);
}
.service-purple .service-shape {
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-deep) 100%);
}

.service-card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--plum);
  font-size: 22px;
  margin: 0 0 12px;
}
.service-card p {
  font-size: 13.5px;
  color: var(--plum-soft);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 230px;
}


/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-section {
  background: var(--lavender);
  padding: 80px 0 70px;
}
.testimonials-section .section-title {
  color: var(--plum);
  margin-bottom: 54px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 10px;
}

.testimonial-card {
  position: relative;
  background: #fff;
  box-shadow: 0 18px 40px rgba(79, 48, 117, .12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  min-height: 300px;
}

/* text cards (positions 1, 3, 5) */
.testimonial-text {
  padding: 42px 28px 36px;
}

.testimonial-center {
  padding: 42px 28px 36px;
}

/* photo cards (positions 2 and 4) */
.testimonial-portrait {
  padding: 0;
  min-height: 300px;
}
.t-portrait-big {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}
.t-portrait-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

blockquote {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--plum-soft);
  font-style: italic;
  max-width: 30ch;
}
.testimonial-center blockquote {
  font-size: 15.5px;
  max-width: 32ch;
}
cite {
  font-size: 13px;
  color: var(--plum);
  font-weight: 600;
  font-style: normal;
}

.pagination-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 38px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(79, 48, 117, .30);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all .2s ease;
}
.dot.active { background: var(--purple); width: 22px; border-radius: 999px; }


/* ============================================
   HOURS / LOCATION
   ============================================ */
.hours-section {
  background: #fff;
  padding: 30px 0 100px;
}
.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hours-map {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #fff;
  aspect-ratio: 4/3;
  max-width: 460px;
}
.map-svg { width: 100%; height: 100%; display: block; }

.hours-info .display-heading { font-size: 36px; margin-bottom: 18px; }
.info-eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--plum);
  margin: 6px 0 10px;
}
.hours-table {
  width: 100%;
  max-width: 360px;
  border-collapse: collapse;
  margin-bottom: 22px;
}
.hours-table td {
  padding: 6px 0;
  font-size: 14px;
  color: var(--plum-soft);
  border-bottom: 1px dashed rgba(79, 48, 117, .22);
}
.hours-table td:first-child { color: var(--plum); font-weight: 600; }
.hours-table td:last-child { text-align: right; }

.contact-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: var(--plum);
  font-size: 14px;
}
.contact-line.contact-address { align-items: flex-start; }
.contact-line a { color: var(--plum); font-weight: 600; }
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(158, 87, 162, .18);
}


/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  position: relative;
  background: var(--purple-deep);
  color: rgba(255,255,255,.92);
  padding: 0;
  margin-top: 0;
  isolation: isolate;
}
/* Single wave graphic at the top — bottom of image matches footer plum so it merges with no seam */
.footer-wave-art {
  display: block;
  width: 100%;
  height: 280px;
  margin: 0 0 -1px;
  pointer-events: none;
}
.footer-wave-bottom {
  position: relative;
  height: 50px;
  margin-top: 24px;
  pointer-events: none;
}
.footer-wave-bottom svg { width: 100%; height: 50px; display: block; }

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-top: 30px;
  margin-top: 0;
  position: relative;
  z-index: 1;
  align-items: start;
}
.footer-col h5 {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .12em;
  color: #fff;
  margin: 0 0 12px;
}
.footer-blurb {
  font-size: 13px;
  color: rgba(255,255,255,.78);
  margin: 14px 0 0;
  max-width: 240px;
}
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a {
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(255,255,255,.85);
  font-weight: 600;
}
.footer-nav a:hover { color: #fff; }

.footer-contact p { margin: 4px 0; font-size: 13px; color: rgba(255,255,255,.85); }
.footer-contact a { color: rgba(255,255,255,.95); text-decoration: underline; text-underline-offset: 2px; }
.footer-contact a:hover { color: #fff; }

.social-row { display: flex; gap: 10px; margin-bottom: 18px; }
.social-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.social-icon:hover { background: rgba(255,255,255,.35); }

.footer-cta {
  background: #fff;
  color: var(--purple-deep);
  font-size: 12px;
  letter-spacing: .12em;
  padding: 10px 18px;
}
.footer-cta:hover { background: var(--green); color: var(--plum); }

.footer-mid-nav {
  display: none; /* duplicate nav – hidden, kept semantically minimal */
}

.footer-copy {
  text-align: center;
  font-size: 12px;
  color: var(--plum);
  padding: 14px 0 18px;
  background: var(--green);
  margin-top: 0;
}


/* ============================================
   RESPONSIVE
   ============================================ */

/* Header CTAs: compact row + slightly smaller logo before nav crowds */
@media (max-width: 1260px) {
  :root { --hero-stripe-width: clamp(300px, 30vw, 410px); }
  .header-inner { gap: clamp(14px, 2.2vw, 24px); }
  .nav-ribbon-link {
    padding-inline: clamp(12px, 1.25vw, 18px);
    font-size: 11px;
  }
  .site-header .brand-logo {
    height: clamp(88px, 11vw, 120px);
    max-width: min(400px, 44vw);
  }
  .site-header .header-actions { gap: 7px; }
  .header-phone {
    font-size: clamp(1.2rem, 1.2vw + 0.9rem, 1.6rem);
  }
  .site-header .header-actions .btn {
    padding: 9px 16px;
    font-size: 12px;
    min-height: 40px;
  }
}

@media (max-width: 1080px) {
  .site-header .header-actions {
    align-self: flex-start;
  }
  .site-header .header-actions .btn {
    width: auto;
    max-width: 100%;
  }
}

/* Tablet: stack header top and keep the ribbon centered */
@media (max-width: 900px) {
  .site-header .brand-logo {
    height: clamp(72px, 12vw, 96px);
    max-width: min(280px, 52vw);
  }
  .header-inner {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
  .brand {
    justify-content: center;
    width: 100%;
  }
  .nav-ribbon-inner {
    justify-content: flex-start;
    padding-inline: clamp(12px, 4vw, 24px);
  }
  .site-header .header-actions {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
  }
}

@media (max-width: 1024px) {
  :root { --hero-stripe-width: clamp(260px, 30vw, 360px); }
  .hero-split {
    min-height: 640px;
  }
  .hero-panel { padding: 150px 0 92px; }

  .team-profile {
    grid-template-columns: 1fr;
    gap: clamp(28px, 5vw, 40px);
    max-width: min(760px, 100%);
  }
  .team-profile-media {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
  }
  .team-media-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 18px);
  }
  /* Stacked layout: bios stay under each photo; hide the hover panel */
  .team-profile-copy {
    display: none;
  }
  .team-credentials-list .tc-row {
    grid-template-columns: 110px 1fr;
    gap: 16px;
  }

  /* Laptop-height viewports: tighten doctor mosaic spacing */
  @media (max-height: 920px) {
    .team-mosaic-caption {
      margin-top: 6px;
    }
    .team-media-mosaic {
      gap: clamp(12px, 1.8vw, 20px);
    }
  }

  .hours-grid { grid-template-columns: 1fr; gap: 30px; }
  .hours-map { max-width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Stack the split hero: purple copy panel on top, changing photos below */
@media (max-width: 860px) {
  :root { --hero-stripe-width: 100%; }
  /* The overlay header wraps tall on small screens, so drop it into normal flow
     with the brand purple — it merges seamlessly into the copy panel below
     (logo + nav + CTAs sit inside the purple block, like the reference site). */
  .site-header {
    position: relative;
    background: var(--purple-deep);
    /* Overlap the hero by a hair so no lavender seam shows between the two purples */
    margin-bottom: -1px;
  }
  .hero-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-panel {
    padding: 28px 0 46px;
    box-shadow: none;
  }
  /* Stacked: no side seam to bleed across — let the headline wrap normally */
  .hero-copy h1 {
    white-space: normal;
    width: auto;
    max-width: 100%;
  }
  .hero-media {
    min-height: clamp(300px, 56vw, 440px);
  }
  .hero-slider-controls {
    bottom: clamp(18px, 4vw, 28px);
    gap: 10px;
    padding: 6px 8px;
  }
  .hero-slider-btn {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 720px) {
  .brand-logo { height: 72px; max-width: min(320px, 62vw); }
  .brand-logo-footer { height: 72px; max-width: min(280px, 88vw); }
  .header-inner { row-gap: 14px; }
  .header-top { padding-top: 74px; }
  .nav-ribbon-inner {
    min-height: 54px;
    gap: 2px;
    padding-block: 7px;
  }
  .nav-ribbon-link {
    padding: 9px 10px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .site-header .header-actions {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }
  .header-phone {
    width: auto;
    justify-content: center;
    font-size: clamp(1.35rem, 4vw + 0.6rem, 1.75rem);
    margin: 0;
  }
  .site-header .header-actions .btn {
    padding: 9px 14px;
    font-size: 12px;
    min-height: 40px;
    width: min(100%, 280px);
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .hero-panel { padding: 22px 0 38px; }
  .hero-media { min-height: clamp(280px, 62vw, 380px); }

  .team-hero-bridge { margin-top: clamp(-48px, -10vw, -72px); }
  .team-heading { font-size: clamp(1.75rem, 6vw + 1rem, 2.25rem); }
  .team-doc-dialog-grid {
    grid-template-columns: 1fr;
    padding-right: 0;
  }
  .team-doc-dialog-copy {
    max-height: calc(92vh - 280px);
  }
  .team-doc-dialog-photo {
    max-height: 340px;
    margin: 0 auto;
    width: min(100%, 320px);
  }
  .team-doc-dialog-title { padding-right: 48px; }
  .team-media-mosaic {
    grid-template-columns: 1fr;
    max-width: min(100%, 520px);
    margin-left: auto;
    margin-right: auto;
    gap: clamp(18px, 4vw, 26px);
  }
  .team-stamp-row--floating {
    top: clamp(-56px, -10vw, -72px);
    right: 2px;
  }
  .team-stamp-row .team-photo-stamp {
    width: 118px;
    height: 118px;
  }
  .team-stamp-row .team-photo-stamp strong { font-size: 19px; }
  .team-stamp-row .team-photo-stamp .stamp-line { font-size: 7.5px; letter-spacing: 1.1px; }
  .team-credentials-list .tc-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .team-credentials-list dt { margin-bottom: 2px; }

  .team-promise { grid-template-columns: 1fr; gap: 22px; }
  .team-promise-heading-accent { font-size: clamp(2.5rem, 9vw + 1rem, 3.25rem); }

  .services-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; gap: 22px; }
  .testimonial-portrait { min-height: 280px; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .section-title { font-size: 28px; }
}

/* Stacked hero: photo column becomes a wide, short strip — keep faces centered */
@media (max-width: 860px) {
  .hero-slide:nth-child(1) { background-position: 50% 22%; }  /* juliana */
  .hero-slide:nth-child(2) { background-position: 50% 32%; }
  .hero-slide:nth-child(3) { background-position: 52% 30%; }
  .hero-slide:nth-child(4) { background-position: 50% 30%; }
  .hero-slide:nth-child(5) { background-position: 50% 24%; }  /* dark hair woman */
  .hero-slide:nth-child(6) { background-position: 50% 38%; }  /* she is flying */
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--purple-deep);
  color: #fff;
  box-shadow: 0 10px 28px rgba(42, 28, 63, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--green);
  color: var(--plum);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
}
.back-to-top svg {
  width: 22px;
  height: 22px;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slide {
    transition: none !important;
  }
  .team-media-mosaic .team-mosaic-photo-wrap,
  .team-media-mosaic .team-mosaic-photo-wrap img,
  .btn,
  .nav-ribbon-link,
  .team-profile-cta span,
  .team-profile-copy,
  .team-text-number,
  .back-to-top {
    transition: none !important;
  }
  .team-media-mosaic .team-doc-trigger:hover .team-mosaic-photo-wrap,
  .team-media-mosaic .team-doc-trigger:focus-visible .team-mosaic-photo-wrap,
  .team-media-mosaic .team-doc-trigger:hover .team-mosaic-photo-wrap img,
  .team-media-mosaic .team-doc-trigger:focus-visible .team-mosaic-photo-wrap img,
  .btn:hover,
  .nav-ribbon-link:hover,
  .nav-ribbon-link:focus-visible,
  .team-profile-cta:hover span,
  .team-text-number:hover,
  .team-text-number:focus-visible,
  .back-to-top.is-visible {
    transform: none;
  }
}
