/* Custom styles for Weston Backhoe */

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

/* Base font settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation scroll state */
.nav-scrolled {
    background: rgba(255, 254, 249, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(6, 78, 59, 0.08);
}

.nav-scrolled .nav-link {
    color: #065F46 !important;
}

.nav-scrolled #navbar > div > div:first-child > div:last-child span:first-child {
    color: #065F46 !important;
}

/* Service card hover lift */
.service-card {
    perspective: 1000px;
}

.service-card > div {
    transform-style: preserve-3d;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    /* Staggered delays for grid items */
    .service-card:nth-child(1) .reveal { transition-delay: 0ms; }
    .service-card:nth-child(2) .reveal { transition-delay: 100ms; }
    .service-card:nth-child(3) .reveal { transition-delay: 200ms; }
    .service-card:nth-child(4) .reveal { transition-delay: 300ms; }
    .service-card:nth-child(5) .reveal { transition-delay: 400ms; }
    .service-card:nth-child(6) .reveal { transition-delay: 500ms; }
}

/* Float animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-16px) rotate(12deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 3.5s ease-in-out infinite 0.5s;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Mobile link hover */
.mobile-link {
    display: block;
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' 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;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Image lazy loading placeholder */
img {
    background-color: #FFF3D6;
}

/* Selection color */
::selection {
    background-color: #A7F3D0;
    color: #064E3B;
}
