/* ── Custom styles for Garza's Cabinets ── */

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

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background-color: #065f46;
    color: #fff;
}

/* ── Scroll reveal animations ── */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Default state: visible (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* ── Header scroll state ── */
#site-header.scrolled {
    background-color: rgba(255, 254, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 12px rgba(6, 78, 59, 0.08);
}

/* ── Mobile menu transitions ── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
    padding-bottom: 0;
}

/* ── Form focus styles ── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ── Subtle card hover lift ── */
.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-4px);
}

/* ── Gradient text utility ── */
.text-gradient {
    background: linear-gradient(135deg, #065f46, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* ── Mobile menu active link ── */
.mobile-link.active {
    background-color: #d1fae5;
    color: #065f46;
}

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

/* ── 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;
    }
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .animate-bounce {
        animation: none;
    }
}
