@font-face {
  font-family: Manrope;
  src: url("./media/manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbf8fb;
  --plain: #fffdfd;
  --ink: #262749;
  --text: #2b2433;
  --subtle: #574d61;
  --lavender: #e9d7ee;
  --accent: #d5add6;
  --rule: #d8c9da;
  --gutter: clamp(1.125rem, 4vw, 4.5rem);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 100%;
  color: var(--text);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
body { line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: inherit; }
address { font-style: normal; }
[id] { scroll-margin-top: 6.5rem; }
[hidden] { display: none !important; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 4;
  top: 0.75rem;
  left: var(--gutter);
  padding: 0.65rem 1rem;
  background: var(--plain);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  background: var(--paper);
  box-shadow: 0 1px var(--rule);
}

.frame {
  width: min(90rem, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.content-width {
  width: min(75rem, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.masthead, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.masthead { min-height: 5.5rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.1;
  text-decoration: none;
}

.brand img { flex: none; }

.masthead nav, .nav-sections {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.7rem);
}

.nav-link {
  position: relative;
  padding-block: 0.55rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 0.35rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms;
}

.nav-link:is(:hover, :focus-visible)::after { transform: scaleX(1); }

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.67rem 1.25rem;
  border: 1px solid transparent;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms, color 150ms;
}

.button-ink { background: var(--ink); color: var(--plain); }
.button-ink:hover { background: #493252; }
.button-ink:focus-visible { outline-color: var(--ink); }
.button-light { background: var(--lavender); color: var(--ink); }
.button-light:hover { background: var(--plain); }
.hero .button:focus-visible { outline-color: var(--plain); }

.text-link {
  font-weight: 750;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.text-link:hover { text-decoration-thickness: 2px; }

.hero {
  display: grid;
  grid-template-columns: 43% 57%;
  min-height: clamp(31rem, 44vw, 42rem);
  margin-top: 1.15rem;
  background: var(--ink);
}

.hero-copy {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(2rem, 4.25vw, 4.8rem);
  color: var(--plain);
}

.hero-copy::before, .visit-copy::before {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: url("./media/tooth-motif.svg") center / contain no-repeat;
}

.hero-copy::before {
  right: -3.45rem;
  bottom: -8rem;
  width: clamp(18rem, 32vw, 31rem);
  aspect-ratio: 1;
  opacity: 0.27;
}

.hero-location {
  color: #edd7ec;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 1.3rem;
  font-size: clamp(3.4rem, 5.9vw, 6.15rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.99;
}

.hero-description {
  margin-top: 1.55rem;
  color: #f3eaf4;
  font-size: clamp(1.05rem, 1.5vw, 1.27rem);
  font-weight: 550;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.95rem 1.55rem;
  margin-top: 1.85rem;
}

.hero-media {
  display: flex;
  min-width: 0;
  flex-direction: column;
  margin: 0;
  padding: 0.85rem 0.85rem 0.85rem 0;
}

.hero-photo {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #69556e;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 33%;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 460ms ease, transform 950ms cubic-bezier(.2, .65, .3, 1);
}

.hero-image.is-current { opacity: 1; transform: scale(1); }
#clinic-photo { object-position: center 55%; }

.hero-photo::after {
  position: absolute;
  inset: 0.7rem;
  border: 1px solid #fffdfd86;
  content: "";
  pointer-events: none;
}

.photo-controls, .comparison-controls {
  display: flex;
  align-items: stretch;
}

.photo-controls button, .comparison-controls button, .viewer-close {
  min-height: 2.75rem;
  padding: 0.48rem 0.95rem;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 750;
  cursor: pointer;
}

.photo-controls {
  width: fit-content;
  max-width: 100%;
  margin-top: 0.5rem;
  color: #efdff0;
}

.photo-controls button {
  border-bottom: 2px solid #796987;
  transition: border-color 230ms, background-color 230ms;
}

.photo-controls button[aria-pressed="true"] { border-color: #e6b9e3; color: var(--plain); }
.photo-controls button:hover { background: #3e3657; }

.location-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.3rem;
  min-height: 4.45rem;
  padding: 0.8rem clamp(1rem, 2.7vw, 2.75rem);
  background: var(--lavender);
  color: var(--ink);
}

.location-bar p { display: flex; flex-wrap: wrap; gap: 0 1.15rem; }
.location-bar strong { font-weight: 800; }
.location-bar .text-link { flex-shrink: 0; }

.services {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.6rem, 7vw, 6.5rem);
  padding: clamp(3.5rem, 7vw, 7rem) 0;
}

h2 {
  color: var(--ink);
  font-size: clamp(2.6rem, 5vw, 4.65rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1.04;
}

.section-intro {
  max-width: 30ch;
  margin-top: 1rem;
  color: var(--subtle);
  font-size: 1.08rem;
}

.service-list { border-top: 1px solid var(--rule); }
.service-list details { border-bottom: 1px solid var(--rule); }

.service-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.8rem 0.2rem;
  list-style: none;
  color: var(--ink);
  cursor: pointer;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.service-list summary::-webkit-details-marker { display: none; }
.service-list summary:hover { color: #67436a; }

.service-list summary::after {
  flex: 0 0 0.9rem;
  height: 0.9rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
  content: "";
}

.service-list details[open] summary::after { background-size: 100% 1px, 1px 0; }

.service-list details p {
  max-width: 46ch;
  padding: 0 1.5rem 1.25rem 0.2rem;
  color: var(--subtle);
}

.showcase {
  overflow: hidden;
  background: #ead8eb;
  border-block: 1px solid #dfc6e1;
}

.showcase-inner { padding-block: clamp(2.75rem, 6vw, 6rem); }

.showcase-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: clamp(1.35rem, 3vw, 3rem);
}

.showcase-header p { margin-top: 0.8rem; }

.comparison-controls {
  position: relative;
  isolation: isolate;
  width: fit-content;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.comparison-controls::before {
  position: absolute;
  z-index: -1;
  inset: 0 50% 0 0;
  background: var(--ink);
  content: "";
  transition: transform 340ms cubic-bezier(.2, .65, .3, 1);
}

.comparison-controls:has([data-state="after"][aria-pressed="true"])::before { transform: translateX(100%); }
.comparison-controls button { min-width: 5.6rem; }
.comparison-controls button[aria-pressed="true"] { color: var(--plain); }

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.75rem);
}

.case {
  display: block;
  min-width: 0;
  background: var(--plain);
  text-decoration: none;
}

.case-photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  background: #673842;
}

.case-photo img {
  width: 100%;
  height: auto;
}

.case-grid.has-comparison .case-photo { aspect-ratio: 2; }
.case-grid.has-comparison img {
  position: absolute;
  inset: 0;
  transition: transform 560ms cubic-bezier(.65, .05, .22, 1);
}

.case-grid.has-comparison[data-view="after"] img { transform: translateY(-50%); }

.case-caption {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
  padding: 0.65rem 1rem;
  border: 1px solid #d9c5dd;
  border-top: 0;
  color: var(--ink);
}

.case-caption span { font-size: 0.875rem; font-weight: 750; text-decoration: underline; text-underline-offset: 0.22em; }
.case:hover .case-caption { background: #f7eef7; }
.case:hover .case-caption span { text-decoration-thickness: 2px; }

.source-link { display: inline-block; margin-top: 1.15rem; }

.clinic-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 6vw, 6.5rem);
  padding: clamp(3.5rem, 7vw, 7rem) 0;
}

.scanner-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.35;
  background: #d3bcd5;
}

.scanner-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-photo::after {
  position: absolute;
  inset: 0.75rem;
  border: 1px solid #fffdfdad;
  content: "";
  pointer-events: none;
}

.clinic-story-copy p {
  max-width: 36ch;
  margin-block: 0.95rem 1.25rem;
  color: var(--subtle);
  font-size: 1.08rem;
}

.photo-viewer {
  width: min(43rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0.8rem;
  border: 1px solid #947596;
  background: var(--ink);
  color: var(--plain);
}

.photo-viewer::backdrop { background: #23172bce; }
.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.1rem 0.25rem 0.75rem;
}

.viewer-header h2 { color: inherit; font-size: 1.35rem; letter-spacing: -0.035em; }
.viewer-close { min-height: 2.5rem; border: 1px solid #ae94b6; }
.viewer-close:hover { background: #493252; }
.viewer-media img { max-height: calc(100dvh - 8rem); margin: auto; object-fit: contain; }

.visit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  background: var(--plain);
}

.visit-copy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.6rem, 5vw, 5rem);
  background: #ddc1e2;
}

.visit-copy::before {
  right: -1.85rem;
  bottom: -4.5rem;
  width: clamp(14rem, 24vw, 23rem);
  aspect-ratio: 1;
  opacity: 0.24;
}

.visit-copy p { max-width: 30ch; margin: 1.05rem 0 1.55rem; }

.visit-details {
  display: grid;
  align-content: center;
  gap: 1.35rem;
  padding: clamp(1.6rem, 4.4vw, 4.4rem);
}

.visit-row {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
  min-width: 0;
}

.visit-row + .visit-row { border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.visit-row h3 { color: var(--ink); font-size: 1.02rem; font-weight: 800; }
.visit-row a { max-width: 100%; overflow-wrap: anywhere; }

.site-footer {
  min-height: 6.3rem;
  padding-block: 1.15rem;
  color: var(--ink);
}

.site-footer .brand { font-size: 1.13rem; }
.site-footer .text-link { font-size: 0.875rem; }

@media (max-width: 56rem) {
  .hero { grid-template-columns: 47% 53%; }
  .hero h1 { font-size: clamp(2.75rem, 6vw, 4.15rem); }
  .hero-copy { padding: clamp(1.45rem, 3.8vw, 2.25rem); }
  .hero-actions { gap: 0.8rem 1rem; }
  .location-bar strong { display: none; }
}

@media (max-width: 44rem) {
  [id] { scroll-margin-top: 7.5rem; }
  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(3.65rem, auto) auto;
    gap: 0 0.65rem;
  }
  .brand { font-size: 1.2rem; gap: 0.45rem; }
  .brand img { width: 2.15rem; height: 2.15rem; }
  .masthead nav { display: contents; }
  .nav-sections {
    grid-area: 2 / 1 / 3 / -1;
    justify-content: space-between;
    gap: 0.6rem;
    border-top: 1px solid var(--rule);
  }
  .nav-link { min-height: 2.75rem; padding-block: 0.65rem; font-size: 0.875rem; }
  .masthead .button { grid-area: 1 / 2; min-height: 2.65rem; padding-inline: 0.75rem; font-size: 0.875rem; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin-top: 0.75rem; }
  .hero-copy { padding: 2.1rem 1.3rem 2.25rem; }
  .hero-copy::before { right: -3rem; bottom: -6.25rem; width: 17rem; }
  .hero h1 { font-size: clamp(2.75rem, 10.8vw, 4.5rem); }
  .hero-description, .hero-actions { margin-top: 1.25rem; }
  .hero-media { padding: 0 0.65rem 0.45rem; }
  .hero-photo { flex: none; aspect-ratio: 1.35; }
  .hero-photo::after { inset: 0.55rem; }
  #clinic-photo { object-position: center 48%; }
  .location-bar { flex-wrap: wrap; }
  .services, .clinic-story, .visit { grid-template-columns: 1fr; }
  .photo-controls { margin-top: 0.15rem; }
  .case-grid { grid-template-columns: 1fr; }
  .scanner-photo { aspect-ratio: 1.5; }
  .section-intro { margin-top: 0.8rem; }
  .site-footer { flex-wrap: wrap; min-height: 5rem; }
}

@media (max-width: 23rem) {
  .masthead { gap: 0.45rem; }
  .masthead .brand { font-size: 1.04rem; }
  .hero-actions .button { padding-inline: 0.75rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .hero-copy > *, .location-bar {
    animation: arrive 650ms cubic-bezier(.18, .62, .3, 1) both;
  }

  .hero h1 { animation-delay: 90ms; }
  .hero-description { animation-delay: 180ms; }
  .hero-actions { animation-delay: 270ms; }
  .location-bar { animation-delay: 340ms; }
  .hero-copy::before { animation: motif-arrive 1250ms ease-out both; }
  .hero-photo { animation: photo-arrive 880ms cubic-bezier(.2, .65, .3, 1) both; }
  .photo-controls { animation: arrive 650ms 220ms both; }
  .photo-viewer[open] { animation: arrive 260ms ease-out both; }

  [data-reveal] {
    transition: opacity 620ms ease-out, transform 700ms cubic-bezier(.2, .61, .35, 1);
  }

  .reveal-pending:not(:focus-within) { opacity: 0; transform: translateY(1.3rem); }

  @supports (animation-timeline: scroll()) {
    .site-header::after {
      position: absolute;
      right: 0;
      bottom: -2px;
      left: 0;
      height: 3px;
      background: #a16b9f;
      content: "";
      transform-origin: left;
      animation: reading-progress linear both;
      animation-timeline: scroll(root);
    }
  }

  @supports (interpolate-size: allow-keywords) and selector(details::details-content) {
    .service-list { interpolate-size: allow-keywords; }
    .service-list details::details-content {
      height: 0;
      overflow: clip;
      transition: height 380ms cubic-bezier(.2, .65, .3, 1), content-visibility 380ms allow-discrete;
    }
    .service-list details[open]::details-content { height: auto; }
  }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(0.9rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes photo-arrive {
  from { clip-path: inset(0 0 0 26%); opacity: 0.4; }
  to { clip-path: inset(0); opacity: 1; }
}

@keyframes motif-arrive {
  from { transform: translate(1.3rem, 1rem) scale(0.95); opacity: 0; }
  to { transform: translate(0) scale(1); opacity: 0.27; }
}

@keyframes reading-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

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