/* Custom Styles for Benson Dr Emergency Locksmith */

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

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

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

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

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

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

::-webkit-scrollbar-thumb {
    background: #c5d9c7;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #96bc98;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #669669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile menu animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobileMenu.open {
    max-height: 500px;
}

/* Hero gradient animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Pulse animation for emergency badge */
@keyframes softPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* Hover effects for cards */
.group:hover .group-hover\\:bg-forest-200 {
    background-color: #c5d9c7;
}

.group:hover .group-hover\\:bg-warm-200 {
    background-color: #faefd3;
}

/* Ensure proper font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .group:hover {
        /* Disable hover effects on touch devices */
    }
    
    .group:hover .group-hover\\:scale-105 {
        transform: none;
    }
    
    .group:hover .group-hover\\:shadow-xl {
        box-shadow: none;
    }
}

/* Tablet breakpoint adjustments */
@media (max-width: 768px) {
    .font-heading {
        font-size: clamp(1.25rem, 4vw, 1.5rem);
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .rounded-4xl {
        border-radius: 1.5rem;
    }
}
