/* ==========================================================================
   HiWeb - Estilos Principais & Sistema de Animações Premium
   ========================================================================== */

/* 1. Base & Reset */
html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: #0A0E13;
  color: #F8FAFC;
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
}

::selection {
  background-color: #00D2FF;
  color: #0A0E13;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0A0E13;
}
::-webkit-scrollbar-thumb {
  background: #1E2734;
  border-radius: 5px;
  border: 2px solid #0A0E13;
}
::-webkit-scrollbar-thumb:hover {
  background: #00D2FF;
}

/* ==========================================================================
   2. Barra de Progresso de Rolagem (Scroll Progress)
   ========================================================================== */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #00D2FF, #0066FF, #38BDF8);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.8), 0 0 4px rgba(0, 210, 255, 1);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s ease-out;
}

/* ==========================================================================
   3. Cabeçalho com Efeito Dinâmico de Scroll & Links
   ========================================================================== */
header.site-header {
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease, height 0.35s ease;
}

header.site-header.scrolled {
  background-color: rgba(10, 14, 19, 0.94) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(0, 210, 255, 0.22) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8), 0 0 20px -5px rgba(0, 210, 255, 0.1);
}

.nav-link-animated {
  position: relative;
  display: inline-flex;
  align-items: center;
  transition: color 0.25s ease;
}

.nav-link-animated::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #00D2FF, #0066FF);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link-animated:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ==========================================================================
   4. Efeitos de Fundo (Ambient Orbs & Tech Grid)
   ========================================================================== */
.ambient-glow-orb-1 {
  position: absolute;
  width: 650px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.15) 0%, rgba(0, 102, 255, 0.06) 45%, transparent 70%);
  filter: blur(90px);
  border-radius: 9999px;
  pointer-events: none;
  animation: floatOrb1 16s ease-in-out infinite alternate;
  will-change: transform;
}

.ambient-glow-orb-2 {
  position: absolute;
  width: 550px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.14) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 70%);
  filter: blur(100px);
  border-radius: 9999px;
  pointer-events: none;
  animation: floatOrb2 20s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes floatOrb1 {
  0% {
    transform: translate(-50%, -50%) scale(1) translate(0px, 0px);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15) translate(40px, -25px);
  }
  100% {
    transform: translate(-50%, -50%) scale(0.92) translate(-30px, 30px);
  }
}

@keyframes floatOrb2 {
  0% {
    transform: translate(-50%, -50%) scale(0.9) translate(0px, 0px);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.18) translate(-45px, 20px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1) translate(30px, -35px);
  }
}

/* Grade de fundo sutil e futurista */
.bg-tech-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0.4) 60%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0.4) 60%, transparent 85%);
}

/* ==========================================================================
   5. Sistema de Revelação ao Rolar (Scroll Reveal)
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.reveal-left {
  transform: translateX(-40px);
}

.reveal-on-scroll.reveal-right {
  transform: translateX(40px);
}

.reveal-on-scroll.reveal-scale {
  transform: scale(0.92) translateY(20px);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Delays escalonados para listas e grids */
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }
.reveal-delay-6 { transition-delay: 600ms; }

/* ==========================================================================
   6. Micro-Interações em Botões & Efeito Shimmer
   ========================================================================== */
.btn-shimmer {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-shimmer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -160%;
  width: 220%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 35%,
    rgba(255, 255, 255, 0.32) 48%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.32) 52%,
    transparent 65%,
    transparent 100%
  );
  transform: rotate(25deg);
  animation: shimmerSweep 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes shimmerSweep {
  0%, 70% {
    left: -160%;
  }
  100% {
    left: 160%;
  }
}

.btn-pulse-glow {
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.35);
  animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 28px rgba(0, 210, 255, 0.55), 0 0 45px rgba(0, 102, 255, 0.2);
  }
}

/* ==========================================================================
   7. Gradiente de Texto Dinâmico
   ========================================================================== */
.animated-gradient-text {
  background: linear-gradient(90deg, #00D2FF 0%, #38BDF8 25%, #0066FF 50%, #38BDF8 75%, #00D2FF 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: flowGradientText 7s linear infinite;
}

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

/* ==========================================================================
   8. Cards com Spotlight Interativo e Efeito 3D Hover
   ========================================================================== */
.spotlight-card {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease, 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

.spotlight-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 210, 255, 0.6) !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 
              0 0 30px -5px rgba(0, 210, 255, 0.18) !important;
}

/* Brilho que segue a posição do cursor */
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    450px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(0, 210, 255, 0.18),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

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

/* Ícones de serviço animados */
.service-icon-box {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.3s ease, 
              color 0.3s ease,
              box-shadow 0.3s ease;
}

.spotlight-card:hover .service-icon-box {
  transform: scale(1.12) rotate(4deg);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

/* Seta animada em links */
.animated-arrow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.group:hover .animated-arrow,
.spotlight-card:hover .animated-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   9. Badge Pulsante & Radar Live (Indicador de Simulação Ativa)
   ========================================================================== */
.radar-beacon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.radar-beacon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: #00D2FF;
  animation: radarWave 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes radarWave {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* Badge Hero com borda animada */
.hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(16, 20, 25, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 210, 255, 0.35);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.15);
  transition: all 0.3s ease;
}

.hero-badge:hover {
  border-color: #00D2FF;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.3);
  transform: translateY(-2px);
}

/* ==========================================================================
   10. Botão Flutuante do WhatsApp
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 9999px;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4), 0 0 12px rgba(37, 211, 102, 0.2);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  pointer-events: none;
}

.floating-whatsapp.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.floating-whatsapp:hover {
  transform: translateY(-4px) scale(1.05);
  background: #28e06c;
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55), 0 0 20px rgba(37, 211, 102, 0.35);
  color: #FFFFFF;
}

.floating-whatsapp-radar {
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  border: 2px solid #25D366;
  animation: whatsappPulse 2.4s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
  pointer-events: none;
}

@keyframes whatsappPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* ==========================================================================
   11. Destaque de Citação (Sobre Nós)
   ========================================================================== */
.quote-highlight {
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-highlight:hover {
  border-left-color: #38BDF8 !important;
  transform: translateX(4px);
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.1);
}

/* ==========================================================================
   12. Campos do Formulário com Foco Luminoso
   ========================================================================== */
.form-input-animated {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.form-input-animated:focus {
  border-color: #00D2FF !important;
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.18), 0 0 15px rgba(0, 210, 255, 0.15) !important;
  background-color: #0F141C !important;
}

/* ==========================================================================
   13. SIMULADOR DE SITE INTERATIVO (HIWEB)
   ========================================================================== */
.simulator-stage {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 768 / 612 !important;
  background: #101419 !important;
  overflow: hidden !important;
  cursor: pointer !important;
  user-select: none !important;
}

.simulator-scaler {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 768px !important;
  height: 612px !important;
  transform-origin: 0 0 !important;
  will-change: transform !important;
}

.simulator-screen-projection {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1920px !important;
  height: 1200px !important;
  transform-origin: 0 0 !important;
  transform: matrix3d(
    0.338329, 0.054485, 0, 0.000102,
    0.005299, 0.313124, 0, -0.000024,
    0, 0, 1, 0,
    119, 46, 0, 1
  ) !important;
  overflow: hidden !important;
  background: #000000 !important;
  pointer-events: none !important;
}

.simulator-screen-content {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  will-change: transform !important;
}

.simulator-screen-content img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

.simulator-mockup-frame {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 768px !important;
  height: 612px !important;
  pointer-events: none !important;
  z-index: 20 !important;
}

.simulator-progress-line {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 6px !important;
  background: linear-gradient(90deg, #00D2FF, #0066FF) !important;
  box-shadow: 0 0 12px #00D2FF !important;
  width: 0% !important;
  z-index: 10 !important;
  transition: width 0.05s linear !important;
}

.simulator-glass-reflection {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 60%) !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

/* ==========================================================================
   14. Acessibilidade (Prefers-Reduced-Motion)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .ambient-glow-orb-1,
  .ambient-glow-orb-2 {
    animation: none !important;
  }
}
