/* ==========================================================================
   Brightwave Dental — shared stylesheet
   Palette: white #FFFFFF · violet ink #2D2A5E · marigold #F5A623 · tint #F1F0FA
   Fonts: Bricolage Grotesque (display 500/700) + Figtree (body 400/600)
   ========================================================================== */

:root {
  --white: #ffffff;
  --ink: #2d2a5e;
  --ink-soft: #55517e;
  --gold: #f5a623;
  --gold-deep: #eb9708;
  --gold-tint: #fdf3e0;
  --tint: #f1f0fa;
  --tint-deep: #e3e1f5;
  --line: #dddbec;
  --error: #b42318;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 12px 28px rgba(45, 42, 94, 0.14);
  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --wrap: 72rem;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

p { color: var(--ink-soft); max-width: 62ch; }

a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink-soft); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 10000;
  background: var(--ink);
  color: var(--white);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus-visible { left: 0.75rem; outline-color: var(--gold); }

.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}

.section { padding: 3.75rem 0; }
.section--tint { background: var(--tint); }

.section-head { max-width: 42rem; margin-bottom: 2.25rem; }
.section-head p { margin-top: 0.75rem; font-size: 1.05rem; }

.lead-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
}

/* ---------- Buttons & tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn--primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(45, 42, 94, 0.16);
}
.btn--primary:hover { background: var(--gold-deep); transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.btn--ghost:hover { background: var(--tint); transform: translateY(-2px); }
.btn--small { padding: 0.6rem 1.25rem; font-size: 0.9rem; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--gold);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.brand-dot { color: var(--gold); }

.site-nav { display: none; }
.site-nav a {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.55rem 0.9rem;
}
.site-nav a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.site-nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.header-book { white-space: nowrap; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  min-width: 1.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
@media (max-width: 560px) {
  .header-book { display: none; }
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-open .site-nav {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 0.75rem 1.25rem 1.25rem;
}
.nav-open .site-nav a { margin: 0.15rem 0; }

/* ---------- Split panels ---------- */
.split {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}
.split-media { width: 100%; }
.photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--tint);
}
.photo--43 { aspect-ratio: 4 / 3; }
.photo--45 { aspect-ratio: 4 / 5; }

.split-copy p { margin-top: 1rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { padding: 3.5rem 0 4rem; }
.hero .lede { margin-top: 1.25rem; font-size: 1.15rem; max-width: 34rem; }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}
.hero-note {
  margin-top: 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-note::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--gold);
  flex: none;
}

/* Page hero (inner pages) */
.page-hero { padding: 3.25rem 0 0.5rem; }
.page-hero p { margin-top: 1rem; max-width: 40rem; font-size: 1.1rem; }

/* ---------- Editorial price menu ---------- */
.menu-group { padding: 3rem 0; }
.menu-group:nth-of-type(even) { background: var(--tint); }
.menu-intro { max-width: 42rem; margin-top: 0.75rem; font-size: 1.05rem; }

.menu-list {
  display: grid;
  gap: 0 3.5rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}
.menu-item { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.menu-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.menu-item h3 { font-size: 1.15rem; }
.menu-item p { margin-top: 0.4rem; font-size: 0.98rem; }

/* ---------- Quotes ---------- */
.big-quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink);
  margin-top: 1.5rem;
  text-wrap: balance;
}
.quote-name {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.quote-name::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
  margin-right: 0.6rem;
  vertical-align: middle;
}
.quote-row {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}
.quote-row blockquote {
  font-size: 1rem;
  color: var(--ink);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* ---------- Hours & tables ---------- */
.hours-table { width: 100%; max-width: 26rem; border-collapse: collapse; font-size: 0.97rem; }
.hours-table th, .hours-table td {
  text-align: left;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 400;
}
.hours-table th { font-weight: 600; color: var(--ink); }
.hours-table td { text-align: right; }
.hours-table tr.today th, .hours-table tr.today td { color: var(--ink); font-weight: 700; }

/* ---------- CTA banner ---------- */
.cta-banner {
  text-align: center;
  background: var(--tint);
  border-radius: var(--radius);
  padding: 3.25rem 1.5rem;
}
.cta-banner p { max-width: 32rem; margin: 0.85rem auto 1.6rem; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 4rem;
  background: var(--ink);
  color: #cfcdea;
  padding: 3.25rem 0 6.5rem; /* bottom clearance for demo badge */
}
.footer-grid { display: grid; gap: 2rem; }
.site-footer h3 { color: var(--white); font-size: 1.02rem; margin-bottom: 0.9rem; }
.site-footer p { color: #b9b6e0; font-size: 0.94rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin: 0.4rem 0; }
.site-footer a { color: #cfcdea; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--gold); }
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.8rem;
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.84rem;
  color: #a5a2d4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* ---------- Team & values (about) ---------- */
.team-list { display: grid; gap: 2rem; margin-top: 2rem; }
.team-member { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.team-member h3 { font-size: 1.2rem; }
.team-member .tag { margin: 0.6rem 0 0.75rem; }
.team-member p { font-size: 0.98rem; }

.promise-list { list-style: none; padding: 0; display: grid; gap: 1.4rem; margin-top: 1.75rem; }
.promise-list h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 0.6rem; }
.promise-list h3::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--gold);
  flex: none;
}
.promise-list p { margin-top: 0.35rem; font-size: 0.98rem; }

.amenities { list-style: none; padding: 0; display: grid; gap: 0.9rem; margin-top: 1.75rem; }
.amenities li {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 1rem;
  color: var(--ink);
}
.amenities li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--gold);
  flex: none;
  transform: translateY(-1px);
}

/* ---------- Contact page ---------- */
.contact-grid { display: grid; gap: 2.5rem; align-items: start; }

.form-card {
  background: var(--tint);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
}
.form-card h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.form-card > p { margin-bottom: 1.5rem; font-size: 0.98rem; }

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.94rem;
  margin-bottom: 0.35rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  transition: border-color 0.15s ease;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }
.field textarea { resize: vertical; min-height: 7rem; }
.field-row { display: grid; gap: 0 1rem; }

.field-error {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--error);
  max-width: none;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 1.4rem;
  cursor: pointer;
}
.check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  accent-color: var(--ink);
  flex: none;
}

.form-notice {
  margin-top: 1.25rem;
  background: var(--gold-tint);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  font-size: 0.97rem;
  color: var(--ink);
}
.form-notice a { font-weight: 700; }
.form-notice[hidden] { display: none; }

.address-block { font-style: normal; line-height: 1.75; color: var(--ink-soft); }
.address-block strong { color: var(--ink); font-family: var(--font-display); }

.hours-card h2 { font-size: 1.5rem; margin-bottom: 0.9rem; }

.map-card { margin-top: 2rem; }
.map-card svg { width: 100%; height: auto; border-radius: var(--radius); }
.map-caption { font-size: 0.88rem; color: var(--ink-soft); padding-top: 0.7rem; }

.insurance-note {
  margin-top: 1.5rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.insurance-note strong { color: var(--ink); }

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .section { padding: 4.75rem 0; }
  .menu-group { padding: 3.75rem 0; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .quote-row { grid-template-columns: 1fr 1fr; }
  .team-list { grid-template-columns: repeat(2, 1fr); gap: 2rem 3rem; }
  .amenities { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; gap: 0.25rem; margin-right: 0.5rem; }
  .hero { padding: 5rem 0 5.5rem; }
  .split { grid-template-columns: 1fr 1fr; gap: 4.5rem; }
  .split--flip .split-media { order: -1; }
  .menu-list { grid-template-columns: 1fr 1fr; }
  .team-list { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1.15fr 0.85fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Guard: height attribute must not win over responsive sizing */
img { height: auto; }
