/* ===================================
   METALLUM VENTURES - ANIMATIONS
   Vamos Ventures Style Scroll Animations
   =================================== */

/* ===================================
   FADE-IN ANIMATIONS
   =================================== */

.fade-in-element {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
}

/* ===================================
   FADE-UP ANIMATIONS (Vamos Style)
   =================================== */

.fade-up-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for multiple elements */
.fade-up-element[data-delay="0"] {
    transition-delay: 0s;
}

.fade-up-element[data-delay="100"] {
    transition-delay: 0.1s;
}

.fade-up-element[data-delay="150"] {
    transition-delay: 0.15s;
}

.fade-up-element[data-delay="200"] {
    transition-delay: 0.2s;
}

.fade-up-element[data-delay="300"] {
    transition-delay: 0.3s;
}

.fade-up-element[data-delay="450"] {
    transition-delay: 0.45s;
}

/* ===================================
   MAIN CONTENT REVEAL (Scroll Displacement)
   =================================== */

.main-content {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force GPU acceleration */
}

.main-content.visible {
    opacity: 1;
}

/* ===================================
   SPLASH TO NAVBAR TRANSITION
   =================================== */

@keyframes logoToNavbar {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(-40vw, -45vh) scale(0.35);
    }
}

/* For mobile devices */
@media (max-width: 768px) {
    @keyframes logoToNavbar {
        0% {
            transform: translate(0, 0) scale(1);
        }
        100% {
            transform: translate(-35vw, -45vh) scale(0.25);
        }
    }
}

/* ===================================
   LOADING ANIMATIONS
   =================================== */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.pulse {
    animation: pulse 2s ease-out;
    animation-iteration-count: 2;
}

/* ===================================
   SLIDE-UP TRANSITION (Vamos Style)
   =================================== */

@keyframes slideUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.slide-up {
    animation: slideUp 3s ease-out;
    animation-delay: 2s;
    animation-fill-mode: forwards;
}

/* ===================================
   CARD HOVER EFFECTS
   =================================== */

.sector-card,
.team-card,
.portfolio-item {
    will-change: transform;
}

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

/* Use GPU acceleration for transforms */
.fade-up-element,
.fade-in-element,
.splash-logo,
.splash-background {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===================================
   SCROLL PROGRESS INDICATOR (Optional)
   =================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0d5f5c, #1a8a85);
    z-index: 10000;
    transition: width 0.1s ease-out;
}

/* ===================================
   LAZY LOAD IMAGE FADE-IN
   =================================== */

img {
    transition: opacity 0.5s ease-in;
}

img.loading {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* ===================================
   BUTTON ANIMATIONS
   =================================== */

.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(13, 95, 92, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ===================================
   NAVIGATION LINK ANIMATIONS
   =================================== */

.nav-links a {
    position: relative;
    overflow: hidden;
}

/* ===================================
   STAT COUNTER ANIMATION
   =================================== */

.stat-number {
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
}

/* ===================================
   ENTRANCE ANIMATIONS FOR SECTIONS
   =================================== */

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   MOBILE MENU ANIMATIONS
   =================================== */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.nav-links.active {
    animation: slideInRight 0.3s ease-out forwards;
}

/* ===================================
   REDUCED MOTION SUPPORT
   =================================== */

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

/* ===================================
   PARALLAX EFFECT (Subtle)
   =================================== */

.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Disable parallax on mobile for performance */
@media (max-width: 768px) {
    .parallax {
        background-attachment: scroll;
    }
}
