/* Animation Styles */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale in animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Initial states for animated elements */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Hero animations */
.hero-title {
    animation: fadeIn 0.8s ease forwards;
}

.hero-subtitle {
    animation: fadeIn 0.8s ease 0.2s forwards;
    opacity: 0;
}

/* Header scroll effect */
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

/* Platform card animations */
.platform-info {
    animation: slideInLeft 0.8s ease forwards;
}

.platform-visual {
    animation: slideInRight 0.8s ease forwards;
}

/* App card hover animations */
.app-card {
    transition: all 0.3s ease;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.app-card:hover .app-image {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Button animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Download buttons pulse animation */
.download-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.download-btn:hover {
    animation: none;
    transform: scale(1.05);
}

/* Loading animation for images */
.platform-image,
.app-image {
    transition: opacity 0.3s ease;
}

.platform-image:not([src]),
.app-image:not([src]) {
    opacity: 0;
}

/* Smooth reveal animations for sections */
.web-platform {
    animation: fadeIn 0.8s ease forwards;
}

.mobile-apps {
    animation: fadeIn 0.8s ease 0.3s forwards;
    opacity: 0;
}



/* Text typing effect (optional) */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.typing-effect {
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid var(--primary-blue);
    animation: typing 3s steps(30) forwards, blink 0.5s step-end infinite alternate;
}

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

/* Floating animation for images */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.platform-image {
    animation: float 6s ease-in-out infinite;
}

/* Stagger animation for app features */
.app-features li {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.app-features li:nth-child(1) {
    animation-delay: 0.1s;
}

.app-features li:nth-child(2) {
    animation-delay: 0.2s;
}

.app-features li:nth-child(3) {
    animation-delay: 0.3s;
}

.app-features li:nth-child(4) {
    animation-delay: 0.4s;
}

/* Platform features stagger */
.platform-features li {
    opacity: 0;
    animation: slideInLeft 0.5s ease forwards;
}

.platform-features li:nth-child(1) {
    animation-delay: 0.2s;
}

.platform-features li:nth-child(2) {
    animation-delay: 0.3s;
}

.platform-features li:nth-child(3) {
    animation-delay: 0.4s;
}

.platform-features li:nth-child(4) {
    animation-delay: 0.5s;
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    z-index: 1000;
    transition: width 0.3s ease;
}

/* Mobile-specific animations */
@media (max-width: 768px) {

    .platform-info,
    .platform-visual {
        animation: fadeIn 0.6s ease forwards;
    }

    .app-card:nth-child(1) {
        animation: fadeIn 0.6s ease 0.1s forwards;
        opacity: 0;
    }

    .app-card:nth-child(2) {
        animation: fadeIn 0.6s ease 0.3s forwards;
        opacity: 0;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    .hero-title,
    .hero-subtitle,
    .platform-info,
    .platform-visual,
    .mobile-apps,
    .download-section,
    .platform-features li,
    .app-features li,
    .app-card {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .platform-image {
        animation: none;
    }

    .download-btn {
        animation: none;
    }
}