/* Feusier Orthodontics brand tokens, taken from santabarbaraortho.com */
:root {
  --teal: #1B92AB;
  --teal-deep: #1C5D76;
  --brown: #574C3F;
  --navy: #0C2D39;
  --cream: #F8F5F1;
  --sand: #ECE7E1;
  --beige: #E6DCD2;
  --taupe: #AC9A8E;
  --white: #FFFFFF;

  --font-display: "Outfit", system-ui, sans-serif;
  --font-accent: "EB Garamond", Georgia, serif;
  --font-body: "Lora", Georgia, serif;

  --radius: 22px;
  --shadow: 0 1px 2px rgba(12, 45, 57, .04), 0 12px 40px -12px rgba(12, 45, 57, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font: 17px/27px var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--teal-deep); }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto;
  padding: 18px 20px;
  padding-top: max(18px, env(safe-area-inset-top));
}
.logo { height: 48px; width: auto; }
.lang {
  font: 600 12px/1 var(--font-display); letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--teal-deep); background: transparent;
  border: 1px solid var(--beige); border-radius: 50px;
  padding: 10px 14px; min-height: 44px; cursor: pointer;
}
.lang:hover { border-color: var(--teal); }

/* ---------- Hero ---------- */
.hero {
  max-width: 1120px; margin: 0 auto;
  padding: 4px 20px 36px;
  display: grid; gap: 22px;
}
.referral-chip {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
  padding: 8px 16px 8px 12px;
  background: var(--white); border: 1px solid var(--beige); border-radius: 50px;
  font: italic 400 17px/1.3 var(--font-accent); color: var(--teal-deep);
}
.chip-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 4px rgba(27, 146, 171, .15);
}
h1 {
  margin: 0;
  font: 100 clamp(34px, 9.4vw, 75px)/0.98 var(--font-display);
  letter-spacing: -0.03em; text-transform: uppercase;
  color: var(--brown);
}
.lede { margin: 14px 0 0; max-width: 34ch; font-size: 16px; line-height: 25px; }
.lede strong { font-weight: 500; color: var(--teal-deep); }

.doctor { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.doctor img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 20%;
  border: 3px solid var(--white); box-shadow: var(--shadow);
}
.doctor-name { margin: 0; font: 600 16px/1.3 var(--font-display); color: var(--navy); }
.doctor-cred { margin: 2px 0 0; font: italic 400 17px/1.3 var(--font-accent); color: var(--teal-deep); }

/* ---------- Form card ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px 20px;
  scroll-margin-top: 20px;
}
.card-title {
  margin: 0;
  font: 300 24px/1.15 var(--font-display); letter-spacing: -0.01em;
  color: var(--navy);
}
.card-sub { margin: 6px 0 20px; font-size: 15px; line-height: 22px; color: #4c5e65; }

.who { border: 0; padding: 0; margin: 0 0 16px; }
.who legend, .field label {
  display: block; margin-bottom: 8px;
  font: 600 13px/1 var(--font-display); letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--teal-deep);
}
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 5px; background: var(--cream); border-radius: 16px;
}
.segmented.three { grid-template-columns: 1fr 1fr 1fr; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block; text-align: center;
  padding: 13px 8px; border-radius: 12px;
  font: 400 16px/1 var(--font-display); color: var(--brown);
  transition: background .2s, color .2s, box-shadow .2s;
}
.segmented input:checked + span { background: var(--white); color: var(--teal-deep); font-weight: 600; box-shadow: 0 2px 8px rgba(12, 45, 57, .1); }
.segmented input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

.field { margin-bottom: 16px; }
.field input {
  width: 100%;
  font: 400 18px/1.2 var(--font-display); color: var(--navy);  /* 16px+ keeps iOS from zooming */
  padding: 16px 16px;
  background: var(--cream);
  border: 1.5px solid transparent; border-radius: 14px;
  transition: border-color .2s, background .2s;
}
.field input::placeholder { color: var(--taupe); }
.field input:focus { outline: none; border-color: var(--teal); background: var(--white); }
.field input[aria-invalid="true"] { border-color: #c2563b; }
.error { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: #a8452c; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 17px 30px;
  font: 600 20px/1.1 var(--font-accent);
  color: var(--white); background: var(--teal);
  border: 0; border-radius: 50px; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(27, 146, 171, .7);
  transition: background .2s, transform .1s;
}
.btn:hover { background: var(--teal-deep); }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn-ghost { background: transparent; color: var(--teal-deep); border: 1.5px solid var(--teal); box-shadow: none; }
.btn-ghost:hover { background: var(--cream); }

.consent { margin: 14px 4px 0; font-size: 13px; line-height: 18px; color: #6b7a80; text-align: center; }

.talk-now {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--sand);
  font: italic 400 17px/1.3 var(--font-accent); color: var(--brown);
}
.talk-now { align-items: center; }
.talk-now a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font: 600 14px/1 var(--font-display); letter-spacing: 1.4px; text-transform: uppercase; text-decoration: none; }

/* Thank-you state */
.thanks { text-align: center; padding: 6px 0 4px; outline: none; animation: rise .5s ease both; }
.thanks .card-sub { margin-bottom: 20px; }
.check {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 50%;
  background: rgba(27, 146, 171, .12); display: grid; place-items: center;
}
.check svg { width: 28px; height: 28px; fill: none; stroke: var(--teal); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .5s .25s ease forwards; }
.thanks .video { margin: 0 0 18px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Trust strip ---------- */
.trust {
  list-style: none; margin: 0; padding: 18px 20px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px;
  background: var(--teal-deep); color: var(--white);
  font: 600 13px/1.4 var(--font-display); letter-spacing: 1.4px; text-transform: uppercase;
}
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #8fd3e1; }

/* ---------- Sections ---------- */
.video-section, .steps, .locations { max-width: 880px; margin: 0 auto; padding: 56px 20px; }
.steps { background: var(--sand); max-width: none; }
.steps > * { max-width: 840px; margin-left: auto; margin-right: auto; }
.eyebrow { margin: 0 0 6px; font: italic 300 22px/1.2 var(--font-accent); color: var(--teal-deep); text-align: center; }
.section-title {
  margin: 0 0 28px; text-align: center;
  font: 100 clamp(34px, 8vw, 54px)/1 var(--font-display);
  letter-spacing: -0.03em; text-transform: uppercase; color: var(--brown);
}

.video { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--navy); box-shadow: var(--shadow); }
.video video { width: 100%; height: 100%; object-fit: cover; }
.video-poster { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: none; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 42%; transition: transform .6s ease; }
.video-poster:hover img { transform: scale(1.03); }
.video-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,45,57,0) 45%, rgba(12,45,57,.55)); }
.play {
  position: absolute; left: 76%; top: 46%; transform: translate(-50%, -50%);  /* over the ocean, clear of Dr. Feusier */
  width: 72px; height: 72px; border-radius: 50%; z-index: 1;
  background: rgba(255,255,255,.92); display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: transform .2s;
}
.video-poster:hover .play { transform: translate(-50%, -50%) scale(1.06); }
.play svg { width: 30px; height: 30px; fill: var(--teal); margin-left: 4px; }
.video-caption {
  position: absolute; left: 20px; bottom: 16px; z-index: 1;
  font: 600 12px/1 var(--font-display); letter-spacing: 1.6px; text-transform: uppercase; color: var(--white);
}
.video-soon {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 20px;
  background: rgba(12,45,57,.72); color: var(--white); font: italic 400 22px/1.3 var(--font-accent);
}

.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 16px; align-items: center; background: var(--cream); border-radius: 18px; padding: 16px 18px; }
.num {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font: 300 18px/1 var(--font-display); color: var(--white); background: var(--teal);
}
.steps h3 { margin: 2px 0 4px; font: 600 15px/1.3 var(--font-display); letter-spacing: 1.2px; text-transform: uppercase; color: var(--teal-deep); }
.steps p { margin: 0; font-size: 16px; line-height: 25px; }

/* Reviews: swipeable on phones, grid on desktop */
.reviews { padding: 56px 0 8px; }
.review-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px;
  padding: 4px 20px 24px; scrollbar-width: none;
}
.review-track::-webkit-scrollbar { display: none; }
.review {
  scroll-snap-align: start; margin: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  background: var(--white); border-radius: 18px; padding: 24px 22px 20px; box-shadow: var(--shadow);
}
.review blockquote {
  margin: 0; position: relative; padding-top: 26px;
  font: italic 400 20px/1.4 var(--font-accent); color: var(--navy);
}
.review blockquote::before {
  content: "\201C"; position: absolute; top: -14px; left: -2px;
  font: 400 64px/1 var(--font-accent); color: var(--teal); opacity: .5;
}
.review figcaption { display: flex; align-items: center; gap: 10px; font: 400 14px/1 var(--font-body); color: #6b7a80; }
.initials {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sand); color: var(--teal-deep); font: 600 11px/1 var(--font-display); letter-spacing: .5px;
}

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; padding: 56px 20px 8px; }
.faq details { border-bottom: 1px solid var(--beige); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 40px 20px 0;
  font: 600 15px/1.45 var(--font-display); letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--teal-deep);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 1.5px solid var(--teal); border-bottom: 1.5px solid var(--teal);
  transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 4px; }
.faq details p { margin: 0 0 20px; font-size: 16px; line-height: 26px; color: #34484f; animation: rise .3s ease both; }

/* Stars above reviews */
.stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 10px; }
.stars svg { width: 22px; height: 22px; fill: #E2B24A; }

/* Locations: office toggle + one card */
.office-toggle { max-width: 420px; margin: 0 auto 16px; background: var(--sand); }
.loc { max-width: 560px; margin: 0 auto; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.loc-photos { position: relative; }
.loc-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 16 / 10; animation: rise .35s ease both;
}
.loc-track::-webkit-scrollbar { display: none; }
.loc-track { background: var(--sand); }  /* soft placeholder while a photo loads */
.loc-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.loc-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.loc-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: background .2s, transform .2s; }
.loc-dots span.on { background: var(--white); transform: scale(1.25); }
.loc-body { padding: 22px; }
.loc-address { margin: 0 0 14px; font-size: 16px; line-height: 24px; }
.loc-address strong { display: block; margin-bottom: 2px; font: 300 26px/1.2 var(--font-display); text-transform: uppercase; color: var(--brown); }
.hours { list-style: none; margin: 0 0 18px; padding: 0; font-size: 15px; line-height: 22px; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; }
.hours li.today { background: var(--cream); font-weight: 500; color: var(--teal-deep); }
.hours li.lunch { justify-content: center; margin-top: 6px; font: italic 400 16px/1.3 var(--font-accent); color: var(--brown); }
.loc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pill {
  display: flex; align-items: center; justify-content: center;
  padding: 13px 6px; border-radius: 50px; border: 1.5px solid var(--teal);
  font: 600 13px/1 var(--font-display); letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--teal-deep); text-decoration: none; min-height: 44px;
}
.pill:first-child { background: var(--teal); color: var(--white); }

.footer {
  background: var(--teal-deep); color: rgba(255,255,255,.85); text-align: center;
  padding: 44px 20px calc(110px + env(safe-area-inset-bottom));
  font: italic 400 18px/1.4 var(--font-accent);
}
.footer-logo { height: 40px; width: auto; margin: 0 auto 14px; }
.footer p { margin: 0 0 10px; }
.footer a { display: inline-block; padding: 14px 8px; color: var(--white); font: 600 13px/1 var(--font-display); letter-spacing: 1.6px; text-transform: uppercase; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(248, 245, 241, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--beige);
  animation: rise .3s ease both;
}

/* ---------- Phones and tablets: the form comes first ----------
   On a phone, the first screen should show the headline and the start of the form.
   Dr. Feusier's photo moves just below the form, next to "Rather talk now?". */
@media (max-width: 879px) {
  .topbar { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 10px; }
  .logo { height: 40px; }
  .hero { gap: 0; padding-bottom: 28px; }
  .hero-copy { display: contents; }
  .referral-chip { justify-self: start; margin-bottom: 12px; font-size: 16px; }
  h1 { font-size: clamp(30px, 8.6vw, 44px); line-height: 1; }
  .lede { margin-top: 10px; font-size: 16px; line-height: 24px; }
  .card { order: 1; margin-top: 18px; padding-top: 22px; }
  .card-sub { margin-bottom: 16px; }
  .doctor { order: 2; margin-top: 22px; justify-content: center; }
}

/* ---------- Desktop ---------- */
@media (min-width: 880px) {
  .topbar { padding: 28px 32px; }
  .logo { height: 58px; }
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; padding: 40px 32px 72px; }
  .lede { margin-top: 20px; font-size: 19px; line-height: 30px; }
  .doctor { margin-top: 26px; }
  .doctor img { width: 88px; height: 88px; }
  .card { padding: 34px 32px 24px; }
  .steps ol { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; }
  .review-track { grid-auto-flow: row; grid-template-columns: 1fr 1fr; max-width: 880px; margin: 0 auto; overflow: visible; }
  .sticky-cta { display: none !important; }
  .footer { padding-bottom: 44px; }
}

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

/* Optional insurance on the thank-you card */
.ins-ask { margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--sand); text-align: left; }
.ins-ask-title { margin: 0 0 4px; font: 400 22px/1.2 var(--font-display); color: var(--navy); text-align: center; }
.ins-ask-sub { margin: 0 0 16px; font: italic 400 17px/1.35 var(--font-accent); color: var(--brown); text-align: center; }
.ins-ask .error { margin: -6px 0 12px; }
.ins-none {
  display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 0;
  background: none; border: 0; cursor: pointer;
  font: 600 14px/1 var(--font-display); letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal-deep);
}
.ins-done { margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--sand); font: italic 400 18px/1.4 var(--font-accent); color: var(--teal-deep); }
