/* ==========================================================================
   Testimonials — rating card + featured quote, then a 3 + 2 review wall
   ========================================================================== */

.rating-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  background: var(--orange);
  border-color: var(--orange);
  color: #ffffff;
}

.rating-card .stars svg {
  width: 20px;
  height: 20px;
}

.rating-value {
  margin-top: var(--s-3);
  font-size: clamp(3.5rem, 2.6rem + 2.8vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #ffffff;
}

.rating-value span {
  font-size: 0.4em;
  letter-spacing: -0.02em;
}

.rating-text {
  margin-top: var(--s-2);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: #ffffff;
}

.rating-text strong {
  font-weight: 700;
}

.rating-foot {
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-size: var(--fs-sm);
  color: #ffffff;
}

.reviews-wall {
  display: contents;
}

.reviews-hint {
  display: none;
}

.review-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.review-card--half {
  grid-column: span 6;
}

.review-card--featured {
  grid-column: span 8;
  justify-content: space-between;
  gap: var(--s-4);
}

.review-quote-mark.icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.5;
  color: var(--orange);
}

.review-text {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--ink-2);
}

.review-card--featured .review-text {
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.review-toggle {
  align-self: flex-start;
  margin-top: -8px;
  padding: 4px 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--orange-200);
  transition: text-decoration-color var(--t-fast) var(--ease);
}

.review-toggle:hover {
  text-decoration-color: var(--orange);
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
}

.review-author strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.review-author small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--orange-50);
  border: 1px solid var(--orange-100);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--orange);
}

.review-card--featured .avatar {
  width: 52px;
  height: 52px;
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

@media (max-width: 1023px) {
  .review-card,
  .review-card--half {
    grid-column: span 6;
  }

  .rating-card,
  .review-card.review-card--featured,
  .review-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  /* Reviews become a swipeable row on phones */
  .reviews-wall {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 12px;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .reviews-wall::-webkit-scrollbar {
    display: none;
  }

  .reviews-wall .review-card {
    flex: 0 0 86%;
    scroll-snap-align: start;
  }

  .js .reviews-wall [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .reviews-hint {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: -8px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--ink-3);
  }

  .reviews-hint .icon {
    width: 16px;
    height: 16px;
    color: var(--orange);
  }

  .rating-value {
    margin-top: var(--s-2);
  }

  .review-card--featured .review-text {
    font-size: 1.0625rem;
  }
}
