.testimonials {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(104px, 9vw, 150px);
  padding-bottom: clamp(110px, 10vw, 165px);
  background:
    radial-gradient(circle at 79% 18%, rgba(146, 75, 198, .2), transparent 30%),
    radial-gradient(circle at 12% 84%, rgba(56, 91, 134, .16), transparent 32%),
    linear-gradient(180deg, #090e17 0%, #0c1220 56%, #080d16 100%);
  color: #f5f1f7;
}

.testimonials::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -210px;
  right: -170px;
  width: 660px;
  aspect-ratio: 1;
  background: url('assets/figma-decor/glass-ring.webp') center / contain no-repeat;
  opacity: .11;
  mix-blend-mode: screen;
  transform: rotate(-24deg);
  pointer-events: none;
}

.testimonials::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 9, 16, .64), transparent 17%),
    linear-gradient(0deg, rgba(3, 9, 16, .58), transparent 19%);
  pointer-events: none;
}

.testimonials-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: clamp(44px, 7vw, 108px);
  align-items: end;
}

.testimonials-intro h2 {
  max-width: 1050px;
  margin: 0;
  color: #f5f1f7;
  font: 500 clamp(48px, 5.3vw, 82px) / 1.02 var(--sans);
  letter-spacing: -.045em;
}

.testimonials-intro h2 em {
  color: var(--accent);
  font-style: normal;
}

.testimonials-intro p {
  max-width: 560px;
  margin: 0 0 7px;
  color: rgba(245, 241, 247, .68);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.65;
}

.testimonials-intro p strong {
  display: block;
  margin-bottom: 6px;
  color: #f5f1f7;
  font-size: 22px;
  font-weight: 400;
}

.testimonials-intro-side {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.testimonials-glass-relationships {
  display: block;
  width: clamp(230px, 22vw, 360px);
  height: auto;
  margin: -54px auto 0;
  opacity: .78;
  translate: 0 var(--parallax-y, 0px);
  filter: drop-shadow(0 30px 60px rgba(88, 48, 150, .26));
}

.testimonials-intro-side p {
  align-self: flex-start;
}

.reviews-carousel {
  position: relative;
  height: 455px;
  margin: clamp(54px, 5.5vw, 82px) auto 0;
  perspective: 1500px;
  outline: none;
}

.reviews-carousel:focus-visible {
  border-radius: 32px;
  outline: 2px solid rgba(190, 125, 237, .75);
  outline-offset: 8px;
}

.reviews-carousel__stage {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
}

.review-card {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  width: min(620px, calc(100% - 240px));
  min-height: 390px;
  flex-direction: column;
  padding: clamp(32px, 3vw, 44px);
  overflow: hidden;
  border: 1px solid rgba(163, 105, 208, .46);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 0%, rgba(154, 89, 202, .18), transparent 38%),
    linear-gradient(155deg, rgba(25, 35, 51, .9), rgba(10, 17, 29, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 34px 78px rgba(0, 0, 0, .3);
  color: #f5f1f7;
  opacity: 0;
  transform: translateX(-50%) translateZ(-300px) scale(.72);
  transition: transform .48s cubic-bezier(.2, .7, .2, 1), opacity .38s ease, filter .38s ease, border-color .3s ease;
  will-change: transform, opacity;
  pointer-events: none;
}

.review-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, .06), transparent 28%, transparent 72%, rgba(179, 104, 230, .05));
  pointer-events: none;
}

.review-card.is-active {
  z-index: 3;
  opacity: 1;
  transform: translateX(-50%) translateZ(64px) scale(1);
  pointer-events: auto;
}

.review-card.is-before {
  z-index: 1;
  opacity: .32;
  filter: blur(1px) saturate(.75);
  transform: translateX(calc(-50% - 430px)) translateZ(-230px) rotateY(19deg) scale(.8);
}

.review-card.is-after {
  z-index: 1;
  opacity: .32;
  filter: blur(1px) saturate(.75);
  transform: translateX(calc(-50% + 430px)) translateZ(-230px) rotateY(-19deg) scale(.8);
}

.review-card > strong {
  position: relative;
  z-index: 1;
  color: #bc82e6;
  font: 500 70px / .42 var(--sans);
}

.review-card > p {
  position: relative;
  z-index: 1;
  margin: 36px 0 32px;
  color: rgba(245, 241, 247, .9);
  font-size: clamp(20px, 1.55vw, 25px);
  font-weight: 300;
  line-height: 1.5;
}

.review-card footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2px 17px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .11);
}

.review-card footer b {
  color: #f5f1f7;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
}

.review-card footer small {
  margin-top: 4px;
  color: rgba(245, 241, 247, .56);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.25;
}

.reviews-carousel__arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 58px;
  border: 1px solid rgba(179, 104, 230, .8);
  border-radius: 32px;
  background: rgba(12, 18, 32, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px);
  color: #c88aec;
  font-size: 26px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}

.reviews-carousel__arrow--prev { left: 0; }
.reviews-carousel__arrow--next { right: 0; }

.reviews-carousel__arrow:hover,
.reviews-carousel__arrow:focus-visible {
  outline: 0;
  border-color: #c88aec;
  background: linear-gradient(135deg, #7138bf, #9b5adb);
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px;
  margin-top: 18px;
}

.review-tags span {
  padding: 10px 17px;
  border: 1px solid rgba(163, 105, 208, .36);
  border-radius: 999px;
  background: rgba(13, 21, 35, .68);
  color: rgba(245, 241, 247, .66);
  font-size: 16px;
  font-weight: 300;
  backdrop-filter: blur(12px);
}

.reviews-carousel__dots {
  display: flex;
  max-width: min(720px, 100%);
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 27px auto 0;
}

.reviews-carousel__dots i {
  width: 7px;
  height: 7px;
  flex: 0 1 7px;
  border-radius: 50%;
  background: rgba(188, 130, 230, .34);
  transition: width .25s ease, flex-basis .25s ease, background .25s ease;
}

.reviews-carousel__dots i.is-active {
  width: 28px;
  flex-basis: 28px;
  border-radius: 8px;
  background: #a45bd7;
}

.review-card--all-reviews {
  border-color: rgba(198, 139, 237, .72);
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .16), transparent 26%),
    linear-gradient(140deg, #4f258a, #783bb0 58%, #9d5fd0);
}

.review-card--all-reviews > strong,
.review-card--all-reviews > p { color: #fff; }

.review-card--all-reviews > strong { font-size: 52px; line-height: .58; }
.review-card--all-reviews > p { max-width: 470px; }
.review-card--all-reviews footer { grid-template-columns: 1fr; border-color: rgba(255, 255, 255, .28); }

.review-card--all-reviews footer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  transition: background .2s ease, color .2s ease;
}

.review-card--all-reviews footer a:hover,
.review-card--all-reviews footer a:focus-visible {
  outline: 0;
  background: #fff;
  color: #7138bf;
}

@media (max-width: 1180px) {
  .testimonials-intro { grid-template-columns: 1fr; }
  .testimonials-intro p { max-width: 760px; }
  .testimonials-intro-side {
    display: grid;
    grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
    align-items: center;
    gap: 30px;
  }
  .testimonials-glass-relationships {
    width: min(260px, 100%);
    margin: -22px 0 0;
  }
  .review-card.is-before { transform: translateX(calc(-50% - 310px)) translateZ(-230px) rotateY(19deg) scale(.76); }
  .review-card.is-after { transform: translateX(calc(-50% + 310px)) translateZ(-230px) rotateY(-19deg) scale(.76); }
}

@media (max-width: 720px) {
  .testimonials { padding-top: 84px; padding-bottom: 92px; }
  .testimonials::before { top: -90px; right: -210px; width: 440px; opacity: .08; }
  .testimonials-intro h2 { font-size: clamp(40px, 11vw, 56px); }
  .testimonials-intro p { font-size: 16px; }
  .testimonials-intro p strong { font-size: 20px; }
  .testimonials-intro-side {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
  }
  .testimonials-glass-relationships {
    width: 140px;
    margin: 0 0 0 -18px;
    --parallax-y: 0px !important;
  }

  .reviews-carousel {
    height: 440px;
    margin-top: 42px;
  }

  .review-card {
    width: calc(100% - 20px);
    min-height: 370px;
    padding: 30px 24px;
    border-radius: 24px;
  }

  .review-card.is-before,
  .review-card.is-after {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateZ(-240px) scale(.75);
  }

  .review-card > p {
    margin-top: 30px;
    font-size: 19px;
    line-height: 1.48;
  }

  .reviews-carousel__arrow {
    top: auto;
    bottom: 0;
    width: 56px;
    height: 44px;
    font-size: 20px;
    transform: none;
  }

  .reviews-carousel__arrow:hover,
  .reviews-carousel__arrow:focus-visible { transform: scale(1.05); }
  .reviews-carousel__arrow--prev { left: calc(50% - 68px); }
  .reviews-carousel__arrow--next { right: calc(50% - 68px); }
  .review-tags { margin-top: 8px; }
  .review-tags span { padding: 9px 14px; }
  .reviews-carousel__dots { gap: 5px; margin-top: 24px; }
  .reviews-carousel__dots i { width: 5px; height: 5px; flex-basis: 5px; }
  .reviews-carousel__dots i.is-active { width: 20px; flex-basis: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .review-card,
  .reviews-carousel__arrow,
  .reviews-carousel__dots i { transition: none; }
}
