/* ============================================
   Enhanced Animations & Effects
   ============================================ */

/* Pulse animation for CTA button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 127, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(0, 255, 127, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 127, 0);
    }
}

/* Subtle floating animation for device */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Sparkle animation for stars */
@keyframes sparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Glow pulse for device shadow */
@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.1);
    }
}

/* Apply floating animation to device */
.device-mockup {
    animation: fadeInUp 0.8s ease-out, float 6s ease-in-out infinite;
    animation-delay: 0s, 1s;
}

/* Apply glow pulse to device shadow */
.device-mockup::after {
    animation: glowPulse 4s ease-in-out infinite;
}

/* Add subtle pulse to CTA on hover */
.app-store-link {
    position: relative;
}

.app-store-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-store-link:hover::before {
    animation: pulse 1.5s infinite;
    opacity: 1;
}

/* Parallax scrolling effect */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%,
        rgba(0, 255, 127, 0.08) 0%,
        transparent 25%),
        radial-gradient(circle at 70% 80%,
        rgba(0, 255, 127, 0.05) 0%,
        transparent 25%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Staggered fade-in for content elements */
.hero-content > * {
    animation: fadeInUp 0.8s ease-out backwards;
}

.brand { animation-delay: 0.1s; }
.hero-headline { animation-delay: 0.2s; }
.hero-description { animation-delay: 0.3s; }
.cta-container { animation-delay: 0.4s; }

/* Interactive hover states */
.value-prop-item {
    cursor: default;
    position: relative;
    overflow: hidden;
}

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

.value-prop-item:hover::before {
    left: 100%;
}

/* Loading animation for images */
.mockup-image {
    animation: fadeIn 0.8s ease-out;
}

/* Add sparkle elements to the page */
.sparkle {
    position: fixed;
    pointer-events: none;
    animation: sparkle 3s ease-in-out infinite;
}

.sparkle-1 {
    top: 20%;
    left: 10%;
    color: var(--color-accent);
    font-size: 1.5rem;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 60%;
    right: 15%;
    color: var(--color-accent);
    font-size: 1rem;
    animation-delay: 1s;
}

.sparkle-3 {
    bottom: 30%;
    left: 20%;
    color: var(--color-accent);
    font-size: 1.2rem;
    animation-delay: 2s;
}

/* Smooth scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 1s ease-out 1s backwards;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 0.7;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--color-text-secondary);
    border-bottom: 2px solid var(--color-text-secondary);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(-10px);
    }
    60% {
        transform: rotate(45deg) translateY(-5px);
    }
}

/* Performance optimizations */
.hero-visual,
.device-mockup,
.mockup-image {
    will-change: transform;
}

/* Smooth transitions for all interactive elements */
* {
    transition-property: opacity, transform, background-color, border-color, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Disable animations on battery saver mode */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .sparkle {
        display: none;
    }
}