/* Custom styles for C&M Professional Solutions */

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

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

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

::-webkit-scrollbar-thumb {
    background: #8c1d3b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #761c36;
}

/* Selection color */
::selection {
    background: #d97706;
    color: #400a1a;
}

/* Hero animations - only run when JS is enabled and no reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .hero-anim {
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .hero-anim:nth-child(1) { animation-delay: 0.1s; }
    .hero-anim:nth-child(2) { animation-delay: 0.25s; }
    .hero-anim:nth-child(3) { animation-delay: 0.4s; }
    .hero-anim:nth-child(4) { animation-delay: 0.55s; }
    
    .hero-image-anim {
        animation: slideRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes slideRight {
        from {
            opacity: 0;
            transform: translateX(48px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Mobile menu links animation */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.4s; }

/* Image hover effects */
.group:hover .group-hover\\:scale-150 {
    transform: scale(1.5);
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

/* Input focus styles */
input:focus,
textarea:focus {
    border-bottom-color: #a92144 !important;
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, #contact-form, .scroll-reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-plum-950, .bg-plum-900 {
        background: #1a1a1a !important;
    }
}
