/* ========================================
   Red Bank Schoolhouse — Custom Styles
   ======================================== */

/* Base styles & resets */
*, *::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: #1B4332;
    color: #FDFBF7;
}

/* ========================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        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-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; }
}

/* When JS is disabled, all content is already visible (default state) */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ========================================
   Navbar scroll state
   ======================================== */
.navbar-scrolled {
    background-color: rgba(253, 251, 247, 0.97) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.navbar-scrolled .nav-link {
    color: #1B4332 !important;
}

.navbar-scrolled .nav-logo-text {
    color: #1B4332 !important;
}

.navbar-scrolled .nav-logo-sub {
    color: #2f673d !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #99c7a5;
    border-radius: 4px;
}

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

/* ========================================
   Input autofill styling
   ======================================== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #FDFBF7 inset !important;
    -webkit-text-fill-color: #2D2620 !important;
}

/* ========================================
   Focus visible for accessibility
   ======================================== */
:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
}

/* ========================================
   Mobile menu animation
   ======================================== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.open {
    max-height: 400px;
}

/* ========================================
   Image lazy-load placeholder
   ======================================== */
img {
    background-color: #E3EFE6;
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    nav, #contact-form, button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
    }
}
