/* =====================================================
   LCCL — SCROLL ANIMATIONS & KEYFRAMES
   ===================================================== */

/* -------------------------------------------------------
   Base state: elements start hidden/offset
   ------------------------------------------------------- */
.animate-fade-up,
.animate-fade-in,
.animate-slide-left,
.animate-slide-right,
.animate-scale-in {
    opacity: 0;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.animate-fade-up     { transform: translateY(30px);  transition: opacity 0.65s, transform 0.65s; }
.animate-fade-in     { transition: opacity 0.65s; }
.animate-slide-left  { transform: translateX(-30px); transition: opacity 0.65s, transform 0.65s; }
.animate-slide-right { transform: translateX(30px);  transition: opacity 0.65s, transform 0.65s; }
.animate-scale-in    { transform: scale(0.92);        transition: opacity 0.65s, transform 0.65s; }

/* -------------------------------------------------------
   Visible state (applied by JS IntersectionObserver)
   ------------------------------------------------------- */
.animate-fade-up.is-visible,
.animate-fade-in.is-visible,
.animate-slide-left.is-visible,
.animate-slide-right.is-visible,
.animate-scale-in.is-visible {
    opacity: 1;
    transform: none;
}

/* Stagger delays (applied via inline style or data attrs) */
.delay-1  { transition-delay: 0.08s; }
.delay-2  { transition-delay: 0.16s; }
.delay-3  { transition-delay: 0.24s; }
.delay-4  { transition-delay: 0.32s; }
.delay-5  { transition-delay: 0.40s; }
.delay-6  { transition-delay: 0.48s; }

/* -------------------------------------------------------
   Counter animation hook (JS reads .is-counting)
   ------------------------------------------------------- */
.stat-number.is-counting {
    color: var(--gold-light);
}

/* -------------------------------------------------------
   Page Load entrance animation
   ------------------------------------------------------- */
@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge    { animation: heroEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.hero-title    { animation: heroEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }
.hero-subtitle { animation: heroEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both; }
.hero-cta      { animation: heroEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both; }

/* -------------------------------------------------------
   Gold shimmer on hover (buttons, highlights)
   ------------------------------------------------------- */
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer-text {
    background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-light) 40%, var(--gold-dark) 60%, var(--gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* -------------------------------------------------------
   Spinner (for form submit loading state)
   ------------------------------------------------------- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(10, 15, 30, 0.4);
    border-top-color: #0a0f1e;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* -------------------------------------------------------
   Floating cricket ball decoration
   ------------------------------------------------------- */
@keyframes floatBall {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%       { transform: translateY(-12px) rotate(120deg); }
    66%       { transform: translateY(6px) rotate(240deg); }
}

.cricket-ball-float {
    animation: floatBall 5s ease-in-out infinite;
    display: inline-block;
}

/* -------------------------------------------------------
   Gold glow pulse for active/live elements
   ------------------------------------------------------- */
@keyframes goldGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(212, 160, 23, 0.3); }
    50%       { box-shadow: 0 0 20px rgba(212, 160, 23, 0.6); }
}

.glow-gold {
    animation: goldGlow 2.5s ease-in-out infinite;
}

/* -------------------------------------------------------
   Table row slide-in (applied per row by JS)
   ------------------------------------------------------- */
@keyframes rowSlideIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lccl-table tbody tr.row-animate {
    animation: rowSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* -------------------------------------------------------
   Nav active indicator bar
   ------------------------------------------------------- */
#primary-nav ul li.current-menu-item > a::after {
    content: '';
    display: block;
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}

/* -------------------------------------------------------
   Reduce motion override (accessibility)
   ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-up,
    .animate-fade-in,
    .animate-slide-left,
    .animate-slide-right,
    .animate-scale-in {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-badge,
    .hero-title,
    .hero-subtitle,
    .hero-cta {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .shimmer-text {
        animation: none;
        -webkit-text-fill-color: var(--gold);
        color: var(--gold);
    }

    .cricket-ball-float,
    .glow-gold {
        animation: none;
    }
}
