/* ============================================
   Rolling Meadows Association — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: inherit;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

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

#navbar.scrolled .nav-link {
    color: #475569;
}

#navbar.scrolled .nav-link:hover {
    color: #0d9488;
}

#navbar.scrolled .font-serif {
    color: #0f172a;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-desc {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

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

/* ============================================
   Reveal on Scroll
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.visible:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal.visible:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal.visible:nth-child(4) {
    transition-delay: 0.3s;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn.active .menu-line:first-child {
    transform: translateY(4px) rotate(45deg);
}

.menu-btn.active .menu-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #475569;
}

/* ============================================
   Smooth Image Loading
   ============================================ */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ============================================
   Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}

@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 {
        opacity: 1;
        transform: none;
    }
}
