/**
 * CLM Hero — mobile 9:16 / desktop 16:9 hero rotator with video support.
 * Mobile-first. Breakpoint switch at 768px per spec.
 */

.clm-hero {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--clm-text);
}

.clm-hero-slide {
	position: relative;
	aspect-ratio: 9 / 16;
	max-height: 85vh;
}

@media (min-width: 768px) {
	.clm-hero-slide {
		aspect-ratio: 16 / 9;
		max-height: 720px;
	}
}

.clm-hero-slide__media,
.clm-hero-media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Explicit hero video element per spec. */
.clm-hero-video {
	aspect-ratio: 9 / 16;
	object-fit: cover;
	width: 100%;
	height: 100%;
}

@media (min-width: 768px) {
	.clm-hero-video {
		aspect-ratio: 16 / 9;
	}
}

.clm-hero-slide__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0.05) 70%);
	pointer-events: none;
}

.clm-hero-slide__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: var(--clm-space-6) var(--clm-space-4) var(--clm-space-7);
	color: #fff;
	z-index: 1;
}

@media (min-width: 768px) {
	.clm-hero-slide__content {
		padding: var(--clm-space-8);
		max-width: 640px;
	}
}

.clm-hero-slide__eyebrow {
	font-size: var(--clm-fs-caption);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	margin-bottom: var(--clm-space-2);
	color: rgba(255, 255, 255, 0.85);
}

.clm-hero-slide__title {
	font-family: var(--clm-font-heading);
	font-size: var(--clm-fs-h2);
	line-height: var(--clm-lh-tight);
	margin-bottom: var(--clm-space-3);
}

.clm-hero-slide__subtitle {
	font-size: var(--clm-fs-body-lg);
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: var(--clm-space-4);
	max-width: 52ch;
}

.clm-hero-slide__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--clm-touch-min);
	padding-inline: var(--clm-space-5);
	border-radius: var(--clm-radius-pill);
	background: var(--clm-primary);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	font-size: var(--clm-fs-body);
}

.clm-hero-slide__cta:hover {
	background: var(--clm-primary-hover);
}

/* ---------------------------------------------------------------------
   Rotator controls — dots + arrows, 44px touch targets
--------------------------------------------------------------------- */

.clm-hero-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: var(--clm-space-3);
	display: flex;
	justify-content: center;
	gap: var(--clm-space-2);
	z-index: 2;
}

.clm-hero-dots__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	padding: 0;
	position: relative;
}

/* Expand hit area to 44px without growing the visual dot. */
.clm-hero-dots__dot::before {
	content: "";
	position: absolute;
	inset: -18px;
}

.clm-hero-dots__dot.is-active {
	background: #fff;
}

.clm-hero-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: var(--clm-touch-min);
	height: var(--clm-touch-min);
	display: none;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: var(--clm-text);
	z-index: 2;
}

@media (min-width: 768px) {
	.clm-hero-arrow {
		display: flex;
	}
}

.clm-hero-arrow--prev {
	left: var(--clm-space-4);
}

.clm-hero-arrow--next {
	right: var(--clm-space-4);
}

.clm-hero-arrow:hover {
	background: #fff;
}

/* ---------------------------------------------------------------------
   Reduced motion: disable autoplay video, show poster only
--------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.clm-hero-video {
		display: none;
	}

	.clm-hero-slide__poster {
		display: block;
	}
}

.clm-hero-slide__poster {
	display: none;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
