.tsfx-hero-wrapper {
	--tsfx-bg-size: 120px;
	--tsfx-img-size: 360px;
	--tsfx-letter-spacing: 4px;
	--tsfx-outline-width: 2px;
	--tsfx-cta-height: 60px;
	--tsfx-safe-bottom: 50px;
	--tsfx-word-color: #ffffff;
	--tsfx-font: sans-serif;
	--tsfx-font-style: normal;
	--tsfx-transition: 600ms;
	--tsfx-transition-fast: 200ms;

	position: relative;
	height: 100vh;
	overflow: hidden;

	display: grid;
	grid-template-rows: 1fr var(--tsfx-cta-height);

	background: #ff6f00;
	transition: background 0.8s ease;
	font-family: var(--tsfx-font);
}

/* STAGE (centro: palabras + imagen) */
.tsfx-hero-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-bottom: 10px;
}

/* FONDO PALABRAS */
.tsfx-hero-bg {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2vh;
	pointer-events: none;
	z-index: 1;
}

.tsfx-bg-line {
	font-size: var(--tsfx-bg-size);
	font-weight: 900;
	font-style: var(--tsfx-font-style);
	letter-spacing: var(--tsfx-letter-spacing);
	line-height: 0.9;
	white-space: nowrap;

	/* Efecto "cortina hacia abajo": la palabra no se mueve de sitio, se
	   tapa/destapa de arriba hacia abajo con una línea de recorte animada. */
	clip-path: inset(0% 0 0 0);
	-webkit-clip-path: inset(0% 0 0 0);
	transition: clip-path var(--tsfx-transition) linear,
		-webkit-clip-path var(--tsfx-transition) linear;
}

/* Estado "oculto": la línea de recorte ha bajado hasta tapar toda la palabra */
.tsfx-bg-line.tsfx-line-hidden {
	clip-path: inset(100% 0 0 0);
	-webkit-clip-path: inset(100% 0 0 0);
}

/* Al aparecer usamos una transición más rápida que al esconderse */
.tsfx-bg-line.tsfx-fast,
.tsfx-hero-image.tsfx-fast {
	transition-duration: var(--tsfx-transition-fast) !important;
}

.tsfx-bg-line.solid {
	color: var(--tsfx-word-color);
}

.tsfx-bg-line.outline {
	color: transparent;
	-webkit-text-stroke: var(--tsfx-outline-width) var(--tsfx-word-color);
	text-stroke: var(--tsfx-outline-width) var(--tsfx-word-color);
}

/* IMAGEN: mismo patrón secuencial, con fundido de opacidad */
.tsfx-hero-image {
	width: var(--tsfx-img-size);
	max-width: 90vw;
	height: auto;
	z-index: 2;
	opacity: 1;
	transition: opacity var(--tsfx-transition) linear;
}

.tsfx-hero-image.tsfx-img-hidden {
	opacity: 0;
}

/* CTA: pegado abajo y centrado */
.tsfx-hero-cta {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: var(--tsfx-safe-bottom);
	z-index: 3;
}

/* BOTÓN */
.tsfx-hero-btn {
	padding: 16px 34px;
	border: 3px solid var(--tsfx-word-color);
	border-radius: 10px;

	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.5px;

	color: var(--tsfx-word-color);
	background: transparent;
	text-decoration: none;
	transition: all .25s ease;
	white-space: nowrap;
}

.tsfx-hero-btn:hover {
	background: var(--tsfx-word-color);
	color: #005941;
}

/* Respeta a usuarios que prefieren menos movimiento: cambios instantáneos */
@media (prefers-reduced-motion: reduce) {
	.tsfx-bg-line,
	.tsfx-hero-image {
		transition: none !important;
	}
}

/* Pantallas bajas: evita que el botón quede demasiado pegado */
@media (max-height: 780px) {
	.tsfx-hero-wrapper {
		--tsfx-cta-height: 105px;
		--tsfx-safe-bottom: 22px;
	}
}
