/* ===================================
   5-STAR EFFECTS & ANIMATIONS
   Golden Particles + Parallax + Cinematic
   =================================== */

/* ===================================
   GOLDEN PARTICLES CANVAS
   =================================== */

.golden-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ===================================
   PARALLAX EFFECTS
   =================================== */

.parallax-bg {
    will-change: transform;
    transition: transform 0.5s ease-out;
}

.parallax-layer {
    will-change: transform;
}

/* Hero Parallax Layers */
.hero {
    overflow: hidden;
}

.hero-bg.parallax-bg {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* ===================================
   CINEMATIC FADE-IN ON SCROLL
   =================================== */

/* Initial hidden state */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: 
        opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Visible state */
.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Stagger delays for multiple elements */
.fade-in-scroll:nth-child(1) { transition-delay: 0s; }
.fade-in-scroll:nth-child(2) { transition-delay: 0.1s; }
.fade-in-scroll:nth-child(3) { transition-delay: 0.2s; }
.fade-in-scroll:nth-child(4) { transition-delay: 0.3s; }
.fade-in-scroll:nth-child(5) { transition-delay: 0.4s; }
.fade-in-scroll:nth-child(6) { transition-delay: 0.5s; }
.fade-in-scroll:nth-child(7) { transition-delay: 0.6s; }
.fade-in-scroll:nth-child(8) { transition-delay: 0.7s; }

/* Apply to specific elements */
.opportunity-card,
.highlight-card,
.scenario-card,
.testimonial-card,
.legal-card,
.gallery-item {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: 
        opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.opportunity-card.visible,
.highlight-card.visible,
.scenario-card.visible,
.testimonial-card.visible,
.legal-card.visible,
.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* ===================================
   MAGNETIC HOVER EFFECTS
   =================================== */

/* Enhanced Button Hover - Magnetic + Shine */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.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.6s ease;
}

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

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(212, 175, 55, 0.4),
        0 0 0 1px rgba(212, 175, 55, 0.2);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Primary Button Magnetic */
.btn-primary {
    background: linear-gradient(135deg, var(--color-forest-depth) 0%, var(--color-primary-light) 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-forest-depth) 100%);
    box-shadow: 
        0 15px 40px rgba(10, 47, 35, 0.4),
        0 0 0 2px rgba(212, 175, 55, 0.3);
}

/* Gold Button Magnetic */
.btn-gold {
    background: linear-gradient(135deg, var(--color-golden-prosperity) 0%, var(--color-gold-dark) 100%);
    position: relative;
}

.btn-gold::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.btn-gold:hover::after {
    opacity: 1;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #E5C558 0%, var(--color-golden-prosperity) 100%);
    box-shadow: 
        0 15px 40px rgba(212, 175, 55, 0.5),
        0 0 30px rgba(212, 175, 55, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Outline Button Magnetic */
.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--color-golden-prosperity);
    border-color: var(--color-golden-prosperity);
    color: var(--color-forest-depth);
    box-shadow: 
        0 15px 40px rgba(212, 175, 55, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
}

/* ===================================
   CARD MAGNETIC HOVER
   =================================== */

.opportunity-card,
.highlight-card,
.scenario-card,
.testimonial-card,
.legal-card,
.stat-card {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.opportunity-card:hover,
.highlight-card:hover,
.scenario-card:hover,
.testimonial-card:hover,
.legal-card:hover,
.stat-card:hover {
    transform: translateY(-12px) translateZ(20px) scale(1.02);
    box-shadow: 
        0 25px 60px rgba(10, 47, 35, 0.2),
        0 0 0 1px rgba(212, 175, 55, 0.3),
        inset 0 0 30px rgba(212, 175, 55, 0.05);
}

/* Card gloweffect */
.stat-card::after,
.opportunity-card::after,
.highlight-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(212, 175, 55, 0.3) 50%,
        transparent 70%
    );
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: -1;
}

.stat-card:hover::after,
.opportunity-card:hover::after,
.highlight-card:hover::after {
    opacity: 1;
}

/* ===================================
   ENHANCED HERO OVERLAY
   =================================== */

.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(10, 47, 35, 0.75) 0%,
        rgba(10, 47, 35, 0.85) 50%,
        rgba(10, 47, 35, 0.95) 100%
    );
    mix-blend-mode: multiply;
}

/* Hero content fade-in animation */
.hero-content {
    animation: heroFadeIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Hero title special effect */
.hero-title {
    background: linear-gradient(
        135deg,
        var(--color-golden-prosperity) 0%,
        #F5E6A3 50%,
        var(--color-golden-prosperity) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 3s ease-in-out infinite;
    text-shadow: 
        0 0 30px rgba(212, 175, 55, 0.5),
        0 0 60px rgba(212, 175, 55, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.5);
}

@keyframes goldShimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ===================================
   ENHANCED GALLERY HOVER
   =================================== */

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        rgba(212, 175, 55, 0) 0%,
        rgba(212, 175, 55, 0.2) 100%
    );
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 
        0 20px 50px rgba(10, 47, 35, 0.3),
        0 0 0 2px rgba(212, 175, 55, 0.5),
        inset 0 0 50px rgba(212, 175, 55, 0.1);
}

.gallery-item img {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover img {
    transform: scale(1.15) rotate(1deg);
    filter: brightness(1.1) contrast(1.05);
}

/* ===================================
   SCROLL PROGRESS BAR
   =================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--color-golden-prosperity) 0%,
        var(--color-sunset-glow) 100%
    );
    z-index: 9999;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s ease-out;
}

/* ===================================
   ENHANCED NAVBAR
   =================================== */

.navbar {
    background: linear-gradient(
        to bottom,
        rgba(10, 47, 35, 0.98) 0%,
        rgba(10, 47, 35, 0.95) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-golden-prosperity),
        transparent
    );
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* ===================================
   SECTION DIVIDERS
   =================================== */

.section::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-golden-prosperity),
        transparent
    );
    margin: 4rem auto 0;
}

.section:last-of-type::after {
    display: none;
}

/* ===================================
   FLOATING ELEMENTS ANIMATION
   =================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.stat-icon,
.opp-icon,
.highlight-icon {
    animation: float 3s ease-in-out infinite;
}

.stat-icon {
    animation-delay: 0s;
}

.opp-icon {
    animation-delay: 0.3s;
}

.highlight-icon {
    animation-delay: 0.6s;
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 768px) {
    /* Reduce animation intensity on mobile */
    .fade-in-scroll {
        transform: translateY(20px);
        filter: blur(4px);
    }
    
    .btn:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .opportunity-card:hover,
    .highlight-card:hover,
    .scenario-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
    
    .gallery-item:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    .gallery-item:hover img {
        transform: scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Disable animations for users who prefer reduced motion */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .golden-particles-canvas {
        display: none;
    }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

/* GPU acceleration for animated elements */
.btn,
.opportunity-card,
.highlight-card,
.scenario-card,
.gallery-item,
.hero-bg {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize hover states */
@media (hover: hover) and (pointer: fine) {
    /* Only apply hover effects on devices that support hover */
    .btn:hover,
    .opportunity-card:hover,
    .highlight-card:hover {
        /* Effects already defined above */
    }
}