/* ═══════════════════════════════════════════════════
   ANIMATIONS.CSS — Keyframes & Transition Classes
   CRYSTALINK Premium Website
   ═══════════════════════════════════════════════════ */


/* ── Crystal Float ──────────────────────────────── */
@keyframes crystal-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-8px) rotate(-1deg);
    }
    75% {
        transform: translateY(-20px) rotate(1.5deg);
    }
}


/* ── Scroll Pulse (hero scroll indicator) ──────── */
@keyframes scroll-pulse {
    0% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    50% {
        opacity: 0.3;
        transform: scaleY(0.4);
        transform-origin: top;
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
}


/* ── Subtle Pulse (glows, dots) ─────────────────── */
@keyframes pulse-soft {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}


/* ── Gradient Shift ─────────────────────────────── */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


/* ── Connector Line Draw ────────────────────────── */
@keyframes draw-line {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}


/* ── Fade-in Utility Classes ────────────────────── */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s var(--ease-out-expo);
}

.fade-in.visible {
    opacity: 1;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}


/* ── Stagger Delay Utilities ────────────────────── */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }


/* ── Preloader Exit Animation ───────────────────── */
.preloader-exit {
    animation: preloaderExit 0.8s var(--ease-out-expo) forwards;
}

@keyframes preloaderExit {
    0% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
    100% {
        clip-path: inset(0 0 100% 0);
        opacity: 0;
    }
}


/* ── Reduced Motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero__crystal {
        animation: none;
    }
}
