#player-feedback .wrap {
  width: min(1100px, calc(100% - 40px));
}

#player-feedback h2 {
  margin-bottom: clamp(42px, 6vw, 80px);
}

.testimonial-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 38px;
  align-items: start;
  position: relative;
  isolation: isolate;
}

.testimonial {
  position: relative;
  min-width: 0;
  margin: 0;
  z-index: var(--layer);
}

.testimonial--taylor  { --layer: 4; --angle: -4deg; }
.testimonial--andrew  { --layer: 3; --angle: 3deg; }
.testimonial--yi      { --layer: 2; --angle: -2deg; --crop: 3.7; }
.testimonial--malcolm { --layer: 1; --angle: 4deg; --crop: 4.15; }

.testimonial-screenshot {
  transform-origin: center;
  background: white;
}

.testimonial-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.testimonial--yi img,
.testimonial--malcolm img {
  aspect-ratio: var(--crop);
  height: auto;
  object-fit: cover;
}

.testimonial figcaption {
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.testimonial figcaption span {
  color: var(--text);
  font-weight: 650;
}

.testimonial-raise,
.testimonial-active-caption {
  display: none;
}

.testimonial-credit {
  margin: 28px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.8125rem;
}

@media (min-width: 781px) {
  .testimonial-stack.is-interactive {
    display: block;
    height: clamp(336px, 38vw, 430px);
  }

  .is-interactive .testimonial {
    position: absolute;
    top: var(--top);
    left: var(--left);
    width: var(--width);
  }

  .is-interactive .testimonial--taylor  { --top: 4%;  --left: 5%;  --width: 51%; }
  .is-interactive .testimonial--andrew  { --top: 21%; --left: 46%; --width: 49%; }
  .is-interactive .testimonial--yi      { --top: 50%; --left: 13%; --width: 42%; }
  .is-interactive .testimonial--malcolm { --top: 65%; --left: 48%; --width: 40%; }

  .is-interactive .testimonial-screenshot {
    position: relative;
    transform: rotate(var(--angle));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
    transition: transform 340ms cubic-bezier(.2, .8, .25, 1), box-shadow 340ms;
  }

  .is-interactive .testimonial.is-front {
    z-index: 5;
  }

  .is-interactive .testimonial.is-front .testimonial-screenshot {
    transform: translateY(-9px) rotate(0deg) scale(1.038);
    box-shadow: 0 24px 62px rgba(0, 0, 0, 0.6);
  }

  .is-interactive .testimonial figcaption {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .testimonial-stack.is-interactive + .testimonial-active-caption {
    display: block;
    margin: 0;
    min-height: 1.5em;
    color: var(--muted-strong);
    text-align: center;
    font-size: 0.875rem;
  }

  .testimonial-active-caption + .testimonial-credit {
    margin-top: 10px;
  }

  .is-interactive .testimonial-raise {
    display: block;
    position: absolute;
    z-index: 1;
    inset: 0;
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
}

@media (max-width: 780px) {
  .testimonial-stack {
    grid-template-columns: minmax(0, 1fr);
    max-width: 550px;
    margin-inline: auto;
    gap: 28px;
  }

  .testimonial--yi { width: 88%; }
  .testimonial--malcolm { width: 93%; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .is-interactive .testimonial-screenshot {
    transition: none;
  }
}
