/* Custom styles for Bobby Anderson Jr Tree Service */

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

/* Hide scrollbar for mobile menu */
body.menu-open {
    overflow: hidden;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-up:nth-child(2) {
    animation-delay: 0.1s;
}

.animate-fade-in-up:nth-child(3) {
    animation-delay: 0.2s;
}

.animate-fade-in-up:nth-child(4) {
    animation-delay: 0.3s;
}

.animate-fade-in-up:nth-child(5) {
    animation-delay: 0.4s;
}

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

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-fade-in-up {
        animation: none;
        opacity: 1;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    img {
        transition: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9a2525;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 3px solid #b83232;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Nav scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    border-color: #b83232 !important;
    box-shadow: 0 0 0 3px rgba(184, 50, 50, 0.1) !important;
}

/* Print styles */
@media print {
    nav,
    #back-to-top,
    .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
