.clinic,
.booking {
  position: relative;
  z-index: 2;
  padding-inline: var(--gutter);
  color: var(--ink);
}

.clinic {
  padding-block: clamp(54px, 7vw, 106px) clamp(38px, 5vw, 70px);
  background: #09090b;
  color: #fff;
}

.clinic-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: end;
  gap: 22px;
  margin-bottom: clamp(24px, 3vw, 42px);
}

.clinic-kicker {
  margin-bottom: 13px;
  color: #aaaab2;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.clinic h2,
.booking h2 {
  font-size: clamp(41px, 5.25vw, 76px);
  line-height: .99;
  letter-spacing: -.037em;
  text-wrap: balance;
}

.clinic h2 em,
.booking h2 em {
  font-family: Alpina, Georgia, serif;
  font-weight: 400;
}

.clinic-intro > p {
  max-width: 330px;
  justify-self: end;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.25;
  color: #d4d4d8;
}

.clinic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    'reception reception lounge lounge visit visit'
    'reception reception device device visit visit'
    'facade facade facade coffee coffee coffee';
  grid-auto-rows: clamp(200px, 16vw, 232px);
  gap: 16px;
}

.clinic-card {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #27272a;
  border-radius: 2px;
  background: #18181b;
}

.clinic-card-reception { grid-area: reception; }
.clinic-card-lounge { grid-area: lounge; }
.clinic-card-device {
  grid-area: device;
  background: radial-gradient(ellipse at 50% 40%, #515154 0%, #303033 48%, #18181b 85%);
}
.clinic-card-facade { grid-area: facade; }
.clinic-card-coffee { grid-area: coffee; }

.clinic-photo-trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}

.clinic-photo-trigger::after {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #ffffff59;
  border-radius: 2px;
  background: #09090b9e;
  color: #fff;
  font-size: 23px;
  line-height: 1;
  content: '+';
}

.clinic-photo-trigger:focus-visible {
  z-index: 1;
  outline-offset: -4px;
}

.clinic-card img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 59%;
  transition: transform 480ms var(--ease);
}

.clinic-card-device img {
  inset: 10px 0 auto;
  height: calc(100% - 54px);
  object-fit: contain;
  object-position: center;
}
.clinic-card-facade img { object-position: 50% 47%; }
.clinic-card-coffee img { object-position: 50% 68%; }

@media (hover: hover) {
  :root:not([data-motion="off"]) .clinic-card:hover img { transform: scale(1.04); }
}

.clinic-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 42px 18px 16px;
  background: linear-gradient(transparent, #09090be6);
  font-size: 18px;
  line-height: 1.1;
  pointer-events: none;
}

.clinic-card-device figcaption {
  padding-top: 8px;
  background: none;
}

.clinic-visit {
  grid-area: visit;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #27272a;
  border-radius: 2px;
  background: #18181b;
}

.clinic-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #27272a;
  filter: saturate(.78);
}

.clinic-visit-content {
  padding: clamp(16px, 1.8vw, 26px);
}

.clinic-visit h3 {
  margin: 0 0 8px;
  font-size: clamp(23px, 2.1vw, 32px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.025em;
}

.clinic-visit p {
  color: #d4d4d8;
  line-height: 1.3;
}

.clinic-visit-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
}

.clinic-amenity {
  padding: 6px 12px;
  border: 1px solid #52525b;
  border-radius: 2px;
  font-size: 14px;
}

.clinic-visit a {
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: 16px;
  font-weight: 500;
}

.clinic-visit a:hover { color: #c0bbff; }

html.clinic-gallery-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.clinic-gallery {
  width: min(calc(100% - 32px), 1200px);
  height: min(calc(100% - 32px), 900px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #fff;
}

.clinic-gallery::backdrop { background: #09090bf5; }

.clinic-gallery-layout {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  grid-template-rows: 48px minmax(0, 1fr);
  gap: 10px clamp(10px, 2vw, 28px);
  height: 100%;
}

.clinic-gallery button {
  display: grid;
  place-items: center;
  align-self: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #ffffff45;
  border-radius: 2px;
  background: #242428;
  font-size: 29px;
  line-height: 1;
}

.clinic-gallery button:is(:hover, :focus-visible) { background: #414147; }
.clinic-gallery-close { grid-area: 1 / 3; }
.clinic-gallery-previous { grid-area: 2 / 1; }
.clinic-gallery-next { grid-area: 2 / 3; }

.clinic-gallery-photo {
  grid-area: 2 / 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  margin: 0;
  text-align: center;
}

.clinic-gallery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  touch-action: pan-y pinch-zoom;
}

.clinic-gallery-photo figcaption {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  line-height: 1.2;
}

.clinic-gallery-count {
  color: #bbbcc4;
  font-size: 14px;
  white-space: nowrap;
}

.booking {
  padding-block: clamp(72px, 10vw, 144px);
  background: #fafafa;
}

.booking-content {
  display: flex;
  align-items: center;
  flex-direction: column;
  max-width: 1120px;
  margin-inline: auto;
  text-align: center;
}

.booking-content > p {
  max-width: 500px;
  margin-top: 18px;
  font-size: clamp(18px, 1.65vw, 22px);
  line-height: 1.25;
}

.booking-content > .cta-actions {
  margin-top: clamp(26px, 3vw, 42px);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 650px;
}

.cta-actions > a {
  flex: 1 1 260px;
}

.treatment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.12;
  text-align: center;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}

.treatment-button:hover {
  background: var(--ink);
  color: #fff;
}

.booking-button {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  min-height: 52px;
  max-width: 100%;
  padding: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: linear-gradient(132deg, #555, #eee 16%, #888 28%, #242424 46%, #f3f3f3 66%, #555 85%, #d3d3d3);
  box-shadow: 0 1px 2px #0003, 0 7px 16px #0002;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.12;
  transition: box-shadow 250ms var(--ease), transform 180ms var(--ease);
}

.booking-button-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 24px;
  border-radius: 2px;
  background: linear-gradient(180deg, #252525, #080808);
  box-shadow: inset 0 1px 0 #ffffff26;
}

.booking-button-metal {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  border-radius: 2px;
  filter: grayscale(1);
  pointer-events: none;
}

.booking-button-metal canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.booking-button-metal:not([data-paper-shader]) {
  background: linear-gradient(110deg, #383838, #ddd 28%, #666 47%, #eee 68%, #383838);
  background-size: 220% 100%;
  animation: booking-reflection 5s ease-in-out infinite alternate;
}
@keyframes booking-reflection {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.booking-button-face span {
  flex: none;
  transition: transform 250ms var(--ease);
}

.booking-button:is(:hover, :focus-visible) {
  box-shadow: 0 1px 2px #0004, 0 11px 22px #0003;
}

.booking-button:is(:hover, :focus-visible) .booking-button-face span { transform: translate(2px, -2px); }
.booking-button:active { transform: translateY(1px) scale(.98); }
.booking-button:focus-visible { outline-color: var(--ink); }

.booking-button-ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  background: radial-gradient(circle, #fff7, transparent 70%);
  pointer-events: none;
}

.booking-content small {
  margin-top: 14px;
  color: #555;
  font-size: 14px;
}

@media (max-width: 767px) {
  .booking-content { max-width: 500px; }

  .clinic-intro { grid-template-columns: minmax(0, 1fr); }
  .clinic-intro > p { justify-self: start; }

  .clinic-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'reception' 'lounge' 'device' 'visit' 'facade' 'coffee';
    grid-auto-rows: auto;
    gap: 12px;
  }

  .clinic-card { aspect-ratio: 4 / 3; }
  .clinic-card-reception { aspect-ratio: 1; }
  .clinic-visit { grid-template-rows: 250px auto; }
  .clinic-gallery-layout { grid-template-rows: 48px minmax(0, 1fr) 48px; }
  .clinic-gallery-photo { grid-area: 2 / 1 / 3 / 4; }
  .clinic-gallery-previous { grid-area: 3 / 1; }
  .clinic-gallery-next { grid-area: 3 / 3; }
  .booking-button { width: 100%; }
}
