/**
 * Home — Infraestructura tecnológica (arquitectura + blueprint).
 */

@keyframes iqdc-tech-enter {
	from {
		opacity: 0;
		transform: translateY(28px);
	}

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

@keyframes iqdc-tech-pulse {
	0%,
	100% {
		border-color: rgba(0, 139, 255, 0.45);
		box-shadow:
			0 0 0 0 rgba(0, 139, 255, 0.25),
			inset 0 0 12px rgba(0, 139, 255, 0.06);
	}

	50% {
		border-color: #008bff;
		box-shadow:
			0 0 22px rgba(0, 139, 255, 0.45),
			inset 0 0 18px rgba(0, 139, 255, 0.12);
	}
}

.iqdc-tech-infrastructure {
	--iqdc-brand: #008bff;
	--iqdc-bg: #0b0f19;
	--iqdc-text: #ffffff;
	--iqdc-text-muted: #9ca3af;
	--iqdc-border: rgba(0, 139, 255, 0.28);
	--iqdc-node-bg: rgba(15, 23, 42, 0.85);
	--iqdc-max: 1200px;

	background: var(--iqdc-bg);
	color: var(--iqdc-text);
	padding: 5rem clamp(1.25rem, 4vw, 2rem);
	font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
	line-height: 1.6;
	opacity: 0;
	transform: translateY(28px);
}

@supports (animation-timeline: view()) {
	.iqdc-tech-infrastructure {
		animation: iqdc-tech-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
		animation-timeline: view();
		animation-range: entry 5% entry 42%;
	}
}

@supports not (animation-timeline: view()) {
	.iqdc-tech-infrastructure {
		animation: iqdc-tech-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iqdc-tech-infrastructure {
		opacity: 1;
		transform: none;
		animation: none;
	}

	.iqdc-tech-infrastructure__node--pulse {
		animation: none !important;
	}
}

.iqdc-tech-infrastructure *,
.iqdc-tech-infrastructure *::before,
.iqdc-tech-infrastructure *::after {
	box-sizing: border-box;
}

.iqdc-tech-infrastructure__inner {
	max-width: var(--iqdc-max);
	margin: 0 auto;
}

.iqdc-tech-infrastructure__layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: center;
}

.iqdc-tech-infrastructure__eyebrow {
	margin: 0 0 0.85rem;
	font-size: clamp(0.75rem, 1.1vw, 0.8125rem);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--iqdc-brand);
}

.iqdc-tech-infrastructure__title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.5rem, 2.8vw, 2.125rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--iqdc-text);
}

.iqdc-tech-infrastructure__lead {
	margin: 0 0 1.75rem;
	font-size: clamp(1rem, 1.35vw, 1.1rem);
	line-height: 1.6;
	color: var(--iqdc-text-muted);
}

.iqdc-tech-infrastructure__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.iqdc-tech-infrastructure__list-item {
	position: relative;
	margin: 0 0 1.15rem;
	padding-left: 1.35rem;
	font-size: clamp(0.875rem, 1.2vw, 0.9375rem);
	line-height: 1.65;
	color: var(--iqdc-text-muted);
}

.iqdc-tech-infrastructure__list-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--iqdc-brand);
	box-shadow: 0 0 8px rgba(0, 139, 255, 0.65);
}

.iqdc-tech-infrastructure__list-item strong {
	color: var(--iqdc-text);
	font-weight: 600;
}

.iqdc-tech-infrastructure__blueprint {
	border: 1px solid var(--iqdc-border);
	border-radius: 12px;
	background:
		linear-gradient(180deg, rgba(0, 139, 255, 0.06) 0%, transparent 40%),
		rgba(8, 12, 22, 0.95);
	box-shadow:
		0 24px 48px rgba(0, 0, 0, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.04);
	overflow: hidden;
}

.iqdc-tech-infrastructure__console-header {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.65rem 1rem;
	border-bottom: 1px solid rgba(0, 139, 255, 0.15);
	background: rgba(0, 0, 0, 0.25);
}

.iqdc-tech-infrastructure__console-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(0, 139, 255, 0.35);
}

.iqdc-tech-infrastructure__console-dot:first-child {
	background: #ef4444;
	opacity: 0.75;
}

.iqdc-tech-infrastructure__console-dot:nth-child(2) {
	background: #f59e0b;
	opacity: 0.75;
}

.iqdc-tech-infrastructure__console-dot:nth-child(3) {
	background: #22c55e;
	opacity: 0.75;
}

.iqdc-tech-infrastructure__console-label {
	margin-left: auto;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(0, 139, 255, 0.85);
}

.iqdc-tech-infrastructure__topology {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto auto;
	gap: clamp(0.85rem, 2vw, 1.25rem);
	padding: clamp(1rem, 2.5vw, 1.5rem);
	min-height: 280px;
}

.iqdc-tech-infrastructure__connector {
	position: absolute;
	pointer-events: none;
	z-index: 0;
}

.iqdc-tech-infrastructure__connector--h {
	top: 50%;
	left: 12%;
	right: 12%;
	height: 1px;
	transform: translateY(-50%);
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(0, 139, 255, 0.35) 20%,
		rgba(0, 139, 255, 0.55) 50%,
		rgba(0, 139, 255, 0.35) 80%,
		transparent 100%
	);
	box-shadow: 0 0 8px rgba(0, 139, 255, 0.25);
}

.iqdc-tech-infrastructure__connector--v {
	left: 50%;
	top: 18%;
	bottom: 18%;
	width: 1px;
	transform: translateX(-50%);
	background: linear-gradient(
		180deg,
		transparent 0%,
		rgba(0, 139, 255, 0.35) 20%,
		rgba(0, 139, 255, 0.55) 50%,
		rgba(0, 139, 255, 0.35) 80%,
		transparent 100%
	);
	box-shadow: 0 0 8px rgba(0, 139, 255, 0.25);
}

.iqdc-tech-infrastructure__node {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: clamp(0.85rem, 2vw, 1.1rem);
	border: 1px solid rgba(0, 139, 255, 0.22);
	border-radius: 8px;
	background: var(--iqdc-node-bg);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.iqdc-tech-infrastructure__node:hover {
	border-color: rgba(0, 139, 255, 0.5);
	box-shadow: 0 0 16px rgba(0, 139, 255, 0.15);
}

.iqdc-tech-infrastructure__node-title {
	font-size: clamp(0.8rem, 1.2vw, 0.875rem);
	font-weight: 700;
	line-height: 1.3;
	color: var(--iqdc-text);
}

.iqdc-tech-infrastructure__node-desc {
	font-size: clamp(0.7rem, 1vw, 0.75rem);
	line-height: 1.45;
	color: var(--iqdc-text-muted);
}

.iqdc-tech-infrastructure__node--pulse {
	animation: iqdc-tech-pulse 2.8s ease-in-out infinite;
}

@media (max-width: 767px) {
	.iqdc-tech-infrastructure {
		padding: clamp(2.75rem, 8vw, 3.5rem) clamp(1rem, 4vw, 1.25rem);
	}

	.iqdc-tech-infrastructure__layout {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.iqdc-tech-infrastructure__topology {
		grid-template-columns: 1fr;
		grid-template-rows: repeat(4, auto);
		min-height: 0;
		padding: 1rem;
		transform: scale(0.98);
		transform-origin: top center;
	}

	.iqdc-tech-infrastructure__connector--h,
	.iqdc-tech-infrastructure__connector--v {
		display: none;
	}

	.iqdc-tech-infrastructure__node:not(:last-child)::after {
		content: "";
		display: block;
		position: absolute;
		left: 50%;
		bottom: -0.75rem;
		width: 1px;
		height: 0.5rem;
		transform: translateX(-50%);
		background: linear-gradient(180deg, rgba(0, 139, 255, 0.5), transparent);
	}

	.iqdc-tech-infrastructure__node {
		width: 100%;
	}
}
