/* Capital Dental Group — clean, calm, mobile-first */

:root {
  --ink: #0e2a33;
  --ink-soft: #3f5a63;
  --accent: #0a7470;
  --accent-dark: #075955;
  --accent-tint: #e3f3f1;
  --mint: #f3faf9;
  --line: #d5e6e4;
  --white: #ffffff;
  --deep: #0b3a40;
  --star: #b7791f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 42, 51, 0.06), 0 10px 30px -12px rgba(14, 42, 51, 0.18);
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid #f2a93b;
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  min-height: 56px;
  padding: 14px 28px;
  font-size: 1.0625rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 8px 20px -8px rgba(10, 116, 112, 0.6);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: var(--white);
  color: var(--accent-dark);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-tint);
}

.btn-light {
  background: var(--white);
  color: var(--deep);
}

.btn-light:hover {
  background: var(--accent-tint);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.logo-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--accent), #12968f);
  color: var(--white);
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.1;
  white-space: nowrap;
}

.logo-text em {
  font-style: normal;
  color: var(--accent);
}

.header-nav {
  display: none;
}

.btn-header {
  flex: none;
  min-height: 48px;
  padding: 10px 18px;
}

.btn-header-long {
  display: none;
}

/* Hero */

.hero {
  position: relative;
  padding: 44px 0 56px;
  background:
    radial-gradient(circle at 88% 8%, rgba(18, 150, 143, 0.16), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(10, 116, 112, 0.09), transparent 45%),
    linear-gradient(180deg, var(--mint), var(--white));
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(10, 116, 112, 0.14) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 55%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 55%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 36px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero .eyebrow {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-dark);
}

.hero h1 {
  font-size: clamp(2.1rem, 8.4vw, 3.9rem);
  font-weight: 600;
}

.lead {
  margin-top: 18px;
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 0.975rem;
}

.rating strong {
  color: var(--ink);
}

/* 4.8 of 5: the gold layer is clipped partway through the fifth star. */
.stars {
  flex: none;
}

.stars-base {
  fill: #e4d6bf;
}

.stars-fill {
  fill: var(--star);
}

/* The hero rating line already covers this on phones and tablets. */
.fact-rating {
  display: none;
}

.fact-card {
  display: grid;
  gap: 4px;
  padding: 10px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.fact {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
}

.fact + .fact {
  border-top: 1px solid var(--line);
}

.fact-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent);
}

.fact-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.fact-value {
  margin-top: 2px;
  font-weight: 500;
}

.fact-value a {
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: none;
}

.fact-value a:hover {
  text-decoration: underline;
}

/* Sections */

.section {
  padding: 64px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section h2 {
  font-size: clamp(1.75rem, 6vw, 2.6rem);
}

.section-intro {
  margin-top: 14px;
  color: var(--ink-soft);
}

/* Services */

.card-grid {
  display: grid;
  gap: 16px;
}

.card {
  padding: 26px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(14, 42, 51, 0.06), 0 18px 40px -16px rgba(14, 42, 51, 0.26);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--accent-tint), #d0ebe8);
  color: var(--accent-dark);
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--ink-soft);
}

/* Why */

.why {
  background:
    radial-gradient(circle at 100% 0%, rgba(18, 150, 143, 0.12), transparent 40%),
    var(--mint);
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.why-list li {
  position: relative;
  padding: 28px 24px 26px;
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.why-num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
}

.why-list h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.why-list p {
  color: var(--ink-soft);
}

/* Visit */

.visit-grid {
  display: grid;
  gap: 32px;
}

.visit h2 {
  margin-bottom: 10px;
}

.hours {
  width: 100%;
  max-width: 420px;
  margin-top: 18px;
  border-collapse: collapse;
}

.hours th,
.hours td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.hours th {
  font-weight: 500;
}

.hours td {
  text-align: right;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.hours-note {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: var(--mint);
  border: 1px solid var(--line);
  font-style: normal;
}

.contact-phone {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
}

.contact-phone:hover {
  text-decoration: underline;
}

.map-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background:
    repeating-linear-gradient(45deg, rgba(10, 116, 112, 0.05) 0 12px, transparent 12px 24px),
    var(--mint);
}

.map-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.map-pin {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--white);
  color: var(--accent);
  box-shadow: var(--shadow);
}

/* The live map sits on top; the fallback shows through only if it never paints. */
.map-frame iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-caption {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.map-caption a {
  font-weight: 700;
}

/* CTA */

.cta {
  padding: 64px 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(76, 201, 190, 0.28), transparent 45%),
    linear-gradient(135deg, var(--deep), #0a5a57);
  color: var(--white);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.cta h2 {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  text-wrap: balance;
}

.cta-sub {
  margin-top: 10px;
  color: #d3ebe8;
  font-size: 1.0625rem;
}

/* Footer */

.site-footer {
  padding: 36px 0 44px;
  background: #082a2f;
  color: #c6dcd9;
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 4px;
}

.site-footer a {
  color: var(--white);
}

.footer-copy {
  margin-top: 10px;
  color: #9fbdb9;
}

/* Small phones */

@media (max-width: 479px) {
  .logo-text {
    font-size: 1.05rem;
  }

  .logo-text em {
    display: block;
    font-size: 0.85em;
  }
}

/* Tablet */

@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-header-short {
    display: none;
  }

  .btn-header-long {
    display: inline;
  }
}

/* Desktop */

@media (min-width: 960px) {
  .header-inner {
    min-height: 76px;
  }

  .header-nav {
    display: flex;
    gap: 32px;
    margin-left: auto;
    margin-right: 12px;
  }

  .header-nav a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
  }

  .header-nav a:hover {
    border-bottom-color: var(--accent);
  }

  .hero {
    padding: 88px 0 104px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
  }

  .lead {
    font-size: 1.1875rem;
  }

  .fact-card {
    padding: 14px 30px;
  }

  .fact-rating {
    display: flex;
  }

  .section {
    padding: 104px 0;
  }

  .section-head {
    margin-bottom: 48px;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .card {
    padding: 32px 30px;
  }

  .why-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .why-list li {
    padding: 34px 30px 32px;
  }

  .visit-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 64px;
    align-items: center;
  }

  .map-frame {
    aspect-ratio: auto;
    height: 360px;
  }

  .cta {
    padding: 88px 0;
  }

  .cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 28px;
  }

  .footer-name {
    margin-bottom: 0;
  }

  .footer-copy {
    margin-top: 0;
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .card {
    transition: none;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }
}
