/* ============================================
   Wizard Language School — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(5, 74, 54, 0.2);
    color: #043828;
}

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

#navbar.scrolled {
    background-color: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(4, 56, 40, 0.08);
}

#navbar.scrolled .font-serif {
    color: #043828;
}

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

#menu-btn.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* ============================================
   Floating Cards Animation
   ============================================ */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ============================================
   Program Cards
   ============================================ */
.program-card {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), 
                background-color 0.5s ease,
                box-shadow 0.5s ease;
}

.program-card:hover {
    transform: translateY(-6px);
}

/* ============================================
   Approach Steps
   ============================================ */
.approach-step {
    transition: transform 0.4s ease;
}

.approach-step:hover {
    transform: translateY(-4px);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(2, 31, 22, 0.12);
}

/* ============================================
   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.22, 1, 0.36, 1),
                    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger delays for grid items */
    .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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Reduced motion: no animations */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

/* ============================================
   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='%23059669' 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 12px center;
    padding-right: 40px;
}

select:focus {
    outline: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}

/* ============================================
   Utility: Focus Visible
   ============================================ */
:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav, #contact-form, .floating-card, iframe {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
