/*
 * "Who we've worked with" (partials/clients.php): the client logos drifting past in one strip, all one
 * crisp charcoal. Each logo is a stencil (mask) filled with the colour, so it doesn't matter what colour
 * the file is. The strip pauses while hovered, and stands still for anyone who has asked their device
 * for less motion.
 */
.clients-strip {
	--logo-height: 2.75rem;
	/* The logo files carry their own blank margins, so the gap between them can be small. */
	--logo-gap: 2.5rem;
	margin-top: var(--sc-block, 3rem);
	overflow: hidden;
	/* Logos fade in and out at the sides rather than being cut off. */
	-webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

@media (max-width: 767.98px) {
	.clients-strip {
		--logo-height: 2rem;
		--logo-gap: 1.25rem;
	}
}

.clients-track {
	display: flex;
	width: max-content;
	/* About 45px a second on a desktop screen. */
	animation: clients-drift 110s linear infinite;
}

.clients-strip:hover .clients-track {
	animation-play-state: paused;
}

/* Two identical sets side by side; moving left by one set's width lands exactly where it began. */
@keyframes clients-drift {
	to {
		transform: translateX(-50%);
	}
}

.clients-set {
	display: flex;
	align-items: center;
	gap: var(--logo-gap);
	padding-right: var(--logo-gap);
}

.client-logo {
	display: block;
	flex: none;
	height: var(--logo-height);
	background-color: #231F20;
	-webkit-mask: var(--logo) center / contain no-repeat;
	mask: var(--logo) center / contain no-repeat;
}

@media (prefers-reduced-motion: reduce) {
	.clients-strip {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.clients-track {
		animation: none;
		width: auto;
	}

	/* Standing still, the logos wrap into centred rows instead, and the loop's second copy goes. */
	.clients-set {
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 1.5rem;
		padding-inline: 1rem;
	}

	.clients-set[aria-hidden] {
		display: none;
	}
}
