/* ============================================
   SAFE KEEPING CORRETORA - animations.css
   Keyframes & Motion Effects
   ============================================ */

/* --- Hero Background --- */
@keyframes heroBgShift {
  0%   { background-position: 0% 50%; opacity: 1; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Particles (Enhanced) --- */
@keyframes particle-float {
  0% {
    transform: translateY(100vh) translateX(0) scale(0) rotate(0deg);
    opacity: 0;
  }
  5% { opacity: 1; }
  50% { opacity: 0.8; }
  95% { opacity: 0.4; }
  100% {
    transform: translateY(-200px) translateX(var(--dx, 100px)) scale(var(--scale-end, 1.5)) rotate(var(--rotate, 180deg));
    opacity: 0;
  }
}

@keyframes particle-glow {
  0%, 100% { filter: blur(0px); box-shadow: 0 0 4px var(--gold), 0 0 8px var(--gold); }
  50% { filter: blur(1px); box-shadow: 0 0 8px var(--gold), 0 0 20px var(--gold), 0 0 30px rgba(200,169,126,0.5); }
}

@keyframes particle-pulse {
  0%, 100% { transform: scale(var(--scale, 1)); opacity: 0.7; }
  50% { transform: scale(calc(var(--scale, 1) * 1.5)); opacity: 1; }
}

@keyframes particle-drift {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(var(--dx2, 30px), var(--dy2, -20px)) rotate(90deg); }
  50% { transform: translate(calc(var(--dx2, 30px) * -0.5), calc(var(--dy2, -20px) * 2)) rotate(180deg); }
  75% { transform: translate(calc(var(--dx2, 30px) * 1.2), calc(var(--dy2, -20px) * 0.5)) rotate(270deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

/* Large glowing orbs */
@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  33% { transform: translate(50px, -80px) scale(1.2); opacity: 0.5; }
  66% { transform: translate(-30px, -150px) scale(0.9); opacity: 0.4; }
  100% { transform: translate(20px, -200px) scale(1.1); opacity: 0.2; }
}

/* --- Scroll indicator --- */
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
@keyframes scrollDot {
  0%   { top: 6px; opacity: 1; }
  70%  { top: 14px; opacity: 0; }
  71%  { top: 6px; opacity: 0; }
  100% { top: 6px; opacity: 1; }
}

/* --- WhatsApp Pulse --- */
@keyframes waPulse {
  0%   { transform: scale(1); opacity: 0.8; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* --- Counter number pop --- */
@keyframes counterPop {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Shimmer on cards --- */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* --- Gold line draw --- */
@keyframes lineDraw {
  from { width: 0; }
  to   { width: 64px; }
}

/* --- Gradient border animation --- */
@keyframes gradientBorder {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* --- Fade in up for hero --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Float animation for decorative elements --- */
@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* --- Spin slow --- */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --- Logo ring decoration --- */
@keyframes ringExpand {
  0%   { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}

/* Particle trail effect */
@keyframes particle-trail {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-40px) scale(0);
    opacity: 0;
  }
}

/* Sparkle effect */
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}


/* --- Text reveal mask --- */
@keyframes textMaskReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

/* ============================================
   HERO ANIMATIONS (applied inline in HTML)
   ============================================ */

/* Hero badge */
.hero-badge  { animation: fadeInUp 0.8s cubic-bezier(0,0,0.2,1) 0.2s both; }

/* Hero title lines */
.hero-title  { animation: fadeInUp 0.9s cubic-bezier(0,0,0.2,1) 0.35s both; }

/* Hero subtitle */
.hero-subtitle { animation: fadeInUp 0.9s cubic-bezier(0,0,0.2,1) 0.5s both; }

/* Hero actions */
.hero-actions { animation: fadeInUp 0.9s cubic-bezier(0,0,0.2,1) 0.65s both; }

/* Hero stats */
.hero-stats  { animation: fadeInUp 0.9s cubic-bezier(0,0,0.2,1) 0.8s both; }

/* Hero scroll indicator */
.hero-scroll-indicator { animation: scrollBounce 2.5s ease-in-out 1.5s infinite; }

/* ============================================
   SECTION DECORATIVE LINES
   ============================================ */
.section-label::after {
  content: '';
  display: block;
  margin-top: 10px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  animation: lineDraw 0.6s var(--ease-out) both;
}
.reveal.visible .section-label::after { animation: lineDraw 0.6s 0.4s var(--ease-out) both; }

/* ============================================
   COUNTER ANIMATION CLASS
   ============================================ */
.counter-animated {
  animation: counterPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ============================================
   GRADIENT TEXT ANIMATION
   ============================================ */
.gradient-text-animated {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    var(--gold2) 30%,
    #fff0d6 50%,
    var(--gold2) 70%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ============================================
   FEATURE CARD HOVER GLOW
   ============================================ */
.feature-card {
  transition:
    background 0.3s,
    border-color 0.3s,
    transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.4s;
}
.feature-card:hover {
  box-shadow: 0 24px 48px rgba(10,22,40,0.4), 0 0 0 1px rgba(200,169,126,0.2);
}

/* ============================================
   STAGGER CHILDREN ANIMATION
   ============================================ */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.stagger-children.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; }
.stagger-children.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.19s; }
.stagger-children.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.26s; }
.stagger-children.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.33s; }
.stagger-children.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.40s; }
.stagger-children.visible > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.47s; }
.stagger-children.visible > *:nth-child(8) { opacity: 1; transform: none; transition-delay: 0.54s; }
.stagger-children.visible > *:nth-child(9) { opacity: 1; transform: none; transition-delay: 0.61s; }
.stagger-children.visible > *:nth-child(10) { opacity: 1; transform: none; transition-delay: 0.68s; }

/* ============================================
   PAGE LOADING SCREEN
   ============================================ */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
.page-loader.done { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid rgba(200,169,126,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spinSlow 0.8s linear infinite;
}

/* ============================================
   PARALLAX CONTAINER
   ============================================ */
.parallax-section {
  will-change: transform;
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-left, .reveal-right,
  .stagger-children > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
