/* Reviews carousel (CSS marquee).
   Cards are duplicated in the template so -50% shifts one full set,
   giving a seamless infinite loop. Pause on hover. */

.reviews {
  margin-top: 24px;
}

.reviews-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.reviews-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.reviews-viewport {
  overflow: hidden;
}

/* Trailing gap is provided via margin-right on each card (not flex gap),
   so the last card of the first set has a full gap before the duplicate starts.
   This makes -50% land on a seamless position. */
.reviews-track {
  display: flex;
  width: max-content;
  animation: reviews-marquee 60s linear infinite;
}

.reviews:hover .reviews-track,
.reviews:focus-within .reviews-track {
  animation-play-state: paused;
}

@keyframes reviews-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.review-card {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 300px;
  aspect-ratio: 1 / 1;
  margin-right: 16px;
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  padding: 14px 16px;
}

.review-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.review-card__author {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-card__source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--ink-2, #6b7280);
  text-decoration: none;
  transition: color 120ms ease;
}

.review-card__source:hover {
  color: var(--accent, #229ED9);
}

.review-card__logo {
  width: 16px;
  height: 16px;
}

.review-card__divider {
  height: 1px;
  background: var(--line, #e5e7eb);
  margin: 10px 0;
}

.review-card__body {
  flex: 1 1 auto;
  min-height: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-1, #111827);
  white-space: pre-wrap;
  overflow: hidden;
}

@media (max-width: 1023px) {
  .review-card { width: 280px; }
}

@media (max-width: 639px) {
  .review-card { width: 260px; }
}

/* Reduced motion: freeze the marquee and let users scroll horizontally instead. */
@media (prefers-reduced-motion: reduce) {
  .reviews-viewport {
    overflow-x: auto;
  }
  .reviews-track {
    animation: none;
  }
}
