/* ============================================
   Hirschey's Tree Service — Custom Styles
   Classic & Elegant | Forest Green + Off-White
   ============================================ */

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Scroll Reveal (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* --- Navbar Transitions --- */
#navbar.scrolled {
    background-color: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 77, 46, 0.1);
}

#navbar.scrolled .navbar-text {
    color: #1a4d2e;
}

#navbar.scrolled .navbar-subtext {
    color: #4a7d48;
}

#navbar.scrolled .navbar-link {
    color: #2d4d2c;
}

/* --- Mobile Menu --- */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* --- Back to Top --- */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* --- Form Select Arrow --- */
select {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"%3E%3Cpath fill="%234a7d48" d="M6 8L1 3h10z"/%3E%3C/svg%3E');
    background-size: 12px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4a7d48;
}

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

/* --- Print Styles --- */
@media print {
    #navbar, #back-to-top, #mobile-menu {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
