/* Custom styles for Toddville Nursery */

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(176, 64, 64, 0.4);
    color: #f5f5f5;
}

/* Navbar transition */
#navbar {
    backdrop-filter: blur(0px);
    background-color: transparent;
}

#navbar.scrolled {
    background-color: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 75, 0.1);
}

/* Mobile menu animation */
#mobileMenu.open {
    transform: translateX(0);
}

/* Mobile menu open state */
body.menu-open {
    overflow: hidden;
}

/* Hamburger animation */
body.menu-open #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open #bar2 {
    opacity: 0;
}

body.menu-open #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Mobile links */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s 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; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Reveal animations - progressive enhancement */
.reveal {
    /* Default: visible for accessibility */
}

@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);
    }
    
    /* Stagger children */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #f0d48a 0%, #e8c46a 50%, #d4a84b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

::-webkit-scrollbar-track {
    background: #0d0d0d;
}

::-webkit-scrollbar-thumb {
    background: #541c1c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7f2929;
}

/* Image lazy load placeholder */
img {
    background-color: #1a1a1a;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #d4a84b;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Map dark theme overlay */
iframe[src*="google.com/maps"] {
    filter: grayscale(80%) invert(90%) contrast(90%) brightness(90%);
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
