/* ============================================
   Reilley's Driving School — Custom Styles
   Classic & Elegant | Emerald + Cream Palette
   ============================================ */

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

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Selection */
::selection {
    background-color: rgba(22, 101, 52, 0.2);
    color: #14532d;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ee;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #14532d;
}

/* Scroll Indicator Animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Navbar Glass Effect */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(20, 83, 45, 0.08), 0 4px 20px rgba(20, 83, 45, 0.06);
}

.nav-transparent {
    background: transparent !important;
    box-shadow: none !important;
}

.nav-transparent .font-serif,
.nav-transparent a:not(.bg-emerald-800) {
    color: #fefdf8 !important;
}

.nav-transparent .mobile-link {
    color: #fefdf8 !important;
}

/* Service Card Hover */
.service-card {
    transform: translateY(0);
    will-change: transform, box-shadow;
}

/* Testimonial Card */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Floating Cards Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-card-1 {
    animation: float 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float 5s ease-in-out infinite 0.5s;
}

.floating-card-3 {
    animation: float 4.5s ease-in-out infinite 1s;
}

/* Fade In Animation (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .fade-in-delay-1 { transition-delay: 0.1s; }
    .fade-in-delay-2 { transition-delay: 0.2s; }
    .fade-in-delay-3 { transition-delay: 0.3s; }
    .fade-in-delay-4 { transition-delay: 0.4s; }
    .fade-in-delay-5 { transition-delay: 0.5s; }
    .fade-in-delay-6 { transition-delay: 0.6s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* Mobile Menu Transitions */
#mobileMenu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom 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='%23166534' 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;
}

/* Image hover zoom */
img {
    transition: transform 0.6s ease;
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}
