/* ============================================
   Hope and Care Center — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, currentColor 15%, transparent);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAF7;
}
::-webkit-scrollbar-thumb {
    background: #c7dbb8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0c28a;
}

/* --- Navbar Transitions --- */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* --- Mobile Menu --- */
#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* --- Service Cards --- */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Floating Cards Animation --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.floating-card-1 { animation: float 6s ease-in-out infinite; }
.floating-card-2 { animation: float 7s ease-in-out infinite 1s; }
.floating-card-3 { animation: float 5.5s ease-in-out infinite 0.5s; }
.floating-card-4 { animation: float 6.5s ease-in-out infinite 1.5s; }

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.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; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .service-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .floating-card-1,
    .floating-card-2,
    .floating-card-3,
    .floating-card-4 {
        animation: none;
    }
}

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

/* --- Image loading --- */
img {
    max-width: 100%;
    height: auto;
}
