/* Homepage treatment illustrations. Interaction is entirely progressive CSS. */
.advanced__list > .therapy.therapy--illustrated {
  --treatment-icon-size: 6.25rem;
  grid-template-columns: 2.25rem var(--treatment-icon-size) minmax(0, 1fr) minmax(9rem, 14rem) 1.5rem;
  gap: clamp(1rem, 2vw, 1.75rem);
  min-height: 8.75rem;
  padding: 1.1rem 0;
  isolation: isolate;
}

.advanced__list > .therapy.therapy--illustrated::before {
  z-index: -1;
  background: linear-gradient(90deg, rgb(229 243 250 / .72), rgb(229 243 250 / .12));
  opacity: 0;
  transform: none;
  transition: opacity 280ms ease;
}

.advanced__list > .therapy.therapy--illustrated > .therapy__number {
  grid-column: 1;
  grid-row: 1;
  font-variant-numeric: tabular-nums;
}

.advanced__list > .therapy.therapy--illustrated > .therapy__title {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}

.advanced__list > .therapy.therapy--illustrated > .therapy__note {
  grid-column: 4;
  grid-row: 1;
  min-width: 0;
}

.advanced__list > .therapy.therapy--illustrated > .therapy__arrow {
  grid-column: 5;
  grid-row: 1;
  justify-self: end;
  transform: none;
  transition: none;
}

.advanced__list > .therapy.therapy--illustrated:focus-visible {
  outline: 2px solid var(--brand-blue, #007dcc);
  outline-offset: 4px;
  border-radius: 3px;
}

.advanced__list > .therapy.therapy--illustrated:focus-visible::before {
  opacity: 1;
}

.advanced__list > .therapy.therapy--illustrated > .therapy-icon {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: var(--treatment-icon-size);
  height: var(--treatment-icon-size);
  perspective: 600px;
  pointer-events: none;
}

.therapy--illustrated .therapy-icon__figure {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform: none;
  transform-origin: 50% 60%;
}

.therapy--illustrated .therapy-icon__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgb(3 42 64 / .08));
}

/* Percentage coordinates share the fixed square canvas of each image. */
.therapy--illustrated .therapy-icon__marker {
  --marker-size: 14%;
  position: absolute;
  display: block;
  left: var(--marker-x);
  top: var(--marker-y);
  width: var(--marker-size);
  height: var(--marker-size);
  border: 1.5px solid rgb(250 255 255 / .98);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #b6f1fc, #59cce9 48%, #168ed2 100%);
  box-shadow: 0 0 0 1px rgb(54 179 227 / .48), 0 0 10px rgb(56 180 230 / .36);
  transform: translate(-50%, -50%);
}

.therapy--illustrated .therapy-icon__marker::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid rgb(67 184 232 / .7);
  border-radius: inherit;
  opacity: 0;
  transform: scale(1);
}

.therapy--illustrated .therapy-icon__marker--neck {
  width: 26%;
  height: 10%;
  background: rgb(90 201 239 / .15);
  border-color: #e7fbff;
  box-shadow: 0 0 0 1px #53bce6, 0 0 10px rgb(56 180 230 / .48);
}

.therapy--illustrated .therapy-icon__marker--small {
  --marker-size: 10%;
}

.therapy--illustrated .therapy-icon__marker--flow {
  --marker-size: 11%;
}

@media (max-width: 1100px) {
  .advanced__list > .therapy.therapy--illustrated {
    --treatment-icon-size: 5.5rem;
    grid-template-columns: 2rem var(--treatment-icon-size) minmax(0, 1fr) 1.5rem;
    min-height: 7.75rem;
    gap: 1.1rem;
  }

  .advanced__list > .therapy.therapy--illustrated > .therapy__arrow {
    grid-column: 4;
  }

  .advanced__list > .therapy.therapy--illustrated > .therapy__note {
    display: none;
  }
}

@media (max-width: 600px) {
  .advanced__list > .therapy.therapy--illustrated {
    --treatment-icon-size: 4.25rem;
    grid-template-columns: 1.25rem var(--treatment-icon-size) minmax(0, 1fr) 1rem;
    gap: .65rem;
    min-height: 6.5rem;
    padding: 1rem 0;
  }

  .advanced__list > .therapy.therapy--illustrated > .therapy__title {
    font-size: clamp(1.15rem, 4.8vw, 1.6rem);
    line-height: 1.15;
  }

  .advanced__list > .therapy.therapy--illustrated > .therapy__number {
    font-size: .65rem;
    letter-spacing: .03em;
  }

  .advanced__list > .therapy.therapy--illustrated > .therapy__arrow {
    font-size: 1rem;
  }

  .therapy--illustrated .therapy-icon__marker {
    border-width: 1px;
  }
}

@media (max-width: 360px) {
  .advanced__list > .therapy.therapy--illustrated {
    --treatment-icon-size: 3.5rem;
    grid-template-columns: 1.1rem var(--treatment-icon-size) minmax(0, 1fr) .9rem;
    gap: .45rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .therapy--illustrated .therapy-icon__figure {
    transition: transform 320ms cubic-bezier(.2, .7, .3, 1);
  }

  .advanced__list > .therapy.therapy--illustrated:focus-visible .therapy-icon__figure {
    transform: translateY(-2px) rotateY(-5deg) rotateZ(-1deg);
  }

  .advanced__list > .therapy.therapy--illustrated:focus-visible .therapy-icon__marker::before {
    animation: treatment-marker-pulse 1.4s ease-out 2;
  }
}

@media (hover: hover) and (pointer: fine) {
  .advanced__list > .therapy.therapy--illustrated:hover::before {
    opacity: 1;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .advanced__list > .therapy.therapy--illustrated:hover .therapy-icon__figure {
    transform: translateY(-2px) rotateY(-5deg) rotateZ(-1deg);
  }

  .advanced__list > .therapy.therapy--illustrated:hover .therapy-icon__marker::before {
    animation: treatment-marker-pulse 1.4s ease-out 2;
  }
}

@keyframes treatment-marker-pulse {
  0% { opacity: 0; transform: scale(.9); }
  18% { opacity: .75; }
  100% { opacity: 0; transform: scale(1.9); }
}

/* Disable motion in this section, including the earlier row reveal. */
@media (prefers-reduced-motion: reduce) {
  html.home-motion-ready body[data-page="home"] .advanced .home-reveal,
  html.home-motion-ready body[data-page="home"] .advanced .home-reveal:not(.is-home-visible) {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .advanced__list > .therapy.therapy--illustrated::before,
  .therapy--illustrated .therapy-icon__figure {
    transition: none;
  }

  .advanced__list > .therapy.therapy--illustrated .therapy-icon__figure {
    transform: none;
  }

  .advanced__list > .therapy.therapy--illustrated .therapy-icon__marker::before {
    animation: none;
  }
}
