/* ==============================================
   Breathe First Pediatric Dentistry
   Simple, calm, human. No effects-demo flourishes.
   ============================================== */

:root {
  --ink: #142036;           /* deep navy from logo */
  --sub: #5a6b85;           /* muted slate */
  --bg: #ffffff;            /* clean white (matches logo background) */
  --bg-2: #f3f7fb;          /* soft sky tint for accent panels */
  --panel: #ffffff;
  --line: #e6ebf2;          /* cool divider */
  --blue: #34B6E4;          /* logo cyan */
  --blue-deep: #1B2A6B;     /* logo navy */
  --sky: #cfeaf6;           /* soft sky tint */
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 640px) {
  body { font-size: 17px; }
}

img { max-width: 100%; display: block; }
a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

section { padding: 80px 0; }
@media (min-width: 768px) { section { padding: 112px 0; } }
section.tight { padding: 56px 0; }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .4em;
  line-height: 1.15;
}
h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink); }
.lead { font-size: 21px; color: var(--sub); line-height: 1.6; max-width: 60ch; }
@media (max-width: 640px) {
  .lead { font-size: 18px; }
}
.muted { color: var(--sub); }
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-deep);
  font-weight: 600;
  margin-bottom: 16px;
}
.serif-italic { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Header ---------- */
/* ---------- Announcement bar ---------- */
.announce {
  background: var(--blue-deep);
  color: #fff;
  font-size: 16px;
  text-align: center;
  padding: 12px 20px;
  letter-spacing: 0.01em;
}
.announce-inner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}
.announce-headline { display: inline-flex; align-items: center; gap: 10px; }
.announce strong { font-weight: 700; letter-spacing: 0.02em; }
.announce a {
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}
.announce a:hover { border-color: #fff; text-decoration: none; }
.announce a .ic, .announce-phone .ic, .announce-address .ic {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 6px;
  opacity: 0.85;
}
.announce-phone, .announce-address {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.announce .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 5px rgba(74,222,128,0.25);
  flex-shrink: 0;
  animation: announcePulse 2s ease-in-out infinite;
}
@keyframes announcePulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(74,222,128,0.25); }
  50% { box-shadow: 0 0 0 8px rgba(74,222,128,0.12); }
}
.announce .sep { opacity: 0.4; }
@media (max-width: 768px) {
  .announce { font-size: 14.5px; padding: 10px 14px; }
  .announce-inner { gap: 8px 12px; }
  .announce .sep { display: none; }
  .announce-address { display: block; flex-basis: 100%; font-size: 13.5px; opacity: 0.9; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  gap: 24px;
}
/* Centered-logo layout (memorialchildrensdentistry-style) */
@media (min-width: 960px) {
  .site-header.centered-logo .wrap {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    gap: 24px;
    max-width: 1280px;
  }
  .site-header.centered-logo .nav { gap: 30px; }
  .site-header.centered-logo .nav-left { justify-content: flex-end; }
  .site-header.centered-logo .nav-right { justify-content: flex-start; }
  .site-header.centered-logo .brand { justify-self: center; }
  .site-header.centered-logo .nav a,
  .site-header.centered-logo .nav .menu-item > a { white-space: nowrap; }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; opacity: 0.85; }
.brand-image {
  height: 64px;
  width: auto;
  display: block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
@media (max-width: 640px) {
  .brand-image { height: 44px; }
  .site-header .wrap { height: 72px; }
}
/* Mobile homepage: header brand image hidden at the top of the page
   (poster carries the logo there) — pops in the moment user scrolls.
   Uses a fast 180ms transition so the pop feels immediate. */
@media (max-width: 959px) {
  body.home-page .brand-image {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  body.home-page.past-hero .brand-image {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.nav {
  display: none;
  gap: 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
@media (min-width: 1100px) {
  .nav { gap: 26px; font-size: 16.5px; }
}
@media (min-width: 960px) { .nav { display: flex; align-items: center; } }
.nav a { color: var(--ink); }
.nav a:hover { color: var(--blue-deep); text-decoration: none; }
.nav a.active { color: var(--blue-deep); font-weight: 600; }

/* ---------- Nav dropdown ---------- */
.menu-item { position: relative; }
.menu-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.menu-item > a .caret {
  font-size: 9px;
  opacity: 0.5;
  margin-left: 2px;
  transition: transform 0.18s;
}
.menu-item:hover > a .caret,
.menu-item:focus-within > a .caret { transform: rotate(180deg); opacity: 0.85; }
/* invisible bridge so the dropdown stays open between trigger + menu */
.menu-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -16px; right: -16px;
  height: 12px;
  pointer-events: none;
}
.menu-item:hover::after,
.menu-item:focus-within::after { pointer-events: auto; }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  transform: translateY(6px);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 6px;
  padding: 6px 0;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(20,32,54,0.10);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 60;
}
.menu-item:hover .dropdown,
.menu-item:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid #f3f5f8;
}
.dropdown a:last-child { border-bottom: 0; }
.dropdown a:hover { background: #f6fafd; color: var(--blue-deep); }

.header-cta { display: flex; align-items: center; gap: 12px; }
.mobile-toggle {
  display: inline-flex;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}
@media (min-width: 960px) { .mobile-toggle { display: none; } }

.mobile-menu {
  position: fixed;
  top: 72px;             /* below the sticky header on mobile */
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  padding: 18px 24px 48px;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 60;           /* above the header (50) so it sits on top */
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
}
@media (min-width: 960px) {
  .mobile-menu { display: none; }
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
body.menu-open { overflow: hidden; touch-action: none; }
.mobile-menu a {
  display: block;
  padding: 14px 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a.sub {
  padding-left: 16px;
  font-size: 15.5px;
  color: var(--sub);
  font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background-color .18s, color .18s, transform .18s, border-color .18s;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue-deep); color: #fff; }
.btn-primary:hover { background: #0e1a4a; }
.btn-outline { background: transparent; color: var(--blue-deep); border-color: var(--blue-deep); }
.btn-outline:hover { background: var(--blue-deep); color: #fff; }
.btn-cyan { background: var(--blue); color: #fff; }
.btn-cyan:hover { background: #2aa3cd; }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* ---------- Screen-reader only ---------- */
.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;
}

/* ---------- Hero poster (full-bleed) ---------- */
.hero-poster {
  width: 100%;
  background: #fff;
  line-height: 0;
  padding: 0;
  margin: 0;
}
.hero-poster-link {
  display: block;
  position: relative;
  overflow: hidden;
}
.hero-poster img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.hero-poster-link:hover img {
  transform: scale(1.012);
}
@media (max-width: 700px) {
  .hero-poster-link:hover img { transform: none; }
}

.hero-cta-band {
  padding: 36px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero-cta-band .eyebrow { margin-bottom: 12px; }
.hero-cta-band .lead { max-width: 60ch; margin: 0 auto 24px; }
.hero-cta-band .cta-row { justify-content: center; flex-wrap: wrap; gap: 12px; display: flex; }

/* ---------- Hero (legacy split) ---------- */
.hero { padding: 80px 0 64px; }
@media (min-width: 768px) { .hero { padding: 100px 0 88px; } }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 64px; } }
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--blue); }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art {
  aspect-ratio: 5/6;
  background: linear-gradient(155deg, #cfeaf6 0%, var(--blue) 60%, var(--blue-deep) 100%);
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-art .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  padding: 24px;
  text-align: center;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 80px 0 56px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
@media (min-width: 768px) { .page-hero { padding: 104px 0 72px; } }
.page-hero h1 { max-width: 22ch; }
.page-hero .lead { margin-top: 16px; }

/* ---------- Service cards ---------- */
.grid-2 { display: grid; gap: 20px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 20px; grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 28px; }
  .grid-3 { grid-template-columns: 1fr 1fr; gap: 24px; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card.linked { display: block; color: inherit; }
.card.linked:hover {
  text-decoration: none;
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(20,32,54,0.06);
}
.card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--bg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-deep);
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--sub); font-size: 15.5px; margin: 0; }
.card .arrow { display: inline-block; margin-top: 16px; color: var(--blue-deep); font-weight: 600; font-size: 14px; }
.card .arrow::after { content: ' →'; }

/* ---------- Quote / pull ---------- */
.pull {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.4;
  color: var(--ink);
  max-width: 26ch;
  font-style: italic;
  font-weight: 400;
}
.pull-attrib { font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--sub); margin-top: 16px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Doctor block ---------- */
.doctor-block { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .doctor-block { grid-template-columns: 1fr 1.4fr; gap: 64px; } }
.doctor-photo {
  aspect-ratio: 1/1;
  background: linear-gradient(155deg, #e6f4fb 0%, #cfeaf6 55%, var(--blue) 100%);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}
.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.doctor-photo.team-placeholder {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(165deg, #eaf3fa 0%, #cfeaf6 70%, #b9dff0 100%);
}
.doctor-photo.team-placeholder svg {
  width: 75%;
  height: 88%;
  display: block;
}
.doctor-photo .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(20,32,54,0.55);
  font-family: var(--serif); font-style: italic; font-size: 18px;
  padding: 24px; text-align: center;
}

/* ---------- Collaborators band ---------- */
.collab-band { background: var(--bg-2); }
.collab-band .card { border-color: #dbe6f1; }
.collab-list { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 24px; }
.collab-pill {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--ink);
}

/* ---------- Contact band ---------- */
.contact-band { background: var(--blue-deep); color: #fff; padding: 88px 0; text-align: center; }
.contact-band .wrap { max-width: 720px; }
.contact-band h2 { color: #fff; margin-bottom: 14px; }
.contact-band .lead { color: rgba(255,255,255,0.78); margin: 0 auto 28px; max-width: 52ch; }
.contact-band .eyebrow { color: rgba(255,255,255,0.55) !important; }
.contact-band a.link { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.3); }
.contact-band a.link:hover { border-color: #fff; text-decoration: none; }
.contact-grid { display: flex; flex-direction: column; align-items: center; gap: 0; }
.contact-band .row { justify-content: center; gap: 12px; }
@media (max-width: 500px) {
  .contact-band { padding: 64px 0; }
  .contact-band .row { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
}
.contact-info { display: grid; gap: 18px; }
.contact-info .label { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 4px; }
.contact-info .val { color: #fff; font-size: 17px; }

/* ---------- Form ---------- */
form.simple { display: grid; gap: 14px; }
form.simple label { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--sub); font-weight: 600; }
form.simple input,
form.simple select,
form.simple textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 16px; /* 16px+ prevents iOS Safari auto-zoom on focus */
  color: var(--ink);
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
form.simple input:focus,
form.simple select:focus,
form.simple textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52,182,228,0.18);
}
form.simple textarea { min-height: 110px; resize: vertical; }
form.simple .row-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { form.simple .row-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #0e1a32; color: rgba(255,255,255,0.92); padding: 56px 0 32px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,0.92); }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer a .ic { display: inline-block; vertical-align: -2px; margin-right: 8px; opacity: 0.7; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 740px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14.5px; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 13px; color: rgba(255,255,255,0.55);
}
.footer-brand { color: #fff; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-brand .footer-wordmark {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .04em;
  line-height: 1.1;
  color: #fff;
}
.footer-brand .footer-wordmark .cyan { color: var(--blue); }
.footer-brand .footer-tag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #ffffff;
  margin-top: 6px;
  display: block;
  font-weight: 500;
}
.footer-brand p { color: #ffffff; font-size: 15px; line-height: 1.6; margin: 18px 0 0; max-width: 32ch; opacity: 0.92; }

/* Map embeds — responsive aspect ratio */
.footer-map { margin-top: 48px; }
.footer-map iframe {
  width: 100%;
  height: 280px;
  border: 0;
  border-radius: 12px;
  display: block;
  filter: grayscale(0.1) contrast(1.05);
}
@media (max-width: 640px) {
  .footer-map iframe { height: 220px; }
}

.map-section { padding: 64px 0 96px; background: var(--bg-2); }
.map-section .wrap { max-width: 1120px; }
.map-embed iframe {
  width: 100%;
  height: 460px;
  border: 0;
  border-radius: 16px;
  display: block;
  box-shadow: 0 10px 30px rgba(20,32,54,0.08);
}
@media (max-width: 640px) {
  .map-embed iframe { height: 340px; }
}

/* ---------- Utilities ---------- */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.center { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
