/* ============================================
   Casa Love Adult Foster Home — 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 {
    background-color: #99f6e4;
    color: #042f2e;
}

/* Scroll-reveal base state — content is VISIBLE by default (progressive enhancement) */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.revealed {
    opacity: 0;
    transform: translateY(32px);
}

/* Only apply hidden state when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 0;
        transform: translateY(32px);
    }
    .scroll-reveal.revealed.reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero animations — above the fold, always visible */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    animation: heroSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-anim:nth-child(2) { animation-delay: 0.1s; }
.hero-anim:nth-child(3) { animation-delay: 0.2s; }
.hero-anim:nth-child(4) { animation-delay: 0.3s; }
.hero-anim:nth-child(5) { animation-delay: 0.4s; }

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

.hero-image-anim {
    opacity: 1;
    animation: heroImageIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
    transform: translateY(0);
}

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

/* Navbar transitions */
.nav-link-text {
    transition: color 0.3s ease;
}

.nav-link-sub {
    transition: color 0.3s ease;
}

/* Mobile menu */
#mobile-menu {
    animation: mobileMenuIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mobileMenuIn {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

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

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

/* Print styles */
@media print {
    nav, #mobile-menu-btn, .scroll-indicator {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
