/* ===================================
   Proterra Pest Control — Custom Styles
   =================================== */

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

/* Prevent scroll-reveal flash: ensure content is visible by default */
/* JS adds .revealed class for animation; content is visible without it */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0fdf4;
}
::-webkit-scrollbar-thumb {
    background: #86efac;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4ade80;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #16a34a;
    transition: width 0.2s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Service card stagger animation setup */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}
/* Default state: visible (progressive enhancement) */

/* Process step animation */
.process-step {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Mobile link hover */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dcfce7;
}
.mobile-link:last-child {
    border-bottom: none;
}

/* Hero image subtle parallax (desktop only) */
@media (min-width: 1024px) {
    #hero .absolute img {
        will-change: transform;
    }
}

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

/* Selection color */
::selection {
    background: #bbf7d0;
    color: #14532d;
}
