/* ==========================================================================
   PKCS Theme - Animations
   Scroll reveal, keyframe animations, and transition utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fade Animations (triggered by IntersectionObserver adding .visible)
   -------------------------------------------------------------------------- */

/* Scroll-reveal classes — initial state set by GSAP fromTo.
   These classes are only markers for JS; no CSS opacity/transform needed.
   GSAP handles both initial hidden state and animated reveal. */
.fade-in,
.fade-in-left,
.fade-in-right,
.scale-in {
    will-change: opacity, transform;
}

/* --------------------------------------------------------------------------
   Stagger Children Delays
   -------------------------------------------------------------------------- */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }

/* --------------------------------------------------------------------------
   Page Transition Overlay
   -------------------------------------------------------------------------- */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2E3B20;
    z-index: 9999;
    transform: scaleY(0);
    transform-origin: bottom;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Float Animation (decorative elements)
   -------------------------------------------------------------------------- */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Pulse Glow (CTA buttons)
   -------------------------------------------------------------------------- */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(107, 127, 90, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 8px rgba(107, 127, 90, 0.15);
    }
}

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

/* --------------------------------------------------------------------------
   Hero Entrance Animation (CSS-based, no JS dependency)
   -------------------------------------------------------------------------- */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__tagline {
    opacity: 0;
    animation: heroFadeUp 0.7s ease forwards;
    animation-delay: 0.3s;
}

.hero__title {
    opacity: 0;
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero__subtitle {
    opacity: 0;
    animation: heroFadeUp 0.7s ease forwards;
    animation-delay: 0.7s;
}

.hero__buttons {
    opacity: 0;
    animation: heroFadeUp 0.7s ease forwards;
    animation-delay: 0.9s;
}

/* --------------------------------------------------------------------------
   Counter Number Animation Helper
   -------------------------------------------------------------------------- */
.counter-number {
    display: inline-block;
}

/* --------------------------------------------------------------------------
   Hero Decoration Spin
   -------------------------------------------------------------------------- */
@keyframes slow-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hero__decoration {
    animation: slow-spin 60s linear infinite;
}

.hero__decoration--2 {
    animation: slow-spin 45s linear infinite reverse;
}
