/**
 * Our Clients page template. The hero is the shared .page-hero in main.css,
 * the testimonials carousel is shared with the homepage in quotes.css.
 *
 * 1. Hero
 * 2. Filter bar
 * 3. Client wall
 * 4. Call to action
 */

/* 1. Hero ----------------------------------------------------------------- */

/* The shared .page-hero (main.css), a little closer to the wall below. */
.clients-hero {
	padding-bottom: clamp(56px, 7vw, 96px);
}

/* 2. Filter bar ----------------------------------------------------------- */

.clients-wall {
	padding-bottom: var(--section-space);
}

.clients-wall__inner {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.clients-wall__empty {
	padding-top: 32px;
	border-top: 1px solid var(--c-line);
	color: var(--c-text);
	font-size: 15px;
}

.clients-wall__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--c-navy);
}

/* Stays on the right while the filter is hidden (no JavaScript, one category). */
.clients-wall__count {
	margin-left: auto;
	color: #6b7186;
	font-size: 13px;
}

.client-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 24px;
}

.client-filter[hidden] {
	display: none;
}

.client-filter__tab {
	padding: 8px 0;
	border: 0;
	border-bottom: 1px solid transparent;
	background: none;
	color: #6b7186;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	transition: color 0.3s, border-color 0.3s;
}

.client-filter__tab:hover {
	color: var(--c-navy);
}

.client-filter__tab[aria-pressed="true"] {
	border-bottom-color: var(--c-gold);
	color: var(--c-navy);
	font-weight: 600;
}

/* 3. Client wall ---------------------------------------------------------- */

.client-card[hidden] {
	display: none;
}

/* Hairlines: the grid draws the top and left edges, each card its right and
 * bottom, so a short last row leaves no tinted gap. clients.js toggles
 * .is-switching while the filter swaps the cards. */
.client-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin: 0;
	padding: 0;
	border-top: 1px solid rgba(23, 34, 63, 0.14);
	border-left: 1px solid rgba(23, 34, 63, 0.14);
	list-style: none;
	transition: opacity 0.5s ease, transform 0.7s var(--ease-out);
}

.client-grid.is-switching {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.client-card {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: clamp(200px, 18vw, 260px);
	padding: clamp(24px, 2.6vw, 36px);
	border-right: 1px solid rgba(23, 34, 63, 0.14);
	border-bottom: 1px solid rgba(23, 34, 63, 0.14);
	background: var(--c-cream);
	transition: background-color 0.5s ease;
}

.client-card__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(100%, 240px);
	height: clamp(72px, 7vw, 96px);
}

.client-card__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
}

/* Stands in for a missing logo. */
.client-card__name {
	color: var(--c-navy);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
	overflow-wrap: anywhere;
}

@media (hover: hover) {
	.client-card:hover {
		background: var(--c-white);
	}
}

@media (min-width: 640px) {
	.client-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.client-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.client-grid,
	.client-grid.is-switching {
		transition: none;
	}
}

/* 4. Call to action ------------------------------------------------------- */

.clients-cta {
	padding: clamp(88px, 10vw, 140px) 0;
	background: var(--c-white);
}

.clients-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
}

.clients-cta__title {
	max-width: 720px;
	color: var(--c-navy);
	font-size: clamp(34px, 4.2vw, 60px);
	font-weight: 300;
	line-height: 1.08;
	letter-spacing: -0.025em;
}

.clients-cta__button {
	padding: 18px 28px;
	background: var(--c-navy);
	color: var(--c-white);
}

.clients-cta__button:hover {
	background: var(--c-gold);
	color: var(--c-navy);
}
