@font-face {
  font-family: 'Fraunces';
  src: url('vendor/fonts/fraunces-latin-full-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('vendor/fonts/nunito-sans-latin-standard-normal.woff2') format('woff2-variations');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #FFF4E8;
  --coral: #F2765B;
  --mint: #BFE8D6;
  --teal: #1E3B3A;
  --peach: #FFD9C9;
  --coral-ink: #B8432A;
  --teal-soft: #3C5A58;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --text: 'Nunito Sans', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;

  --step-name: clamp(62px, 7.7vw, 124px);
  --step-title: clamp(34px, 3.7vw, 56px);
  --step-lead: clamp(21px, 1.8vw, 27px);
  --step-body: 18px;
  --step-small: 14px;

  --col: 45vw;
  --gutter: clamp(20px, 5vw, 84px);
  --tooth: min(52vw, 90svh);
  --press: cubic-bezier(.2, 1.5, .4, 1);
  --clay-shadow: 0 10px 22px rgba(30, 59, 58, .13), inset 0 -4px 0 rgba(30, 59, 58, .1), inset 0 2px 0 rgba(255, 255, 255, .5);
  --clay-pressed: 0 3px 8px rgba(30, 59, 58, .16), inset 0 3px 0 rgba(30, 59, 58, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--cream); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--teal);
  font: 400 var(--step-body)/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, dl, dd, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--coral-ink); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--mint); color: var(--teal); }

.display { font-family: var(--display); font-weight: 480; font-variation-settings: 'SOFT' 100, 'WONK' 0; letter-spacing: -.02em; line-height: 1.04; }
.eyebrow { display: block; margin-bottom: 14px; font-size: var(--step-small); font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--coral-ink); }
.title { font-size: var(--step-title); }
.lead { font-size: var(--step-lead); line-height: 1.32; }

/* top bar and chapter marker */
.bar {
  position: fixed; z-index: 30; inset: 0 0 auto 0;
  display: flex; align-items: center; gap: 28px;
  height: 68px; padding: 0 var(--gutter);
  background: var(--cream);
  transition: background-color .2s ease;
}
.bar.is-peach { background: var(--peach); }
.bar__mark { font-family: var(--display); font-size: var(--step-lead); font-weight: 560; font-variation-settings: 'SOFT' 100, 'WONK' 0; letter-spacing: -.01em; text-decoration: none; }
.bar__chapter { font-size: var(--step-small); font-weight: 700; color: var(--teal-soft); }
.bar__links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.bar__links a:not(.btn) { font-size: 16px; font-weight: 700; text-decoration: none; }
.bar__links a:not(.btn):hover { color: var(--coral-ink); }
.progress { position: fixed; z-index: 31; inset: 0 0 auto 0; height: 4px; transform: scaleX(0); transform-origin: 0 50%; background: var(--coral); }

/* clay buttons and chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 30px;
  border: 0; border-radius: 999px;
  background: var(--coral); color: #2A120C;
  font-weight: 800; font-size: 18px; text-decoration: none;
  box-shadow: var(--clay-shadow);
  cursor: pointer;
  transition: transform .28s var(--press), box-shadow .22s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(2px) scale(.98, .95); box-shadow: var(--clay-pressed); }
.btn--small { min-height: 44px; padding: 0 22px; font-size: 16px; }
.btn--quiet { background: var(--peach); color: var(--teal); }
.btn:disabled { background: #EFE2D3; color: #5C6F6C; box-shadow: none; cursor: not-allowed; transform: none; }

.chip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 999px;
  background: #FFFBF5; color: var(--teal);
  font-weight: 700; font-size: 16px;
  box-shadow: var(--clay-shadow);
  cursor: pointer; user-select: none;
  transition: transform .28s var(--press), box-shadow .2s ease, background-color .2s ease;
}
.chip:hover { transform: translateY(-2px); }
.chip:active { transform: translateY(1px) scale(.97, .94); }
.chip[aria-pressed="true"], input:checked + .chip { background: var(--mint); box-shadow: var(--clay-pressed); transform: translateY(1px); }
input:focus-visible + .chip { outline: 3px solid var(--coral-ink); outline-offset: 3px; }

/* the stage: the half that never moves */
.stage {
  position: fixed; z-index: 2; top: 0; bottom: 0; left: var(--col); right: 0;
  overflow: hidden;
  background: var(--cream);
}
.photo, .rig {
  position: absolute; left: 50%; top: 50%;
  width: var(--tooth); height: var(--tooth);
  margin: calc(var(--tooth) / -2) 0 0 calc(var(--tooth) / -2);
  transform-origin: 50% 50%;
}
.photo { z-index: 3; mix-blend-mode: multiply; pointer-events: none; }
.photo__half { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo__half--l { clip-path: inset(0 50% 0 0); }
.photo__half--r { clip-path: inset(0 0 0 50%); }
.rig { z-index: 2; opacity: 0; }

/* each part is its own layer, so a lift never redraws the clay */
.part {
  position: absolute;
  left: calc(var(--tooth) * -60 / 1254);
  top: calc(var(--tooth) * 100 / 1254);
  width: calc(var(--tooth) * 1374 / 1254);
  height: calc(var(--tooth) * 1800 / 1254);
  overflow: visible; pointer-events: none;
  will-change: transform, opacity, filter;
  transition: transform .55s var(--press), filter .3s ease;
}
.relief { mix-blend-mode: multiply; pointer-events: none; }
.part__hit { pointer-events: none; }
.stage.is-open .part__hit { pointer-events: auto; cursor: pointer; }
.rig.has-active .part:not(.is-on) { filter: saturate(.72) brightness(1.02); }
.part.is-on { transform: translate(var(--lx, 0), var(--ly, 0)) scale(var(--ls, 1.012)); filter: drop-shadow(0 0 20px rgba(242, 118, 91, .8)); }
.part--enamel { --ly: calc(var(--tooth) * -.024); }
.part--dentin { --ly: calc(var(--tooth) * -.008); }
.part--pulp { --ls: 1.03; }
.part--root { --ly: calc(var(--tooth) * .014); }
.part--gum { --ly: calc(var(--tooth) * -.008); }
.part--bone { --ly: calc(var(--tooth) * .016); }

/* clay objects, sliced out of one sheet */
.tool {
  position: absolute; z-index: 4;
  width: var(--w); aspect-ratio: var(--ratio);
  background: url('assets/clay_tools.webp') no-repeat;
  background-size: calc(100% * 1254 / var(--sw)) auto;
  background-position: calc(var(--sx) / (1254 - var(--sw)) * 100%) calc(var(--sy) / (1254 - var(--sh)) * 100%);
  mix-blend-mode: multiply;
  border: 0; padding: 0;
}
.tool--mirror { --sx: 96; --sy: 68; --sw: 500; --sh: 534; --ratio: 500 / 534; --w: clamp(84px, 10.5vw, 164px); left: 2%; top: 11%; }
.stage .tool--mirror { scale: -1 1; }
.tool--brush { --sx: 726; --sy: 68; --sw: 440; --sh: 534; --ratio: 440 / 534; --w: clamp(76px, 9.4vw, 148px); right: 2%; top: 11%; }
.tool--floss { --sx: 100; --sy: 700; --sw: 566; --sh: 446; --ratio: 566 / 446; --w: clamp(92px, 12vw, 186px); left: 2%; bottom: 7%; }
.tool--glass { --sx: 728; --sy: 700; --sw: 420; --sh: 446; --ratio: 420 / 446; --w: clamp(72px, 9.6vw, 148px); right: 3%; bottom: 8%; cursor: pointer; background-color: transparent; transition: scale .3s var(--press); }
.tool--glass:hover { scale: 1.06; }
.ripple { position: absolute; left: 12%; right: 12%; top: 26.5%; height: 11%; border-radius: 50%; border: 2px solid rgba(30, 59, 58, .4); opacity: 0; pointer-events: none; }

/* reading column */
.col { position: relative; z-index: 1; width: var(--col); padding: 0 clamp(20px, 3vw, 48px) 0 var(--gutter); }
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.hero__name { font-size: var(--step-name); margin-bottom: 26px; white-space: nowrap; }
.hero__line { font-size: var(--step-title); max-width: 15em; }
.hero__sub { margin: 16px 0 32px; font-size: var(--step-lead); line-height: 1.32; max-width: 24em; }
.hero__cta { align-self: flex-start; }

.explainer { position: relative; height: calc(100svh + 6 * 72svh); }
.panel { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 56px; }
.parts-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.parts-nav .chip { min-height: 44px; padding: 0 16px; }
.stack { position: relative; }
.card__title { font-size: var(--step-title); margin-bottom: 14px; }
.card__line { max-width: 34em; font-size: var(--step-body); }
.care { margin-top: 26px; }
.care__head { font-size: var(--step-small); font-weight: 800; letter-spacing: .02em; color: var(--teal-soft); margin-bottom: 8px; }
.care li { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; max-width: 28em; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.care li span:last-child { font-weight: 500; white-space: nowrap; }
.js .stack { min-height: 21.5em; }
.js .card { position: absolute; inset: 0 0 auto 0; visibility: hidden; }
.js .card.is-active { visibility: visible; }
html:not(.js) .card { margin-bottom: 64px; }
html:not(.js) .parts-nav { display: none; }
html:not(.js) .explainer { height: auto; }
html:not(.js) .panel { position: static; height: auto; }

/* prices: the one screen that breaks the split */
.prices {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: 5fr 7fr; gap: 0 clamp(32px, 6vw, 96px);
  align-items: start; align-content: center; min-height: 100svh;
  padding: clamp(96px, 13vh, 150px) var(--gutter);
  background: var(--peach);
}
.prices__head { position: relative; min-height: 420px; }
.prices__note { margin-top: 18px; max-width: 24em; }
.prices .tool { position: absolute; }
.prices .tool--floss { --w: clamp(120px, 13vw, 200px); left: 38%; top: auto; bottom: -14px; }
.prices .tool--mirror { --w: clamp(100px, 11vw, 170px); left: 0; top: auto; bottom: -10px; }
.menu { display: grid; gap: clamp(26px, 4.6vh, 46px); }
.menu__row { display: grid; grid-template-columns: 1fr auto; gap: 2px 28px; align-items: baseline; }
.menu__name { font-family: var(--display); font-size: clamp(30px, 2.9vw, 44px); font-weight: 480; font-variation-settings: 'SOFT' 100, 'WONK' 0; letter-spacing: -.015em; line-height: 1.1; }
.menu__price { font-size: var(--step-lead); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu__what { grid-column: 1 / -1; max-width: 36em; }

.chapter { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 72px; padding-bottom: 72px; }
.chapter .title { margin-bottom: 16px; }

/* booking */
.book__step { margin-top: 24px; }
.book__label { display: block; margin-bottom: 10px; font-size: 16px; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.book__note { margin-top: 24px; font-size: 16px; }
.book__go { margin-top: 18px; }
.confirm {
  padding: clamp(24px, 3vw, 40px);
  border-radius: 34px;
  background: var(--peach);
  box-shadow: 0 16px 34px rgba(30, 59, 58, .13), inset 0 -6px 0 rgba(30, 59, 58, .07), inset 0 3px 0 rgba(255, 255, 255, .55);
}
.confirm__sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; margin: 18px 0 22px; font-size: 19px; }
.confirm__sum dt { font-weight: 800; }
.confirm__fine { margin-top: 18px; font-size: var(--step-small); color: var(--teal); }

/* close */
.close { position: relative; z-index: 3; padding: 88px var(--gutter) 30px; background: var(--teal); color: var(--cream); }
.close__name { font-size: clamp(60px, 13.4vw, 220px); white-space: nowrap; line-height: 1.02; }
.close__line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 28px; padding-right: 150px; font-size: var(--step-small); }
.close__line a { font-weight: 700; }

html:not(.js) .rig { opacity: 1; }
html:not(.js) .photo { display: none; }

/* facts view */
.facts-switch {
  position: fixed; z-index: 50; right: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 14px 0 16px;
  border: 0; border-radius: 999px;
  background: #FFFBF5; color: var(--teal);
  font-size: var(--step-small); font-weight: 800;
  box-shadow: var(--clay-shadow);
  cursor: pointer;
}
.facts-switch__knob { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--peach); transition: background-color .2s ease; }
.facts-switch__knob::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--teal); transition: transform .3s var(--press); }
.facts-switch[aria-checked="true"] .facts-switch__knob { background: var(--mint); }
.facts-switch[aria-checked="true"] .facts-switch__knob::after { transform: translateX(16px); }
.facts {
  position: fixed; z-index: 40; inset: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(72px, 12vh, 120px) var(--gutter) 100px;
  background: var(--cream);
  opacity: 0; transition: opacity .5s ease;
}
.facts.is-on { opacity: 1; }
.facts__inner { max-width: 760px; margin: 0 auto; }
.facts h2 { font-size: var(--step-title); margin-bottom: 26px; }
.facts h3 { font-family: var(--display); font-size: var(--step-lead); font-weight: 500; font-variation-settings: 'SOFT' 100, 'WONK' 0; margin: 40px 0 14px; }
.facts p { margin-bottom: 10px; }
.facts dt { margin-top: 20px; font-weight: 800; }

/* custom cursor, desktop only */
.cursor { position: fixed; z-index: 60; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--coral); mix-blend-mode: multiply; pointer-events: none; opacity: 0; }
.cursor__label { position: fixed; z-index: 60; left: 0; top: 0; padding: 4px 12px; border-radius: 999px; background: var(--teal); color: var(--cream); font-size: var(--step-small); font-weight: 800; pointer-events: none; opacity: 0; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor label, html.has-cursor .part__hit { cursor: none; }
}

/* phone and tablet: the stage sits on top, the reading runs below it */
@media (max-width: 900px) {
  :root {
    --col: 100vw;
    --gutter: 20px;
    --tooth: min(100vw, 52svh);
    --step-name: clamp(52px, 15vw, 88px);
    --step-title: clamp(30px, 7.4vw, 44px);
    --step-lead: 20px;
    --step-body: 17px;
  }
  .stage { left: 0; bottom: auto; height: 46svh; }
  .col { padding: 0 var(--gutter); }
  .bar { height: 60px; background: transparent; }
  .bar.is-peach { background: var(--peach); }
  .bar.is-cream { background: var(--cream); }
  .bar__chapter, .bar__links a:not(.btn) { display: none; }
  .bar__links .btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
  .hero { padding-top: 46svh; justify-content: flex-start; }
  .hero__name { margin: 14px 0 10px; font-size: min(var(--step-name), 8.4svh); }
  .hero__line { font-size: min(var(--step-title), 4.6svh); }
  .hero__sub { margin: 8px 0 16px; font-size: 18px; }
  .panel { top: 46svh; height: 54svh; padding-top: 0; padding-bottom: 66px; justify-content: flex-start; }
  .parts-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 12px 0 12px; }
  .parts-nav .chip { min-height: 44px; padding: 0; font-size: 13px; }
  .eyebrow { margin-bottom: 4px; }
  .card__title { font-size: 28px; margin-bottom: 6px; }
  .card__line { font-size: 16px; line-height: 1.4; }
  .care { margin-top: 8px; }
  .care__head { margin-bottom: 0; }
  .care li { padding: 2px 0; font-size: 16px; }
  .js .stack { min-height: 0; }
  .prices { grid-template-columns: 1fr; gap: 32px; padding: 84px var(--gutter) 72px; }
  .prices__head { min-height: 0; padding-bottom: 150px; }
  .prices .tool--floss, .prices .tool--mirror { bottom: 0; --w: 110px; }
  .prices .tool--floss { left: 42%; }
  .menu__name { font-size: 28px; }
  .menu__price { font-size: 17px; }
  .stage .tool--mirror { --w: 12vw; }
  .stage .tool--brush { --w: 10vw; }
  .stage .tool--floss { --w: 14vw; }
  .stage .tool--glass { --w: 11vw; }
  .chapter { padding-top: 46svh; justify-content: flex-start; min-height: 100svh; }
  .chapter .eyebrow { margin-top: 20px; }
  .book { position: relative; z-index: 3; background: var(--cream); padding-top: 72px; padding-bottom: 96px; }
  .book .eyebrow { margin-top: 0; }
  .close { padding-top: 64px; }
  .close__line { padding-right: 0; padding-bottom: 56px; }
  .tool--mirror { top: 17%; }
  .tool--brush { top: 17%; }
  .tool--floss { bottom: 3%; }
  .tool--glass { bottom: 3%; }
}

@media (max-width: 900px) and (max-height: 700px) {
  .stage { height: 36svh; }
  .hero, .chapter { padding-top: 36svh; }
  .panel { top: 36svh; height: 64svh; padding-bottom: 54px; }
  .parts-nav { margin: 8px 0 6px; }
  .card__title { font-size: 23px; }
  .card__line { font-size: 15px; line-height: 1.32; }
  .care__head { display: none; }
  .care { margin-top: 6px; }
  .care li { font-size: 15px; padding: 1px 0; }
  .facts-switch { right: 10px; bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .part.is-on { transform: none; }
}
