/* DJI. Dental Clinic — shared stylesheet */

:root {
  /* palette */
  --navy:      #0F3358;
  --navy-deep: #0A2440;
  --blue:      #1F6FB2;
  --blue-soft: #DDEDF8;
  --sky:       #F1F8FD;
  --gold:      #C98F2A;
  --sun:       #FFD34E;
  --paper:     #FBFCFE;
  --surface:   #FFFFFF;
  --line:      #DCE7F0;
  --text:      #17293B;
  --muted:     #5A7288;
  --shadow:    0 14px 34px -22px rgba(15, 51, 88, .55);
  --shadow-lg: 0 26px 60px -34px rgba(15, 51, 88, .6);
  --on-accent: #FFFFFF;
  --radius:    18px;
  --maxw:      1120px;
  --hex: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy:      #CFE4F6;
    --navy-deep: #E6F1FA;
    --blue:      #6FB4E8;
    --blue-soft: #16324C;
    --sky:       #112A3F;
    --gold:      #E4B45A;
    --sun:       #F2C94C;
    --paper:     #0B1B29;
    --surface:   #12263A;
    --line:      #1E3A52;
    --text:      #E4EEF7;
    --muted:     #9DB4C8;
    --shadow:    0 14px 34px -22px rgba(0, 0, 0, .8);
    --shadow-lg: 0 26px 60px -30px rgba(0, 0, 0, .85);
    --on-accent: #0A1D2E;
  }
}

:root[data-theme="dark"] {
  --navy:      #CFE4F6;
  --navy-deep: #E6F1FA;
  --blue:      #6FB4E8;
  --blue-soft: #16324C;
  --sky:       #112A3F;
  --gold:      #E4B45A;
  --sun:       #F2C94C;
  --paper:     #0B1B29;
  --surface:   #12263A;
  --line:      #1E3A52;
  --text:      #E4EEF7;
  --muted:     #9DB4C8;
  --shadow:    0 14px 34px -22px rgba(0, 0, 0, .8);
  --shadow-lg: 0 26px 60px -30px rgba(0, 0, 0, .85);
  --on-accent: #0A1D2E;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }

h1, h2, h3, h4, .display {
  font-family: Quicksand, "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--navy);
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.18rem; font-weight: 700; }

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: clamp(56px, 8vw, 92px); }
.section--tint { background: var(--sky); }

.eyebrow {
  font-family: Quicksand, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.lede { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand b {
  font-family: Quicksand, "Trebuchet MS", sans-serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: Quicksand, "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: .97rem;
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav a:hover { background: var(--blue-soft); color: var(--navy); }
.nav a:not(.btn)[aria-current="page"] { color: var(--blue); }
.nav a.btn[aria-current="page"] { color: var(--on-accent); }

.nav-toggle {
  display: none;
  background: var(--blue-soft);
  border: 1px solid var(--line);
  color: var(--navy);
  border-radius: 10px;
  padding: 9px 12px;
  font: 600 .95rem Quicksand, sans-serif;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    left: 12px; right: 12px;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav .btn { margin-top: 6px; justify-content: center; }
  .nav-toggle { display: block; }
  .site-header .wrap { position: relative; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: Quicksand, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: var(--on-accent); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--navy); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-gold { background: var(--sun); color: #3D2C05; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(900px 420px at 88% -10%, var(--blue-soft), transparent 70%),
    linear-gradient(180deg, var(--sky), var(--paper));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding-block: clamp(44px, 7vw, 84px);
}
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.hero h1 .accent { color: var(--blue); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding-top: 6px;
  font-size: .95rem;
  color: var(--muted);
}
.facts span { display: flex; align-items: center; gap: 8px; }
.facts svg { flex: none; color: var(--blue); }

/* hexagon photo cluster — echoes the clinic's cover artwork */
.hexes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-self: center;
}
.hex {
  clip-path: var(--hex);
  aspect-ratio: 1 / 1.08;
  background: var(--blue-soft);
  overflow: hidden;
}
.hex img { width: 100%; height: 100%; object-fit: cover; }
.hexes .hex:nth-child(odd) { transform: translateY(18px); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hexes { max-width: 420px; }
}

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

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 .card { padding: 22px 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.card p { color: var(--muted); font-size: .98rem; }

.card-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 4px;
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 34px;
  max-width: 70ch;
}

/* numbered steps — the visit really does run in this order */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 60px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 2px;
  font: 700 1.05rem Quicksand, sans-serif;
  color: var(--gold);
  background: var(--blue-soft);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
}

/* ---------- service list ---------- */

.service {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.service:last-child { border-bottom: 0; }
.service .tick {
  grid-row: 1 / span 2;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid; place-items: center;
}
.service { grid-template-columns: auto minmax(0, 1fr) auto; }
.service h3, .service p { grid-column: 2; }
.service p { color: var(--muted); font-size: .98rem; }
.service .price {
  grid-column: 3; grid-row: 1 / span 2; align-self: start;
  font: 700 1rem Quicksand, "Trebuchet MS", sans-serif; color: var(--blue);
  white-space: nowrap; text-align: right; padding-top: 2px;
}
@media (max-width: 640px) {
  .service { grid-template-columns: auto minmax(0, 1fr); }
  .service .tick { grid-row: 1 / span 3; }
  .service .price { grid-column: 2; grid-row: auto; text-align: left; white-space: normal; padding-top: 4px; }
}
.price-note {
  margin-top: 18px; padding: 12px 16px; border-radius: 14px;
  background: var(--sky); border: 1px solid var(--line); color: var(--text);
}

/* ---------- gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.shot img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.shot figcaption { padding: 12px 16px; font-size: .92rem; color: var(--muted); }
.shot--wide { grid-column: span 2; }
@media (max-width: 620px) { .shot--wide { grid-column: span 1; } }

/* ---------- booking ---------- */

.booking-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.booking-frame.is-live { padding: 0; }
.booking-fallback {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: clamp(28px, 5vw, 48px);
  background:
    radial-gradient(520px 260px at 90% -30%, var(--blue-soft), transparent 70%),
    var(--surface);
}
.booking-fallback p { color: var(--muted); max-width: 58ch; }
.booking-frame iframe { display: block; width: 100%; border: 0; }

.booking-cta {
  display: grid;
  gap: 16px;
  justify-items: start;
  padding: clamp(30px, 5vw, 52px);
  background:
    radial-gradient(560px 300px at 88% -40%, var(--blue-soft), transparent 72%),
    var(--surface);
}
.booking-cta h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.booking-cta p { color: var(--muted); max-width: 56ch; }
.booking-cta .form-note a { font-weight: 600; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

/* The booking calendar is served from another site, so it keeps its own
   light styling — give it a white ground in both themes so it never sits
   on a dark page looking half-loaded. */
.booking-frame { position: relative; }

/* Sits behind the calendar. The booking page paints its own white
   background over this once it loads; if it cannot load, this shows
   through instead of a blank white rectangle. */
.booking-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 12px;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 24px;
  background: var(--surface);
}
.booking-placeholder p { color: var(--muted); max-width: 42ch; }

.booking-iframe {
  position: relative;
  display: block;
  width: 100%;
  height: 1180px;
  border: 0;
}
@media (max-width: 860px) { .booking-iframe { height: 1320px; } }
@media (max-width: 520px) { .booking-iframe { height: 1420px; } }

.booking-help { margin-top: 16px; }

.booking-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 16px;
  padding: 14px 20px;
  background: var(--blue-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.booking-bar p { color: var(--navy); font-size: .96rem; }
.booking-bar .btn { flex: none; background: var(--surface); }

.qr-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 28px;
  margin-top: 18px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.qr-strip h3 { margin-bottom: 6px; }
.qr-strip p { color: var(--muted); font-size: .98rem; max-width: 54ch; }
.qr-strip .qr {
  width: 150px;
  height: 150px;
  flex: none;
  border-radius: 10px;
  /* the code is drawn on white, so it keeps its contrast in dark mode */
  background: #FFFFFF;
  padding: 6px;
}

.durations th { font-weight: 600; padding-right: 16px; }
.durations td { white-space: nowrap; text-align: right; }

/* ---------- call band ---------- */

/* The call band keeps one fixed look in both themes — it is the clinic's brand block. */
.band {
  background: linear-gradient(120deg, #0F3358 0%, #14456F 55%, #1F6FB2 100%);
  color: #FFFFFF;
}
.band h2 { color: #FFFFFF; }
.band .wrap {
  padding-block: clamp(44px, 6vw, 70px);
  display: grid;
  gap: 22px;
  justify-items: start;
}
.band p { color: inherit; opacity: .92; max-width: 58ch; }
.band .btn-ghost { color: inherit; border-color: currentColor; }
.band .btn-ghost:hover { background: rgba(255, 255, 255, .14); }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.info-list { display: grid; gap: 18px; }
.info {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 14px;
  align-items: start;
}
.info .card-icon { grid-row: span 2; width: 42px; height: 42px; margin: 0; }
.info h3 { font-size: 1rem; }
.info a { text-decoration: none; font-weight: 600; }
.info span, .info a { font-size: 1rem; }

.hours { width: 100%; border-collapse: collapse; font-size: 1rem; }
.hours th, .hours td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours th { font-family: Quicksand, sans-serif; color: var(--navy); font-weight: 600; }
.hours td { color: var(--muted); font-variant-numeric: tabular-nums; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

form.enquiry { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label {
  font: 600 .88rem Quicksand, sans-serif;
  color: var(--navy);
  letter-spacing: .02em;
}
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form-note { font-size: .88rem; color: var(--muted); }
.form-status {
  font: 600 .92rem Quicksand, sans-serif;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 10px;
  padding: 9px 13px;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 44px 34px;
  font-size: .95rem;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.legal {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: .86rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}

/* ---------- meet the dentist / meet the team (About page) ---------- */
.dentist { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 760px) { .dentist { grid-template-columns: 1fr; } }
.dentist-photo { position: relative; margin: 0; width: 100%; max-width: 400px; justify-self: center; }
.dentist-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px 28px 28px 110px; border: 5px solid var(--surface); box-shadow: var(--shadow-lg); background: var(--blue-soft); }
.dentist-spark { position: absolute; right: -12px; top: -14px; width: 46px; height: 46px; fill: var(--gold); }
.dentist-copy { display: grid; gap: 12px; justify-items: start; }
.dentist-role { font: 700 .95rem Quicksand, "Trebuchet MS", sans-serif; color: var(--navy); background: var(--blue-soft); border-radius: 999px; padding: 4px 14px; }
.dentist-bio { display: grid; gap: 12px; color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.dentist-bio p { white-space: pre-line; }

.team { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 24px; }
@media (max-width: 560px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.member { margin: 0; display: grid; gap: 12px; align-content: start; }
.member img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 22px; border: 1px solid var(--line); background: var(--blue-soft); }
.member figcaption { display: grid; gap: 2px; }
.member b { font: 700 1.08rem Quicksand, "Trebuchet MS", sans-serif; color: var(--navy); }
.member span { color: var(--muted); font-size: .95rem; }

/* Fade-in on scroll (script.js adds .js-motion and .rv). Uses `translate`, not `transform`,
   so it never cancels the offsets some elements already have (e.g. the staggered hexagon photos). */
.js-motion .rv { opacity: 0; translate: 0 26px; transition: opacity .75s ease, translate .9s cubic-bezier(.2, .7, .2, 1); }
.js-motion .rv.in { opacity: 1; translate: none; }
@media print { .js-motion .rv { opacity: 1 !important; translate: none !important; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
