/* ========================================
   CreekSide Acres — Custom Styles
   ======================================== */

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

/* --- Navbar Scroll State --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* --- Mobile Menu --- */
#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobileMenu.open .mobile-link {
    animation: fadeSlideUp 0.4s ease forwards;
    opacity: 0;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

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

/* --- Hamburger Animation --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

/* --- Feature Cards --- */
.feature-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

/* --- Scroll Reveal Animations --- */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

/* Only apply hidden state when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .js-enabled .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Staggered Delays --- */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* --- Selection Color --- */
::selection {
    background: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Image Placeholder Fallback --- */
img {
    background: linear-gradient(135deg, #f0fdfa 0%, #e2e8f0 100%);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Mobile Responsive Tweaks --- */
@media (max-width: 767px) {
    #hero {
        padding-top: 80px;
    }
    
    .font-serif {
        line-height: 1.15;
    }
}

/* --- Print Styles --- */
@media print {
    #navbar,
    .scroll-indicator {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
