/**
 * =============================================================================
 * CONECTA+ TV — ENGENHARIA VISUAL DE ELITE (PADRÃO AWWWARDS / $50K)
 * Módulo: landing-elite.css
 * =============================================================================
 * - Lenis Smooth Scroll normalizado (60 FPS)
 * - Three.js WebGL Hero Canvas de Partículas Neon (#hero-particles-canvas)
 * - Microinterações de Alto Luxo: Spotlight Cursor Glow & 3D Tilt
 * - Botões Magnéticos com Aceleração por GPU
 * - Zero-Repaint Glows (Compositor Thread via transform & opacity)
 * - Orquestração GSAP ScrollTrigger & Revelação Cinematográfica
 * =============================================================================
 */

/* =============================================================================
   1. LENIS SMOOTH SCROLL STYLES
   ============================================================================= */
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;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* =============================================================================
   2. THREE.JS / WEBGL HERO CANVAS
   ============================================================================= */
.prime-hero-slider-container {
  position: relative;
  overflow: hidden;
}

#hero-particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
  mix-blend-mode: screen;
  display: block;
}

/* Garantia de hierarquia de camadas no Hero */
.prime-hero-track {
  position: relative;
  z-index: 2;
  height: 100%;
}
.prime-hero-dots,
.prime-hero-dots-container {
  z-index: 20 !important;
}
.prime-hero-content {
  position: relative;
  z-index: 10 !important;
}

/* Setas do Hero Slider com Ancoragem Absoluta Inquebrável */
.prime-hero-nav-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: rgba(10, 10, 18, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  cursor: pointer !important;
  z-index: 50 !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: all 0.25s ease !important;
}

.prime-hero-nav-arrow:hover {
  background: rgba(18, 24, 16, 0.95) !important;
  border-color: var(--neon-green) !important;
  color: var(--neon-green) !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 0 20px rgba(118, 255, 3, 0.5) !important;
}

.prime-hero-nav-arrow.prev {
  left: 28px !important;
  right: auto !important;
}

.prime-hero-nav-arrow.next {
  right: 28px !important;
  left: auto !important;
}

/* =============================================================================
   3. ZERO-REPAINT GPU-ACCELERATED GLOWS
   Substituição de animações contínuas de box-shadow por camadas no Compositor
   ============================================================================= */
.gpu-glow-layer {
  position: relative;
  transform: translateZ(0);
  will-change: transform, opacity;
}

.gpu-glow-layer::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.4) 0%, rgba(57, 255, 20, 0) 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.96) translateZ(0);
  z-index: -1;
  will-change: opacity, transform;
}

.gpu-glow-layer:hover::after {
  opacity: 1;
  transform: scale(1.05) translateZ(0);
}

/* Botões Neon Acelerados por Hardware */
.btn-neon.elite-interactive,
.prime-hero-btn-primary.elite-interactive,
.header-trial-btn.elite-interactive {
  position: relative;
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
  will-change: transform;
}

.btn-neon.elite-interactive::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 1;
}

.btn-neon.elite-interactive:hover::before {
  opacity: 1;
}

/* =============================================================================
   4. SPOTLIGHT CARDS (LINEAR / STRIPE LUXURY EFFECT)
   Iluminação pontual radial que segue dinamicamente as coordenadas do cursor
   ============================================================================= */
.spotlight-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Borda iluminada pelo cursor */
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    420px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(57, 255, 20, 0.55),
    rgba(168, 85, 247, 0.3) 35%,
    transparent 65%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 3;
}

/* Brilho interno volumétrico sutil */
.spotlight-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    380px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(57, 255, 20, 0.08),
    rgba(168, 85, 247, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.spotlight-card:hover::before,
.spotlight-card:hover::after {
  opacity: 1;
}

/* Destaque no Card de Plano Trimestral */
.plan-card.plan-focused.spotlight-card::before {
  opacity: 0.85;
}

/* =============================================================================
   5. 3D TILT EFFECT
   Inclinação tridimensional suave com preservação de perspectiva
   ============================================================================= */
.tilt-card-wrapper {
  transform-style: preserve-3d;
  perspective: 1200px;
  will-change: transform;
}

.tilt-inner-element {
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.tilt-depth-badge {
  transform: translateZ(28px);
  transform-style: preserve-3d;
}

.tilt-depth-price {
  transform: translateZ(20px);
  transform-style: preserve-3d;
}

.tilt-depth-button {
  transform: translateZ(32px);
  transform-style: preserve-3d;
}

/* =============================================================================
   6. MAGNETIC BUTTONS (LUXURY SPRING PHYSICS)
   ============================================================================= */
.magnetic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* =============================================================================
   7. GSAP SCROLLTRIGGER CINEMATIC REVEAL STATES
   ============================================================================= */
.gsap-reveal-title {
  opacity: 1; /* Fallback natural */
}

.gsap-reveal-fade {
  opacity: 1;
}

/* Linha divisora cinematográfica neon */
.elite-neon-divider {
  height: 1px;
  width: 100%;
  max-width: 1100px;
  margin: 36px auto;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(57, 255, 20, 0.1) 15%,
    rgba(57, 255, 20, 0.6) 45%,
    rgba(168, 85, 247, 0.6) 55%,
    rgba(168, 85, 247, 0.1) 85%,
    transparent 100%
  );
  transform-origin: center;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.elite-neon-divider.is-inview {
  transform: scaleX(1);
}

/* Header dinâmico no scroll */
.landing-header.header-scrolled {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  background: rgba(3, 3, 6, 0.88) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(57, 255, 20, 0.25) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(57, 255, 20, 0.1) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* =============================================================================
   8. ACESSIBILIDADE E MODO DE ECONOMIA DE ENERGIA (PREFERS-REDUCED-MOTION)
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  html.lenis,
  html.lenis body {
    scroll-behavior: auto !important;
  }

  .spotlight-card::before,
  .spotlight-card::after {
    display: none !important;
  }

  .tilt-card-wrapper,
  .tilt-inner-element,
  .magnetic-btn {
    transform: none !important;
    transition: none !important;
  }

  #hero-particles-canvas {
    display: none !important;
  }

  .elite-neon-divider {
    transform: scaleX(1) !important;
    transition: none !important;
  }
}
