/**
 * Roni Clients - logo wall as monochrome cards.
 * Each logo sits in a quiet surface tile, grayscale at rest, lifting and
 * blooming to full colour on hover/focus. No marquee behavior.
 *
 * Nothing here rescues a logo whose ink is white: the tile is the same white as
 * the page, so a white-on-transparent asset is invisible on it. Those need a
 * dark version of the file, not CSS.
 */

.rap-clients {
	position: relative;
	width: 100%;
	padding-block: 0;
}

.rap-clients__track {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	align-items: stretch;
	justify-content: center;
	gap: clamp(18px, 2vw, 28px);
	width: 100%;
	/* No max-width of its own: the section it sits in already holds the site
	 * rail, and a second cap here pulled the tiles 16px inside every other
	 * band at 1440 and 160px inside it at 1920. */
}

.rap-clients__item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: clamp(120px, 12vw, 172px);
	padding: clamp(16px, 2vw, 28px);
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--surface);
	box-shadow: 0 14px 36px -30px rgba(12, 12, 23, 0.30);
	transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.rap-clients__item--link {
	cursor: pointer;
}

.rap-clients__item:hover,
.rap-clients__item--link:focus-visible {
	transform: translateY(-4px);
	border-color: rgba(59, 74, 94, 0.32);
	box-shadow:
		0 24px 52px -32px rgba(12, 12, 23, 0.40),
		0 0 0 1px rgba(59, 74, 94, 0.24);
}

.rap-clients__item--link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* Every logo is forced into the same bounding box and contained, so wildly
 * different source dimensions read as one consistent, optically-even size. */
.rap-clients__logo {
	width: 100%;
	height: clamp(64px, 7.5vw, 104px);
	max-width: clamp(180px, 22vw, 264px);
	object-fit: contain;
	object-position: center;
	filter: grayscale(1);
	/* 0.62 read as washed out on white, and took the paler marks (thin gold
	 * line art) below legibility. */
	opacity: 0.88;
	transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.rap-clients__item:hover .rap-clients__logo,
.rap-clients__item--link:focus-visible .rap-clients__logo {
	filter: grayscale(0);
	opacity: 1;
}

@media (max-width: 600px) {
	.rap-clients__track {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	/* The tile's own padding eats into this, so it carries the logo height
	 * plus room to breathe rather than the logo height alone. */
	.rap-clients__item {
		min-height: 104px;
		padding: 14px;
	}

	.rap-clients__logo {
		height: 56px;
		max-width: 140px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rap-clients__item,
	.rap-clients__logo {
		transition: none;
	}
	.rap-clients__item:hover,
	.rap-clients__item--link:focus-visible {
		transform: none;
	}
}
