/*
 * Moving quote wall (template-parts/home/parts/testimonials-list.php, assets/js/people.js).
 * With .is-moving the rows drift in an endless loop; otherwise each row is a swipeable strip.
 */
.testimonials__wall {
	--card-gap: clamp(1rem, 2vw, 1.5rem);

	position: relative;
	display: grid;
	gap: var(--card-gap);
}

.testimonials__row {
	overflow: hidden;
}

.testimonials__track {
	display: flex;
	align-items: stretch;
	width: max-content;
}

/* Spacing as a margin on every card, so two copies of a row are exactly twice one copy. */
.testimonial {
	flex: 0 0 auto;
	width: clamp(16rem, 24vw, 22rem);
	margin-inline-end: var(--card-gap);
}

/* Not moving (no JavaScript, or reduced motion): swipe each row instead. */
.testimonials__wall:not(.is-moving) .testimonials__row {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.testimonials__wall:not(.is-moving) .testimonial {
	scroll-snap-align: start;
}

.testimonials__wall.is-moving .testimonials__row {
	mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.testimonials__wall.is-moving .testimonials__track {
	animation: mcc-marquee var(--marquee-duration, 60s) linear infinite;
}

.testimonials__wall.is-moving .testimonials__track--reverse {
	animation-direction: reverse;
}

/* Paused by the button, a pointer over a card, a finger on it, keyboard focus, or a hidden screen. */
.testimonials__wall.is-paused .testimonials__track,
.testimonials__wall.is-held .testimonials__track,
.testimonials__row:hover .testimonials__track,
.testimonials__row:focus-within .testimonials__track,
.mcc-panel:not(.is-current) .testimonials__track {
	animation-play-state: paused;
}

@keyframes mcc-marquee {
	to {
		transform: translateX(-50%);
	}
}

.testimonial__figure {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	padding: clamp(1.25rem, 2vw, 1.75rem);
	border: 1px solid var(--ink-line);
	border-radius: 1.25rem;
	background:
		linear-gradient(160deg, rgba(60, 191, 240, 0.1), transparent 45%),
		var(--ink-raised);
	overflow: hidden;
	transition: border-color 0.3s var(--ease), transform 0.4s var(--ease);
}

.testimonial:hover .testimonial__figure {
	border-color: var(--sky);
	transform: translateY(-4px);
}

/* A large quotation mark in the corner. */
.testimonial__figure::before {
	content: "\201C";
	position: absolute;
	top: -1.25rem;
	right: 1rem;
	color: var(--sky);
	font-family: var(--font-heading);
	font-size: 8rem;
	font-weight: 700;
	line-height: 1;
	opacity: 0.22;
	pointer-events: none;
}

.testimonial__stars {
	margin-bottom: 0.875rem;
	color: var(--sky);
	font-size: 1.0625rem;
	letter-spacing: 0.2em;
}

.testimonial__quote {
	flex: 1;
	margin: 0;
	font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
	line-height: 1.55;
}

.testimonial__person {
	display: flex;
	gap: 0.875rem;
	align-items: center;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ink-line);
}

.testimonial__avatar {
	flex-shrink: 0;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	object-fit: cover;
}

.testimonial__avatar--initials {
	display: grid;
	place-items: center;
	background: var(--sky);
	color: var(--ink);
	font-family: var(--font-heading);
	font-size: 1.125rem;
	font-weight: 700;
}

.testimonial__name {
	display: block;
	font-family: var(--font-heading);
	font-size: 1.1875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.testimonial__about {
	display: block;
	color: var(--bone-muted);
	font-size: 0.875rem;
}

/* Pause / play, for anyone who wants the wall to stand still. Shown under the rows, on the right. */
.testimonials__pause {
	order: 1;
	justify-self: end;
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--ink-line);
	border-radius: 999px;
	background: transparent;
	color: var(--bone);
	font-family: var(--font-heading);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}

.testimonials__pause:hover {
	border-color: var(--sky);
}

.testimonials__pause-icon {
	width: 0.625rem;
	height: 0.75rem;
	border-inline: 3px solid currentColor;
}

.testimonials__pause[aria-pressed="true"] .testimonials__pause-icon {
	border: 0;
	border-left: 0.625rem solid currentColor;
	border-block: 0.375rem solid transparent;
}
