/* Dr. Thomas A. Leech, DDS — full redesign (single page)
   Editorial hierarchy inspired by premium dental sites: serif display + crisp sans UI */

:root {
  --ink: #000000;
  --ink-soft: #000000;
  --muted: #000000;
  --mist: #eef2f8;
  --paper: #fbfaf7;
  --cream: #f6f1ea;
  --line: rgba(20, 28, 41, 0.12);
  --gold: #b8944a;
  --navy: #1a3a5c;
  --accent: #2f6fb6;

  --font-ui: "Inter", system-ui, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;

  --shell: min(1180px, 92vw);
  --pad-y: clamp(2.45rem, 4.6vw, 3.7rem);
  --radius-lg: 26px;
  --radius-md: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --surface-premium: #ffffff;
}

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

html {
  scroll-behavior: smooth;
  font-size: 110%;
}

section[id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink-soft);
  background: var(--surface-premium);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#main {
  position: relative;
  z-index: 1;
}

/* Subtle premium motion */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 9999;
}

/* ——— Masthead ——— */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.55rem, 1.5vw, 1.15rem);
  min-height: 76px;
  position: relative;
}

/* Hamburger control: hidden on desktop; shown only in mobile breakpoint block below */
.masthead__menu-toggle {
  display: none;
  transition: transform 0.18s var(--ease-out), box-shadow 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

.masthead__menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.masthead__menu-toggle:hover {
  border-color: rgba(47, 111, 182, 0.3);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.masthead__menu-toggle:active {
  transform: scale(0.97);
}

.masthead__menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 14px;
}

.masthead__menu-line {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--ink-soft);
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.masthead--nav-open .masthead__menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.masthead--nav-open .masthead__menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.masthead--nav-open .masthead__menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 761px) {
  .masthead__menu-toggle {
    display: none !important;
  }

  .masthead__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  /* Desktop: name left, centered logo, nav right */
  .masthead__brand {
    align-items: center;
    min-height: 40px;
    padding-right: 56px;
  }

  .masthead__brand-text {
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.03em;
  }

  .masthead__logo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    z-index: 3;
  }

  .masthead__nav {
    position: static;
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    max-height: none;
    padding: 0;
    margin: 0;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    grid-column: auto;
    grid-row: auto;
    align-self: center;
    justify-self: auto;
    z-index: auto;
  }

  .masthead__nav a {
    font-size: 0.94rem;
    padding: 0;
    text-align: inherit;
  }

  .masthead__nav a:hover {
    background: transparent;
  }

  .masthead__nav a::after {
    display: block;
  }
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.01em;
  min-width: 0;
  transition: color 0.2s var(--ease-out);
}

.masthead__brand:hover {
  color: var(--navy);
}

.masthead__logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(20, 28, 41, 0.08);
  object-fit: contain;
  transition: box-shadow 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

.masthead__brand:hover .masthead__logo {
  border-color: rgba(47, 111, 182, 0.35);
  box-shadow: 0 4px 14px rgba(47, 111, 182, 0.12);
}

.masthead__brand-text {
  font-size: 0.95rem;
  white-space: nowrap;
}

.masthead__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(0.6rem, 1.4vw, 1.05rem);
}

.masthead__nav a {
  position: relative;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.masthead__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(47, 111, 182, 0.85), rgba(184, 148, 74, 0.85));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.masthead__nav a:hover {
  color: var(--navy);
}

.masthead__nav a:hover::after {
  transform: scaleX(1);
}

/* ——— Hero ——— */
.hero-pro {
  background:
    radial-gradient(1200px 520px at 18% 18%, rgba(47, 111, 182, 0.06), transparent 58%),
    radial-gradient(900px 440px at 88% 38%, rgba(184, 148, 74, 0.05), transparent 52%),
    linear-gradient(180deg, rgba(253, 252, 250, 0.62) 0%, rgba(237, 241, 247, 0.72) 100%);
  padding: clamp(2rem, 4.5vw, 2.75rem) 0 clamp(1.65rem, 3.25vw, 2.5rem);
}

.hero-pro__layout {
  display: block;
}

.hero-pro__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  min-width: 0;
}

.hero-pro__eyebrow {
  margin: 0 0 clamp(0.85rem, 2.2vw, 1.25rem);
  font-family: var(--font-ui);
  font-size: clamp(0.5rem, 0.32rem + 1.05vw, 1rem);
  font-weight: 700;
  letter-spacing: clamp(0.055em, 0.04em + 0.35vw, 0.18em);
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  max-width: 100%;
}

@media (max-width: 980px) {
  .hero-pro__eyebrow {
    white-space: normal;
    font-size: clamp(0.58rem, 0.28rem + 2.35vw, 0.9rem);
    letter-spacing: clamp(0.05em, 0.04em + 0.2vw, 0.14em);
    line-height: 1.45;
    padding-inline: 2px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

.hero-pro__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.75rem, 5.6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: min(36ch, 100%);
  margin-inline: auto;
  text-align: center;
}

.hero-pro__title--singleline {
  font-size: clamp(1.95rem, 3.2vw, 2.7rem);
  white-space: normal;
}

.hero-pro__lede {
  margin: 1.25rem 0 0;
  max-width: min(44ch, 100%);
  margin-inline: auto;
  font-size: 1.08rem;
  color: var(--muted);
  text-align: center;
}

.hero-pro__actions {
  margin-top: clamp(1.35rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.hero-pro__media {
  margin: 0 0 clamp(1rem, 2.4vw, 1.5rem);
  width: 100%;
  max-width: 100%;
}

.hero-pro__frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(20, 28, 41, 0.1);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
  background: #dfe7f2;
  transition: box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.hero-pro__media:hover .hero-pro__frame {
  border-color: rgba(47, 111, 182, 0.22);
  box-shadow:
    0 32px 76px rgba(15, 23, 42, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 0 0 1px rgba(47, 111, 182, 0.06);
}

.hero-pro__frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* Buttons */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.pill--solid {
  background: linear-gradient(180deg, #112852, #0b1a3d);
  color: #fff;
  border: 1px solid rgba(17, 40, 82, 0.92);
  box-shadow: 0 14px 34px rgba(11, 26, 61, 0.28);
}

.pill--solid:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(11, 26, 61, 0.36);
}

.pill--line {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(26, 58, 92, 0.22);
  color: var(--navy);
}

.pill--line:hover {
  border-color: rgba(26, 58, 92, 0.42);
}

.pill--line-dark {
  background: rgba(255, 255, 255, 0.92);
}

/* ——— Bands ——— */
.band {
  padding: var(--pad-y) 0;
}

.band--paper {
  background: var(--surface-premium);
  border-top: 1px solid var(--line);
}

.band--mist {
  background: var(--surface-premium);
  border-top: 1px solid var(--line);
}

.band--ink {
  background:
    radial-gradient(900px 520px at 30% 12%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #121a2b 0%, #0f1626 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

.band--contact {
  background: var(--surface-premium);
  border-top: 1px solid var(--line);
}

/* Tighter gap between hero and first content band */
#services {
  padding-top: clamp(1.65rem, 3vw, 2.5rem);
}

#services .section-intro {
  margin-bottom: clamp(1.35rem, 2.5vw, 1.85rem);
}

.section-intro {
  margin-bottom: clamp(1.8rem, 3vw, 2.45rem);
}

#contact .section-intro {
  margin-bottom: clamp(1.95rem, 3.2vw, 2.6rem);
}

#team .section-intro {
  margin-bottom: clamp(1.85rem, 3vw, 2.5rem);
}

.section-intro--center {
  text-align: center;
}

.section-intro--center .section-kicker {
  max-width: min(46rem, 94vw);
  margin-inline: auto;
}

.section-intro--center .section-heading {
  max-width: min(38rem, 94vw);
  margin-inline: auto;
}

.section-intro--on-dark {
  margin-bottom: clamp(1.8rem, 2.9vw, 2.35rem);
}

.section-kicker {
  margin: 0 0 0.22rem;
  font-size: clamp(0.78rem, 1.08vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-kicker--on-dark {
  color: #fff;
}

.section-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.35rem, 4.4vw, 3.6rem);
  line-height: 1.13;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-intro .section-heading {
  margin-top: clamp(0.18rem, 0.6vw, 0.35rem);
}

.section-heading--singleline {
  font-size: clamp(2.05rem, 3.6vw, 3rem);
}

.section-heading--on-dark {
  color: rgba(224, 196, 130, 0.96);
}

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.25rem);
  align-items: stretch;
}

.svc-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  padding: clamp(1.35rem, 2.4vw, 1.75rem);
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 28, 41, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.06);
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.svc-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
}

/* Services on dark band: same card treatment as patient reviews */
#services .svc-tile {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#services .svc-tile:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

#services .svc-tile__title {
  color: rgba(255, 255, 255, 0.96);
}

#services .svc-tile__body {
  color: rgba(255, 255, 255, 0.96);
}

.svc-tile__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.svc-tile__body {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.services-docs-cta-wrap {
  margin-top: clamp(1.85rem, 4.2vw, 2.85rem);
  padding-top: clamp(0.35rem, 1.2vw, 0.85rem);
  padding-bottom: clamp(0.15rem, 0.8vw, 0.5rem);
  text-align: center;
}

@media (max-width: 640px) {
  .services-docs-cta-wrap {
    margin-top: clamp(2.1rem, 5vw, 3rem);
    padding-top: clamp(0.65rem, 2vw, 1.15rem);
  }
}

/* In-page anchor: Documents nav lands on download CTA (scroll offset for sticky header) */
#patient-documents {
  scroll-margin-top: clamp(96px, 18vw, 132px);
}

.services-docs-lead {
  margin: 0 0 0.65rem;
  color: rgba(224, 196, 130, 0.96);
  font-size: 1.02rem;
  font-weight: 600;
}

.services-docs-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: clamp(0.62rem, 0.55rem + 1.1vw, 0.84rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  text-decoration: none;
  color: #112852;
  white-space: nowrap;
  background: #fff;
  border: 1px solid rgba(17, 40, 82, 0.42);
  box-shadow: 0 10px 24px rgba(11, 26, 61, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background-position 280ms ease;
}

.services-docs-cta:hover {
  transform: translateY(-1px);
  filter: brightness(0.995);
  box-shadow: 0 14px 32px rgba(11, 26, 61, 0.24);
}

/* Reviews carousel */
.testimonial-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: stretch;
}

.testimonial-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.testimonial-card {
  padding: clamp(1.1rem, 2vw, 1.35rem);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 200ms var(--ease-out), background 200ms var(--ease-out), border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.testimonial-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.18);
}

.testimonial-card__photo {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.testimonial-card__quote {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.9rem;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.38em * 3);
}

.testimonial-card__by {
  margin: 1rem 0 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.92rem;
}

.carousel-page {
  margin: 0.95rem 0 0;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.96);
}

.carousel-nav {
  width: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.22s var(--ease-out), border-color 0.22s var(--ease-out), transform 0.18s var(--ease-out);
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(47, 111, 182, 0.35);
}

.carousel-nav:active {
  transform: scale(0.97);
}

.reviews-more {
  margin: 1.75rem auto 0;
  max-width: min(44rem, 94vw);
  text-align: center;
  color: rgba(224, 196, 130, 0.96);
  font-weight: 600;
  line-height: 1.55;
}

.reviews-more a {
  color: inherit;
  font-weight: 800;
  text-underline-offset: 3px;
}

.reviews-more a:hover {
  color: rgba(232, 206, 145, 1);
}

/* Team split */
.split-feature {
  max-width: min(1040px, 96vw);
  margin-inline: auto;
}

.split-feature__visual {
  margin: 0;
}

.split-feature__frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(20, 28, 41, 0.1);
  box-shadow:
    0 26px 66px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  background: #dfe7f2;
  transition: box-shadow 0.32s var(--ease-out), border-color 0.32s var(--ease-out);
}

.split-feature__visual:hover .split-feature__frame {
  border-color: rgba(47, 111, 182, 0.2);
  box-shadow:
    0 30px 72px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 0 1px rgba(47, 111, 182, 0.05);
}

.split-feature__frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 320ms ease;
}

.split-feature__frame:hover img {
  transform: scale(1.018);
}

/* Location — single “locator deck” (one panel; avoids stacked competing cards) */
.location-shell {
  max-width: min(820px, var(--shell));
}

.location-deck {
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-rows: minmax(0, 1fr);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 58, 92, 0.48);
  background: #fff;
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
  transition: box-shadow 240ms var(--ease-out), border-color 240ms var(--ease-out);
}

.location-deck:hover {
  box-shadow:
    0 28px 65px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(47, 111, 182, 0.05);
  border-color: rgba(26, 58, 92, 0.62);
}

.location-deck__left {
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid rgba(20, 28, 41, 0.08);
  background: #fff;
  min-height: 100%;
}

.location-deck__hours-wrap {
  padding: clamp(1.25rem, 2.8vw, 1.85rem) clamp(1rem, 2.6vw, 1.4rem)
    clamp(0.25rem, 1vw, 0.45rem);
  border-bottom: none;
}

/* Branded accent between Office Hours and Address */
.location-deck__hours-wrap::after {
  content: "";
  display: block;
  height: 3px;
  margin: clamp(1.1rem, 2.5vw, 1.55rem) clamp(0.5rem, 4vw, 2rem) 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(47, 111, 182, 0.2) 18%,
    var(--accent) 48%,
    rgba(38, 95, 159, 1) 50%,
    var(--accent) 52%,
    rgba(47, 111, 182, 0.2) 82%,
    transparent
  );
  box-shadow: 0 0 12px rgba(47, 111, 182, 0.22);
}

.location-block {
  margin: 0;
}

.location-block--hours {
  max-width: min(30rem, 100%);
  margin-inline: auto;
  text-align: center;
}

.location-block__label {
  margin: 0 0 0.65rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000;
}

.location-block__label--center {
  margin-inline: auto;
  text-align: center;
}

.hours-table-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.2rem;
}

.hours-table {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.hours-table th {
  padding: 6px 14px 6px 0;
  font-weight: 600;
  text-align: left;
  color: var(--ink);
  vertical-align: top;
}

.hours-table td {
  padding: 6px 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hours-table tbody tr + tr th,
.hours-table tbody tr + tr td {
  padding-top: 0.65rem;
}

.location-block--address {
  margin-top: 0;
  padding: clamp(1.2rem, 2.7vw, 1.55rem) clamp(0.9rem, 2.4vw, 1.3rem) clamp(1rem, 2.1vw, 1.2rem);
  text-align: center;
  background: transparent;
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
}

.location-address {
  margin: 0.35rem auto 0;
  max-width: min(38rem, 100%);
  font-style: normal;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.location-deck__map-stack {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.location-deck__right {
  display: flex;
  grid-column: 2;
  grid-row: 1;
}

.location-deck__maps-out {
  margin: 0.85rem 0 0;
  padding: 0;
  text-align: center;
}

.location-deck__maps-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 111, 182, 0.35);
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.location-deck__maps-link:hover {
  color: var(--navy);
  border-bottom-color: rgba(26, 58, 92, 0.45);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px 14px;
  margin-top: clamp(1.35rem, 3.2vw, 2rem);
  padding: clamp(1.15rem, 2.6vw, 1.55rem) clamp(1rem, 2.5vw, 1.35rem);
  max-width: min(500px, 100%);
  margin-inline: auto;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(47, 111, 182, 0.13);
  box-shadow:
    0 16px 42px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.contact-actions:hover {
  border-color: rgba(47, 111, 182, 0.18);
  box-shadow:
    0 20px 48px rgba(15, 23, 42, 0.085),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.contact-actions__btn {
  flex: 1 1 min(13rem, 100%);
  min-height: 48px;
  justify-content: center;
  font-size: clamp(0.88rem, 0.82rem + 0.45vw, 0.96rem);
}

@media (max-width: 520px) {
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
    padding-inline: clamp(0.85rem, 4vw, 1.15rem);
  }

  .contact-actions__btn {
    flex: 1 1 auto;
    width: 100%;
    max-width: 22rem;
    margin-inline: auto;
  }
}

.location-deck__map {
  margin: 0;
  background: #e7ecf4;
  flex: 1 1 auto;
  min-height: 100%;
}

.location-deck__map iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  height: 100%;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible,
  .svc-tile,
  .testimonial-card,
  .split-feature__frame img,
  .location-deck {
    transition: none !important;
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
  }

  .masthead__brand,
  .masthead__logo,
  .hero-pro__frame,
  .split-feature__frame,
  .carousel-nav,
  .footer-logo,
  .location-deck__maps-link {
    transition: none !important;
  }

  .masthead__brand:hover .masthead__logo,
  .footer-logo-wrap:hover .footer-logo {
    transform: none !important;
    box-shadow: none !important;
  }

  .masthead__menu-line {
    transition: none !important;
  }
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  padding: calc(var(--pad-y) * 0.65) 0;
  border-top: 1px solid var(--line);
  background: var(--surface-premium);
}

.footer-grid {
  display: grid;
  gap: 14px;
  max-width: min(52rem, 94vw);
  margin-inline: auto;
  text-align: center;
}

.footer-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 0.35rem;
}

.footer-logo {
  display: block;
  width: clamp(56px, 14vw, 80px);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 999px;
  border: 1px solid rgba(20, 28, 41, 0.08);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.footer-logo-wrap:hover .footer-logo {
  transform: translateY(-2px);
  border-color: rgba(47, 111, 182, 0.22);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.footer-brand {
  margin: 0;
  color: #000;
  font-size: 0.92rem;
}

.footer-meta {
  margin: 0;
  color: #000;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

@media (max-width: 980px) {
  #team::after {
    display: none;
  }

  .hero-pro__title {
    max-width: min(48ch, 100%);
  }

  .hero-pro__title--singleline,
  .section-heading--singleline {
    white-space: normal;
  }

  .hero-pro__lede {
    max-width: min(58ch, 100%);
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .testimonial-track {
    grid-template-columns: 1fr;
  }

  /* Nav arrows hidden on small screens — use a single full-width column so the track spans the row */
  .testimonial-carousel {
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: stretch;
  }

  .carousel-nav {
    display: none;
  }

  .location-deck {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .location-deck__left {
    grid-column: 1;
    grid-row: 1;
    border-right: none;
    border-bottom: 1px solid rgba(20, 28, 41, 0.08);
  }

  .location-deck__right {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
  }

  .location-deck__map {
    border-top: 1px solid rgba(20, 28, 41, 0.08);
    min-height: 0;
  }

  .location-deck__map iframe {
    min-height: 280px;
  }

  .section-intro {
    margin-bottom: 1.3rem;
  }

}

/* Reviews: mobile — two full quotes stacked, pager row below (advances two at a time) */
@media (max-width: 760px) {
  .testimonial-carousel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 14px 12px;
    align-items: stretch;
  }

  .testimonial-track {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
  }

  .testimonial-card {
    padding: clamp(1rem, 3vw, 1.25rem);
    width: 100%;
  }

  .testimonial-card__quote {
    display: block !important;
    font-size: 0.92rem;
    line-height: 1.45;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
    min-height: 0 !important;
  }

  .carousel-nav[data-prev],
  .carousel-nav[data-next] {
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    align-self: stretch;
  }

  .carousel-nav[data-prev] {
    grid-column: 1;
  }

  .carousel-nav[data-next] {
    grid-column: 2;
  }

  #reviews .carousel-page {
    margin-top: 0.75rem;
  }
}

@media (min-width: 981px) {
  .section-heading--singleline {
    white-space: nowrap;
  }
}

/* White content lane for team/contact sections */
#team,
#contact {
  position: relative;
}

#team::before,
#contact::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--shell);
  transform: translateX(-50%);
  background: #fff;
  z-index: 0;
}

#team > .shell,
#contact > .shell {
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  /* Masthead: logo + practice name left, menu control right */
  section[id] {
    scroll-margin-top: 118px;
  }

  .masthead__inner {
    position: relative;
    z-index: 2;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 0.65rem;
    align-items: center;
  }

  .masthead__brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    flex-direction: row;
    align-items: center;
    align-self: center;
    text-align: left;
    min-width: 0;
    gap: 0.5rem;
  }

  .masthead__logo {
    position: static;
    width: 40px;
    height: 40px;
    transform: none;
  }

  .masthead__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(47, 111, 182, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
    box-shadow:
      0 8px 22px rgba(15, 23, 42, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .masthead__nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    padding: 0.55rem 0.65rem 0.7rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(20, 28, 41, 0.1);
    background: rgba(253, 252, 250, 0.98);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
  }

  .masthead--nav-open .masthead__nav {
    display: flex;
  }

  .masthead__nav a {
    display: block;
    padding: 0.65rem 0.5rem;
    border-radius: 10px;
    text-align: center;
  }

  .masthead__nav a::after {
    display: none;
  }

  .masthead__nav a:hover,
  .masthead__nav a:focus-visible {
    background: rgba(47, 111, 182, 0.08);
    color: var(--navy);
  }

  .masthead__brand-text {
    font-size: 0.82rem;
    white-space: nowrap;
    max-width: min(64vw, 15.5rem);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-pro__title {
    max-width: none;
  }

  .hero-pro__actions {
    gap: 10px;
  }

  .services-docs-cta {
    width: min(100%, 420px);
  }
}

/* Narrow phones: spacing, type scale, and overflow — does not apply above 640px */
@media (max-width: 640px) {
  :root {
    --shell: min(1180px, calc(100vw - 28px));
  }

  #main {
    overflow-x: clip;
  }

  /* Mobile-only: center in-flow copy and CTAs (desktop/tablet >640px unchanged) */
  main,
  .site-footer {
    text-align: center;
  }

  .masthead__inner {
    justify-items: initial;
    text-align: initial;
  }

  .masthead__brand {
    justify-content: flex-start;
    justify-self: start;
  }

  .hero-pro__copy {
    margin-inline: auto;
    text-align: center;
  }

  .hero-pro__title,
  .hero-pro__title--singleline {
    margin-inline: auto;
    text-align: center;
  }

  .hero-pro__lede {
    margin-inline: auto;
    text-align: center;
  }

  .hero-pro__actions {
    justify-content: center;
  }

  .split-feature {
    margin-inline: auto;
  }

  .hours-table-wrap {
    justify-content: center;
  }

  .hours-table {
    margin-inline: auto;
  }

  .hours-table th,
  .hours-table td {
    text-align: center;
  }

  .hours-table th {
    padding-right: 0;
  }

  .pill,
  .services-docs-cta {
    justify-content: center;
  }

  .services-docs-cta {
    margin-inline: auto;
  }

  .hero-pro {
    padding-top: clamp(1.1rem, 4vw, 1.5rem);
    padding-bottom: clamp(1rem, 3.5vw, 1.35rem);
  }

  .hero-pro__eyebrow {
    white-space: normal;
    font-size: clamp(0.48rem, 0.28rem + 2.15vw, 0.86rem);
    letter-spacing: clamp(0.045em, 0.035em + 0.25vw, 0.12em);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .hero-pro__title--singleline {
    font-size: clamp(1.42rem, 6vw, 1.95rem);
    line-height: 1.08;
  }

  .hero-pro__lede {
    font-size: 1rem;
    line-height: 1.55;
  }

  .section-kicker {
    font-size: clamp(0.66rem, 2.8vw, 0.82rem);
    letter-spacing: 0.12em;
  }

  .section-heading {
    font-size: clamp(1.55rem, 5.5vw, 2.25rem);
  }

  .section-heading--singleline {
    font-size: clamp(1.48rem, 5.2vw, 2.05rem);
  }

  .masthead__nav a {
    font-size: 0.76rem;
  }

  .masthead__brand-text {
    max-width: min(62vw, 13rem);
  }

  .hours-table {
    font-size: 0.86rem;
  }

  .hours-table th {
    padding-right: 10px;
  }

  .location-deck__map iframe {
    min-height: 220px;
  }

  .services-docs-cta {
    font-size: clamp(0.58rem, 2.5vw, 0.78rem);
    line-height: 1.3;
    white-space: nowrap;
    text-align: center;
    padding-inline: max(8px, 2vw);
  }

  .footer-brand {
    font-size: 0.86rem;
    padding-inline: 4px;
  }

  .footer-meta {
    font-size: 0.78rem;
    padding-inline: 4px;
  }
}

/* Very small widths: full-width hero CTAs avoid cramped side-by-side pills */
@media (max-width: 420px) {
  .hero-pro__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-pro__actions .pill {
    width: min(100%, 22rem);
    max-width: 100%;
  }
}

/* Ultra-narrow: keep row compact and readable */
@media (max-width: 400px) {
  section[id] {
    scroll-margin-top: 124px;
  }

  .masthead__brand-text {
    max-width: min(58vw, 11.8rem);
    font-size: 0.74rem;
  }
}
