.cms-hero {
	--cms-aspect: 3840/1860;
	--cms-aspect-m: 1/2;
	--cms-h-m: 100;
	--cms-off-m: 0px;
	--cms-h-d: 100;
	--cms-off-d: 0px;
	--cms-btn-bg: #a4896c;
	--cms-btn-color: #fff;
	--cms-arrow-bg: #fff;
	--cms-arrow-color: #000;
	--cms-pg: #cab49766;
	--cms-pg-active: #cab497;
	--cms-delay: 10000ms;
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #111;
	aspect-ratio: var(--cms-aspect);
	isolation: isolate;
}

.cms-hero *, .cms-hero *::before, .cms-hero *::after { box-sizing: border-box; }

.cms-hero__stage { position: absolute; inset: 0; touch-action: pan-y; }

/* Slides */
.cms-slide { position: absolute; inset: 0; visibility: hidden; will-change: transform; }
.cms-slide.is-active, .cms-slide.is-moving { visibility: visible; }
.cms-slide.is-moving { z-index: 1; }
.cms-slide:not(.is-active):not(.is-moving):not(.is-near) .cms-slide__media { display: none; }
.cms-slide__media { position: absolute; inset: 0; background: var(--cms-slide-bg, transparent); }
.cms-slide__media picture { display: block; position: absolute; inset: 0; }
.cms-slide__img,
.cms-slide__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--cms-fp-d, center); }
.cms-slide__video { opacity: 0; transition: opacity .4s ease; }
.cms-slide.is-playing .cms-slide__video { opacity: 1; }
.cms-slide--letterbox .cms-slide__media { background: #000; }
.cms-slide--letterbox .cms-slide__img,
.cms-slide--letterbox .cms-slide__video { object-fit: contain; }

/* Overlay layers: one grid cell, content placed with align/justify variables */
.cms-layer {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: grid;
	grid-template: minmax(0, 1fr) / minmax(0, 1fr);
	align-items: var(--ai-d, end);
	justify-items: var(--ji-d, start);
	pointer-events: none;
}
.cms-block {
	pointer-events: auto;
	max-width: 100%;
	margin: var(--md-t, 0) var(--md-r, 0) var(--md-b, 0) var(--md-l, 0);
	padding: var(--pd-t, 0) var(--pd-r, 0) var(--pd-b, 0) var(--pd-l, 0);
}

/* Text */
.cms-text { max-width: min(100%, var(--mw, 100%)); }
.cms-layer--text.is-align-left .cms-text { text-align: left; }
.cms-layer--text.is-align-center .cms-text { text-align: center; }
.cms-layer--text.is-align-right .cms-text { text-align: right; }
.cms-text > * { margin: 0; }
.cms-text > * + * { margin-top: var(--gap, 8px); }
.cms-text__heading { font-size: var(--fs-d, clamp(28px, 4vw, 64px)); line-height: 1.1; color: #fff; }
.cms-text__sub { font-size: var(--fs-d, clamp(16px, 1.6vw, 24px)); line-height: 1.35; color: #fff; }

/* Buttons */
.cms-btns { display: flex; flex-direction: column; gap: var(--cms-gap, 12px); width: var(--cms-bw-d, 350px); }
.cms-btn { position: relative; display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; }
.cms-btn--standard {
	min-height: 46px;
	padding: 0 20px;
	border-radius: 4px;
	background: var(--bg, var(--cms-btn-bg));
	color: var(--fg, var(--cms-btn-color));
	font-size: 16px;
	line-height: 1.2;
	transition: filter .2s ease, transform .2s ease;
}
.cms-btn--standard:hover { filter: brightness(1.08); color: var(--fg, var(--cms-btn-color)); }
.cms-btn--feature {
	flex-direction: column;
	min-height: 64px;
	padding: 6px 20px;
	border-radius: 8px;
	overflow: hidden;
	color: #fff;
	background: radial-gradient(at 50% 74%, var(--g1, #9962d2), var(--g2, #7338bb));
	transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
}
.cms-btn--feature:hover { transform: translateY(-4px) scale(1.03); filter: brightness(1.15); box-shadow: 0 10px 30px color-mix(in srgb, var(--g2, #7338bb) 60%, transparent); color: #fff; }
.cms-btn__eyebrow { font-size: 14px; font-weight: 300; line-height: 1.1; }
.cms-btn__title { font-size: 30px; font-weight: 700; line-height: 1.1; }
.cms-btn--feature::after {
	content: '';
	position: absolute;
	top: 0;
	left: -70%;
	width: 45%;
	height: 100%;
	background: linear-gradient(115deg, transparent, rgba(255, 255, 255, .55), transparent);
	transform: skewX(-20deg);
	pointer-events: none;
}
.cms-btn--feature:hover::after { left: 130%; transition: left .55s ease; }
.cms-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Entrance animations (run each time a slide becomes active; static by default) */
@keyframes cms-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cms-fade-up { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes cms-fade-down { from { opacity: 0; transform: translateY(-60px); } to { opacity: 1; transform: none; } }
@keyframes cms-fade-left { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@keyframes cms-fade-right { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes cms-zoom { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
.cms-slide.is-active [data-anim] { animation-duration: .8s; animation-timing-function: cubic-bezier(0, .71, .2, 1.01); animation-delay: var(--anim-delay, 0ms); animation-fill-mode: both; }
.cms-slide.is-active [data-anim="fade"] { animation-name: cms-fade; }
.cms-slide.is-active [data-anim="fade-up"] { animation-name: cms-fade-up; }
.cms-slide.is-active [data-anim="fade-down"] { animation-name: cms-fade-down; }
.cms-slide.is-active [data-anim="fade-left"] { animation-name: cms-fade-left; }
.cms-slide.is-active [data-anim="fade-right"] { animation-name: cms-fade-right; }
.cms-slide.is-active [data-anim="zoom"] { animation-name: cms-zoom; }

/* Controls */
.cms-hero__ui { position: absolute; right: 50px; bottom: 50px; z-index: 5; display: flex; flex-direction: column; align-items: stretch; gap: 14px; pointer-events: none; }
.cms-hero__ui > * { pointer-events: auto; }
.cms-hero__nav { display: flex; gap: 10px; justify-content: flex-end; }
.cms-hero__arrow, .cms-hero__pause {
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--cms-arrow-bg);
	color: var(--cms-arrow-color);
	cursor: pointer;
	transition: filter .2s ease;
}
.cms-hero__arrow:hover, .cms-hero__pause:hover { filter: brightness(.95); }
.cms-hero__arrow:focus-visible, .cms-hero__pause:focus-visible, .cms-hero__seg:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cms-hero__pause .i-play { display: none; }
.cms-hero.is-paused .cms-hero__pause .i-play { display: block; }
.cms-hero.is-paused .cms-hero__pause .i-pause { display: none; }
.cms-hero__pagination { display: flex; gap: 4px; }
.cms-hero__seg { position: relative; flex: 1; height: 2px; padding: 0; border: 0; background: var(--cms-pg); cursor: pointer; }
.cms-hero__seg::before { content: ''; position: absolute; inset: -10px 0; }
.cms-hero__seg span { position: absolute; inset: 0; width: 0; background: var(--cms-pg-active); }
.cms-hero__seg.is-active span { animation: cms-fill var(--cms-delay) linear forwards; }
.cms-hero:not([data-autoplay]) .cms-hero__seg.is-active span { animation: none; width: 100%; }
.cms-hero.is-paused .cms-hero__seg.is-active span { animation-play-state: paused; }
@keyframes cms-fill { from { width: 0; } to { width: 100%; } }

.cms-empty { padding: 24px; border: 2px dashed #c3c8cf; color: #6b7280; text-align: center; font: 14px/1.5 sans-serif; }

/* Desktop height as a share of the screen */
@media (min-width: 768px) {
	.cms-hero--d-vh { aspect-ratio: auto; height: calc(100vh * var(--cms-h-d) / 100 - var(--cms-off-d)); }
}
@supports (height: 100svh) {
	@media (min-width: 768px) {
		.cms-hero--d-vh { height: calc(100svh * var(--cms-h-d) / 100 - var(--cms-off-d)); }
	}
}

/* Mobile */
@media (max-width: 767px) {
	.cms-hero { aspect-ratio: var(--cms-aspect-m); }
	.cms-hero--m-vh { aspect-ratio: auto; height: calc(100vh * var(--cms-h-m) / 100 - var(--cms-off-m)); }
	.cms-slide__img, .cms-slide__video { object-position: var(--cms-fp-m, center); }
	.cms-layer { align-items: var(--ai-m, end); justify-items: var(--ji-m, start); }
	.cms-block {
		margin: var(--mm-t, var(--md-t, 0)) var(--mm-r, var(--md-r, 0)) var(--mm-b, var(--md-b, 0)) var(--mm-l, var(--md-l, 0));
		padding: var(--pm-t, var(--pd-t, 0)) var(--pm-r, var(--pd-r, 0)) var(--pm-b, var(--pd-b, 0)) var(--pm-l, var(--pd-l, 0));
	}
	.cms-layer--text.is-align-m-left .cms-text { text-align: left; }
	.cms-layer--text.is-align-m-center .cms-text { text-align: center; }
	.cms-layer--text.is-align-m-right .cms-text { text-align: right; }
	.cms-text__heading { font-size: var(--fs-m, var(--fs-d, clamp(24px, 7vw, 40px))); }
	.cms-text__sub { font-size: var(--fs-m, var(--fs-d, clamp(14px, 4vw, 18px))); }
	.cms-btns { width: var(--cms-bw-m, auto); max-width: 100%; }
	.cms-btns--grid { display: grid; grid-template-columns: 1fr 1fr; }
	.cms-btns--grid .cms-btn--standard { min-height: 40px; font-size: 12px; }
	.cms-btn__title { font-size: 24px; }
	.cms-hero:not(.cms-hero--ui-m) .cms-hero__ui { display: none; }
	.cms-hero__ui { right: 16px; bottom: 16px; }
}
@supports (height: 100svh) {
	@media (max-width: 767px) {
		.cms-hero--m-vh { height: calc(100svh * var(--cms-h-m) / 100 - var(--cms-off-m)); }
	}
}

@media (prefers-reduced-motion: reduce) {
	.cms-slide.is-active [data-anim] { animation: none; }
	.cms-btn--feature, .cms-btn--feature:hover { transition: none; transform: none; }
	.cms-btn--feature::after { display: none; }
	.cms-hero__seg.is-active span { animation: none; width: 100%; }
}
