/* =============================================
   TESTIMONIALS — Vertical multi-column marquee
   Brand: #ff7704 (Primary) · #161616 (Black) · #fafbfd (BG)
   ============================================= */

.testimonials {
  position: relative;
  padding: 120px 0;
  background: #ffffff;
  overflow: hidden;
}

.ts-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 40% at 15% 10%, rgba(255, 119, 4, 0.07), transparent 70%),
    radial-gradient(45% 35% at 85% 90%, rgba(255, 119, 4, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ts-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.ts-header {
  text-align: center;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.testimonials.is-visible .ts-header {
  opacity: 1;
  transform: translateY(0);
}

.ts-eyebrow {
  display: inline-block;
  font-family: var(--ff-primary, "Fira Sans", sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff7704;
  background: #fff5eb;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.ts-title {
  font-family: var(--ff-primary, "Fira Sans", sans-serif);
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  color: #161616;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.ts-sub {
  margin: 0 auto;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 560px;
}

/* ── Marquee wrapper (vertical columns) ── */
.ts-marquee {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  height: 600px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease 0.2s;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 80px,
    #000 calc(100% - 80px),
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0,
    #000 80px,
    #000 calc(100% - 80px),
    transparent 100%
  );
}

.testimonials.is-visible .ts-marquee {
  opacity: 1;
}

.ts-col {
  position: relative;
  overflow: hidden;
}

.ts-col-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Use margin-bottom on every card (incl. duplicates) so the total track
   height is an exact multiple of (card + gap). This is what makes
   translateY(-50%) land on a duplicate boundary cleanly — without it,
   cards visually jump/disappear at the loop seam. */
.ts-col-track .ts-card {
  margin-bottom: 20px;
}

/* Different directions and speeds for visual variety */
.ts-col--down .ts-col-track {
  animation: ts-scroll-down 60s linear infinite;
}

.ts-col--up .ts-col-track {
  animation: ts-scroll-up 32s linear infinite;
}

.ts-col--down-slow .ts-col-track {
  animation: ts-scroll-down 46s linear infinite;
}

@keyframes ts-scroll-down {
  from { transform: translate3d(0, -50%, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

@keyframes ts-scroll-up {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -50%, 0); }
}

/* Pause on hover */
.ts-marquee:hover .ts-col-track {
  animation-play-state: paused;
}

/* ── Card ── */
.ts-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 30px 26px 24px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  text-align: left;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  overflow: hidden;
}

.ts-card::before {
  content: "\201C"; /* curly opening quote */
  position: absolute;
  top: -22px;
  left: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 96px;
  line-height: 1;
  font-weight: 700;
  color: rgba(255, 119, 4, 0.12);
  pointer-events: none;
}

.ts-card::after {
  /* subtle accent gradient that appears on hover */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 119, 4, 0.06), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.ts-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(255, 119, 4, 0.14);
  border-color: rgba(255, 119, 4, 0.45);
}

.ts-card:hover::after {
  opacity: 1;
}

.ts-quote {
  position: relative;
  font-family: var(--ff-primary, "Inter", sans-serif);
  font-size: 0.97rem;
  line-height: 1.65;
  color: #2d3748;
  margin: 0 0 22px;
  z-index: 1;
}

.ts-author {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.ts-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe2c8 0%, #ffb070 100%);
  color: #b3530a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-primary, "Fira Sans", sans-serif);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 119, 4, 0.3);
}

.ts-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.ts-name {
  color: #161616;
  font-weight: 600;
  font-size: 0.93rem;
}

.ts-role {
  color: #6b7280;
  font-size: 0.82rem;
  margin-top: 2px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .ts-col--down .ts-col-track,
  .ts-col--up .ts-col-track,
  .ts-col--down-slow .ts-col-track {
    animation: none;
    transform: none;
  }
  .ts-marquee {
    height: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ── Responsive ── */
@media (max-width: 992px) {
  .ts-marquee {
    grid-template-columns: repeat(2, 1fr);
    height: 560px;
    gap: 16px;
  }
  .ts-col--desktop.ts-col--down-slow {
    display: none;
  }
}

@media (max-width: 640px) {
  .testimonials {
    padding: 80px 0;
  }
  .ts-header {
    margin-bottom: 40px;
  }
  .ts-marquee {
    grid-template-columns: 1fr;
    height: 520px;
    gap: 16px;
    -webkit-mask-image: linear-gradient(
      180deg,
      transparent 0,
      #000 50px,
      #000 calc(100% - 50px),
      transparent 100%
    );
    mask-image: linear-gradient(
      180deg,
      transparent 0,
      #000 50px,
      #000 calc(100% - 50px),
      transparent 100%
    );
  }
  .ts-col--desktop {
    display: none;
  }
  .ts-card {
    padding: 26px 22px 22px;
  }
}
