/* Brookside Dentistry — site styles */

:root {
  --teal: #005a4e;
  --teal-dark: #00433a;
  --teal-deep: #0b2f2a;
  --teal-tint: #eef5f3;
  --teal-line: #cfe2dd;
  --ink: #292929;
  --ink-soft: #555;
  --paper: #fff;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 6px 20px rgb(0 0 0 / 6%);
  --wrap: 1140px;
  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 116px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--teal-dark); }
a[href^="tel:"] { white-space: nowrap; }

:focus-visible { outline: 3px solid #e8a33d; outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; color: var(--teal-deep); margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.7em 1.4em;
  border: 2px solid var(--teal); border-radius: 999px;
  background: var(--teal); color: #fff;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--teal); }
.btn--ghost:hover { background: var(--teal); color: #fff; }
.btn--light { background: #fff; color: var(--teal); border-color: #fff; }
.btn--light:hover { background: var(--teal-tint); border-color: var(--teal-tint); color: var(--teal-dark); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid #e6e6e6;
  backdrop-filter: saturate(1.4) blur(6px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 100px;
}
.logo { flex: none; }
.logo img { width: 240px; }

.nav-toggle {
  display: none;
  align-items: center; gap: 8px;
  padding: 8px 14px; border: 2px solid var(--teal); border-radius: 999px;
  background: #fff; color: var(--teal); font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.0625rem;
}
.site-nav a:hover { color: var(--teal); background: var(--teal-tint); }
.site-nav a[aria-current="page"] { color: var(--teal); box-shadow: inset 0 -3px 0 var(--teal); border-radius: 0; }
.site-nav .nav-call { margin-left: 10px; }
.site-nav .nav-call a { color: #fff; background: var(--teal); border-radius: 999px; padding: 8px 18px; }
.site-nav .nav-call a:hover { background: var(--teal-dark); }

@media (max-width: 960px) {
  .site-header .wrap { min-height: 84px; }
  .logo img { width: 190px; }
  .nav-toggle { display: inline-flex; }
  /* Drops down over the page from the bottom of the sticky header, so content doesn't shift */
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100vh - 84px); overflow-y: auto;
    padding: 8px 20px 20px;
    background: #fff; border-bottom: 1px solid #e6e6e6;
    box-shadow: 0 12px 24px rgb(0 0 0 / 12%);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px; font-size: 1.125rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--teal); background: var(--teal-tint); }
  .site-nav .nav-call { margin: 8px 0 0; }
  .site-nav .nav-call a { text-align: center; }
  /* No JS: show the menu rather than hide it behind a button that can't open it */
  .no-js .nav-toggle { display: none; }
  .no-js .site-header .wrap { flex-wrap: wrap; }
  .no-js .site-nav { display: block; position: static; flex-basis: 100%; padding: 0 0 14px; border: 0; box-shadow: none; }
}

/* ---------- Page header (inner pages) ---------- */

.page-hero {
  background: var(--teal-tint);
  border-bottom: 1px solid var(--teal-line);
  padding: clamp(36px, 6vw, 64px) 0;
}
.page-hero h1 { margin: 0; }
.page-hero p { margin: 0.5em 0 0; color: var(--ink-soft); font-size: 1.25rem; max-width: 46em; }

.section { padding: clamp(40px, 7vw, 80px) 0; }
.section--tint { background: var(--teal-tint); }
.section-title { text-align: center; margin-bottom: 1.4em; }

/* ---------- Home: slider ---------- */

.slider { position: relative; background: var(--teal-deep); overflow: hidden; }
/* Keeps a ~3:1 shape as the screen widens, but never taller than 75% of the screen,
   so the intro below always peeks into view */
.slides { list-style: none; margin: 0; padding: 0; position: relative; aspect-ratio: 1600 / 530; min-height: 300px; max-height: 75vh; width: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .75s ease; }
.slide.is-active { opacity: 1; }
/* --focus: vertical point to keep in view when the photo is cropped (set per slide) */
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center var(--focus, 50%); }
.slide-caption {
  position: absolute; left: max(20px, calc((100% - var(--wrap)) / 2 + 20px)); bottom: 64px;
  max-width: min(520px, calc(100% - 40px));
  padding: 18px 22px; border-radius: var(--radius);
  background: rgb(11 47 42 / 82%); color: #fff;
}
.slide-caption strong { display: block; font-size: clamp(1.25rem, 2.5vw, 1.6rem); line-height: 1.2; }
.slide-caption span { display: block; margin-top: 4px; font-size: 1.0625rem; }

.slider-controls {
  position: absolute; right: max(20px, calc((100% - var(--wrap)) / 2 + 20px)); bottom: 18px;
  display: flex; gap: 8px; align-items: center;
}
.slider-controls button {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: rgb(255 255 255 / 90%); color: var(--teal-deep); cursor: pointer;
}
.slider-controls button:hover { background: #fff; }
.slider-controls svg { width: 18px; height: 18px; }
.slider-dots { display: flex; gap: 6px; margin-right: 6px; }
.slider-dots button { width: 12px; height: 12px; padding: 0; background: rgb(255 255 255 / 55%); }
.slider-dots button[aria-current="true"] { background: #fff; }

@media (max-width: 640px) {
  .slides { aspect-ratio: auto; height: 340px; }
  .slide-caption { bottom: 68px; padding: 12px 16px; }
  .slider-controls { left: 20px; right: 20px; justify-content: flex-end; }
}

/* ---------- Home: intro + badges ---------- */

.intro { text-align: center; max-width: 760px; margin: 0 auto; }
.intro h1 { margin-bottom: 0.4em; }
.intro p { font-size: 1.25rem; color: var(--ink-soft); }
.intro .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 1.6em; }

.badges {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 24px 56px; margin-top: 48px;
}
.badges > img { width: min(400px, 100%); }
.badges > a { display: block; width: min(250px, 70%); }
.badges > a img { width: 100%; }

/* ---------- Cards ---------- */

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.card-body p { flex: 1; }
.card-body .btn { align-self: flex-start; }

/* ---------- About ---------- */

.doctor {
  display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start;
  padding: clamp(36px, 6vw, 64px) 0;
  border-bottom: 1px solid #e6e6e6;
}
.doctor:last-of-type { border-bottom: 0; }
.doctor-portrait img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.doctor-family { float: right; width: min(42%, 380px); margin: 6px 0 16px 28px; }
.doctor-family img { border-radius: var(--radius); }
.doctor-body::after { content: ""; display: block; clear: both; }

/* Phones: small round portrait beside the name, bio next, family photo last */
@media (max-width: 760px) {
  .doctor { grid-template-columns: 96px 1fr; gap: 0 18px; align-items: center; }
  .doctor-portrait { grid-column: 1; grid-row: 1; }
  .doctor-portrait img { width: 96px; height: 96px; aspect-ratio: 1; border-radius: 50%; object-position: center 20%; }
  .doctor-body { display: contents; }
  .doctor-body::after { display: none; }
  .doctor-body > * { grid-column: 1 / -1; }
  .doctor-body > h2 { grid-column: 2; grid-row: 1; margin: 0; }
  .doctor-body > h2 + figure + p { margin-top: 20px; }
  .doctor-family { order: 1; float: none; width: 100%; margin: 8px 0 0; }
}

/* ---------- Contact ---------- */

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }
.info-grid .card-body { padding: 26px 28px; }
.info-grid h2 { font-size: 1.375rem; display: flex; align-items: center; gap: 10px; }
.info-grid h2 svg { width: 24px; height: 24px; color: var(--teal); flex: none; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { margin-bottom: 0.5em; }
.info-list .big { font-size: 1.375rem; font-weight: 700; }
.info-list .big a { text-decoration: none; }
.info-list .big a:hover { text-decoration: underline; }

.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 6px 0; text-align: left; border-bottom: 1px solid #eee; font-weight: 400; }
.hours th { font-weight: 600; }
.hours td { text-align: right; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours .closed td { color: var(--ink-soft); }

.band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; gap: 32px; } }
.band-item { display: flex; flex-direction: column; align-items: flex-start; }
.band-item svg { width: 32px; height: 32px; color: var(--teal); margin-bottom: 12px; }
.band-item h2 { font-size: 1.375rem; margin-bottom: 0.4em; }
.band-item p { margin-bottom: 1.2em; }
.band-item p:last-child { margin-bottom: 0; }
.map { margin-top: 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; background: #e9e9e9; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .map { aspect-ratio: 4 / 3; } }

/* ---------- Forms ---------- */

.callout {
  background: var(--teal); color: #fff; border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center;
}
.callout h2 { color: #fff; margin-bottom: 0.3em; }
.callout p { margin: 0; }
.callout .important { margin-top: 0.8em; font-weight: 700; }
@media (max-width: 760px) { .callout { grid-template-columns: 1fr; } }

.downloads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 760px) { .downloads { grid-template-columns: 1fr; } }
.downloads a {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; border: 1px solid var(--teal-line); border-radius: var(--radius);
  background: #fff; color: var(--ink); text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.downloads a:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.downloads .file-icon {
  flex: none; width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center;
  background: var(--teal-tint); color: var(--teal); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
}
.downloads .file-name { font-weight: 600; display: block; line-height: 1.3; }
.downloads .file-meta { font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- Prose ---------- */

.prose { max-width: 760px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--teal-deep); color: #d5e4e0; font-size: 1.0625rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { padding-top: 56px; padding-bottom: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { color: #fff; font-size: 1.125rem; margin-bottom: 0.8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35em; }
.site-footer address { font-style: normal; }
.footer-hours { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0; }
.footer-hours dt { font-weight: 600; color: #fff; }
.footer-hours dd { margin: 0; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / 12%); margin-top: 40px; padding-top: 20px; font-size: 0.9375rem; color: #a9c2bc; }
