/* 30 services: heading, a large image card on the left and a list of
   treatments on the right. Hovering or focusing a row shows its photo in the card.
   Ground is sand so it sits apart from the ivory about section. */

.services { background: var(--sand); }

/* Heading area */
.services-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(32px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.services-title { color: var(--cocoa); }
.services-intro { justify-self: end; max-width: 46ch; }
.services-intro a {
  color: var(--cocoa);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--cocoa) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .25s var(--ease);
}
.services-intro a:hover { text-decoration-color: var(--cocoa); }

/* Body: image card + list */
.services-body {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 4.4vw, 72px);
  align-items: stretch;
}

/* Image card */
.services-media {
  position: relative;
  min-height: 560px;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--sand-2);
  isolation: isolate;
}
.services-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s var(--ease), visibility 0s linear .6s;
}
.services-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition: opacity .6s var(--ease), visibility 0s;
}
.services-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transform: scale(1.035);
  transition: transform 1.4s var(--ease);
}
.services-slide.is-active img { transform: none; }

.services-count {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--cocoa);
  font: 600 13px/1.2 var(--f-body);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* Caption panel over the photo. Flat translucent cocoa, softly blurred behind. */
.services-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: clamp(22px, 2.2vw, 30px);
  border-radius: 16px;
  border: 1px solid var(--line-dark);
  background: color-mix(in srgb, var(--cocoa-deep) 60%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ivory);
}
.services-caption-name {
  font-family: var(--f-display);
  font-size: calc(clamp(28px, 2.6vw, 38px) * var(--display-scale));
  line-height: var(--display-lead);
  letter-spacing: var(--display-track);
}
.services-caption-line {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mute-dark);
  max-width: 38ch;
}
.services-caption-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.services-caption-price {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--f-display);
  font-size: calc(28px * var(--display-scale));
  line-height: 1;
  letter-spacing: var(--display-track);
}
.services-caption-price span {
  display: block;
  margin-bottom: 8px;
  font: 500 13px/1.2 var(--f-body);
  letter-spacing: 0.01em;
  color: var(--camel);
}
.services-caption-price small {
  font: 400 14px/1 var(--f-body);
  letter-spacing: 0;
  color: var(--mute-dark);
}
.services-caption-btn { height: 48px; padding: 0 22px; }

/* List */
.services-list { display: flex; flex-direction: column; gap: 4px; }
.services-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto 52px;
  grid-template-areas: "thumb text price go";
  align-items: center;
  column-gap: clamp(14px, 1.4vw, 20px);
  padding: 12px;
  border-radius: var(--r-pill);
  color: var(--cocoa);
  transition: background-color .35s var(--ease);
}
.services-thumb {
  grid-area: thumb;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  background: var(--sand-2);
}
.services-text { grid-area: text; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.services-name {
  font-family: var(--f-display);
  font-size: calc(clamp(22px, 1.9vw, 27px) * var(--display-scale));
  line-height: 1.08;
  letter-spacing: var(--display-track);
}
.services-line { font-size: 14.5px; line-height: 1.45; color: var(--mute); text-wrap: pretty; }
.services-price {
  grid-area: price;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  white-space: nowrap;
}
.services-from { font-size: 13px; line-height: 1.2; color: var(--mute); }
.services-amount {
  font-family: var(--f-display);
  font-size: calc(22px * var(--display-scale));
  line-height: 1;
  letter-spacing: var(--display-track);
}
.services-amount small { display: block; margin-top: 4px; font: 400 13px/1.2 var(--f-body); letter-spacing: 0; color: var(--mute); }
.services-go { grid-area: go; display: grid; place-items: center; }
.services-go svg { grid-area: 1 / 1; transition: transform .35s var(--ease), opacity .3s var(--ease); }
/* Arrow at rest; on hover the calendar takes its place, since the row leads on to booking */
.services-go-cal { opacity: 0; transform: scale(.7); }

/* Active row (the one shown in the card), plus plain hover and keyboard focus */
.services-row:hover,
.services-row.is-active { background: var(--paper); }
.services-row:hover .services-go,
.services-row.is-active .services-go { background: var(--cocoa); border-color: var(--cocoa); color: var(--ivory); }
.services-row:hover .services-go-arrow,
.services-row.is-active .services-go-arrow { opacity: 0; transform: translateX(8px); }
.services-row:hover .services-go-cal,
.services-row.is-active .services-go-cal { opacity: 1; transform: none; }
.services-row:focus-visible { outline: 2px solid var(--camel-ink); outline-offset: 2px; border-radius: var(--r-pill); background: var(--paper); }

/* Footer line */
.services-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
  margin-top: clamp(40px, 4.4vw, 64px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line);
}
.services-note { font-size: 14.5px; color: var(--mute); max-width: 52ch; }

/* Narrower desktops and landscape tablets: slimmer image column */
@media (max-width: 1199px) {
  .services-body { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); }
  .services-row { grid-template-columns: 56px minmax(0, 1fr) auto 48px; padding: 10px; }
  .services-thumb { width: 56px; height: 56px; }
  .services-go { width: 48px; height: 48px; }
  .services-caption { left: 14px; right: 14px; bottom: 14px; }
  .services-caption-line { font-size: 14px; }
  .services-caption-foot { flex-wrap: nowrap; margin-top: 18px; }
  .services-caption-btn { height: 44px; padding: 0 16px; gap: 8px; font-size: 14px; }
  .services-count { top: 14px; left: 14px; }
}

/* Portrait tablets and phones: no big card, each row carries its own photo.
   Rows only highlight on hover or focus here, since there is no card to follow. */
@media (max-width: 959px) {
  .services-head { grid-template-columns: minmax(0, 1fr); }
  .services-intro { justify-self: start; }
  .services-body { display: block; }
  .services-media { display: none; }
  .services-list { gap: 0; border-top: 1px solid var(--line); }
  .services-list li { border-bottom: 1px solid var(--line); }
  .services-row { grid-template-columns: 72px minmax(0, 1fr) auto 48px; padding: 16px 12px; border-radius: 14px; }
  .services-row.is-active:not(:hover):not(:focus-visible) { background: transparent; }
  .services-row.is-active:not(:hover):not(:focus-visible) .services-go { background: transparent; border-color: var(--line); color: var(--cocoa); }
  .services-row.is-active:not(:hover):not(:focus-visible) .services-go-arrow { opacity: 1; transform: none; }
  .services-row.is-active:not(:hover):not(:focus-visible) .services-go-cal { opacity: 0; transform: scale(.7); }
  .services-row:focus-visible { border-radius: 14px; }
  .services-thumb { width: 72px; height: 72px; }
  .services-foot { border-top: 0; padding-top: 0; }
}

/* Phones: photo on the left, name, line, price, arrow on the right */
@media (max-width: 599px) {
  .services-row {
    grid-template-columns: 64px minmax(0, 1fr) 44px;
    grid-template-areas:
      "thumb name go"
      "thumb line go"
      "thumb price go";
    column-gap: 16px;
    row-gap: 0;
    padding: 16px 4px;
  }
  .services-text { display: contents; }
  .services-name { grid-area: name; font-size: calc(23px * var(--display-scale)); }
  .services-line { grid-area: line; margin-top: 5px; font-size: 14px; }
  .services-price { grid-area: price; flex-direction: row; align-items: baseline; gap: 5px; margin-top: 8px; }
  .services-amount { font-size: calc(19px * var(--display-scale)); }
  .services-amount small { display: inline; margin: 0 0 0 4px; }
  .services-thumb { width: 64px; height: 64px; align-self: start; margin-top: 2px; }
  .services-go { width: 44px; height: 44px; align-self: center; }
  .services-foot { flex-direction: column; align-items: stretch; }
  .services-all { width: 100%; }
}

@media (max-width: 359px) {
  .services-row { grid-template-columns: 52px minmax(0, 1fr) 44px; column-gap: 12px; }
  .services-thumb { width: 52px; height: 52px; }
  .services-all { padding-inline: 16px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .services-slide img { transform: none; }
}
.services-nowrap { white-space: nowrap; }

/* Prices use the text font */
.services-amount, .services-caption-price { font-family: var(--f-body); letter-spacing: 0; font-variant-numeric: lining-nums tabular-nums; }
.services-amount { font-size: 19px; font-weight: 400; }
.services-caption-price { font-size: 24px; font-weight: 300; }
