/* Accessible photo carousels and lightweight reveal effects. */
.hero-carousel .hero-photos,
.hero-carousel .hero-photo {
	position: absolute;
	inset: 0;
}

.hero-carousel .hero-photo {
	background: none;
	opacity: 0;
	transition: opacity 1s ease;
}

.hero-carousel .hero-photo.is-active {
	opacity: 1;
}

.hero-carousel .hero-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 42%;
}

.carousel-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.carousel-controls button {
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 50%;
	background: rgba(37, 37, 37, .55);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	transition: background .2s ease, transform .2s ease;
}

.carousel-controls button:hover,
.carousel-controls button:focus-visible {
	transform: translateY(-2px);
	background: var(--orange-deep);
}

.carousel-controls button:focus-visible {
	outline: 3px solid var(--amber);
	outline-offset: 3px;
}

.carousel-controls span {
	min-width: 42px;
	color: #fff;
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.hero-controls {
	position: absolute;
	right: max(28px, calc((100vw - 1200px) / 2));
	bottom: 28px;
	z-index: 2;
}

.image-carousel-viewport,
.gallery-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: var(--radius);
}

.image-carousel-viewport {
	box-shadow: var(--shadow);
}

.image-carousel-track,
.gallery-track {
	display: flex;
	width: 100%;
	transition: transform .65s cubic-bezier(.2, .65, .25, 1);
	will-change: transform;
}

.image-carousel-track .sds-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	margin: 0;
}

.image-carousel-track .sds-slide img {
	position: static;
	width: 100%;
	height: 470px;
	object-fit: cover;
	border-radius: var(--radius);
}

.about-controls {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 2;
}

.about-controls button,
.gallery-controls button {
	width: 36px;
	height: 36px;
	font-size: 21px;
}

.gallery-carousel {
	position: relative;
}

.gallery-viewport {
	border-radius: 16px;
}

.gallery-track {
	gap: 12px;
}

.gallery-track .gallery-item {
	flex: 0 0 calc((100% - 24px) / 3);
	height: 250px;
	grid-row: auto;
	grid-column: auto;
}

.gallery-track .gallery-item img {
	width: 100%;
	height: 100%;
	 aspect-ratio: 4 / 3;
	object-fit: cover;
}

.gallery-controls {
	margin-top: 18px;
}

.gallery-controls button {
	border-color: rgba(185, 78, 30, .22);
	background: #fff;
	color: var(--orange-deep);
	box-shadow: var(--shadow-soft);
}

.gallery-controls span {
	color: var(--ink-soft);
}

.gallery-page-carousel .gallery-track .gallery-item {
	height: clamp(210px, 29vw, 340px);
}

.reveal-on-scroll {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .65s ease, transform .65s cubic-bezier(.2, .65, .25, 1);
}

.reveal-on-scroll.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.purpose-grid p {
	font-size: 13px;
	line-height: 1.7;
}

@media (max-width: 780px) {
	.hero-controls {
		right: 20px;
		bottom: 22px;
	}

	.image-carousel-track .sds-slide img {
		height: 390px;
	}

	.gallery-track {
		gap: 10px;
	}

	.gallery-track .gallery-item {
		flex-basis: calc((100% - 10px) / 2);
		height: 230px;
	}
}

@media (max-width: 480px) {
	.purpose-grid p {
		font-size: 12px;
	}

	.hero-controls {
		right: 16px;
		bottom: 18px;
	}

	.hero-controls button {
		width: 34px;
		height: 34px;
	}

	.image-carousel-track .sds-slide img {
		height: 315px;
	}

	.gallery-track .gallery-item {
		flex-basis: 100%;
		height: 250px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-carousel .hero-photo,
	.image-carousel-track,
	.gallery-track,
	.reveal-on-scroll,
	.carousel-controls button {
		transition: none;
	}
}
