/* Custom styles for Beaver Feeds & Mulch */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f0;
}
::-webkit-scrollbar-thumb {
    background: #b9ddbe;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #85c48f;
}

/* Selection color */
::selection {
    background: #85c48f;
    color: #0f3016;
}

/* Scroll reveal base - content is VISIBLE by default (progressive enhancement) */
.scroll-reveal {
    /* Default: fully visible, no animation */
}

/* Only apply animation when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-active .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .js-active .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    /* Stagger children */
    .js-active .scroll-reveal:nth-child(2) { transition-delay: 0.08s; }
    .js-active .scroll-reveal:nth-child(3) { transition-delay: 0.16s; }
    .js-active .scroll-reveal:nth-child(4) { transition-delay: 0.24s; }
    .js-active .scroll-reveal:nth-child(5) { transition-delay: 0.32s; }
    .js-active .scroll-reveal:nth-child(6) { transition-delay: 0.40s; }
}

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 1px 20px rgba(24, 82, 37, 0.08);
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#mobile-menu.open {
    max-height: 400px;
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #4fa85e;
    outline-offset: 2px;
}

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

/* Print styles */
@media print {
    header, footer, .scroll-reveal { display: none; }
    body { background: white; color: black; }
    section { padding: 20px 0; }
}
