/* ===== CUSTOM STYLES ===== */

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

/* Custom selection color */
::selection {
    background-color: #fbbf24;
    color: #3b0a62;
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* When JS adds the class, animate */
.reveal.animate {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal.animate {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.animated {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== NAVBAR SHADOW ON SCROLL ===== */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(107, 33, 168, 0.1);
}

/* ===== MOBILE MENU ===== */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

/* ===== NEIGHBORHOOD CARD HOVER ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== FORM FOCUS STYLES ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ===== SUBTLE PULSE FOR HERO STATS ===== */
@keyframes subtlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===== BUTTON RIPPLE EFFECT ===== */
button::after,
a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

/* ===== IMAGE LAZY LOAD FALLBACK ===== */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    #nav,
    #contactForm,
    iframe {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
