/**
 * Hero AI visual — pseudo-3D chip + data flows, Noonixo palette
 * Loaded on home (en/ar). Respects prefers-reduced-motion.
 * --hero-* durations speed up slightly on :hover / .hero-ai-visual--hover
 */

/* Entire block is decorative: never intercept clicks (navbar / links stay usable) */
.hero-ai-visual,
.hero-ai-visual * {
	pointer-events: none !important;
}

.hero-ai-visual {
	--hero-dur-flow: 9s;
	--hero-dur-flow-mid: 11s;
	--hero-dur-flow-fast: 7.5s;
	--hero-dur-spoke: 5.5s;
	--hero-dur-trace: 6s;
	--hero-dur-pulse: 3.8s;
	--hero-dur-mesh: 8s;
	--hero-dur-node: 2.8s;
	--hero-dur-float: 5.5s;
	--hero-dur-code: 5.2s;
	--hero-dur-beam: 3.4s;
	--hero-dur-tether: 2.8s;
	--hero-neon: #00e5ff;
	--hero-neon-soft: rgba(0, 229, 255, 0.92);
	--hero-green-glow: rgba(74, 222, 128, 0.55);
	position: relative;
	width: 100%;
	max-width: 440px;
	margin: 0 auto;
	aspect-ratio: 1 / 1.05;
	perspective: 960px;
	-webkit-tap-highlight-color: transparent;
}

.hero-ai-visual:hover,
.hero-ai-visual.hero-ai-visual--hover {
	--hero-dur-flow: 5s;
	--hero-dur-flow-mid: 6.2s;
	--hero-dur-flow-fast: 4.2s;
	--hero-dur-spoke: 3.2s;
	--hero-dur-trace: 3.5s;
	--hero-dur-pulse: 2.2s;
	--hero-dur-mesh: 5s;
	--hero-dur-node: 1.6s;
	--hero-dur-float: 3.8s;
	--hero-dur-code: 3.1s;
	--hero-dur-beam: 2s;
	--hero-dur-tether: 1.65s;
}

.hero-ai-visual__parallax {
	position: relative;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	transition: filter 0.45s ease, box-shadow 0.45s ease;
	will-change: transform;
	border-radius: 12%;
	box-shadow: 0 20px 50px rgba(38, 35, 60, 0.06), 0 0 0 1px rgba(0, 229, 255, 0.06);
}

.hero-ai-visual:hover .hero-ai-visual__parallax,
.hero-ai-visual.hero-ai-visual--hover .hero-ai-visual__parallax {
	filter: drop-shadow(0 0 22px rgba(0, 229, 255, 0.42)) drop-shadow(0 0 48px rgba(74, 222, 128, 0.28))
		drop-shadow(0 0 72px rgba(0, 229, 255, 0.12));
	box-shadow: 0 24px 56px rgba(38, 35, 60, 0.1), 0 0 0 1px rgba(0, 229, 255, 0.14);
}

/* Deep background: soft network + dust (behind glow & main SVG) */
.hero-ai-visual__bg-network {
	position: absolute;
	inset: -2%;
	z-index: 0;
	pointer-events: none;
	overflow: visible;
	opacity: 0.85;
}

.hero-ai-visual__bg-network-svg {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
}

.hero-ai-visual__bg-links {
	animation: heroBgNetBreathe 14s ease-in-out infinite;
}

@keyframes heroBgNetBreathe {
	0%,
	100% {
		opacity: 0.55;
	}
	50% {
		opacity: 0.85;
	}
}

.hero-ai-visual__bg-link {
	stroke: rgba(0, 229, 255, 0.16);
	stroke-width: 0.55;
	stroke-linecap: round;
	fill: none;
	stroke-dasharray: 2 12;
	animation: heroBgLinkFlow 22s linear infinite;
	vector-effect: non-scaling-stroke;
}

.hero-ai-visual__bg-link:nth-child(odd) {
	animation-duration: 26s;
	animation-direction: reverse;
	stroke: rgba(94, 234, 212, 0.14);
}

.hero-ai-visual__bg-link--slow {
	animation-duration: 32s;
	stroke-dasharray: 1 18;
	opacity: 0.85;
}

@keyframes heroBgLinkFlow {
	to {
		stroke-dashoffset: -120;
	}
}

.hero-ai-visual__bg-node {
	fill: rgba(74, 222, 128, 0.35);
	stroke: rgba(0, 229, 255, 0.2);
	stroke-width: 0.35;
	animation: heroBgNodeGlow 5.5s ease-in-out infinite;
}

.hero-ai-visual__bg-node:nth-child(2n) {
	animation-delay: 0.7s;
	fill: rgba(0, 229, 255, 0.28);
}

.hero-ai-visual__bg-node:nth-child(3n) {
	animation-delay: 1.4s;
}

@keyframes heroBgNodeGlow {
	0%,
	100% {
		opacity: 0.35;
		r: 1.6;
	}
	50% {
		opacity: 0.85;
		r: 2.5;
	}
}

.hero-ai-visual__bg-dust {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: visible;
}

.hero-ai-visual__bg-dust span {
	position: absolute;
	width: 2px;
	height: 2px;
	margin-left: -1px;
	margin-top: -1px;
	border-radius: 50%;
	background: rgba(0, 229, 255, 0.22);
	box-shadow: 0 0 5px rgba(0, 229, 255, 0.2);
	opacity: 0.5;
	animation: heroBgDustFloat 24s ease-in-out infinite;
}

.hero-ai-visual__bg-dust span:nth-child(2n) {
	background: rgba(74, 222, 128, 0.2);
	animation-duration: 28s;
}

.hero-ai-visual__bg-dust span:nth-child(3n) {
	animation-duration: 19s;
}

.hero-ai-visual__bg-dust span:nth-child(1) {
	left: 8%;
	top: 12%;
	animation-delay: 0s;
}
.hero-ai-visual__bg-dust span:nth-child(2) {
	left: 22%;
	top: 88%;
	animation-delay: -2s;
}
.hero-ai-visual__bg-dust span:nth-child(3) {
	left: 91%;
	top: 18%;
	animation-delay: -4s;
}
.hero-ai-visual__bg-dust span:nth-child(4) {
	left: 78%;
	top: 72%;
	animation-delay: -1s;
}
.hero-ai-visual__bg-dust span:nth-child(5) {
	left: 14%;
	top: 42%;
	animation-delay: -6s;
}
.hero-ai-visual__bg-dust span:nth-child(6) {
	left: 55%;
	top: 8%;
	animation-delay: -3s;
}
.hero-ai-visual__bg-dust span:nth-child(7) {
	left: 42%;
	top: 92%;
	animation-delay: -8s;
}
.hero-ai-visual__bg-dust span:nth-child(8) {
	left: 95%;
	top: 48%;
	animation-delay: -5s;
}
.hero-ai-visual__bg-dust span:nth-child(9) {
	left: 3%;
	top: 68%;
	animation-delay: -7s;
}
.hero-ai-visual__bg-dust span:nth-child(10) {
	left: 68%;
	top: 28%;
	animation-delay: -9s;
}
.hero-ai-visual__bg-dust span:nth-child(11) {
	left: 33%;
	top: 22%;
	width: 1.5px;
	height: 1.5px;
	animation-delay: -11s;
}
.hero-ai-visual__bg-dust span:nth-child(12) {
	left: 62%;
	top: 58%;
	width: 1.5px;
	height: 1.5px;
	animation-delay: -13s;
}

@keyframes heroBgDustFloat {
	0%,
	100% {
		transform: translate(0, 0);
		opacity: 0.25;
	}
	20% {
		transform: translate(4px, -6px);
		opacity: 0.55;
	}
	45% {
		transform: translate(-3px, 5px);
		opacity: 0.4;
	}
	70% {
		transform: translate(5px, 3px);
		opacity: 0.5;
	}
}

.hero-ai-visual:hover .hero-ai-visual__bg-network,
.hero-ai-visual.hero-ai-visual--hover .hero-ai-visual__bg-network {
	opacity: 0.95;
}

.hero-ai-visual:hover .hero-ai-visual__bg-dust span,
.hero-ai-visual.hero-ai-visual--hover .hero-ai-visual__bg-dust span {
	animation-duration: 16s;
}

.hero-ai-visual__glow {
	z-index: 1;
	position: absolute;
	inset: 10% 6%;
	border-radius: 50%;
	background: radial-gradient(
		ellipse 72% 62% at 50% 44%,
		rgba(0, 229, 255, 0.32) 0%,
		rgba(74, 222, 128, 0.18) 38%,
		rgba(0, 212, 255, 0.06) 55%,
		transparent 72%
	);
	opacity: 0.72;
	pointer-events: none;
	transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
	filter: blur(0.5px);
}

.hero-ai-visual:hover .hero-ai-visual__glow,
.hero-ai-visual.hero-ai-visual--hover .hero-ai-visual__glow {
	opacity: 1;
	transform: scale(1.04);
	filter: blur(0px);
}

.hero-ai-visual__svg {
	position: relative;
	z-index: 2;
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
	filter: drop-shadow(0 8px 24px rgba(38, 35, 60, 0.08));
}

/* Soft background grid / depth */
.hero-ai-visual__ambient-grid line {
	stroke: rgba(0, 229, 255, 0.14);
	stroke-width: 0.35;
}

.hero-ai-visual__ambient-grid {
	animation: heroAmbientShift var(--hero-dur-mesh) ease-in-out infinite;
}

@keyframes heroAmbientShift {
	0%,
	100% {
		opacity: 0.35;
	}
	50% {
		opacity: 0.65;
	}
}

/* Mesh / network — subtle “live” breathing */
.hero-ai-visual__mesh {
	animation: heroMeshLive var(--hero-dur-mesh) ease-in-out infinite;
	transform-origin: 200px 210px;
}

@keyframes heroMeshLive {
	0%,
	100% {
		opacity: 0.88;
	}
	50% {
		opacity: 1;
	}
}

.hero-ai-visual__mesh-line {
	stroke: rgba(0, 229, 255, 0.52);
	stroke-width: 0.75;
	fill: none;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
}

.hero-ai-visual__mesh-node {
	fill: var(--hero-neon-soft);
	filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.75));
	animation: heroNodePulse var(--hero-dur-node) ease-in-out infinite;
}

.hero-ai-visual__mesh-node--2 {
	animation-delay: 0.45s;
}

.hero-ai-visual__mesh-node--3 {
	animation-delay: 0.9s;
}

@keyframes heroNodePulse {
	0%,
	100% {
		opacity: 0.5;
		r: 2.2;
	}
	50% {
		opacity: 1;
		r: 4.5;
	}
}

/* Data flow paths — slow drift; faster on hover via vars */
.hero-ai-visual__flow {
	fill: none;
	stroke-width: 1.65;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke: url(#heroGradStroke);
	stroke-dasharray: 14 22;
	animation: heroFlow var(--hero-dur-flow) linear infinite;
	opacity: 0.92;
	filter: drop-shadow(0 0 3px rgba(0, 229, 255, 0.35));
}

.hero-ai-visual__flow--2 {
	stroke-dasharray: 12 26;
	animation-duration: var(--hero-dur-flow-mid);
	animation-direction: reverse;
	opacity: 0.82;
}

.hero-ai-visual__flow--3 {
	stroke-dasharray: 10 18;
	animation-duration: var(--hero-dur-flow-fast);
	opacity: 0.78;
}

@keyframes heroFlow {
	to {
		stroke-dashoffset: -280;
	}
}

/* Radial spokes — data into / out of hub */
.hero-ai-visual__spoke {
	fill: none;
	stroke: url(#heroGradStroke);
	stroke-width: 1.05;
	stroke-linecap: round;
	stroke-dasharray: 3 14;
	opacity: 0.72;
	animation: heroSpokeFlow var(--hero-dur-spoke) linear infinite;
	filter: drop-shadow(0 0 2px rgba(0, 229, 255, 0.4));
}

.hero-ai-visual__spoke--rev {
	animation-direction: reverse;
	animation-delay: -1.2s;
	opacity: 0.55;
}

@keyframes heroSpokeFlow {
	to {
		stroke-dashoffset: -200;
	}
}

/* Inner circuit traces — slow moving dashes */
.hero-ai-visual__trace-flow {
	fill: none;
	stroke: rgba(0, 229, 255, 0.55);
	stroke-width: 1.05;
	stroke-linecap: round;
	stroke-dasharray: 5 12;
	animation: heroTraceFlow var(--hero-dur-trace) linear infinite;
	opacity: 0.95;
}

@keyframes heroTraceFlow {
	to {
		stroke-dashoffset: -180;
	}
}

/* Data streams: curved beams from core outward */
.hero-ai-visual__stream-beam {
	fill: none;
	stroke: url(#heroGradStroke);
	stroke-width: 1.15;
	stroke-linecap: round;
	stroke-dasharray: 6 18;
	opacity: 0.72;
	animation: heroBeamFlow var(--hero-dur-beam) linear infinite;
	filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.45));
}

.hero-ai-visual__stream-beam--2 {
	stroke-dasharray: 5 22;
	animation-duration: calc(var(--hero-dur-beam) * 1.15);
	animation-direction: reverse;
	opacity: 0.62;
}

.hero-ai-visual__stream-beam--3 {
	stroke-dasharray: 8 16;
	animation-duration: calc(var(--hero-dur-beam) * 0.85);
	opacity: 0.58;
}

.hero-ai-visual__stream-beam--4 {
	stroke-dasharray: 4 20;
	animation-duration: calc(var(--hero-dur-beam) * 1.05);
	animation-direction: reverse;
	opacity: 0.55;
}

@keyframes heroBeamFlow {
	to {
		stroke-dashoffset: -220;
	}
}

/* Straight tethers: core → floating capability icons */
.hero-ai-visual__icon-tether {
	fill: none;
	stroke: url(#heroGradStroke);
	stroke-width: 1.25;
	stroke-linecap: round;
	stroke-dasharray: 4 12;
	opacity: 0.78;
	animation: heroTetherFlow var(--hero-dur-tether) linear infinite;
	filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.4));
}

.hero-ai-visual__icon-tether--2 {
	animation-duration: calc(var(--hero-dur-tether) * 1.1);
	animation-direction: reverse;
	opacity: 0.68;
}

.hero-ai-visual__icon-tether--3 {
	animation-duration: calc(var(--hero-dur-tether) * 0.92);
	opacity: 0.72;
}

@keyframes heroTetherFlow {
	to {
		stroke-dashoffset: -160;
	}
}

.hero-ai-visual__icon-tethers {
	transform-box: fill-box;
	transform-origin: 50% 48%;
}

html[dir='rtl'] .hero-ai-visual__icon-tethers {
	transform: scaleX(-1);
}

/* Live typing terminal (decorative) */
.hero-ai-visual__terminal {
	position: absolute;
	left: 50%;
	bottom: 2%;
	transform: translateX(-50%);
	width: min(92%, 280px);
	z-index: 5;
	pointer-events: none;
	direction: ltr;
	text-align: left;
}

.hero-ai-visual__terminal-inner {
	display: block;
	margin: 0;
	padding: 0.45rem 0.6rem 0.5rem;
	font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
	font-size: clamp(0.65rem, 1.65vw, 0.75rem);
	line-height: 1.35;
	color: rgba(224, 255, 255, 0.92);
	background: linear-gradient(145deg, rgba(38, 35, 60, 0.5) 0%, rgba(15, 23, 42, 0.35) 100%);
	border: 1px solid rgba(0, 229, 255, 0.22);
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hero-ai-visual__type-text {
	color: rgba(94, 234, 212, 0.95);
	text-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.hero-ai-visual__caret {
	display: inline-block;
	width: 2px;
	height: 0.95em;
	margin-left: 1px;
	vertical-align: text-bottom;
	background: var(--hero-neon);
	box-shadow: 0 0 8px rgba(0, 229, 255, 0.8);
	animation: heroCaretBlink 0.95s step-end infinite;
}

@keyframes heroCaretBlink {
	0%,
	50% {
		opacity: 1;
	}
	51%,
	100% {
		opacity: 0;
	}
}

/* Chip core shimmer */
.hero-ai-visual__chip-face {
	fill: rgba(38, 35, 60, 0.045);
	stroke: url(#heroGradStroke);
	stroke-width: 2.35;
	filter: drop-shadow(0 6px 20px rgba(0, 229, 255, 0.28)) drop-shadow(0 2px 12px var(--hero-green-glow));
}

.hero-ai-visual__chip-inner {
	fill: none;
	stroke: rgba(0, 229, 255, 0.42);
	stroke-width: 1;
	opacity: 0.95;
}

.hero-ai-visual__core-bloom {
	animation: heroCoreBloom var(--hero-dur-pulse) ease-in-out infinite;
	transform-origin: 200px 200px;
	transform-box: fill-box;
}

@keyframes heroCoreBloom {
	0%,
	100% {
		opacity: 0.18;
		transform: scale(0.94);
	}
	50% {
		opacity: 0.48;
		transform: scale(1.06);
	}
}

.hero-ai-visual__core {
	fill: url(#heroGrad);
	opacity: 0.42;
	animation: heroCorePulse var(--hero-dur-pulse) ease-in-out infinite;
	filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.55)) drop-shadow(0 0 28px rgba(74, 222, 128, 0.35));
}

@keyframes heroCorePulse {
	0%,
	100% {
		opacity: 0.32;
	}
	50% {
		opacity: 0.62;
	}
}

/* Smart satellite icons (AI, cloud, trust, data, compute) */
.hero-ai-visual__smart {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	overflow: visible;
}

.hero-ai-visual__smart-icon {
	position: absolute;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #26233c;
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.88) 100%);
	border: 1px solid rgba(0, 229, 255, 0.28);
	box-shadow: 0 2px 14px rgba(38, 35, 60, 0.08), 0 0 0 1px rgba(74, 222, 128, 0.12),
		0 0 18px rgba(0, 229, 255, 0.12);
	animation: heroSmartFloat calc(var(--hero-dur-float) * 1.05) ease-in-out infinite;
}

.hero-ai-visual__smart-icon svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.hero-ai-visual__smart-icon--1 {
	top: 20%;
	left: 34%;
	animation-delay: 0s;
}

.hero-ai-visual__smart-icon--2 {
	top: 24%;
	right: 20%;
	left: auto;
	animation-delay: -0.5s;
}

.hero-ai-visual__smart-icon--3 {
	bottom: 36%;
	left: 6%;
	animation-delay: -1s;
}

.hero-ai-visual__smart-icon--4 {
	bottom: 28%;
	right: 22%;
	left: auto;
	animation-delay: -1.5s;
}

.hero-ai-visual__smart-icon--5 {
	top: 48%;
	right: 5%;
	left: auto;
	animation-delay: -2s;
}

html[dir='rtl'] .hero-ai-visual__smart-icon--1 {
	left: auto;
	right: 34%;
}

html[dir='rtl'] .hero-ai-visual__smart-icon--2 {
	right: auto;
	left: 20%;
}

html[dir='rtl'] .hero-ai-visual__smart-icon--3 {
	left: auto;
	right: 6%;
}

html[dir='rtl'] .hero-ai-visual__smart-icon--4 {
	right: auto;
	left: 22%;
}

html[dir='rtl'] .hero-ai-visual__smart-icon--5 {
	right: auto;
	left: 5%;
}

@keyframes heroSmartFloat {
	0%,
	100% {
		transform: translateY(0) scale(1);
		box-shadow: 0 2px 14px rgba(38, 35, 60, 0.08), 0 0 0 1px rgba(74, 222, 128, 0.12),
			0 0 18px rgba(0, 229, 255, 0.12);
	}
	50% {
		transform: translateY(-6px) scale(1.05);
		box-shadow: 0 6px 20px rgba(38, 35, 60, 0.1), 0 0 0 1px rgba(0, 229, 255, 0.22),
			0 0 26px rgba(0, 229, 255, 0.22);
	}
}

.hero-ai-visual:hover .hero-ai-visual__smart-icon,
.hero-ai-visual.hero-ai-visual--hover .hero-ai-visual__smart-icon {
	border-color: rgba(0, 229, 255, 0.4);
}

/* Orbiting capability icons */
.hero-ai-visual__float {
	position: absolute;
	z-index: 4;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 4px 24px rgba(38, 35, 60, 0.12), 0 0 0 1px rgba(0, 184, 255, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #26233c;
	animation: heroFloat var(--hero-dur-float) ease-in-out infinite;
	pointer-events: none;
}

.hero-ai-visual__float svg {
	width: 22px;
	height: 22px;
}

.hero-ai-visual__float--1 {
	top: 6%;
	right: 4%;
	animation-delay: 0s;
}

.hero-ai-visual__float--2 {
	bottom: 18%;
	left: 0;
	animation-delay: 1.2s;
}

.hero-ai-visual__float--3 {
	top: 38%;
	left: -2%;
	animation-delay: 2.4s;
}

html[dir="rtl"] .hero-ai-visual__float--1 {
	right: auto;
	left: 4%;
}

html[dir="rtl"] .hero-ai-visual__float--2 {
	left: auto;
	right: 0;
}

html[dir="rtl"] .hero-ai-visual__float--3 {
	left: auto;
	right: -2%;
}

@keyframes heroFloat {
	0%,
	100% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(-10px) scale(1.04);
	}
}

/* Layout: two-column hero */
/* Hero particles layer: visual only */
.home #particles-js {
	pointer-events: none !important;
}

.home__hero-grid {
	display: grid;
	gap: clamp(1.25rem, 4vw, 2.75rem);
	align-items: center;
	width: 100%;
	position: relative;
	z-index: 0;
	padding-top: clamp(5.25rem, 12vh + 3rem, 14rem);
	padding-bottom: clamp(1.25rem, 4vh, 2.5rem);
	box-sizing: border-box;
}

@media (min-width: 37.5em) {
	.home__hero-grid {
		padding-top: clamp(6rem, 18vh + 2rem, 16rem);
	}
}

.home__hero-grid .home__main {
	padding-top: 0;
	padding-bottom: 0;
}

/* Two-column hero only on wide desktop; tablets (incl. iPad) stay stacked like mobile */
@media (min-width: 65em) {
	.home__hero-grid {
		grid-template-columns: minmax(0, 1.12fr) minmax(220px, min(40vw, 440px));
		gap: clamp(1.5rem, 3vw, 3rem);
		align-items: center;
	}

	.home__hero-grid .home__main {
		max-width: none;
	}

	.hero-ai-visual {
		margin: 0;
		max-width: none;
		width: 100%;
	}
}

@media (max-width: 64.9375em) {
	.home__hero-grid .hero-ai-visual {
		order: 3;
		max-width: min(340px, 88vw);
		margin-left: auto;
		margin-right: auto;
		margin-top: 0.5rem;
	}

	.home__hero-grid .home__main {
		order: 1;
	}
}

/* Floating code / symbols — emit from AI core center */
.hero-ai-visual__code-field {
	--ex-sign: 1;
	position: absolute;
	left: 50%;
	top: 46%;
	width: 0;
	height: 0;
	z-index: 3;
	pointer-events: none;
	overflow: visible;
}

html[dir='rtl'] .hero-ai-visual__code-field {
	--ex-sign: -1;
}

.hero-ai-visual__code-bit {
	position: absolute;
	left: 0;
	top: 0;
	font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
	font-size: clamp(0.625rem, 1.85vw, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
	color: rgba(224, 255, 255, 0.95);
	text-shadow: 0 0 14px rgba(0, 229, 255, 0.55), 0 0 4px rgba(74, 222, 128, 0.45),
		0 1px 2px rgba(38, 35, 60, 0.35);
	opacity: 0;
	will-change: transform, opacity;
	animation: heroCodeEmit var(--hero-dur-code) cubic-bezier(0.22, 1, 0.36, 1) infinite;
	animation-delay: var(--emit-delay, 0s);
}

@keyframes heroCodeEmit {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) translate(0, 0) scale(0.5);
		filter: blur(2px);
	}
	10% {
		opacity: 0.95;
		filter: blur(0px);
	}
	35% {
		opacity: 0.88;
	}
	100% {
		opacity: 0;
		transform: translate(-50%, -50%)
			translate(calc(var(--ex-n) * 1px * var(--ex-sign, 1)), calc(var(--ey-n) * 1px)) scale(1.02);
		filter: blur(0.5px);
	}
}

.hero-ai-visual__code-bit:nth-child(1) {
	--ex-n: 58;
	--ey-n: -64;
	--emit-delay: 0s;
}
.hero-ai-visual__code-bit:nth-child(2) {
	--ex-n: -52;
	--ey-n: -58;
	--emit-delay: -0.45s;
}
.hero-ai-visual__code-bit:nth-child(3) {
	--ex-n: 72;
	--ey-n: 12;
	--emit-delay: -0.9s;
}
.hero-ai-visual__code-bit:nth-child(4) {
	--ex-n: -68;
	--ey-n: 8;
	--emit-delay: -1.35s;
}
.hero-ai-visual__code-bit:nth-child(5) {
	--ex-n: 28;
	--ey-n: 78;
	--emit-delay: -1.8s;
}
.hero-ai-visual__code-bit:nth-child(6) {
	--ex-n: -36;
	--ey-n: 72;
	--emit-delay: -2.25s;
}
.hero-ai-visual__code-bit:nth-child(7) {
	--ex-n: 88;
	--ey-n: -28;
	--emit-delay: -2.7s;
}
.hero-ai-visual__code-bit:nth-child(8) {
	--ex-n: -82;
	--ey-n: -22;
	--emit-delay: -3.15s;
}
.hero-ai-visual__code-bit:nth-child(9) {
	--ex-n: 14;
	--ey-n: -88;
	--emit-delay: -3.6s;
}
.hero-ai-visual__code-bit:nth-child(10) {
	--ex-n: -20;
	--ey-n: -82;
	--emit-delay: -4.05s;
}
.hero-ai-visual__code-bit:nth-child(11) {
	--ex-n: 64;
	--ey-n: 48;
	--emit-delay: -4.5s;
}
.hero-ai-visual__code-bit:nth-child(12) {
	--ex-n: -58;
	--ey-n: 52;
	--emit-delay: -4.95s;
}

/* Ambient floating particles (around the shape) */
.hero-ai-visual__particles {
	position: absolute;
	inset: -4%;
	pointer-events: none;
	overflow: visible;
	z-index: 2;
}

.hero-ai-visual__particles span {
	position: absolute;
	width: 4px;
	height: 4px;
	margin-left: -2px;
	margin-top: -2px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, #fff 0%, var(--hero-neon) 45%, transparent 70%);
	box-shadow: 0 0 10px rgba(0, 229, 255, 0.85), 0 0 18px rgba(74, 222, 128, 0.35);
	opacity: 0.55;
	animation: heroParticleDrift 12s ease-in-out infinite;
}

.hero-ai-visual:hover .hero-ai-visual__particles span,
.hero-ai-visual.hero-ai-visual--hover .hero-ai-visual__particles span {
	animation-duration: 7s;
	opacity: 0.75;
}

.hero-ai-visual__particles span:nth-child(1) {
	left: 12%;
	top: 18%;
	animation-delay: 0s;
}
.hero-ai-visual__particles span:nth-child(2) {
	left: 88%;
	top: 22%;
	animation-delay: -1.5s;
}
.hero-ai-visual__particles span:nth-child(3) {
	left: 72%;
	top: 8%;
	animation-delay: -2.8s;
}
.hero-ai-visual__particles span:nth-child(4) {
	left: 18%;
	top: 78%;
	animation-delay: -0.8s;
}
.hero-ai-visual__particles span:nth-child(5) {
	left: 92%;
	top: 62%;
	animation-delay: -3.5s;
}
.hero-ai-visual__particles span:nth-child(6) {
	left: 6%;
	top: 48%;
	animation-delay: -2s;
}
.hero-ai-visual__particles span:nth-child(7) {
	left: 48%;
	top: 4%;
	animation-delay: -4.2s;
}
.hero-ai-visual__particles span:nth-child(8) {
	left: 52%;
	top: 94%;
	animation-delay: -1.1s;
}
.hero-ai-visual__particles span:nth-child(9) {
	left: 34%;
	top: 12%;
	animation-delay: -5s;
	width: 3px;
	height: 3px;
}
.hero-ai-visual__particles span:nth-child(10) {
	left: 64%;
	top: 88%;
	animation-delay: -3.8s;
	width: 3px;
	height: 3px;
}

@keyframes heroParticleDrift {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
		opacity: 0.35;
	}
	25% {
		transform: translate(6px, -10px) scale(1.15);
		opacity: 0.85;
	}
	50% {
		transform: translate(-4px, 6px) scale(0.9);
		opacity: 0.5;
	}
	75% {
		transform: translate(8px, 4px) scale(1.05);
		opacity: 0.7;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-ai-visual__flow,
	.hero-ai-visual__mesh-node,
	.hero-ai-visual__core,
	.hero-ai-visual__core-bloom,
	.hero-ai-visual__float,
	.hero-ai-visual__smart-icon,
	.hero-ai-visual__mesh,
	.hero-ai-visual__ambient-grid,
	.hero-ai-visual__spoke,
	.hero-ai-visual__trace-flow,
	.hero-ai-visual__particles span,
	.hero-ai-visual__code-bit,
	.hero-ai-visual__bg-links,
	.hero-ai-visual__bg-link,
	.hero-ai-visual__bg-node,
	.hero-ai-visual__bg-dust span {
		animation: none !important;
	}

	.hero-ai-visual__code-bit {
		opacity: 0.35;
		transform: translate(-50%, -50%);
	}

	.hero-ai-visual__stream-beam,
	.hero-ai-visual__icon-tether {
		animation: none !important;
		opacity: 0.45;
	}

	.hero-ai-visual__caret {
		animation: none;
		opacity: 0.85;
	}

	.hero-ai-visual__flow,
	.hero-ai-visual__spoke,
	.hero-ai-visual__trace-flow,
	.hero-ai-visual__stream-beam,
	.hero-ai-visual__icon-tether {
		stroke-dashoffset: 0;
		opacity: 0.55;
	}

	.hero-ai-visual__parallax {
		transition: none;
	}

	.hero-ai-visual:hover .hero-ai-visual__parallax,
	.hero-ai-visual.hero-ai-visual--hover .hero-ai-visual__parallax {
		filter: none;
		box-shadow: none;
	}
}
