/* Widget Hero con video — video a pantalla completa que se encoge al hacer scroll */

.hero-video {
	--hv-alto: 100vh;
	--hv-velo: 0.2;
	--hv-color: #fff;
	--hv-color-final: #2f2f2f;
	--hv-curva: cubic-bezier(0.19, 1, 0.22, 1);
	position: relative;
	height: var(--hv-alto);
	overflow: hidden;
	color: var(--hv-color);
}

@supports (height: 100svh) {
	.hero-video {
		--hv-alto: 100svh;
	}
}

.hero-video__mascara {
	position: absolute;
	inset: 0;
	overflow: hidden;
	will-change: clip-path;
}

.hero-video .hero-video__medio {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
}

.hero-video__velo {
	position: absolute;
	inset: 0;
	background: #000;
	opacity: var(--hv-velo);
	pointer-events: none;
}

.hero-video__contenido {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 24px;
	text-align: center;
	pointer-events: none;
}

.hero-video__titulo-caja {
	will-change: transform;
	transform-origin: center center;
}

/* El tema fuerza Poppins, espaciado y color negro con !important en los títulos: aquí manda el widget. */
.hero-video .hero-video__titulo {
	margin: 0;
	padding: 0;
	font-family: var(--hv-fuente-titulo, inherit) !important;
	font-size: clamp(64px, 12vw, 200px);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: 0.01em !important;
	text-transform: none !important;
	color: inherit !important;
	transition: color 0.5s ease;
}

.hero-video__logo {
	display: block;
	width: 360px;
	max-width: 80vw;
	height: auto;
	margin: 0 auto;
}

.hero-video .hero-video__subtitulo {
	margin: 18px 0 0;
	font-family: var(--hv-fuente-sub, inherit) !important;
	font-size: clamp(15px, 1.5vw, 22px);
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	will-change: opacity, transform;
}

.hero-video .hero-video__subtitulo em,
.hero-video .hero-video__subtitulo i {
	font-family: inherit;
	font-style: italic;
	text-transform: none;
}

.hero-video__flecha {
	position: absolute;
	left: 50%;
	bottom: 24px;
	z-index: 2;
	width: 26px;
	height: 26px;
	margin-left: -13px;
	color: var(--hv-color);
	animation: hv-flecha 2.4s ease-in-out infinite;
}

.hero-video__flecha svg {
	display: block;
	width: 100%;
	height: 100%;
}

@keyframes hv-flecha {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(6px); }
}

/* Título fijo (como logo): sale del hero y se queda arriba al bajar. */
.hero-video--fijo.hv-js .hero-video__titulo-caja {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 10000; /* por encima de la cabecera fija de la página */
	pointer-events: none;
}

.hero-video--fijo.hv-js.is-sobre-pagina .hero-video__titulo {
	color: var(--hv-color-final) !important;
}

/* Entrada: el video se asienta y el texto sube suavemente. */
.hero-video--entrada .hero-video__medio {
	animation: hv-medio 2.2s var(--hv-curva) both;
}

.hero-video--entrada .hero-video__titulo {
	animation: hv-sube 1.6s var(--hv-curva) 0.15s both;
}

/* «backwards»: al terminar la entrada, el scroll vuelve a mandar sobre la opacidad del subtítulo. */
.hero-video--entrada .hero-video__subtitulo {
	animation: hv-sube 1.6s var(--hv-curva) 0.4s backwards;
}

@keyframes hv-medio {
	from { transform: scale(1.08); }
	to { transform: scale(1); }
}

@keyframes hv-sube {
	from { opacity: 0; transform: translateY(40px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hero-video .hero-video__medio,
	.hero-video .hero-video__titulo,
	.hero-video .hero-video__subtitulo,
	.hero-video__flecha {
		animation: none !important;
	}
}

@media (max-width: 767px) {
	.hero-video .hero-video__titulo {
		font-size: clamp(48px, 17vw, 96px);
	}

	.hero-video__logo {
		width: 220px;
	}
}
