/* ==========================================================================
   ChipLOGIC 2026 — Motion System, Scroll Reveal, Spotlight & Telemetry Pulse
   ========================================================================== */

/* Live Online Telemetry Pulse Dot */
.cl-pulse-dot {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cl-accent);
	box-shadow: 0 0 10px var(--cl-accent);
	flex-shrink: 0;
}

.cl-pulse-dot::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 1px solid var(--cl-accent);
	animation: cl-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes cl-ping {
	0% {
		transform: scale(0.75);
		opacity: 0.9;
	}
	80%, 100% {
		transform: scale(1.9);
		opacity: 0;
	}
}

/* Subtle Optical Scanline across ECU Hardware Frame */
.cl-ecu-stage__scanline {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 0%, rgba(219, 49, 64, 0.14) 50%, transparent 100%);
	height: 36%;
	transform: translateY(-120%);
	animation: cl-scan 7.5s var(--cl-ease) infinite;
	pointer-events: none;
}

@keyframes cl-scan {
	0% {
		transform: translateY(-120%);
		opacity: 0;
	}
	12% {
		opacity: 0.7;
	}
	55% {
		transform: translateY(310%);
		opacity: 0;
	}
	100% {
		transform: translateY(310%);
		opacity: 0;
	}
}

/* Cursor-Following Magnetic Spotlight on Cards */
.cl-spotlight::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		360px circle at var(--cl-mx, 50%) var(--cl-my, 50%),
		rgba(219, 49, 64, 0.11),
		transparent 65%
	);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
	z-index: 0;
}

.cl-spotlight:hover::before {
	opacity: 1;
}

.cl-spotlight > :not(.cl-pillar-card__bar) {
	position: relative;
	z-index: 1;
}

.cl-pillar-card__bar {
	z-index: 2;
}

/* IntersectionObserver Scroll Reveal (Above-the-fold stays immediately visible; fail-safe) */
.cl-reveal-armed .cl-reveal:not(.is-visible) {
	opacity: 0;
	transform: translateY(16px);
}

.cl-reveal {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.55s var(--cl-ease) var(--cl-delay, 0ms), transform 0.55s var(--cl-ease) var(--cl-delay, 0ms);
}

.cl-reveal--delay-1 {
	--cl-delay: 100ms;
}

.cl-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Accessibility: Respect User Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.cl-pulse-dot::after,
	.cl-ecu-stage__scanline {
		animation: none !important;
		display: none;
	}
	.cl-reveal-armed .cl-reveal:not(.is-visible),
	.cl-reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	* {
		transition-duration: 0.01ms !important;
	}
}
