/**
 * Intro — Video Intro Cinematografico.
 * CSS del front-end. Overlay a pantalla completa, responsive y accesible.
 */

/* ------------------------------------------------------------------ */
/* Overlay                                                             */
/* ------------------------------------------------------------------ */

.intecol-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000000;
	opacity: 1;
	visibility: visible;
	transition:
		opacity var(--intecol-fade-duration, 900ms) ease,
		visibility 0s linear 0ms;
	will-change: opacity;
}

/* Estado de salida: el controlador JS agrega .intecol-overlay--closing */
.intecol-overlay.intecol-overlay--closing {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* El overlay oculto (atributo hidden) no debe parpadear antes del arranque */
.intecol-overlay[hidden] {
	display: none;
}

/* Bloquea el scroll de la pagina mientras el intro esta visible */
html.intecol-lock,
html.intecol-lock body {
	overflow: hidden !important;
	height: 100% !important;
}

/* ------------------------------------------------------------------ */
/* Video                                                               */
/* ------------------------------------------------------------------ */

.intecol-video-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.intecol-video {
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	transform: translate(-50%, -50%);
	object-fit: cover;
	background: transparent;
	pointer-events: none; /* el video no captura toques: el overlay maneja todo */
}

/* iOS Safari: fuerza altura real de viewport al reproducir en linea */
@supports (-webkit-touch-callout: none) {
	.intecol-overlay {
		height: -webkit-fill-available;
	}
}

/* ------------------------------------------------------------------ */
/* Boton Saltar intro                                                  */
/* ------------------------------------------------------------------ */

.intecol-skip {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 2;
	padding: 12px 22px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1;
	cursor: pointer;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		transform 0.15s ease;
}

.intecol-skip:hover,
.intecol-skip:focus-visible {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.8);
}

.intecol-skip:active {
	transform: scale(0.96);
}

.intecol-skip:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

.intecol-skip[hidden] {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Puerta de bienvenida (creada por JS si el navegador bloquea audio)  */
/* ------------------------------------------------------------------ */

.intecol-gate {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: opacity 0.35s ease;
	will-change: opacity;
}

.intecol-gate--closing {
	opacity: 0;
	pointer-events: none;
}

.intecol-gate__logo {
	width: min(320px, 60vw);
	height: auto;
	margin-bottom: 8px;
	user-select: none;
	-webkit-user-drag: none;
}

.intecol-gate__title {
	color: #ffffff;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
	padding: 0 20px;
}

.intecol-gate__subtitle {
	color: rgba(255, 255, 255, 0.78);
	font-size: 14px;
	text-align: center;
	padding: 0 20px;
}

.intecol-gate:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: -6px;
}

@media (max-width: 640px) {
	.intecol-gate__logo {
		width: min(240px, 56vw);
	}

	.intecol-gate__title {
		font-size: 20px;
	}

	.intecol-gate__subtitle {
		font-size: 12px;
	}
}

/* ------------------------------------------------------------------ */
/* Responsive: tablets                                                 */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.intecol-skip {
		right: 18px;
		bottom: 18px;
		font-size: 13px;
		padding: 11px 20px;
	}
}

/* ------------------------------------------------------------------ */
/* Responsive: celulares                                               */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
	.intecol-skip {
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		font-size: 12px;
		padding: 10px 16px;
	}
}

/* ------------------------------------------------------------------ */
/* Accesibilidad                                                       */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.intecol-overlay {
		transition: none;
	}
}
