/* ── Custom Styles for Boncraft Autoworks ── */

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

/* Scroll reveal animations — progressive enhancement, hidden by default */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is active and motion is preferred, apply the animation states */
.reduce-motion .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
}

.reduce-motion .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(4, 120, 87, 0.08);
}

/* Subtle hover lift on cards */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Selection color */
::selection {
    background-color: rgba(4, 120, 87, 0.2);
    color: #064e3b;
}

/* Reduced motion — ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
