/* ========== BASE STYLES ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== SELECTION ========== */
::selection {
    background-color: #7B2D3B;
    color: #FFF5F3;
}

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

/* ========== SCROLL REVEAL (progressive enhancement) ========== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.8s 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; }
}

/* Fallback: content always visible if JS disabled */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========== NAVBAR SCROLLED STATE ========== */
#navbar.scrolled {
    background-color: rgba(253, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .font-serif {
    color: #7B2D3B !important;
}

/* ========== MOBILE MENU ========== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

/* ========== HAMBURGER ANIMATION ========== */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5px;
}

/* ========== FORM STYLES ========== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B2D3B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ========== SMOOTH TRANSITIONS ========== */
a, button {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== IMAGE PLACEHOLDER FALLBACK ========== */
img {
    background: linear-gradient(135deg, #F7E4E1 0%, #F5F0EE 100%);
}

/* ========== FOCUS VISIBLE ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========== CUSTOM CURSOR ON INTERACTIVE ========== */
.group:hover .w-14 {
    transform: scale(1.05);
}

/* ========== NEIGHBORHOOD CARD OVERLAY ========== */
.group:hover .absolute.inset-0 {
    background-color: rgba(45, 36, 38, 0.7);
}

/* ========== PRINT STYLES ========== */
@media print {
    #navbar, #mobile-menu, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
