/* Custom styles for MS Auto Body Services & Supply's */

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

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

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

::-webkit-scrollbar-thumb {
    background: #98c4aa;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a8463;
}

/* Selection color */
::selection {
    background: #c5decf;
    color: #1e382b;
}

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

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

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 84, 64, 0.1);
}

nav.scrolled .font-serif {
    color: #1e382b;
}

/* Hamburger animation */
#bar1.active {
    transform: translateY(6px) rotate(45deg);
}

#bar2.active {
    opacity: 0;
}

#bar3.active {
    transform: translateY(-6px) rotate(-45deg);
}

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

.reveal.revealed {
    opacity: 0;
    transform: translateY(40px);
}

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

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }

/* Image hover effects */
.group img {
    will-change: transform;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Print styles */
@media print {
    nav, #contactForm, #successMessage {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
