/* ── homepage testimonials: slow looping band ─────────────────────────────
 * Loaded on the front page after wp.css, which styles the .rev card itself.
 * Three cards in view (two on tablets, one on phones). The markup prints the
 * list twice, so sliding the track by exactly half its width loops with no
 * jump. Hover, keyboard focus or a finger on the band pauses it.
 */
.testimonials .revband {
	--per: 3;
	--gap: 22px;
	--edge: 28px;
	--speed: 10s;                              /* seconds per review; the loop is --n of them */
	container-type: inline-size;
	overflow: hidden;
	/* Side padding is room for the fade; top/bottom for the hover lift and shadow. */
	margin: 4px calc(var(--edge) * -1) 0;
	padding: 18px var(--edge) 38px;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--edge), #000 calc(100% - var(--edge)), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 var(--edge), #000 calc(100% - var(--edge)), transparent 100%);
}
.testimonials .revtrack {
	display: flex;
	width: max-content;
	animation: vp-revslide calc(var(--n, 20) * var(--speed)) linear infinite;
	will-change: transform;
}
.testimonials .revtrack .rev {
	flex: none;
	/* 100cqw is the band's content width: exactly --per cards and their gaps. */
	width: calc((100cqw - (var(--per) - 1) * var(--gap)) / var(--per));
	margin-right: var(--gap);
}
@keyframes vp-revslide {
	to { transform: translateX(-50%); }
}

.testimonials .revband:hover .revtrack,
.testimonials .revband:focus-within .revtrack,
.testimonials .revband:active .revtrack {
	animation-play-state: paused;
}

@media (max-width: 1000px) {
	.testimonials .revband { --per: 2; }
}
@media (max-width: 640px) {
	.testimonials .revband { --per: 1; --edge: 16px; }
}

/* Reduced motion: no drift. A plain row to swipe or scroll, original copy only. */
@media (prefers-reduced-motion: reduce) {
	.testimonials .revband {
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-mask-image: none;
		mask-image: none;
	}
	.testimonials .revtrack { animation: none; }
	.testimonials .revtrack .rev { scroll-snap-align: start; }
	.testimonials .revtrack .rev[aria-hidden="true"] { display: none; }
}
