/* Custom styles for Anderle Lumber Co. - Marlin */

/* Ensure smooth rendering */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Hero section - always visible, no JS dependency */
.hero-gradient {
    background: linear-gradient(135deg, #1f3f1f 0%, #316331 35%, #4f9a4f 65%, #74b86e 100%);
}

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

#mobile-menu.open {
    max-height: 400px;
}

/* Scroll reveal - progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is visible even without JS */
.no-js .reveal,
.reveal {
    opacity: 1;
    transform: none;
}

/* Card hover effects */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(48, 100, 48, 0.12);
}

/* Image hover */
img {
    transition: transform 0.4s ease;
}

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(254, 253, 248, 0.97) !important;
    box-shadow: 0 1px 12px rgba(48, 100, 48, 0.08);
}

/* Button pulse animation */
.cta-pulse {
    animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(61, 122, 61, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(61, 122, 61, 0);
    }
}

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

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #316331;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background-color: #c5e8c0;
    color: #1f3f1f;
}
