/* Custom styles for Palo Alto Automotive */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f7f2ec;
}
::-webkit-scrollbar-thumb {
    background: #d47654;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c04626;
}

/* Selection color */
::selection {
    background: #d47654;
    color: white;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Hero animations */
.hero-eyebrow {
    animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.hero-headline {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

.hero-subtext {
    animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s forwards;
}

.hero-cta {
    animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s forwards;
}

.hero-info {
    animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.1s forwards;
}

.hero-image-wrap {
    animation: slideInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
}

.hero-secondary-image {
    animation: slideInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(252, 250, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-logo-text {
    color: #1c1409 !important;
}

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

/* Mobile menu link animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
    margin-left: 0;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #c04626;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
    width: 100%;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Image lazy load placeholder */
img {
    background: linear-gradient(135deg, #f0e5d7 0%, #e5d1b7 100%);
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal {
        display: none !important;
    }
    body {
        background: white !important;
    }
}
