/* ============================================================================
   MIND-BLOWING HERO EFFECTS - Premium SaaS Inspired
   ============================================================================
   Research: Stripe, Linear, Vercel, Framer, Arc Browser
   
   Effects Implemented:
   - Animated gradient mesh background
   - Floating particles system
   - Interactive light beam
   - Glassmorphism cards
   - Magnetic text reveal
   - Spotlight cursor effect
   - Depth-based parallax
   - Ambient glow system
   ============================================================================ */

/* ══════════════════════════════════════════════════════════════════════════
   ANIMATED GRADIENT MESH BACKGROUND (Stripe-inspired)
   ══════════════════════════════════════════════════════════════════════════ */

.hero-section {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    ellipse 80% 50% at 50% -20%,
    rgba(212, 186, 137, 0.15),
    transparent
  );
}

/* ══════════════════════════════════════════════════════════════════════════
   FULL-WIDTH SEAMLESS BLEND WITH MASK (Premium Fade Transition)
   ══════════════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Full-width background container */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 100%;
  z-index: -1;
  background: radial-gradient(
    ellipse 120% 80% at 50% 40%,
    rgba(5, 5, 6, 0.3) 0%,
    rgba(5, 5, 6, 0.8) 60%,
    var(--bg) 100%
  );
}

/* Seamless fade mask at bottom of hero */
.hero-gradient-mesh {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(212, 186, 137, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(96, 165, 250, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 20%,
      rgba(16, 185, 129, 0.08) 0%,
      transparent 50%
    );
  background-size: 200% 200%;
  animation: meshMove 20s ease-in-out infinite;
  filter: blur(25px);
  will-change: background-position;
  /* Add fade mask at bottom */
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 70%,
    rgba(0, 0, 0, 0.8) 85%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 70%,
    rgba(0, 0, 0, 0.8) 85%,
    transparent 100%
  );
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  /* Add fade mask at bottom */
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 75%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 75%,
    transparent 100%
  );
}

.hero-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(212, 186, 137, 0.06),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  /* Add fade mask at bottom */
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 70%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 70%,
    transparent 100%
  );
}

.hero-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 40% at 20% 30%,
      rgba(212, 186, 137, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 50% 30% at 80% 40%,
      rgba(96, 165, 250, 0.06) 0%,
      transparent 50%
    );
  filter: blur(60px);
  animation: auroraMove 15s ease-in-out infinite alternate;
  /* Add fade mask at bottom */
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 65%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 65%,
    transparent 100%
  );
}

@keyframes auroraMove {
  0% {
    transform: translateX(-5%) translateY(-5%);
  }
  100% {
    transform: translateX(5%) translateY(5%);
  }
}

/* Canvas with fade mask */
#alignment-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Add fade mask at bottom */
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 70%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 70%,
    transparent 100%
  );
}

.hero-gradient-mesh {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background: 
    radial-gradient(
      circle at 20% 50%,
      rgba(212, 186, 137, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(96, 165, 250, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 20%,
      rgba(16, 185, 129, 0.08) 0%,
      transparent 50%
    );
background-size: 200% 200%;
  animation: meshMove 20s ease-in-out infinite;
  filter: blur(25px); /* Balanced blur for premium effect */
  will-change: background-position;
}

@keyframes meshMove {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 50% 0%;
  }
  33% {
    background-position: 100% 50%, 0% 100%, 100% 50%;
  }
  66% {
    background-position: 50% 100%, 50% 0%, 0% 100%;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   FLOATING PARTICLES SYSTEM (Linear-inspired)
   ══════════════════════════════════════════════════════════════════════════ */

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(212, 186, 137, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(212, 186, 137, 0.3);
  animation: particleFloat 15s linear infinite;
}

.particle:nth-child(2n) {
  background: rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.2);
  animation-duration: 20s;
}

.particle:nth-child(3n) {
  background: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
  animation-duration: 25s;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) scale(1);
    opacity: 0;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   INTERACTIVE LIGHT BEAM (Vercel-inspired)
   ══════════════════════════════════════════════════════════════════════════ */

.hero-light-beam {
  position: absolute;
  top: -50%;
  left: 50%;
  width: 1px;
  height: 200%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(212, 186, 137, 0.3) 50%,
    transparent 100%
  );
  transform: translateX(-50%) rotate(15deg);
  animation: beamSweep 8s ease-in-out infinite;
  filter: blur(2px);
}

.hero-light-beam::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
filter: blur(8px);
  opacity: 0.6;
}

@keyframes beamSweep {
  0%, 100% {
    transform: translateX(-50%) rotate(15deg);
    opacity: 0.3;
  }
  50% {
    transform: translateX(-50%) rotate(-15deg);
    opacity: 0.6;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   GLASSMORPHISM HERO CARD (Framer-inspired)
   ══════════════════════════════════════════════════════════════════════════ */

.hero-glass-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 60px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 40px 100px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.hero-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 186, 137, 0.5) 50%,
    transparent
  );
}

.hero-glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(212, 186, 137, 0.04),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hero-glass-card:hover::after {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════════════
   MAGNETIC TEXT REVEAL (Arc Browser-inspired)
   ══════════════════════════════════════════════════════════════════════════ */

.hero-title-magnetic {
  display: inline-block;
  background: linear-gradient(
    135deg,
    #F5F5F7 0%,
    #D4BA89 50%,
    #F5F5F7 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleShimmer 8s ease-in-out infinite;
  position: relative;
}

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

.hero-title-magnetic::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(212, 186, 137, 0.8) 0%,
    rgba(245, 245, 247, 0.8) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hero-title-magnetic:hover::after {
  opacity: 0.6;
}

/* ══════════════════════════════════════════════════════════════════════════
   SPOTLIGHT CURSOR EFFECT (Premium SaaS)
   ══════════════════════════════════════════════════════════════════════════ */

.hero-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgba(212, 186, 137, 0.08) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-section:hover .hero-spotlight {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════════════
   DEPTH-BASED PARALLAX LAYERS
   ══════════════════════════════════════════════════════════════════════════ */

.hero-layer-1 {
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-layer-2 {
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-layer-3 {
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ══════════════════════════════════════════════════════════════════════════
   AMBIENT GLOW SYSTEM
   ══════════════════════════════════════════════════════════════════════════ */

.hero-ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: glowPulse 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-ambient-glow-1 {
  top: -200px;
  left: -200px;
  background: radial-gradient(
    circle,
    rgba(212, 186, 137, 0.4) 0%,
    transparent 70%
  );
  animation-delay: 0s;
}

.hero-ambient-glow-2 {
  bottom: -200px;
  right: -200px;
  background: radial-gradient(
    circle,
    rgba(96, 165, 250, 0.3) 0%,
    transparent 70%
  );
  animation-delay: 2s;
}

.hero-ambient-glow-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.2) 0%,
    transparent 70%
  );
  animation-delay: 4s;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.25;
    transform: scale(1.1);
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   PREMIUM STATS COUNTER ANIMATION
   ══════════════════════════════════════════════════════════════════════════ */

.hero-stat {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-stat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(212, 186, 137, 0.1) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 186, 137, 0.2);
  box-shadow: 0 20px 60px rgba(212, 186, 137, 0.15);
}

.hero-stat:hover::before {
  opacity: 1;
}

.hero-stat-number {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--accent-gold-300) 0%,
    var(--accent-gold-100) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  animation: countUp 2s ease-out;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* ══════════════════════════════════════════════════════════════════════════
   FLOATING ACTION BUTTONS (Premium CTAs)
   ══════════════════════════════════════════════════════════════════════════ */

.hero-floating-cta {
  position: relative;
  animation: floatCTA 3s ease-in-out infinite;
}

@keyframes floatCTA {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero-floating-cta::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(
    135deg,
    rgba(212, 186, 137, 0.3),
    rgba(96, 165, 250, 0.2)
  );
  border-radius: inherit;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.hero-floating-cta:hover::before {
  opacity: 1;
  animation: glowRotate 3s linear infinite;
}

@keyframes glowRotate {
  0% {
    filter: blur(20px) hue-rotate(0deg);
  }
  100% {
    filter: blur(20px) hue-rotate(360deg);
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   GRID PATTERN OVERLAY (Subtle depth)
   ══════════════════════════════════════════════════════════════════════════ */

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  pointer-events: none;
  mask-image: radial-gradient(
    ellipse 80% 50% at 50% 50%,
    black 0%,
    transparent 100%
  );
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 860px) {
  .hero-glass-card {
    padding: 40px 24px;
  }

  .hero-gradient-mesh,
  .hero-light-beam,
  .hero-particles,
  .hero-grid-pattern {
    opacity: 0.3;
  }

  .hero-ambient-glow {
    width: 400px;
    height: 400px;
  }

  .hero-stat-number {
    font-size: 28px;
  }

  .hero-floating-cta {
    animation: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION SUPPORT
   ══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .hero-gradient-mesh,
  .hero-light-beam,
  .particle,
  .hero-title-magnetic,
  .hero-ambient-glow,
  .hero-floating-cta {
    animation: none !important;
  }

  .hero-spotlight,
  .hero-glass-card::after {
    transition: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   PERFORMANCE OPTIMIZATIONS
   ══════════════════════════════════════════════════════════════════════════ */

.hero-section,
.hero-gradient-mesh,
.hero-particles,
.hero-light-beam,
.hero-glass-card,
.hero-spotlight,
.hero-ambient-glow {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}
