/* ════════════════════════════════
   TESTIMONIALS SECTION (Carousel)
════════════════════════════════ */

.section-testimonials {
  position: relative;
  z-index: 2;
  background: var(--color-bg);
  padding: clamp(80px, 8vw, 120px) clamp(20px, 3.5vw, 50px);
  overflow: hidden;
}

.testimonials__inner {
  /* No max-width — extends edge-to-edge with section padding (matches work/services) */
}

/* ── Section heading ── */
.testimonials__head {
  margin-bottom: clamp(40px, 4.5vw, 64px);
  max-width: 1100px;
}

.testimonials__heading {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: var(--weight-medium);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  color: var(--color-white);
  margin: 0;
  text-transform: uppercase;
}

/* ════════════════════════════════
   CAROUSEL — slides stacked via grid (overlap)
════════════════════════════════ */

.testimonials__carousel {
  position: relative;
}

.testimonials__track {
  display: grid;
  grid-template-areas: "stack";
}

.testimonial {
  grid-area: stack;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 1.6vw, 24px);
  align-items: stretch;
  /* All slides hidden by default — JS reveals via gsap inline.
     Prevents FOUC of slide 0 before JS runs. */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Active slide — make CTAs/links clickable */
.testimonial[data-active] {
  pointer-events: auto;
}

/* ── Card (left) ── */
.testimonial__card {
  background: var(--color-bg-surface);
  border-radius: clamp(16px, 1.4vw, 24px);
  padding: clamp(28px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2vw, 32px);
  min-height: clamp(480px, 50vw, 680px);
}

/* Brand logo */
.testimonial__brand {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 12px);
}

.testimonial__brand-mark {
  width: clamp(20px, 2vw, 28px);
  height: clamp(20px, 2vw, 28px);
  flex-shrink: 0;
  color: var(--color-white);
}

.testimonial__brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.testimonial__brand-name {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.3vw, 20px);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tight);
  color: var(--color-white);
}

/* Divider */
.testimonial__divider {
  height: 1px;
  background: var(--color-border);
  width: 100%;
}

/* Quote — words wrapped via SplitText on slide active */
.testimonial__quote {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 36px);
  font-weight: var(--weight-medium);
  line-height: 1.18;
  letter-spacing: var(--tracking-tight);
  color: var(--color-white);
  margin: 0;
  flex: 1;
}

/* Author */
.testimonial__author {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testimonial__name {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: var(--weight-medium);
  color: var(--color-white);
  margin: 0;
}

.testimonial__role {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.05vw, 15px);
  font-weight: 400;
  color: var(--color-text-muted);
  margin: 0;
}

/* Stats */
.testimonial__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 32px);
}

.testimonial__stat {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.5vw, 8px);
}

.testimonial__stat-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 64px);
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  margin: 0;
  font-variant-numeric: tabular-nums; /* prevent layout jiggle during count */
}

.testimonial__stat-num--accent { color: var(--color-accent); }
.testimonial__stat-num--white  { color: var(--color-white); }

.testimonial__stat-label {
  font-family: var(--font-mono);
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* CTA button */
.testimonial__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: clamp(10px, 1vw, 14px) clamp(16px, 1.5vw, 22px);
  border: 1px solid var(--color-border);
  border-radius: clamp(40px, 4vw, 60px);
  background: transparent;
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
  width: fit-content;
}

.testimonial__cta:hover {
  background: var(--color-accent);
  color: var(--color-black);
  border-color: var(--color-accent);
}

.testimonial__cta-arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}

.testimonial__cta:hover .testimonial__cta-arrow {
  transform: translateX(4px);
}

/* ── Image (right) ── */
.testimonial__image {
  position: relative;
  border-radius: clamp(16px, 1.4vw, 24px);
  overflow: hidden;
  background: var(--color-bg-surface);
  background-image: linear-gradient(135deg,
    rgba(200, 255, 0, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(200, 255, 0, 0.04) 100%);
}

.testimonial__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.testimonial__image::after {
  content: 'Client photo';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1vw, 14px);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
  pointer-events: none;
  z-index: 0;
}

/* ════════════════════════════════
   CAROUSEL CONTROLS — Progress bars + Arrows
════════════════════════════════ */

.testimonials__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(28px, 2.8vw, 44px);
  gap: 24px;
}

/* Progress bars (replace dots) */
.testimonials__progress {
  display: flex;
  flex: 1;
  gap: 10px;
  max-width: 360px;
}

/* Outer button = larger click target (12px tall) */
.testimonials__progress-bar {
  flex: 1;
  min-height: 12px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: block;
}

/* Track (gray line, 6px centered) */
.testimonials__progress-bar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  background: rgba(240, 238, 232, 0.15);
  border-radius: 999px;
  transition: background 0.3s var(--ease-out);
}

/* No hover state — keeps fill animation immune to any hover side-effects */

/* Fill (lime line, animated scaleX 0→1) */
.testimonials__progress-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  background: var(--color-accent);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  /* GPU compositing hint */
  backface-visibility: hidden;
}

/* Arrows */
.testimonials__arrows {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.testimonials__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.testimonials__arrow:hover {
  background: var(--color-accent);
  color: var(--color-black);
  border-color: var(--color-accent);
}

.testimonials__arrow svg {
  width: 16px;
  height: 16px;
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */

@media (max-width: 900px) {
  .testimonial {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .testimonial__card {
    min-height: auto;
  }

  .testimonial__image {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 600px) {
  .section-testimonials {
    padding: 60px 20px;
  }

  .testimonials__controls {
    flex-direction: column-reverse;
    gap: 24px;
    align-items: stretch;
  }

  .testimonials__progress {
    max-width: 100%;
  }

  .testimonials__arrows {
    justify-content: flex-end;
  }

  .testimonial__stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .testimonials__heading {
    font-size: clamp(28px, 8vw, 44px);
  }
}
