.testimonial {
  position: relative;
  overflow: hidden;
}

.testimonial__pattern {
  position: absolute;
  inset: 0;
  background-image: url('../../images/patterns/leaf-tile.svg');
  background-size: 120px;
  opacity: 0.05;
}

.testimonial__inner {
  position: relative;
  z-index: 1;
}

/* Photo column + quote column. The carousel and every slide share the
   same column template, so the controls (outside the slides) line up under
   the quote column rather than centring across the whole carousel. */
.testimonial-carousel {
  --testimonial-cols: minmax(0, 5fr) minmax(0, 7fr);
  --testimonial-gap: clamp(40px, 6vw, 88px);
  display: grid;
  grid-template-columns: var(--testimonial-cols);
  column-gap: var(--testimonial-gap);
  max-width: 1040px;
  margin-inline: auto;
}

/* Slides stack in a single grid cell rather than being absolutely
   positioned, so the track is always as tall as its longest slide and the
   section doesn't jump in height as the quotes change length. */
.testimonial__track {
  grid-column: 1 / -1;
  display: grid;
}

.testimonial__slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: var(--testimonial-cols);
  column-gap: var(--testimonial-gap);
  align-items: center;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--motion-slow), visibility 0s linear 420ms;
}
.testimonial__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--motion-slow), visibility 0s;
}

/* Portrait handover photo inside an offset brass hairline frame. */
.testimonial__photo {
  position: relative;
  margin: 0 18px 18px 0;
}
.testimonial__photo::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid color-mix(in oklch, var(--gold) 45%, transparent);
  border-radius: var(--radius-lg);
}
.testimonial__photo img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.testimonial__quote-mark {
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 0.5;
  height: 0.45em;
  color: var(--gold);
}

.testimonial__title {
  font-size: var(--fs-32);
  line-height: 1.2;
  color: var(--fg-inverse);
  margin: var(--space-4) 0 var(--space-5);
}

.testimonial__text {
  margin: 0 0 var(--space-8);
}
.testimonial__text p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-18);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.testimonial__attribution {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  border-top: 1px solid color-mix(in oklch, var(--gold) 30%, transparent);
  padding-top: var(--space-5);
}
.testimonial__attribution strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--fg-inverse);
}
.testimonial__attribution span {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--kgc-brass-300);
}

.testimonial__controls {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.testimonial__arrow {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--kgc-brass-300);
  border: 1px solid color-mix(in oklch, var(--gold) 30%, transparent);
  border-radius: 50%;
}
.testimonial__arrow svg { width: 14px; height: 14px; }
.testimonial__arrow:hover { color: var(--gold); border-color: var(--gold); }

.testimonial__dots {
  display: flex;
  gap: 10px;
}
.testimonial__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
}
.testimonial__dot.is-active {
  background: var(--gold);
}

@media (max-width: 767px) {
  .testimonial-carousel,
  .testimonial__slide {
    grid-template-columns: minmax(0, 1fr);
  }
  .testimonial__slide {
    align-items: start;
    row-gap: var(--space-10);
  }
  .testimonial__photo img { aspect-ratio: 1 / 1; object-position: 50% 15%; }
  .testimonial__photo { margin: 0 12px 12px 0; }
  .testimonial__photo::before { inset: 12px -12px -12px 12px; }
  .testimonial__quote-mark { font-size: 72px; }
  .testimonial__title { font-size: var(--fs-24); }
  .testimonial__text p { font-size: var(--fs-16); }
  .testimonial__controls { grid-column: 1; }
}
