.testimonials {
  position: relative;
  overflow: hidden;
  background: var(--color-neutral-white);
  padding: 56px 24px 44px;
}

.testimonials::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 220px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--color-neutral-white) 78%);
}

.testimonials__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.testimonials__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.testimonials__badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  color: var(--color-brand-blue);
  background: var(--color-brand-blue-lightest);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.testimonials__title {
  max-width: 800px;
  margin: 0;
  font-family: var(--font-geist);
  font-size: 40px;
  line-height: 1.16;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-neutral-black);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  margin-top: 72px;
  height: 590px;
  overflow: hidden;
}

.testimonials__column {
  --testimonials-shift: 520px;
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 26px;
  height: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 84%, transparent 100%);
}

.testimonials__track {
  display: flex;
  flex-direction: column;
  gap: 26px;
  will-change: transform;
  animation-duration: var(--testimonials-speed, 24s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.testimonials__group {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.testimonials__column--left .testimonials__track,
.testimonials__column--right .testimonials__track {
  animation-name: testimonials-scroll-down;
}

.testimonials__column--center .testimonials__track {
  animation-name: testimonials-scroll-up;
  animation-duration: var(--testimonials-speed, 28s);
}

.testimonials__column:hover .testimonials__track,
.testimonials__column:focus-within .testimonials__track {
  animation-play-state: paused;
}

.testimonials__column--left,
.testimonials__column--right {
  padding-top: 78px;
}

.testimonials__column--center {
  padding-top: 0;
}

.testimonials__card {
  width: 100%;
  min-height: 148px;
  display: flex;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--color-neutral-100);
}

.testimonials__card-inner {
  flex: 1;
  min-width: 0;
  padding: 20px 20px 22px;
  border-radius: 10px;
  background: var(--color-neutral-white);
}

.testimonials__card--soft {
  opacity: 0.32;
}

.testimonials__card h3 {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-neutral-900);
}

.testimonials__stars {
  margin-bottom: 18px;
  color: var(--color-brand-blue);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
}

.testimonials__card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--color-neutral-600);
}

@media (max-width: 960px) {
  .testimonials {
    padding: 76px 20px 56px;
  }

  .testimonials::after {
    display: none;
  }

  .testimonials__title {
    font-size: 34px;
  }

  .testimonials__title br {
    display: none;
  }

  .testimonials__grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    height: auto;
    overflow: visible;
    margin: 52px auto 0;
    gap: 18px;
  }

  .testimonials__column {
    height: auto;
    overflow: visible;
    gap: 18px;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .testimonials__track {
    gap: 18px;
    animation: none;
  }

  .testimonials__group {
    gap: 18px;
  }

  .testimonials__group[aria-hidden="true"] {
    display: none;
  }

  .testimonials__column--left,
  .testimonials__column--right,
  .testimonials__column--center {
    padding-top: 0;
  }

  .testimonials__card {
    min-height: auto;
  }

  .testimonials__card--soft {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonials__grid {
    height: auto;
    overflow: visible;
  }

  .testimonials__column {
    height: auto;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .testimonials__track {
    animation: none;
  }

  .testimonials__group[aria-hidden="true"] {
    display: none;
  }
}

@keyframes testimonials-scroll-up {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, calc(var(--testimonials-shift) * -1), 0);
  }
}

@keyframes testimonials-scroll-down {
  from {
    transform: translate3d(0, calc(var(--testimonials-shift) * -1), 0);
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 520px) {
  .testimonials {
    padding-top: 64px;
  }

  .testimonials__badge {
    margin-bottom: 22px;
  }

  .testimonials__title {
    font-size: 28px;
  }

  .testimonials__card {
    padding: 12px;
    border-radius: 12px;
  }

  .testimonials__card-inner {
    padding: 20px;
  }
}
