/* ========================================= */
/*    FRONT PAGE HERO - PROFESSIONAL        */
/* ========================================= */

/* CRITICAL: Remove ALL top spacing */
.hero-section,
.front-page-hero-section {
    margin: 0 !important;
    padding: 0 !important;
}

/* Enhanced hero should have content padding only */
.enhanced-hero {
    margin: 0 !important;
    padding-top: 220px !important; /* Header height (70px) + internal spacing (150px) */
    padding-bottom: 100px !important;
    min-height: 100vh;
}

/* Wrapper fixes */
.front-page-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

.front-page-wrapper .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove all top spacing from front page hero */
.hero-section,
.front-page-hero-section {
    margin: 0 !important;
    padding-top: 120px; /* Only internal padding, no margin */
}

/* Ensure hero sits right after fixed header */
body .hero-section,
body .front-page-hero-section {
    margin-top: 0 !important;
}

/* Critical Loading States - Prevent FOUC */
.enhanced-hero {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-out, visibility 0s linear 0.6s;
}

.enhanced-hero.hero-loading {
    opacity: 0;
    visibility: hidden;
}

/* Hide all content during loading */
.enhanced-hero.hero-loading .hero-content,
.enhanced-hero.hero-loading .hero-title,
.enhanced-hero.hero-loading .hero-description,
.enhanced-hero.hero-loading .hero-cta-container,
.enhanced-hero.hero-loading .scroll-indicator {
    opacity: 0 !important;
    visibility: hidden !important;
}

.enhanced-hero.hero-ready {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
}

/* Loading Skeleton State */
.enhanced-hero.hero-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(15, 15, 35, 1) 0%, 
        rgba(26, 26, 46, 1) 50%, 
        rgba(22, 33, 62, 1) 100%
    );
    z-index: 999;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* Enhanced Hero Section with Performance Optimizations */
.enhanced-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(15, 15, 35, 0.98) 0%, 
        rgba(26, 26, 46, 0.95) 25%, 
        rgba(22, 33, 62, 0.98) 50%, 
        rgba(83, 52, 131, 0.95) 75%, 
        rgba(114, 9, 183, 0.98) 100%
    );
    margin-left: calc(-50vw + 50%);
    width: 100vw;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    /* Performance optimizations */
    will-change: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: layout style paint;
}

/* Background Layer with GPU Acceleration */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transform: translateZ(0);
    opacity: 0;
    transition: opacity 0.6s ease-out 0.2s;
}

.enhanced-hero.hero-ready .hero-background {
    opacity: 1;
}

/* Optimized Particle System */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 25% 35%, rgba(114, 9, 183, 0.4), transparent),
        radial-gradient(1px 1px at 75% 65%, rgba(83, 52, 131, 0.3), transparent),
        radial-gradient(1px 1px at 45% 15%, rgba(22, 33, 62, 0.35), transparent),
        radial-gradient(2px 2px at 85% 85%, rgba(114, 9, 183, 0.25), transparent);
    background-repeat: repeat;
    background-size: 180px 120px, 220px 140px, 160px 100px, 240px 160px;
    animation: heroParticlesFlow 25s linear infinite;
    /* Performance optimizations */
    will-change: auto;
    transform: translateZ(0);
    opacity: 0;
    transition: opacity 0.8s ease-out 0.3s;
}

.enhanced-hero.hero-ready .hero-particles {
    opacity: 0.8;
}

.hero-gradient-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 40%, transparent 0%, rgba(15, 15, 35, 0.3) 100%),
        radial-gradient(ellipse at 70% 60%, transparent 0%, rgba(114, 9, 183, 0.15) 100%);
    animation: gradientPulse 15s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.8s ease-out 0.4s;
}

.enhanced-hero.hero-ready .hero-gradient-overlay {
    opacity: 1;
}

/* Hero Content with Enhanced Typography */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1400px; /* Increased from 1200px */
    margin: 0 auto;
    padding: 0 40px;
    transform: translateZ(0);
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s,
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}

.enhanced-hero.hero-ready .hero-content {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

.hero-text-container {
    max-width: 1100px; /* Increased from 900px */
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem); /* Reduced max size from 7rem to 5.5rem */
    font-weight: 900;
    margin-bottom: 1.5rem; /* Reduced from 2.5rem */
    line-height: 1.1; /* Tighter line height */
    text-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.02em;
    /* Performance optimization */
    will-change: auto;
}

.hero-title-main {
    display: block;
    color: #ffffff;
    margin-bottom: 0.1em; /* Reduced from 0.15em */
    font-weight: 800;
}

.hero-title-accent {
    display: block;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #f8faff 15%,
        #e6e9ff 30%, 
        #d4d7ff 45%,
        #b8c6db 60%, 
        #f093fb 80%, 
        #f5f7fa 100%
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroGradientShift 8s ease-in-out infinite;
    animation-play-state: paused;
    font-weight: 900;
    position: relative;
    margin-top: -5px; /* Reduced from -8px */
}

.enhanced-hero.hero-ready .hero-title-accent {
    animation-play-state: running;
}

.hero-title-accent::after {
    content: '';
    position: absolute;
    bottom: -8px; /* Reduced from -10px */
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px; /* Reduced from 4px */
    background: linear-gradient(90deg, transparent, rgba(114, 9, 183, 0.6), transparent);
    border-radius: 2px;
    animation: accentLineGlow 3s ease-in-out infinite;
}

.hero-description {
    font-size: clamp(1.1rem, 3vw, 1.4rem); /* Reduced max size from 1.6rem to 1.4rem */
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6; /* Reduced from 1.7 */
    margin-bottom: 2.5rem; /* Reduced from 3.5rem */
    max-width: 800px; /* Increased from 700px */
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Enhanced CTA Buttons */
.hero-cta-container {
    display: flex;
    gap: 20px; /* Reduced from 25px */
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem; /* Reduced from 2.5rem */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.7s,
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.7s;
}

.enhanced-hero.hero-ready .hero-cta-container {
    opacity: 1;
    transform: translateY(0);
}

.hero-cta-primary,
.hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Reduced from 12px */
    padding: 16px 32px; /* Reduced from 18px 36px */
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem; /* Reduced from 1.05rem */
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.6px; /* Reduced from 0.8px */
    position: relative;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    /* Performance optimization */
    will-change: auto;
    transform: translateZ(0);
}

.hero-cta-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
    border: 2px solid transparent;
}

.hero-cta-primary:hover {
    background: linear-gradient(135deg, #5b52e8 0%, #8b5cf6 50%, #9d71f7 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.5);
    text-decoration: none;
    color: white;
}

.hero-cta-secondary {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    color: white;
    border: 2px solid rgba(16, 185, 129, 0.4);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.hero-cta-secondary:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
    border-color: rgba(16, 185, 129, 0.7);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
    text-decoration: none;
    color: white;
}

/* Enhanced Button Animations */
.hero-cta-primary .cta-arrow,
.hero-cta-secondary .cta-arrow {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.3rem;
    font-weight: bold;
}

.hero-cta-primary:hover .cta-arrow,
.hero-cta-secondary:hover .cta-arrow {
    transform: translateX(5px);
}

/* Professional Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

/* Professional Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: opacity 0.6s ease-out 1s, 
                color 0.4s ease,
                transform 0.4s ease;
    z-index: 10;
    animation: bounceScroll 3s infinite;
    opacity: 0;
}

.enhanced-hero.hero-ready .scroll-indicator {
    opacity: 1;
    animation: bounceScroll 3s infinite 1.2s;
}

.scroll-arrow {
    font-size: 1.8rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    font-weight: bold;
}

.scroll-text {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.9;
}

/* Professional Keyframe Animations */
@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes heroGradientShift {
    0%, 100% { background-position: 0% 50%; }
    20% { background-position: 80% 20%; }
    40% { background-position: 100% 80%; }
    60% { background-position: 20% 100%; }
    80% { background-position: 0% 60%; }
}

@keyframes accentLineGlow {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 1; transform: translateX(-50%) scaleX(1.2); }
}

@keyframes heroParticlesFlow {
    0% { transform: translateY(0) translateX(0) rotate(0deg); }
    25% { transform: translateY(-20px) translateX(10px) rotate(90deg); }
    50% { transform: translateY(-40px) translateX(-5px) rotate(180deg); }
    75% { transform: translateY(-20px) translateX(15px) rotate(270deg); }
    100% { transform: translateY(0) translateX(0) rotate(360deg); }
}

@keyframes gradientPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes bounceScroll {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    10% { transform: translateX(-50%) translateY(-8px); }
    30% { transform: translateX(-50%) translateY(-12px); }
    60% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes rippleEffect {
    0% { transform: scale(0); opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Responsive Design - Professional Breakpoints */
@media (max-width: 1400px) {
    .enhanced-hero { min-height: 95vh; }
    .hero-content { padding: 0 35px; max-width: 1300px; }
    .hero-text-container { max-width: 1000px; }
}

@media (max-width: 1200px) {
    .enhanced-hero { min-height: 90vh; padding: 60px 0; }
    .hero-content { padding: 0 30px; max-width: 1200px; }
    .hero-text-container { max-width: 900px; }
    .hero-cta-container { gap: 18px; }
}

@media (max-width: 768px) {
    .enhanced-hero { 
        min-height: 85vh; 
        padding: 50px 0;
        margin-left: calc(-50vw + 50%);
    }
    
    .hero-content { padding: 0 25px; max-width: 100%; }
    .hero-text-container { max-width: 100%; }
    
    .hero-title {
        margin-bottom: 1.2rem;
    }
    
    .hero-description {
        margin-bottom: 2rem;
    }
    
    .hero-cta-container {
        flex-direction: column;
        gap: 15px;
        margin-top: 1.8rem;
    }
    
    .hero-cta-primary,
    .hero-cta-secondary {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .enhanced-hero { 
        min-height: 80vh; 
        padding: 40px 0;
    }
    
    .hero-content { padding: 0 20px; }
    .hero-title { margin-bottom: 1rem; }
    .hero-description { margin-bottom: 1.8rem; }
    .hero-cta-container { margin-top: 1.5rem; }
    .hero-cta-primary, .hero-cta-secondary { 
        padding: 12px 24px; 
        font-size: 0.9rem;
        max-width: 280px;
    }
}

/* High-DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-particles { opacity: 0.9; }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .enhanced-hero {
        background: linear-gradient(135deg, 
            rgba(10, 10, 25, 0.98) 0%, 
            rgba(20, 20, 35, 0.95) 25%, 
            rgba(15, 25, 45, 0.98) 50%, 
            rgba(65, 35, 100, 0.95) 75%, 
            rgba(90, 5, 150, 0.98) 100%
        );
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .enhanced-hero,
    .hero-background,
    .hero-particles,
    .hero-gradient-overlay,
    .hero-content,
    .hero-cta-container,
    .scroll-indicator {
        transition: opacity 0.3s ease !important;
        animation: none !important;
    }
    
    .enhanced-hero.hero-ready .scroll-indicator {
        animation: none !important;
    }
}

/* Print Styles */
@media print {
    .enhanced-hero {
        background: white;
        color: black;
        min-height: auto;
        page-break-inside: avoid;
    }
    
    .hero-particles,
    .scroll-indicator {
        display: none;
    }
}