:root {
  color-scheme: light;
  scrollbar-gutter: stable;
  --paper: #f8f8f6;
  --silver: #ededeb;
  --ink: #171717;
  --muted: #595957;
  --line: #d5d5d2;
  --gutter: clamp(1.25rem, 6.25vw, 6rem);
  --section-space: 80px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body, h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

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

.section, .advantages {
  padding-block: var(--section-space);
}

.layout {
  display: grid;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}

h1, h2 {
  font-weight: 400;
  letter-spacing: -.045em;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

.eyebrow {
  margin-bottom: .8rem;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  line-height: 1.5;
  text-transform: uppercase;
}

.body-copy {
  max-width: 36ch;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.photo {
  width: 100%;
  object-fit: cover;
  background: var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .55rem 1.05rem;
  border: 1px solid currentColor;
  border-radius: 2rem;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  letter-spacing: .035em;
  text-align: center;
  cursor: pointer;
}

.pill:where(:not(:disabled)):hover { background: rgb(128 128 128 / .15); }

.pill--primary {
  --pill-primary-bg: #054FF0;
  border-color: transparent;
  background: var(--pill-primary-bg);
  color: #fff;
  font-weight: 600;
}

.pill--primary:where(:not(:disabled)):hover {
  background: #0040C9;
}

.pill--primary:focus-visible { outline-color: var(--pill-primary-bg); }
.hero .pill--primary:focus-visible { outline-color: #fff; }

.body-copy + .pill, .doctors__grid h2 + .pill { margin-top: 1.2rem; }
.dark { color: #fff; background: var(--ink); }
.dark .eyebrow { color: #c0c0bd; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  color: #fff;
  background: #232323;
}

.hero__photos, .hero__photo, .hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__photos, .hero::after { z-index: -1; }
.hero__photos { isolation: isolate; }

.hero__photo {
  object-fit: cover;
  object-position: 63% center;
  filter: saturate(.25);
  opacity: 0;
}

.hero__photo.is-active { z-index: 1; opacity: 1; }

.hero::after {
  content: "";
  background:
    linear-gradient(0deg, rgb(0 0 0 / .58), transparent 24%, transparent 73%, rgb(0 0 0 / .43)),
    linear-gradient(92deg, rgb(0 0 0 / .79), rgb(0 0 0 / .53) 43%, rgb(0 0 0 / .16) 85%);
}

.header {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 3rem);
  min-height: 4.9rem;
  border-bottom: 1px solid rgb(255 255 255 / .26);
}

.brand {
  flex: none;
  margin-right: auto;
}

.brand img {
  width: clamp(6.5rem, 11vw, 9rem);
  height: auto;
}

.navigation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(.8rem, 2vw, 2rem);
  font-size: .85rem;
}

.navigation a:hover { text-decoration: underline; text-underline-offset: .25em; }

.hero__content {
  align-self: center;
  padding-block: clamp(2.75rem, 8vh, 7rem);
}

.hero h1 {
  font-size: clamp(2.35rem, 6vw, 6.5rem);
  line-height: .98;
}

.hero__content p {
  max-width: 45ch;
  margin-top: 1.25rem;
  color: #efefef;
  font-size: clamp(.98rem, 1.35vw, 1.25rem);
  line-height: 1.55;
}

.hero__content .pill { margin-top: 1.7rem; }

.hero__down {
  display: grid;
  justify-items: center;
  justify-self: center;
  gap: .55rem;
  padding: .35rem;
  margin-bottom: clamp(1.2rem, 3vh, 2rem);
  font-size: .64rem;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.round-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / .68);
  border-radius: 50%;
}

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

  body { background: #232323; }

  .hero {
    transform: translateY(calc(var(--hero-scroll-progress, 0) * 45%))
      scale(calc(1 - var(--hero-scroll-progress, 0) * .07));
    transform-origin: center top;
  }

  main, .contacts {
    position: relative;
    z-index: 1;
  }

  main { background: var(--paper); }

  .hero__photos { --fade-duration: 1.4s; }
  .hero__photo { transition: opacity 0s var(--fade-duration); }
  .hero__photo.is-active { transition: opacity var(--fade-duration) ease; }

  .pill, .round-icon { transition: background-color .2s ease; }
  .hero__down:hover .round-icon {
    background-color: rgb(255 255 255 / .2);
  }

  .reveal {
    transition: opacity .65s ease, transform .65s ease;
  }

  .reveal.is-pending:not(:focus-within) {
    opacity: 0;
    transform: translateY(16px);
  }

  .reveal:focus-within { transition: none; }
}

.about { grid-template-columns: 4fr 6fr; }

.about__photo {
  aspect-ratio: 2.45;
  height: auto;
  object-position: center 57%;
}

.advantages__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  align-items: center;
}

.advantages__grid .eyebrow { margin: 0; }

.advantages__grid > div {
  align-self: stretch;
  border-left: 1px solid #414140;
  padding-inline: clamp(.7rem, 2vw, 2rem);
}

.advantages__grid > div:last-child { padding-right: 0; }

.advantages__grid p {
  margin-top: .5rem;
  font-size: clamp(.76rem, 1.2vw, 1rem);
  line-height: 1.35;
}

.line-icon {
  display: block;
  width: 1.65rem;
  height: 1.65rem;
  fill: none;
  stroke: #e4e4e2;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.services__grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: start;
}

.services__photo {
  max-width: 30rem;
  height: clamp(7rem, 15vw, 13rem);
  margin-top: 1.2rem;
  object-position: center 59%;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  line-height: 1.45;
}

.price-table th, .price-table td {
  padding: .6rem clamp(.35rem, 1vw, .75rem);
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.price-table thead th {
  background: var(--silver);
  color: var(--muted);
  font-size: .8rem;
}

.price-table th[scope="row"] {
  overflow-wrap: anywhere;
  font-weight: 400;
}

.price-table :is(td, th):last-child {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.interior { background: var(--silver); }

.interior__grid, .doctors__grid { grid-template-columns: 1fr 2.4fr; }

.interior h2, .doctors__grid h2, .reviews h2, .contacts h2 {
  font-size: clamp(1.85rem, 3.1vw, 3.35rem);
}

.interior__photos, .doctor-cards {
  display: grid;
  gap: clamp(.5rem, 1.2vw, 1.25rem);
}

.doctor-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.interior__photos { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.interior__photos a { grid-column: span 2; cursor: zoom-in; }
.interior__photos a:where(:nth-child(-n+2)) { grid-column: span 3; }

.interior__photos img, .contacts__photo {
  aspect-ratio: 1.45;
  height: auto;
  border-radius: .5rem;
}

.doctor-card {
  padding: clamp(.9rem, 1.6vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--silver);
  overflow-wrap: anywhere;
}

.doctor-card h3 {
  margin: 0 0 .55rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.doctor-card p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.4;
}

.doctor-card p + p { margin-top: .35rem; }

.reviews {
  background:
    radial-gradient(ellipse at 12% 32%, #454545 0, transparent 55%),
    radial-gradient(ellipse at 92% 78%, #363636 0, transparent 50%),
    linear-gradient(145deg, #212121, #121212);
}

.reviews__header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.reviews__note {
  margin-block: 1rem 1.5rem;
  color: #c0c0bd;
  font-size: .88rem;
  line-height: 1.5;
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: clamp(1.15rem, 2.15vw, 1.75rem);
  border: 1px solid rgb(255 255 255 / .19);
  border-top-color: rgb(255 255 255 / .36);
  border-radius: 1.35rem;
  background:
    radial-gradient(ellipse at 18% 0%, rgb(255 255 255 / .16), transparent 65%),
    linear-gradient(145deg, rgb(255 255 255 / .08), transparent 70%),
    rgb(18 18 18 / .42);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .16),
    inset 0 -1px 0 rgb(255 255 255 / .05),
    0 .75rem 1.75rem rgb(0 0 0 / .28);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.review-card h3 { margin: 0; font-size: 1.1rem; line-height: 1.25; }
.review-card p { color: #efefed; font-size: .95rem; line-height: 1.55; }

.review-card time {
  margin-top: auto;
  padding-top: .7rem;
  border-top: 1px solid rgb(255 255 255 / .14);
  color: #d1d1ce;
  font-size: .8rem;
}

.documents__grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  align-items: start;
}

.document-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.document {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1rem;
  padding-block: .85rem;
  border-bottom: 1px solid var(--line);
}

.document__title { flex: 1 1 14rem; line-height: 1.4; }
.document__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.contacts { background: var(--silver); }

.contacts__grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1.2fr;
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: center;
}

.contacts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.2rem;
}

html:has(:is(.callback-dialog, .callback-result, .photo-dialog)[open]) { overflow: hidden; }

.photo-dialog {
  width: min(calc(100% - 1rem), 81rem);
  max-height: calc(100% - 1rem);
  padding: .5rem;
  border: 0;
  border-radius: .75rem;
}

.photo-dialog::backdrop { background: rgb(0 0 0 / .85); }

.photo-dialog__control {
  position: absolute;
  width: 2.75rem;
  padding: 0;
  background: rgb(0 0 0 / .7);
}

.photo-dialog__control:hover { background: var(--ink); }
.photo-dialog__close { inset-block-start: .75rem; inset-inline-end: .75rem; }

.photo-dialog__previous, .photo-dialog__next {
  inset-block-start: 50%;
  transform: translateY(-50%);
}

.photo-dialog__previous { inset-inline-start: .75rem; }
.photo-dialog__next { inset-inline-end: .75rem; }

.photo-dialog__image {
  width: 100%;
  height: min(75vw, calc(100vh - 2rem), 60rem);
  height: min(75vw, calc(100dvh - 2rem), 60rem);
  border-radius: .4rem;
  object-fit: contain;
  touch-action: pan-y pinch-zoom;
}

.photo-dialog__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.callback-dialog,
.callback-result {
  width: min(calc(100% - 2rem), 30rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1.25rem 4rem rgb(0 0 0 / .32);
  overscroll-behavior: contain;
}

:is(.callback-dialog, .callback-result)::backdrop { background: rgb(0 0 0 / .65); }
:is(.callback-dialog, .callback-result):not([open]) { display: none; }
.callback-result p { margin-bottom: 1rem; }

.callback-dialog__content {
  position: relative;
  padding: clamp(1.25rem, 5vw, 2rem);
}

.callback-dialog h2 {
  padding-inline-end: 2.8rem;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
}

.callback-dialog h2:focus { outline: none; }

.callback-dialog__close {
  position: absolute;
  inset-block-start: .8rem;
  inset-inline-end: .8rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}

.callback-form {
  display: grid;
  gap: .55rem;
  margin-top: 1.4rem;
}

.callback-form > label { font-size: .9rem; font-weight: 600; }

.callback-form input:not([type="checkbox"]) {
  min-height: 2.8rem;
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid #a7a7a3;
  border-radius: .6rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.callback-form input[aria-invalid="true"] { border-color: #9b2727; }
.callback-form input + label { margin-top: .3rem; }

.callback-form .callback-form__consent {
  display: flex;
  align-items: start;
  gap: .55rem;
  margin-block: .35rem;
  font-weight: 400;
  line-height: 1.4;
}

.callback-form__consent input {
  width: 1rem;
  height: 1rem;
  margin: .12rem 0 0;
  flex: none;
  accent-color: var(--ink);
}

.callback-form__captcha {
  margin-block: .25rem .5rem;
}

.callback-form__challenge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .75rem;
}

.callback-form__captcha label {
  display: block;
  margin-bottom: .5rem;
  font-size: .9rem;
  font-weight: 600;
}

.callback-form__captcha-preview {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.callback-form__captcha-image {
  display: grid;
  width: 9rem;
  height: 2.8rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: #f0f0ed;
}

.callback-form__captcha-image > * { grid-area: 1 / 1; }
.callback-form__captcha-image img { width: 100%; height: auto; }
.callback-form__captcha-image .callback-form__status { font-size: .8rem; }

.callback-form__captcha-retry {
  width: 2.75rem;
  padding: 0;
  border-color: var(--line);
}

.callback-form__captcha-retry[aria-disabled="true"] {
  background: transparent;
  opacity: .5;
  cursor: wait;
}

.callback-form__otp {
  --otp-cell: 2.125rem;
  --otp-gap: .375rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, var(--otp-cell));
  gap: var(--otp-gap);
  overflow: clip;
  border-radius: .6rem;
}

.callback-form__otp span {
  height: 2.8rem;
  border: 1px solid #a7a7a3;
  border-radius: .6rem;
}

.callback-form__otp:focus-within { outline: 2px solid currentColor; outline-offset: 3px; }
.callback-form__otp:has(input:disabled) span { background: var(--silver); }
.callback-form__otp:has(input[aria-invalid="true"]) span { border-color: #9b2727; }

.callback-form .callback-form__otp input {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% + var(--otp-cell));
  padding: 0 0 0 calc((var(--otp-cell) - 1ch) / 2);
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  font: 600 1.125rem ui-monospace, monospace;
  letter-spacing: calc(var(--otp-cell) + var(--otp-gap) - 1ch);
}

.callback-form__submit { justify-self: start; }
.callback-form__submit:disabled { opacity: .65; cursor: wait; }
.callback-form__status { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.callback-form__status[data-state="error"] { color: #8d2424; }

.contact-details {
  display: grid;
  gap: .9rem;
  line-height: 1.4;
}

.contact-details dt { font-size: .9rem; font-weight: 600; }
.contact-details dd { color: var(--muted); }
.contact-details a { text-decoration: underline; text-underline-offset: .18em; }
.contacts__photo { aspect-ratio: 1.8; }

.contacts__legal {
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 800px) {
  .reviews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .header { flex-wrap: wrap; gap: .75rem; padding-block: .8rem; }
  .header__appointment { display: none; }

  .navigation {
    flex-basis: 100%;
    gap: .75rem 1.25rem;
    padding-bottom: .35rem;
  }

  .menu-toggle[aria-expanded="true"] {
    background: rgb(255 255 255 / .14);
  }

  .menu-toggle:not([hidden]) + .navigation {
    position: absolute;
    z-index: 2;
    inset-block-start: calc(100% + .5rem);
    inset-inline-end: 0;
    display: grid;
    gap: 0;
    width: min(100%, 20rem);
    max-height: calc(100svh - 6rem);
    overflow-y: auto;
    padding: .35rem;
    border: 1px solid #474747;
    border-radius: .85rem;
    background: var(--ink);
    box-shadow: 0 .75rem 2rem rgb(0 0 0 / .28);
    font-size: .95rem;
  }

  .menu-toggle:not([hidden]) + .navigation a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .65rem .9rem;
    border-radius: .5rem;
    outline-offset: -2px;
  }

  .menu-toggle:not([hidden]) + .navigation a:is(:hover, :focus-visible) {
    background: #2d2d2d;
    text-decoration: none;
  }

  .advantages__grid { grid-template-columns: repeat(4, 1fr); gap: 1.1rem 0; }
  .advantages__grid .eyebrow { grid-column: 1 / -1; }
  .advantages__grid > div:first-of-type { border-left: 0; padding-left: 0; }

  .interior__grid, .doctors__grid, .documents__grid { grid-template-columns: 1fr; }
  .interior h2 { max-width: 24ch; }

  .contacts__grid { grid-template-columns: 1fr 1fr; }
  .contacts__photo { grid-column: 1 / -1; aspect-ratio: 2.2; }
}

@media (max-width: 560px) {
  :root { --section-space: 20px; }

  .hero__photo { object-position: 65% center; }
  .hero::after { background: linear-gradient(95deg, rgb(0 0 0 / .77), rgb(0 0 0 / .36)); }
  .about, .services__grid, .reviews__grid, .contacts__grid { grid-template-columns: 1fr; }
  .about__photo { aspect-ratio: 1.7; }
  .services__photo { height: auto; aspect-ratio: 2.2; }

  .advantages__grid { grid-template-columns: repeat(2, 1fr); }
  .advantages__grid > div:nth-of-type(odd) { border-left: 0; padding-left: 0; }

  .interior__photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .interior__photos a { grid-column: auto; }
  .interior__photos a:first-child { grid-column: 1 / -1; }
  .interior__photos a:first-child img { aspect-ratio: 1.75; }
  .doctor-cards { grid-template-columns: 1fr; }

  .contacts__photo { aspect-ratio: 1.65; }
}
