/* ==========================================================
   Kyle Mercer for Dentists
   Brand palette: F1F0EA cream, 2C4A5E primary text,
   30484F dark accent, 1F2628 deepest, FFC124 gold CTA,
   51C2C8 teal accent, 558291 subheading teal
   ========================================================== */

:root {
  --bg: #F1F0EA;
  --text: #2C4A5E;
  --dark: #30484F;
  --deepest: #1F2628;
  --gold: #FFC124;
  --gold-deep: #E0A615;
  --teal: #51C2C8;
  --subhead: #558291;
  --white: #FFFFFF;
  --paper: #FAF8F2;
  --line: rgba(44, 74, 94, 0.12);
  --shadow: 0 12px 36px -18px rgba(31, 38, 40, 0.35);
  --shadow-deep: 0 30px 60px -25px rgba(31, 38, 40, 0.5);
  --r: 6.8px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Libre Franklin", "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: "Fjalla One", "Libre Franklin", sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: var(--subhead); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--gold-deep); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--subhead);
  margin: 0 0 18px;
}
.kicker.centered { text-align: center; }
.kicker.light { color: var(--teal); }

.section-title.light { color: var(--bg); }

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--r);
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  border: none;
  line-height: 1;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--deepest);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-ghost:hover {
  background: var(--text);
  color: var(--bg);
}
.btn-gold {
  background: var(--gold);
  color: var(--deepest);
}
.btn-gold:hover {
  background: var(--gold-deep);
  color: var(--deepest);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-large { padding: 18px 36px; font-size: 15px; }

/* =========================
   Header
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 240, 234, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  color: var(--text);
}
.brand-name {
  font-family: "Fjalla One", sans-serif;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--text);
}
.brand-sub {
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--subhead);
  margin-top: 2px;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}
.nav-links a { color: var(--text); }
.nav-links a:hover { color: var(--gold-deep); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* =========================
   Hero
   ========================= */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 0 100px;
}
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 22, 0.7);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: var(--bg);
  max-width: 720px;
}
.hero-content .eyebrow {
  font-family: "Poppins", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 24px;
}
.hero-content h1 {
  color: var(--bg);
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  margin-bottom: 24px;
}
.hero-lede {
  font-size: 1.12rem;
  color: rgba(241,240,234, 0.92);
  margin-bottom: 36px;
  max-width: 600px;
}
.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-cta-row .btn-primary {
  background: var(--gold);
  color: var(--deepest);
}
.hero-cta-row .btn-primary:hover {
  background: var(--gold-deep);
}
.hero-cta-row .btn-ghost {
  color: var(--bg);
  border-color: rgba(241,240,234, 0.7);
}
.hero-cta-row .btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

/* =========================
   Intro
   ========================= */
.intro { padding: 110px 0 100px; }
.intro-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1180px;
}
.intro-text h2 { color: var(--text); }
.intro-text p { color: var(--dark); }

.intro-portrait {
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  aspect-ratio: 1 / 1;
  background: var(--dark);
}
.intro-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.testimonial {
  background: var(--paper);
  border-left: 3px solid var(--gold);
  padding: 32px 30px;
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.testimonial blockquote {
  margin: 0 0 20px;
  font-family: "Fjalla One", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
}
.testimonial cite {
  font-style: normal;
  font-family: "Poppins", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 600;
  color: var(--subhead);
}
.about-testimonial {
  margin-top: 36px;
}

.practices-testimonial {
  max-width: 760px;
  margin: 88px auto 0;
  background: var(--bg);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  padding: 44px 48px 40px;
  box-shadow: var(--shadow);
  text-align: center;
}
.practices-testimonial .kicker {
  margin-bottom: 22px;
}
.practices-testimonial blockquote {
  margin: 0 0 22px;
  font-family: "Fjalla One", sans-serif;
  font-size: 1.4rem;
  line-height: 1.45;
  color: var(--text);
  letter-spacing: -0.005em;
}
.practices-testimonial cite {
  display: block;
  font-style: normal;
  font-family: "Poppins", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--subhead);
}
@media (max-width: 720px) {
  .practices-testimonial { padding: 32px 24px 28px; margin-top: 56px; }
  .practices-testimonial blockquote { font-size: 1.15rem; }
}

@media (max-width: 880px) {
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .intro-portrait { aspect-ratio: 4 / 3; }
}

/* =========================
   Practices (tile grid)
   ========================= */
.practices {
  background: var(--paper);
  padding: 110px 0 130px;
}
.section-title {
  text-align: center;
  margin-bottom: 64px;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}
.tile {
  position: relative;
  background: var(--bg);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px -8px rgba(31,38,40,0.2);
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
  outline: none;
}
.tile-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: var(--dark);
}
.tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.tile:hover .tile-image img { transform: scale(1.04); }
.tile-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31,38,40,0) 50%, rgba(31,38,40,0.45) 100%);
}
.tile-num {
  position: absolute;
  top: 14px;
  left: 16px;
  background: var(--gold);
  color: var(--deepest);
  font-family: "Fjalla One", sans-serif;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: var(--r);
  letter-spacing: 0.08em;
  z-index: 2;
}
.tile-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tile-time {
  font-family: "Poppins", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 10px;
}
.tile-title {
  font-family: "Fjalla One", sans-serif;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 10px;
}
.tile-teaser {
  font-size: 14.5px;
  color: var(--dark);
  margin: 0 0 18px;
  flex: 1;
}
.tile-link {
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--subhead);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tile-link::after {
  content: "→";
  transition: transform 0.25s ease;
}
.tile:hover .tile-link::after { transform: translateX(4px); }

/* =========================
   Offer
   ========================= */
.offer {
  background: linear-gradient(160deg, var(--text) 0%, var(--deepest) 100%);
  color: var(--bg);
  padding: 120px 0 130px;
  text-align: center;
}
.offer .section-title { color: var(--bg); margin-bottom: 36px; }

.single-offer {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  background: rgba(241,240,234, 0.05);
  border: 1px solid rgba(241,240,234, 0.13);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  padding: 44px 44px 40px;
}
.free-offer-line {
  font-family: "Fjalla One", sans-serif;
  font-size: 1.4rem;
  color: var(--bg);
  margin: 0 0 26px;
  line-height: 1.4;
}
.offer-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}
.offer-bullets li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: rgba(241,240,234, 0.86);
  font-size: 15.5px;
  line-height: 1.55;
  border-top: 1px solid rgba(241,240,234, 0.10);
}
.offer-bullets li:first-child { border-top: none; }
.offer-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 14px;
  height: 2px;
  background: var(--gold);
}
.single-offer-cta {
  text-align: center;
  margin-top: 4px;
}
.single-offer .btn-primary {
  background: var(--gold);
  color: var(--deepest);
  display: inline-block;
}
.single-offer .btn-primary:hover {
  background: var(--bg);
  color: var(--text);
}
.offer-fineprint {
  margin-top: 24px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: rgba(241,240,234, 0.55);
}
@media (max-width: 720px) {
  .single-offer { padding: 32px 24px 28px; }
}

.stat-line {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: "Fjalla One", sans-serif;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--subhead);
}

/* =========================
   About
   ========================= */
/* =========================
   Mercer Lineage
   ========================= */
.mercer {
  background: linear-gradient(170deg, #232E33 0%, #1F2628 100%);
  color: var(--bg);
  padding: 120px 0;
  border-top: 1px solid rgba(255, 193, 36, 0.08);
}
.mercer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: start;
}
.mercer-content .kicker {
  color: var(--gold);
}
.mercer-content h2 {
  color: var(--bg);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  max-width: 580px;
  margin-bottom: 28px;
}
.mercer-content p {
  color: rgba(241, 240, 234, 0.82);
  font-size: 16px;
  line-height: 1.7;
  max-width: 620px;
}
.mercer-logo {
  margin: 20px 0 0;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid rgba(241, 240, 234, 0.16);
  border-radius: var(--r);
  background: rgba(241, 240, 234, 0.04);
  align-self: stretch;
}
.mercer-logo img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.mercer-logo figcaption {
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: rgba(241, 240, 234, 0.55);
  margin: 0;
}
.mercer-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 12px;
}
.mercer-stat {
  border-left: 2px solid var(--gold);
  padding: 6px 0 6px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mercer-stat-num {
  font-family: "Fjalla One", sans-serif;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.mercer-stat-label {
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: rgba(241, 240, 234, 0.7);
}
@media (max-width: 880px) {
  .mercer-grid { grid-template-columns: 1fr; gap: 48px; }
  .mercer-stats { flex-direction: column; }
}

.about { padding: 120px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 70px;
  align-items: start;
}
.about-image {
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  aspect-ratio: 2 / 3;
  background: var(--dark);
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-text h2 { font-size: clamp(2rem, 3.8vw, 2.8rem); }
.about-quote {
  font-family: "Fjalla One", sans-serif;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--subhead);
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  margin-top: 30px;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* =========================
   Contact
   ========================= */
.contact {
  position: relative;
  padding: 130px 0 140px;
  text-align: center;
  overflow: hidden;
  color: var(--bg);
}
.contact-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.contact-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  display: block;
}
.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 22, 0.7);
}
.contact-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}
.contact h2 {
  color: var(--bg);
  margin-bottom: 18px;
}
.contact p {
  color: rgba(241, 240, 234, 0.9);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

/* =========================
   Footer
   ========================= */
.site-footer {
  background: var(--deepest);
  color: rgba(241,240,234,0.7);
  padding: 36px 0;
  font-size: 13px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-meta { color: rgba(241,240,234,0.45); }

/* =========================
   Modal
   ========================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[aria-hidden="false"] { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31,38,40,0.72);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}
.modal-panel {
  position: relative;
  background: var(--bg);
  border-radius: 10px;
  max-width: 880px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  box-shadow: var(--shadow-deep);
  animation: panelIn 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.modal-image-wrap {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-content {
  padding: 44px 44px 40px;
  overflow-y: auto;
}
.modal-content h3 {
  font-size: 1.8rem;
  line-height: 1.15;
  margin: 6px 0 14px;
  color: var(--text);
}
.modal-time {
  font-family: "Poppins", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 26px;
}
.modal-content ol, .modal-content ul {
  padding-left: 22px;
  margin: 18px 0 22px;
}
.modal-content li {
  margin-bottom: 12px;
  color: var(--dark);
  font-size: 15.5px;
  line-height: 1.55;
}
.modal-content p {
  color: var(--dark);
  font-size: 15.5px;
}
.modal-content .why {
  background: var(--paper);
  border-left: 3px solid var(--gold);
  padding: 16px 18px;
  border-radius: var(--r);
  margin-top: 24px;
  font-size: 14.5px;
  color: var(--dark);
}
.modal-content .why strong {
  display: block;
  font-family: "Fjalla One", sans-serif;
  letter-spacing: 0.06em;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 4px;
  font-size: 14px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--deepest);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.modal-close:hover {
  background: var(--gold);
}
@media (max-width: 760px) {
  .modal-panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }
  .modal-image-wrap {
    aspect-ratio: 16 / 9;
  }
  .modal-content {
    padding: 32px 28px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Lock body scroll when modal open */
body.modal-open { overflow: hidden; }

/* =========================
   Problem-submission modal
   ========================= */
.modal-form .modal-panel.form-panel {
  display: block;
  grid-template-columns: none;
  max-width: 620px;
  padding: 0;
  overflow-y: auto;
  max-height: 92vh;
  -webkit-overflow-scrolling: touch;
}
.form-panel .form-state {
  padding: 44px 44px 36px;
}
.form-panel .kicker {
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.form-panel h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 18px;
  line-height: 1.2;
}
.form-lede {
  color: var(--dark);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 24px;
}
.form-field {
  display: block;
  margin-bottom: 18px;
}
.form-field > span {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--subhead);
  margin-bottom: 8px;
  line-height: 1.4;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: "Libre Franklin", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(255, 193, 36, 0.18);
  background: var(--white);
}
.form-field textarea {
  resize: vertical;
  min-height: 96px;
  font-family: "Libre Franklin", sans-serif;
}
.form-field input.invalid,
.form-field textarea.invalid {
  border-color: #c44b3a;
  box-shadow: 0 0 0 3px rgba(196, 75, 58, 0.12);
}
.form-submit {
  width: 100%;
  margin-top: 8px;
}
.form-fineprint {
  font-size: 12.5px;
  color: var(--subhead);
  text-align: center;
  margin: 16px 0 0;
}
.form-state-thanks {
  text-align: center;
}
.form-state-thanks .btn {
  margin-top: 18px;
}
@media (max-width: 600px) {
  .form-panel .form-state { padding: 36px 24px 28px; }
}

/* Contact section fallback link */
.contact-fallback {
  margin-top: 24px;
  font-size: 13px;
  color: var(--subhead);
}
.contact-fallback a {
  color: var(--gold-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
