/* * TraffixPro - Main Stylesheet
 * Contém: Preloader, Animações, Efeitos 3D e Ajustes Visuais
 */

body {
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Preloader --- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}
.dark #preloader {
  background-color: #0b1120;
}

/* --- Tipografia & Cores --- */
.text-gradient {
  background: linear-gradient(135deg, #457a38 0%, #2a4926 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.dark .text-gradient {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* --- Backgrounds --- */
.bg-grid-pattern {
  background-image: radial-gradient(#457a38 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  opacity: 0.03;
}
.dark .bg-grid-pattern {
  background-image: radial-gradient(#ffffff 0.5px, transparent 0.5px);
  opacity: 0.05;
}

/* CRUCIAL: Mantém o canvas no fundo sem empurrar o conteúdo */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.4;
  pointer-events: none;
}

/* --- Cards & 3D Effects --- */
.tilt-card {
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.perspective-1000 {
  perspective: 1000px;
}

/* Animação Automática (Respiração) para Mobile */
@keyframes autoTiltAnim {
  0%,
  100% {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  }
  50% {
    transform: perspective(1000px) rotateX(-2deg) rotateY(2deg);
  }
}

.auto-tilt-active {
  animation: autoTiltAnim 4s ease-in-out infinite;
}

.premium-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}
.dark .premium-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.premium-card:hover {
  border-color: rgba(69, 122, 56, 0.3);
  box-shadow: 0 25px 50px -12px rgba(69, 122, 56, 0.15);
}
.premium-card:hover .icon-box {
  background-color: #457a38;
  color: white;
  transform: scale(1.1) rotate(6deg);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Marquee (Faixa Infinita) --- */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  /* Removed mask-image to show icons fully */
}

/* Classe de fallback caso o Tailwind demore a carregar a animação */
.marquee-content {
  display: flex;
  align-items: center;
  /* Animação mais lenta (50s) e contínua */
  animation: marquee 50s linear infinite;
}

.marquee-content img {
  display: block;
  max-height: 100%;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* --- Tracer Box (Borda Animada) --- */
.tracer-box {
  position: relative;
  overflow: hidden;
}
.tracer-line {
  position: absolute;
  background: #457a38;
  box-shadow: 0 0 12px #598e4b;
  z-index: 10;
  border-radius: 99px;
}
.line-top {
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  animation: slideRight 3s linear infinite;
}
.line-right {
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  animation: slideDown 3s linear infinite;
  animation-delay: 0.75s;
}
.line-bottom {
  bottom: 0;
  right: 0;
  width: 100%;
  height: 2px;
  animation: slideLeft 3s linear infinite;
  animation-delay: 1.5s;
}
.line-left {
  bottom: 0;
  left: 0;
  width: 2px;
  height: 100%;
  animation: slideUp 3s linear infinite;
  animation-delay: 2.25s;
}

@keyframes slideRight {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
@keyframes slideDown {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}
@keyframes slideLeft {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}
@keyframes slideUp {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(-100%);
  }
}

/* --- Botões Especiais --- */
.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::before {
  content: "";
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  left: -100%;
  animation: shine 3s infinite;
}

.whatsapp-pulse {
  animation: pulse-green 2.5s infinite;
}
@keyframes pulse-green {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* --- Modais --- */
#success-modal,
#exit-intent-modal {
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px) rotateX(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotateX(0);
  }
}

#success-modal.show #modal-wrapper,
#exit-intent-modal.show #modal-wrapper-exit {
  animation: modalPopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* --- FAQ --- */
.faq-item {
  border-color: rgba(69, 122, 56, 0.1);
  background-color: #f2fcf5;
}
.dark .faq-item {
  background-color: rgba(69, 122, 56, 0.05);
  border-color: rgba(69, 122, 56, 0.2);
}
