/* Custom styles for West Michigan Countertops */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f0;
}
::-webkit-scrollbar-thumb {
    background: #C45A3C;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b5432a;
}

/* Selection color */
::selection {
    background: #C45A3C;
    color: #ffffff;
}

/* Hero stat card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
@keyframes float4 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.floating-card-1 { animation: float1 4s ease-in-out infinite; }
.floating-card-2 { animation: float2 5s ease-in-out infinite; }
.floating-card-3 { animation: float3 4.5s ease-in-out infinite; }
.floating-card-4 { animation: float4 3.5s ease-in-out infinite; }

/* Apply floating animations */
#hero .absolute.top-0.right-0 { animation: float1 4s ease-in-out infinite; }
#hero .absolute.top-32.left-0 { animation: float2 5s ease-in-out infinite; }
#hero .absolute.top-64.right-8 { animation: float3 4.5s ease-in-out infinite; }
#hero .absolute.bottom-0.left-8 { animation: float4 3.5s ease-in-out infinite; }

/* Navbar glass effect when scrolled */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

nav.scrolled .font-serif,
nav.scrolled .text-charcoal-800 {
    color: #1f1f1f;
}

/* Mobile menu animation */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Process connector lines for mobile */
@media (max-width: 1023px) {
    .process-step::after {
        content: '';
        display: block;
        width: 2px;
        height: 40px;
        background: linear-gradient(to bottom, #C45A3C, transparent);
        margin: 0 auto;
        margin-top: 1rem;
    }
    .process-step:last-child::after {
        display: none;
    }
}

/* Reduce motion for accessibility */
@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;
    }
}

/* Fade-in animation for scroll reveals */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile menu link styles */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Image loading placeholder */
img {
    background: linear-gradient(110deg, #e7e5e0 8%, #f5f5f0 18%, #e7e5e0 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}
img[loading="lazy"] {
    background: #e7e5e0;
    animation: none;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
img.loaded {
    animation: none;
    background: none;
}
