/* Custom styles for America Hospice and Palliative Care */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll animation base - content always visible by default */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only apply hidden state when JS is active (progressive enhancement) */
.js-active .scroll-animate {
    opacity: 0;
    transform: translateY(30px);
}

/* Active state for scroll reveal */
.js-active .scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.js-active .scroll-animate:nth-child(1) { transition-delay: 0ms; }
.js-active .scroll-animate:nth-child(2) { transition-delay: 100ms; }
.js-active .scroll-animate:nth-child(3) { transition-delay: 200ms; }
.js-active .scroll-animate:nth-child(4) { transition-delay: 300ms; }
.js-active .scroll-animate:nth-child(5) { transition-delay: 400ms; }
.js-active .scroll-animate:nth-child(6) { transition-delay: 500ms; }

/* Navbar scrolled state */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .font-serif,
.nav-scrolled span {
    color: #1e1f24 !important;
}

.nav-scrolled .nav-link {
    color: #5f616a !important;
}

.nav-scrolled .mobile-nav-link {
    color: #1e1f24 !important;
}

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

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

/* Custom selection color */
::selection {
    background-color: #ff5a24;
    color: white;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-animate {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    .js-active .scroll-animate {
        opacity: 1;
        transform: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff5a24;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Subtle pattern overlay for hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}
