/* ============================================
   SmartBook Home DayCare — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(168, 32, 65, 0.15);
    color: #73172d;
}

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

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

::-webkit-scrollbar-thumb {
    background: #d4c5c0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a82041;
}

/* ============================================
   Navbar Scroll State
   ============================================ */
#navbar.scrolled {
    background-color: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(42, 37, 34, 0.06);
}

#navbar.scrolled .logo-text {
    color: #2a2522;
}

/* ============================================
   Mobile Menu Transitions
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ============================================
   Menu Icon Animation
   ============================================ */
#menuBtn.active span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ============================================
   Scroll Reveal Animations (below fold only)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s 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; }

    /* Image hover zoom */
    .reveal-img {
        overflow: hidden;
    }

    .reveal-img img {
        transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .reveal-img:hover img {
        transform: scale(1.03);
    }
}

/* ============================================
   Image Aspect Ratio Utilities
   ============================================ */
.aspect-card {
    aspect-ratio: 4/5;
}

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

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav, #contact, footer {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
