/* Custom styles for Tim's Auto Repair */

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

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

/* Typography refinements */
h1, h2, h3, h4 {
    letter-spacing: -0.01em;
}

/* Navbar transitions */
.nav-text {
    transition: color 0.4s ease;
}

.nav-subtext {
    transition: color 0.4s ease;
}

.nav-line {
    transition: all 0.3s ease;
}

/* Mobile menu button animation */
#menuBtn.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .nav-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .nav-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile nav links */
.mobile-nav-link {
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover {
    color: #C5A059;
    padding-left: 8px;
}

/* Service card hover */
.service-card {
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gold accent line animation on hover */
a:hover .gold-line {
    width: 100%;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2C3E6B;
}

/* Form focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

/* Selection color */
::selection {
    background: #C5A059;
    color: #0A1628;
}

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

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

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

/* Print styles */
@media print {
    nav, #contactForm, #formSuccess, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-navy-900, .bg-cream {
        background: #fff !important;
    }
}
