/**
 * Homepage hero: sticky stack — each slide sticks and the next covers it.
 */

.home-hero {
	--hh-bg: #141518;
	--hh-text: #ffffff;
	--hh-muted: rgba(255, 255, 255, 0.78);
	--hh-accent: #ff7a00;

	position: relative;
	z-index: 2;
	width: 100%;
	background: var(--hh-bg);
	color: var(--hh-text);
	font-family: Rubik, system-ui, -apple-system, sans-serif;
}

/*
 * Slide itself is sticky (not the inner pin).
 * Equal height parent/child sticky never stacks — that was the bug.
 */
.home-hero__slide {
	--hh-cover: 0;

	position: sticky;
	top: 0;
	width: 100%;
	height: 100vh;
	height: 100svh;
	margin: 0;
	overflow: hidden;
	/* Snap is JS-driven — CSS snap + sticky traps upward scroll. */
	scroll-snap-align: none;
	scroll-snap-stop: normal;
	background: var(--hh-bg);
	/* Keep transforms off this node — they break position:sticky */
}

.home-hero__pin {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--hh-bg);
	box-shadow:
		0 -28px 70px rgba(0, 0, 0, 0.6),
		0 -2px 0 rgba(255, 255, 255, 0.05);
	transform-origin: center center;
	will-change: transform, filter;
}

.home-hero__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: var(--hh-bg);
	transform-origin: center center;
	will-change: transform;
	overflow: hidden;
}

.home-hero__picture,
.home-hero__image,
.home-hero__video {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 100% !important;
	min-height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center center !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: #111;
}

.home-hero__picture {
	display: block !important;
}

.home-hero__video--desktop {
	display: none !important;
}

.home-hero__video--mobile {
	display: block !important;
}

@media (min-width: 768px) {
	.home-hero__video--desktop {
		display: block !important;
	}

	.home-hero__video--mobile {
		display: none !important;
	}
}

.home-hero video.home-hero__video {
	aspect-ratio: auto !important;
}

.home-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: clamp(24px, 5vw, 64px);
	background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.66) 100%);
	pointer-events: none;
	opacity: calc(1 - (var(--hh-cover) * 0.9));
	text-align: center;
}

.home-hero__copy {
	max-width: min(640px, 92vw);
	margin: 0 auto;
	transform: translateY(calc(var(--hh-cover) * 28px)) scale(calc(1 - (var(--hh-cover) * 0.04)));
	transform-origin: center bottom;
}

.home-hero__title {
	margin: 0 0 10px;
	font-size: clamp(24px, 3.4vw, 40px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.home-hero__text {
	margin: 0 auto;
	font-size: clamp(13px, 1.35vw, 16px);
	line-height: 1.45;
	color: var(--hh-muted);
	max-width: 36em;
}

body.home.techno-home-hero #page {
	height: 100vh;
	height: 100svh;
	height: 100dvh;
	overflow-y: auto;
	scroll-snap-type: none !important;
	scroll-padding-top: var(--techno-header-h, 70px);
}

body.home.techno-home-hero #page.home-hero-snap-on,
body.home.techno-home-hero #page.is-past-home-hero {
	scroll-snap-type: none !important;
}

body.home.techno-home-hero .home-banners {
	position: relative;
	z-index: 40;
	width: 100%;
	max-width: none;
	margin: 0;
	box-sizing: border-box;
	background: #141518;
	scroll-snap-align: none;
	scroll-snap-stop: normal;
	scroll-margin-top: var(--techno-header-h, 70px);
	padding: 40px 0 56px;
}

body.home.techno-home-hero .home-banners__row,
body.home.techno-home-hero .home-banners__banner,
body.home.techno-home-hero .home-banners__product,
body.home.techno-home-hero .catalog-v2-card {
	scroll-snap-align: none !important;
	scroll-snap-stop: normal !important;
}

body.home.techno-home-hero .main-page-scroll-img,
body.home.techno-home-hero .main-page-scroll {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

body.home.techno-home-hero .e-con-top:has(.main-page-scroll-img),
body.home.techno-home-hero .elementor-element:has(> .main-page-scroll-img) {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
}

@media (max-width: 767px) {
	.home-hero__slide {
		height: 100svh;
	}

	.home-hero__overlay {
		padding: 28px 20px 72px;
	}

	.home-hero__title {
		font-size: clamp(22px, 6.2vw, 30px);
	}

	.home-hero__text {
		font-size: 14px;
	}

	body.home.techno-home-hero .home-banners {
		padding: 24px 0 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.home-hero__slide {
		position: relative;
	}

	.home-hero__pin,
	.home-hero__media,
	.home-hero__overlay,
	.home-hero__copy {
		transform: none !important;
		filter: none !important;
		opacity: 1 !important;
	}

	body.home.techno-home-hero #page,
	body.home.techno-home-hero #page.home-hero-snap-on {
		scroll-snap-type: none !important;
	}
}
