/* Custom styles for KH Cabinets */

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

/* Scroll reveal base — always visible */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Progressive enhancement: animate on scroll when JS is available */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animate {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(15, 33, 64, 0.08);
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.25s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230f2140' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle pattern overlay for hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(15, 33, 64, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

#hero > * {
    position: relative;
    z-index: 1;
}

/* Button focus rings for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: rgba(74, 222, 128, 0.3);
    color: #0f2140;
}
