/* ===========================================================================
   WE Dental — home page, Zen direction.

   Reference: zen.dentist. What was taken from it is the calm editorial
   posture: a high-contrast type pairing (Cormorant Garamond display against
   Hanken Grotesk text), a warm cream-and-sand ground rather than white, wide
   margins, numbered principles rather than feature cards, and section changes
   marked by a change of ground colour rather than by a rule.

   Palette lifted from the reference's own custom properties:
     cream #fdfaf6   sand #f2e8de / #f8f2eb   ink #33231f
     charcoal #3d2e2a   dark #2a1f1b   gold #c4a96a   sage #a8b5a0
=========================================================================== */

/* --- tokens -------------------------------------------------------------- */
:root {
  --cream: #fdfaf6;
  --sand: #f2e8de;
  --sand-lt: #f8f2eb;
  --ink: #33231f;
  --charcoal: #3d2e2a;
  --charcoal-lt: #5c4a44;
  --clay: #4a3a34;
  --dark: #2a1f1b;
  --gold: #c4a96a;
  --sage: #a8b5a0;
  --sage-mut: #c2ccbb;
  --warm: #b5a89e;
  --warm-lt: #d9cfc7;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gut: clamp(22px, 6vw, 88px);
  --sect-y: clamp(72px, 11vw, 156px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.72;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.1em; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.005em;
  color: var(--ink);
}

h1 { font-size: clamp(40px, 7.4vw, 82px); }
h2 { font-size: clamp(31px, 4.6vw, 56px); }
h3 { font-size: clamp(21px, 2.2vw, 27px); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

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

.skip {
  position: absolute; left: 14px; top: -60px; z-index: 200;
  padding: 10px 18px;
  background: var(--ink); color: var(--cream);
  font-size: 14px; text-decoration: none;
  transition: top .18s;
}
.skip:focus { top: 14px; }

/* --- shared type --------------------------------------------------------- */
.kicker {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--warm);
}
.kicker--light { color: rgba(253, 250, 246, .62); }

.ul {
  color: var(--clay);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  font-weight: 400;
}
.ul:hover { color: var(--gold); }

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 13px; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn--solid { background: var(--ink); color: var(--cream); }
.btn--solid:hover { background: var(--clay); }
.btn--quiet { border-color: currentColor; color: inherit; }
.btn--quiet:hover { background: rgba(51, 35, 31, .07); }
.btn--block { display: flex; width: 100%; }

.sect--dark .btn--solid { background: var(--gold); color: var(--dark); }
.sect--dark .btn--solid:hover { background: #d3bc86; }
.sect--dark .btn--quiet { border-color: rgba(253, 250, 246, .4); color: var(--cream); }
.sect--dark .btn--quiet:hover { background: rgba(253, 250, 246, .1); }

/* --- header -------------------------------------------------------------- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  transition: background-color .35s, box-shadow .35s, padding .35s;
  padding-block: 8px;
}
.nav__in {
  display: flex; align-items: center; gap: 24px;
  max-width: var(--wrap); margin-inline: auto;
  padding: 10px var(--gut);
}
.nav__logo img { width: 120px; transition: filter .35s; filter: brightness(0) invert(1); }
.nav__links { display: none; gap: 30px; margin-inline: auto; }
.nav__links a {
  font-size: 13px; font-weight: 400;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--cream);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}
.nav__links a:hover { border-color: currentColor; }
.nav__cta { display: none; background: rgba(253, 250, 246, .95); color: var(--ink); }
.nav__cta:hover { background: #fff; }

.nav__burger {
  margin-inline-start: auto;
  display: grid; gap: 6px; align-content: center;
  width: 40px; height: 36px;
  border: 0; background: none; cursor: pointer;
}
.nav__burger span { display: block; height: 1px; background: var(--cream); transition: background-color .35s; }
.nav__burger span.sr { height: 1px; }

/* Over the hero the bar is light type on whatever the photograph happens to
   be, and on some of them — the clinic signboard on /contact/ — that is very
   nearly white. A scrim of its own, the height of the bar and no more, keeps
   the links legible without darkening the picture underneath them. It goes
   when the bar takes its cream ground. */
.nav::before {
  content: "";
  position: absolute; inset: 0 0 auto; z-index: -1;
  height: 150px;
  background: linear-gradient(to bottom, rgba(42, 31, 27, .62), rgba(42, 31, 27, 0));
  pointer-events: none;
  transition: opacity .35s;
}
.nav.is-stuck::before, .nav.is-open::before { opacity: 0; }

/* Past the hero the bar acquires a ground, and everything on it flips dark. */
.nav.is-stuck {
  background: rgba(253, 250, 246, .95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(51, 35, 31, .09);
  padding-block: 0;
}

/* .is-open is the open mobile drawer, which puts cream behind the bar the
   same way scrolling past the hero does. main.js sets it, which is the right
   place: without a script the drawer never opens at all. */
.nav.is-stuck .nav__logo img,
.nav.is-open .nav__logo img { filter: brightness(0); opacity: .78; }
.nav.is-stuck .nav__links a { color: var(--charcoal); }
.nav.is-stuck .nav__burger span,
.nav.is-open .nav__burger span { background: var(--charcoal); }

.drawer {
  position: fixed; inset: 0; z-index: 99;
  display: flex; flex-direction: column; justify-content: center;
  gap: 8px;
  padding: 90px var(--gut) 40px;
  background: var(--cream);
}
.drawer[hidden] { display: none; }
.drawer nav { display: grid; gap: 2px; margin-bottom: 26px; }
.drawer nav a {
  padding: 13px 0;
  font-family: var(--serif);
  font-size: 27px;
  text-decoration: none;
  border-bottom: 1px solid var(--warm-lt);
}
.drawer__tel { margin: 20px 0 0; text-align: center; font-size: 14px; }

@media (min-width: 1020px) {
  .nav__links, .nav__cta { display: flex; }
  .nav__burger { display: none; }
  .drawer { display: none !important; }
}

/* --- hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: min(94vh, 860px);
  padding: 140px var(--gut) clamp(48px, 7vw, 96px);
  color: var(--cream);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
  z-index: -2;
}
/* Two scrims, not one. The vertical gradient alone left the headline sitting
   on the brightest part of the photograph at roughly 2.8:1 — the horizontal
   one darkens the column the text actually occupies and takes it past 7:1,
   without flattening the right-hand side of the picture. */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(42, 31, 27, .9) 0%, rgba(42, 31, 27, .62) 55%, rgba(42, 31, 27, .34) 100%),
    linear-gradient(to right, rgba(42, 31, 27, .55) 0%, rgba(42, 31, 27, 0) 62%);
}
.hero__in { max-width: var(--wrap); width: 100%; margin-inline: auto; }
.hero h1 { color: var(--cream); font-weight: 300; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero__lede {
  margin: 28px 0 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.7vw, 19px);
  color: rgba(253, 250, 246, .84);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* --- statement ----------------------------------------------------------- */
.stmt {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(64px, 9vw, 128px) var(--gut);
  text-align: center;
}
.stmt__body {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3.3vw, 40px);
  font-weight: 300;
  line-height: 1.32;
  color: var(--ink);
}
.stmt__body em { font-style: italic; color: var(--clay); }

/* --- generic section ----------------------------------------------------- */
.sect { padding: var(--sect-y) var(--gut); }
.sect--sand { background: var(--sand-lt); }
.sect--dark { background: var(--dark); color: rgba(253, 250, 246, .8); }
.sect--dark h2, .sect--dark h3 { color: var(--cream); }

.sect__head { max-width: var(--wrap); margin: 0 auto clamp(44px, 6vw, 84px); }
.sect__lede {
  margin: 24px 0 0;
  max-width: 46ch;
  font-size: 17px;
  color: var(--charcoal-lt);
}
.sect__note {
  max-width: var(--wrap);
  margin: clamp(34px, 4vw, 56px) auto 0;
  font-size: 15px;
  color: var(--charcoal-lt);
}

/* --- numbered principles ------------------------------------------------- */
.steps {
  max-width: var(--wrap); margin-inline: auto;
  border-top: 1px solid var(--warm-lt);
}
.step {
  display: grid; gap: 6px 40px;
  padding: clamp(28px, 3.4vw, 46px) 0;
  border-bottom: 1px solid var(--warm-lt);
}
.step__n {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .1em;
  color: var(--gold);
}
.step h3 { font-weight: 400; }
.step p { margin: 0; max-width: 54ch; color: var(--charcoal-lt); font-size: 16px; }

@media (min-width: 860px) {
  .step { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
  .step__n { padding-top: 8px; }
  .step p { padding-top: 6px; }
}

/* --- two columns of care ------------------------------------------------- */
.cols {
  display: grid; gap: clamp(44px, 5vw, 76px);
  max-width: var(--wrap); margin-inline: auto;
}
.col__fig { margin: 0 0 26px; }
.col__fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.col h3 { margin-bottom: 8px; }
.col__sub { margin: 0 0 22px; font-size: 15px; font-style: italic; color: var(--warm); font-family: var(--serif); font-size: 19px; }
.list { border-top: 1px solid var(--warm-lt); }
.list li { border-bottom: 1px solid var(--warm-lt); }
.list a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 0;
  font-size: 16px;
  text-decoration: none;
  transition: color .2s, padding-inline-start .2s;
}
.list a::after { content: "\2192"; color: var(--gold); opacity: 0; transition: opacity .2s, transform .2s; }
.list a:hover { color: var(--clay); padding-inline-start: 8px; }
.list a:hover::after { opacity: 1; transform: translateX(3px); }

@media (min-width: 800px) { .cols { grid-template-columns: 1fr 1fr; } }

/* --- technology ---------------------------------------------------------- */
.tech {
  display: grid; gap: clamp(36px, 4vw, 66px);
  max-width: var(--wrap); margin-inline: auto;
  align-items: start;
}
.tech__fig { margin: 0; }
.tech__fig img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.tech__list { display: grid; gap: clamp(26px, 3vw, 38px); }
.tech__list h3 { font-size: 21px; margin-bottom: 8px; }
.tech__list p { margin: 0; font-size: 15.5px; color: var(--charcoal-lt); max-width: 46ch; }

@media (min-width: 900px) {
  .tech { grid-template-columns: .82fr 1.18fr; align-items: stretch; }
  .tech__list { grid-template-columns: 1fr 1fr; gap: 40px 44px; }
  /* Three rows of text beside one photograph: top-aligning the figure left a
     column of dead space under it. Run it the full height instead. */
  .tech__fig img { height: 100%; aspect-ratio: auto; min-height: 440px; }
}

/* --- details ------------------------------------------------------------- */
.dets {
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  max-width: var(--wrap); margin-inline: auto;
  border-top: 1px solid var(--warm-lt);
}
.dets li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--warm-lt);
  padding-inline-end: 24px;
}
.dets span { font-family: var(--serif); font-size: 13px; color: var(--gold); letter-spacing: .08em; }
.dets h3 { font-size: 19px; font-weight: 400; }

.dets__strip {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: var(--wrap);
  margin: clamp(44px, 5vw, 72px) auto 0;
}
.dets__strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* --- voices -------------------------------------------------------------- */
.voices {
  padding: clamp(72px, 9vw, 132px) var(--gut);
  background: var(--clay);
  color: var(--cream);
  text-align: center;
}
/* Default is a plain stack: every quotation present and readable. main.js
   adds .is-live, which is what turns it into a one-at-a-time carousel. No
   script means no carousel, never a blank box. */
.voices__stage { max-width: 780px; margin-inline: auto; }
.voice { margin: 0 0 44px; }
.voice:last-child { margin-bottom: 0; }

.voices__stage.is-live { position: relative; min-height: 260px; }
.voices__stage.is-live .voice {
  position: absolute; inset: 0;
  margin: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .6s;
}
.voices__stage.is-live .voice.is-on { opacity: 1; visibility: visible; }
.voice p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(21px, 2.8vw, 32px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.42;
  color: var(--cream);
}
.voice footer {
  margin-top: 26px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(253, 250, 246, .55);
}

.voices__dots { display: none; justify-content: center; gap: 9px; margin-top: 40px; }
.voices__dots button {
  width: 8px; height: 8px; padding: 0;
  border: 1px solid rgba(253, 250, 246, .5);
  border-radius: 50%;
  background: none; cursor: pointer;
  transition: background-color .25s;
}
.voices__dots button[aria-selected="true"] { background: var(--gold); border-color: var(--gold); }

/* --- dentist ------------------------------------------------------------- */
.dr {
  display: grid; gap: clamp(34px, 4vw, 70px);
  max-width: var(--wrap); margin-inline: auto;
  align-items: center;
}
.dr__fig { margin: 0; }
.dr__fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; }
.dr__fig figcaption {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--warm);
}
.dr__copy h2 { margin-bottom: 26px; }
.dr__copy p { color: var(--charcoal-lt); max-width: 48ch; }
.creds { margin: 28px 0 30px; display: grid; gap: 12px; }
.creds li {
  padding-inline-start: 22px;
  position: relative;
  font-size: 15.5px;
}
.creds li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .62em;
  width: 10px; height: 1px; background: var(--gold);
}

@media (min-width: 880px) { .dr { grid-template-columns: .8fr 1.2fr; } }

/* --- studio -------------------------------------------------------------- */
.studio {
  display: grid; gap: clamp(34px, 4vw, 64px);
  max-width: var(--wrap); margin-inline: auto;
  align-items: start;
}
.studio__fig { margin: 0; }
.studio__fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.studio__info h3 { margin-bottom: 18px; }
.studio__addr { font-size: 16px; line-height: 1.8; color: rgba(253, 250, 246, .82); }
.studio__note { font-size: 14.5px; color: rgba(253, 250, 246, .55); max-width: 40ch; }

.hours { margin: 30px 0; border-top: 1px solid rgba(253, 250, 246, .16); }
.hours > div {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(253, 250, 246, .16);
  font-size: 14.5px;
}
.hours dt { color: rgba(253, 250, 246, .6); }
.hours dd { color: var(--cream); }

.studio__lines { font-size: 15px; }
.studio__lines a { color: var(--gold); text-decoration: none; }
.studio__lines a:hover { text-decoration: underline; }
.studio__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.studio__small { margin: 0; font-size: 13.5px; color: rgba(253, 250, 246, .5); max-width: 42ch; }

@media (min-width: 860px) { .studio { grid-template-columns: 1.1fr .9fr; } }

/* --- footer -------------------------------------------------------------- */
.foot {
  padding: clamp(56px, 7vw, 96px) var(--gut) 40px;
  background: var(--sand);
}
.foot__in {
  display: grid; gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  max-width: var(--wrap); margin-inline: auto;
}
.foot__brand img { width: 132px; margin-bottom: 18px; filter: brightness(0); opacity: .72; }
.foot__brand p { font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--warm); margin: 0; }
.foot__col h4 {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--warm);
}
.foot__col a { display: block; padding: 5px 0; font-size: 15px; text-decoration: none; }
.foot__col a:hover { color: var(--clay); text-decoration: underline; }
.foot__col p { font-size: 15px; line-height: 1.75; color: var(--charcoal-lt); }
.foot__legal {
  max-width: var(--wrap);
  margin: clamp(44px, 5vw, 72px) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--warm-lt);
  font-size: 12.5px;
  color: var(--warm);
}

/* --- floating WhatsApp --------------------------------------------------- */
.wa {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 15px;
  background: var(--ink); color: var(--cream);
  font-size: 12px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none;
}
@media (min-width: 1020px) { .wa { display: none; } }
@media (max-width: 1019px) { .foot { padding-bottom: 96px; } }

/* --- reveal -------------------------------------------------------------- *
   Added by main.js only. With no script, nothing is ever hidden.            */
.js-reveal { opacity: 0; transform: translateY(22px); }
.js-reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .85s ease, transform .85s cubic-bezier(.2, .75, .3, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal, .js-reveal.is-in { opacity: 1; transform: none; transition: none; }
  .voice { transition: none; }
  .nav { transition: none; }
}

/* The dots address the carousel, so they appear only once it exists. */
.voices.is-live .voices__dots { display: flex; }

/* ===========================================================================
   INTERIOR PAGES

   Everything above this line built the home page. Everything below builds the
   other ten, and nothing below is used by the home page.

   The rules of the direction do not change here: cream ground, a change of
   ground colour instead of a rule between sections, Cormorant for anything
   that carries a voice and Hanken for anything that carries information,
   gold reserved for the one thing in a block that should be looked at first.
=========================================================================== */

/* --- page hero -----------------------------------------------------------
   The home page hero is nearly full height and leads with a headline. Every
   other page gets the same photograph-and-scrim treatment at roughly half
   that, so the fixed header has a dark ground to sit on in exactly the way
   it does on the home page and .is-stuck keeps working unchanged.          */
.hero--page {
  min-height: min(58vh, 500px);
  padding-top: clamp(150px, 20vw, 210px);
}
.hero--page h1 { font-size: clamp(34px, 5.6vw, 62px); }
.hero--page .hero__lede { margin-top: 22px; font-size: clamp(15px, 1.5vw, 18px); }

/* Short pages — thank you, 404 — have no photograph worth the bandwidth.
   A flat dark band does the same job for the header. */
.hero--flat { background: var(--dark); min-height: min(46vh, 400px); }
.hero--flat::after { content: none; }

/* --- breadcrumb ---------------------------------------------------------- */
.crumb {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px var(--gut) 0;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--warm);
}
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--clay); text-decoration: underline; }
.crumb span { padding-inline: 8px; color: var(--warm-lt); }

/* --- prose ---------------------------------------------------------------
   Long-form body copy: the two articles and the anatomy of the cost guide.
   One measure, set once, so nothing inside has to think about width.       */
.prose {
  max-width: 68ch;
  margin-inline: auto;
  font-size: 17px;
  color: var(--charcoal-lt);
}
.prose > * { max-width: 100%; }
.prose h2 {
  margin: clamp(48px, 5vw, 76px) 0 20px;
  font-size: clamp(27px, 3.4vw, 38px);
}
.prose h3 {
  margin: clamp(32px, 3.4vw, 46px) 0 12px;
  font-size: clamp(19px, 2vw, 23px);
}
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose a:not(.btn):not(.ul) {
  color: var(--clay);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.prose a:not(.btn):not(.ul):hover { color: var(--gold); }

/* Bulleted lists get the same gold tick the credentials list uses, so a list
   reads as part of the page rather than as a browser default. */
.prose ul { margin: 0 0 1.4em; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-inline-start: 24px; }
.prose ul li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .68em;
  width: 11px; height: 1px; background: var(--gold);
}
.prose ol { margin: 0 0 1.4em; display: grid; gap: 10px; counter-reset: p; }
.prose ol li { position: relative; padding-inline-start: 32px; counter-increment: p; }
.prose ol li::before {
  content: counter(p, decimal-leading-zero);
  position: absolute; inset-inline-start: 0; top: 0;
  font-family: var(--serif); font-size: 14px; letter-spacing: .08em;
  color: var(--gold);
}

/* A lede paragraph, set larger and in the serif, opening an article. */
.lede {
  margin: 0 0 clamp(34px, 4vw, 52px);
  font-family: var(--serif);
  font-size: clamp(21px, 2.5vw, 27px);
  font-weight: 300;
  line-height: 1.42;
  color: var(--ink);
}

/* --- article furniture --------------------------------------------------- */
.meta {
  margin: 0 0 clamp(30px, 3.5vw, 44px);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--warm-lt);
  font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--warm);
}

/* --- a bordered aside inside prose --------------------------------------- */
.notice {
  margin: clamp(32px, 4vw, 48px) 0;
  padding: clamp(22px, 3vw, 32px);
  border-inline-start: 2px solid var(--gold);
  background: var(--sand-lt);
  font-size: 15.5px;
}
.sect--sand .notice { background: var(--cream); }
.notice :last-child { margin-bottom: 0; }
.notice h3 { margin-bottom: 10px; font-size: 20px; }

/* --- treatment groups ----------------------------------------------------
   The services page. Each group is a heading and a list of treatments; a
   treatment is a name, a sentence and (where a page exists) a link. The
   whole row is the target, which is why the heading sits inside the link. */
.groups { max-width: var(--wrap); margin-inline: auto; display: grid; gap: clamp(56px, 7vw, 104px); }
.group__head { margin-bottom: clamp(26px, 3vw, 40px); }
.group__head h2 { font-size: clamp(27px, 3.4vw, 40px); }
.group__head p { margin: 14px 0 0; max-width: 52ch; font-size: 16px; color: var(--charcoal-lt); }

.tx { border-top: 1px solid var(--warm-lt); }
.tx > li { border-bottom: 1px solid var(--warm-lt); }
.tx__row {
  display: grid; gap: 8px 44px;
  padding: clamp(24px, 3vw, 36px) 0;
  text-decoration: none;
  color: inherit;
  transition: padding-inline-start .25s, color .25s;
}
a.tx__row:hover { padding-inline-start: 10px; color: var(--clay); }
.tx__name { display: flex; align-items: baseline; gap: 14px; }
.tx__name h3 { font-weight: 400; }
a.tx__row .tx__name::after {
  content: "\2192";
  margin-inline-start: auto;
  color: var(--gold);
  opacity: 0;
  transition: opacity .25s, transform .25s;
}
a.tx__row:hover .tx__name::after { opacity: 1; transform: translateX(4px); }
.tx__row p { margin: 0; max-width: 56ch; font-size: 15.5px; color: var(--charcoal-lt); }

@media (min-width: 880px) {
  .tx__row { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
  .tx__row p { padding-top: 5px; }
}

/* --- gallery ------------------------------------------------------------- */
.gallery {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: var(--wrap); margin-inline: auto;
}
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { margin-top: 10px; font-size: 12.5px; letter-spacing: .04em; color: var(--warm); }
/* The first frame runs two columns wide where there is room for it, so the
   grid does not read as four identical squares. */
@media (min-width: 900px) { .gallery figure:first-child { grid-column: span 2; } }

/* --- journal ------------------------------------------------------------- */
.posts { max-width: var(--wrap); margin-inline: auto; border-top: 1px solid var(--warm-lt); }
.posts > li { border-bottom: 1px solid var(--warm-lt); }
.post {
  display: grid; gap: 10px 48px;
  padding: clamp(30px, 3.6vw, 48px) 0;
  text-decoration: none; color: inherit;
  transition: padding-inline-start .25s;
}
.post:hover { padding-inline-start: 10px; }
.post__date { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--warm); }
.post h2 { font-size: clamp(24px, 2.8vw, 34px); }
.post:hover h2 { color: var(--clay); }
.post p { margin: 10px 0 0; max-width: 58ch; font-size: 15.5px; color: var(--charcoal-lt); }
.post__go { margin-top: 16px; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

@media (min-width: 880px) { .post { grid-template-columns: 150px minmax(0, 1fr); } .post__date { padding-top: 12px; } }

/* --- offer panel ---------------------------------------------------------
   The implant landing page leads with one price. It is the only figure on
   the site that is stated before an examination, so it is given a frame of
   its own rather than being allowed to look like body copy.                */
.offer {
  display: grid; gap: clamp(30px, 4vw, 56px);
  max-width: var(--wrap); margin-inline: auto;
  align-items: center;
}
.offer__fig { margin: 0; }
.offer__fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.offer__price {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
}
.offer__price small { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.offer__terms { margin: 0 0 26px; font-size: 13px; color: var(--warm); }
.offer h2 { margin-bottom: 20px; }
.offer__incl { display: grid; gap: 11px; margin: 0 0 30px; }
.offer__incl li { position: relative; padding-inline-start: 24px; font-size: 15.5px; }
.offer__incl li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .68em;
  width: 11px; height: 1px; background: var(--gold);
}

@media (min-width: 900px) { .offer { grid-template-columns: 1fr 1fr; } }

/* --- price table ---------------------------------------------------------
   A table, kept a table. It scrolls inside its own box on a narrow screen
   rather than pushing the page sideways.                                   */
.tablewrap { max-width: var(--wrap); margin-inline: auto; overflow-x: auto; }
.ptable { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 15.5px; }
.ptable caption {
  margin-bottom: 18px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--warm);
  text-align: start;
}
.ptable th, .ptable td { padding: 15px 20px 15px 0; border-bottom: 1px solid var(--warm-lt); text-align: start; vertical-align: top; }
.ptable thead th {
  border-bottom-color: var(--warm);
  font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--warm);
}
.ptable tbody th { font-weight: 400; color: var(--ink); }
.ptable td:last-child { padding-inline-end: 0; text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }

/* A comparison rather than a price list: the treatment pages set options side
   by side (braces against aligners, crown against bridge). Every column is
   prose, so none is right-aligned or kept on one line, and the first cell of
   each row names the thing being compared. */
.ptable--compare { min-width: 520px; font-size: 15px; }
.ptable--compare td:last-child { text-align: start; white-space: normal; font-variant-numeric: normal; color: var(--charcoal-lt); }
.ptable--compare td { color: var(--charcoal-lt); }
.ptable--compare td:first-child { color: var(--ink); }
.prose .tablewrap { margin: 0 0 1.6em; }

/* On a phone, stack each row: its first cell as the row's title, every other
   cell under the column heading it belongs to (the generator copies it into
   data-label). A sideways-scrolling table hides half of a comparison, and the
   hidden half is the one a reader was trying to compare against. */
@media (max-width: 640px) {
  .ptable--compare { min-width: 0; }
  .ptable--compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ptable--compare, .ptable--compare tbody, .ptable--compare tr, .ptable--compare td { display: block; }
  .ptable--compare tr { padding: 16px 0; border-bottom: 1px solid var(--warm-lt); }
  .ptable--compare tr:first-child { border-top: 1px solid var(--warm); }
  .ptable--compare td { padding: 3px 0; border: 0; }
  .ptable--compare td:first-child { padding-bottom: 8px; font-family: var(--serif); font-size: 19px; color: var(--ink); }
  .ptable--compare td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 10.5px; font-weight: 500;
    letter-spacing: .16em; text-transform: uppercase;
    color: var(--warm);
  }
  .ptable--compare td:not(:first-child) + td { margin-top: 8px; }
}

/* --- timeline ------------------------------------------------------------ */
.timeline { max-width: var(--wrap); margin-inline: auto; display: grid; gap: clamp(38px, 4.5vw, 62px); }
.phase__head { margin-bottom: 22px; }
.phase__head h3 { font-size: clamp(21px, 2.2vw, 26px); }
.phase ol { border-top: 1px solid var(--warm-lt); }
.phase li {
  display: grid; gap: 4px 36px;
  padding: 18px 0;
  border-bottom: 1px solid var(--warm-lt);
}
.phase__when { font-family: var(--serif); font-size: 15px; letter-spacing: .04em; color: var(--gold); }
.phase__what { font-size: 16px; color: var(--ink); }
.phase__note { font-size: 14.5px; color: var(--charcoal-lt); }

@media (min-width: 820px) {
  .phase li { grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; }
}

/* --- FAQ -----------------------------------------------------------------
   <details> with a shared name, so the browser keeps it an exclusive
   accordion natively and it still works with the script removed.           */
.faq { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--warm-lt); }
.faq details { border-bottom: 1px solid var(--warm-lt); }
.faq summary {
  display: flex; align-items: baseline; gap: 20px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 24px);
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-inline-start: auto;
  font-family: var(--sans); font-size: 20px; font-weight: 300;
  color: var(--gold);
  transition: transform .25s;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--clay); }
.faq__a { padding: 0 0 26px; max-width: 62ch; font-size: 16px; color: var(--charcoal-lt); }
.faq__a :last-child { margin-bottom: 0; }

/* --- getting here -------------------------------------------------------- */
.routes {
  display: grid; gap: clamp(28px, 3.4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: var(--wrap); margin-inline: auto;
}
.route h3 { margin-bottom: 12px; font-size: 21px; }
.route p { margin: 0 0 .8em; font-size: 15.5px; color: var(--charcoal-lt); }
.route :last-child { margin-bottom: 0; }
.route dl { display: grid; gap: 8px; font-size: 15.5px; }
.route dt { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.route dd { color: var(--charcoal-lt); }

/* --- short pages --------------------------------------------------------- */
.plain {
  max-width: 620px;
  margin-inline: auto;
  padding: clamp(64px, 9vw, 120px) var(--gut);
  text-align: center;
}
.plain p { color: var(--charcoal-lt); }
.plain .btn { margin-top: 18px; }
.plain__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }

/* --- calculator ----------------------------------------------------------
   The markup is the site's existing calculator, attribute for attribute, so
   assets/js/cost-calculator.js drives it unchanged and tests/calculator.test.js
   still describes it. Only the paint below is new: the live site's rounded
   blue-grey controls become square cream ones on a sand ground.            */
.calc {
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(26px, 4vw, 48px);
  background: var(--cream);
  border: 1px solid var(--warm-lt);
}
.sect--sand .calc { background: var(--cream); }

.wd-calc { text-align: start; }
.wd-calc fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 100%; }
.wd-calc__legend {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wd-calc__field + .wd-calc__field { margin-top: 26px; }
/* A branch is not a sibling of the treatment select, so the rule above does
   not reach the first field inside it. */
.wd-calc [data-calc-branch] { margin-top: 26px; }
.wd-calc__label {
  display: block; margin-bottom: 10px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--warm);
}
.wd-calc__control {
  display: block; width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--warm-lt);
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  /* 16px keeps iOS from zooming the page when a field takes focus. */
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}
.wd-calc__control:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
select.wd-calc__control {
  appearance: none;
  padding-inline-end: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23c4a96a' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  text-overflow: ellipsis;
}
.wd-calc__control[readonly] { background: var(--sand-lt); color: var(--charcoal-lt); cursor: default; }
/* The three readonly implant fields are the original form's working notes.
   They are kept in the markup so the formulas stay addressable, and taken
   out of the layout because a visitor has no use for them. */
.wd-calc__field--working { display: none; }

.wd-calc__range { display: flex; align-items: center; gap: 18px; }
.wd-calc__range input[type="range"] {
  flex: 1 1 auto; min-width: 0; height: 24px;
  padding: 0; border: 0; background: transparent;
  accent-color: var(--gold);
  cursor: pointer;
}
.wd-calc__range-value {
  flex: none; min-width: 2.6em;
  padding: 7px 10px;
  background: var(--ink); color: var(--cream);
  font-family: var(--serif); font-size: 18px;
  line-height: 1; text-align: center;
}

.wd-calc__result {
  margin-top: 30px;
  padding: clamp(22px, 3vw, 30px);
  background: var(--sand-lt);
  border-top: 2px solid var(--gold);
}
.wd-calc__result h3 { margin: 0 0 16px; font-size: 22px; }
.wd-calc__result p { margin: 0 0 14px; font-size: 15px; color: var(--charcoal-lt); }
.wd-calc__result :last-child { margin-bottom: 0; }
.wd-calc__figure {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 42px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.wd-calc__fine { font-size: 13px; font-style: italic; color: var(--warm); }
.wd-calc__fine a { color: var(--clay); }

/* --- footer, interior ----------------------------------------------------
   The home page footer sits on sand because the section above it is cream.
   On pages whose last section is already sand, it would vanish into it.    */
.foot--onsand { background: var(--sand); }

/* --- treatment pages ------------------------------------------------------
   One page per treatment, and the first of them is /services/dental-implants/.
   The clinical prose is the copy in content/services/*.md, which is where it
   is reviewed and where it stays authoritative; what is new here is only the
   furniture around it — the summary strip, the photograph slots for pictures
   that have not been taken yet, and the emergency box every treatment page
   carries.                                                                 */

/* A band that belongs to the one above it rather than standing on its own,
   so it gets less air than .sect. */
.sect--tight { padding-block: clamp(38px, 4.5vw, 64px); }

/* At a glance — the handful of facts a reader wants before deciding whether
   to read the page at all. Built like .dets: hairlines, no boxes. */
.glance {
  display: grid;
  max-width: var(--wrap); margin-inline: auto;
  border-top: 1px solid var(--warm-lt);
}
.glance > div {
  display: grid; gap: 4px 44px;
  padding: 16px 0;
  border-bottom: 1px solid var(--warm-lt);
}
.glance dt {
  font-family: var(--serif); font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold);
}
.glance dd { max-width: 62ch; font-size: 16px; color: var(--charcoal-lt); }

@media (min-width: 720px) {
  .glance > div { grid-template-columns: 250px minmax(0, 1fr); align-items: baseline; }
}

/* On this page. A treatment page runs long; this is the live template's table
   of contents, set as one quiet line rather than a sidebar. */
.jump {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 22px;
  max-width: var(--wrap); margin: clamp(26px, 3vw, 40px) auto 0;
  font-size: 14px;
}
.jump b {
  font-family: var(--serif); font-weight: 400; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
}
.jump a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--warm-lt);
  color: var(--charcoal-lt);
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.jump a:hover { color: var(--clay); border-bottom-color: var(--gold); }

/* Anything the jump list can land on has to clear the fixed header. */
.sect[id], .prose h2[id] { scroll-margin-top: 104px; }

/* A photograph the page is written around and which has not been taken yet.
   The brief is the one in content/services/*.md, shown rather than hidden, so
   the shoot list is visible in the design being reviewed rather than being a
   silence in it. */
.slot {
  margin: clamp(30px, 3.6vw, 46px) 0;
  border: 1px solid var(--warm-lt);
  background: var(--sand-lt);
}
.prose .slot { margin-inline: 0; }
.sect--sand .slot { background: var(--cream); }
.slot__frame {
  display: grid; place-items: center;
  aspect-ratio: 16 / 9;
  max-height: 400px;
  color: var(--warm);
}
.slot__frame svg { width: 32px; height: 32px; }
.slot figcaption {
  padding: 15px 20px 17px;
  border-top: 1px solid var(--warm-lt);
  font-size: 13.5px; line-height: 1.62; color: var(--charcoal-lt);
}
.slot figcaption b {
  display: block; margin-bottom: 5px;
  font-family: var(--serif); font-weight: 400; font-size: 14px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
}

/* .tech carries four items on the home page and three here, which left a hole
   in the second column. Three run down one column instead, against the photo. */
@media (min-width: 900px) {
  .tech--stack .tech__list { grid-template-columns: 1fr; align-content: center; }
}

/* A step whose body runs to more than one paragraph. Wrapping them keeps the
   three-column grid at three columns. */
.step__body { max-width: 54ch; }
.step__body p { margin: 0 0 .9em; font-size: 16px; color: var(--charcoal-lt); }
.step__body p:last-child { margin-bottom: 0; }
@media (min-width: 860px) { .step__body { padding-top: 6px; } }

/* The emergency box. It is the one block on a treatment page that has to be
   readable without reading anything else, so it is given a band of its own
   rather than a colour the rest of the palette does not have. */
.urgent {
  max-width: var(--wrap); margin-inline: auto;
  padding: clamp(26px, 3.4vw, 40px);
  border: 1px solid var(--warm-lt);
  border-inline-start: 3px solid var(--clay);
  background: var(--cream);
}
.sect--sand .urgent { background: var(--sand-lt); }
.urgent h2 { margin-bottom: 16px; font-size: clamp(23px, 2.6vw, 31px); }
.urgent p { max-width: 64ch; font-size: 16px; color: var(--charcoal-lt); }
.urgent p:last-child { margin-bottom: 0; }
.urgent strong { font-weight: 600; color: var(--ink); }

@media (min-width: 860px) {
  .urgent { display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); gap: 44px; }
  .urgent h2 { margin: 0; }
}

/* Further reading, and the note that closes every treatment page. */
.reading { max-width: 720px; margin-inline: auto; }
.reading h2 { margin-bottom: 8px; font-size: clamp(23px, 2.4vw, 30px); }
.reading .list li:last-child { border-bottom: 0; }
.fineprint {
  max-width: 720px;
  margin: clamp(34px, 4vw, 52px) auto 0;
  padding-top: clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--warm-lt);
  font-size: 13.5px; line-height: 1.65; color: var(--warm);
}
.fineprint :last-child { margin-bottom: 0; }
