/* Uptown Markham Dental — design tokens taken from the live Elementor site:
   teal #0a96a9 with #3acbba / #28ccc5 accents, Poppins throughout. */

:root {
  --teal: #0a96a9;
  --teal-dark: #077b8b;
  --mint: #3acbba;
  --aqua: #28ccc5;
  --ink: #12333a;
  --body: #4a5f65;
  --line: #e3ecee;
  --surface: #f4fafb;
  --white: #fff;

  --wrap: 1180px;
  --radius: 16px;
  --shadow: 0 6px 28px rgb(10 150 169 / 10%);
  --shadow-lg: 0 14px 44px rgb(10 150 169 / 16%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1.1em;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section--tint {
  background: var(--surface);
}

/* A standalone call-to-action row: tighter than a full section. */
.section-cta {
  padding: 0 0 clamp(2.5rem, 5vw, 4rem);
}

/* Small teal kicker above a section heading */
.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.65rem;
}

.center {
  text-align: center;
}

.lede {
  font-size: 1.05rem;
  max-width: 62ch;
}

.center .lede {
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

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

.btn--primary {
  background: var(--teal);
  color: var(--white);
}

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

.btn--ghost {
  border-color: var(--teal);
  color: var(--teal);
}

.btn--ghost:hover {
  background: var(--teal);
  color: var(--white);
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.4rem 0;
}

/* logo.png is cropped to the artwork (243x149), so this height is the mark
   itself rather than mostly transparent margin. Keep it under 149px — past
   that the raster upscales and softens. */
.header__logo img {
  height: 116px;
  width: auto;
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
}

/* Mobile menu is a checkbox toggle — no JavaScript needed */
.nav-toggle,
.nav-toggle-label {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(150deg, var(--surface) 0%, #e6f6f7 100%);
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* .hero is the homepage only — inner pages use .page-hero. Brand teal rather
   than --ink, and a step down from the global h1 so it sits closer to the
   lede beneath it. */
.hero h1 {
  color: var(--teal);
  font-size: clamp(1.95rem, 4vw, 2.9rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

/* ---------- Inner page banner ---------- */

.page-hero {
  position: relative;
  padding: clamp(1.5rem, 3.5vw, 2.5rem) 0;
  background: linear-gradient(rgb(10 150 169 / 82%), rgb(40 204 197 / 82%)),
    url("/assets/img/banner.png") center / cover no-repeat;
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  /* Smaller than the global h1 — banner titles are labels, not headlines. */
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  /* Nothing follows the title now that the breadcrumb is gone. */
  margin-bottom: 0;
}

/* ---------- Contact info cards ---------- */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}

.info-card {
  display: block;
  text-align: center;
  padding: 2.25rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--body);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.info-card__icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: #e6f6f7;
  color: var(--teal);
  font-size: 1.5rem;
}

.info-card h3 {
  margin-bottom: 0.35rem;
}

.info-card p {
  margin: 0;
  font-size: 0.95rem;
  word-break: break-word;
}

/* ---------- Map ---------- */

.map {
  width: 100%;
  height: clamp(300px, 45vw, 430px);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

/* ---------- Split content rows ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split--flip .split__media {
  order: -1;
}

/* ---------- Service cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.card__body {
  padding: 1.5rem;
}

.card__body p {
  font-size: 0.94rem;
  margin-bottom: 0;
}

/* ---------- Appointment form ---------- */

.booking {
  background: linear-gradient(135deg, var(--teal) 0%, var(--aqua) 100%);
  color: var(--white);
}

.booking h2,
.booking .eyebrow {
  color: var(--white);
}

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-lg);
  max-width: 860px;
  margin: 2.5rem auto 0;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.field label,
.fieldset-legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  background: var(--white);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.55rem;
}

/* Radio/checkbox rendered as a selectable pill */
.options label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
}

.options input {
  accent-color: var(--teal);
  margin: 0;
}

.options label:has(input:checked) {
  border-color: var(--teal);
  background: #e6f6f7;
  color: var(--teal-dark);
}

.required {
  color: #cf2e2e;
}

/* Honeypot. Positioned off-screen rather than display:none, because the better
   spam bots skip anything that is display:none or hidden — and a field named
   "website" is exactly what a link-selling bot wants to fill. aria-hidden and
   tabindex="-1" in the markup keep it away from screen readers and the tab
   order, so it is invisible to real visitors by every route that matters. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* reCAPTCHA widget — Google renders a fixed-width iframe, so centre it and
   let it shrink on narrow phones rather than overflow the card. */
.captcha {
  display: flex;
  justify-content: center;
  margin: 0 0 1.5rem;
}

@media (max-width: 360px) {
  .captcha {
    transform: scale(0.88);
    transform-origin: center;
  }
}

/* ---------- Testimonials ---------- */

/* Single column, spanning the full --wrap width. */
.testimonials {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 3rem;
}

.quote {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem;
  box-shadow: var(--shadow);
}

.quote p {
  font-size: 0.95rem;
  font-style: italic;
}

.quote__by {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.quote__by img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.quote__by strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

/* On a phone the card padding stacks on top of .wrap's own 1.25rem inset, so
   the quote ends up in a narrow channel down the middle. Strip it back to the
   minimum that keeps text off the mint border. */
@media (max-width: 600px) {
  .testimonials {
    gap: 0.7rem;
    margin-top: 2rem;
  }

  .quote {
    padding: 0.8rem 0.85rem;
  }

  .quote__by {
    gap: 0.6rem;
    margin-top: 0.7rem;
  }

  .quote__by img {
    width: 36px;
    height: 36px;
  }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: #b9cfd4;
  padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
}

.footer a {
  color: #b9cfd4;
}

.footer a:hover {
  color: var(--mint);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 2.5rem;
}

.footer__logo {
  height: 52px;
  width: auto;
  background: var(--white);
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  margin-bottom: 1rem;
}

.footer h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.93rem;
}

.footer address {
  font-style: normal;
  font-size: 0.93rem;
  display: grid;
  gap: 0.6rem;
}

.footer__bottom {
  border-top: 1px solid rgb(255 255 255 / 12%);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero__grid,
  .split {
    grid-template-columns: 1fr;
  }

  .split--flip .split__media {
    order: 0;
  }

  /* Phone order: heading, lede, photo, then the buttons — so the CTAs sit
     directly above the fold's edge rather than being scrolled past.
     display:contents lifts the copy's children up into the grid, because
     .hero__actions cannot be ordered against .hero__media while it is nested
     a level below it. The grid gap has to go with it: applied to five items
     instead of two it would push the heading and lede far apart. */
  .hero__copy {
    display: contents;
  }

  .hero__grid {
    gap: 0;
  }

  .hero__media {
    order: 1;
    margin-top: 1.75rem;
  }

  .hero__actions {
    order: 2;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .header__cta {
    display: none;
  }

  /* A full-size logo would eat most of a phone's viewport in a sticky header. */
  .header__logo img {
    height: 64px;
  }

  .nav-toggle-label {
    display: block;
    margin-left: auto;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--teal);
    padding: 0.25rem 0.5rem;
  }

  .nav {
    position: absolute;
    inset: 100% 0 auto;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    margin: 0;
    display: none;
  }

  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
  }

  .nav a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle:checked ~ .nav {
    display: block;
  }
}

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

  .btn,
  .card {
    transition: none;
  }
}
