/* ============================================
   EL FOGÓN PLAYERO - Animations & Effects
   ============================================ */

@keyframes flameDance {
    0%, 100% { transform: scaleY(1) scaleX(1) rotate(0deg); }
    25% { transform: scaleY(1.1) scaleX(0.95) rotate(-2deg); }
    50% { transform: scaleY(0.95) scaleX(1.05) rotate(1deg); }
    75% { transform: scaleY(1.08) scaleX(0.97) rotate(-1deg); }
}

@keyframes fadeInOut { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes borderGlow { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.7; } }

@keyframes chatPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(232,133,58,0.4)); }
    50% { filter: drop-shadow(0 0 40px rgba(232,133,58,0.7)); }
}

@keyframes countUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@keyframes emberFloat {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) translateX(20px) scale(0); opacity: 0; }
}

/* ---- Scroll Animations ---- */
.animate-on-scroll {
    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);
}

.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

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

/* Gallery hover */
.gallery-item::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(212,114,78,0.0) 0%, rgba(212,114,78,0.1) 100%);
    opacity: 0; transition: opacity 0.4s ease; z-index: 1; border-radius: inherit;
}
.gallery-item:hover::before { opacity: 1; }

.metric-card { transition: all 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.metric-card.counted .metric-value { animation: countUp 0.6s ease forwards; }

.btn-ember { position: absolute; width: 4px; height: 4px; background: var(--golden); border-radius: 50%; animation: emberFloat 1.5s ease-out infinite; top: 50%; left: 50%; pointer-events: none; opacity: 0; }
.btn-fire:hover .btn-ember { opacity: 1; }

/* Section Dividers */
.section-historia::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 80px; background: linear-gradient(to bottom, var(--charcoal), transparent); z-index: 1; }
.section-experiencia::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--coral), transparent); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--charcoal); }
::-webkit-scrollbar-thumb { background: var(--coral); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--coral-dark); }

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(245,230,211,0.15); border-radius: 2px; }

::selection { background: var(--coral); color: var(--sand); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .animate-on-scroll { opacity: 1; transform: none; }
}
