/* =========================================================
   Dr. Francis Dental — shared styles
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --bg-tint: #eef3fa;
  --bg-card: #ffffff;
  --ink: #0e2747;
  --ink-soft: #3c5577;
  --ink-mute: #6b819b;
  --rule: #d9e3ef;
  --rule-soft: #e9eff7;

  --blue: #0a3d7a;
  --blue-deep: #062a57;
  --blue-bright: #1a5fb8;
  --blue-soft: #cfe0f5;
  --blue-pale: #e8f1fc;
  --gold: #c79b3c;

  --f-display: 'Source Serif 4', 'Times New Roman', serif;
  --f-sans: 'Inter', system-ui, -apple-system, sans-serif;

  --max: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

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

/* Type */
.eyebrow {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--blue);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--blue); display: inline-block; }
.eyebrow.on-dark { color: var(--blue-soft); }
.eyebrow.on-dark::before { background: var(--blue-soft); }

/* Topbar */
.topbar {
  background: var(--blue-deep);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
  display: none;
}
@media (min-width: 1100px) { .topbar { display: block; } }
.topbar-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; }
.topbar-inner > .left > span, .topbar-inner > .right > a, .topbar-inner > .right > span { white-space: nowrap; }
.topbar a { color: #fff; opacity: 0.92; }
.topbar a:hover { opacity: 1; }
.topbar .left, .topbar .right { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.topbar .pipe { opacity: 0.4; }
.topbar .lbl { color: var(--blue-soft); font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14.5px;
  transition: all .18s ease;
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border: 2px solid var(--rule); background: var(--bg-card); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-outline-light { color: #fff; border: 2px solid rgba(255,255,255,0.4); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-light { background: #fff; color: var(--blue-deep); }
.btn-light:hover { background: var(--bg-soft); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255, 0.96);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; line-height: 1.1; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); letter-spacing: -0.005em; line-height: 1.05; }
.brand-sub { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 3px; }

.nav-links { display: none; align-items: center; gap: 22px; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-links a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--blue); }
.nav .btn { flex-shrink: 0; }
.btn-pay { color: var(--blue); border-color: var(--blue-soft); background: var(--bg-card); padding: 11px 16px; }
.btn-pay:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  display: none;
  place-items: center;
  flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--blue); color: var(--blue); }
.mobile-nav-open .nav-toggle { color: var(--blue); border-color: var(--blue-soft); background: var(--blue-pale); }
.mobile-action-bar { display: none; }

@media (max-width: 879px) {
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .nav-inner {
    min-height: 72px;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .brand { grid-column: 1; grid-row: 1; min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .nav .btn-pay,
  .nav .btn-primary[href^="tel:"] { display: none; }
  .nav-toggle { grid-column: 2; grid-row: 1; display: grid; justify-self: end; }
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: var(--r);
    box-shadow: 0 16px 34px rgba(10,30,60,0.12);
    font-size: 15px;
  }
  .mobile-nav-open .nav-links { display: grid; }
  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 6px;
  }
  .nav-links a.active { background: var(--blue-pale); }
  .nav-links a.active::after { display: none; }
  .mobile-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
    background: rgba(255,255,255,0.96);
    border-top: 1px solid var(--rule);
    box-shadow: 0 -14px 32px rgba(10,30,60,0.12);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
  }
  .mobile-action {
    min-height: 52px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid var(--blue-soft);
  }
  .mobile-action-pay { background: #fff; color: var(--blue); }
  .mobile-action-call { background: var(--blue); border-color: var(--blue); color: #fff; }
  .mobile-action svg { width: 18px; height: 18px; flex-shrink: 0; }
  .savvy-widget-container.bottom-right { bottom: calc(86px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 440px) {
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 16px; }
}

/* Dropdown */
.has-dd { position: relative; display: inline-flex; align-items: center; }
.dd-trigger { display: inline-flex; align-items: center; gap: 4px; }
.dd-menu {
  position: absolute; top: 100%; left: -16px;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(10,30,60,0.12);
  padding: 8px;
  display: none;
  z-index: 60;
}
.has-dd:hover .dd-menu, .has-dd:focus-within .dd-menu { display: block; }
.dd-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink);
}
.dd-menu a:hover { background: var(--bg-soft); color: var(--blue); }

@media (min-width: 880px) {
  .nav-links { display: flex; }
}

@media (max-width: 879px) {
  .has-dd { display: grid; align-items: stretch; width: 100%; }
  .dd-trigger { justify-content: space-between; }
  .dd-trigger svg { display: none; }
  .dd-menu,
  .has-dd:hover .dd-menu,
  .has-dd:focus-within .dd-menu {
    position: static;
    display: grid;
    min-width: 0;
    padding: 0 0 8px 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .dd-menu a {
    color: var(--ink-soft);
    font-size: 14px;
    min-height: 38px;
    padding: 8px 12px;
  }
}

/* Page-hero (small hero for inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
  color: #fff;
  padding: clamp(56px, 8vw, 96px) 0 clamp(56px, 8vw, 88px);
  position: relative;
  overflow: hidden;
}
.page-hero::before { content:''; position:absolute; right:-200px; top:-200px; width:520px; height:520px; border-radius:50%; background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%); pointer-events:none; }
.page-hero::after { content:''; position:absolute; left:-120px; bottom:-180px; width:360px; height:360px; border-radius:50%; background: radial-gradient(circle, rgba(199,155,60,0.18), transparent 70%); pointer-events:none; }
.page-hero-inner { position: relative; max-width: 760px; }
.crumbs { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 18px; }
.crumbs a { color: rgba(255,255,255,0.85); }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span.sep { margin: 0 8px; opacity: 0.5; }
.page-hero h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.page-hero h1 .accent { color: var(--gold); font-style: italic; }
.page-hero p.lead { font-size: clamp(15.5px, 1.5vw, 18px); color: rgba(255,255,255,0.85); margin: 0; max-width: 56ch; }

/* Section scaffolding */
section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 720px; }
.section-head h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.section-head h2 .accent { color: var(--blue); font-style: italic; }
.section-head p { color: var(--ink-soft); font-size: clamp(15px, 1.5vw, 17px); margin: 0; max-width: 60ch; }

/* Final CTA */
.final-cta {
  padding: clamp(64px, 9vw, 120px) 0;
  background: var(--blue-deep);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: min(900px, 90%); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(26, 95, 184, 0.4) 0%, transparent 60%);
  pointer-events: none;
}
.final-cta h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.01em; margin: 16px 0 18px; position: relative; }
.final-cta h2 .accent { color: var(--gold); font-style: italic; }
.final-cta p { font-size: clamp(15px, 1.6vw, 17px); color: rgba(255,255,255,0.82); max-width: 52ch; margin: 0 auto 32px; position: relative; }
.final-cta .btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; position: relative; }

/* Footer */
.footer { background: #061f3f; color: rgba(255,255,255,0.72); padding: 56px 0 24px; font-size: 14px; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer .brand-name { color: #fff; }
.footer .brand-sub { color: rgba(255,255,255,0.5); }
.footer-brand p { color: rgba(255,255,255,0.6); max-width: 36ch; margin: 18px 0 0; }
.footer h4 { font-family: var(--f-sans); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.16em; color: rgba(255,255,255,0.85); margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: 12.5px; color: rgba(255,255,255,0.5); }

.fine { font-size: 12px; color: var(--ink-mute); }

/* Generic two-col content */
.two-col { display: grid; gap: clamp(32px, 5vw, 56px); }
@media (min-width: 880px) { .two-col { grid-template-columns: 1fr 1fr; align-items: center; } }
.two-col.lean-left { grid-template-columns: 1fr; }
@media (min-width: 880px) { .two-col.lean-left { grid-template-columns: 1.1fr 0.9fr; } }
.two-col h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.005em; margin: 12px 0 18px; }
.two-col h2 .accent { color: var(--blue); font-style: italic; }
.two-col p { color: var(--ink-soft); margin: 0 0 16px; max-width: 58ch; }
.two-col .photo { aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-soft); border: 1px solid var(--rule); }
.two-col .photo.wide { aspect-ratio: 5/4; }
.two-col .photo img { width: 100%; height: 100%; object-fit: cover; }

/* Check list */
.check-list { display: grid; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 15px; color: var(--ink-soft); }
.check-list li::before {
  content: '';
  width: 18px; height: 18px;
  margin-top: 4px;
  background: var(--blue-pale);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230a3d7a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
}
