/*
 * RG Tecnoservice — Intro cinematográfico V1.1
 * Carga exclusiva desde rg-tecnoservice-intro.php.
 */

/* ============================================================
   NORMALIZACIÓN
   ============================================================ */

.rg-entry-intro,
.rg-entry-intro *,
.rg-entry-intro *::before,
.rg-entry-intro *::after {
	box-sizing: border-box;
}


/* ============================================================
   OVERLAY PRINCIPAL
   ============================================================ */

.rg-entry-intro {
	--rg-intro-blue: #061f43;
	--rg-intro-blue-deep: #03142d;
	--rg-intro-green: #159447;
	--rg-intro-green-hover: #19ad52;
	--rg-intro-green-light: #62e18c;

	position: fixed;
	z-index: 2147483000;
	inset: 0;

	display: none;
	width: 100%;
	height: 100%;
	height: 100dvh;

	overflow: hidden;
	color: #ffffff;

	background:
		radial-gradient(
			circle at 50% 50%,
			rgba(20, 87, 166, 0.34),
			transparent 54%
		),
		linear-gradient(
			145deg,
			var(--rg-intro-blue) 0%,
			var(--rg-intro-blue-deep) 100%
		);

	opacity: 1;
	visibility: visible;
}

html.rg-entry-intro-is-open .rg-entry-intro {
	display: grid;
	place-items: center;
}

.rg-entry-intro.is-closing {
	opacity: 0;
	pointer-events: none;

	transition:
		opacity 0.72s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   CUADRÍCULA TÉCNICA
   ============================================================ */

.rg-entry-intro::before {
	content: "";

	position: absolute;
	z-index: 0;
	inset: 0;

	opacity: 0.18;

	background-image:
		linear-gradient(
			rgba(255, 255, 255, 0.07) 1px,
			transparent 1px
		),
		linear-gradient(
			90deg,
			rgba(255, 255, 255, 0.07) 1px,
			transparent 1px
		);

	background-size: 80px 80px;
	pointer-events: none;
}

.rg-entry-intro::after {
	content: "";

	position: absolute;
	z-index: 2;
	inset: 0;

	background:
		linear-gradient(
			180deg,
			rgba(1, 10, 24, 0.12) 0%,
			transparent 28%,
			transparent 68%,
			rgba(1, 10, 24, 0.30) 100%
		);

	pointer-events: none;
}


/* ============================================================
   ESCENARIO Y VIDEO
   ============================================================ */

.rg-entry-intro__stage {
	position: absolute;
	z-index: 1;
	inset: 0;

	display: grid;
	place-items: center;
	overflow: hidden;
}

.rg-entry-intro__video {
	display: block;
	width: 100%;
	height: 100%;

	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;

	object-fit: cover;
	object-position: center;

	opacity: 0;
	transform: scale(1.018);
	background: transparent;

	transition:
		opacity 0.42s ease,
		transform 1.05s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.rg-entry-intro.is-video-visible .rg-entry-intro__video {
	opacity: 1;
	transform: scale(1);
}


/* ============================================================
   LOADER
   ============================================================ */

.rg-entry-intro__loader {
	position: absolute;
	z-index: 4;
	top: 50%;
	left: 50%;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 15px;

	color: rgba(255, 255, 255, 0.82);
	transform: translate(-50%, -50%);

	transition:
		opacity 0.32s ease,
		visibility 0.32s ease;
}

.rg-entry-intro.is-video-visible .rg-entry-intro__loader {
	opacity: 0;
	visibility: hidden;
}

.rg-entry-intro__loader-mark {
	display: block;
	width: 44px;
	height: 44px;

	border: 2px solid rgba(255, 255, 255, 0.13);
	border-top-color: var(--rg-intro-green-light);
	border-radius: 50%;

	animation:
		rg-entry-intro-spin 0.85s linear infinite;
}

.rg-entry-intro__loader-text {
	font-family:
		var(--rg-font-title, "Kumbh Sans", Arial, sans-serif);

	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}


/* ============================================================
   CONTROLES SUPERIORES
   ============================================================ */

.rg-entry-intro .rg-entry-intro__controls {
	position: fixed !important;
	z-index: 2147483646 !important;

	top: max(22px, env(safe-area-inset-top)) !important;
	right: max(24px, env(safe-area-inset-right)) !important;
	bottom: auto !important;
	left: auto !important;

	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;

	width: auto !important;
	height: auto !important;
	gap: 10px !important;

	margin: 0 !important;
	padding: 0 !important;
	transform: none !important;
	pointer-events: auto;
}

.rg-entry-intro .rg-entry-intro__controls button {
	-webkit-appearance: none !important;
	appearance: none !important;

	position: relative !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	float: none !important;

	margin: 0 !important;

	font-family:
		var(--rg-font-title, "Kumbh Sans", Arial, sans-serif) !important;

	cursor: pointer !important;

	transition:
		color 0.25s ease,
		background-color 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.25s ease,
		transform 0.25s ease !important;
}


/* ============================================================
   BOTÓN DE SONIDO
   ============================================================ */

.rg-entry-intro .rg-entry-intro__sound {
	display: inline-grid !important;
	flex: 0 0 44px !important;

	width: 44px !important;
	min-width: 44px !important;
	max-width: 44px !important;
	height: 44px !important;
	min-height: 44px !important;
	max-height: 44px !important;

	padding: 0 !important;
	place-items: center !important;

	border: 1px solid rgba(255, 255, 255, 0.28) !important;
	border-radius: 50% !important;

	color: rgba(255, 255, 255, 0.94) !important;
	background: rgba(3, 22, 48, 0.50) !important;

	box-shadow:
		0 10px 28px rgba(1, 10, 24, 0.16) !important;

	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	line-height: 0 !important;
}

.rg-entry-intro .rg-entry-intro__sound:hover,
.rg-entry-intro .rg-entry-intro__sound:focus-visible {
	color: #ffffff !important;
	border-color: rgba(98, 225, 140, 0.72) !important;
	background: rgba(16, 145, 62, 0.86) !important;

	box-shadow:
		0 13px 30px rgba(1, 10, 24, 0.26),
		0 0 23px rgba(80, 224, 130, 0.17) !important;

	transform: translateY(-2px);
}

.rg-entry-intro .rg-entry-intro__sound:focus-visible {
	outline: 2px solid #ffffff !important;
	outline-offset: 3px !important;
}

.rg-entry-intro__sound-icon {
	width: 20px;
	height: 20px;

	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.rg-entry-intro__sound-icon--active {
	display: none;
}

.rg-entry-intro__sound[aria-pressed="true"]
.rg-entry-intro__sound-icon--muted {
	display: none;
}

.rg-entry-intro__sound[aria-pressed="true"]
.rg-entry-intro__sound-icon--active {
	display: block;
}


/* ============================================================
   BOTÓN OMITIR
   ============================================================ */

.rg-entry-intro .rg-entry-intro__skip {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 auto !important;

	width: auto !important;
	min-width: 108px !important;
	max-width: none !important;
	height: 44px !important;
	min-height: 44px !important;
	max-height: 44px !important;

	gap: 9px !important;
	padding: 0 17px !important;

	border: 1px solid rgba(255, 255, 255, 0.28) !important;
	border-radius: 999px !important;

	color: rgba(255, 255, 255, 0.96) !important;
	background: rgba(16, 145, 62, 0.88) !important;

	box-shadow:
		0 10px 28px rgba(1, 10, 24, 0.18) !important;

	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);

	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0.045em !important;
	text-transform: uppercase !important;
	white-space: nowrap !important;
}

.rg-entry-intro .rg-entry-intro__skip:hover,
.rg-entry-intro .rg-entry-intro__skip:focus-visible {
	color: #ffffff !important;
	border-color: rgba(98, 225, 140, 0.76) !important;
	background: var(--rg-intro-green-hover) !important;

	box-shadow:
		0 14px 31px rgba(1, 10, 24, 0.27),
		0 0 25px rgba(80, 224, 130, 0.18) !important;

	transform: translateY(-2px);
}

.rg-entry-intro .rg-entry-intro__skip:focus-visible {
	outline: 2px solid #ffffff !important;
	outline-offset: 3px !important;
}

.rg-entry-intro__skip span {
	display: inline-block;
	margin: 0;
	padding: 0;
	line-height: 1;
}

.rg-entry-intro__skip svg {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;

	margin: 0;
	padding: 0;

	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}


/* ============================================================
   BARRA DE PROGRESO
   ============================================================ */

.rg-entry-intro__progress {
	position: absolute;
	z-index: 7;
	right: 0;
	bottom: 0;
	left: 0;

	height: 3px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
}

.rg-entry-intro__progress-bar {
	display: block;
	width: 100%;
	height: 100%;

	background:
		linear-gradient(
			90deg,
			#0b8f37,
			var(--rg-intro-green-light)
		);

	box-shadow:
		0 0 14px rgba(98, 225, 140, 0.46);

	transform: scaleX(0);
	transform-origin: left center;
	will-change: transform;
}


/* ============================================================
   ANIMACIÓN
   ============================================================ */

@keyframes rg-entry-intro-spin {
	to {
		transform: rotate(360deg);
	}
}


/* ============================================================
   MÓVIL
   ============================================================ */

@media (max-width: 767.98px) {
	.rg-entry-intro::before {
		background-size: 64px 64px;
	}

	.rg-entry-intro .rg-entry-intro__controls {
		top: max(16px, env(safe-area-inset-top)) !important;
		right: max(16px, env(safe-area-inset-right)) !important;
		gap: 8px !important;
	}

	.rg-entry-intro .rg-entry-intro__sound {
		flex-basis: 40px !important;
		width: 40px !important;
		min-width: 40px !important;
		max-width: 40px !important;
		height: 40px !important;
		min-height: 40px !important;
		max-height: 40px !important;
	}

	.rg-entry-intro .rg-entry-intro__skip {
		min-width: 96px !important;
		height: 40px !important;
		min-height: 40px !important;
		max-height: 40px !important;
		padding-inline: 14px !important;
		font-size: 10px !important;
	}

	.rg-entry-intro__sound-icon {
		width: 18px;
		height: 18px;
	}

	.rg-entry-intro__skip svg {
		width: 15px;
		height: 15px;
	}
}

@media (max-width: 380px) {
	.rg-entry-intro .rg-entry-intro__controls {
		right: 12px !important;
		gap: 7px !important;
	}

	.rg-entry-intro .rg-entry-intro__skip {
		min-width: 88px !important;
		padding-inline: 12px !important;
	}
}


/* ============================================================
   MOVIMIENTO REDUCIDO
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.rg-entry-intro {
		display: none !important;
	}

	html.rg-entry-intro-pending body > * {
		visibility: visible !important;
	}

	html.rg-entry-intro-is-open,
	html.rg-entry-intro-is-open body {
		overflow: auto !important;
	}
}