/* Custom styles for Handy Mandy Home Repairs */

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

/* Scroll reveal base state — visible by default for accessibility */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll reveal enhanced with JS (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-logo-text {
    color: #111827 !important;
}

.nav-scrolled .nav-logo-sub {
    color: #FF6B4A !important;
}

/* Hero text colors based on dark background */
#hero .nav-logo-text {
    color: #ffffff !important;
}

#hero .nav-logo-sub {
    color: #FF6B4A !important;
}

#hero .nav-link {
    color: #a1a5aa !important;
}

#hero .nav-link:hover {
    color: #FF6B4A !important;
}

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.2s ease;
}

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

/* Image hover effects */
img {
    -webkit-tap-highlight-color: transparent;
}

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

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

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

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

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

/* Selection color */
::selection {
    background: #FF6B4A;
    color: #ffffff;
}

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