/* Custom styles for Gillham Home Inspections */

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

/* Prevent scroll-reveal flash for above-the-fold content */
@media (prefers-reduced-motion: no-preference) {
    .reveal-inline {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-left {
        opacity: 1;
        transform: none;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-card {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}

/* Scroll reveal animations (below fold only, progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-inline {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-card {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal-inline.revealed,
    .reveal-right.revealed,
    .reveal-left.revealed,
    .reveal-card.revealed {
        opacity: 1;
        transform: none;
    }
    
    /* Staggered card delays */
    .reveal-card:nth-child(1) { transition-delay: 0s; }
    .reveal-card:nth-child(2) { transition-delay: 0.1s; }
    .reveal-card:nth-child(3) { transition-delay: 0.2s; }
    .reveal-card:nth-child(4) { transition-delay: 0.3s; }
    .reveal-card:nth-child(5) { transition-delay: 0.4s; }
    .reveal-card:nth-child(6) { transition-delay: 0.5s; }
}

/* Navbar scrolled state */
nav.scrolled {
    background: rgba(254, 252, 243, 0.92);
    backdrop-blur-xl;
    box-shadow: 0 1px 0 rgba(131, 20, 67, 0.08), 0 4px 24px rgba(131, 20, 67, 0.06);
}

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

@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='%239d174d' 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;
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #500724;
}

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Subtle hover lift for interactive elements */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* 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;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fefcf3;
}

::-webkit-scrollbar-thumb {
    background: #fbcfe8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f9a8d4;
}
