/* ===== Custom Styles for Reed Automotive ===== */

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

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== Scroll Reveal Animations ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animated state applied by JS only */
.reveal.animated {
    opacity: 0;
    transform: translateY(24px);
}

.reveal.animated.delay-1 { transition-delay: 0.1s; }
.reveal.animated.delay-2 { transition-delay: 0.2s; }
.reveal.animated.delay-3 { transition-delay: 0.3s; }
.reveal.animated.delay-4 { transition-delay: 0.4s; }
.reveal.animated.delay-5 { transition-delay: 0.5s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .reveal.animated {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== Navbar scroll state ===== */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
    color: #0f172a;
}

/* ===== Mobile menu transitions ===== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===== Image loading ===== */
img {
    background-color: #f1f5f9;
}

/* ===== Selection color ===== */
::selection {
    background-color: #99f6e4;
    color: #042f2e;
}
