/* ============================================
   12th St Apartments — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(123, 45, 59, 0.5);
    color: #FADADD;
}

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

::-webkit-scrollbar-track {
    background: #3d1117;
}

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

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

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-reveal="left"] {
    transform: translateX(-30px);
}

.reveal[data-reveal="right"] {
    transform: translateX(30px);
}

.reveal[data-reveal="scale"] {
    transform: scale(0.95);
}

.reveal.visible[data-reveal] {
    opacity: 1;
    transform: none;
}

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > * {
    opacity: 1;
    transform: none;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }

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

    .reveal[data-reveal],
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Navbar Scroll State
   ============================================ */
#navbar.scrolled {
    background: rgba(61, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(123, 45, 59, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .font-display {
    color: #FADADD;
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #3d1117;
    color: #FADADD;
}

/* ============================================
   Mobile Menu Transitions
   ============================================ */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

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

/* ============================================
   Back to Top Button
   ============================================ */
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================
   Image Loading
   ============================================ */
img {
    background-color: #3d1117;
}

/* ============================================
   Focus Styles
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #FADADD;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Utility — Hide scrollbar but keep functionality
   ============================================ */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
