/* === Custom Styles for Jwg Carpentry LLC === */

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

/* === Navbar === */
#navbar {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    border-bottom-color: rgb(196 217 198 / 0.5);
    box-shadow: 0 1px 0 rgb(196 217 198 / 0.3);
}

/* === Mobile Menu === */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* === Menu Button Animation === */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:first-child {
    transform: translateY(5px) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

/* === Mobile Links === */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    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; }

/* === Service Cards === */
.service-card {
    transition: background-color 0.5s ease;
}

/* === Scroll Reveal Animations === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: none;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* === Selection Color === */
::selection {
    background-color: rgb(22 101 52 / 0.2);
    color: rgb(20 83 45);
}

/* === Focus Styles === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgb(22 101 52);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: rgb(254, 253, 248);
}

::-webkit-scrollbar-thumb {
    background: rgb(196 217 198);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(165 196 178);
}
