/* ============================================================
   5. TESTIMONIALS
   ============================================================ */
.tm {
  background: var(--bg-soft);
  padding: var(--sec-pad-y) 0;
}
.tm__inner {
  max-width: 980px;
  margin-inline: auto;
  padding: 0 var(--gutter);
}
.tm__head {
  text-align: center;
  margin-bottom: var(--sec-head-mb);
}
.tm__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink);
  margin-bottom: var(--eyebrow-mb);
  text-transform: uppercase;
}
.tm__eyebrow::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand-grad);
}
.tm__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--title-size);
  line-height: var(--title-lh);
  letter-spacing: var(--title-track);
  color: var(--ink);
}
.tm__title-accent {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tm__viewport {
  overflow: hidden;
  border-radius: var(--r-lg);
}
.tm__track {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.tm-card {
  flex: 0 0 100%;
  background: #fff;
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid rgba(10, 22, 56, 0.05);
  box-shadow: 0 1px 2px rgba(10, 22, 56, 0.04), 0 18px 50px -10px rgba(10, 22, 56, 0.08);
  position: relative;
  min-height: 280px;
}
.tm-card__quote {
  color: rgba(58, 80, 191, 0.85);
  display: inline-block;
  margin-bottom: 18px;
}
.tm-card__body {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin-bottom: 30px;
}
.tm-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.tm-card__name {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.tm-card__meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.tm-card__uses {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tm-card__uses-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.tm-card__uses-pill {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(10, 22, 56, 0.05);
}

.tm__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
}
.tm__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(10, 22, 56, 0.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 4px 12px -4px rgba(10, 22, 56, 0.08);
  transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1),
              border-color 0.22s ease,
              color 0.22s ease,
              box-shadow 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.tm__arrow:hover {
  transform: translateY(-2px);
  border-color: var(--brand-1);
  color: var(--brand-1);
  box-shadow: 0 10px 20px -6px rgba(58, 80, 191, 0.20);
}
.tm__arrow:active { transform: translateY(0); transition-duration: 0.08s; }
.tm__arrow:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 3px; }
.tm__arrow svg { width: 18px; height: 18px; }

.tm__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.tm__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c8cdd8;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}
.tm__dot:hover { background: #8a93aa; }
.tm__dot.is-active {
  width: 26px;
  border-radius: 999px;
  background: var(--brand-1);
}

/* Reveal */
.tm__head, .tm__viewport, .tm__dots {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.tm.is-in .tm__head     { opacity: 1; transform: translateY(0); }
.tm.is-in .tm__viewport { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.tm.is-in .tm__dots     { opacity: 1; transform: translateY(0); transition-delay: 0.22s; }
.tm.is-in .tm__viewport { transform: none; }

/* Quote glyph: bounce-in on active slide */
.tm-card__quote {
  display: inline-block;
  transform-origin: bottom left;
  animation: quotePop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.tm-card.is-active .tm-card__quote { animation: quotePop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes quotePop {
  0%   { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  60%  { opacity: 1; transform: scale(1.1) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* Body + author stagger on active slide */
.tm-card.is-active .tm-card__body,
.tm-card.is-active .tm-card__foot {
  animation: tmRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.tm-card.is-active .tm-card__body { animation-delay: 0.12s; }
.tm-card.is-active .tm-card__foot { animation-delay: 0.22s; }
@keyframes tmRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Active dot: progress fill while it counts toward the next slide */
.tm__dot { position: relative; overflow: hidden; }
.tm__dot.is-active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.85));
  transform: translateX(-100%);
  animation: tmDotProgress 5.2s linear forwards;
}
.tm.is-paused .tm__dot.is-active::after { animation-play-state: paused; }
@keyframes tmDotProgress {
  to { transform: translateX(0); }
}

