/**
 * Blok „Vitoul hero“ – styly sdílené editorem i frontendem.
 *
 * Rozměry vycházejí z Figmy (frame `hero-section`, 1440 × 640).
 * Bílý přechod přes levou část je řešený CSS gradientem, ne natvrdo
 * ve fotce – díky tomu funguje s libovolným nahraným obrázkem.
 */

.vm-hero {
	--vm-hero-min-height: 640px;
	--vm-hero-overlay-angle: 90deg;
	--vm-hero-overlay-opacity: 75%;
	--vm-hero-overlay-from: 0%;
	--vm-hero-overlay-to: 55%;
	--vm-hero-overlay-mobile-opacity: 85%;

	align-items: stretch;
	background-color: var( --vm-color-white );
	display: flex;
	isolation: isolate;
	min-height: var( --vm-hero-min-height );
	overflow: hidden;
	position: relative;
	width: 100%;
}

/* ----------------------------------------------------------------------
 * Pozadí – fotografie, bílý přechod a vlna
 * -------------------------------------------------------------------- */

.vm-hero__media {
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 0;
}

.vm-hero__image {
	display: block;
	height: 100%;
	object-fit: cover;
	object-position: center 35%;
	width: 100%;
}

/*
 * Přechod do bílé přes fotku – drží text čitelný. Jde úplně vypnout
 * (nevykreslí se pak celý tento prvek) nebo doladit v editoru: směr,
 * síla (krytí v nejsilnějším bodě) a začátek/konec přechodu.
 */
.vm-hero__overlay {
	background: linear-gradient(
		var( --vm-hero-overlay-angle, 90deg ),
		rgba( 255 255 255 / var( --vm-hero-overlay-opacity, 75% ) ) var( --vm-hero-overlay-from, 0% ),
		rgba( 255 255 255 / 0% ) var( --vm-hero-overlay-to, 55% )
	);
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 1;
}

/* Dekorativní vlna přetékající přes spodní hranu sekce. */
.vm-hero__wave {
	bottom: -56px;
	display: block;
	height: 218px;
	left: 50%;
	max-width: none;
	min-width: 1614px;
	pointer-events: none;
	position: absolute;
	transform: translateX( -50% );
	user-select: none;
	width: 112%;
	z-index: 2;
}

/* Zástupný stav, když ještě není vybraná fotka. */
.vm-hero__placeholder {
	background-color: var( --vm-color-teal-bg );
	inset: 0;
	position: absolute;
	z-index: 0;
}

/* ----------------------------------------------------------------------
 * Obsah
 * -------------------------------------------------------------------- */

.vm-hero__inner {
	display: flex;
	margin: 0 auto;
	max-width: calc( var( --vm-container ) + 2 * var( --vm-gutter ) );
	position: relative;
	width: 100%;
	z-index: 3;
}

.vm-hero__content {
	display: flex;
	flex: 1 1 50%;
	flex-direction: column;
	gap: var( --vm-space-xl );
	justify-content: center;
	max-width: 50%;
	padding: var( --vm-space-3xl ) 60px 40px var( --vm-gutter );
}

.vm-hero__stack {
	display: flex;
	flex-direction: column;
	gap: var( --vm-space-lg );
}

.vm-hero__headline {
	display: flex;
	flex-direction: column;
	gap: var( --vm-space-xs );
}

/* Heading/Overline – 16 Montserrat Bold, tracking 4 */
.vm-hero__overline {
	color: var( --vm-color-teal );
	font-family: var( --vm-font-heading );
	font-size: var( --vm-size-overline );
	font-weight: var( --vm-weight-bold );
	letter-spacing: var( --vm-tracking-widest );
	line-height: var( --vm-leading-none );
	margin: 0;
	text-transform: uppercase;
}

/* Heading/H1 – 44/1.2, barva text/heading */
.vm-hero__title {
	color: var( --vm-color-text-heading );
	font-family: var( --vm-font-heading );
	font-size: var( --vm-size-h1 );
	font-weight: var( --vm-weight-bold );
	line-height: var( --vm-leading-tight );
	margin: 0;
}

/* Heading/H2 – 28, barva text/primary */
.vm-hero__subtitle {
	color: var( --vm-color-text-primary );
	font-family: var( --vm-font-heading );
	font-size: var( --vm-size-h2 );
	font-weight: var( --vm-weight-bold );
	line-height: var( --vm-leading-tight );
	margin: 0;
}

/* Body/Large – 16/1.6 */
.vm-hero__text {
	color: var( --vm-color-text-body );
	font-family: var( --vm-font-body );
	font-size: var( --vm-size-body-lg );
	font-weight: var( --vm-weight-regular );
	line-height: var( --vm-leading-normal );
	margin: 0;
}

.vm-hero__cta {
	display: flex;
}

.vm-hero__button {
	align-items: center;
	background-color: var( --vm-color-teal );
	border: 0;
	border-radius: var( --vm-radius );
	color: var( --vm-color-white );
	display: inline-flex;
	gap: var( --vm-space-xs );
	font-family: var( --vm-font-heading );
	font-size: var( --vm-size-nav );
	font-weight: var( --vm-weight-bold );
	line-height: var( --vm-leading-none );
	padding: var( --vm-space-sm ) var( --vm-space-lg );
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color var( --vm-transition );
}

.vm-hero__button:hover,
.vm-hero__button:focus {
	background-color: var( --vm-color-teal-hover );
	color: var( --vm-color-white );
}

.vm-hero__button-icon {
	display: block;
	flex-shrink: 0;
	height: 16px;
	width: 16px;
}

/* ----------------------------------------------------------------------
 * Responzivita
 * -------------------------------------------------------------------- */

@media ( max-width: 1100px ) {

	.vm-hero__content {
		flex-basis: 58%;
		max-width: 58%;
		padding-right: var( --vm-space-xl );
	}
}

@media ( max-width: 860px ) {

	.vm-hero {
		--vm-hero-min-height: 520px;
	}

	.vm-hero__content {
		flex-basis: 100%;
		max-width: 100%;
		padding: var( --vm-space-2xl ) var( --vm-gutter ) 72px;
	}

	/*
	 * Na úzkých displejích je fotka pod textem celá, proto tu přechod
	 * (směr/začátek/konec) nedává smysl – je to jednolité zesvětlení
	 * s vlastní, samostatně nastavitelnou intenzitou.
	 */
	.vm-hero__overlay {
		background: rgba( 255 255 255 / var( --vm-hero-overlay-mobile-opacity, 85% ) );
	}

	.vm-hero__image {
		object-position: center 25%;
	}

	.vm-hero__wave {
		bottom: -40px;
		height: 140px;
		min-width: 900px;
	}
}
