/* Custom styles for Precision Woodworks */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3e6;
}
::-webkit-scrollbar-thumb {
    background: #9cc08a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #71a05d;
}

/* Selection color */
::selection {
    background: #9cc08a;
    color: #0f1a0a;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .group:hover .group-hover\:scale-105 {
        transform: none;
    }
}

/* Scroll reveal base state — visible by default for progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden state when JS is active (prefers-reduced-motion: no-preference) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .scroll-reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 1px 12px rgba(45, 79, 33, 0.08);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #507d3f;
    outline-offset: 2px;
}
