/**
 * Hero Section Animations
 * Clean, professional text reveal
 * Waits for loading screen to complete before starting
 */

/* Hero text wrapper - initially hidden until loading completes */
.heroText {
    opacity: 0;
}

/* When loading is complete, reveal hero text with animation */
body.loading-complete .heroText {
    opacity: 1;
    animation: fadeInHero 0.8s ease-out;
}

/* Hero Title - with minimal POP-style background */
.heroTitle {
    display: inline;
    line-height: 1.6;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    padding: 0 6px;
    background: linear-gradient(to bottom, transparent 55%, #FF6B9D 55%, #FFA07A 100%);
    color: #ffffff;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

body.loading-complete .heroTitle {
    animation: slideUpFadeWithBg 0.8s 0.3s ease-out forwards;
}

/* Stylish accent line below title (separate element) */
.heroAccentLine {
    display: block;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
    opacity: 0;
    transform-origin: left;
    animation: slideAccent 0.6s 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Hero lead text with fade and slide */
.heroLead {
    opacity: 0;
    transform: translateY(20px);
}

body.loading-complete .heroLead {
    animation: slideUpFade 0.8s 1.2s ease-out forwards;
}

/* Mobile CTA button with bounce effect */
.hero-cta-mobile {
    opacity: 0;
    transform: scale(0.8);
}

body.loading-complete .hero-cta-mobile {
    animation: bounceIn 0.7s 1.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Keyframe Animations */
@keyframes fadeInHero {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpFadeWithBg {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideAccent {
    to {
        opacity: 1;
        width: 60px;
        /* Shortened for better look */
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .heroAccentLine {
        width: 0;
        /* Animation handles the width */
        margin-top: 0.5rem;
    }
}