/* ============================================
   STUNNING LANDING PAGE ENHANCEMENTS
   Inspired by LTX Studio & Radiate Design System
   ============================================ */

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Custom Cursor (Desktop Only) */
@media (min-width: 1024px) {
  body {
    cursor: none;
  }

  .custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    mix-blend-mode: difference;
  }

  .custom-cursor.hover {
    width: 60px;
    height: 60px;
    border-color: var(--accent);
    background: rgba(60, 240, 255, 0.1);
  }

  a, button, .btn {
    cursor: pointer;
  }
}

/* Enhanced Hero Carousel Styles */
.hero-carousel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

/* Background Image Layers with Parallax */
.hero-backgrounds {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 20s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.hero-bg-image.active {
  opacity: 1;
  transform: scale(1.05);
}

/* Cinematic Overlay with Gradient */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(5, 6, 13, 0.85) 0%,
    rgba(16, 20, 44, 0.75) 40%,
    rgba(6, 32, 56, 0.82) 100%
  );
  backdrop-filter: blur(2px) saturate(130%);
}

/* Dynamic Gradient Overlays */
.hero-carousel.gradient-purple .hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(46, 163, 255, 0.25) 0%,
    rgba(25, 181, 255, 0.15) 45%,
    rgba(5, 6, 13, 0.85) 100%
  );
}

.hero-carousel.gradient-blue .hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(60, 240, 255, 0.22) 0%,
    rgba(16, 181, 212, 0.15) 45%,
    rgba(5, 6, 13, 0.85) 100%
  );
}

.hero-carousel.gradient-green .hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.22) 0%,
    rgba(60, 240, 255, 0.15) 45%,
    rgba(5, 6, 13, 0.85) 100%
  );
}

.hero-carousel.gradient-orange .hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.25) 0%,
    rgba(239, 68, 68, 0.15) 45%,
    rgba(5, 6, 13, 0.85) 100%
  );
}

/* Hero Content Positioning */
.hero-carousel .hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
  padding: var(--space-4xl) 0;
}

/* Hero Text Transitions */
.hero-text-wrapper {
  position: relative;
  min-height: 300px;
  margin-bottom: var(--space-xl);
}

.hero-text {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-text.active {
  opacity: 1;
  pointer-events: auto;
}

/* Stunning Typography with Gradient */
.hero-title {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 20px 60px rgba(46, 163, 255, 0.4);
  position: relative;
}

.hero-subtitle {
  font-size: clamp(18px, 2.5vw, 28px);
  line-height: 1.6;
  color: rgba(223, 227, 245, 0.85);
  max-width: 700px;
  margin: 0 auto;
  font-weight: 400;
}

/* Fade In Up Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-up-delay {
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
  opacity: 0;
}

.fade-in-up-delay-2 {
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
  opacity: 0;
}

/* Slide Indicators with Progress Animation */
.slide-indicators {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: var(--space-2xl);
}

.indicator {
  position: relative;
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scaleY(1.5);
}

.indicator-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.indicator.active .indicator-progress {
  animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
  from { width: 0; }
  to { width: 100%; }
}

/* Floating Ambient Elements */
.floating-elements {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.float-1, .float-2, .float-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  mix-blend-mode: screen;
}

.float-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(46, 163, 255, 0.5) 0%, transparent 70%);
  top: 10%;
  right: 5%;
  animation: float-1 15s ease-in-out infinite;
}

.float-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 77, 148, 0.4) 0%, transparent 70%);
  bottom: 15%;
  left: 10%;
  animation: float-2 18s ease-in-out infinite;
}

.float-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(60, 240, 255, 0.35) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float-3 20s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, -40px) scale(1.1); }
  66% { transform: translate(40px, -30px) scale(0.9); }
}

@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, 30px) scale(0.9); }
  66% { transform: translate(-30px, 40px) scale(1.1); }
}

@keyframes float-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  33% { transform: translate(-50%, -50%) scale(1.2) rotate(120deg); }
  66% { transform: translate(-50%, -50%) scale(0.8) rotate(240deg); }
}

/* Enhanced Feature Cards with Micro-interactions */
.feature-card,
.feature-bento__card,
.toolkit-summary__card,
.story-card {
  position: relative;
  transition: all var(--transition-normal);
}

.feature-card::before,
.feature-bento__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(46, 163, 255, 0.0) 0%,
    rgba(60, 240, 255, 0.08) 100%
  );
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
  z-index: 0;
}

.feature-card:hover::before,
.feature-bento__card:hover::before {
  opacity: 1;
}

.feature-card:hover,
.feature-bento__card:hover,
.toolkit-summary__card:hover,
.story-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 40px 90px rgba(46, 163, 255, 0.35);
}

/* Scroll-Triggered Stagger Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal-delay-1 {
  transition-delay: 0.1s;
}

.scroll-reveal-delay-2 {
  transition-delay: 0.2s;
}

.scroll-reveal-delay-3 {
  transition-delay: 0.3s;
}

.scroll-reveal-delay-4 {
  transition-delay: 0.4s;
}

/* Parallax Sections */
.parallax-section {
  position: relative;
  transform-style: preserve-3d;
}

.parallax-bg {
  position: absolute;
  inset: -10%;
  z-index: -1;
  transform: translateZ(-1px) scale(2);
  background-size: cover;
  background-position: center;
}

/* Enhanced Glassmorphism */
.glass-card {
  background: rgba(15, 18, 38, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(5, 6, 13, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Animated Gradient Text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Enhanced Button Hover Effects */
.btn {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: scale(0.98);
}

/* Magnetic Button Effect (Desktop) */
@media (min-width: 1024px) {
  .btn-magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Shimmer Effect for Cards */
.shimmer-effect {
  position: relative;
  overflow: hidden;
}

.shimmer-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Section Dividers with Glow */
.section-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(46, 163, 255, 0.5) 50%,
    transparent 100%
  );
  margin: var(--space-3xl) 0;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 20px var(--primary);
}

/* Video Fade-In Animation */
.video-fade-in {
  opacity: 0;
  animation: videoFadeIn 1.5s ease-in-out forwards;
}

@keyframes videoFadeIn {
  to { opacity: 1; }
}

/* Hover Lift Animation */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 70px rgba(46, 163, 255, 0.4);
}

/* Text Reveal Animation */
.text-reveal {
  overflow: hidden;
  display: inline-block;
}

.text-reveal span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: textReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes textReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulsing Glow Effect */
.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(46, 163, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(46, 163, 255, 0.6);
  }
}

/* Responsive Mobile Enhancements */
@media (max-width: 768px) {
  .hero-carousel {
    min-height: 100svh;
  }

  .hero-text-wrapper {
    min-height: 250px;
  }

  .hero-title {
    font-size: clamp(36px, 10vw, 64px);
  }

  .floating-elements {
    display: none;
  }

  .custom-cursor {
    display: none;
  }

  /* Reduce animation intensity on mobile */
  .hero-bg-image.active {
    transform: scale(1.02);
  }

  .scroll-reveal {
    transform: translateY(30px);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(28px, 12vw, 48px);
  }

  .hero-subtitle {
    font-size: clamp(16px, 4vw, 20px);
  }

  .slide-indicators {
    gap: 8px;
  }

  .indicator {
    width: 40px;
    height: 3px;
  }
}

/* Loading State Animations */
.skeleton-loader {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Futuristic Logo Treatment */
.logo {
  --logo-glow: 1;
  --logo-progress: 1;
  --logo-tilt: 0deg;
  --logo-sheen: 0%;
}

.logo img {
  display: block;
  height: var(--logo-size);
  width: auto;
  filter:
    drop-shadow(0 10px 28px rgba(46, 163, 255, calc(0.25 + (0.25 * var(--logo-glow, 1)))))
    drop-shadow(0 0 24px rgba(60, 240, 255, calc(0.18 + (0.12 * var(--logo-glow, 1)))));
  transform:
    translateZ(0)
    scale(calc(0.92 + (0.1 * var(--logo-progress, 1))))
    rotate(var(--logo-tilt, 0deg));
  transition:
    filter 0.45s ease,
    transform 0.55s cubic-bezier(0.25, 1, 0.3, 1);
}

.logo::before {
  animation: logoGlow 22s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% {
    opacity: 0.28;
  }
  45% {
    opacity: 0.5;
  }
}

.header.scrolled .logo {
  --logo-glow: 0.6;
  --logo-progress: 0.75;
  --logo-sheen: 28%;
  border-color: rgba(46, 163, 255, 0.5);
  box-shadow:
    0 18px 60px rgba(5, 6, 15, 0.68),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 60px rgba(60, 240, 255, 0.25);
  background: linear-gradient(
    135deg,
    rgba(6, 8, 20, 0.9) 0%,
    rgba(16, 20, 44, 0.82) 45%,
    rgba(6, 32, 56, 0.9) 100%
  );
}

.header.scrolled .logo::before {
  opacity: 0.52;
  transform: rotate(4deg) scale(1.06);
}

.header.scrolled .logo::after {
  opacity: 0.95;
}

.header.scrolled .header-logo {
  filter:
    drop-shadow(0 10px 28px rgba(46, 163, 255, 0.45))
    drop-shadow(0 0 24px rgba(60, 240, 255, 0.28))
    saturate(1.1);
}

/* Improved Focus States for Accessibility */
.btn:focus-visible,
.indicator:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

/* Performance Optimizations */
.feature-card,
.hero-bg-image,
.floating-elements > div {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Enhanced Header Scroll Effect */
.header.scrolled {
  background: linear-gradient(
    135deg,
    rgba(5, 7, 18, 0.96) 0%,
    rgba(12, 16, 38, 0.94) 38%,
    rgba(6, 28, 52, 0.96) 100%
  );
  backdrop-filter: blur(32px) saturate(260%);
  -webkit-backdrop-filter: blur(32px) saturate(260%);
  box-shadow:
    0 24px 70px rgba(5, 6, 15, 0.7),
    0 0 0 1px rgba(46, 163, 255, 0.08);
  border-bottom-color: rgba(46, 163, 255, 0.2);
}

/* CTA Section Enhanced */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    rgba(46, 163, 255, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Feature Highlights Enhanced */
.feature-highlights {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--space-xl) 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(15, 18, 38, 0.7);
  border: 1px solid rgba(46, 163, 255, 0.3);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  transition: all var(--transition-normal);
}

.highlight-item:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 163, 255, 0.6);
  background: rgba(15, 18, 38, 0.85);
  box-shadow: 0 12px 32px rgba(46, 163, 255, 0.25);
}

.highlight-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 8px rgba(46, 163, 255, 0.5));
}

/* Add Depth with Layered Shadows */
.depth-layer-1 {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24);
}

.depth-layer-2 {
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.12);
}

.depth-layer-3 {
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.15),
    0 3px 6px rgba(0, 0, 0, 0.10);
}

.depth-layer-4 {
  box-shadow:
    0 15px 25px rgba(0, 0, 0, 0.15),
    0 5px 10px rgba(0, 0, 0, 0.05);
}

/* Neon Glow Effect */
.neon-glow {
  text-shadow:
    0 0 10px rgba(46, 163, 255, 0.8),
    0 0 20px rgba(46, 163, 255, 0.6),
    0 0 30px rgba(46, 163, 255, 0.4),
    0 0 40px rgba(46, 163, 255, 0.2);
}

/* Holographic Effect */
.holographic {
  background: linear-gradient(
    135deg,
    rgba(46, 163, 255, 0.2) 0%,
    rgba(255, 77, 148, 0.2) 25%,
    rgba(60, 240, 255, 0.2) 50%,
    rgba(255, 179, 71, 0.2) 75%,
    rgba(46, 163, 255, 0.2) 100%
  );
  background-size: 200% 200%;
  animation: holographicShift 8s ease infinite;
}

@keyframes holographicShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
