/* Custom styles for Valva Realty Co */

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

/* Hero animations - above the fold, always visible */
.hero-anim {
    opacity: 1;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-anim:nth-child(2) {
    animation-delay: 0.15s;
}

.hero-anim:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-anim:nth-child(4) {
    animation-delay: 0.45s;
}

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

/* Scroll reveal animations - below the fold only */
.section-anim {
    opacity: 1;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .section-anim.reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .section-anim.reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll effect */
#nav.scrolled {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

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

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

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

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

/* Selection color */
::selection {
    background: #f8c4b5;
    color: #7a2418;
}

/* Mobile menu active state */
body.menu-open {
    overflow: hidden;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #e85a35 !important;
    box-shadow: 0 0 0 3px rgba(232, 90, 53, 0.1);
}

/* Subtle hover lift on cards */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Ensure all text meets WCAG AA contrast */
.text-clay-500 {
    color: #847160;
}

/* Mobile menu transitions */
#mobileMenu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Hamburger animation */
body.menu-open #line1 {
    transform: rotate(45deg) translate(4px, 4px);
}

body.menu-open #line2 {
    opacity: 0;
}

body.menu-open #line3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Print styles */
@media print {
    #nav,
    #contactForm,
    .hero-anim {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
