/* Custom styles for Deerfield Apartments */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f6;
}
::-webkit-scrollbar-thumb {
    background: #c43b3b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9b2c2c;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(253, 248, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-link {
    color: #374151 !important;
}

.nav-scrolled .font-serif {
    color: #5e2323 !important;
}

/* Hero animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Mobile menu */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

.mobile-menu-open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-menu-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-menu-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-menu-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger animation */
#bar1.open {
    transform: rotate(45deg) translate(5px, 5px);
}
#bar2.open {
    opacity: 0;
}
#bar3.open {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

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

/* Print styles */
@media print {
    nav, #contact-form, #form-success, iframe {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
