/* Custom styles for Fairfax Home Finders */

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

/* Prevent FOUC */
html.no-js .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* Scroll reveal base states */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation classes — applied via JS for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .js-active .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .js-active .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero animated blobs */
@media (prefers-reduced-motion: no-preference) {
    .hero-blob {
        position: absolute;
        border-radius: 50%;
        filter: blur(60px);
        opacity: 0.3;
        animation: float 20s ease-in-out infinite;
    }
    .blob-1 {
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, #ff9bb0, transparent);
        top: -100px;
        right: -100px;
        animation-delay: 0s;
    }
    .blob-2 {
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, #fad0d9, transparent);
        bottom: -50px;
        left: -50px;
        animation-delay: -7s;
    }
    .blob-3 {
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, #f5a8bb, transparent);
        top: 40%;
        left: 30%;
        animation-delay: -14s;
    }
    @keyframes float {
        0%, 100% { transform: translate(0, 0) scale(1); }
        25% { transform: translate(30px, -30px) scale(1.05); }
        50% { transform: translate(-20px, 20px) scale(0.95); }
        75% { transform: translate(20px, 10px) scale(1.02); }
    }
}

/* Navbar transitions */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(161, 22, 60, 0.08);
}

.nav-scrolled #navbar .font-serif {
    color: #711732 !important;
}

.nav-scrolled #navbar a:not(.bg-burgundy-700) {
    color: #4b5563 !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fffbf7;
}
::-webkit-scrollbar-thumb {
    background: #f5a8bb;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c22452;
}

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

/* Input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open {
    max-height: 400px;
}

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

/* Print styles */
@media print {
    nav, #back-to-top, .hero-blob { display: none; }
    body { color: #000; background: #fff; }
}
