/* ============================================================
   RocketX Hero
   ============================================================ */

.rx-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: #fff;
	background: var(--rx-navy);
	min-height: clamp(640px, 92vh, 960px);
	padding: clamp(5rem, 9vw, 8rem) clamp(1.5rem, 4vw, 4rem) clamp(7rem, 12vw, 10rem);
	/* break out of any theme max-width container */
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* ---------- Background layers ---------- */
.rx-hero__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(120% 80% at 75% 30%, rgba(220, 79, 44, 0.18) 0%, transparent 55%),
		radial-gradient(80% 60% at 15% 85%, rgba(31, 39, 71, 0.9) 0%, transparent 60%),
		linear-gradient(180deg, #0B1023 0%, #070A18 100%);
}

.rx-hero__grid {
	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: 80px 80px;
	mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, #000 30%, transparent 80%);
	-webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 50%, #000 30%, transparent 80%);
}

.rx-hero__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.55;
}

.rx-hero__glow--a {
	width: 520px;
	height: 520px;
	right: -120px;
	top: -120px;
	background: radial-gradient(circle, var(--rx-orange) 0%, transparent 65%);
}

.rx-hero__glow--b {
	width: 420px;
	height: 420px;
	left: -100px;
	bottom: -100px;
	background: radial-gradient(circle, #2A6CFF 0%, transparent 65%);
	opacity: 0.35;
}

/* ---------- Layout ---------- */
.rx-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 1320px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(2rem, 4vw, 5rem);
	align-items: center;
}

@media (max-width: 960px) {
	.rx-hero__inner {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
}

.rx-hero__content {
	display: flex;
	flex-direction: column;
	gap: var(--rx-s-3);
	max-width: 620px;
}

/* ---------- Typography ---------- */
.rx-hero__eyebrow {
	display: inline-block;
	width: max-content;
	font-size: var(--rx-fs-xs);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--rx-orange-300);
	padding: 0.5rem 1rem;
	border: 1px solid rgba(220, 79, 44, 0.35);
	border-radius: var(--rx-r-pill);
	background: rgba(220, 79, 44, 0.08);
}

.rx-hero__headline {
	font-size: var(--rx-fs-display);
	line-height: 1.04;
	letter-spacing: -0.02em;
	font-weight: 600;
	margin: 0;
	color: #fff;
}

.rx-hero__headline em {
	font-style: normal;
	background: linear-gradient(135deg, var(--rx-orange-300) 0%, var(--rx-orange) 60%, #FFB088 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.rx-hero__sub {
	font-size: var(--rx-fs-md);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.72);
	margin: 0;
	max-width: 520px;
}

/* ---------- CTAs ---------- */
.rx-hero__cta-row {
	display: flex;
	gap: var(--rx-s-2);
	flex-wrap: wrap;
	margin-top: var(--rx-s-2);
}

.rx-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.95rem 1.6rem;
	border-radius: var(--rx-r-pill);
	font-size: var(--rx-fs-sm);
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: transform var(--rx-dur-fast) var(--rx-ease-out),
	            box-shadow var(--rx-dur-fast) var(--rx-ease-out),
	            background var(--rx-dur-fast) var(--rx-ease-out);
	border: 1px solid transparent;
}

.rx-btn--primary {
	background: linear-gradient(135deg, var(--rx-orange) 0%, var(--rx-orange-600) 100%);
	color: #fff;
	box-shadow:
		inset 0 1px 0 0 rgba(255, 255, 255, 0.25),
		0 8px 24px rgba(220, 79, 44, 0.35);
}

.rx-btn--primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 32px rgba(220, 79, 44, 0.5);
}

.rx-btn--ghost {
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.rx-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.28);
}

/* ---------- Trust badge ---------- */
.rx-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 1.1rem;
	margin-top: var(--rx-s-2);
	width: max-content;
	max-width: 100%;
	font-size: var(--rx-fs-xs);
	letter-spacing: 0.04em;
	color: rgba(255, 255, 255, 0.85);
	border-radius: var(--rx-r-pill);
}

.rx-hero__badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4ADE80;
	box-shadow: 0 0 12px rgba(74, 222, 128, 0.7);
}

/* ---------- Spline scene ---------- */
.rx-hero__scene {
	position: relative;
	aspect-ratio: 1 / 1;
	min-height: 460px;
	max-height: 700px;
	width: 100%;
	will-change: transform;
	overflow: visible;
}

.rx-hero__three-canvas {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: var(--rx-r-xl);
	background: transparent;
	cursor: grab;
	touch-action: none; /* let OrbitControls handle touch gestures */
}

.rx-hero__three-canvas:active {
	cursor: grabbing;
}

/* Mobile poster fallback — hidden by default; JS toggles .rx-hero__scene--mobile on the wrapper to swap. */
.rx-hero__scene-mobile {
	display: none;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: var(--rx-r-xl);
}

.rx-hero__scene--mobile .rx-hero__three-canvas {
	display: none;
}

.rx-hero__scene--mobile .rx-hero__scene-mobile {
	display: block;
}

.rx-hero__scene-placeholder {
	position: relative;
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	border-radius: var(--rx-r-xl);
	background:
		radial-gradient(circle at 50% 45%, rgba(220, 79, 44, 0.4) 0%, transparent 55%),
		linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
	border: 1px solid rgba(255, 255, 255, 0.08);
	overflow: hidden;
}

.rx-hero__scene-placeholder-orb {
	width: 60%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #FF8C5A 0%, var(--rx-orange) 35%, #5A1B0E 80%);
	box-shadow:
		inset -20px -30px 80px rgba(0, 0, 0, 0.6),
		0 30px 80px rgba(220, 79, 44, 0.4);
	animation: rx-orb-float 9s ease-in-out infinite;
}

.rx-hero__scene-placeholder-note {
	position: absolute;
	bottom: 1rem;
	font-size: var(--rx-fs-xs);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
	margin: 0;
}

@keyframes rx-orb-float {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	50%      { transform: translateY(-18px) rotate(2deg); }
}

/* ---------- Trust band (stat strip below hero) ---------- */
.rx-trust-band {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: rgba(7, 10, 24, 0.96);
	border-top: 1px solid rgba(255, 255, 255, 0.07);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rx-trust-band__inner {
	max-width: 1320px;
	margin: 0 auto;
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
}

.rx-trust-band__inner::-webkit-scrollbar { display: none; }

.rx-trust-band__item {
	flex: 1 1 0;
	min-width: 160px;
	padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1rem, 2vw, 2rem);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	text-align: center;
	border-right: 1px solid rgba(255, 255, 255, 0.06);
	transition: background var(--rx-dur-fast);
}

.rx-trust-band__item:last-child { border-right: none; }

.rx-trust-band__item:hover {
	background: rgba(255, 255, 255, 0.025);
}

.rx-trust-band__value {
	font-size: clamp(1.5rem, 2.5vw, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	color: #fff;
	line-height: 1;
}

.rx-trust-band__label {
	font-size: var(--rx-fs-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	/* Raised from 0.48 for WCAG AA (4.5:1) contrast on the dark band. */
	color: rgba(255, 255, 255, 0.62);
	margin-top: 0.1rem;
}

.rx-trust-band__text {
	font-size: var(--rx-fs-xs);
	line-height: 1.45;
	/* Raised from 0.28 (~2:1, failed AA) — this carries the FSP/ODP
	   regulatory disclosure and must be legible. Now ~4.5:1. */
	color: rgba(255, 255, 255, 0.62);
	margin-top: 0.15rem;
}

@media (max-width: 680px) {
	.rx-trust-band__inner {
		flex-wrap: wrap;
	}
	.rx-trust-band__item {
		flex-basis: 50%;
		min-width: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	}
	.rx-trust-band__item:nth-child(even) { border-right: none; }
	.rx-trust-band__item:nth-last-child(-n+2) { border-bottom: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.rx-hero__scene-placeholder-orb {
		animation: none;
	}
}

/* ============================================================
   Globe label overlay
   Positioned absolutely over the Three.js canvas.
   JS sets transform: translate(x, y) each frame.
   ============================================================ */

.rx-globe__labels {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: visible;
}

.rx-globe__label {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: flex-start;
	gap: 5px;
	opacity: 0;
	white-space: nowrap;
	pointer-events: none;
	will-change: transform, opacity;
}

.rx-globe__label-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.rx-globe__label-head {
	display: flex;
	align-items: center;
	gap: 5px;
}

.rx-globe__label-dot {
	flex-shrink: 0;
	margin-top: 2px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #00e5ff;
	box-shadow: 0 0 6px #00e5ff, 0 0 14px rgba(0, 229, 255, 0.45);
}

.rx-globe__label-name {
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1;
}

.rx-globe__label-sub {
	font-size: 9px;
	color: rgba(255, 255, 255, 0.48);
	letter-spacing: 0.06em;
	line-height: 1;
}

.rx-globe__label-ticker {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 8px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.5;
	padding: 1px 6px 1px 4px;
	border-radius: var(--rx-r-pill, 999px);
	width: fit-content;
}

.rx-globe__label-ticker--up {
	color: #4ADE80;
	background: rgba(74, 222, 128, 0.10);
	border: 1px solid rgba(74, 222, 128, 0.22);
}

.rx-globe__label-ticker--dn {
	color: #FF8C8C;
	background: rgba(255, 107, 107, 0.10);
	border: 1px solid rgba(255, 107, 107, 0.22);
}

@media (prefers-reduced-motion: reduce) {
	.rx-globe__label {
		opacity: 1;
	}
}
