:root {
	--ai-five-cyan: #22D3EE;
	--ai-five-cyan-light: #67E8F9;
	--ai-five-purple: #8B5CF6;
	--ai-five-bg: #020617;
	--ai-five-text: #E2E8F0;
	--ai-five-muted: rgba(255, 255, 255, 0.55);
	--ai-five-card: #FFFFFF;
	--ai-five-content-width: 1430px;
}

#home-five {
	position: relative;
	z-index: 20;
	background: #060b16;
	isolation: isolate;
	overflow: hidden;
	contain: paint;
}

#home-five::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background: #060b16;
	pointer-events: none;
}

.ai-ecosystem-section {
	position: relative;
	z-index: 1;
	width: 100%;
	min-height: auto;
	padding: 78px max(24px, calc((100vw - var(--ai-five-content-width)) / 2)) 70px;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(ellipse at 50% -10%, rgba(72, 108, 220, 0.12) 0%, rgba(90, 60, 200, 0.06) 34%, transparent 68%),
		radial-gradient(ellipse at 92% 95%, rgba(54, 185, 210, 0.08) 0%, transparent 55%),
		#060b16;
	overflow: hidden;
	color: var(--ai-five-text);
	isolation: isolate;
}

.ai-ecosystem-section::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
	background-size: 60px 60px;
	opacity: 0.028;
	mask-image: radial-gradient(ellipse 72% 68% at 50% 50%, black 30%, transparent 72%);
	-webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 50%, black 30%, transparent 72%);
}

.ai-ecosystem-canvas {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.ai-ecosystem-inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--ai-five-content-width);
	margin: 0 auto;
}

.ai-ecosystem-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 42px;
}

.ai-ecosystem-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;
	border: 1px solid rgba(34, 211, 238, 0.25);
	border-radius: 999px;
	background: rgba(34, 211, 238, 0.05);
	color: var(--ai-five-cyan-light);
	font-family: "SF Mono", "Fira Code", "JetBrains Mono", Consolas, monospace;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
}

.ai-ecosystem-badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ai-five-cyan);
	box-shadow: 0 0 8px var(--ai-five-cyan);
	animation: aiFiveDotPulse 3s ease-in-out infinite;
}

@keyframes aiFiveDotPulse {
	0%,
	100% {
		opacity: 0.5;
	}

	50% {
		opacity: 1;
	}
}

.ai-ecosystem-header h2 {
	max-width: 920px;
	margin: 20px 0 14px;
	color: #FFFFFF;
	font-size: clamp(28px, 3.2vw, 44px);
	font-weight: 900;
	letter-spacing: 0;
	line-height: 1.22;
}

.ai-ecosystem-header h2 span {
	background: linear-gradient(135deg, #38BDF8 0%, var(--ai-five-purple) 60%, #A78BFA 100%);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.ai-ecosystem-header p {
	max-width: 760px;
	margin: 0;
	color: var(--ai-five-muted);
	font-size: 15px;
	line-height: 1.75;
}

.ai-ecosystem-grid {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 13px;
	width: 100%;
}

.ai-ecosystem-card {
	position: relative;
	z-index: 3;
	height: 106px;
	min-height: 106px;
	display: block;
	border: 1px solid rgba(226, 232, 240, 0.9);
	border-radius: 18px;
	background: #FFFFFF !important;
	background-image: none !important;
	overflow: hidden;
	cursor: default;
	box-shadow: none;
	opacity: 1;
	filter: none;
	mix-blend-mode: normal;
	isolation: isolate;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s, background 0.35s;
}

.ai-ecosystem-card::before {
	content: '';
	display: none;
	position: absolute;
	top: 0;
	left: -120%;
	width: 100%;
	height: 100%;
	background: linear-gradient(105deg, transparent 35%, rgba(34, 211, 238, 0.06) 45%, rgba(139, 92, 246, 0.08) 50%, rgba(34, 211, 238, 0.06) 55%, transparent 65%);
	pointer-events: none;
	transition: left 0.6s ease;
}

.ai-ecosystem-card::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #38BDF8, var(--ai-five-purple));
	transition: width 0.45s ease;
}

.ai-ecosystem-card:hover {
	transform: translateY(-6px);
	border-color: rgba(34, 211, 238, 0.48);
	background: #FFFFFF;
	box-shadow: none;
}

.ai-ecosystem-card:hover::before {
	left: 120%;
}

.ai-ecosystem-card:hover::after {
	width: 100%;
}

.ai-ecosystem-card.is-breathing {
	animation: none;
}

.ai-ecosystem-card.is-breathing:nth-child(odd) {
	animation-delay: 1.5s;
}

@keyframes aiFiveCardBreathe {
	0%,
	100% {
		box-shadow: none;
		border-color: rgba(34, 211, 238, 0.2);
	}

	50% {
		box-shadow: none;
		border-color: rgba(34, 211, 238, 0.4);
	}
}

.ai-ecosystem-card.is-hidden {
	opacity: 1;
	transform: none;
}

.ai-ecosystem-card.is-visible {
	animation: none;
	opacity: 1;
	transform: none;
}

@keyframes aiFiveFadeUp {
	to {
		opacity: 1;
	transform: translateY(0);
	}
}

.ai-ecosystem-logo-image {
	position: relative;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	opacity: 1;
	filter: none;
	mix-blend-mode: normal;
	user-select: none;
	transition: transform 0.35s ease;
}

.ai-ecosystem-card:hover .ai-ecosystem-logo-image {
	transform: scale(1.03);
}

.ai-ecosystem-card.span-2 {
	grid-column: span 2;
}

.ai-ecosystem-card.span-3 {
	grid-column: span 3;
}

.ai-ecosystem-card.third-row-start {
	grid-column: 2 / span 1;
}

.ai-ecosystem-card.last-row-start {
	grid-column: 4 / span 2;
}

@media (max-width: 1200px) {
	.ai-ecosystem-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.ai-ecosystem-card.last-row-start {
		grid-column: span 2;
	}

	.ai-ecosystem-card.third-row-start {
		grid-column: span 1;
	}
}

@media (max-width: 768px) {
	.ai-ecosystem-section {
		padding: 48px 18px 56px;
	}

	.ai-ecosystem-header {
		margin-bottom: 40px;
	}

	.ai-ecosystem-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 8px;
	}

	.ai-ecosystem-card {
		min-height: 106px;
		border-radius: 14px;
	}

	.ai-ecosystem-card.span-2 {
		grid-column: span 2;
	}

	.ai-ecosystem-card.span-3 {
		grid-column: span 4;
	}
}

@media (max-width: 480px) {
	.ai-ecosystem-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ai-ecosystem-card.span-2,
	.ai-ecosystem-card.span-3 {
		grid-column: span 2;
	}
}
