/* ====================================
   ANIMAÇÕES DE SCROLL E BACKGROUND
   ==================================== */

/* Ajuste no body para permitir animações */
body {
  position: relative;
  overflow-x: hidden;
}

/* Reduzir espaço entre seções em 80% */
section {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

section:first-of-type {
  padding-top: 180px !important;
}

/* Ajuste específico para section 1 (hero) */
#section1, .hero-bitz {
  padding-bottom: 20px !important;
  margin-bottom: 0 !important;
}

/* Ajuste específico para section 2 (about) */
#section2, .about-bitz {
  padding-top: 40px !important;
  margin-top: 0 !important;
}

/* ------------------------------
  CRYPTO BACKGROUND ANIMATION
------------------------------ */
.crypto-background {
  position: fixed;
  left: 0;
  top: 0;
  width: 200px;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.crypto-line {
  position: absolute;
  left: 50%;
  width: 2px;
  height: 100px;
  background: linear-gradient(to bottom, 
    transparent,
    rgba(255, 215, 0, 0.8),
    rgba(255, 215, 0, 0.4),
    transparent
  );
  animation: cryptoFlow 3s linear infinite;
  transform: translateX(-50%);
}

.crypto-line:nth-child(1) { animation-delay: 0s; left: 20%; }
.crypto-line:nth-child(2) { animation-delay: 0.5s; left: 40%; }
.crypto-line:nth-child(3) { animation-delay: 1s; left: 60%; }
.crypto-line:nth-child(4) { animation-delay: 1.5s; left: 80%; }
.crypto-line:nth-child(5) { animation-delay: 2s; left: 30%; }
.crypto-line:nth-child(6) { animation-delay: 2.5s; left: 70%; }

@keyframes cryptoFlow {
  0% {
    top: -100px;
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100vh;
    opacity: 0;
  }
}

.crypto-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  animation: particleFloat 4s ease-in-out infinite;
}

.crypto-particle:nth-child(7) { left: 15%; animation-delay: 0s; }
.crypto-particle:nth-child(8) { left: 35%; animation-delay: 1s; }
.crypto-particle:nth-child(9) { left: 55%; animation-delay: 2s; }
.crypto-particle:nth-child(10) { left: 75%; animation-delay: 3s; }

@keyframes particleFloat {
  0%, 100% {
    top: -10px;
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  50% {
    top: 50vh;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100vh;
    opacity: 0;
  }
}

.crypto-hex {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  transform: rotate(45deg);
  animation: hexagonFloat 5s ease-in-out infinite;
}

.crypto-hex:nth-child(11) { left: 25%; animation-delay: 0.5s; }
.crypto-hex:nth-child(12) { left: 65%; animation-delay: 2s; }

@keyframes hexagonFloat {
  0% {
    top: -30px;
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
  }
  20% {
    opacity: 0.3;
  }
  50% {
    transform: rotate(225deg) scale(1);
  }
  80% {
    opacity: 0.6;
  }
  100% {
    top: 100vh;
    opacity: 0;
    transform: rotate(405deg) scale(0.5);
  }
}

/* Símbolos de código binário */
.crypto-code {
  position: absolute;
  color: rgba(255, 215, 0, 0.3);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  animation: codeScroll 6s linear infinite;
}

.crypto-code:nth-child(13) { left: 10%; animation-delay: 0s; }
.crypto-code:nth-child(14) { left: 50%; animation-delay: 2s; }
.crypto-code:nth-child(15) { left: 90%; animation-delay: 4s; }

@keyframes codeScroll {
  0% {
    top: -20px;
    opacity: 0;
  }
  10% {
    opacity: 0.2;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    top: 100vh;
    opacity: 0;
  }
}

/* ------------------------------
  SCROLL ANIMATIONS FOR CARDS
------------------------------ */
.about-bitz .card,
.sales-card {
  opacity: 0;
  transform: translateY(60px) scale(0.92);
  transition: all 1.6s cubic-bezier(0.16, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.about-bitz .card.animate-in,
.sales-card.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Garantir que cards não vazem conteúdo */
.about-bitz .card {
  overflow: hidden;
  position: relative;
}

/* Conteúdo do card deve estar acima das animações */
.about-bitz .card > * {
  position: relative;
  z-index: 2;
}

/* Animação de borda tecnológica */
.about-bitz .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid #FFD700;
  border-radius: 14px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.about-bitz .card.animate-in::before {
  opacity: 0;
  transform: scale(1);
  animation: techBorder 1.2s ease-out;
}

@keyframes techBorder {
  0% {
    opacity: 0.8;
    transform: scale(0.85) rotate(-3deg);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.03) rotate(1deg);
  }
  100% {
    opacity: 0;
    transform: scale(1) rotate(0deg);
  }
}

/* Efeito de glitch sutil - REMOVIDO para transição mais suave */
.about-bitz .card.animate-in,
.sales-card.animate-in {
  /* animation removida para movimento mais fluido */
}

/* Delay progressivo para cada card */
.about-bitz .grid .card:nth-child(1) {
  transition-delay: 0.2s;
}

.about-bitz .grid .card:nth-child(2) {
  transition-delay: 0.5s;
}

.about-bitz .grid .card:nth-child(3) {
  transition-delay: 0.8s;
}

/* Efeito de escaneamento */
.about-bitz .card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent,
    rgba(255, 215, 0, 0.15),
    transparent
  );
  transform: translateX(-100%);
  border-radius: 14px;
  pointer-events: none;
  z-index: 1;
}

.about-bitz .card.animate-in::after {
  animation: scanEffect 1.8s ease-out;
}

@keyframes scanEffect {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Animação para sales-card */
.sales-card {
  position: relative;
  overflow: hidden;
}

/* Conteúdo do sales-card deve estar acima das animações */
.sales-card > * {
  position: relative;
  z-index: 2;
}

.sales-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent,
    #FFD700,
    transparent
  );
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.sales-card.animate-in::before {
  animation: topBorderScan 1.5s ease-out;
}

@keyframes topBorderScan {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Efeito de hologramatic assembly para sales-card */
.sales-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.sales-card.animate-in::after {
  animation: holoExpand 1.4s ease-out;
}

@keyframes holoExpand {
  0% {
    width: 0;
    height: 0;
    opacity: 0;
  }
  50% {
    width: 200%;
    height: 200%;
    opacity: 0.4;
  }
  100% {
    width: 300%;
    height: 300%;
    opacity: 0;
  }
}

/* ====================================
   ANIMAÇÕES SECTION 3 (SALES DETAILS)
   ==================================== */

/* Container da grid de sales */
.sales-grid {
  perspective: 1000px;
}

/* Animação de entrada suave - sem 3D excessivo */
.sales-card {
  transform-style: preserve-3d;
}

.sales-card:not(.animate-in) {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

.sales-card.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  /* Animação mais suave e gradual */
}

/* Delays progressivos para sales cards - mais graduais */
.sales-grid .sales-card:nth-child(1) {
  transition-delay: 0.3s;
}

.sales-grid .sales-card:nth-child(2) {
  transition-delay: 0.6s;
}

.sales-grid .sales-card:nth-child(3) {
  transition-delay: 0.9s;
}

.sales-grid .sales-card:nth-child(4) {
  transition-delay: 1.2s;
}

/* Específico para logo-card (TOKEN SYMBOL) - mais devagar */
.logo-card.sales-card {
  transition-delay: 1.4s !important;
  transition-duration: 1.8s !important;
}

/* Efeito de pixel assembly */
.sales-card.animate-in {
  position: relative;
}

/* Pulso de energia no card - mais sutil */
@keyframes energyPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.12);
  }
  50% {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.25);
  }
}

.sales-card.animate-in {
  animation: energyPulse 5s ease-in-out 2s infinite;
}

/* Efeito de dados digitais fluindo */
.sales-card.animate-in::before {
  animation: topBorderScan 1.5s ease-out, dataFlow 4s ease-in-out 1.5s infinite;
}

@keyframes dataFlow {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
}

/* Grid de linhas tecnológicas de fundo */
#section3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 215, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

/* Partículas flutuantes na section 3 */
.sales-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  opacity: 0;
  animation: floatingParticle 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatingParticle {
  0%, 100% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translate(calc(-50% + 100px), -200px);
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + 200px), -400px);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .crypto-background {
    width: 100px;
  }
  
  .crypto-line {
    height: 60px;
  }
  
  .crypto-hex {
    width: 20px;
    height: 20px;
  }
  
  section {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }
  
  section:first-of-type {
    padding-top: 120px !important;
  }
  
  .sales-card:not(.animate-in) {
    transform: translateY(30px) scale(0.95);
  }
}
