/*===========================
    PREMIUM MOTION DESIGN - FOREST GREEN
    Orchestrated animation sequences for navigation + hero
===========================*/

/* ========================================
   NAVIGATION - PREMIUM LOAD ANIMATIONS
======================================== */

/* Navigation Container - Soft Fade Down on Load */
.header-navigation {
    animation: navFadeDown 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes navFadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Appears First */
.header-navigation .nav-container .brand_logo {
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.header-navigation .nav-container .brand_logo:hover {
    transform: scale(1.05);
}

/* Menu Items - Staggered Entrance */
.header-navigation .nav-container .main-menu ul li {
    animation: menuItemSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes menuItemSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-navigation .nav-container .main-menu ul li:nth-child(1) { animation-delay: 0.25s; }
.header-navigation .nav-container .main-menu ul li:nth-child(2) { animation-delay: 0.3s; }
.header-navigation .nav-container .main-menu ul li:nth-child(3) { animation-delay: 0.35s; }
.header-navigation .nav-container .main-menu ul li:nth-child(4) { animation-delay: 0.4s; }
.header-navigation .nav-container .main-menu ul li:nth-child(5) { animation-delay: 0.45s; }
.header-navigation .nav-container .main-menu ul li:nth-child(6) { animation-delay: 0.5s; }
.header-navigation .nav-container .main-menu ul li:nth-child(7) { animation-delay: 0.55s; }

/* Login Button - Last to Appear */
.header-navigation .nav-container .nav-push-item {
    animation: fadeInScale 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

/* ========================================
   HERO SECTION - FOREST ATMOSPHERE
======================================== */

/* Animated gradient background */
.saas-banner {
    background: linear-gradient(160deg, #1a2e1a 0%, #243824 35%, #2d4a2d 65%, #1e3320 100%);
    background-size: 300% 300%;
    animation: forestGradient 15s ease infinite;
    position: relative;
}

@keyframes forestGradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 100%; }
    100% { background-position: 0% 50%; }
}

/* Floating orbs removed -- hero uses background image instead */

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Step 1: Tagline - Soft Fade with Minimal Motion */
.saas-banner .hero-content span.span {
    opacity: 0;
    animation: heroTextIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

/* Step 2: Headline - Natural Upward Flow */
.saas-banner .hero-content h1 {
    opacity: 0;
    animation: heroTextIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

/* Step 3: CTA Buttons - Final Emphasis */
.saas-banner .hero-content ul {
    opacity: 0;
    animation: heroTextIn 1s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both;
}

@keyframes heroTextIn {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Step 4: Profile Image - Intelligent Materialization */
.saas-banner .hero-img {
    opacity: 0;
    animation: imageMaterialize 1.4s cubic-bezier(0.16, 1, 0.3, 1) 1.5s both;
}

@keyframes imageMaterialize {
    0% {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
        filter: blur(10px) brightness(1.1);
    }
    50% {
        filter: blur(4px) brightness(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0) brightness(1);
    }
}

/* ========================================
   GLOWING ACCENT PARTICLES
======================================== */

/* Subtle glowing particles in hero */
.saas-banner .shape {
    position: relative;
    z-index: 1;
}

/* ========================================
   ACCESSIBILITY - REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .saas-banner {
        animation: none !important;
        background-size: 100% 100% !important;
    }

    .header-navigation,
    .header-navigation .nav-container .brand_logo,
    .header-navigation .nav-container .main-menu ul li,
    .header-navigation .nav-container .nav-push-item,
    .saas-banner .hero-content span.span,
    .saas-banner .hero-content h1,
    .saas-banner .hero-content ul,
    .saas-banner .hero-img {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS - 60fps
======================================== */

/* GPU Acceleration - desktop only to save mobile battery */
@media (min-width: 992px) {
    .header-navigation,
    .saas-banner,
    .saas-banner .hero-content,
    .saas-banner .hero-img {
        transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-font-smoothing: antialiased;
    }
}

/* Mobile: disable heavy animations, use simple fades */
@media (max-width: 991px) {
    .saas-banner {
        animation: none !important;
        background-size: cover !important;
    }

    .saas-banner .hero-content span.span,
    .saas-banner .hero-content h1,
    .saas-banner .hero-content ul {
        animation: mobileSlideUp 0.5s ease both !important;
        filter: none !important;
    }

    .saas-banner .hero-content span.span { animation-delay: 0.1s !important; }
    .saas-banner .hero-content h1 { animation-delay: 0.2s !important; }
    .saas-banner .hero-content ul { animation-delay: 0.3s !important; }

    .saas-banner .hero-img {
        animation: mobileFadeIn 0.6s ease 0.4s both !important;
        filter: none !important;
    }
}

@keyframes mobileSlideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes mobileFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Optimize Will-Change on desktop */
@media (min-width: 992px) {
    .saas-banner {
        will-change: background-position;
    }

    .saas-banner .hero-content span.span,
    .saas-banner .hero-content h1,
    .saas-banner .hero-content ul,
    .saas-banner .hero-img {
        will-change: transform, opacity, filter;
    }
}

/* Remove Will-Change After Animation */
@media (min-width: 992px) {
    .saas-banner .hero-content span.span,
    .saas-banner .hero-content h1,
    .saas-banner .hero-content ul,
    .saas-banner .hero-img {
        animation-fill-mode: both;
    }
}
