/*
 * AURA One Site Kit — Logo Showcase.
 *
 * Loaded only on pages that actually use the widget.
 *
 * The central idea is the frame: a fixed box that every logo is proportionally
 * contained inside, whatever its pixel size or aspect ratio, without any file
 * being edited. Containment is a guarantee about geometry, not about perceived
 * weight, which is why the optical variables below exist. Everything else is a
 * variable written by Elementor on the root element.
 *
 * Like the rest of the kit this stylesheet leans on AURA One's design tokens
 * and always carries a literal fallback, so it is correct under another
 * well-built theme too.
 */

.aura-logo-showcase {
	--aura-ls-frame-height: 5.5rem;
	--aura-ls-frame-max-width: 12.5rem;
	--aura-ls-frame-padding: 1rem 1.25rem;
	--aura-ls-frame-radius: 0;
	--aura-ls-align-x: center;
	--aura-ls-align-y: center;
	--aura-ls-gap: clamp(1.5rem, 3vw, 3rem);
	--aura-ls-item-margin: 0;

	--aura-ls-opacity: .6;
	--aura-ls-opacity-hover: 1;
	--aura-ls-grayscale: 1;
	--aura-ls-grayscale-hover: 0;
	--aura-ls-scale: 1;
	--aura-ls-scale-hover: 1.06;
	--aura-ls-item-scale: 1;
	--aura-ls-auto-scale: 1;
	--aura-ls-optical-x: 0;
	--aura-ls-optical-y: 0;
	--aura-ls-center-scale: 1;
	--aura-ls-transition: 220ms;

	--aura-ls-inset-width: 0px;
	--aura-ls-inset-color: transparent;

	--aura-ls-marquee-duration: 30s;
	--aura-ls-fade-speed: 500ms;

	--aura-ls-navigation-color: var(--aura-color-accent, #285c4d);
	--aura-ls-navigation-contrast: var(--aura-color-accent-contrast, #fff);
	--aura-ls-arrow-size: 2.25rem;
	--aura-ls-arrows-display: flex;

	--aura-ls-title-color: var(--aura-color-muted, #5b655f);
	--aura-ls-description-color: var(--aura-color-muted, #5b655f);
	--aura-ls-caption-background: rgb(23 32 28 / 78%);
	--aura-ls-tooltip-background: var(--aura-color-text, #17201c);
	--aura-ls-tooltip-color: var(--aura-color-accent-contrast, #fff);
	--aura-ls-cta-color: var(--aura-color-accent-contrast, #fff);
	--aura-ls-cta-background: var(--aura-color-accent, #285c4d);
	--aura-ls-cta-radius: var(--aura-radius-button, 999px);

	/*
	 * The declared value comes from Elementor's responsive controls; the
	 * "-fit" value is written inline by the controller when the real container
	 * cannot hold that many. Reading them as two separate variables is what
	 * lets the script clamp without destroying the editor's choice.
	 */
	--aura-ls-slides: var(--aura-ls-per-view-fit, var(--aura-ls-per-view, 5));
	--aura-ls-grid-columns: var(--aura-ls-columns-fit, var(--aura-ls-columns, 4));

	position: relative;
	font-family: var(--aura-font-body, ui-sans-serif, system-ui, sans-serif);
}

/* ------------------------------------------------------------------ The frame */

.aura-logo-showcase__item {
	position: relative;
	margin: var(--aura-ls-item-margin);
	min-inline-size: 0;
}

.aura-logo-showcase__cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	color: inherit;
	text-decoration: none;
}

.aura-logo-showcase__cell:focus-visible {
	outline: 2px solid var(--aura-ls-navigation-color);
	outline-offset: 3px;
}

/* A non-interactive cell is only focusable when it owns a tooltip. */
.aura-logo-showcase__cell[tabindex="-1"] {
	outline: none;
}

.aura-logo-showcase__frame {
	position: relative;
	display: flex;
	align-items: var(--aura-ls-align-y);
	justify-content: var(--aura-ls-align-x);
	box-sizing: border-box;
	inline-size: 100%;
	max-inline-size: var(--aura-ls-frame-max-width);
	block-size: var(--aura-ls-frame-height);
	padding: var(--aura-ls-frame-padding);
	border-radius: var(--aura-ls-frame-radius);
	overflow: hidden;
}

/*
 * The inset border is drawn as an inner shadow rather than a real border, so
 * turning it on never changes the frame's box size and therefore never
 * reflows the row.
 */
.aura-logo-showcase__frame::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 var(--aura-ls-inset-width) var(--aura-ls-inset-color);
	pointer-events: none;
}

.aura-logo-showcase__image {
	inline-size: 100%;
	block-size: 100%;
	max-inline-size: 100%;
	max-block-size: 100%;
	object-fit: contain;
	object-position: center;
	opacity: var(--aura-ls-opacity);
	filter: grayscale(var(--aura-ls-grayscale));
	/*
	 * Optical correction, composed in one transform. Translation is a nudge
	 * inside the frame and scale stacks the manual, automatic and global
	 * factors. The frame clips, so none of this can reach a neighbour or widen
	 * the page: composition changes, layout geometry does not.
	 */
	transform:
		translate(var(--aura-ls-optical-x), var(--aura-ls-optical-y))
		scale(calc(var(--aura-ls-scale) * var(--aura-ls-item-scale) * var(--aura-ls-auto-scale)));
	transition:
		opacity var(--aura-ls-transition) ease,
		filter var(--aura-ls-transition) ease,
		transform var(--aura-ls-transition) ease;
}

.aura-logo-showcase__item:hover .aura-logo-showcase__image,
.aura-logo-showcase__cell:focus-visible .aura-logo-showcase__image {
	opacity: var(--aura-ls-opacity-hover);
	filter: grayscale(var(--aura-ls-grayscale-hover));
	transform:
		translate(var(--aura-ls-optical-x), var(--aura-ls-optical-y))
		scale(calc(var(--aura-ls-scale-hover) * var(--aura-ls-item-scale) * var(--aura-ls-auto-scale)));
}

/*
 * Without a pointer there is no hover, so a logo left at 60% opacity and full
 * grayscale would simply stay dimmed forever. Touch visitors get the revealed
 * state from the start instead.
 */
@media (hover: none) {
	.aura-logo-showcase__image {
		opacity: var(--aura-ls-opacity-hover);
		filter: grayscale(var(--aura-ls-grayscale-hover));
	}
}

/* --------------------------------------------------------- Names and captions */

.aura-logo-showcase__title {
	color: var(--aura-ls-title-color);
	font-size: .8125rem;
	line-height: 1.3;
	text-align: center;
}

.aura-logo-showcase__description {
	color: var(--aura-ls-description-color);
	font-size: .8125rem;
	line-height: 1.45;
	text-align: center;
}

.aura-logo-showcase--title-hover .aura-logo-showcase__title,
.aura-logo-showcase--description-hover .aura-logo-showcase__description {
	opacity: 0;
	transition: opacity var(--aura-ls-transition) ease;
}

.aura-logo-showcase--title-hover .aura-logo-showcase__item:hover .aura-logo-showcase__title,
.aura-logo-showcase--title-hover .aura-logo-showcase__cell:focus-visible .aura-logo-showcase__title,
.aura-logo-showcase--title-hover .aura-logo-showcase__item.is-revealed .aura-logo-showcase__title,
.aura-logo-showcase--description-hover .aura-logo-showcase__item:hover .aura-logo-showcase__description,
.aura-logo-showcase--description-hover .aura-logo-showcase__cell:focus-visible .aura-logo-showcase__description,
.aura-logo-showcase--description-hover .aura-logo-showcase__item.is-revealed .aura-logo-showcase__description {
	opacity: 1;
}

.aura-logo-showcase__caption {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	padding: .5rem .75rem;
	background: var(--aura-ls-caption-background);
	color: var(--aura-color-accent-contrast, #fff);
	font-size: .8125rem;
	line-height: 1.25;
	text-align: center;
	opacity: 0;
	transform: translateY(100%);
	transition:
		opacity var(--aura-ls-transition) ease,
		transform var(--aura-ls-transition) ease;
}

.aura-logo-showcase__item:hover .aura-logo-showcase__caption,
.aura-logo-showcase__cell:focus-visible .aura-logo-showcase__caption,
.aura-logo-showcase__item.is-revealed .aura-logo-showcase__caption {
	opacity: 1;
	transform: translateY(0);
}

.aura-logo-showcase__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 2.75rem;
	margin-block-start: .5rem;
	padding: .5rem 1rem;
	border-radius: var(--aura-ls-cta-radius);
	background: var(--aura-ls-cta-background);
	color: var(--aura-ls-cta-color);
	font-size: .8125rem;
	line-height: 1.2;
	text-decoration: none;
}

.aura-logo-showcase--cta-hover .aura-logo-showcase__cta {
	opacity: 0;
	transition: opacity var(--aura-ls-transition) ease;
}

.aura-logo-showcase--cta-hover .aura-logo-showcase__item:hover .aura-logo-showcase__cta,
.aura-logo-showcase--cta-hover .aura-logo-showcase__cta:focus-visible,
.aura-logo-showcase--cta-hover .aura-logo-showcase__item.is-revealed .aura-logo-showcase__cta {
	opacity: 1;
}

/* ---------------------------------------------------------------- Tooltips */

.aura-logo-showcase__tooltip {
	position: absolute;
	z-index: 2;
	max-inline-size: 16rem;
	width: max-content;
	padding: .375rem .625rem;
	border-radius: var(--aura-radius-small, .375rem);
	background: var(--aura-ls-tooltip-background);
	color: var(--aura-ls-tooltip-color);
	font-size: .75rem;
	line-height: 1.35;
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--aura-ls-transition) ease,
		visibility var(--aura-ls-transition) ease;
	pointer-events: none;
}

.aura-logo-showcase__item:hover > .aura-logo-showcase__tooltip,
.aura-logo-showcase__cell:focus-visible ~ .aura-logo-showcase__tooltip,
.aura-logo-showcase__item.is-revealed > .aura-logo-showcase__tooltip {
	opacity: 1;
	visibility: visible;
}

.aura-logo-showcase--tooltip-top .aura-logo-showcase__tooltip {
	inset-block-end: calc(100% + .5rem);
	inset-inline-start: 50%;
	transform: translateX(-50%);
}

.aura-logo-showcase--tooltip-bottom .aura-logo-showcase__tooltip {
	inset-block-start: calc(100% + .5rem);
	inset-inline-start: 50%;
	transform: translateX(-50%);
}

.aura-logo-showcase--tooltip-left .aura-logo-showcase__tooltip {
	inset-inline-end: calc(100% + .5rem);
	inset-block-start: 50%;
	transform: translateY(-50%);
}

.aura-logo-showcase--tooltip-right .aura-logo-showcase__tooltip {
	inset-inline-start: calc(100% + .5rem);
	inset-block-start: 50%;
	transform: translateY(-50%);
}

/*
 * A scrolling track clips its own overflow, which would cut a tooltip in half.
 * Reserving the space inside the scroll box is more robust than trying to
 * escape it.
 */
.aura-logo-showcase.has-tooltips.aura-logo-showcase--tooltip-top .aura-logo-showcase__viewport {
	padding-block-start: 2.75rem;
}

.aura-logo-showcase.has-tooltips.aura-logo-showcase--tooltip-bottom .aura-logo-showcase__viewport {
	padding-block-end: 2.75rem;
}

.aura-logo-showcase.has-tooltips.aura-logo-showcase--tooltip-left .aura-logo-showcase__viewport,
.aura-logo-showcase.has-tooltips.aura-logo-showcase--tooltip-right .aura-logo-showcase__viewport {
	padding-inline: 1rem;
}

/* ----------------------------------------------------------------- Layouts */

.aura-logo-showcase__viewport {
	position: relative;
}

.aura-logo-showcase__track {
	display: flex;
	gap: var(--aura-ls-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Carousel — a native scroll container, so touch, trackpad, keyboard and
   focus scrolling all behave the way the platform already does them. */
.aura-logo-showcase--carousel .aura-logo-showcase__viewport,
.aura-logo-showcase--marquee .aura-logo-showcase__viewport {
	overflow-x: auto;
	overflow-y: visible;
	scrollbar-width: none;
	-ms-overflow-style: none;
	overscroll-behavior-x: contain;
}

.aura-logo-showcase--carousel .aura-logo-showcase__viewport::-webkit-scrollbar,
.aura-logo-showcase--marquee .aura-logo-showcase__viewport::-webkit-scrollbar {
	display: none;
}

.aura-logo-showcase--carousel .aura-logo-showcase__viewport {
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
}

.aura-logo-showcase--carousel .aura-logo-showcase__item {
	flex: 0 0 calc((100% - (var(--aura-ls-slides) - 1) * var(--aura-ls-gap)) / var(--aura-ls-slides));
	scroll-snap-align: start;
}

.aura-logo-showcase--carousel.aura-logo-showcase--center .aura-logo-showcase__item {
	scroll-snap-align: center;
}

/* Centre mode needs room on both sides for the first and last logo to
   actually reach the middle of the viewport. */
.aura-logo-showcase--carousel.aura-logo-showcase--center .aura-logo-showcase__track {
	padding-inline: calc((100% - (100% - (var(--aura-ls-slides) - 1) * var(--aura-ls-gap)) / var(--aura-ls-slides)) / 2);
}

.aura-logo-showcase--carousel.aura-logo-showcase--center .aura-logo-showcase__item.is-active .aura-logo-showcase__frame {
	transform: scale(var(--aura-ls-center-scale));
	transition: transform var(--aura-ls-transition) ease;
}

/* Multiple rows stay one horizontal scroll: the track becomes a grid that
   flows into columns. */
.aura-logo-showcase--carousel .aura-logo-showcase__track {
	grid-auto-flow: column;
	grid-template-rows: repeat(var(--aura-ls-rows, 1), auto);
}

.aura-logo-showcase--carousel:not(.aura-logo-showcase--fade) .aura-logo-showcase__track {
	display: grid;
	grid-auto-columns: calc((100% - (var(--aura-ls-slides) - 1) * var(--aura-ls-gap)) / var(--aura-ls-slides));
}

/* Fade — the one case a scroll container cannot serve, because there is no
   way to cross-fade between two positions of the same scroll offset. Applied
   only once the controller is ready, so without JavaScript the track stays a
   perfectly usable scrolling strip. */
.aura-logo-showcase--fade.is-ready .aura-logo-showcase__viewport {
	overflow: hidden;
	scroll-snap-type: none;
}

.aura-logo-showcase--fade.is-ready .aura-logo-showcase__track {
	display: grid;
	grid-auto-flow: row;
	grid-template-rows: none;
	grid-auto-columns: auto;
}

.aura-logo-showcase--fade.is-ready .aura-logo-showcase__item {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--aura-ls-fade-speed) ease,
		visibility var(--aura-ls-fade-speed) ease;
}

.aura-logo-showcase--fade.is-ready .aura-logo-showcase__item.is-active {
	opacity: 1;
	visibility: visible;
}

/* Marquee — two identical tracks side by side. Translating by exactly half
   the pair puts the second where the first began, so the loop has no seam. */
.aura-logo-showcase--marquee .aura-logo-showcase__viewport {
	display: flex;
	inline-size: max-content;
	gap: var(--aura-ls-gap);
	overflow: visible;
}

.aura-logo-showcase--marquee {
	overflow: hidden;
}

.aura-logo-showcase--marquee.is-ready .aura-logo-showcase__viewport {
	animation: aura-ls-marquee var(--aura-ls-marquee-duration) linear infinite;
}

.aura-logo-showcase--marquee.aura-logo-showcase--reverse.is-ready .aura-logo-showcase__viewport {
	animation-direction: reverse;
}

.aura-logo-showcase--marquee.is-paused .aura-logo-showcase__viewport {
	animation-play-state: paused;
}

.aura-logo-showcase--marquee .aura-logo-showcase__item {
	flex: 0 0 auto;
	inline-size: var(--aura-ls-frame-max-width);
}

@keyframes aura-ls-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(calc(-50% - (var(--aura-ls-gap) / 2))); }
}

/* Grid and filterable grid. */
.aura-logo-showcase--grid .aura-logo-showcase__track,
.aura-logo-showcase--filterable .aura-logo-showcase__track {
	display: grid;
	grid-template-columns: repeat(var(--aura-ls-grid-columns), minmax(0, 1fr));
	align-items: center;
	justify-items: center;
}

/* Static wall — reflows to whatever width it is given, at any size. */
.aura-logo-showcase--wall .aura-logo-showcase__track {
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
}

.aura-logo-showcase--wall .aura-logo-showcase__item {
	flex: 0 1 var(--aura-ls-frame-max-width);
}

.aura-logo-showcase--full {
	margin-inline: calc(50% - 50vw);
	inline-size: 100vw;
	max-inline-size: 100vw;
}

.aura-logo-showcase--full .aura-logo-showcase__track {
	padding-inline: clamp(1rem, 4vw, 3rem);
}

/* These elements carry an explicit display, which would otherwise outrank the
   user-agent rule for [hidden] and leave them visible. */
.aura-logo-showcase__item[hidden],
.aura-logo-showcase__track[hidden],
.aura-logo-showcase__dots[hidden] {
	display: none;
}

/* ------------------------------------------------------ Filters and controls */

.aura-logo-showcase__filters {
	display: flex;
	gap: .5rem;
	margin-block-end: var(--aura-ls-gap);
	justify-content: center;
}

/*
 * A filter bar that does not fit must resolve inside itself. Neither branch is
 * ever allowed to widen the page.
 */
.aura-logo-showcase--filters-scroll .aura-logo-showcase__filters {
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	justify-content: flex-start;
	scrollbar-width: thin;
}

.aura-logo-showcase--filters-wrap .aura-logo-showcase__filters {
	flex-wrap: wrap;
}

.aura-logo-showcase__filter {
	flex: 0 0 auto;
	min-block-size: 2.75rem;
	padding: .5rem 1rem;
	border: 1px solid var(--aura-color-border, #d9ddd5);
	border-radius: var(--aura-radius-button, 999px);
	background: transparent;
	color: var(--aura-color-text, #17201c);
	font: inherit;
	font-size: .8125rem;
	cursor: pointer;
	scroll-snap-align: start;
}

.aura-logo-showcase__filter[aria-pressed="true"] {
	border-color: var(--aura-ls-navigation-color);
	background: var(--aura-ls-navigation-color);
	color: var(--aura-ls-navigation-contrast);
}

.aura-logo-showcase__arrows {
	display: contents;
}

.aura-logo-showcase__arrow {
	position: absolute;
	inset-block-start: 50%;
	z-index: 3;
	display: var(--aura-ls-arrows-display);
	align-items: center;
	justify-content: center;
	/* Drawn at --aura-ls-arrow-size but never smaller than a 44px target. */
	inline-size: max(var(--aura-ls-arrow-size), 2.75rem);
	block-size: max(var(--aura-ls-arrow-size), 2.75rem);
	transform: translateY(-50%);
	border: 1px solid var(--aura-ls-navigation-color);
	border-radius: var(--aura-radius-button, 999px);
	background: var(--aura-ls-navigation-contrast);
	color: var(--aura-ls-navigation-color);
	cursor: pointer;
}

.aura-logo-showcase__arrow::before {
	content: "";
	inline-size: .5rem;
	block-size: .5rem;
	border-inline-end: 2px solid currentColor;
	border-block-end: 2px solid currentColor;
}

.aura-logo-showcase__arrow--prev {
	inset-inline-start: 0;
}

.aura-logo-showcase__arrow--prev::before {
	transform: translateX(1px) rotate(135deg);
}

.aura-logo-showcase__arrow--next {
	inset-inline-end: 0;
}

.aura-logo-showcase__arrow--next::before {
	transform: translateX(-1px) rotate(-45deg);
}

.aura-logo-showcase__arrow[disabled] {
	opacity: .4;
	cursor: default;
}

.aura-logo-showcase__dots {
	display: flex;
	gap: .375rem;
	justify-content: center;
	margin-block-start: 1rem;
}

.aura-logo-showcase__dot {
	display: flex;
	align-items: center;
	justify-content: center;
	/* The visible dot is small; the hit area around it is not. */
	inline-size: 2.75rem;
	block-size: 2.75rem;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.aura-logo-showcase__dot::before {
	content: "";
	inline-size: .5rem;
	block-size: .5rem;
	border-radius: 999px;
	background: var(--aura-color-border, #d9ddd5);
	transition: background var(--aura-ls-transition) ease;
}

.aura-logo-showcase__dot[aria-current="true"]::before {
	background: var(--aura-ls-navigation-color);
}

.aura-logo-showcase__arrow:focus-visible,
.aura-logo-showcase__dot:focus-visible,
.aura-logo-showcase__filter:focus-visible,
.aura-logo-showcase__cta:focus-visible {
	outline: 2px solid var(--aura-ls-navigation-color);
	outline-offset: 2px;
}

.aura-logo-showcase__viewport:focus-visible {
	outline: 2px solid var(--aura-ls-navigation-color);
	outline-offset: 4px;
}

.aura-logo-showcase__empty {
	padding: 1.5rem;
	border: 1px dashed var(--aura-color-border, #d9ddd5);
	border-radius: var(--aura-radius-card, .75rem);
	color: var(--aura-color-muted, #5b655f);
	text-align: center;
}

/* -------------------------------------------------------- Reduced motion */

/*
 * More than freezing. Autoplay stops, and the ticker turns into a strip the
 * visitor scrolls themselves, so no content becomes unreachable.
 */
@media (prefers-reduced-motion: reduce) {
	.aura-logo-showcase__image,
	.aura-logo-showcase__title,
	.aura-logo-showcase__description,
	.aura-logo-showcase__caption,
	.aura-logo-showcase__tooltip,
	.aura-logo-showcase__cta {
		transition-duration: 0ms;
	}

	.aura-logo-showcase--carousel .aura-logo-showcase__viewport {
		scroll-behavior: auto;
	}

	.aura-logo-showcase--marquee.is-ready .aura-logo-showcase__viewport {
		animation: none;
		inline-size: auto;
		overflow-x: auto;
		scroll-snap-type: x proximity;
	}

	.aura-logo-showcase--marquee {
		overflow: visible;
	}

	.aura-logo-showcase--fade.is-ready .aura-logo-showcase__item {
		transition-duration: 0ms;
	}
}
