/* ============================================
   VIOLA LANDING PAGE - ANIMATIONS & TRANSITIONS
   ============================================ */

/* ============================================
   1. KEYFRAME ANIMATIONS
   ============================================ */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right Animation */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Scale Up Animation */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(123, 97, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(123, 97, 255, 0.8);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-10px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-5px);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Shimmer Animation (Loading effect) */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ============================================
   2. UTILITY ANIMATION CLASSES
   ============================================ */

/* Fade In - General */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Up */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Fade In Down */
.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

/* Fade In Left */
.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

/* Fade In Right */
.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Scale Up */
.scale-up {
    animation: scaleUp 0.6s ease-out;
}

/* Pulse */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Glow Effect */
.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Bounce */
.bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* ============================================
   3. ELEMENT-SPECIFIC ANIMATIONS
   ============================================ */

/* Hero Title Animation */
.hero-title {
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

/* Hero Subtitle Animation */
.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Scroll Indicator Animation */
@keyframes scroll-indicator-bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(90deg);
    }
    40% {
        transform: translateY(-1em) rotate(90deg);
    }
    60% {
        transform: translateY(-0.5em) rotate(90deg);
    }
}

/* Service Cards Staggered Animation */
.service-card {
    opacity: 0;
    transform: translateY(30px);
}

.service-card:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.service-card:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.service-card:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.service-card:nth-child(4) {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Service Card Hover Animation */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-image img {
    transition: transform 0.4s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

/* About Image Hover */
.about-image img {
    transition: transform 0.6s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* ============================================
   4. LINK & BUTTON ANIMATIONS
   ============================================ */

/* Email Link Hover */
.email-link {
    position: relative;
    transition: color 0.3s ease;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-purple);
    transition: width 0.3s ease;
}

.email-link:hover::after {
    width: 100%;
}

/* Button Base Hover */
button {
    transition: all 0.3s ease;
}

button:active {
    transform: translateY(0);
}

/* ============================================
   5. FOOTER ANIMATIONS
   ============================================ */

/* Social Icons Hover */
.footer-social a {
    transition: all 0.3s ease;
}

.footer-social a:hover {
    filter: blur(0.5px);
}

/* Footer Logo Animation */
.footer-logo {
    transition: color 0.3s ease;
}

/* ============================================
   6. SMOOTH TRANSITIONS
   ============================================ */

/* Text Color Transition */
a,
.email-link,
.highlight-purple {
    transition: color 0.3s ease;
}

/* Background Transitions */
.service-card,
.footer-social a {
    transition: background-color 0.3s ease;
}

/* Transform Transitions */
img,
.service-image img {
    transition: transform 0.4s ease;
}

/* ============================================
   7. SCROLL ANIMATIONS
   ============================================ */

/* Parallax Effect on Scroll (optional) */
.video-background {
    /* Can be enhanced with parallax via JS */
}

/* Stagger Animation for Lists */
.service-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

.service-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* ============================================
   8. LOADING STATES
   ============================================ */

/* Video Loading Shimmer */


/* ============================================
   9. MOBILE & RESPONSIVE ANIMATIONS
   ============================================ */

/* Reduce animations on mobile for performance */
@media (max-width: 768px) {
    /* Shorter animations on mobile */
    .fade-in-up,
    .fade-in-down,
    .fade-in-left,
    .fade-in-right,
    .scale-up {
        animation-duration: 0.4s;
    }

    /* Less stagger on mobile */
    .service-card:nth-child(2) {
        animation-delay: 0.1s;
    }

    .service-card:nth-child(3) {
        animation-delay: 0.15s;
    }

    .service-card:nth-child(4) {
        animation-delay: 0.2s;
    }
}

/* ============================================
   10. REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Keep static styles, remove animations */
    .fade-in {
        opacity: 1;
        transform: none;
    }

    .hero-title,
    .hero-subtitle {
        animation: none;
        opacity: 1;
    }

    .scroll-indicator__dot,
    .scroll-indicator__chevron--down {
        animation: none;
    }

    .service-card {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .bounce {
        animation: none;
    }
}

/* ============================================
   11. PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Use transform for better performance */
.fade-in.visible {
    will-change: auto;
}

.service-card:hover {
    will-change: transform;
}

.service-card:hover {
    will-change: auto;
}

/* GPU Acceleration */
.video-background,
.service-image,
.about-image {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ============================================
   12. TRANSITION DELAYS (FOR SEQUENCES)
   ============================================ */

.fade-in {
    transition-delay: 0s;
}

.fade-in.visible {
    transition-delay: 0s;
}

/* Stagger effect helper classes */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}
