/**
 * TLW Intro Animation - Frontend Stylesheet
 * Scoped strictly to #tlw-intro-overlay and tlw-intro- classes to prevent any theme conflicts.
 */

/* Prevent scroll during intro */
html.tlw-intro-active,
body.tlw-intro-active {
	overflow: hidden !important;
	height: 100% !important;
	touch-action: none;
}

/* Base Fullscreen Overlay (Full viewport, strictly zero-transform to match getBoundingClientRect coordinates) */
#tlw-intro-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	user-select: none;
	-webkit-user-select: none;
	pointer-events: all;
	background: transparent;
	transform: none !important;
	perspective: none !important;
}

/* Dedicated Flying Logo Proxy */
#tlw-flying-logo-proxy {
	position: fixed !important;
	z-index: 2147483647 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	transform: none !important;
	transform-origin: top left !important;
	pointer-events: none !important;
	box-sizing: border-box !important;
	will-change: left, top, width, height, opacity, filter !important;
}

/* Ambient Radial Vignette */
.tlw-intro-vignette {
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 220px rgba(0, 0, 0, 0.75);
	pointer-events: none;
	z-index: 1;
}

/* Conic Light Rays */
.tlw-intro-rays {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 900px;
	height: 900px;
	margin-top: -450px;
	margin-left: -450px;
	background: conic-gradient(
		rgba(120, 255, 180, 0.4),
		transparent 20%,
		rgba(120, 255, 180, 0.4),
		transparent 40%,
		rgba(120, 255, 180, 0.4),
		transparent 60%,
		rgba(120, 255, 180, 0.4),
		transparent 80%
	);
	border-radius: 50%;
	opacity: 0;
	filter: blur(45px);
	pointer-events: none;
	z-index: 2;
	transform-origin: center center;
}

/* Particle Canvas */
.tlw-intro-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 3;
}

/* Center Stage Content */
.tlw-intro-stage {
	position: relative;
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
	max-width: 100%;
	box-sizing: border-box;
}

/* Logo Wrapper & Logo */
.tlw-intro-logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

#tlw-intro-logo {
	display: block;
	max-width: 100%;
	height: auto;
	opacity: 0;
	transform-origin: center center;
	filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
	will-change: transform, opacity, filter;
}

/* Verse / Message Container */
.tlw-intro-verse-container {
	margin-top: 32px;
	max-width: 650px;
	opacity: 0;
	transform-origin: center top;
	will-change: transform, opacity, filter;
	text-align: center;
	padding: 0 16px;
}

.tlw-intro-verse-body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 20px;
	line-height: 1.6;
	color: #f1f5f9;
	font-weight: 400;
	letter-spacing: 0.3px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.tlw-intro-verse-ref {
	display: inline-block;
	margin-top: 10px;
	font-size: 15px;
	color: #a7f3d0;
	font-weight: 500;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	opacity: 0.95;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

/* Skip Intro Button */
.tlw-intro-skip-button {
	position: absolute;
	top: 28px;
	right: 28px;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #e2e8f0;
	padding: 8px 16px;
	font-size: 13px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-weight: 500;
	border-radius: 9999px;
	cursor: pointer;
	transition: all 0.25s ease;
	outline: none;
}

.tlw-intro-skip-button:hover,
.tlw-intro-skip-button:focus {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.4);
	color: #ffffff;
	transform: translateY(-1px);
}

.tlw-intro-skip-button kbd {
	background: rgba(0, 0, 0, 0.35);
	color: #cbd5e1;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 11px;
	font-family: inherit;
	border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Flight Motion Blur Utility Class */
.tlw-logo-flying {
	filter: drop-shadow(0 0 25px rgba(120, 255, 180, 0.85)) blur(1px) !important;
}

/* Header Reveal Transition Class */
.tlw-header-revealing {
	transition: opacity 1.05s cubic-bezier(0.16, 1, 0.3, 1), transform 1.05s cubic-bezier(0.16, 1, 0.3, 1) !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

/* Responsive Rules */
@media (max-width: 768px) {
	.tlw-intro-rays {
		width: 450px;
		height: 450px;
		margin-top: -225px;
		margin-left: -225px;
	}

	.tlw-intro-verse-container {
		margin-top: 24px;
		max-width: 320px;
	}

	.tlw-intro-verse-body {
		font-size: 16px;
		line-height: 1.5;
	}

	.tlw-intro-verse-ref {
		font-size: 13px;
	}

	.tlw-intro-skip-button {
		top: 16px;
		right: 16px;
		padding: 6px 12px;
		font-size: 12px;
	}
}

@media (max-width: 390px) {
	.tlw-intro-stage {
		padding: 12px;
	}

	.tlw-intro-verse-body {
		font-size: 15px;
	}
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.tlw-intro-rays {
		display: none !important;
	}
	.tlw-intro-canvas {
		display: none !important;
	}
}

