/**
 * Hero scroll sequence: pinned 3D globe + HUD text + scrolling panels.
 */
.hero-scroll {
	position: relative;
	padding-top: var(--header-height);
	background: var(--color-bg);
	overflow: clip;
}

.hero-scroll__grid {
	display: grid;
	grid-template-columns: 1fr;
	align-items: start;
}

.hero-scroll__panels {
	display: flex;
	flex-direction: column;
}

.hero-scroll__panel {
	min-height: 82vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-block: 3rem;
}

.hero-scroll__panel--main {
	min-height: 92vh;
}

.hero-scroll__title {
	font-size: clamp(2.6rem, 7vw, 4.6rem);
	background: linear-gradient(120deg, #ffffff 40%, rgba(255, 255, 255, 0.65));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	max-width: 14ch;
	margin-bottom: 0.4em;
}

.hero-scroll__subtitle {
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	max-width: 46ch;
	color: var(--color-text-muted);
	margin-bottom: 2.2rem;
}

.hero-scroll__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 3rem;
}

.hero-scroll__scroll-cue {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-text-dim);
	width: fit-content;
	transition: color var(--transition-fast);
}

.hero-scroll__scroll-cue:hover,
.hero-scroll__scroll-cue:focus-visible {
	color: var(--color-accent);
}

.hero-scroll__scroll-cue-icon {
	width: 18px;
	height: 28px;
	border: 1.5px solid currentColor;
	border-radius: var(--radius-pill);
	position: relative;
	flex-shrink: 0;
}

.hero-scroll__scroll-cue-icon::before {
	content: '';
	position: absolute;
	top: 5px;
	left: 50%;
	width: 3px;
	height: 6px;
	border-radius: 2px;
	background: currentColor;
	transform: translateX(-50%);
	animation: scrollCueDrop 1.8s ease infinite;
}

@keyframes scrollCueDrop {
	0% {
		opacity: 1;
		transform: translate(-50%, 0);
	}
	70% {
		opacity: 0;
		transform: translate(-50%, 10px);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, 10px);
	}
}

.hero-scroll__panel h2 {
	font-size: clamp(1.6rem, 3.2vw, 2.3rem);
	max-width: 18ch;
}

.hero-scroll__panel p {
	max-width: 42ch;
	font-size: 1.05rem;
}

.hero-scroll__panel--closer h2 {
	font-size: clamp(2.1rem, 4.4vw, 3.2rem);
	background: var(--gradient-accent);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-scroll__panel--closer {
	gap: 1.5rem;
	display: flex;
}

.hero-scroll__panel--closer .btn {
	width: fit-content;
}

/* Globe column — on mobile this renders inline (compact, non-sticky,
   simplified geometry) above the panels; from --bp-lg up it becomes the
   pinned sticky sidebar. See responsive.css for the breakpoint switch. */
.hero-scroll__sticky-col {
	display: block;
	order: -1;
	margin-bottom: 1.5rem;
}

.hero-scroll__sticky {
	height: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: relative;
}

.hero-scroll__globe-wrap {
	position: relative;
	width: min(70vw, 340px);
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-scroll__glow {
	position: absolute;
	inset: -15%;
	background: radial-gradient(circle, rgba(var(--color-accent-rgb), 0.22) 0%, rgba(124, 92, 255, 0.12) 45%, rgba(5, 7, 13, 0) 72%);
	filter: blur(6px);
	pointer-events: none;
}

#globe-canvas {
	position: relative;
	width: 100%;
	height: 100%;
	display: none;
}

.hero-scroll__globe-wrap.is-globe-active #globe-canvas {
	display: block;
}

.hero-scroll__globe-wrap.is-globe-active .hero-scroll__static-globe {
	display: none;
}

/* CSS-only fallback sphere: used before JS/WebGL init, and permanently
   for prefers-reduced-motion or unsupported browsers. */
.hero-scroll__static-globe {
	position: relative;
	width: 62%;
	height: 62%;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, rgba(var(--color-accent-rgb), 0.35), rgba(10, 14, 26, 0.9) 70%);
	border: 1px solid rgba(var(--color-accent-rgb), 0.35);
	box-shadow: var(--shadow-glow-strong);
	animation: staticGlobeSpin 40s linear infinite;
}

.hero-scroll__static-ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1px solid rgba(var(--color-accent-rgb), 0.25);
}

.hero-scroll__static-ring--1 {
	transform: rotateX(75deg);
}

.hero-scroll__static-ring--2 {
	transform: rotateX(75deg) rotateZ(60deg);
}

.hero-scroll__static-ring--3 {
	transform: rotateX(75deg) rotateZ(120deg);
}

@keyframes staticGlobeSpin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-scroll__static-globe {
		animation: none;
	}
}

/* HUD terminal-style text next to the globe */
.hero-scroll__hud {
	display: none;
	margin-top: 2rem;
	min-height: 2.4em;
	max-width: 90%;
	text-align: center;
	font-family: var(--font-mono);
	font-size: 1.05rem;
	color: var(--color-accent);
}

.hero-scroll__hud-line {
	display: inline-block;
}

.hero-scroll__cursor {
	display: inline-block;
	width: 0.55em;
	height: 1em;
	margin-left: 2px;
	background: var(--color-accent);
	vertical-align: -0.15em;
	animation: hudCursorBlink 1s steps(1) infinite;
}

@keyframes hudCursorBlink {
	0%,
	49% {
		opacity: 1;
	}
	50%,
	100% {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-scroll__cursor {
		animation: none;
	}
}
