/* Custom styles for Ebenezers Driving School */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Scroll reveal base - content visible by default, JS adds animation */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Animated state applied by JS when element enters viewport */
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* Initial state for animated elements (only applied when JS runs) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animated {
        opacity: 0;
        transform: translateY(24px);
    }
    .scroll-reveal.animated.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delays for grid items */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Header shadow on scroll */
header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}
