/*!
 * Verdant — carousels
 *
 * One engine for the hero slider, the testimonial slider and the product
 * gallery. It is built on native CSS scroll-snap, so swiping is handled by the
 * browser itself: momentum, rubber-banding and pointer cancellation all behave
 * exactly as iOS users expect, with no gesture library and no touch handlers.
 * JavaScript only adds arrows, dots, a counter, autoplay and ARIA state.
 */

.vrd-carousel {
	position: relative;
}

.vrd-carousel__viewport {
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain; /* Swiping the slider never navigates back. */
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x pan-y pinch-zoom;
}

.vrd-carousel__viewport::-webkit-scrollbar {
	display: none;
}

.vrd-carousel__viewport:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: -4px;
}

.vrd-carousel__slide {
	position: relative; /* Contains absolutely positioned children (e.g. .screen-reader-text) inside the scrolling viewport, so off-screen slides cannot widen the page. */
	flex: 0 0 100%;
	min-width: 0;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

/* Before the script runs, only the first slide is visible: no flash of a
   stacked list and no layout shift. */
.vrd-carousel:not(.is-ready) .vrd-carousel__viewport {
	overflow: hidden;
}

/* ==========================================================================
   Controls
   ========================================================================== */

/*
 * Arrows are square hairline buttons rather than floating circles: they read
 * as part of the layout grid instead of as widgets dropped on top of it.
 */
.vrd-carousel__nav {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-sm);
	background: rgb(255 255 255 / 94%);
	color: var(--color-text);
	box-shadow: none;
	transform: translateY(-50%);
	transition: background-color var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
}

.vrd-carousel.is-ready .vrd-carousel__nav {
	display: inline-flex;
}

.vrd-carousel__nav:hover {
	background: var(--color-secondary);
	border-color: var(--color-secondary);
	color: #fff;
}

.vrd-carousel__nav[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.vrd-carousel__nav--prev {
	left: var(--space-xs);
}

.vrd-carousel__nav--next {
	right: var(--space-xs);
}

@media (min-width: 768px) {
	.vrd-carousel__nav--prev {
		left: var(--space-md);
	}

	.vrd-carousel__nav--next {
		right: var(--space-md);
	}
}

/* Dots are hairlines, not bubbles: the active one simply gets longer. */
.vrd-carousel__dots {
	display: none;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: var(--space-md) 0 0;
	list-style: none;
}

.vrd-carousel.is-ready .vrd-carousel__dots {
	display: flex;
}

.vrd-carousel__dot {
	width: 28px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.vrd-carousel__dot::before {
	content: "";
	width: 100%;
	height: 1px;
	background: var(--color-border-strong);
	transition: background-color var(--t) var(--ease), height var(--t) var(--ease);
}

.vrd-carousel__dot:hover::before {
	background: var(--color-text-muted);
}

.vrd-carousel__dot[aria-selected="true"]::before,
.vrd-carousel__dot.is-active::before {
	background: var(--color-primary);
	height: 2px;
}

/* Slide counter, set in the serif like a page number. */
.vrd-carousel__count {
	display: none;
	align-items: baseline;
	gap: 0.35em;
	font-family: var(--font-heading);
	font-size: var(--fs-sm);
	font-variant-numeric: tabular-nums;
	line-height: 1;
	white-space: nowrap;
}

.vrd-carousel.is-ready .vrd-carousel__count {
	display: inline-flex;
}

.vrd-carousel__count-sep,
.vrd-carousel__count-total {
	opacity: 0.55;
}

/* ==========================================================================
   Hero slider
   ========================================================================== */

.vrd-hero {
	--hero-h: clamp(30rem, 72vh, 40rem);
	position: relative;
	background: var(--color-secondary);
	isolation: isolate;
}

@supports (height: 72svh) {
	.vrd-hero {
		--hero-h: clamp(30rem, 72svh, 40rem);
	}
}

.vrd-hero--compact {
	--hero-h: clamp(22rem, 52vh, 30rem);
}

@supports (height: 52svh) {
	.vrd-hero--compact {
		--hero-h: clamp(22rem, 52svh, 30rem);
	}
}

.vrd-hero--tall {
	--hero-h: clamp(34rem, 88vh, 48rem);
}

@supports (height: 88svh) {
	.vrd-hero--tall {
		--hero-h: clamp(34rem, 88svh, 48rem);
	}
}

/* The floating arrows are replaced by the control rail, which is part of the
   composition rather than an overlay. */
.vrd-hero .vrd-carousel__nav {
	position: static;
	transform: none;
	width: 44px;
	height: 44px;
	border-color: rgb(255 255 255 / 35%);
	background: transparent;
	color: #fff;
}

.vrd-hero .vrd-carousel__nav:hover {
	background: #fff;
	border-color: #fff;
	color: var(--color-secondary);
}

.vrd-hero__slide {
	position: relative;
	/* A fixed height reserved up front means the slider never shifts layout. */
	height: var(--hero-h);
	display: flex;
	align-items: center;
	overflow: hidden;
	isolation: isolate;
}

.vrd-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

/*
 * <picture> is a plain block with `height: auto` from the base reset, so
 * without this the image resolves its `height: 100%` against an auto-height
 * parent, renders at its own aspect ratio and leaves the bottom of the slide
 * uncovered on narrow viewports.
 */
.vrd-hero__media picture {
	display: block;
	width: 100%;
	height: 100%;
}

.vrd-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.vrd-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.vrd-hero__overlay--none {
	background: none;
}

/*
 * Overlays are a directional wash, weighted towards the side the type sits on
 * and fading out over the product, so the photograph is never flattened into
 * a grey rectangle just to make the words legible.
 */
.vrd-hero__overlay--light {
	background: linear-gradient(96deg, rgb(8 24 17 / 62%) 0%, rgb(8 24 17 / 22%) 52%, rgb(8 24 17 / 4%) 100%);
}

.vrd-hero__overlay--medium {
	background: linear-gradient(96deg, rgb(8 24 17 / 80%) 0%, rgb(8 24 17 / 40%) 56%, rgb(8 24 17 / 12%) 100%);
}

.vrd-hero__overlay--strong {
	background: linear-gradient(96deg, rgb(6 20 14 / 92%) 0%, rgb(6 20 14 / 60%) 62%, rgb(6 20 14 / 28%) 100%);
}

.vrd-hero__slide--center .vrd-hero__overlay,
.vrd-hero__slide--right .vrd-hero__overlay {
	background: linear-gradient(0deg, rgb(8 24 17 / 72%) 0%, rgb(8 24 17 / 32%) 60%, rgb(8 24 17 / 18%) 100%);
}

/* On narrow screens the text sits over the whole image, so the wash is
   vertical instead of diagonal for readability. */
@media (max-width: 767px) {
	.vrd-hero__overlay--light {
		background: linear-gradient(180deg, rgb(8 24 17 / 28%) 0%, rgb(8 24 17 / 72%) 100%);
	}

	.vrd-hero__overlay--medium {
		background: linear-gradient(180deg, rgb(8 24 17 / 42%) 0%, rgb(8 24 17 / 84%) 100%);
	}

	.vrd-hero__overlay--strong {
		background: linear-gradient(180deg, rgb(6 20 14 / 60%) 0%, rgb(6 20 14 / 92%) 100%);
	}
}

.vrd-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	/* Leaves room for the control rail so long copy never collides with it. */
	padding-block: var(--space-xl) calc(var(--space-2xl) + var(--space-lg));
	color: #fff;
}

/*
 * Controlled measure. The headline is allowed 18 characters a line at most,
 * which is what keeps an editorial hero from turning into a banner.
 */
.vrd-hero__inner {
	max-width: 32rem;
}

@media (min-width: 1024px) {
	.vrd-hero__inner {
		max-width: 36rem;
	}
}

.vrd-hero__slide--center .vrd-hero__inner {
	margin-inline: auto;
	text-align: center;
}

.vrd-hero__slide--right .vrd-hero__inner {
	margin-left: auto;
	text-align: right;
}

.vrd-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.75em;
	margin-bottom: var(--space-md);
	padding: 0;
	border-radius: 0;
	background: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	font-family: var(--font-sans);
	font-size: var(--fs-xs);
	font-weight: 600;
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
	color: rgb(255 255 255 / 88%);
}

.vrd-hero__eyebrow::before {
	content: "";
	width: 2rem;
	height: 1px;
	background: currentColor;
	opacity: 0.8;
}

.vrd-hero__slide--center .vrd-hero__eyebrow::before,
.vrd-hero__slide--right .vrd-hero__eyebrow::before {
	display: none;
}

.vrd-hero__title {
	margin: 0 0 var(--space-md);
	color: #fff;
	font-family: var(--font-heading);
	font-size: var(--fs-display);
	font-weight: 400;
	line-height: var(--lh-display);
	letter-spacing: var(--ls-display);
	text-shadow: 0 1px 20px rgb(6 20 14 / 28%);
	text-wrap: balance;
}

.vrd-hero__text {
	margin: 0 0 var(--space-xl);
	max-width: 30rem;
	color: rgb(255 255 255 / 82%);
	font-size: var(--fs-lg);
	line-height: 1.6;
	text-shadow: 0 1px 14px rgb(6 20 14 / 26%);
	text-wrap: pretty;
}

.vrd-hero__slide--center .vrd-hero__text {
	margin-inline: auto;
}

.vrd-hero__slide--right .vrd-hero__text {
	margin-left: auto;
}

.vrd-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.vrd-hero__slide--center .vrd-hero__actions {
	justify-content: center;
}

.vrd-hero__slide--right .vrd-hero__actions {
	justify-content: flex-end;
}

/*
 * Control rail. Counter on the left, dots in the middle, arrows on the right,
 * all aligned to the same container as the headline above it — so the slider
 * chrome sits on the page grid instead of floating over the picture.
 */
.vrd-hero__controls {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 6;
	padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
	pointer-events: none;
}

.vrd-hero__controls-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	padding-top: var(--space-md);
	border-top: 1px solid rgb(255 255 255 / 22%);
	color: #fff;
	pointer-events: auto;
}

.vrd-hero__controls-nav {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}

.vrd-hero .vrd-carousel__count {
	color: #fff;
}

.vrd-hero .vrd-carousel__dots {
	flex: 1 1 auto;
	justify-content: center;
	padding: 0;
}

.vrd-hero .vrd-carousel__dot::before {
	background: rgb(255 255 255 / 40%);
}

.vrd-hero .vrd-carousel__dot:hover::before {
	background: rgb(255 255 255 / 70%);
}

.vrd-hero .vrd-carousel__dot[aria-selected="true"]::before {
	background: #fff;
	height: 2px;
}

/*
 * On phones the arrows sit on top of the headline and swiping is the natural
 * gesture anyway, so the rail keeps only the counter and the dots.
 */
@media (max-width: 767px) {
	.vrd-hero .vrd-carousel__nav {
		display: none !important;
	}

	.vrd-hero__controls-inner {
		justify-content: space-between;
	}

	.vrd-hero .vrd-carousel__dots {
		justify-content: flex-end;
	}
}

/*
 * Slide entrance. Driven entirely by the aria-hidden state the engine already
 * maintains, so it costs no extra JavaScript, and it only runs once the
 * script has upgraded the slider.
 */
@media (prefers-reduced-motion: no-preference) {
	.vrd-carousel.is-ready .vrd-hero__slide[aria-hidden="false"] .vrd-hero__eyebrow,
	.vrd-carousel.is-ready .vrd-hero__slide[aria-hidden="false"] .vrd-hero__title,
	.vrd-carousel.is-ready .vrd-hero__slide[aria-hidden="false"] .vrd-hero__text,
	.vrd-carousel.is-ready .vrd-hero__slide[aria-hidden="false"] .vrd-hero__actions {
		animation: vrd-hero-rise 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
	}

	.vrd-carousel.is-ready .vrd-hero__slide[aria-hidden="false"] .vrd-hero__title {
		animation-delay: 60ms;
	}

	.vrd-carousel.is-ready .vrd-hero__slide[aria-hidden="false"] .vrd-hero__text {
		animation-delay: 120ms;
	}

	.vrd-carousel.is-ready .vrd-hero__slide[aria-hidden="false"] .vrd-hero__actions {
		animation-delay: 180ms;
	}
}

@keyframes vrd-hero-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* Static hero used when no slides exist yet. */
.vrd-hero--static .vrd-hero__slide {
	background: var(--color-secondary);
}

.vrd-hero--static .vrd-hero__slide::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(60% 80% at 20% 20%, rgb(var(--color-primary-rgb) / 30%) 0%, transparent 70%),
		radial-gradient(50% 70% at 85% 90%, rgb(var(--color-primary-rgb) / 22%) 0%, transparent 70%);
}

/* Autoplay pause control, docked in the rail beside the arrows. */
.vrd-carousel__pause {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgb(255 255 255 / 35%);
	border-radius: var(--radius-sm);
	background: transparent;
	color: #fff;
	transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.vrd-carousel.is-ready .vrd-carousel__pause[data-visible="true"] {
	display: inline-flex;
}

.vrd-carousel__pause:hover {
	background: #fff;
	border-color: #fff;
	color: var(--color-secondary);
}

/* ==========================================================================
   Multi-item carousel (testimonials, related products)
   ========================================================================== */

.vrd-carousel--items .vrd-carousel__viewport {
	gap: clamp(var(--space-lg), 3vw, 2.5rem);
	padding-bottom: var(--space-2xs);
}

.vrd-carousel--items .vrd-carousel__slide {
	flex: 0 0 min(100%, 24rem);
}

@media (min-width: 768px) {
	.vrd-carousel--items .vrd-carousel__slide {
		flex-basis: calc((100% - clamp(var(--space-lg), 3vw, 2.5rem)) / 2);
	}
}

@media (min-width: 1100px) {
	.vrd-carousel--items .vrd-carousel__slide {
		flex-basis: calc((100% - clamp(var(--space-lg), 3vw, 2.5rem) * 2) / 3);
	}
}

/*
 * Below the track sits a single control row: dots on the left, arrows on the
 * right. The dots box is given the arrows' height so the two line up on one
 * baseline instead of stacking into two rows of chrome.
 */
.vrd-carousel--items .vrd-carousel__nav {
	top: auto;
	bottom: 0;
	transform: none;
	width: 44px;
	height: 44px;
}

.vrd-carousel--items .vrd-carousel__nav--prev {
	left: auto;
	right: 52px;
}

.vrd-carousel--items .vrd-carousel__nav--next {
	right: 0;
}

.vrd-carousel--items .vrd-carousel__dots {
	justify-content: flex-start;
	align-items: center;
	height: 44px;
	margin-top: var(--space-xl);
	padding: 0;
}

@media (max-width: 767px) {
	.vrd-carousel--items .vrd-carousel__nav {
		display: none !important;
	}

	.vrd-carousel--items .vrd-carousel__dots {
		justify-content: center;
		height: auto;
		margin-top: var(--space-lg);
	}
}

/* ==========================================================================
   Product gallery
   ========================================================================== */

.vrd-gallery__main {
	position: relative;
	border-radius: var(--radius-xs);
	overflow: hidden;
	background: var(--color-surface-alt);
	border: 0;
}

.vrd-gallery__slide {
	position: relative;
	aspect-ratio: 1 / 1;
}

.vrd-gallery__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vrd-gallery__thumbs {
	display: flex;
	gap: var(--space-xs);
	margin: var(--space-xs) 0 0;
	padding: 0 0 var(--space-2xs);
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

.vrd-gallery__thumbs::-webkit-scrollbar {
	display: none;
}

.vrd-gallery__thumb {
	flex: 0 0 68px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--radius-xs);
	background: var(--color-surface-alt);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	transition: border-color var(--transition), opacity var(--transition);
	opacity: 0.6;
}

@media (min-width: 768px) {
	.vrd-gallery__thumb {
		flex-basis: 80px;
	}
}

.vrd-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vrd-gallery__thumb[aria-current="true"],
.vrd-gallery__thumb:hover {
	border-color: var(--color-text);
	opacity: 1;
}

/* Click-to-load embed facades (product video, contact map) live in
   contact.css, which is the stylesheet both of those views load. */

@media (prefers-reduced-motion: reduce) {
	.vrd-carousel__viewport {
		scroll-behavior: auto;
	}
}
