/* Custom styles for Janey Cole Real Estate */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #99f6e4;
    color: #134e4a;
}

/* Navbar transition for scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 24px rgba(0, 0, 0, 0.04);
}

.nav-scrolled #nav-logo-text {
    color: #0f172a !important;
}

.nav-scrolled a:not(.bg-white) {
    color: #475569 !important;
}

.nav-scrolled a:not(.bg-white):hover {
    color: #0d9488 !important;
}

/* Hero parallax-like subtle effect */
#hero {
    scroll-snap-align: start;
}

/* Testimonial card hover */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Form focus animations */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Fade-in animations for scroll reveal */
.fade-in-section {
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Card hover lift */
.group {
    will-change: transform;
}

/* Image lazy load fade-in */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Custom focus visible for accessibility */
:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Subtle pattern for background sections */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(13, 148, 136, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Loading state for form */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
