/* Safe Care — Custom Styles */

/* Base styles */
html {
    scroll-behavior: smooth;
}

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

/* Selection color */
::selection {
    background-color: #4f7a2e;
    color: white;
}

/* Floating animation for hero stat cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 2s;
}

/* Scroll reveal animations — progressive enhancement via JS */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-enabled .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for service cards */
.js-enabled .service-card:nth-child(1) { transition-delay: 0ms; }
.js-enabled .service-card:nth-child(2) { transition-delay: 80ms; }
.js-enabled .service-card:nth-child(3) { transition-delay: 160ms; }
.js-enabled .service-card:nth-child(4) { transition-delay: 240ms; }
.js-enabled .service-card:nth-child(5) { transition-delay: 320ms; }
.js-enabled .service-card:nth-child(6) { transition-delay: 400ms; }

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(45, 70, 24, 0.08);
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #4f7a2e;
    outline-offset: 2px;
}

/* Reduced motion preference */
@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 !important;
        transform: none !important;
    }
}

/* Tablet and up adjustments */
@media (min-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .service-card {
        transition-delay: 0ms;
    }
}
