/*
 * Customers Section — heading + subheading + logo grid + 4 testimonial cards.
 *
 * Design source: Figma file o2Fw8rOZW4xOIEcs13IWzo, Rectangle 114 at top:5493.
 * Section bg #FFFEF9, heading Polin Bold 55px, cards 396×232 with #F0F0F0 bg.
 *
 * NEW widget — 2026-05-17, not yet in deploy ZIP.
 */

.greengrass-customers {
	padding-block: clamp(48px, 5vw, 96px);
	background: #FFFEF9;
	font-family: 'Polin', sans-serif;
	direction: rtl;
	overflow-x: hidden;
}

.greengrass-customers__container {
	max-width: 1820px;
	margin-inline: auto;
	padding-inline: clamp(16px, 2vw, 48px);
}

/* ── Header ──────────────────────────────────────────── */
.greengrass-customers__header {
	text-align: center;
	max-width: 891px;
	margin: 0 auto clamp(32px, 4vw, 56px);
}

.greengrass-customers__heading {
	margin: 0 0 13px;
	font-family: 'Polin', sans-serif;
	font-size: clamp(28px, 3.5vw, 55px);
	font-weight: 700;
	line-height: 1.05;
	color: #2C3D41;
}

.greengrass-customers__heading .accent {
	color: #00A3E9;
}

.greengrass-customers__subheading {
	margin: 0;
	font-family: 'Polin', sans-serif;
	font-size: clamp(15px, 1.6vw, 24px);
	font-weight: 400;
	line-height: 1.2;
	color: #2C3D41;
}

/* ── Logos — two marquees (top scrolls right, bottom scrolls left) ───
 * Each marquee holds TWO identical tracks placed side-by-side. Each track has
 * `min-width: 100%` with `justify-content: space-around`, so a single track
 * always fills the viewport at every animation frame — there's no "starting
 * from the edge" gap regardless of logo count. The animation shifts each track
 * by exactly one track-width (plus the gap between tracks), so the second
 * track slides into the first's position seamlessly.
 */
/* Logo marquees break out of the container to span the full viewport width —
 * heading and testimonial cards stay constrained, only the carousel is full-bleed.
 * Use negative inline margins instead of a parent transform so the marquee track
 * animations (which themselves use transform) aren't affected by a stacking context. */
.greengrass-customers__logos {
	display: flex;
	flex-direction: column;
	gap: clamp(18px, 1.8vw, 28px);
	overflow: hidden;
	width: 100vw;
	margin-block: 0 clamp(36px, 4vw, 64px);
	margin-inline: calc(50% - 50vw);
}

.greengrass-customers__marquee {
	display: flex;
	overflow: hidden;
	width: 100%;
	gap: clamp(28px, 3vw, 56px);
	/* The marquee is a flex row whose two children (tracks) must lay out
	   left-to-right so the translateX math below behaves predictably. The logos
	   themselves carry no direction so this doesn't affect content. */
	direction: ltr;
}

.greengrass-customers__track {
	flex-shrink: 0;
	min-width: 100%;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: space-around;
	gap: clamp(28px, 3vw, 56px);
	animation-duration: var(--gg-marquee-duration, 40s);
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.greengrass-customers__marquee--right .greengrass-customers__track {
	animation-name: greengrass-customers-marquee-right;
}

.greengrass-customers__marquee--left .greengrass-customers__track {
	animation-name: greengrass-customers-marquee-left;
}

/* Each track is one full marquee-width. The translate distance is one track
 * width plus the inter-track gap, so the second track slides exactly into the
 * first track's original spot — seamless loop.
 */

/* Top row: track moves right, content appears from the left side */
@keyframes greengrass-customers-marquee-right {
	from { transform: translateX(calc(-100% - clamp(28px, 3vw, 56px))); }
	to   { transform: translateX(0); }
}

/* Bottom row: track moves left, content appears from the right side */
@keyframes greengrass-customers-marquee-left {
	from { transform: translateX(0); }
	to   { transform: translateX(calc(-100% - clamp(28px, 3vw, 56px))); }
}

/* Pause on hover for accessibility */
.greengrass-customers__marquee:hover .greengrass-customers__track {
	animation-play-state: paused;
}

/* Respect users who prefer reduced motion — stop the marquees */
@media (prefers-reduced-motion: reduce) {
	.greengrass-customers__track {
		animation: none;
	}
}

.greengrass-customers__logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.greengrass-customers__logo img {
	height: clamp(48px, 4.5vw, 90px);
	width: auto;
	max-width: 240px;
	object-fit: contain;
	display: block;
}

/* ── Testimonial cards ──────────────────────────────── */
.greengrass-customers__cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(16px, 2vw, 32px);
}

@media (max-width: 960px) {
	.greengrass-customers__cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
	/* Phones: swap the stacked grid for a swipeable scroll-snap carousel (one card per view,
	 * with a peek of the next) so the testimonials take one card's height instead of four. */
	.greengrass-customers__cards {
		display: flex;
		grid-template-columns: none;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scroll-padding-inline: 16px;
		padding-bottom: 6px;
		scrollbar-width: none; /* Firefox */
	}
	.greengrass-customers__cards::-webkit-scrollbar {
		display: none; /* WebKit */
	}
	.greengrass-customers__card {
		flex: 0 0 86%; /* ~one card in view + a peek of the next to signal swipe */
		scroll-snap-align: center;
	}
}

.greengrass-customers__card {
	position: relative;
	background: #F0F0F0;
	border-radius: 15px;
	padding: clamp(20px, 1.8vw, 28px);
	min-height: 232px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	isolation: isolate;
	overflow: hidden;
	text-align: start;
}

.greengrass-customers__card-quote-mark {
	position: absolute;
	inset-block-start: clamp(60px, 6vw, 110px);
	inset-inline-start: 12px;
	font-family: 'Polin', sans-serif;
	font-size: clamp(120px, 14vw, 250px);
	font-weight: 700;
	line-height: 1;
	color: #D0D0D0;
	opacity: 0.23;
	pointer-events: none;
	z-index: 0;
}

.greengrass-customers__card-head {
	display: flex;
	align-items: center;
	gap: 18px;
	position: relative;
	z-index: 1;
}

.greengrass-customers__card-meta {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.greengrass-customers__card-name {
	margin: 0;
	font-family: 'Polin', sans-serif;
	font-size: clamp(20px, 2vw, 30px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	color: #2C3D41;
}

.greengrass-customers__card-role {
	margin: 0;
	font-family: 'Polin', sans-serif;
	font-size: clamp(14px, 1.3vw, 20px);
	font-weight: 400;
	line-height: 1.2;
	color: #6F858B;
}

.greengrass-customers__card-avatar {
	flex: 0 0 59px;
	width: 59px;
	height: 59px;
	border-radius: 50%;
	overflow: hidden;
	background: #D9D9D9;
}

.greengrass-customers__card-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.greengrass-customers__card-quote {
	margin: 0;
	font-family: 'Polin', sans-serif;
	font-size: clamp(14px, 1.3vw, 20px);
	font-weight: 400;
	line-height: 1.1;
	color: #2C3D41;
	position: relative;
	z-index: 2;
}
