/* ===== SEO & Performance Optimizations ===== */

/* Screen reader only - for breadcrumb and hidden SEO content */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Content-visibility for off-screen sections (improves FCP/LCP) */
#services,
#portfolio,
#testimonials,
#contact,
#faq {
	content-visibility: auto;
	contain-intrinsic-size: auto 800px;
}

/* Reduce motion for accessibility (SEO accessibility signal) */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	.starfield,
	.blob,
	.shooting-star {
		display: none !important;
	}
}

/* Print stylesheet for SEO (Google can render print styles) */
@media print {
	.starfield,
	.blob,
	.glass-blobs,
	#webgl-container,
	#preloader {
		display: none !important;
	}
	body {
		background: white !important;
		color: black !important;
	}
	a[href]::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		color: #666;
	}
}

/* FAQ Section Styles */
#faq details summary {
	-webkit-tap-highlight-color: transparent;
}

#faq details summary::-webkit-details-marker {
	display: none;
}

#faq details[open] summary {
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 1rem;
	margin-bottom: 0.5rem;
}

#faq details[open] {
	border-color: rgba(139, 92, 246, 0.3);
}

/* Optimize font rendering for Core Web Vitals CLS */
body {
	text-rendering: optimizeSpeed;
	-webkit-text-size-adjust: 100%;
}

/* High contrast mode support (accessibility) */
@media (forced-colors: active) {
	.cta-button,
	.glassmorphism-header {
		border: 2px solid ButtonText;
	}
}

/* Focus visible styles for keyboard navigation (accessibility SEO) */
:focus-visible {
	outline: 2px solid #60a5fa;
	outline-offset: 2px;
	border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid #60a5fa;
	outline-offset: 2px;
}

/* ===== Lenis Smooth Scroll ===== */
html.lenis,
html.lenis body {
	height: auto;
}

.lenis.lenis-smooth {
	scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
	overscroll-behavior: contain;
}

.lenis.lenis-stopped {
	overflow: hidden;
}

/* ===== Starfield Background ===== */
.starfield {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.starfield .star {
	position: absolute;
	background: white;
	border-radius: 50%;
	opacity: 0.8;
	animation: starTwinkle linear infinite;
}

.starfield .star.small {
	animation-name: starTwinkleIntense;
}

@keyframes starTwinkle {
	0%,
	100% {
		opacity: 0.8;
	}
	50% {
		opacity: 0.2;
	}
}

@keyframes starTwinkleIntense {
	0%,
	100% {
		opacity: 1;
		transform: scale(1.2);
	}
	50% {
		opacity: 0.3;
		transform: scale(0.8);
	}
}

.starfield .shooting-star {
	position: absolute;
	width: 4px;
	height: 4px;
	background: #fff;
	border-radius: 50%;
	box-shadow:
		0 0 0 4px rgba(255, 255, 255, 0.1),
		0 0 0 8px rgba(255, 255, 255, 0.1),
		0 0 20px rgba(255, 255, 255, 1);
	animation: starAnimate 3s linear;
	opacity: 0;
}

.starfield .shooting-star::before {
	content: "";
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 150px;
	height: 1px;
	background: linear-gradient(90deg, #fff, transparent);
	left: 100%;
}

@keyframes starAnimate {
	0% {
		transform: rotate(315deg) translateX(0);
		opacity: 0;
	}
	10% {
		opacity: 1;
	}
	70% {
		opacity: 1;
	}
	100% {
		transform: rotate(315deg) translateX(-1000px);
		opacity: 0;
	}
}
/* ===== End Starfield ===== */

#root {
	position: relative;
	z-index: 1;
}

.video-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(5, 5, 15, 0.75) 0%,
		rgba(10, 15, 30, 0.6) 35%,
		rgba(10, 20, 40, 0.7) 70%,
		rgba(5, 15, 35, 0.85) 100%
	);
}
* {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
html {
	overflow-x: hidden;
}
body {
	background: linear-gradient(
		180deg,
		rgb(5, 5, 15) 0%,
		rgb(10, 15, 30) 25%,
		rgb(15, 20, 40) 50%,
		rgb(10, 25, 45) 75%,
		rgb(5, 15, 35) 100%
	);
	background-attachment: fixed;
	min-height: 100vh;
}

/* Preloader */
#preloader {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #0b0716;
	transition:
		opacity 0.6s ease,
		visibility 0.6s ease;
}
#preloader.is-loaded {
	opacity: 0;
	visibility: hidden;
}
.preloader-inner {
	text-align: center;
	transform: translateZ(0);
}
.preloader-moon {
	position: relative;
	--orbit-radius: 70px; /* distance from moon center */
	width: 96px;
	height: 96px;
	margin: 0 auto 24px;
	border-radius: 50%;
	background: radial-gradient(
		circle at 30% 30%,
		#f8f5ff 0%,
		#e8ddff 55%,
		#c9b6ff 100%
	);
	box-shadow: 0 0 35px rgba(181, 152, 255, 0.4);
	animation: moonPulse 3s ease-in-out infinite;
}
.preloader-moon-dot {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-left: -3px; /* half dot size */
	margin-top: -3px; /* half dot size */
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.8);
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
	animation: orbit 4.5s linear infinite;
	will-change: transform, opacity;
}
.preloader-moon-dot:nth-child(1) {
	--start-angle: 0deg;
	animation-delay: 0s;
}
.preloader-moon-dot:nth-child(2) {
	--start-angle: 72deg;
	animation-delay: -0.9s;
}
.preloader-moon-dot:nth-child(3) {
	--start-angle: 144deg;
	animation-delay: -1.8s;
}
.preloader-moon-dot:nth-child(4) {
	--start-angle: 216deg;
	animation-delay: -2.7s;
}
.preloader-moon-dot:nth-child(5) {
	--start-angle: 288deg;
	animation-delay: -3.6s;
}
@keyframes orbit {
	0% {
		transform: rotate(var(--start-angle)) translateX(var(--orbit-radius));
		opacity: 0.6;
	}
	50% {
		opacity: 1;
	}
	100% {
		transform: rotate(calc(var(--start-angle) + 360deg))
			translateX(var(--orbit-radius));
		opacity: 0.6;
	}
}
.preloader-title {
	font-size: clamp(1.5rem, 2vw + 1.25rem, 2.25rem);
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 18px;
}
.preloader-title span:first-child {
	color: #e8defb;
}
.preloader-title span:last-child {
	background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin-left: 8px;
}
.preloader-bar {
	position: relative;
	width: min(260px, 70vw);
	height: 3px;
	margin: 0 auto 14px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 999px;
	overflow: hidden;
}
.preloader-bar-fill {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 45%;
	background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
	border-radius: 999px;
	animation: loadingBar 2.2s ease-in-out infinite;
}
.preloader-subtitle {
	font-size: 0.75rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
}
@keyframes moonPulse {
	0%,
	100% {
		transform: scale(1);
		box-shadow: 0 0 25px rgba(181, 152, 255, 0.35);
	}
	50% {
		transform: scale(1.04);
		box-shadow: 0 0 45px rgba(181, 152, 255, 0.55);
	}
}
@keyframes loadingBar {
	0% {
		transform: translateX(-80%);
		opacity: 0.4;
	}
	50% {
		transform: translateX(20%);
		opacity: 1;
	}
	100% {
		transform: translateX(160%);
		opacity: 0.4;
	}
}
section {
	contain: layout style paint;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
}
.modern-heading {
	font-family:
		Inter,
		-apple-system,
		BlinkMacSystemFont,
		sans-serif;
	letter-spacing: -0.02em;
	font-weight: 900;
	text-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
	animation: titleGlow 3s ease-in-out infinite alternate;
	margin-bottom: 90px;
}
.modern-text-gradient-1 {
	background: linear-gradient(
		135deg,
		#ec680a 0%,
		#3081e4 25%,
		#e3ca0e 50%,
		#cb25e9 75%,
		#c2dd14 100%
	);
	background-size: 300% 300%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: gradientShift 4s ease-in-out infinite;
	text-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}
.modern-text-gradient-2 {
	background: linear-gradient(
		135deg,
		#d452eb 0%,
		#e67614 25%,
		#318af8 50%,
		#34d399 75%,
		#fbdb24 100%
	);
	background-size: 300% 300%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: gradientShift 4s ease-in-out infinite reverse;
	text-shadow: 0 0 30px rgba(96, 165, 250, 0.4);
}
@keyframes gradientShift {
	0%,
	100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}
@keyframes titleGlow {
	0% {
		filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
	}
	100% {
		filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.5));
	}
}
.modern-heading:hover {
	transform: scale(1.02);
	transition: transform 0.3s ease-out;
}
.hero-title {
	background: linear-gradient(
		120deg,
		#c7d2fe 0%,
		#a855f7 25%,
		#ec4899 50%,
		#60a5fa 75%,
		#fbcfe8 100%
	);
	background-size: 300% 300%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: gradientShift 5s ease-in-out infinite;
	text-shadow: 0 0 40px rgba(168, 85, 247, 0.35);
}
.hero-subtitle {
	font-size: clamp(1.1rem, 1.1rem + 0.4vw, 1.4rem);
	letter-spacing: 0.02em;
}
:root {
	--glass-bg: rgba(255, 255, 255, 0.05);
	--glass-border: rgba(255, 255, 255, 0.2);
	--glass-blur: blur(20px);
	--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
	--accent-glow: rgba(59, 130, 246, 0.3);
}
.glass-blobs {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
}
.blob {
	position: absolute;
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, var(--color) 0%, transparent 70%);
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.15;
	animation: blobFloat 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes blobFloat {
	0% {
		transform: translate(0, 0) scale(1);
	}
	100% {
		transform: translate(100px, 50px) scale(1.1);
	}
}
.glassmorphism-header {
	background: var(--glass-bg);
	backdrop-filter: var(--glass-blur);
	-webkit-backdrop-filter: var(--glass-blur);
	border-bottom: 1px solid var(--glass-border);
	box-shadow: var(--glass-shadow);
	position: relative;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
	z-index: 50;
}
.glassmorphism-header.is-transparent {
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	border-bottom-color: transparent;
	box-shadow: none;
}
.glassmorphism-nav-btn {
	position: relative;
	padding: 8px 16px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition:
		background 0.2s ease,
		transform 0.2s ease;
}
.glassmorphism-nav-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(59, 130, 246, 0.3);
	transform: translateY(-1px);
}
.glassmorphism-cta-btn {
	background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}
.glassmorphism-cta-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
#webgl-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	opacity: 0;
	transition: opacity 1s ease-in-out;
}
canvas {
	display: block;
}
.cta-button {
	position: relative;
	z-index: 20;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	white-space: nowrap;
	font-weight: 500;
	transition:
		transform 0.3s ease,
		background 0.3s ease,
		box-shadow 0.3s ease;
	outline: none;
	cursor: pointer;
	padding: 1rem 2rem;
	font-size: 1.125rem;
	line-height: 1.75rem;
	margin-bottom: 38px;
	border-radius: 9999px;
	background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
	color: #fff;
	box-shadow:
		0 10px 15px -3px rgba(37, 99, 235, 0.3),
		0 4px 6px -2px rgba(37, 99, 235, 0.1);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
}
.cta-button::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.2),
		transparent
	);
	transition: left 0.5s;
}
.cta-button:hover {
	transform: scale(1.05);
	background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
	box-shadow:
		0 20px 25px -5px rgba(37, 99, 235, 0.4),
		0 10px 10px -5px rgba(37, 99, 235, 0.2);
}
.cta-button:hover::before {
	left: 100%;
}
.cta-button:active {
	transform: scale(0.98);
}
@media (max-width: 767px) {
	html,
	body {
		overflow-x: hidden;
		width: 100%;
	}
	#hero {
		min-height: 100vh;
		padding-top: 80px;
	}
	.modern-heading {
		font-size: 2.5rem !important;
		line-height: 1.2;
		margin-bottom: 40px;
	}
	#hero p {
		font-size: 1rem !important;
		padding: 0 1rem;
	}
	.hero-subtitle {
		font-size: 1.1rem !important;
	}
	.cta-button {
		padding: 0.875rem 1.5rem;
		font-size: 1rem;
		min-height: 44px;
		min-width: 44px;
	}
	#hero .flex {
		flex-direction: column;
		gap: 1rem;
		width: 100%;
		padding: 0 1rem;
	}
	#hero button {
		width: 100%;
		max-width: 320px;
		min-height: 48px;
	}
	#hero .grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 1rem;
		padding: 0 1rem;
	}
	.glassmorphism-header {
		backdrop-filter: blur(12px) saturate(150%);
		-webkit-backdrop-filter: blur(12px) saturate(150%);
	}
	header {
		padding: 0 1rem;
	}
	body {
		touch-action: pan-y pan-x;
		-webkit-overflow-scrolling: touch;
	}
	#webgl-container {
		pointer-events: none;
	}
	#webgl-container canvas {
		pointer-events: auto;
	}
}
@media (min-width: 768px) and (max-width: 1023px) {
	.modern-heading {
		font-size: 3.5rem !important;
	}
	#hero .grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
