/* ==========================================================================
   H-FEC Developer Theme - Animation Styles
   Joondalup Festival-inspired: Clean, minimal, performant
   ========================================================================== */

/* ---------- GSAP-driven elements: hidden until animated ---------- */
[data-fade],
[data-scale],
[data-stagger] > * {
    visibility: hidden;
}

/* ---------- Hover Micro-interactions ---------- */
.hfec-hover-lift {
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), box-shadow 0.35s cubic-bezier(.4,0,.2,1);
}
.hfec-hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: var(--hfec-shadow-xl);
}

/* ---------- Floating Animations ---------- */
@keyframes hfec-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ---------- Glow Pulse ---------- */
@keyframes hfec-glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0,182,255,0.2); }
    50% { box-shadow: 0 0 40px rgba(0,182,255,0.4), 0 0 80px rgba(0,182,255,0.15); }
}
.hfec-btn--glow { animation: hfec-glow-pulse 3s ease-in-out infinite; }

/* ---------- Gradient Shift ---------- */
@keyframes hfec-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- Water Shimmer Effect ---------- */
@keyframes hfec-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.hfec-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0,182,255,0.1) 25%,
        rgba(0,182,255,0.2) 50%,
        rgba(0,182,255,0.1) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: hfec-shimmer 3s linear infinite;
}

/* ---------- Image Reveal Effect ---------- */
.hfec-image-reveal {
    position: relative;
    overflow: hidden;
}
.hfec-image-reveal img {
    transition: transform 0.7s cubic-bezier(.4,0,.2,1);
}
.hfec-image-reveal:hover img {
    transform: scale(1.05);
}
.hfec-image-reveal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,182,255,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.hfec-image-reveal:hover::after {
    opacity: 1;
}

/* ---------- Infinite Horizontal Scroller ---------- */
.hfec-marquee {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    gap: 3rem;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.hfec-marquee__track {
    display: flex;
    gap: 3rem;
    animation: hfec-marquee-scroll 30s linear infinite;
    will-change: transform;
}
@keyframes hfec-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.hfec-marquee:hover .hfec-marquee__track {
    animation-play-state: paused;
}

/* ---------- Counter Animation ---------- */
.hfec-statistics__number {
    transition: all 0.1s ease;
}

/* ---------- FAQ Open/Close Transitions ---------- */
.hfec-faq__icon {
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.hfec-faq__question[aria-expanded="true"] .hfec-faq__icon {
    transform: rotate(45deg);
}
.hfec-faq__icon-h {
    transition: opacity 0.35s cubic-bezier(.4,0,.2,1), transform 0.35s cubic-bezier(.4,0,.2,1);
}

/* ---------- Section Divider Line ---------- */
.hfec-section-line {
    width: 80px;
    height: 3px;
    margin: 0 auto 2rem;
    background: var(--hfec-primary);
    transform-origin: left;
}

/* ---------- Cinematic Preloader ---------- */
.hfec-preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.hfec-preloader--hidden {
    opacity: 0;
    visibility: hidden;
}
.hfec-preloader__logo {
    width: 120px;
    height: 120px;
    animation: hfec-preloader-pulse 1.5s ease-in-out infinite;
}
@keyframes hfec-preloader-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
}
.hfec-preloader__bar {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: rgba(0,182,255,0.2);
    border-radius: 1px;
    overflow: hidden;
}
.hfec-preloader__bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--hfec-primary, #00B6FF), var(--hfec-orange, #FF6200));
    border-radius: 1px;
    transition: width 0.3s ease;
}

/* ---------- Scroll-To-Top ---------- */
.hfec-scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 200;
}
.hfec-scroll-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.hfec-scroll-top:hover {
    background: rgba(255,255,255,0.12);
    color: var(--hfec-white);
    transform: translateY(-2px);
}

/* ---------- Reduce Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    [data-fade], [data-scale], [data-stagger] > * {
        visibility: visible !important;
    }
}
