/* ==========================================================================
   Our Partners logo strip — template-parts/global/partners.php
   Figma: 89:5737 (Industries Desktop) · 153:5672 (Siegel Assured Desktop), 1440x276

   Shared by the Industries Landing section builder and the Siegel Assured page,
   so it is its own stylesheet rather than living inside either page's CSS.
   Marquee state (.is-scrolling / .is-overflowing) is set by assets/js/partners.js.
   ========================================================================== */

.partners, .partners * { box-sizing: border-box; }

.partners {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-8);             /* 32 */
	padding-block: var(--sp-10);  /* 48 */
	background: var(--fig-siegel-white);
}

.partners__heading {
	margin: 0;
	text-align: center;
}

.partners__strip {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: var(--page-w);
	padding: var(--sp-8) var(--gutter-footer) var(--sp-8) 34px; /* 32/60/32/34 */
	overflow: hidden;
}

.partners__logos {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1 0 auto;
	min-width: 100%;
	gap: var(--sp-6);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The clone run only exists to make the marquee seamless. */
.partners__logos--clone { display: none; }

.partners__logo-item { flex: 0 0 auto; }
.partners__logo-link { display: block; }

.partners__logo-img {
	display: block;
	/* Height is set per logo by the section's own field (--partner-logo-h),
	   because Figma scales each one individually — 31.7 to 44.9 tall in
	   89:5737. Width follows the file's aspect ratio; the max-width is only a
	   guard against an extremely wide upload. */
	height: var(--partner-logo-h, 44px);
	width: auto;
	max-width: 200px;
	object-fit: contain;
	filter: grayscale(1);
	opacity: .7;
	transition: opacity var(--dur-base) ease-out;
}

@media (hover: hover) and (pointer: fine) {
	.partners__logo-img:hover { opacity: 1; }
}

.partners__logo-name {
	font: var(--fw-medium) 0.875rem/1 var(--font-heading);
	color: var(--text-body-primary);
}

/* Applied by partners.js for one synchronous read, so the run reports the
   width of the logos rather than the width of the strip. */
.partners__strip.is-measuring .partners__logos {
	justify-content: flex-start;
	min-width: max-content;
	/* flex-grow would stretch the run back to the strip width and hide the
	   very overflow being measured. */
	flex: 0 0 auto;
}

/* Marquee — enabled by partners.js, which also sets the duration from the
   measured run width so the speed stays constant as logos are added. */
.partners__strip.is-scrolling .partners__logos {
	justify-content: flex-start;
	min-width: max-content;
	flex: 0 0 auto;
	animation: partners-marquee var(--partners-duration, 30s) linear infinite;
}

.partners__strip.is-scrolling .partners__logos--clone { display: flex; }
.partners__strip.is-scrolling { gap: var(--sp-6); }

@media (hover: hover) and (pointer: fine) {
	.partners__strip.is-scrolling:hover .partners__logos { animation-play-state: paused; }
}

/* Overflowing but not scrolling (reduced motion, or mode:never) — swipeable. */
.partners__strip.is-overflowing {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.partners__strip.is-overflowing::-webkit-scrollbar { display: none; }
.partners__strip.is-overflowing .partners__logos { justify-content: flex-start; min-width: max-content; }

@keyframes partners-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(calc(-1 * (var(--partners-run-width, 100%) + var(--sp-6)))); }
}

@media (prefers-reduced-motion: reduce) {
	.partners__strip.is-scrolling .partners__logos { animation: none; }
}

/* ── Tablet 768–1023 ───────────────────────────────────────────────────── */

@media (max-width: 1023px) {
	.partners__strip { padding-inline: var(--sp-8); }
}

/* ── Mobile ≤767 ───────────────────────────────────────────────────────── */

/* 105:11423 is 393×276 with the same 48/32/48 rhythm, the same 38/42 heading
   and the same 1346px logo row as the desktop node — the row simply overflows
   and is clipped, which is what puts `auto` mode into marquee on phones. */
@media (max-width: 767px) {
	.partners__strip { padding: var(--sp-8) var(--sp-5); }
}

@media (prefers-reduced-motion: reduce) {
	.partners__logo-img { transition: none; }
}
