/* ==========================================================================
   NorthPeak - Animations Stylesheet
   Advanced animations and transitions for high-tech experience
   ========================================================================== */

/* ==========================================================================
   AOS (Animate On Scroll) Custom Animations
   ========================================================================== */

[data-aos] {
    transition-property: transform, opacity;
    transition-duration: 600ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-aos][data-aos][data-aos-duration="400"] {
    transition-duration: 400ms;
}

[data-aos][data-aos][data-aos-duration="600"] {
    transition-duration: 600ms;
}

[data-aos][data-aos][data-aos-duration="800"] {
    transition-duration: 800ms;
}

[data-aos][data-aos][data-aos-duration="1000"] {
    transition-duration: 1000ms;
}

/* Fade Animations */
[data-aos="fade-up"] {
    transform: translateY(30px);
    opacity: 0;
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

[data-aos="fade-down"] {
    transform: translateY(-30px);
    opacity: 0;
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translateX(30px);
    opacity: 0;
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
    opacity: 0;
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
    opacity: 1;
}

/* Zoom Animations */
[data-aos="zoom-in"] {
    transform: scale(0.9);
    opacity: 0;
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

[data-aos="zoom-out"] {
    transform: scale(1.1);
    opacity: 0;
}

[data-aos="zoom-out"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

/* ==========================================================================
   Gradient Animations
   ========================================================================== */

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(
        -45deg,
        #00D4FF,
        #7B2FF7,
        #00FF88,
        #B175FF
    );
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

/* ==========================================================================
   Glow Effects
   ========================================================================== */

@keyframes glowPulse {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(0, 212, 255, 0.5),
            0 0 40px rgba(0, 212, 255, 0.3),
            0 0 60px rgba(0, 212, 255, 0.1);
    }
    50% {
        box-shadow:
            0 0 30px rgba(0, 212, 255, 0.6),
            0 0 60px rgba(0, 212, 255, 0.4),
            0 0 90px rgba(0, 212, 255, 0.2);
    }
}

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

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow:
            0 0 4px #fff,
            0 0 11px #fff,
            0 0 19px #fff,
            0 0 40px #00D4FF,
            0 0 80px #00D4FF,
            0 0 90px #00D4FF,
            0 0 100px #00D4FF,
            0 0 150px #00D4FF;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.neon-text {
    animation: neonFlicker 2s infinite alternate;
}

/* ==========================================================================
   Particle Animations
   ========================================================================== */

@keyframes float-up {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-1000px) scale(1.5);
    }
}

.particle {
    position: absolute;
    bottom: 0;
    background: linear-gradient(135deg, #00D4FF, #7B2FF7);
    border-radius: 50%;
    animation: float-up 10s infinite;
}

/* ==========================================================================
   3D Transforms
   ========================================================================== */

@keyframes rotate3d {
    0% {
        transform: perspective(1000px) rotateY(0) rotateX(0);
    }
    25% {
        transform: perspective(1000px) rotateY(90deg) rotateX(10deg);
    }
    50% {
        transform: perspective(1000px) rotateY(180deg) rotateX(0);
    }
    75% {
        transform: perspective(1000px) rotateY(270deg) rotateX(-10deg);
    }
    100% {
        transform: perspective(1000px) rotateY(360deg) rotateX(0);
    }
}

.rotate-3d {
    animation: rotate3d 20s linear infinite;
    transform-style: preserve-3d;
}

/* ==========================================================================
   Wave Animations
   ========================================================================== */

@keyframes wave {
    0% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }
    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.5);
    }
    100% {
        transform: translateX(-50%) translateZ(0) scaleY(1);
    }
}

.wave-animation {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 212, 255, 0.4),
        transparent
    );
    animation: wave 2s linear infinite;
}

/* ==========================================================================
   Morph Animations
   ========================================================================== */

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40%/50% 60% 30% 60%;
    }
    100% {
        border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    }
}

.morph-shape {
    animation: morph 8s ease-in-out infinite;
}

/* ==========================================================================
   Shimmer Effect
   ========================================================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* ==========================================================================
   Text Animations
   ========================================================================== */

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #00D4FF;
    }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid #00D4FF;
    white-space: nowrap;
    animation:
        typewriter 3s steps(30) 1s 1 normal both,
        blink 1s step-end infinite;
}

@keyframes slideInWord {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-word {
    display: inline-block;
    animation: slideInWord 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==========================================================================
   Loading Animations
   ========================================================================== */

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    80%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   Hover Effects
   ========================================================================== */

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* ==========================================================================
   Card Tilt Effect (Vanilla Tilt Enhancement)
   ========================================================================== */

.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.tilt-card-inner {
    transform: translateZ(20px);
}

/* ==========================================================================
   Parallax Layers
   ========================================================================== */

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.parallax-layer-1 {
    transform: translateZ(-1px) scale(2);
}

.parallax-layer-2 {
    transform: translateZ(-2px) scale(3);
}

.parallax-layer-3 {
    transform: translateZ(-3px) scale(4);
}

/* ==========================================================================
   Counter Animations
   ========================================================================== */

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animate {
    animation: countUp 0.5s ease-out;
}

/* ==========================================================================
   Blob Animations
   ========================================================================== */

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(30px, 10px) scale(1.05);
    }
}

.blob-animation {
    animation: blob 20s infinite;
}

/* ==========================================================================
   Glitch Effect
   ========================================================================== */

@keyframes glitch {
    0%, 100% {
        text-shadow:
            0.05em 0 0 rgba(255, 0, 0, .75),
            -0.05em -0.025em 0 rgba(0, 255, 0, .75),
            0.025em 0.05em 0 rgba(0, 0, 255, .75);
    }
    14% {
        text-shadow:
            0.05em 0 0 rgba(255, 0, 0, .75),
            -0.05em -0.025em 0 rgba(0, 255, 0, .75),
            0.025em 0.05em 0 rgba(0, 0, 255, .75);
    }
    15% {
        text-shadow:
            -0.05em -0.025em 0 rgba(255, 0, 0, .75),
            0.025em 0.025em 0 rgba(0, 255, 0, .75),
            -0.05em -0.05em 0 rgba(0, 0, 255, .75);
    }
    49% {
        text-shadow:
            -0.05em -0.025em 0 rgba(255, 0, 0, .75),
            0.025em 0.025em 0 rgba(0, 255, 0, .75),
            -0.05em -0.05em 0 rgba(0, 0, 255, .75);
    }
    50% {
        text-shadow:
            0.025em 0.05em 0 rgba(255, 0, 0, .75),
            0.05em 0 0 rgba(0, 255, 0, .75),
            0 -0.05em 0 rgba(0, 0, 255, .75);
    }
    99% {
        text-shadow:
            0.025em 0.05em 0 rgba(255, 0, 0, .75),
            0.05em 0 0 rgba(0, 255, 0, .75),
            0 -0.05em 0 rgba(0, 0, 255, .75);
    }
}

.glitch-effect {
    position: relative;
    animation: glitch 2s infinite;
}

/* ==========================================================================
   Reveal Animations
   ========================================================================== */

@keyframes revealUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes revealDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes revealLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes revealRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.reveal-up {
    animation: revealUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-down {
    animation: revealDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left {
    animation: revealLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right {
    animation: revealRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Liquid Animation
   ========================================================================== */

@keyframes liquid {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    75% {
        border-radius: 40% 60% 60% 40% / 40% 60% 60% 40%;
    }
}

.liquid-shape {
    animation: liquid 10s ease-in-out infinite;
}

/* ==========================================================================
   Stagger Animations
   ========================================================================== */

.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* ==========================================================================
   Accessibility - Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}