/* ==========================================================================
   State-of-the-Art Superhero Effects & Modern Browser Technologies
   - Cross-Document View Transitions API (@view-transition)
   - Fixed Scroll-Progress Superhero Energy Bar
   - macOS Dock Magnification + Electric Shimmer on Top Navigation
   - 3D Holographic Trading-Card Tilt & Specular Glare
   - Interactive Full-Screen Gallery Lightbox
   - Ambient Floating Energy Embers Canvas
   ========================================================================== */

/* 1. Native Cross-Document MPA View Transitions (Zero-Flash Page Navigation) */
@view-transition {
	navigation: auto;
}

.ww-header {
	view-transition-name: ww-header;
}

::view-transition-old(root) {
	animation: ww-vt-fade-out 0.24s cubic-bezier(0.4, 0, 0.2, 1) both;
}

::view-transition-new(root) {
	animation: ww-vt-fade-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ww-vt-fade-out {
	from { opacity: 1; transform: scale(1); }
	to { opacity: 0; transform: scale(0.985); }
}

@keyframes ww-vt-fade-in {
	from { opacity: 0; transform: scale(1.012); }
	to { opacity: 1; transform: scale(1); }
}

/* 2. Top Scroll-Progress Superhero Energy Bar */
.ww-scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	z-index: 100001;
	background: linear-gradient(90deg, var(--ww-crimson) 0%, var(--ww-gold) 52%, var(--ww-hero-cyan) 100%);
	box-shadow: 0 0 12px rgba(86, 216, 255, 0.8), 0 0 6px rgba(255, 195, 66, 0.7);
	transform: scaleX(var(--ww-scroll-progress, 0));
	transform-origin: left center;
	pointer-events: none;
	will-change: transform;
}

/* 3. Ambient Floating Energy Embers Canvas */
.ww-embers-canvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	opacity: 0.7;
}

/* 4. macOS Dock Magnification + Electric Shimmer on Desktop Nav */
.ww-nav-list {
	overflow: visible !important;
}

.ww-nav-list > li {
	position: relative;
	z-index: 1;
	transform-origin: center bottom;
	transform: translateY(var(--dock-lift, 0px)) scale(var(--dock-scale, 1));
	transition:
		transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.24s ease,
		z-index 0s;
	will-change: transform;
}

.ww-nav-list > li.is-dock-active {
	z-index: 12;
}

.ww-nav-list > li.is-dock-neighbor {
	z-index: 6;
}

.ww-nav-list > li > a {
	position: relative;
	overflow: hidden;
}

/* Diagonal electric energy shimmer on hovered nav tab */
.ww-nav-list > li > a::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		110deg,
		transparent 20%,
		rgba(255, 255, 255, 0.55) 50%,
		transparent 80%
	);
	transform: translateX(-140%);
	transition: transform 0.55s ease;
	pointer-events: none;
}

.ww-nav-list > li.is-dock-active > a {
	border-radius: 8px;
	box-shadow:
		0 10px 24px rgba(0, 0, 0, 0.45),
		0 0 18px rgba(86, 216, 255, 0.65),
		0 0 8px rgba(255, 195, 66, 0.8);
}

.ww-nav-list > li.is-dock-active > a::after {
	transform: translateX(140%);
}

/* 5. 3D Holographic Trading-Card Tilt & Prismatic Rainbow Foil Glare */
.ww-tilt-card {
	position: relative;
	transform-style: preserve-3d;
	transform: perspective(950px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(var(--tilt-scale, 1));
	transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.ww-tilt-card::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background:
		radial-gradient(
			circle at var(--glare-x, 50%) var(--glare-y, 50%),
			rgba(255, 255, 255, 0.34) 0%,
			rgba(86, 216, 255, 0.2) 24%,
			rgba(255, 195, 66, 0.14) 45%,
			transparent 68%
		),
		linear-gradient(
			calc(var(--foil-angle, 125deg)),
			rgba(86, 216, 255, 0.18) 0%,
			rgba(255, 195, 66, 0.16) 35%,
			rgba(230, 62, 130, 0.12) 65%,
			rgba(86, 216, 255, 0.18) 100%
		);
	mix-blend-mode: screen;
	opacity: var(--glare-opacity, 0);
	transition: opacity 0.25s ease;
	pointer-events: none;
	z-index: 4;
}

/* Energy ripple click burst on buttons */
.ww-ripple-host {
	position: relative;
	overflow: hidden;
}

.ww-ripple {
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(86, 216, 255, 0.4) 50%, transparent 72%);
	transform: scale(0);
	animation: ww-ripple-burst 0.55s ease-out forwards;
	pointer-events: none;
}

@keyframes ww-ripple-burst {
	to {
		transform: scale(3.2);
		opacity: 0;
	}
}

/* Clickable lightbox cursor on gallery items */
.ww-gallery-card,
.ww-gallery-mobile-card,
.gallery-page-card {
	cursor: zoom-in;
}

/* 6. Cohesive Superhero Section Action Buttons */
.ww-cta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: 28px;
}

.ww-cta-row--center {
	justify-content: center;
}

.ww-btn-hero-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 26px;
	border-radius: var(--ww-radius-pill);
	border: 2px solid var(--ww-hero-cyan);
	background: rgba(6, 24, 54, 0.72);
	color: var(--ww-hero-white);
	font-family: var(--ww-font-hero-display);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 0 0 20px rgba(86, 216, 255, 0.2);
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ww-btn-hero-outline:hover,
.ww-btn-hero-outline:focus-visible {
	background: var(--ww-hero-cyan);
	border-color: var(--ww-hero-cyan);
	color: var(--ww-hero-bg);
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(86, 216, 255, 0.45);
}

.ww-btn-hero-dark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 55px;
	padding: 0 26px;
	border-radius: var(--ww-radius-pill);
	border: 2px solid var(--ww-ink);
	background: rgba(51, 51, 51, 0.1);
	color: var(--ww-ink);
	font-family: var(--ww-font-cta);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.ww-btn-hero-dark:hover,
.ww-btn-hero-dark:focus-visible {
	background: var(--ww-ink);
	color: var(--ww-gold);
	transform: translateY(-2px);
}

/* 7. Full-Screen Interactive Superhero Lightbox */
.ww-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100005;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	background: rgba(2, 9, 21, 0.92);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.ww-lightbox.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.ww-lightbox-stage {
	position: relative;
	max-width: min(92vw, 1080px);
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ww-lightbox-img {
	max-width: 100%;
	max-height: 76vh;
	width: auto;
	height: auto;
	border-radius: 16px;
	border: 2px solid var(--ww-gold);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 36px rgba(86, 216, 255, 0.25);
	transform: scale(0.94);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ww-lightbox.is-open .ww-lightbox-img {
	transform: scale(1);
}

.ww-lightbox-caption {
	margin: 14px 0 0;
	color: var(--ww-hero-white);
	font-family: var(--ww-font-hero-body);
	font-size: 15px;
	text-align: center;
	opacity: 0.9;
}

.ww-lightbox-close,
.ww-lightbox-nav {
	position: fixed;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid rgba(86, 216, 255, 0.4);
	background: rgba(6, 24, 54, 0.85);
	color: var(--ww-white);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ww-lightbox-close:hover,
.ww-lightbox-nav:hover {
	background: var(--ww-crimson);
	border-color: var(--ww-gold);
	transform: scale(1.08);
}

.ww-lightbox-close {
	top: 20px;
	right: 22px;
}

.ww-lightbox-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.ww-lightbox-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.ww-lightbox-prev:hover,
.ww-lightbox-next:hover {
	transform: translateY(-50%) scale(1.08);
}

/* Performance: native content-visibility on below-the-fold sections */
.ww-strength,
.ww-mission-steps,
.ww-gallery,
.ww-support {
	content-visibility: auto;
	contain-intrinsic-size: 1px 700px;
}

/* 8. Floating Superhero SFX Toggle Pill */
.ww-sfx-toggle {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1.5px solid rgba(86, 216, 255, 0.45);
	background: rgba(5, 18, 42, 0.88);
	color: rgba(238, 248, 255, 0.85);
	font-family: var(--ww-font-display);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
	transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ww-sfx-toggle.is-on {
	border-color: var(--ww-gold);
	color: var(--ww-gold);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 195, 66, 0.35);
}

.ww-sfx-toggle:hover,
.ww-sfx-toggle:focus-visible {
	transform: translateY(-2px);
	border-color: var(--ww-hero-cyan);
	color: var(--ww-white);
}

/* 9. About Us — Motto Callout, Video Theater & Join the Mission Card */
.ww-motto-callout {
	margin: 26px 0 0;
	padding: 20px 26px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(187, 6, 46, 0.22), rgba(86, 216, 255, 0.12));
	border: 1px solid rgba(255, 195, 66, 0.45);
	border-left: 5px solid var(--ww-gold);
	color: var(--ww-hero-white);
	font-family: var(--ww-font-display);
	font-size: clamp(22px, 2.8vw, 30px);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-align: center;
}

.ww-video-theater {
	margin-top: 34px;
	padding: 36px 40px;
	background: var(--ww-panel-bg);
	border: 1px solid var(--ww-panel-border);
	border-top: 4px solid var(--ww-gold);
	border-radius: var(--ww-radius-card);
	box-shadow: var(--ww-panel-glow);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.ww-video-header {
	text-align: center;
	margin-bottom: 24px;
}

.ww-video-kicker {
	margin: 0 0 6px;
	color: var(--ww-hero-cyan);
	font-family: var(--ww-font-display);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.ww-video-title {
	margin: 0 0 10px;
	color: var(--ww-gold);
	font-family: var(--ww-font-display);
	font-size: clamp(30px, 4vw, 48px);
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
}

.ww-video-sub {
	margin: 0 auto;
	max-width: 680px;
	color: rgba(238, 248, 255, 0.85);
	font-family: var(--ww-font-ui);
	font-size: 15.5px;
	line-height: 1.6;
}

.ww-video-secondary {
	margin-top: 32px;
	padding-top: 28px;
	border-top: 1px solid rgba(86, 216, 255, 0.2);
}

.ww-video-secondary h3 {
	margin: 0 0 14px;
	color: var(--ww-hero-white);
	font-family: var(--ww-font-display);
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 700;
	text-transform: uppercase;
	text-align: center;
}

/* Purposeful "Join the Mission" Command Banner (Clean Stacked Layout, Zero Overlap) */
.ww-about-cta-banner {
	margin-top: 34px;
	padding: 36px 40px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 32px;
	background: linear-gradient(135deg, rgba(187, 6, 46, 0.22), rgba(6, 24, 54, 0.9));
	border: 1.5px solid var(--ww-gold);
	border-radius: var(--radius-xl, 36px);
	box-shadow: var(--glass-specular), 0 18px 46px rgba(0, 0, 0, 0.55), 0 0 28px rgba(255, 195, 66, 0.16);
}

.ww-about-cta-emblem {
	width: 120px;
	height: 120px;
	object-fit: contain;
	filter: drop-shadow(0 0 18px rgba(255, 195, 66, 0.55));
	animation: ww-emblem-float 4.5s ease-in-out infinite;
}

.ww-about-cta-body h2 {
	margin: 0 0 10px;
	color: var(--ww-gold);
	font-family: var(--ww-font-display);
	font-size: clamp(28px, 3.6vw, 40px);
	font-weight: 700;
	line-height: 1.08;
	text-transform: uppercase;
}

.ww-about-cta-body p {
	margin: 0;
	color: rgba(238, 248, 255, 0.9);
	font-family: var(--ww-font-ui);
	font-size: 15.5px;
	line-height: 1.65;
}

@media (max-width: 960px) {
	.ww-video-theater,
	.ww-about-cta-banner {
		padding: 24px 18px;
	}

	.ww-about-cta-banner {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
		gap: 18px;
	}

	.ww-about-cta-banner .ww-cta-row {
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ww-embers-canvas,
	.ww-scroll-progress {
		display: none;
	}

	.ww-nav-list > li,
	.ww-tilt-card {
		transform: none !important;
		transition: none !important;
	}
}
