/**
 * Bloque Hero Section
 * 
 * Hero section contenido con video de fondo, overlay y contenido centrado.
 * Ancho máximo limitado, bordes redondeados y márgenes laterales responsivos.
 * Incluye título en Sofia Sans extrabold, subtítulo en DM Sans y CTAs.
 * 
 * @package Vitruve_Custom_Theme
 */

@import '../styles/design-tokens.css';

/**
 * CONTENEDOR PRINCIPAL
 * Hero contenido con ancho máximo, bordes redondeados y márgenes responsivos.
 * Usa left + transform para centrarse respecto al viewport, rompiendo
 * cualquier restricción del contenedor padre (ej: .vb-container).
 * Alineado con el header (--container-max-width: 1400px).
 */
.vitruve-hero-section {
	position: relative;
	width: calc(100vw - clamp(1rem, 2vw, 3rem));
	max-width: var(--container-max-width);
	height: 80vh;
	min-height: 500px;
	max-height: 800px;
	/* Centrar respecto al viewport independiente del padre */
	left: 50%;
	transform: translateX(-50%);
	margin-top: var(--space-3);
	margin-bottom: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--color-neutral-900);
	border-radius: var(--radius-3xl);
}

/**
 * VIDEO BACKGROUND
 * z-index: 1 (capa más baja)
 * Ocupa todo el ancho del contenedor hero (recortado por border-radius del padre)
 */
.vitruve-hero-section__video-wrapper {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	overflow: hidden;
	margin: 0 !important;
	padding: 0 !important;
}

.vitruve-hero-section__video {
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	transform: translate(-50%, -50%);
	object-fit: cover;
	object-position: center;
	margin: 0 !important;
	padding: 0 !important;
	display: block;
}

/**
 * OVERLAY
 * z-index: 2 (capa intermedia, encima del video)
 */
.vitruve-hero-section__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.55);
	z-index: 2;
	pointer-events: none;
	margin: 0 !important;
	padding: 0 !important;
}

/**
 * CONTENIDO
 * z-index: 3 (capa superior)
 */
.vitruve-hero-section__content {
	position: relative;
	z-index: 3;
	width: 100%;
	padding: 0 clamp(var(--space-6), 5vw, var(--space-16));
	text-align: left;
}

.vitruve-hero-section__inner {
	max-width: 900px;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-8);
}

/**
 * TÍTULO PRINCIPAL
 * Sofia Sans Extra Bold
 */
.vitruve-hero-section__title {
	font-family: var(--font-heading);
	font-size: clamp(2.75rem, 7vw, 5rem);
	font-weight: var(--font-extrabold);
	line-height: 1.1;
	color: var(--text-primary);
	margin: 0;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

/**
 * SUBTÍTULO / TAGLINE
 * DM Sans Regular/Medium
 */
.vitruve-hero-section__subtitle {
	font-family: var(--font-sans);
	font-size: clamp(1rem, 2.5vw, 1.375rem);
	font-weight: var(--font-normal);
	line-height: 1.6;
	color: var(--text-secondary);
	margin: 0;
	text-wrap: balance;
}

/**
 * ACCIONES (BOTONES CTA)
 */
.vitruve-hero-section__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-4);
	justify-content: flex-start;
	align-items: center;
}

.vitruve-hero-section__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-lg);
	padding: var(--space-2) var(--space-6);
	font-family: var(--font-sans);
	font-size: var(--text-base);
	font-weight: var(--font-semibold);
	text-decoration: none;
	transition:
		transform 0.2s ease,
		background 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease;
	cursor: pointer;
	white-space: nowrap;
}

/**
 * CTA SECUNDARIO
 * Outline style, similar al header
 */
.vitruve-hero-section__cta--secondary {
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.3);
	color: var(--text-primary);
}

.vitruve-hero-section__cta--secondary:hover,
.vitruve-hero-section__cta--secondary:focus-visible {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/**
 * CTA PRIMARIO
 * Filled style con color primary
 */
.vitruve-hero-section__cta--primary {
	background: var(--color-primary);
	border: 2px solid var(--color-primary);
	color: var(--color-white);
}

.vitruve-hero-section__cta--primary:hover,
.vitruve-hero-section__cta--primary:focus-visible {
	transform: translateY(-2px);
	background: var(--color-primary-600);
	border-color: var(--color-primary-600);
	box-shadow: 0 4px 20px rgba(102, 68, 255, 0.4);
}

/**
 * FOCUS VISIBLE (ACCESIBILIDAD)
 */
.vitruve-hero-section__cta:focus-visible {
	outline: 3px solid rgba(102, 68, 255, 0.5);
	outline-offset: 3px;
}

/**
 * TEXTO CON GRADIENTE
 * 
 * Las clases de gradiente de texto se definen globalmente en:
 * /src/styles/design-tokens.css
 * 
 * USO en el campo ACF "Título Principal":
 * <span class="gradient-text">texto</span> → Purple a Turquoise (Signature Vitruve)
 * <span class="gradient-text--primary">texto</span> → Purple a Lila
 * <span class="gradient-text--secondary">texto</span> → Turquoise a Yellow
 * <span class="gradient-text--accent">texto</span> → Yellow a Purple
 * <span class="gradient-text--white">texto</span> → White a Turquoise
 * 
 * También disponibles con prefijo .vb-gradient-text
 */

/**
 * RESPONSIVE - TABLETS
 */
@media (max-width: 1024px) {
	.vitruve-hero-section {
		height: 75vh;
		min-height: 450px;
		max-height: 700px;
		border-radius: var(--radius-2xl);
	}

	.vitruve-hero-section__content {
		padding: 0 var(--space-8);
	}

	.vitruve-hero-section__inner {
		gap: var(--space-6);
	}

	.vitruve-hero-section__title {
		font-size: clamp(2rem, 5vw, 3.5rem);
	}

	.vitruve-hero-section__subtitle {
		font-size: clamp(0.95rem, 2vw, 1.25rem);
	}

	.vitruve-hero-section__cta {
		padding: var(--space-3) var(--space-6);
		font-size: var(--text-sm);
	}
}

/**
 * RESPONSIVE - MOBILE
 */
@media (max-width: 640px) {
	.vitruve-hero-section {
		width: calc(100vw - 1rem);
		height: 70svh; /* Safari mobile viewport fix */
		min-height: 400px;
		max-height: 600px;
		margin-top: var(--space-2);
		border-radius: var(--radius-xl);
	}

	.vitruve-hero-section__content {
		padding: 0 var(--space-5);
	}

	.vitruve-hero-section__inner {
		gap: var(--space-5);
	}

	.vitruve-hero-section__title {
		font-size: clamp(1.75rem, 8vw, 2.5rem);
		letter-spacing: -0.01em;
	}

	.vitruve-hero-section__subtitle {
		font-size: clamp(0.9rem, 4vw, 1.125rem);
		line-height: 1.5;
	}

	.vitruve-hero-section__actions {
		flex-direction: column;
		width: 100%;
		gap: var(--space-3);
	}

	.vitruve-hero-section__cta {
		width: 100%;
		max-width: 300px;
		padding: var(--space-3) var(--space-5);
		font-size: var(--text-sm);
	}

	/* Ajuste del overlay para mejor legibilidad en mobile */
	.vitruve-hero-section__overlay {
		background-color: rgba(0, 0, 0, 0.65);
	}
}

/**
 * ANIMACIÓN DE ENTRADA (OPCIONAL)
 * Se puede activar con JS o CSS animation
 */
@media (prefers-reduced-motion: no-preference) {
	.vitruve-hero-section__title,
	.vitruve-hero-section__subtitle,
	.vitruve-hero-section__actions {
		animation: fadeInUp 0.8s ease-out backwards;
	}

	.vitruve-hero-section__subtitle {
		animation-delay: 0.2s;
	}

	.vitruve-hero-section__actions {
		animation-delay: 0.4s;
	}

	@keyframes fadeInUp {
		from {
			opacity: 0;
			transform: translateY(20px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

/**
 * REDUCCIÓN DE MOVIMIENTO (ACCESIBILIDAD)
 */
@media (prefers-reduced-motion: reduce) {
	.vitruve-hero-section__cta {
		transition: none;
	}

	.vitruve-hero-section__cta:hover,
	.vitruve-hero-section__cta:focus-visible {
		transform: none;
	}
}

