/* Custom styles for Jeff's Wheel Repair & Finishing */

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

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: revealIn 0.8s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.15s; }
.reveal:nth-child(3) { animation-delay: 0.3s; }
.reveal:nth-child(4) { animation-delay: 0.45s; }

@keyframes revealIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered reveals */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(15, 46, 24, 0.08);
}

.nav-scrolled .font-serif,
.nav-scrolled span {
    color: #0f2e18 !important;
}

.nav-scrolled .text-forest-600 {
    color: #2d7a40 !important;
}

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

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

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Custom selection color */
::selection {
    background: #1a4226;
    color: #faf9f6;
}

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

/* Subtle gradient overlay on images */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Animation for service cards on hover */
.group {
    will-change: transform;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Parallax-like subtle effect for hero */
@supports (background-attachment: fixed) {
    .hero-gradient {
        background-attachment: fixed;
    }
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
