/* PBM Dental - shared styles */

:root {
  --max-width: 1080px;
}

:root[data-color-theme="1"] {
  --accent-start: #f4f76a;
  --accent-end: #a9d92d;
  --accent-ink: #1c1c1a;
  --ink: #1c1c1a;
  --ink-soft: #4a4a44;
  --bg: #faf9f6;
  --bg-card: #ffffff;
  --line: #e4e2da;
}

/* Color 2: Clinical Calm - soft teal */
:root[data-color-theme="2"] {
  --accent-start: #4fa89a;
  --accent-end: #3d8c80;
  --accent-ink: #ffffff;
  --ink: #16302c;
  --ink-soft: #4d6a65;
  --bg: #f3f8f7;
  --bg-card: #ffffff;
  --line: #dbe8e5;
}

/* Color 3: Warm Citrus - orange-gold accent, cream ground */
:root[data-color-theme="3"] {
  --accent-start: #e08a2e;
  --accent-end: #c8701a;
  --accent-ink: #ffffff;
  --ink: #3a2a14;
  --ink-soft: #7a6142;
  --bg: #fbf5ea;
  --bg-card: #ffffff;
  --line: #ecdfc7;
}

/* Color 4: Modern Mono - near-black ground, lime used only as a pop */
:root[data-color-theme="4"] {
  --accent-start: #c3e04a;
  --accent-end: #a9d92d;
  --accent-ink: #111110;
  --ink: #f2f1ec;
  --ink-soft: #b9b7ac;
  --bg: #111110;
  --bg-card: #1a1a18;
  --line: #333229;
}

/* Color 5: Soft Pastel Family - peach accent */
:root[data-color-theme="5"] {
  --accent-start: #f6b189;
  --accent-end: #ef9a68;
  --accent-ink: #2c2a26;
  --ink: #2c2a26;
  --ink-soft: #756f60;
  --bg: #fbfaf6;
  --bg-card: #ffffff;
  --line: #ede7db;
}

/* Color 6: Precision Care - cool slate-blue - default on load */
:root,
:root[data-color-theme="6"] {
  --accent-start: #2f5d8a;
  --accent-end: #244a70;
  --accent-ink: #ffffff;
  --ink: #1b2226;
  --ink-soft: #52616a;
  --bg: #f1f4f6;
  --bg-card: #ffffff;
  --line: #dbe3e8;
}

/* Color 7: Approachable Family - sage/peach */
:root[data-color-theme="7"] {
  --accent-start: #d97a3f;
  --accent-end: #c2652d;
  --accent-ink: #ffffff;
  --ink: #223026;
  --ink-soft: #4c5d49;
  --bg: #f4f7f0;
  --bg-card: #ffffff;
  --line: #dfe8d8;
}

:root[data-font-theme="1"] {
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Font 2: understated serif over plain system sans */
:root[data-font-theme="2"] {
  --font-head: Georgia, "Iowan Old Style", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Font 3: editorial serif over a clean sans */
:root[data-font-theme="3"] {
  --font-head: "Lora", "Palatino Linotype", Georgia, serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Trebuchet MS", sans-serif;
}

/* Font 4: Fraunces over Inter */
:root[data-font-theme="4"] {
  --font-head: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* Font 5: Fraunces over a rounder friendly sans */
:root[data-font-theme="5"] {
  --font-head: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Nunito", "Quicksand", system-ui, sans-serif;
}

/* Font 6: Precision Grotesk - grotesk headline over systematic sans - default on load */
:root,
:root[data-font-theme="6"] {
  --font-head: "Libre Franklin", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

/* Font 7: Approachable Family - rounded display over friendly sans */
:root[data-font-theme="7"] {
  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-bottom: 4rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; }

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

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

/* header / nav */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo-link { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-link img { height: 42px; width: auto; border-radius: 4px; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--accent-end);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

/* buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: var(--accent-ink);
}

.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
}

.header-book-btn {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* hero */
.hero {
  padding: 4rem 0;
  text-align: center;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* placeholder image blocks (no real photography yet) */
.placeholder-img {
  background: linear-gradient(135deg, var(--accent-start) 0%, var(--bg-card) 60%, var(--accent-end) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
  min-height: 220px;
  padding: 1rem;
}

/* sections */
section { padding: 3rem 0; }
section.alt { background: var(--bg-card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Contact page card row: flex instead of grid so a leftover card on the
   last row centers itself as a group instead of sitting alone and narrow */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
}
.contact-grid > .card {
  flex: 1 1 420px;
  max-width: 520px;
}

.amenities {
  margin-top: 1.75rem;
  text-align: center;
}
.amenities h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.amenities-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.amenities-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.amenities-list .icon {
  font-size: 1.15rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
}

.card h3 { margin-bottom: 0.4em; }

/* hours table */
table.hours { border-collapse: collapse; width: 100%; max-width: 420px; }
table.hours th, table.hours td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

/* reviews */
.review-card .stars {
  color: var(--accent-end);
  letter-spacing: 0.1em;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.review-card p.quote {
  font-style: italic;
}
.review-card .reviewer {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9rem;
  margin: 0;
}

/* faq */
details.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
details.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-head);
}

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* password gate */
#gate-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
#gate-overlay form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(320px, 90vw);
  text-align: center;
}
#gate-overlay input[type="password"] {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
}
#gate-overlay .gate-error {
  color: #a33;
  font-size: 0.85rem;
  min-height: 1.2em;
}
body.gate-locked #site-content { display: none; }
body:not(.gate-locked) #gate-overlay { display: none; }

/* theme switcher - temporary build/review tool, not for public launch */
#theme-switcher {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
#theme-switcher label { color: var(--ink-soft); }
#theme-switcher select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  background: var(--bg);
  color: var(--ink);
}

/* responsive */
@media (max-width: 720px) {
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  .main-nav.open ul { flex-direction: column; gap: 0; padding: 0.5rem 1.5rem 1rem; }
  .main-nav.open li { padding: 0.5rem 0; }
  .nav-toggle { display: block; }

  #theme-switcher {
    left: 1rem;
    right: 1rem;
    border-radius: 12px;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.4rem;
  }
  #theme-switcher select { flex: 1 1 auto; min-width: 0; }
}
