/* ============================================
   AKNTA - Animations Stylesheet
   Advanced Animation Effects
   ============================================ */

/* Scroll Reveal Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for children */
.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* Hero Title Word Animation */
.hero-title .word {
    opacity: 0;
    transform: translateY(50px) rotateX(-20deg);
    animation: wordReveal 0.8s ease forwards;
    transform-origin: center bottom;
}

.hero-title .title-line:nth-child(1) .word:nth-child(1) { animation-delay: 0.5s; }
.hero-title .title-line:nth-child(1) .word:nth-child(2) { animation-delay: 0.6s; }
.hero-title .title-line:nth-child(1) .word:nth-child(3) { animation-delay: 0.7s; }
.hero-title .title-line:nth-child(2) .word:nth-child(1) { animation-delay: 0.8s; }
.hero-title .title-line:nth-child(2) .word:nth-child(2) { animation-delay: 0.9s; }
.hero-title .title-line:nth-child(3) .word:nth-child(1) { animation-delay: 1.0s; }

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Gradient Text Animation */
.gradient-text {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

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

/* Card Hover Tilt Effect */
[data-tilt] {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

[data-tilt] * {
    transform: translateZ(30px);
}

/* Glow Pulse Animation */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--glow-purple),
                    0 0 40px var(--glow-blue),
                    0 0 60px var(--glow-cyan);
    }
    50% {
        box-shadow: 0 0 30px var(--glow-purple),
                    0 0 60px var(--glow-blue),
                    0 0 90px var(--glow-cyan);
    }
}

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

/* Button Ripple Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Service Card Shine Effect */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* Floating Animation Variations */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-20px) rotate(0deg); }
    75% { transform: translateY(-10px) rotate(-2deg); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.float-slow { animation: floatSlow 8s ease-in-out infinite; }
.float-fast { animation: floatFast 4s ease-in-out infinite; }

/* Text Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer-text {
    background: linear-gradient(
        90deg,
        var(--text-primary) 0%,
        var(--purple) 25%,
        var(--cyan) 50%,
        var(--purple) 75%,
        var(--text-primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* Border Gradient Animation */
@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animated-border {
    position: relative;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--purple),
        transparent 30%
    );
    animation: borderRotate 4s linear infinite;
}

.animated-border::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-card);
    border-radius: inherit;
}

/* Icon Bounce */
@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.icon-bounce:hover {
    animation: iconBounce 0.5s ease;
}

/* Scale Up Animation */
@keyframes scaleUp {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-up {
    animation: scaleUp 0.5s ease forwards;
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left { animation: slideInLeft 0.6s ease forwards; }
.slide-in-right { animation: slideInRight 0.6s ease forwards; }
.slide-in-up { animation: slideInUp 0.6s ease forwards; }
.slide-in-down { animation: slideInDown 0.6s ease forwards; }

/* Blur In Animation */
@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.blur-in {
    animation: blurIn 0.8s ease forwards;
}

/* Rotate In Animation */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

.rotate-in {
    animation: rotateIn 0.6s ease forwards;
}

/* Typing Effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--purple);
    animation: typing 3s steps(40) forwards, blink 0.75s step-end infinite;
}

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

.count-up {
    animation: countUp 0.5s ease forwards;
}

/* Parallax Scroll Effect (Applied via JS) */
.parallax {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Magnetic Button Hover */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Card 3D Tilt Hover */
.tilt-card {
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Progress Bar Animation */
@keyframes progressFill {
    from { width: 0; }
    to { width: var(--progress); }
}

.progress-animated {
    animation: progressFill 1s ease forwards;
}

/* Notification Slide */
@keyframes notificationSlide {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    10% {
        opacity: 1;
        transform: translateX(0);
    }
    90% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

.notification {
    animation: notificationSlide 5s ease forwards;
}

/* Skeleton Loading */
@keyframes skeleton {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-card) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease infinite;
}

/* Confetti Animation */
@keyframes confetti {
    0% {
        transform: translateY(0) rotateZ(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

.confetti-piece {
    animation: confetti 3s ease-out forwards;
}

/* Success Checkmark */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark-animated {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.5s ease forwards;
}

/* Heartbeat */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

.heartbeat {
    animation: heartbeat 1.5s ease infinite;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* Fade Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.fade-in { animation: fadeIn 0.5s ease forwards; }
.fade-out { animation: fadeOut 0.5s ease forwards; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}
