/* ========================================
   View Valley Realty Clovis — Custom Styles
   ======================================== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #7B2D3B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #651e2b;
}

/* Selection color */
::selection {
    background: #7B2D3B;
    color: white;
}

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

/* Header scroll state */
#site-header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Hero animation */
.hero-badge {
    animation: fadeInDown 0.8s ease-out both;
}
.hero-headline {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}
.hero-subheadline {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}
.hero-ctas {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Service card hover tilt effect */
.group:hover .group\\:hover\\:scale-105 {
    transform: scale(1.05);
}

/* Form input focus ring animation */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.15);
}

/* Image lazy-load fade */
img[loading="lazy"] {
    transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}
img[loading="lazy"]:not(.loaded) {
    opacity: 0;
}

/* Stats counter animation */
.stat-number {
    display: inline-block;
}

/* Map container */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}
iframe:hover {
    filter: saturate(1) contrast(1);
}
