/* LD Client Logos. Uses the LeoDregier theme's colors when present, with fallbacks for any theme. */
.ldl {
	--ldl-ink: var(--ld-primary, #0e2a47);
	--ldl-muted: var(--ld-muted, #4a5868);
	--ldl-line: var(--ld-line, #e3e8ef);
	--ldl-line-strong: var(--ld-line-strong, #c3cdd9);
	--ldl-card: #ffffff;
	--ldl-radius: var(--ld-radius-sm, 10px);
	--ldl-accent: var(--ld-accent, #f5a524);
	--ldl-font-display: var(--ld-font-display, inherit);
	--ldl-logo: var(--ldl-h, 56px);
	--ldl-gap: 16px;
	position: relative;
	margin: 0 0 1.5em;
}
.ldl--section { margin: 0; padding: 44px 0 12px; }
.ldl--dark {
	--ldl-ink: #ffffff;
	--ldl-muted: var(--ld-on-dark-muted, #c9d5e3);
	background: var(--ld-primary, #0e2a47);
	border-radius: var(--ld-radius, 20px);
	padding: 36px 24px 28px;
}

/* Heading */
.ldl__head { text-align: center; margin: 0 auto 22px; max-width: 760px; }
.ldl .ldl__title {
	margin: 0; padding: 0; color: var(--ldl-ink); font-family: var(--ldl-font-display);
	font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2;
}
.ldl .ldl__title::after { display: none; }
.ldl--section .ldl__title {
	font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
	color: var(--ldl-muted);
}
.ldl__intro { margin: 8px 0 0; color: var(--ldl-muted); }

/* Strip */
.ldl__viewport { position: relative; outline: none; }
.ldl .ldl__track {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch;
	row-gap: var(--ldl-gap);
}
.ldl .ldl-item { margin: 0 calc(var(--ldl-gap) / 2); padding: 0; flex: 0 0 auto; display: flex; }
.ldl .ldl-item::before { display: none; }
.ldl-item__inner {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	width: 100%; color: var(--ldl-muted); text-decoration: none;
}
a.ldl-item__inner:hover .ldl-item__name, a.ldl-item__inner:focus .ldl-item__name { color: var(--ld-link, #1559c7); }
.ldl-item__logo { display: flex; align-items: center; justify-content: center; height: var(--ldl-logo); }
.ldl .ldl-item__logo img {
	display: block; height: var(--ldl-logo); width: auto; max-width: calc(var(--ldl-logo) * 3.6);
	object-fit: contain; border: 0; box-shadow: none; border-radius: 0; margin: 0;
}
.ldl-item__name {
	display: block; max-width: calc(var(--ldl-logo) * 3.6); min-width: 8em;
	font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center; color: var(--ldl-muted);
}

/* Grid: equal columns */
.ldl--grid .ldl__track {
	display: grid; gap: var(--ldl-gap);
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--ldl-logo) * 3.4), 1fr));
}
.ldl--grid .ldl-item { margin: 0; }
.ldl--grid .ldl-item__logo img { max-width: 100%; }
.ldl--grid .ldl-item__name { min-width: 0; }

/* Cards */
.ldl--cards .ldl-item__inner {
	background: var(--ldl-card); border: 1px solid var(--ldl-line); border-radius: var(--ldl-radius);
	padding: 18px 22px; min-width: calc(var(--ldl-logo) * 2.8);
	box-shadow: 0 1px 2px rgba(10, 31, 53, .05);
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ldl--cards a.ldl-item__inner:hover, .ldl--cards a.ldl-item__inner:focus-visible {
	border-color: var(--ldl-line-strong); box-shadow: 0 8px 20px rgba(10, 31, 53, .1);
}
.ldl--cards .ldl-item__name { color: var(--ld-muted, #4a5868); }
.ldl--plain .ldl-item__inner { padding: 6px 10px; }

/* Grayscale until hover */
.ldl--gray .ldl-item__logo img { filter: grayscale(1); opacity: .72; transition: filter .25s ease, opacity .25s ease; }
.ldl--gray .ldl-item:hover .ldl-item__logo img,
.ldl--gray .ldl-item__inner:focus .ldl-item__logo img { filter: none; opacity: 1; }

/* Names on hover: still read by screen readers, shown over the logo on hover or keyboard focus */
.ldl--names-hover .ldl-item__name {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	max-width: none; min-width: 0; padding: 8px; border-radius: inherit;
	background: rgba(255, 255, 255, .95); color: var(--ld-primary, #0e2a47);
	opacity: 0; transition: opacity .2s ease;
}
.ldl--names-hover .ldl-item:hover .ldl-item__name,
.ldl--names-hover .ldl-item__inner:focus .ldl-item__name { opacity: 1; }

/* Moving strip: logos.js adds .is-moving when the logos are wider than the space */
.ldl--scroll.is-measuring .ldl__track { flex-wrap: nowrap; width: max-content; justify-content: flex-start; }
.ldl--scroll.is-moving .ldl__viewport {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.ldl--scroll.is-moving .ldl__track {
	flex-wrap: nowrap; width: max-content; justify-content: flex-start; padding: 4px 0 6px;
	animation: ldl-scroll var(--ldl-dur, 40s) linear infinite;
	will-change: transform;
}
.ldl--scroll.is-moving .ldl__viewport:hover .ldl__track,
.ldl--scroll.is-moving .ldl__viewport:focus-within .ldl__track,
.ldl--scroll.is-paused .ldl__track,
.ldl--scroll.is-offscreen .ldl__track { animation-play-state: paused; }
@keyframes ldl-scroll {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(calc(-1 * var(--ldl-set, 50%)), 0, 0); }
}

/* Pause button (WCAG: anything that moves on its own can be paused) */
.ldl__pause {
	display: flex; align-items: center; justify-content: center; margin: 12px 0 0 auto;
	width: 34px; height: 34px; padding: 0; border-radius: 999px; cursor: pointer;
	background: var(--ldl-card); color: var(--ld-primary, #0e2a47); border: 1px solid var(--ldl-line-strong);
}
.ldl__pause[hidden] { display: none; }
.ldl__pause:hover { border-color: var(--ld-primary, #0e2a47); }
.ldl__pause:focus-visible { outline: 3px solid var(--ldl-accent); outline-offset: 2px; }
.ldl__icon { width: 16px; height: 16px; }
.ldl__icon--play, .ldl.is-paused .ldl__icon--pause { display: none; }
.ldl.is-paused .ldl__icon--play { display: block; }
.ldl__pause-label {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); border: 0; white-space: nowrap;
}

/* Phones */
@media (max-width: 679px) {
	.ldl { --ldl-logo: calc(var(--ldl-h, 56px) * .78); --ldl-gap: 12px; }
	.ldl--cards .ldl-item__inner { padding: 14px 16px; min-width: calc(var(--ldl-logo) * 2.4); }
	.ldl--grid .ldl__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ldl--grid.ldl--cards .ldl-item__inner { min-width: 0; padding: 14px 10px; }
	.ldl--section { padding-top: 32px; }
	.ldl--dark { padding: 28px 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.ldl .ldl__track { animation: none !important; }
}

/* Inside page content */
.entry-content .ldl ul.ldl__track { padding-left: 0; margin-bottom: 0; }
.entry-content .ldl h2.ldl__title { margin-top: 0; }
