/* Atmósferas por servicio — parallax, ken burns y capas sutiles */

.service-fx {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	overflow: hidden;
	isolation: isolate;
}

.service-fx__veil,
.service-fx__orb,
.service-fx__radar,
.service-fx__scan,
.service-fx__blueprint,
.service-fx__beam,
.service-fx__frame,
.service-fx__flow,
.service-fx__streak,
.service-fx__nodes,
.service-fx__shard,
.service-fx__glow {
	position: absolute;
	pointer-events: none;
}

/* —— Banner vivo (ken burns + parallax) —— */

.service-hero__banner--live {
	isolation: isolate;
}

.service-hero__banner--live .service-fx-banner-media {
	inset: -8%;
	width: auto;
	height: auto;
	opacity: 0.48;
	transform:
		translate3d(calc(var(--fx-mx, 0) * -12px), calc(var(--fx-my, 0) * -8px + var(--fx-sy, 0) * 28px), 0)
		scale(1.14);
	will-change: transform;
	transition: opacity 0.6s ease;
}

.service-hero__banner--live .service-fx-banner-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform-origin: center center;
	animation: service-fx-kenburns 28s ease-in-out infinite alternate;
}

.service-fx-banner-shade {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		105deg,
		rgba(5, 8, 15, 0.18) 0%,
		transparent 45%,
		rgba(56, 189, 248, 0.12) 100%
	);
	mix-blend-mode: soft-light;
}

@keyframes service-fx-kenburns {
	0% {
		transform: scale(1) translate3d(0, 0, 0);
	}
	100% {
		transform: scale(1.12) translate3d(-2.5%, 1.5%, 0);
	}
}

/* —— Continuidad y seguridad cloud: radar / vigilancia —— */

body.service-page--fx-continuidad-seguridad-cloud .pan-overlay {
	background:
		radial-gradient(ellipse 70% 55% at 78% 28%, rgba(56, 189, 248, 0.16), transparent 60%),
		rgba(0, 6, 14, 0.78);
}

body.service-page--fx-continuidad-seguridad-cloud .service-fx__veil {
	inset: 0;
	background:
		radial-gradient(circle at 18% 82%, rgba(255, 102, 0, 0.07), transparent 42%),
		radial-gradient(circle at 70% 20%, rgba(56, 189, 248, 0.1), transparent 48%);
	transform: translate3d(calc(var(--fx-mx, 0) * 10px), calc(var(--fx-my, 0) * 8px), 0);
}

body.service-page--fx-continuidad-seguridad-cloud .service-fx__orb {
	border-radius: 50%;
	filter: blur(48px);
	opacity: 0.55;
}

body.service-page--fx-continuidad-seguridad-cloud .service-fx__orb--a {
	top: 8%;
	right: 6%;
	width: min(42vw, 28rem);
	height: min(42vw, 28rem);
	background: rgba(56, 189, 248, 0.28);
	animation: service-fx-breathe 9s ease-in-out infinite;
	transform: translate3d(calc(var(--fx-mx, 0) * -18px), calc(var(--fx-my, 0) * -12px), 0);
}

body.service-page--fx-continuidad-seguridad-cloud .service-fx__orb--b {
	bottom: 10%;
	left: 4%;
	width: min(36vw, 22rem);
	height: min(36vw, 22rem);
	background: rgba(14, 165, 233, 0.18);
	animation: service-fx-breathe 11s ease-in-out infinite reverse;
	transform: translate3d(calc(var(--fx-mx, 0) * 14px), calc(var(--fx-my, 0) * 16px), 0);
}

body.service-page--fx-continuidad-seguridad-cloud .service-fx__radar {
	top: 12%;
	right: 8%;
	width: min(52vw, 34rem);
	height: min(52vw, 34rem);
	border-radius: 50%;
	border: 1px solid rgba(56, 189, 248, 0.22);
	box-shadow:
		inset 0 0 0 1px rgba(56, 189, 248, 0.06),
		0 0 40px rgba(56, 189, 248, 0.08);
	opacity: 0;
	transform: translate3d(calc(var(--fx-mx, 0) * -10px), calc(var(--fx-my, 0) * -6px), 0) scale(0.55);
	animation: service-fx-radar 7.5s cubic-bezier(0.22, 0.7, 0.25, 1) infinite;
}

body.service-page--fx-continuidad-seguridad-cloud .service-fx__radar--delay {
	animation-delay: 2.5s;
	border-color: rgba(255, 102, 0, 0.2);
}

body.service-page--fx-continuidad-seguridad-cloud .service-fx__scan {
	left: -10%;
	right: -10%;
	height: 18%;
	top: -20%;
	background: linear-gradient(
		180deg,
		transparent,
		rgba(56, 189, 248, 0.07),
		transparent
	);
	animation: service-fx-scan 10s linear infinite;
}

body.service-page--fx-continuidad-seguridad-cloud .service-hero__banner--live .service-fx-banner-media img {
	animation-name: service-fx-kenburns-secure;
	animation-duration: 32s;
}

@keyframes service-fx-kenburns-secure {
	0% {
		transform: scale(1.05) translate3d(1%, 0, 0);
	}
	100% {
		transform: scale(1.18) translate3d(-3%, 2%, 0);
	}
}

@keyframes service-fx-radar {
	0% {
		opacity: 0.55;
		transform: translate3d(calc(var(--fx-mx, 0) * -10px), calc(var(--fx-my, 0) * -6px), 0) scale(0.45);
	}
	70% {
		opacity: 0.12;
	}
	100% {
		opacity: 0;
		transform: translate3d(calc(var(--fx-mx, 0) * -10px), calc(var(--fx-my, 0) * -6px), 0) scale(1.25);
	}
}

@keyframes service-fx-scan {
	0% {
		top: -25%;
	}
	100% {
		top: 110%;
	}
}

@keyframes service-fx-breathe {
	0%,
	100% {
		opacity: 0.4;
		filter: blur(48px);
	}
	50% {
		opacity: 0.72;
		filter: blur(36px);
	}
}

/* —— Modernización: blueprint / estructura —— */

body.service-page--fx-modernizacion-infraestructura .pan-overlay {
	background:
		linear-gradient(135deg, rgba(8, 18, 32, 0.55), rgba(0, 0, 0, 0.35)),
		rgba(0, 5, 12, 0.76);
}

body.service-page--fx-modernizacion-infraestructura .service-fx__veil {
	inset: 0;
	background:
		radial-gradient(ellipse at 20% 30%, rgba(56, 189, 248, 0.1), transparent 50%),
		radial-gradient(ellipse at 85% 70%, rgba(255, 102, 0, 0.08), transparent 45%);
}

body.service-page--fx-modernizacion-infraestructura .service-fx__blueprint {
	inset: -20%;
	opacity: 0.35;
	background-image:
		linear-gradient(rgba(56, 189, 248, 0.18) 1px, transparent 1px),
		linear-gradient(90deg, rgba(56, 189, 248, 0.18) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 20%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 20%, transparent 75%);
}

body.service-page--fx-modernizacion-infraestructura .service-fx__blueprint--far {
	background-size: 72px 72px;
	opacity: 0.22;
	animation: service-fx-grid-drift 48s linear infinite;
	transform: translate3d(calc(var(--fx-mx, 0) * 8px), calc(var(--fx-my, 0) * 6px + var(--fx-sy, 0) * -40px), 0);
}

body.service-page--fx-modernizacion-infraestructura .service-fx__blueprint--near {
	background-size: 36px 36px;
	opacity: 0.28;
	animation: service-fx-grid-drift 28s linear infinite reverse;
	transform: translate3d(calc(var(--fx-mx, 0) * -16px), calc(var(--fx-my, 0) * -12px + var(--fx-sy, 0) * -70px), 0);
}

body.service-page--fx-modernizacion-infraestructura .service-fx__beam {
	width: 140%;
	height: 1px;
	left: -20%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(56, 189, 248, 0.45),
		rgba(255, 102, 0, 0.35),
		transparent
	);
	opacity: 0.35;
	filter: blur(0.4px);
}

body.service-page--fx-modernizacion-infraestructura .service-fx__beam--a {
	top: 28%;
	transform: rotate(-18deg) translate3d(calc(var(--fx-mx, 0) * 20px), 0, 0);
	animation: service-fx-beam-pulse 6s ease-in-out infinite;
}

body.service-page--fx-modernizacion-infraestructura .service-fx__beam--b {
	top: 62%;
	transform: rotate(12deg) translate3d(calc(var(--fx-mx, 0) * -24px), 0, 0);
	animation: service-fx-beam-pulse 8s ease-in-out infinite reverse;
	opacity: 0.25;
}

body.service-page--fx-modernizacion-infraestructura .service-fx__frame {
	inset: 8% 6%;
	border: 1px solid rgba(56, 189, 248, 0.12);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
	opacity: 0.5;
	transform: translate3d(calc(var(--fx-mx, 0) * 6px), calc(var(--fx-my, 0) * 6px), 0);
}

body.service-page--fx-modernizacion-infraestructura .service-fx__frame::before,
body.service-page--fx-modernizacion-infraestructura .service-fx__frame::after {
	content: "";
	position: absolute;
	width: 2.5rem;
	height: 2.5rem;
	border-color: rgba(255, 102, 0, 0.55);
	border-style: solid;
}

body.service-page--fx-modernizacion-infraestructura .service-fx__frame::before {
	top: -1px;
	left: -1px;
	border-width: 2px 0 0 2px;
}

body.service-page--fx-modernizacion-infraestructura .service-fx__frame::after {
	right: -1px;
	bottom: -1px;
	border-width: 0 2px 2px 0;
}

body.service-page--fx-modernizacion-infraestructura .service-hero__banner--live .service-fx-banner-media img {
	animation-name: service-fx-kenburns-infra;
	animation-duration: 26s;
}

@keyframes service-fx-kenburns-infra {
	0% {
		transform: scale(1.08) translate3d(0, 0, 0);
	}
	100% {
		transform: scale(1.2) translate3d(-4%, -1.5%, 0);
	}
}

@keyframes service-fx-grid-drift {
	0% {
		background-position: 0 0;
	}
	100% {
		background-position: 72px 72px;
	}
}

@keyframes service-fx-beam-pulse {
	0%,
	100% {
		opacity: 0.15;
	}
	50% {
		opacity: 0.45;
	}
}

/* —— Automatización: flujo / nodos —— */

body.service-page--fx-automatizacion-de-procesos .pan-overlay {
	background:
		radial-gradient(ellipse 60% 50% at 30% 60%, rgba(56, 189, 248, 0.14), transparent 55%),
		rgba(2, 8, 16, 0.78);
}

body.service-page--fx-automatizacion-de-procesos .service-fx__veil {
	inset: 0;
	background: linear-gradient(
		120deg,
		rgba(56, 189, 248, 0.06),
		transparent 40%,
		rgba(255, 102, 0, 0.05) 70%,
		transparent
	);
	transform: translate3d(calc(var(--fx-mx, 0) * 12px), calc(var(--fx-sy, 0) * -30px), 0);
}

body.service-page--fx-automatizacion-de-procesos .service-fx__flow {
	inset: -10%;
	opacity: 0.4;
	background:
		repeating-linear-gradient(
			-18deg,
			transparent 0,
			transparent 46px,
			rgba(56, 189, 248, 0.07) 46px,
			rgba(56, 189, 248, 0.07) 47px
		);
	mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
	animation: service-fx-flow-slide 22s linear infinite;
	transform: translate3d(calc(var(--fx-mx, 0) * -20px), calc(var(--fx-my, 0) * 10px), 0);
}

body.service-page--fx-automatizacion-de-procesos .service-fx__streak {
	height: 2px;
	width: 42%;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(56, 189, 248, 0.65),
		rgba(255, 255, 255, 0.35),
		transparent
	);
	filter: blur(1px);
	opacity: 0;
	animation: service-fx-streak 5.5s ease-in-out infinite;
}

body.service-page--fx-automatizacion-de-procesos .service-fx__streak--a {
	top: 24%;
	left: -10%;
	animation-delay: 0s;
}

body.service-page--fx-automatizacion-de-procesos .service-fx__streak--b {
	top: 48%;
	left: -10%;
	width: 55%;
	animation-delay: 1.8s;
	animation-duration: 6.5s;
}

body.service-page--fx-automatizacion-de-procesos .service-fx__streak--c {
	top: 72%;
	left: -10%;
	width: 38%;
	animation-delay: 3.2s;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 102, 0, 0.55),
		rgba(255, 255, 255, 0.25),
		transparent
	);
}

body.service-page--fx-automatizacion-de-procesos .service-fx__nodes {
	inset: 0;
}

body.service-page--fx-automatizacion-de-procesos .service-fx__nodes span {
	position: absolute;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #38bdf8;
	box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
	opacity: 0.55;
	animation: service-fx-node-float 9s ease-in-out infinite;
}

body.service-page--fx-automatizacion-de-procesos .service-fx__nodes span:nth-child(1) {
	top: 18%;
	left: 12%;
	animation-delay: 0s;
}
body.service-page--fx-automatizacion-de-procesos .service-fx__nodes span:nth-child(2) {
	top: 32%;
	left: 48%;
	animation-delay: 1.1s;
}
body.service-page--fx-automatizacion-de-procesos .service-fx__nodes span:nth-child(3) {
	top: 55%;
	left: 28%;
	animation-delay: 2s;
	background: #ff6600;
	box-shadow: 0 0 12px rgba(255, 102, 0, 0.65);
}
body.service-page--fx-automatizacion-de-procesos .service-fx__nodes span:nth-child(4) {
	top: 42%;
	left: 72%;
	animation-delay: 0.6s;
}
body.service-page--fx-automatizacion-de-procesos .service-fx__nodes span:nth-child(5) {
	top: 68%;
	left: 58%;
	animation-delay: 2.8s;
}
body.service-page--fx-automatizacion-de-procesos .service-fx__nodes span:nth-child(6) {
	top: 78%;
	left: 18%;
	animation-delay: 1.5s;
	background: #ff6600;
	box-shadow: 0 0 12px rgba(255, 102, 0, 0.65);
}

body.service-page--fx-automatizacion-de-procesos .service-hero__banner--live .service-fx-banner-media {
	transform:
		translate3d(calc(var(--fx-mx, 0) * -18px + var(--fx-sy, 0) * -40px), calc(var(--fx-my, 0) * -6px), 0)
		scale(1.16);
}

body.service-page--fx-automatizacion-de-procesos .service-hero__banner--live .service-fx-banner-media img {
	animation-name: service-fx-kenburns-flow;
	animation-duration: 24s;
}

@keyframes service-fx-kenburns-flow {
	0% {
		transform: scale(1.06) translate3d(2%, 0, 0);
	}
	100% {
		transform: scale(1.16) translate3d(-5%, 1%, 0);
	}
}

@keyframes service-fx-flow-slide {
	0% {
		background-position: 0 0;
	}
	100% {
		background-position: 120px 40px;
	}
}

@keyframes service-fx-streak {
	0% {
		opacity: 0;
		transform: translate3d(-8%, 0, 0);
	}
	15% {
		opacity: 0.7;
	}
	55% {
		opacity: 0.35;
	}
	100% {
		opacity: 0;
		transform: translate3d(85%, 0, 0);
	}
}

@keyframes service-fx-node-float {
	0%,
	100% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 0.35;
	}
	50% {
		transform: translate3d(12px, -18px, 0) scale(1.25);
		opacity: 0.85;
	}
}

/* —— Desarrollo web: profundidad / composición —— */

body.service-page--fx-desarrollo-web-y-aplicaciones .pan-overlay {
	background:
		radial-gradient(ellipse 55% 45% at 70% 25%, rgba(255, 102, 0, 0.1), transparent 55%),
		radial-gradient(ellipse 50% 40% at 20% 75%, rgba(56, 189, 248, 0.12), transparent 50%),
		rgba(4, 7, 14, 0.76);
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__veil {
	inset: 0;
	background: linear-gradient(
		160deg,
		rgba(255, 255, 255, 0.03),
		transparent 35%,
		rgba(56, 189, 248, 0.05)
	);
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__orb--warm,
body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__orb--cool {
	border-radius: 50%;
	filter: blur(56px);
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__orb--warm {
	top: 6%;
	right: 4%;
	width: min(48vw, 30rem);
	height: min(48vw, 30rem);
	background: rgba(255, 102, 0, 0.2);
	animation: service-fx-breathe 12s ease-in-out infinite;
	transform: translate3d(calc(var(--fx-mx, 0) * -22px), calc(var(--fx-my, 0) * -10px + var(--fx-sy, 0) * 20px), 0);
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__orb--cool {
	bottom: 8%;
	left: 2%;
	width: min(44vw, 26rem);
	height: min(44vw, 26rem);
	background: rgba(56, 189, 248, 0.22);
	animation: service-fx-breathe 10s ease-in-out infinite reverse;
	transform: translate3d(calc(var(--fx-mx, 0) * 18px), calc(var(--fx-my, 0) * 14px + var(--fx-sy, 0) * -25px), 0);
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__shard {
	border: 1px solid rgba(226, 232, 240, 0.14);
	background: rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0.55;
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__shard--a {
	top: 16%;
	left: 8%;
	width: min(18vw, 9rem);
	height: min(12vw, 6rem);
	transform: rotate(-8deg) translate3d(calc(var(--fx-mx, 0) * 14px), calc(var(--fx-my, 0) * 10px), 0);
	animation: service-fx-shard-drift 14s ease-in-out infinite;
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__shard--b {
	top: 58%;
	right: 10%;
	width: min(14vw, 7rem);
	height: min(18vw, 9rem);
	border-color: rgba(56, 189, 248, 0.28);
	transform: rotate(12deg) translate3d(calc(var(--fx-mx, 0) * -16px), calc(var(--fx-my, 0) * 8px), 0);
	animation: service-fx-shard-drift 18s ease-in-out infinite reverse;
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__shard--c {
	bottom: 18%;
	left: 22%;
	width: min(22vw, 11rem);
	height: min(10vw, 5rem);
	border-color: rgba(255, 102, 0, 0.25);
	transform: rotate(4deg) translate3d(calc(var(--fx-mx, 0) * 10px), calc(var(--fx-my, 0) * -12px), 0);
	animation: service-fx-shard-drift 16s ease-in-out infinite;
	animation-delay: 1.5s;
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-fx__glow {
	top: 20%;
	left: 35%;
	width: 30%;
	height: 40%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
	animation: service-fx-glow-drift 20s ease-in-out infinite;
	transform: translate3d(calc(var(--fx-mx, 0) * 24px), calc(var(--fx-my, 0) * 18px), 0);
}

body.service-page--fx-desarrollo-web-y-aplicaciones .service-hero__banner--live .service-fx-banner-media img {
	animation-name: service-fx-kenburns-craft;
	animation-duration: 30s;
}

@keyframes service-fx-kenburns-craft {
	0% {
		transform: scale(1.04) translate3d(0, 1%, 0);
	}
	100% {
		transform: scale(1.16) translate3d(-2%, -2%, 0);
	}
}

@keyframes service-fx-shard-drift {
	0%,
	100% {
		opacity: 0.35;
	}
	50% {
		opacity: 0.7;
	}
}

@keyframes service-fx-glow-drift {
	0%,
	100% {
		opacity: 0.35;
		filter: blur(20px);
	}
	50% {
		opacity: 0.7;
		filter: blur(8px);
	}
}

/* Lightbox: un poco más presentes */
body.service-page--embed .service-fx {
	opacity: 1;
}

body.service-page--embed .service-hero__banner--live .service-fx-banner-media {
	opacity: 0.52;
}

@media (prefers-reduced-motion: reduce) {
	.service-fx,
	.service-fx *,
	.service-hero__banner--live .service-fx-banner-media,
	.service-hero__banner--live .service-fx-banner-media img {
		animation: none !important;
		transition: none !important;
	}

	.service-hero__banner--live .service-fx-banner-media {
		transform: none;
		inset: 0;
		opacity: 0.42;
	}

	body.service-page--fx-static .service-fx__radar,
	body.service-page--fx-static .service-fx__scan,
	body.service-page--fx-static .service-fx__streak,
	body.service-page--fx-static .service-fx__nodes {
		display: none;
	}
}
