/* ==========================================================================
   Westport Dental Associates — Full Arch Implants landing page
   Mobile-first. Breakpoints: 640px (tablet), 900px (desktop), 1100px (wide)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --blue: #315b9b;
  --blue-deep: #27497c;
  --blue-ink: #1e3a63;
  --teal: #17a2b8;
  --teal-deep: #13889a;
  --amber: #ffc107;
  --amber-ink: #2b2000;
  --ink: #495057;
  --ink-strong: #2f353a;
  --muted: #6b737b;
  --white: #ffffff;
  --tint: #f4f7fb;
  --tint-2: #eaf1f9;
  --border: #dbe4f0;
  --border-soft: #e3ebf5;
  --error: #c0392b;

  --shadow: 0 18px 44px rgba(31, 58, 99, .10);
  --radius: 14px;
  --wrap: 1160px;
  --gutter: 16px;
  --header-h: 72px;
  --topbar-h: 40px;
  --mobile-bar-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
figure { margin: 0; }
p { margin: 0 0 1rem; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--blue-ink);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 4.3vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
h3 { font-size: 1.14rem; font-weight: 700; letter-spacing: -.01em; }

:focus-visible { outline: 3px solid rgba(49, 91, 155, .45); outline-offset: 3px; }

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

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

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(48px, 7vw, 86px) 0; }
.section--tint { background: var(--tint); }

.section-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 40px); text-align: center; }
.section-head p:last-child { margin-bottom: 0; }

.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.lede { font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 7px 15px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--tint-2);
  border-radius: 999px;
}

.subhead { margin: clamp(40px, 6vw, 56px) 0 20px; font-size: 1.3rem; }

.tick {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--amber);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 16px 28px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 10px 24px rgba(49, 91, 155, .28); }
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-2px); }
.btn-teal { background: var(--teal); color: var(--white); box-shadow: 0 10px 24px rgba(23, 162, 184, .26); }
.btn-teal:hover { background: var(--teal-deep); transform: translateY(-2px); }
.btn-outline { background: var(--white); color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--tint-2); }
.btn-sm { min-height: 44px; padding: 11px 20px; font-size: .93rem; border-radius: 8px; }
.btn-lg { padding: 18px 34px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }

/* ---------- Top bar ---------- */
.topbar { background: var(--blue); color: #fff; font-size: .84rem; }
.topbar .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 4px 18px; padding-top: 8px; padding-bottom: 8px; text-align: center;
}
.topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .dot { display: none; opacity: .55; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(31, 58, 99, .08); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h); padding-top: 8px; padding-bottom: 8px;
}
.logo { display: flex; align-items: center; flex: 0 0 auto; }
.logo img { width: auto; height: 50px; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.header-phone {
  color: var(--blue); font-size: 1rem; font-weight: 800; line-height: 1.25;
  text-align: right; text-decoration: none; white-space: nowrap;
}
.header-phone small {
  display: block; margin-top: 2px;
  color: var(--ink); font-size: .68rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
}
.header-cta { display: none; }

/* ---------- Hero ----------
   Photo sits behind the copy; a white fade keeps text legible.
   Mobile: photo shows as a band at the top, fading down into white.
   Tablet+: photo fills the section, fading in from the left. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0 0 clamp(48px, 7vw, 86px);
  background: #fff;
}
.hero-bg {
  position: relative;
  z-index: -1;
  height: min(260px, 32svh);
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 45%, #fff 100%);
}
.hero-copy { position: relative; margin-top: -40px; }
.hero h1 { margin-bottom: 18px; }
.hero h1 span { color: var(--blue); }
.hero-sub { max-width: 36em; font-size: 1.08rem; }

.cta-block { display: flex; flex-direction: column; align-items: flex-start; margin-top: 24px; }
.cta-block .btn { width: 100%; }
.cta-note { margin: 12px 0 0; font-size: .92rem; color: var(--ink); }
.cta-fee {
  display: inline-block;
  margin: 14px 0 0; padding: 6px 12px;
  font-size: .9rem; font-weight: 700; line-height: 1.4; color: var(--blue-ink);
  background: var(--tint-2); border-left: 4px solid var(--amber); border-radius: 6px;
}
.cta-fee + .cta-note { margin-top: 10px; }
.cta-row .cta-fee { margin-top: 16px; }
.cta-fee--light { color: #fff; background: rgba(255, 255, 255, .12); }
.cta-note a { font-weight: 700; white-space: nowrap; }

.trust-line {
  display: grid; gap: 10px;
  margin: 26px 0 0; padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
  font-size: .93rem; font-weight: 600; color: var(--ink-strong);
}
.trust-line li { display: flex; align-items: center; gap: 10px; }

/* ---------- Highlight strip ---------- */
.strip { padding: 20px 0; background: var(--blue); color: #fff; }
.strip-list {
  display: grid; gap: 10px;
  margin: 0; padding: 0; list-style: none;
  font-size: .95rem; font-weight: 600; text-align: center;
}
.strip b { font-weight: 800; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.card { padding: 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.card--soft { background: var(--tint); border-color: var(--border-soft); }

/* ---------- Problem ---------- */
.quote-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.quote {
  display: flex; align-items: center;
  margin: 0; padding: 18px 22px;
  font-size: 1rem; font-weight: 600; color: var(--ink-strong);
  background: #fff;
  border: 1px solid var(--border); border-left: 5px solid var(--teal); border-radius: var(--radius);
}
.bridge {
  margin-top: 30px; padding: 22px 24px;
  font-size: 1.04rem; font-weight: 600; color: var(--blue-ink);
  background: #fff; border: 1px dashed var(--blue); border-radius: var(--radius);
}

/* ---------- Fit ---------- */
.fit-card { padding: 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.fit-card--yes { border-top: 6px solid var(--blue); }
.fit-card--maybe { border-top: 6px solid var(--amber); background: var(--tint); }
.fit-card h3 { margin-bottom: 16px; font-size: 1.16rem; }

.checks { margin: 0; padding: 0; list-style: none; }
.checks li { position: relative; margin-bottom: 13px; padding-left: 34px; font-weight: 500; }
.checks li:last-child { margin-bottom: 0; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2em;
  width: 20px; height: 20px; border-radius: 50%; background: var(--blue);
}
.checks li::after {
  content: ""; position: absolute; left: 6px; top: calc(.2em + 6px);
  width: 8px; height: 4px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.checks--amber li::before { background: var(--amber); }
.checks--amber li::after { border-color: var(--amber-ink); }

.honest {
  margin-top: 26px; padding: 24px 26px;
  font-size: 1.03rem; font-weight: 600; color: #fff;
  background: var(--blue); border-radius: var(--radius);
}
.honest b { color: var(--amber); }

/* ---------- Steps ---------- */
.steps-list { display: grid; gap: 20px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; padding: 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 16px;
  font-size: 1.05rem; font-weight: 800; color: #fff;
  background: var(--blue); border-radius: 12px;
}
.step p { margin: 0; font-size: .97rem; }

.finance {
  display: flex; align-items: center; gap: 14px;
  margin: 26px 0 0; padding: 18px 22px;
  font-weight: 600; color: var(--ink-strong);
  background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--amber); border-radius: var(--radius);
}
.cta-row { display: flex; flex-direction: column; align-items: center; margin-top: 34px; text-align: center; }
.cta-row .btn { width: 100%; }

/* ---------- Why us ---------- */
/* Implant team: prosthodontist + oral surgeon */
.implant-team { display: grid; gap: 20px; grid-template-columns: 1fr; }
.implant-team__card {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--border); border-top: 6px solid var(--blue); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.implant-team__card h3 { margin-bottom: 2px; font-size: 1.25rem; }
.implant-team__card p:last-child { margin: 0; font-size: .97rem; }
.implant-team__label {
  display: inline-block; margin-bottom: 12px; padding: 4px 10px;
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber-ink); background: var(--amber); border-radius: 999px;
}
.implant-team__role { margin-bottom: 12px; font-size: .92rem; font-weight: 700; color: var(--blue); }
.implant-team__note { margin: 20px auto 0; max-width: 760px; font-weight: 600; text-align: center; color: var(--blue-ink); }
.why-cards { margin-top: clamp(28px, 4vw, 40px); }

.why-card h3 { margin-bottom: 8px; color: var(--blue); }
.why-card p { margin: 0; font-size: .97rem; }

.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.doc {
  display: flex; flex-direction: column;
  overflow: hidden; text-align: center;
  background: linear-gradient(180deg, #eef3fa, #dbe6f4);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.doc-frame { aspect-ratio: 3 / 4; }
.doc--featured { border: 2px solid var(--blue); box-shadow: var(--shadow); }
.doc-role {
  display: block; margin-top: 4px;
  font-size: .72rem; font-weight: 700; line-height: 1.3; color: var(--amber-ink);
}
.doc--featured .doc-name { flex-direction: column; background: var(--amber); border-top-color: var(--amber); }
.doc-frame img { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }
.doc-name {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 12px 8px;
  font-size: .86rem; font-weight: 700; line-height: 1.3; color: var(--blue-ink);
  background: #fff; border-top: 1px solid var(--border);
}
.team-note { margin: 18px 0 0; font-size: .93rem; }

.reviews { display: grid; gap: 18px; grid-template-columns: 1fr; }
.review {
  display: flex; flex-direction: column;
  margin: 0; padding: 24px;
  background: var(--tint); border: 1px solid var(--border-soft); border-radius: var(--radius);
}
.stars { margin-bottom: 10px; font-size: 1.05rem; letter-spacing: 3px; color: var(--amber); }
.review blockquote { flex: 1; margin: 0 0 14px; font-size: 1rem; font-weight: 600; color: var(--ink-strong); }
.review cite { font-size: .88rem; font-style: normal; font-weight: 700; color: var(--blue); }
.reviews--single { max-width: 760px; margin: 0 auto; }
.src-note { margin: 16px 0 0; font-size: .82rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  margin-bottom: 12px; overflow: hidden;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .2s ease;
}
.faq-item[open] { border-color: var(--blue); }
.faq-item summary {
  position: relative;
  padding: 18px 54px 18px 20px;
  font-size: 1rem; font-weight: 700; color: var(--blue-ink);
  list-style: none; cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue);
  transform: rotate(45deg); transition: transform .2s ease, margin-top .2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-body { padding: 0 20px 20px; font-size: .97rem; }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- Booking / close ---------- */
.close { background: var(--blue); color: #fff; }
.close h2 { color: #fff; }
.close .lede { color: #e6eefa; }
.close-grid { display: grid; gap: 30px; align-items: start; }

.form-card {
  padding: 24px 20px;
  color: var(--ink);
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
}
/* GoHighLevel embed: the script resizes the iframe; min-height avoids a jump while it loads */
.form-card--embed { padding: 12px; }
.form-card--embed iframe { display: block; min-height: 690px; }

.trust-bar { margin: 0 0 26px; padding: 0; list-style: none; }
.trust-bar li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  font-weight: 600; color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.trust-bar li:first-child { padding-top: 0; }

.alt-cta { padding: 20px 22px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--radius); }
.alt-cta p { margin: 0; color: #eaf1fa; }
.alt-cta a { color: #fff; font-weight: 800; word-break: break-word; }

.map-frame {
  aspect-ratio: 16 / 10;
  margin-top: 26px; overflow: hidden;
  background: #dce7f5;
  border: 4px solid rgba(255, 255, 255, .18); border-radius: var(--radius);
}
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0 calc(var(--mobile-bar-h) + 28px);
  font-size: .92rem; color: #dfe8f5;
  background: var(--blue-deep);
}
.footer-grid { display: grid; gap: 24px; }
.site-footer h2 { margin-bottom: 6px; font-size: 1.02rem; font-weight: 700; letter-spacing: 0; color: #fff; }
.site-footer address { font-style: normal; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.foot-legal {
  grid-column: 1 / -1;
  margin: 0; padding-top: 18px;
  font-size: .82rem; color: #c3d3e8;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

/* ---------- Sticky mobile action bar ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .12);
  transition: transform .25s ease;
}
.mobile-bar .btn { flex: 1; min-height: 50px; padding: 12px 10px; font-size: .96rem; }
.mobile-bar .btn-outline { flex: 0 0 34%; }
.mobile-bar.is-hidden { transform: translateY(110%); }

/* ==========================================================================
   Very small phones (< 380px)
   ========================================================================== */
@media (max-width: 379px) {
  .logo img { height: 42px; }
  .header-phone { font-size: .92rem; }
  .header-phone small { font-size: .62rem; }
  .eyebrow { font-size: .68rem; letter-spacing: .1em; }
}

/* ==========================================================================
   Tablet (≥ 640px)
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 24px; }

  body { font-size: 17px; }
  .lede { font-size: 1.09rem; }
  .hero-sub { font-size: 1.13rem; }

  .cta-block .btn, .cta-row .btn { width: auto; }

  .trust-line { display: flex; flex-wrap: wrap; gap: 10px 24px; }

  .hero-bg { height: min(340px, 34svh); }
  .hero-copy { max-width: 640px; }

  .strip-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; }

  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .implant-team { grid-template-columns: repeat(2, 1fr); }
  .steps-list { grid-template-columns: repeat(2, 1fr); }
  .steps-list .step:last-child { grid-column: 1 / -1; }
  .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .header-cta { display: inline-flex; }
  .topbar .dot { display: inline; }
  .logo img { height: 58px; }
  .header-phone { font-size: 1.08rem; }
  .header-phone small { font-size: .72rem; }

  .form-card { padding: 30px 28px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Desktop (≥ 900px)
   ========================================================================== */
@media (min-width: 900px) {
  :root { --header-h: 82px; --mobile-bar-h: 0px; }

  /* Fit the hero inside one screen: viewport minus top bar + sticky header */
  .hero {
    display: flex; align-items: center;
    height: calc(100vh - var(--header-h) - var(--topbar-h));
    height: calc(100svh - var(--header-h) - var(--topbar-h));
    min-height: 480px;
    max-height: 760px;
    padding: clamp(24px, 4vh, 56px) 0;
  }
  .hero h1 { font-size: clamp(1.9rem, 1.5vw + 2.6vh, 3.1rem); margin-bottom: 14px; }
  .hero-sub { font-size: 1.05rem; }
  .hero .eyebrow { margin-bottom: 12px; }
  .cta-block { margin-top: 20px; }
  .trust-line { margin-top: 20px; padding-top: 16px; }
  .hero > .wrap { width: 100%; }
  .hero-bg { position: absolute; inset: 0; height: auto; }
  .hero-bg img { object-position: 85% center; }
  .hero-bg::after {
    background: linear-gradient(90deg,
      #fff 0%, #fff 34%, rgba(255, 255, 255, .92) 46%, rgba(255, 255, 255, .5) 58%, rgba(255, 255, 255, 0) 72%);
  }
  .hero-copy { max-width: 580px; margin-top: 0; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .quote-grid { grid-template-columns: repeat(3, 1fr); }
  .team { grid-template-columns: repeat(6, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .reviews--single { grid-template-columns: 1fr; }
  .steps-list { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .steps-list .step { padding: 22px 20px; }
  .steps-list .step:last-child { grid-column: auto; }

  .close-grid { grid-template-columns: 1fr 1fr; gap: 40px; }

  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }

  .mobile-bar { display: none; }
}

/* Short desktop screens: tighten the hero so it still fits in one screen.
   The trust points are repeated in the blue strip directly below. */
@media (min-width: 900px) and (max-height: 760px) {
  .hero .trust-line { display: none; }
  .hero-sub { font-size: 1rem; margin-bottom: 0; }
  .hero .btn-lg { padding: 15px 30px; }
}

/* ==========================================================================
   Wide (≥ 1100px)
   ========================================================================== */
@media (min-width: 1100px) {
  .close-grid { gap: 56px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
