/* Custom styles for J Truscott Masonry Services */

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

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 3.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal.hidden-reveal {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(16, 42, 67, 0.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #486581;
}

/* Mobile menu transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
}

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

/* Service card hover effect */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Focus styles for accessibility */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

/* Button hover effects */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

/* Image hover zoom */
.group:hover img {
    transition: transform 0.5s ease;
}

/* Reduced motion preference */
@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;
    }
}
