.testimonials-page {
  padding: clamp(212px, 12vw, 236px) 0 clamp(82px, 6.5vw, 118px);
  background: var(--white);
}

.testimonials-layout {
  width: min(1600px, calc(100% - 96px));
  display: grid;
  grid-template-columns: minmax(300px, 0.46fr) minmax(760px, 1fr);
  align-items: start;
  gap: clamp(76px, 7vw, 146px);
}

.testimonials-copy {
  max-width: 510px;
}

.testimonials-copy h1 {
  margin: 0 0 clamp(84px, 6vw, 118px);
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 3.05vw, 58px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0;
}

.testimonials-copy p {
  margin: 0 0 24px;
  color: #111;
  font-size: clamp(14px, 0.84vw, 16px);
  line-height: 1.18;
  font-weight: 800;
}

.testimonials-copy p:last-child {
  margin-bottom: 0;
}

.testimonial-stage {
  --testimonial-card-height: 204px;
  --testimonial-gap: 36px;
  justify-self: end;
  width: min(940px, 100%);
  overflow: visible;
}

.testimonial-viewport {
  height: calc((var(--testimonial-card-height) * 3) + (var(--testimonial-gap) * 2));
  padding: 0 30px 0 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scrollbar-color: var(--ink) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.testimonial-viewport:focus-visible {
  outline: 2px solid rgba(6, 53, 69, 0.28);
  outline-offset: 10px;
}

.testimonial-viewport::-webkit-scrollbar {
  width: 3px;
}

.testimonial-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.testimonial-viewport::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--ink);
}

.testimonial-stack {
  display: grid;
  gap: var(--testimonial-gap);
}

.testimonial-card {
  position: relative;
  width: min(100%, 820px);
  height: var(--testimonial-card-height);
  display: grid;
  grid-template-columns: 162px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 20px;
  padding: 22px 34px 22px 42px;
  border: 1px solid rgba(17, 22, 26, 0.3);
  border-radius: 18px;
  color: #05080a;
  background: var(--white);
  cursor: pointer;
  scroll-snap-align: start;
  transition:
    transform 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease;
}

.testimonial-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  bottom: 20px;
  width: 7px;
  border-radius: 999px;
  background: #d1d1d1;
  transition: background 260ms ease;
}

.testimonial-card[data-active="true"] {
  border-color: rgba(6, 53, 69, 0.34);
  box-shadow: 0 14px 30px rgba(6, 53, 69, 0.08);
  transform: translateX(-6px);
}

.testimonial-card[data-active="true"]::before {
  background: var(--ink);
}

.testimonial-photo {
  width: 126px;
  height: 126px;
  justify-self: center;
  overflow: hidden;
  border-radius: 50%;
  background: #eef1f2;
}

.testimonial-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-body h2 {
  margin: 0 0 24px;
  color: #05080a;
  font-size: clamp(27px, 1.55vw, 32px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  transition: color 260ms ease;
}

.testimonial-card[data-active="true"] .testimonial-body h2 {
  color: var(--gold);
}

.testimonial-body p {
  margin: 0;
  color: #111;
  font-size: clamp(13px, 0.74vw, 14px);
  line-height: 1.18;
  font-weight: 800;
}

.testimonial-quote {
  align-self: start;
  justify-self: end;
  margin-top: 0;
  color: #9e9e9e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 78px;
  line-height: 0.72;
  font-weight: 900;
  letter-spacing: 0;
  transition: color 260ms ease;
}

.testimonial-card[data-active="true"] .testimonial-quote {
  color: var(--ink);
}

@media (max-width: 1280px) {
  .testimonials-layout {
    width: min(1110px, calc(100% - 44px));
    grid-template-columns: minmax(260px, 0.48fr) minmax(620px, 1fr);
    gap: 64px;
  }

  .testimonial-stage {
    --testimonial-card-height: 202px;
  }

  .testimonial-card {
    grid-template-columns: 148px minmax(0, 1fr) 50px;
    gap: 20px;
    padding-right: 28px;
  }

  .testimonial-photo {
    width: 118px;
    height: 118px;
  }

  .testimonial-body h2 {
    margin-bottom: 24px;
  }
}

@media (max-width: 1024px) {
  .testimonials-page {
    padding-top: 178px;
  }

  .testimonials-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .testimonials-copy {
    max-width: 720px;
  }

  .testimonials-copy h1 {
    margin-bottom: 44px;
  }

  .testimonial-stage {
    justify-self: stretch;
    width: 100%;
  }

  .testimonial-card {
    width: min(100%, 840px);
  }
}

@media (max-width: 760px) {
  .testimonials-page {
    padding: 116px 0 72px;
  }

  .testimonials-layout {
    width: calc(100% - 32px);
    gap: 48px;
  }

  .testimonials-copy h1 {
    margin-bottom: 34px;
    font-size: clamp(34px, 10vw, 46px);
  }

  .testimonials-copy p {
    font-size: 14px;
    line-height: 1.34;
  }

  .testimonial-stage {
    --testimonial-card-height: auto;
    --testimonial-gap: 18px;
  }

  .testimonial-viewport {
    height: auto;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
    scrollbar-width: none;
  }

  .testimonial-viewport::-webkit-scrollbar {
    display: none;
  }

  .testimonial-card,
  .testimonial-card[data-active="true"] {
    width: 100%;
    height: auto;
    min-height: 194px;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
    padding: 24px 18px 24px 28px;
    border-radius: 14px;
    cursor: default;
    transform: none;
    box-shadow: none;
    scroll-snap-align: none;
  }

  .testimonial-card::before,
  .testimonial-card[data-active="true"]::before {
    left: 10px;
    top: 24px;
    bottom: 24px;
    width: 5px;
    background: #d1d1d1;
  }

  .testimonial-photo {
    width: 70px;
    height: 70px;
  }

  .testimonial-body h2,
  .testimonial-card[data-active="true"] .testimonial-body h2 {
    margin-bottom: 16px;
    color: #05080a;
    font-size: 21px;
  }

  .testimonial-body p {
    font-size: 12px;
    line-height: 1.28;
  }

  .testimonial-quote {
    display: none;
  }
}
