/**
 * Mesoxy Radiance 95% Black Luxury 3D Scrollytelling Experience
 * Deep 95% carbon/obsidian black (#0c0c0c) backdrop, 3D specular studio glass reflection,
 * tilted 3D orbital rings, physically reactive shadow, kinetic typography & SVG leader lines.
 */

/* Critical: Allow position:sticky to work inside theme's #container */
body.home #container {
	overflow: clip !important;
}

/* Outer Scroll Track */
.rx-scroll-track {
	position: relative;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	height: 270vh;
	background: #0c0c0c;
	color: #f5f5f5;
	box-sizing: border-box;
	z-index: 5;
}

/* Sticky Fullscreen 95% Black Stage */
.rx-sticky-stage {
	position: sticky;
	top: 0;
	width: 100%;
	height: 100vh;
	min-height: 700px;
	max-height: 1080px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: radial-gradient(ellipse 80% 75% at 50% 48%, #161616 0%, #0d0d0d 55%, #080808 100%);
	padding: 82px 36px 28px;
	box-sizing: border-box;
}

/* Atmospheric Backdrop, Fine Dots & Soft Studio Orbs */
.rx-backdrop {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 1;
}

.rx-noise {
	position: absolute;
	inset: 0;
	opacity: 0.04;
	background-image: radial-gradient(rgba(255, 255, 255, 0.85) 0.5px, transparent 0.5px);
	background-size: 24px 24px;
}

.rx-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(115px);
	will-change: transform;
	transition: background 0.6s ease;
}

.rx-orb-1 {
	width: 580px;
	height: 580px;
	top: 14%;
	left: 50%;
	transform: translateX(-50%);
	background: radial-gradient(circle, rgba(255, 255, 255, 0.09) 0%, rgba(56, 189, 248, 0.04) 55%, transparent 80%);
}

.rx-orb-2 {
	width: 500px;
	height: 500px;
	bottom: -12%;
	right: 12%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 60%, transparent 80%);
}

.rx-particles-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0.6;
}

/* Giant Kinetic Background Typography */
.rx-marquee-layer {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 30px;
	pointer-events: none;
	user-select: none;
	z-index: 2;
	overflow: hidden;
}

.rx-marquee-row {
	display: flex;
	align-items: center;
	gap: 44px;
	white-space: nowrap;
	font-size: clamp(72px, 10.5vw, 158px);
	font-weight: 800;
	letter-spacing: -2px;
	line-height: 0.92;
	will-change: transform;
}

.rx-marquee-top {
	color: rgba(255, 255, 255, 0.035);
	transform: translateX(-10%);
}

.rx-marquee-bottom {
	color: transparent;
	-webkit-text-stroke: 1px rgba(255, 255, 255, 0.08);
	transform: translateX(-25%);
}

.rx-marquee-row .rx-dot {
	color: rgba(255, 255, 255, 0.14);
	-webkit-text-stroke: 0;
}

/* Top Editorial HUD */
.rx-hud-top {
	position: relative;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 1380px;
	width: 100%;
	margin: 0 auto;
	padding-bottom: 6px;
}

.rx-hud-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2.2px;
	color: rgba(255, 255, 255, 0.72);
	text-transform: uppercase;
}

.rx-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 0 12px rgba(255, 255, 255, 0.85);
	animation: rxPulseGlow 2.2s infinite;
}

@keyframes rxPulseGlow {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(1.35); }
}

.rx-hud-progress-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rx-hud-label {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 1.8px;
	color: rgba(255, 255, 255, 0.5);
}

.rx-hud-bar {
	width: 110px;
	height: 3px;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 3px;
	overflow: hidden;
}

.rx-hud-bar-fill {
	width: 0%;
	height: 100%;
	background: linear-gradient(90deg, #ffffff, #38bdf8);
	border-radius: 3px;
	will-change: width;
}

.rx-hud-counter {
	font-size: 11px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #ffffff;
	min-width: 32px;
	text-align: right;
}

/* Center Title */
.rx-center-heading {
	position: relative;
	z-index: 6;
	text-align: center;
	margin: 0 auto;
	will-change: transform, opacity;
}

.rx-main-title {
	margin: 0;
	font-size: clamp(28px, 3.4vw, 44px);
	font-weight: 800;
	letter-spacing: 6px;
	line-height: 1.1;
	background: linear-gradient(180deg, #ffffff 25%, #a3a3a3 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.rx-main-sub {
	margin: 6px 0 0;
	font-size: 13.5px;
	font-weight: 400;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, 0.58);
}

/* Interactive 3D Orbit Arena */
.rx-arena {
	position: relative;
	z-index: 5;
	flex: 1;
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* SVG Leader Lines */
.rx-connector-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 2;
}

.rx-svg-path {
	fill: none;
	stroke-width: 1.35;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 420;
	stroke-dashoffset: 420;
	opacity: 0.65;
	transition: stroke-width 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.rx-svg-path.is-highlighted {
	stroke-width: 2.5;
	opacity: 1;
	filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}

.rx-svg-dot {
	fill: #ffffff;
	opacity: 0;
	filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));
	transition: opacity 0.35s ease, r 0.3s ease;
}

.rx-svg-dot.is-visible {
	opacity: 1;
}

.rx-svg-dot.is-highlighted {
	fill: #38bdf8;
	r: 6;
}

/* Center 3D Levitating Flakon Core */
.rx-vial-core {
	position: relative;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 380px;
	height: 460px;
	perspective: 1000px;
	transform-style: preserve-3d;
}

/* 3D Tilted Orbital Rings wrapping in perspective around the vial */
.rx-orbit-3d-wrap {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transform-style: preserve-3d;
	pointer-events: none;
}

.rx-orbit-ring {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	will-change: transform;
	transform-style: preserve-3d;
}

.rx-ring-outer {
	width: 410px;
	height: 410px;
	border: 1.2px dashed rgba(255, 255, 255, 0.22);
	box-shadow: 0 0 32px rgba(255, 255, 255, 0.04);
}

.rx-ring-inner {
	width: 310px;
	height: 310px;
	border: 1.4px solid rgba(255, 255, 255, 0.12);
	border-top-color: rgba(255, 255, 255, 0.78);
	border-bottom-color: rgba(56, 189, 248, 0.55);
}

/* Glowing 3D Molecular Beads orbiting on the tilted rings */
.rx-orbit-bead {
	position: absolute;
	border-radius: 50%;
}

.rx-bead-1 {
	top: -5px;
	left: 50%;
	width: 9px;
	height: 9px;
	margin-left: -4.5px;
	background: radial-gradient(circle at 30% 30%, #ffffff, #38bdf8);
	box-shadow: 0 0 14px rgba(56, 189, 248, 0.9);
}

.rx-bead-2 {
	bottom: -4px;
	left: 50%;
	width: 8px;
	height: 8px;
	margin-left: -4px;
	background: radial-gradient(circle at 30% 30%, #ffffff, #cbd5e1);
	box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
}

.rx-vial-aura {
	position: absolute;
	width: 270px;
	height: 340px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(56, 189, 248, 0.06) 50%, transparent 75%);
	filter: blur(38px);
	pointer-events: none;
	transition: background 0.5s ease, transform 0.5s ease;
}

/* 3D Vial Mover & Real-Time Specular Glass Reflection Shell */
.rx-vial-mover {
	position: relative;
	z-index: 6;
	will-change: transform;
	transform-style: preserve-3d;
}

.rx-vial-link {
	display: block;
	text-decoration: none;
}

.rx-vial-3d-shell {
	position: relative;
	display: inline-block;
	transform-style: preserve-3d;
}

.rx-vial-img {
	display: block !important;
	height: clamp(275px, 43vh, 395px) !important;
	max-height: 45vh !important;
	width: auto !important;
	max-width: none !important;
	object-fit: contain !important;
	filter:
		contrast(1.06)
		brightness(1.04)
		drop-shadow(0 30px 44px rgba(0, 0, 0, 0.85))
		drop-shadow(0 0 26px rgba(255, 255, 255, 0.14));
	transition: filter 0.35s ease;
}

.rx-vial-mover:hover .rx-vial-img {
	filter:
		contrast(1.08)
		brightness(1.07)
		drop-shadow(0 36px 52px rgba(0, 0, 0, 0.95))
		drop-shadow(0 0 38px rgba(56, 189, 248, 0.28));
}

/* Masked Dynamic Studio Softbox Glare sweeping across the glass cylinder */
.rx-vial-glare {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 8;
	-webkit-mask-image: var(--rx-vial-mask);
	mask-image: var(--rx-vial-mask);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	background: linear-gradient(
		112deg,
		rgba(255, 255, 255, 0) 22%,
		rgba(255, 255, 255, 0.08) 38%,
		rgba(255, 255, 255, 0.48) 48%,
		rgba(186, 230, 253, 0.24) 54%,
		rgba(255, 255, 255, 0) 68%
	);
	background-size: 240% 240%;
	background-position: 50% 50%;
	mix-blend-mode: screen;
	opacity: 0.85;
	will-change: background-position;
}

/* Cylindrical Glass Rim-Light */
.rx-vial-rimlight {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 7;
	-webkit-mask-image: var(--rx-vial-mask);
	mask-image: var(--rx-vial-mask);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.28) 0%,
		rgba(255, 255, 255, 0.14) 10%,
		rgba(255, 255, 255, 0) 25%,
		rgba(255, 255, 255, 0) 76%,
		rgba(255, 255, 255, 0.22) 91%,
		rgba(56, 189, 248, 0.35) 100%
	);
	mix-blend-mode: screen;
	opacity: 0.75;
}

/* Physically Reactive Ground Shadow underneath the levitating flakon */
.rx-vial-floor-shadow {
	position: absolute;
	bottom: 8px;
	left: 50%;
	width: 170px;
	height: 26px;
	margin-left: -85px;
	border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 75%);
	filter: blur(10px);
	pointer-events: none;
	will-change: transform, opacity;
	z-index: 3;
}

/* Floating Smoked-Black Glass Ingredient Nodes */
.rx-nodes-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 6;
}

.rx-node {
	position: absolute;
	width: 292px;
	pointer-events: auto;
	opacity: 0;
	will-change: transform, opacity, filter;
	transition: opacity 0.25s ease;
}

.rx-node.pos-tl { top: 8%; left: 1%; }
.rx-node.pos-ml { top: 41%; left: 0%; }
.rx-node.pos-bl { bottom: 6%; left: 1%; }

.rx-node.pos-tr { top: 8%; right: 1%; }
.rx-node.pos-mr { top: 41%; right: 0%; }
.rx-node.pos-br { bottom: 6%; right: 1%; }

.rx-node-glass {
	position: relative;
	padding: 16px 18px;
	border-radius: 16px;
	background: rgba(20, 20, 20, 0.72);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border: 1px solid rgba(255, 255, 255, 0.11);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
	transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
}

.rx-node-glass::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 16px;
	padding: 1px;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 60%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0.45;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.rx-node:hover .rx-node-glass {
	background: rgba(26, 26, 26, 0.92);
	border-color: rgba(255, 255, 255, 0.28);
	transform: translateY(-4px) scale(1.03);
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.75), 0 0 24px rgba(255, 255, 255, 0.08);
}

.rx-node:hover .rx-node-glass::before {
	opacity: 1;
}

.rx-nodes-layer.has-hover .rx-node:not(:hover) {
	opacity: 0.40 !important;
}

.rx-side-left .rx-node-glass {
	text-align: right;
}

.rx-side-left .rx-node-top {
	flex-direction: row-reverse;
}

.rx-node-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.rx-node-num {
	font-size: 11px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.42);
	font-variant-numeric: tabular-nums;
}

.rx-node-code {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.9px;
	color: #38bdf8;
	background: rgba(56, 189, 248, 0.1);
	border: 1px solid rgba(56, 189, 248, 0.24);
	padding: 2px 9px;
	border-radius: 20px;
}

.rx-node-name {
	margin: 0 0 3px;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.2px;
	line-height: 1.25;
}

.rx-node-role {
	font-size: 11.5px;
	font-weight: 600;
	color: #7dd3fc;
	margin-bottom: 6px;
}

.rx-node-desc {
	margin: 0;
	font-size: 12px;
	line-height: 1.48;
	color: rgba(255, 255, 255, 0.68);
}

/* Bottom HUD & CTAs */
.rx-hud-bottom {
	position: relative;
	z-index: 7;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding-top: 6px;
}

.rx-scroll-cue {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, 0.55);
	text-transform: uppercase;
	transition: opacity 0.4s ease;
}

.rx-mouse-icon {
	width: 16px;
	height: 24px;
	border: 1.5px solid rgba(255, 255, 255, 0.45);
	border-radius: 10px;
	display: inline-flex;
	justify-content: center;
	padding-top: 4px;
	box-sizing: border-box;
}

.rx-mouse-wheel {
	width: 2.5px;
	height: 5px;
	background: #ffffff;
	border-radius: 2px;
	animation: rxWheel 1.6s infinite;
}

@keyframes rxWheel {
	0% { transform: translateY(0); opacity: 1; }
	100% { transform: translateY(8px); opacity: 0; }
}

.rx-cta-group {
	display: flex;
	align-items: center;
	gap: 14px;
}

.rx-cta-primary {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 28px;
	border-radius: 40px;
	background: #ffffff;
	color: #0c0c0c !important;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-decoration: none !important;
	box-shadow: 0 10px 28px rgba(255, 255, 255, 0.14);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rx-cta-primary:hover {
	background: #38bdf8;
	color: #0c0c0c !important;
	transform: translateY(-2px) scale(1.03);
	box-shadow: 0 14px 36px rgba(56, 189, 248, 0.4);
}

.rx-cta-primary svg {
	transition: transform 0.25s ease;
}

.rx-cta-primary:hover svg {
	transform: translateX(4px);
}

.rx-cta-ghost {
	display: inline-flex;
	align-items: center;
	padding: 12px 24px;
	border-radius: 40px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #e5e5e5 !important;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none !important;
	backdrop-filter: blur(10px);
	transition: all 0.25s ease;
}

.rx-cta-ghost:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.45);
	color: #ffffff !important;
	transform: translateY(-2px);
}

/* Responsive Tablet & Mobile */
@media screen and (max-width: 1180px) {
	.rx-node {
		width: 245px;
	}
	.rx-node-glass {
		padding: 13px 15px;
	}
	.rx-node-name {
		font-size: 14.5px;
	}
	.rx-node-desc {
		font-size: 11.5px;
	}
}

@media screen and (max-width: 991px) {
	.rx-scroll-track {
		height: auto;
	}
	.rx-sticky-stage {
		position: relative;
		height: auto;
		min-height: 0;
		max-height: none;
		padding: 56px 18px 64px;
		gap: 26px;
	}
	.rx-hud-progress-wrap,
	.rx-connector-svg,
	.rx-scroll-cue {
		display: none !important;
	}
	.rx-hud-top {
		justify-content: center;
	}
	.rx-arena {
		flex-direction: column;
		gap: 28px;
	}
	.rx-vial-core {
		width: 260px;
		height: 320px;
	}
	.rx-ring-outer {
		width: 280px;
		height: 280px;
	}
	.rx-ring-inner {
		width: 210px;
		height: 210px;
	}
	.rx-vial-img {
		height: 255px !important;
		max-height: 255px !important;
		width: auto !important;
	}
	.rx-nodes-layer {
		position: relative;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		width: 100%;
		pointer-events: auto;
	}
	.rx-node {
		position: relative;
		top: auto !important;
		bottom: auto !important;
		left: auto !important;
		right: auto !important;
		width: 100%;
		opacity: 1 !important;
		filter: none !important;
		transform: none !important;
	}
	.rx-side-left .rx-node-glass {
		text-align: left;
	}
	.rx-side-left .rx-node-top {
		flex-direction: row;
	}
}

@media screen and (max-width: 600px) {
	.rx-nodes-layer {
		grid-template-columns: 1fr;
	}
	.rx-cta-group {
		flex-direction: column;
		width: 100%;
	}
	.rx-cta-primary,
	.rx-cta-ghost {
		width: 100%;
		justify-content: center;
	}
}
