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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-active .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-active .reveal.revealed {
    opacity: 1;
    transform: none;
}

/* Staggered delays handled via inline transition-delay */

/* ===== NAVBAR SCROLL STATE ===== */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

/* ===== MOBILE MENU ANIMATION ===== */
#mobile-menu {
    animation: slideDown 0.25s ease;
}

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

/* ===== CUSTOM SELECT ARROW ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' 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 12px center;
    padding-right: 40px;
}

/* ===== NEIGHBORHOOD CARD HOVER ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== ACCESSIBILITY: REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .js-active .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== FOCUS STYLES ===== */
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;
}

/* ===== SELECTION ===== */
::selection {
    background-color: #f9d0d9;
    color: #5e1f2b;
}

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

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

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

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