.testimonials {
  /* Blends in from trust-safety's dark exit instead of a hard cut -- same
     --ink used for every dark section on the page. */
  background:
    linear-gradient(to bottom, var(--ink) 0%, rgba(10, 10, 12, 0) 150px),
    var(--bg);
  padding: 100px 32px;
}
.testimonials .wrap { max-width: 1180px; }
.testimonials .section-head { max-width: 600px; margin-bottom: 56px; }

/* ---- Stage: big rounded gradient panel the fanned cards sit on ---- */
.testimonials-stage {
  position: relative;
  overflow: hidden;
  border-radius: 40px;
  background: radial-gradient(120% 140% at 28% -10%, #FFC48A 0%, #FCDEB4 38%, #FBF3E6 68%, #FBFBFC 100%);
  padding: 88px 32px 130px;
}

.testimonials-watermark {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 13vw, 168px);
  line-height: .8;
  letter-spacing: -.03em;
  color: rgba(10, 10, 12, .055);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}

.testimonials-grid {
  position: relative;
  z-index: 1;
  height: 360px;
}

.testimonial-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 320px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 54px -22px rgba(0, 0, 0, .18);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .35s ease, z-index 0s;
}

/* Fanned "hand of cards" -- center card front and lifted, the other two
   tucked behind and rotated outward on either side. */
.testimonial-card:nth-child(1) { transform: translateX(calc(-50% - 194px)) rotate(-9deg); z-index: 1; }
.testimonial-card:nth-child(2) { transform: translateX(-50%) translateY(-26px) rotate(0deg); z-index: 3; }
.testimonial-card:nth-child(3) { transform: translateX(calc(-50% + 194px)) rotate(9deg); z-index: 2; }

.testimonials-grid:hover .testimonial-card:nth-child(1) { transform: translateX(calc(-50% - 224px)) rotate(-12deg); }
.testimonials-grid:hover .testimonial-card:nth-child(3) { transform: translateX(calc(-50% + 224px)) rotate(12deg); }

.testimonial-card:hover {
  z-index: 4 !important;
  box-shadow: 0 38px 64px -20px rgba(0, 0, 0, .26);
}
.testimonial-card:nth-child(2):hover { transform: translateX(-50%) translateY(-34px) rotate(0deg); }
.testimonial-card:nth-child(1):hover { transform: translateX(calc(-50% - 224px)) translateY(-8px) rotate(-12deg); }
.testimonial-card:nth-child(3):hover { transform: translateX(calc(-50% + 224px)) translateY(-8px) rotate(12deg); }

.testimonial-card.inverted {
  background: var(--ink);
  color: #fff;
  border: none;
}

.stars { display: flex; gap: 3px; color: var(--accent); margin-bottom: 16px; }

.testimonial-quote {
  font-size: 16px;
  line-height: 1.6;
  color: #2a2a2f;
  margin: 0;
  flex: 1;
}
.testimonial-card.inverted .testimonial-quote { color: rgba(255, 255, 255, .92); }

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

/* Initial-letter avatar -- accent-tinted, on-brand, and doesn't depend on
   any illustration asset (the old icon set carried its own baked-in blues/
   pinks/yellows that clashed with the site's orange/white/black system). */
.avatar-initial {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-tint);
  border: 1px solid rgba(var(--accent-rgb), .18);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}

.testimonial-card.inverted .avatar-initial {
  background: rgba(var(--accent-rgb), .16);
  border-color: rgba(var(--accent-rgb), .3);
  color: var(--accent-light);
}

.author-name { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.testimonial-card.inverted .author-name { color: #fff; }
.author-role { font-size: 13px; color: var(--text-faint); }
.testimonial-card.inverted .author-role { color: rgba(255, 255, 255, .55); }

@media (max-width: 860px) {
  .testimonials { padding: 72px 20px; }
  .testimonials-stage { border-radius: 28px; padding: 56px 20px 40px; }
  .testimonials-watermark { display: none; }

  /* The tilted overlapping fan only works with room to spread out --
     below that, fall back to a plain stacked column of upright cards. */
  .testimonials-grid {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 420px;
    margin: 0 auto;
  }
  .testimonial-card,
  .testimonial-card:hover,
  .testimonials-grid:hover .testimonial-card {
    position: static;
    width: auto;
    transform: none !important;
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .1);
  }
}

@media (max-width: 480px) {
  .testimonials { padding: 56px 14px; }
  .testimonials-stage { padding: 44px 14px 32px; }
  .testimonial-card { padding: 22px 18px; border-radius: 18px; }
  .testimonial-quote { font-size: 15px; }
}
