/* Custom styles for Blake Excavating */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #faf9f6;
}
::-webkit-scrollbar-thumb {
    background: #b8d1c0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb89a;
}

/* Selection color */
::selection {
    background: #dce8e0;
    color: #1a4d2e;
}

/* Navbar styles */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(26, 77, 46, 0.08);
}

#navbar.scrolled .nav-link {
    color: rgba(26, 77, 46, 0.7);
}

#navbar.scrolled .menu-line {
    background-color: #1a4d2e;
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* Mobile menu button animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: translateY(-4px) rotate(-45deg);
}

/* Mobile link animations */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Service cards */
.service-card {
    transition: background-color 0.4s ease, transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-2px);
}

/* Gallery */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll reveal animations */
.service-reveal,
.about-reveal,
.gallery-reveal,
.process-reveal,
.contact-reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .service-reveal,
    .about-reveal,
    .gallery-reveal,
    .process-reveal,
    .contact-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .service-reveal.visible,
    .about-reveal.visible,
    .gallery-reveal.visible,
    .process-reveal.visible,
    .contact-reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger delays */
    .service-reveal:nth-child(1) { transition-delay: 0s; }
    .service-reveal:nth-child(2) { transition-delay: 0.1s; }
    .gallery-reveal:nth-child(1) { transition-delay: 0s; }
    .gallery-reveal:nth-child(2) { transition-delay: 0.05s; }
    .gallery-reveal:nth-child(3) { transition-delay: 0.1s; }
    .gallery-reveal:nth-child(4) { transition-delay: 0.15s; }
    .gallery-reveal:nth-child(5) { transition-delay: 0.2s; }
    .gallery-reveal:nth-child(6) { transition-delay: 0.25s; }
    .process-reveal:nth-child(1) { transition-delay: 0s; }
    .process-reveal:nth-child(2) { transition-delay: 0.15s; }
    .process-reveal:nth-child(3) { transition-delay: 0.3s; }
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238fb89a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

/* Image loading placeholder */
img {
    background-color: #dce8e0;
}

/* Subtle line separator */
h2 + div[class*="w-12"] {
    opacity: 0.6;
}
