/* Custom styles for Adelanto Auto Care & Tires */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.04);
}

nav.scrolled .font-serif,
nav.scrolled a:not(.bg-teal-700):not(.bg-white) {
    color: #0f172a;
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #14b8a6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Testimonial Cards */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 16px;
    left: 20px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 80px;
    font-weight: 700;
    color: #f0fdfa;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
}

.testimonial-card > * {
    position: relative;
    z-index: 1;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }
.reveal[data-reveal-delay="6"] { transition-delay: 0.6s; }

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

/* Image hover effects */
.service-card img,
.testimonial-card img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection */
::selection {
    background: #ccfbf1;
    color: #134e4a;
}

/* Input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

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

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Hero image stack animation */
@media (prefers-reduced-motion: no-preference) {
    .hero-image-main {
        animation: floatMain 6s ease-in-out infinite;
    }
    
    .hero-image-secondary {
        animation: floatSecondary 5s ease-in-out infinite;
    }
}

@keyframes floatMain {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes floatSecondary {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}
