/* ============================================================
   BRANDMAD ACADEMY — Animaciones CSS
   Partículas, glows, keyframes premium
   ============================================================ */

/* ── Cursor personalizado ── */
.cursor,
.cursor-follower {
  pointer-events: none;
  position: fixed;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: exclusion;
}

.cursor {
  width: 10px;
  height: 10px;
  background: #01C5FF;
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-follower {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(1, 197, 255, 0.5);
  background: transparent;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), width 0.3s, height 0.3s;
}

body:not(.using-mouse) .cursor,
body:not(.using-mouse) .cursor-follower {
  display: none;
}

/* ── Glowing line animation ── */
@keyframes glowLine {
  0% { transform: translateX(-100%); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* ── Hero particles ── */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(1, 197, 255, 0.4);
  animation: particleFloat linear infinite;
  pointer-events: none;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    transform: translateY(-20px) rotate(720deg);
    opacity: 0;
  }
}

/* ── Shimmer effect en cards ── */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 60%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  transform: skewX(-20deg);
  animation: shimmerMove 4s infinite;
}

@keyframes shimmerMove {
  0% { left: -150%; }
  100% { left: 200%; }
}

/* ── Typing cursor ── */
.typing::after {
  content: '|';
  animation: blink-cursor 0.8s infinite;
  color: #01C5FF;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Fade animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Glow pulsante ── */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(1, 197, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 50px rgba(1, 197, 255, 0.5);
  }
}

.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

/* ── Rotating border ── */
@keyframes borderRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── Hero badge dot ── */
@keyframes heroBadgePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(1, 197, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(1, 197, 255, 0);
  }
}

.hero-badge-dot {
  animation: heroBadgePulse 2s ease-out infinite;
}

/* ── Línea de scan ── */
@keyframes scanLine {
  0% { top: -2px; }
  100% { top: calc(100% + 2px); }
}

/* ── Gradient shift ── */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-text-animated {
  background: linear-gradient(270deg, #01C5FF, #0080FF, #00E5FF, #1a9bc2);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}

/* ── Número contador: clip animation ── */
.counter-number {
  font-variant-numeric: tabular-nums;
}

/* ── Float subtle ── */
@keyframes floatSubtle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.float-anim {
  animation: floatSubtle 4s ease-in-out infinite;
}

/* ── Entrada stagger ── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.revealed > *:nth-child(1) { animation: fadeInUp 0.6s 0.1s ease forwards; }
.stagger-children.revealed > *:nth-child(2) { animation: fadeInUp 0.6s 0.2s ease forwards; }
.stagger-children.revealed > *:nth-child(3) { animation: fadeInUp 0.6s 0.3s ease forwards; }
.stagger-children.revealed > *:nth-child(4) { animation: fadeInUp 0.6s 0.4s ease forwards; }
.stagger-children.revealed > *:nth-child(5) { animation: fadeInUp 0.6s 0.5s ease forwards; }
.stagger-children.revealed > *:nth-child(6) { animation: fadeInUp 0.6s 0.6s ease forwards; }

/* ── Glitch sutil en logo (hover) ── */
@keyframes glitch {
  0% { clip-path: inset(0 0 95% 0); transform: translateX(-2px); }
  20% { clip-path: inset(30% 0 50% 0); transform: translateX(2px); }
  40% { clip-path: inset(60% 0 20% 0); transform: translateX(-1px); }
  60% { clip-path: inset(10% 0 80% 0); transform: translateX(1px); }
  80% { clip-path: inset(80% 0 5% 0); transform: translateX(-2px); }
  100% { clip-path: inset(0 0 95% 0); transform: translateX(0); }
}

/* ── Line draw ── */
@keyframes lineDraw {
  from { width: 0; }
  to { width: 60px; }
}

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

/* ── Wavy background ── */
@keyframes wavyBg {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.bg-anim-dots {
  background-color: var(--color-dark);
  background-image: radial-gradient(rgba(1, 197, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: wavyBg 10s linear infinite;
}

/* ── Reveal stagger override ── */
.reveal-stagger .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger .reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger .reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ── Loading bar (page progress) ── */
#page-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #01C5FF, #00E5FF);
  z-index: 9999;
  transition: width 0.2s ease;
  box-shadow: 0 0 10px rgba(1, 197, 255, 0.8);
}

/* ── Glassmorphism light card ── */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
