/* ============================================
   BEAM Lighthouse Recovery Community Center
   Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #134e4a;
}

/* ---------- Hero Animations ---------- */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-description {
    animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards 0.8s;
}

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

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

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

#navbar.scrolled .nav-logo {
    color: #1e293b !important;
}

#navbar.scrolled .nav-link {
    color: #64748b !important;
}

/* ---------- Mobile Menu ---------- */
.mobile-link {
    animation: none;
}

/* ---------- Intersection Observer Animations ---------- */
.about-image,
.about-content,
.services-header,
.service-card,
.community-header,
.community-images,
.community-quote,
.contact-info,
.contact-form-wrap {
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

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

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

/* ---------- Back to Top ---------- */
#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#back-to-top:not(.visible) {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---------- Utility ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
