/* Custom styles for Brock's Tri-County Transmissions */

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

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

/* Selection color */
::selection {
    background-color: rgba(234, 179, 8, 0.2);
    color: #3d203d;
}

/* Hero animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal:not(.revealed) {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 1px 20px rgba(107, 58, 107, 0.08);
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

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

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

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

/* Image lazy loading fade */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

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

/* Smooth image hover */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Print styles */
@media print {
    nav, footer, .scroll-reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
