/* ========================================
   Nurturing Nest Early Learning Academy
   Custom Styles
======================================== */

/* Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f5;
}
::-webkit-scrollbar-thumb {
    background: #b13434;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #972e2e;
}

/* Selection */
::selection {
    background: #fce7e7;
    color: #5a1a1a;
}

/* ========================================
   Navbar
======================================== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(125, 40, 40, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .nav-link {
    color: #2a1e1e;
}

#navbar.scrolled .menu-line {
    background: #2a1e1e;
}

/* ========================================
   Marquee
======================================== */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* ========================================
   Reveal Animations
======================================== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }

/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-animated {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal-animated.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#mobile-menu {
    background: rgba(254, 252, 251, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

/* ========================================
   Buttons & Links
======================================== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #b13434;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   Form Styles
======================================== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b13434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ========================================
   Focus Styles
======================================== */
*:focus-visible {
    outline: 2px solid #b13434;
    outline-offset: 2px;
}

/* ========================================
   Responsive Adjustments
======================================== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    #navbar, .animate-marquee, #mobile-menu {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
