/**
 * Backlab Rebuild Hub Hero Styles
 */

.bl-rb-hub-hero {
	position: relative;
	background-color: var(--bl-bg-deep);
	border-bottom: 1px solid var(--bl-border);
}

.bl-rb-hub-hero__container {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
	min-height: clamp(34rem, 70svh, 50rem);
}

.bl-rb-hub-hero__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	z-index: 2;
}

.bl-rb-hub-hero__telemetry {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bl-rb-telemetry__sep {
	color: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   MATRIX STAGE & VISUAL
   ========================================================================== */

.bl-rb-hub-hero__visual {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.bl-rb-hub-hero__stage {
	position: relative;
	width: 100%;
	max-width: 34rem;
	aspect-ratio: 540 / 420;
	background: radial-gradient(circle at center, rgba(61, 191, 176, 0.05) 0%, rgba(5, 7, 7, 0) 70%), var(--bl-surface-1);
	border: 1px solid var(--bl-border);
	border-radius: var(--bl-radius-md);
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.bl-rb-hub-hero__grid-mesh {
	position: absolute;
	inset: 0;
	background-image: 
		linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 2.25rem 2.25rem;
	mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
	-webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
	pointer-events: none;
}

.bl-rb-hub-hero__matrix-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* ==========================================================================
   NODES
   ========================================================================== */

.bl-rb-hub-hero__nodes {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.bl-rb-hh-node {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	pointer-events: auto;
	transform: translate(-50%, -50%);
	transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bl-rb-hh-node__anchor {
	position: relative;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bl-rb-hh-node__core {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--bl-color-brand);
	border: 2px solid var(--bl-surface-1);
	box-shadow: 0 0 10px var(--bl-color-brand);
	z-index: 2;
}

.bl-rb-hh-node__pulse {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 1px solid var(--bl-color-brand);
	opacity: 0.4;
	animation: bl-rb-pulse 3s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes bl-rb-pulse {
	0% {
		transform: scale(0.6);
		opacity: 0.8;
	}
	100% {
		transform: scale(2.2);
		opacity: 0;
	}
}

.bl-rb-hh-node__card {
	background-color: rgba(13, 19, 18, 0.88);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid var(--bl-border);
	padding: 0.45rem 0.75rem;
	border-radius: var(--bl-radius-sm);
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

.bl-rb-hh-node__meta {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--bl-text-muted);
}

.bl-rb-hh-node__num {
	color: var(--bl-color-brand-light);
}

.bl-rb-hh-node__title {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--bl-text-primary);
	line-height: 1.15;
}

/* Individual node positioning */
.bl-rb-hh-node--sys-01 { left: 18%; top: 50%; }
.bl-rb-hh-node--sys-02 { left: 34%; top: 28%; }
.bl-rb-hh-node--sys-03 { left: 50%; top: 50%; }
.bl-rb-hh-node--sys-04 { left: 66%; top: 72%; }
.bl-rb-hh-node--sys-05 { left: 82%; top: 50%; }

@media (hover: hover) and (pointer: fine) {
	.bl-rb-hh-node:hover {
		transform: translate(-50%, -52%) scale(1.04);
	}
	.bl-rb-hh-node:hover .bl-rb-hh-node__card {
		border-color: var(--bl-border-active);
		box-shadow: 0 6px 20px rgba(61, 191, 176, 0.2);
	}
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1023px) {
	.bl-rb-hub-hero__container {
		grid-template-columns: 1fr;
		gap: 3rem;
		padding-block: 2rem 1rem;
		min-height: auto;
	}

	.bl-rb-hub-hero__visual {
		max-width: 32rem;
		margin-inline: auto;
	}
}

@media (max-width: 767px) {
	.bl-rb-hub-hero {
		padding-block-start: clamp(2.5rem, 8vw, 4rem);
	}

	.bl-rb-hub-hero__stage {
		aspect-ratio: 4 / 3;
	}

	.bl-rb-hh-node__card {
		padding: 0.35rem 0.5rem;
	}

	.bl-rb-hh-node__meta {
		font-size: 0.58rem;
	}

	.bl-rb-hh-node__title {
		font-size: 0.72rem;
	}

	.bl-rb-hub-hero__telemetry {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.35rem;
	}
}

@media (max-width: 480px) {
	.bl-rb-hh-node--sys-01 { left: 20%; top: 46%; }
	.bl-rb-hh-node--sys-02 { left: 36%; top: 24%; }
	.bl-rb-hh-node--sys-03 { left: 50%; top: 50%; }
	.bl-rb-hh-node--sys-04 { left: 66%; top: 76%; }
	.bl-rb-hh-node--sys-05 { left: 82%; top: 48%; }
}

@media (prefers-reduced-motion: reduce) {
	.bl-rb-hh-node__pulse {
		animation: none !important;
		opacity: 0.2;
	}
}
