/* ============================================================
   ZenyaLive — Global Animations & Visual Enhancement System
   Applies to all pages EXCEPT blog articles.
   ============================================================ */

/* ---------- PAGE ENTRY FADE ---------- */
body { animation: pageFadeIn 0.4s ease both; }
@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Prevent animation from causing page-level horizontal overflow only */
html { overflow-x: clip; }

/* ---------- SCROLL REVEAL CLASSES ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1);
    /* Ensure hidden elements don't break layout */
    will-change: opacity, transform;
}
.reveal.reveal-left  { transform: translateX(-30px); }
.reveal.reveal-right { transform: translateX(30px); }
.reveal.reveal-scale { transform: scale(0.94); }
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* Stagger delays for grid children */
.reveal-stagger > *:nth-child(1)  { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2)  { transition-delay: 0.13s; }
.reveal-stagger > *:nth-child(3)  { transition-delay: 0.21s; }
.reveal-stagger > *:nth-child(4)  { transition-delay: 0.29s; }
.reveal-stagger > *:nth-child(5)  { transition-delay: 0.37s; }
.reveal-stagger > *:nth-child(6)  { transition-delay: 0.45s; }
.reveal-stagger > *:nth-child(7)  { transition-delay: 0.53s; }
.reveal-stagger > *:nth-child(8)  { transition-delay: 0.61s; }

/* ---------- GRADIENT SHIMMER TEXT ---------- */
.shimmer-text {
    background: linear-gradient(90deg, #ffffff 0%, #EC3655 40%, #FFD700 60%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerMove 4s linear infinite;
}
@keyframes shimmerMove {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* ---------- AMBIENT HERO GLOW (masked to prevent overflow) ---------- */
.hero-glow {
    position: absolute;
    width: 50vw; height: 50vw;
    max-width: 500px; max-height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    overflow: hidden;
    animation: glowFloat 8s ease-in-out infinite;
}
.hero-glow-red {
    background: radial-gradient(circle, rgba(236,54,85,0.3) 0%, transparent 70%);
    top: -100px; left: -50px;
}
.hero-glow-gold {
    background: radial-gradient(circle, rgba(255,215,0,0.12) 0%, transparent 70%);
    bottom: -80px; right: -50px;
    animation-delay: -4s;
}
@keyframes glowFloat {
    0%   { transform: translate(0,0) scale(1); }
    50%  { transform: translate(20px,-15px) scale(1.04); }
    100% { transform: translate(0,0) scale(1); }
}

/* ---------- FLOATING PARTICLES CANVAS ---------- */
#particles-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    overflow: hidden;
}

/* ---------- COUNTER ANIMATION ---------- */
.counter-val {
    display: inline-block;
    transition: color 0.3s;
}

/* ---------- CARD HOVER LIFT ---------- */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1),
                box-shadow 0.3s cubic-bezier(0.22,1,0.36,1);
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(236,54,85,0.25);
}

/* ---------- GLOWING BUTTON PULSE ---------- */
.btn-pulse {
    animation: btnPulse 2.5s ease-in-out infinite;
}
@keyframes btnPulse {
    0%   { box-shadow: 0 0 0 0 rgba(236,54,85,0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(236,54,85,0); }
    100% { box-shadow: 0 0 0 0 rgba(236,54,85,0); }
}
.btn-gold-pulse {
    animation: goldBtnPulse 2.5s ease-in-out infinite;
}
@keyframes goldBtnPulse {
    0%   { box-shadow: 0 0 15px rgba(255,215,0,0.3); }
    50%  { box-shadow: 0 0 28px rgba(255,215,0,0.55); }
    100% { box-shadow: 0 0 15px rgba(255,215,0,0.3); }
}

/* ---------- SECTION DIVIDER GLOW LINE ---------- */
.glow-divider {
    width: 60px; height: 3px;
    background: linear-gradient(90deg, #EC3655, #FFD700);
    border-radius: 99px;
    margin: 0 auto 20px;
}

/* ---------- GRADIENT BORDER CARD ---------- */
.grad-border {
    position: relative;
}
.grad-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(236,54,85,0.4), rgba(255,215,0,0.25), transparent 60%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.grad-border:hover::before { opacity: 1; }

/* ---------- SCROLL PROGRESS BAR ---------- */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, #EC3655, #FFD700);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ---------- MOBILE SAFETY ---------- */
@media (max-width: 767px) {
    /* Disable heavy animations on small screens for performance */
    .hover-lift:hover { transform: none; box-shadow: none; }
    .btn-pulse, .btn-gold-pulse { animation: none; }
    .hero-glow { display: none; }
    #particles-canvas { display: none; }
}
