/* Etehad Team Marquee — scoped to .etm
 * Self-contained replacement for the LiquidThemes Liquid Carousel.
 * Renders an auto-scrolling horizontal row of attorney portraits where each
 * image is a real <a href> to the bio page. CSS-animation marquee (no JS lib).
 */

.etm {
	padding: 0;
	overflow: hidden;
	color: inherit;
}

.etm__inner {
	max-width: 100%;
	margin: 0 auto;
	padding: 0;
}

.etm__head {
	margin: 0 0 32px;
	padding: 0 24px;
}

.etm__eyebrow {
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
	margin: 0 0 12px;
	color: inherit;
}

.etm__title {
	font-family: 'Roslindale-DisplayNarrowLight', 'Roslindale Display Narrow', Georgia, 'Times New Roman', serif;
	font-size: 56px;
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: 0;
	margin: 0;
	color: inherit;
}

.etm__marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.etm__track {
	display: flex;
	gap: 24px;
	width: max-content;
	animation: etm-scroll var(--etm-speed, 40s) linear infinite;
	will-change: transform;
}

/* Pause on hover/focus so users can click an image without it sliding away. */
.etm__marquee:hover .etm__track,
.etm__marquee:focus-within .etm__track {
	animation-play-state: paused;
}

.etm__item {
	display: block;
	flex-shrink: 0;
	width: 275px;
	aspect-ratio: 6 / 7;
	overflow: hidden;
	text-decoration: none;
	border-radius: 2px;
	background: rgba(0, 0, 0, 0.04);
}

.etm__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.etm__item:hover img,
.etm__item:focus-visible img {
	transform: scale(1.04);
}

.etm__item:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* The track contains two full copies of the items; translating by -50%
 * moves exactly one full set off-screen while the duplicate set takes its
 * place — produces a seamless infinite loop. */
@keyframes etm-scroll {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 1024px) {
	.etm__title { font-size: 44px; }
	.etm__item { width: 220px; }
}

@media (max-width: 640px) {
	.etm__head { margin-bottom: 24px; }
	.etm__title { font-size: 34px; }
	.etm__eyebrow { font-size: 14px; }
	.etm__item { width: 180px; }
	.etm__track { gap: 16px; }
}

/* Accessibility: respect reduced-motion. Disable the scroll, let users
 * pan the row by horizontal scroll instead. */
@media (prefers-reduced-motion: reduce) {
	.etm__track {
		animation: none;
	}
	.etm__marquee {
		overflow-x: auto;
		-webkit-mask-image: none;
		mask-image: none;
	}
}
