/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials {
  position: relative;
  background: var(--violet);
  padding-block: clamp(4rem, 7vw, 8.5rem) clamp(3.5rem, 6vw, 7rem);
  overflow: clip;
  text-align: center;
}
.testimonials__title { font-size: clamp(1.55rem, 0.95rem + 1.55vw, 3rem); font-weight: 500; letter-spacing: -0.04em; }
.testimonials__big-quote {
  position: absolute; right: 2.5%; bottom: -3%;
  width: clamp(7rem, 16vw, 20rem); aspect-ratio: 48 / 40;
  color: #7f62f2;
  rotate: 180deg;
}
.testimonials__big-quote svg { width: 100%; height: 100%; fill: currentColor; }

.t-slider {
  position: relative;
  width: min(100%, clamp(40rem, 57vw, 69rem));
  margin: clamp(3rem, 5vw, 5rem) auto 0;
}
.t-orb { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.t-orb--lg {
  left: -8%; bottom: -16%;
  width: clamp(8rem, 16vw, 19.5rem); aspect-ratio: 1;
  background: radial-gradient(circle at 72% 24%, #5f95ff 0%, #3f63f0 45%, #5a3fe0 100%);
}
.t-orb--sm {
  right: -3%; top: 10%;
  width: clamp(2.5rem, 4.8vw, 6rem); aspect-ratio: 1;
  background: radial-gradient(circle at 30% 30%, #7aa0ff, #4155e8 70%);
}

.t-card {
  position: relative; z-index: 1;
  display: grid; align-items: center;
  min-height: clamp(17rem, 26vw, 31rem);
  padding: clamp(2.5rem, 4.4vw, 5rem) clamp(1.5rem, 6vw, 7rem);
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: clamp(1rem, 1.5vw, 1.75rem);
  text-align: left;
  touch-action: pan-y;
}
.t-card:focus-visible { outline-offset: 6px; }
.t-card__quote {
  position: absolute; top: 0; left: clamp(1rem, 3vw, 3rem);
  width: clamp(3.5rem, 6vw, 7rem); aspect-ratio: 48 / 40;
  padding-inline: 0.5rem;
  background: var(--violet);
  translate: 0 -55%;
  color: rgb(255 255 255 / 0.75);
}
.t-card__quote svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.2; }

.t-card__slides { display: grid; }
.t-slide {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4.5vw, 5rem);
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s var(--ease-soft), visibility 0s linear 0.5s;
}
.t-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.8s var(--ease-soft) 0.12s, visibility 0s; }
.t-slide__logo {
  display: flex; align-items: center; justify-content: center;
  width: clamp(5rem, 10.5vw, 12.5rem); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
}
.t-slide__logo svg { width: 66%; height: auto; }
.t-slide__heading { font-size: clamp(1.5rem, 0.9rem + 1.7vw, 3.1rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.t-slide blockquote { margin-top: clamp(0.75rem, 1.4vw, 1.5rem); }
.t-slide blockquote p { max-width: 28em; font-size: clamp(0.95rem, 0.72rem + 0.5vw, 1.35rem); line-height: 1.45; color: rgb(255 255 255 / 0.9); }
.t-slide figcaption { margin-top: 1.25rem; font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(255 255 255 / 0.62); }

.t-controls { display: flex; justify-content: center; align-items: center; gap: clamp(1rem, 2vw, 2rem); margin-top: clamp(2.25rem, 4vw, 4rem); }
.t-btn { display: grid; place-items: center; width: 3.25rem; height: 2.5rem; color: var(--white); opacity: 0.6; transition: opacity 0.3s, transform 0.5s var(--ease-out); }
.t-btn svg { width: 2.4rem; height: 1.2rem; }
.t-btn--prev svg { rotate: 180deg; }
.t-btn:hover, .t-btn:focus-visible { opacity: 1; transform: translateX(4px); }
.t-btn--prev:hover, .t-btn--prev:focus-visible { transform: translateX(-4px); }
.t-count { display: flex; align-items: center; gap: 0.75rem; font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.t-count__sep { position: relative; width: 3.5rem; height: 1px; background: rgb(255 255 255 / 0.3); overflow: hidden; }
.t-count__sep::after { content: ""; position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: 0 50%; }
.t-slider.is-playing .t-count__sep::after { animation: t-progress var(--t-interval, 6s) linear forwards; }
.t-slider.is-playing.is-paused .t-count__sep::after { animation-play-state: paused; }
@keyframes t-progress { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: no-preference) {
  .t-slide__logo { transform: scale(0.8) rotate(-12deg); transition: transform 1s var(--ease-out); }
  .t-slide.is-active .t-slide__logo { transform: none; }
  .t-slide__body > * { transform: translate3d(calc(var(--dir, 1) * 2.5rem), 0, 0); transition: transform 1s var(--ease-out); }
  .t-slide.is-leaving .t-slide__body > * { transform: translate3d(calc(var(--dir, 1) * -2.5rem), 0, 0); transition-duration: 0.6s; }
  .t-slide.is-active .t-slide__body > * { transform: none; }
  .t-slide.is-active .t-slide__body > :nth-child(2) { transition-delay: 0.06s; }
  .t-slide.is-active .t-slide__body > :nth-child(3) { transition-delay: 0.12s; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry) {
    .t-orb--lg { animation: t-rise linear both; animation-timeline: view(); }
    .t-orb--sm, .testimonials__big-quote { animation: t-rise-soft linear both; animation-timeline: view(); }
    @keyframes t-rise { from { translate: 0 14%; } to { translate: 0 -14%; } }
    @keyframes t-rise-soft { from { translate: 0 6%; } to { translate: 0 -6%; } }
  }
}

@media (max-width: 48em) {
  .t-slider { margin-top: 3.25rem; }
  .t-card { padding: 3.25rem 1.5rem 2.25rem; min-height: 0; }
  .t-slide { grid-template-columns: 1fr; justify-items: start; gap: 1.5rem; }
  .t-slide__logo { width: 5rem; }
  .t-orb--lg { left: -20%; bottom: -10%; }
}
