/* Custom styles for Machinery Viral 23W */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero animations - only below the fold or use prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    .hero-badge {
        animation: fadeInUp 0.8s ease-out forwards;
    }
    .hero-title {
        animation: fadeInUp 0.8s ease-out 0.15s forwards;
        opacity: 0;
    }
    .hero-subtitle {
        animation: fadeInUp 0.8s ease-out 0.3s forwards;
        opacity: 0;
    }
    .hero-ctas {
        animation: fadeInUp 0.8s ease-out 0.45s forwards;
        opacity: 0;
    }
    .hero-stats {
        animation: fadeInUp 0.8s ease-out 0.6s forwards;
        opacity: 0;
    }
}

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

/* Scroll indicator animation */
@media (prefers-reduced-motion: no-preference) {
    .scroll-line {
        animation: scrollPulse 2s ease-in-out infinite;
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.8;
        transform: scaleY(1.2);
    }
}

/* Scroll reveal animations - BELOW THE FOLD ONLY */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal.hidden-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Section labels */
.section-label {
    display: block;
}

/* Service card stagger animation */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(20px);
    }
    
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.08);
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f4f8;
}

::-webkit-scrollbar-thumb {
    background: #9fb3c8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* Selection color */
::selection {
    background: #e89a0a;
    color: #102a43;
}

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid #e89a0a;
    outline-offset: 2px;
}

/* Select arrow customization */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23627d98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Print styles */
@media print {
    nav, .scroll-indicator, #contactForm, #formSuccess {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-navy-900, .bg-navy-950 {
        background: #1a1a1a !important;
    }
}
