/* ============================================
   Keyframe Animations
   ============================================ */

/* Gradient Animation for Hero Background */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating Animation for Hero Elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-15px) translateX(10px);
    }
    50% {
        transform: translateY(-30px) translateX(5px);
    }
    75% {
        transform: translateY(-15px) translateX(-5px);
    }
}

@keyframes floatReverse {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(20px) translateX(-10px);
    }
    50% {
        transform: translateY(10px) translateX(-15px);
    }
    75% {
        transform: translateY(25px) translateX(5px);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* ============================================
   Animation Classes
   ============================================ */

/* Hero Animations */
.hero {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

.hero__floating-element--1 {
    animation: floatSlow 20s ease-in-out infinite;
}

.hero__floating-element--2 {
    animation: float 15s ease-in-out infinite;
    animation-delay: 2s;
}

.hero__floating-element--3 {
    animation: floatReverse 18s ease-in-out infinite;
    animation-delay: 1s;
}

.hero__title {
    animation: fadeInDown 0.8s ease-out;
}

.hero__subtitle {
    animation: fadeIn 1s ease-out 0.3s both;
}

.hero .btn--primary {
    animation: fadeIn 1.2s ease-out 0.6s both;
}

/* Benefit Card Stagger Animation */
.benefit-card {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.benefit-card:nth-child(1) {
    transition-delay: 0.1s;
}

.benefit-card:nth-child(2) {
    transition-delay: 0.2s;
}

.benefit-card:nth-child(3) {
    transition-delay: 0.3s;
}

.benefit-card:nth-child(4) {
    transition-delay: 0.4s;
}

.benefit-card:nth-child(5) {
    transition-delay: 0.5s;
}

.benefit-card:nth-child(6) {
    transition-delay: 0.6s;
}

/* Icon Hover Animation */
.benefit-card__icon {
    transition: transform 0.3s ease;
}

.benefit-card:hover .benefit-card__icon {
    transform: scale(1.1) rotate(5deg);
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

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

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

/* Form Input Focus Animation */
.form__input {
    position: relative;
}

.form__group {
    position: relative;
}

.form__label {
    transition: all 0.3s ease;
}

.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
    transform: translateY(-8px);
    font-size: 0.8rem;
    color: var(--color-purple);
}

/* Contact Section Background Animation */
.contact {
    background-size: 200% 200%;
    animation: gradientShift 12s ease infinite;
}

/* Message Fade In */
.form__message--success,
.form__message--error {
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   Utility Animation Classes
   ============================================ */

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.5s ease-out;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Scroll Reveal - for elements that animate on scroll */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* Enable hardware acceleration for smoother animations */
.hero__floating-element,
.benefit-card,
.btn {
    will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero__floating-element {
        animation: none;
    }
}
