/* ============================================
   Altadena Elementary School — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(79, 192, 138, 0.3);
    color: #060E1A;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F0FBF6;
}
::-webkit-scrollbar-thumb {
    background: #B5EACA;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7EDAA8;
}

/* --- Navbar transition --- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 14, 24, 0.06);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span:not([class*="text-mint"]) {
    color: #060E1A;
}

#navbar.scrolled .mobile-bar {
    background: #060E1A;
}

/* --- Hero parallax --- */
#hero {
    perspective: 1000px;
}

/* --- Mobile menu --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu .mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

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

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

/* Mobile toggle animation */
#mobile-toggle.active .mobile-bar:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#mobile-toggle.active .mobile-bar:nth-child(2) {
    opacity: 0;
}
#mobile-toggle.active .mobile-bar:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* --- Scroll reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .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; }
}

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

/* --- Select arrow --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23060E1A' 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;
    appearance: none;
    -webkit-appearance: none;
}

/* --- Image hover container --- */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* --- Subtle shimmer on hero --- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* --- Counter animation --- */
.counter {
    display: inline-block;
}

/* --- Print styles --- */
@media print {
    #navbar, #mobile-menu, .reveal { display: none; }
    body { color: #000; background: #fff; }
}
