/* ==========================================================================
   BITCOIN ECUADOR - ANIMATIONS & INTERACTIVITY STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PRELOADER ANIMATION
   -------------------------------------------------------------------------- */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preloader-logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.preloader-crypto-icon {
  width: 50px;
  height: 50px;
  color: var(--accent-primary);
  animation: floatSpin 3s ease-in-out infinite;
}

.preloader-svg {
  width: 100%;
  height: 100%;
}

.preloader-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text-main {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.brand-text-sub {
  font-size: 1.25rem;
  color: var(--accent-primary);
}

.preloader-bar {
  width: 240px;
  height: 3px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.preloader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  animation: preloaderFill 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.preloader-tagline {
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

@keyframes preloaderFill {
  0% { width: 0%; }
  50% { width: 65%; }
  100% { width: 100%; }
}

@keyframes floatSpin {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(180deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

/* --------------------------------------------------------------------------
   2. CUSTOM CURSOR
   -------------------------------------------------------------------------- */
.custom-cursor-dot,
.custom-cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.custom-cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  transition: transform 0.1s ease-out;
}

.custom-cursor-outline {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent-primary);
  opacity: 0.6;
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease-out;
}

/* Hovering interactive elements */
body.cursor-hover .custom-cursor-outline {
  width: 54px;
  height: 54px;
  background-color: var(--accent-glow);
  border-color: var(--accent-primary);
  opacity: 0.8;
}

body.cursor-hover .custom-cursor-dot {
  transform: translate(-50%, -50%) scale(1.5);
}

/* Hide on touch devices */
@media (pointer: coarse) {
  .custom-cursor-dot,
  .custom-cursor-outline {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   3. SCROLL PROGRESS BAR
   -------------------------------------------------------------------------- */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-gradient);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* --------------------------------------------------------------------------
   4. SCROLL REVEAL (INTERSECTION OBSERVER)
   -------------------------------------------------------------------------- */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

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

.reveal-slide-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-slide-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Transition Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* --------------------------------------------------------------------------
   5. KEYFRAME ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(8px); opacity: 0.2; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Pulse / Floating Badge */
@keyframes pulseSubtle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.hero-avatar-wrapper {
  animation: pulseSubtle 6s ease-in-out infinite;
}
