/* Custom styles for Pinnacle Automotive Repair */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 246, 236, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(168, 163, 152, 0.15);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Service card animations */
.service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero animation */
#hero h1,
#hero .inline-flex,
#hero p,
#hero .flex {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.7s ease forwards;
}

#hero .inline-flex { animation-delay: 0.1s; }
#hero h1 { animation-delay: 0.25s; }
#hero p { animation-delay: 0.4s; }
#hero .flex { animation-delay: 0.55s; }

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Geometric shape float animation */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-16px) rotate(45deg); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(14px) rotate(12deg); }
}

.float-1 { animation: float 6s ease-in-out infinite; }
.float-2 { animation: float-reverse 7s ease-in-out infinite; }

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

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

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

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

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

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Smooth image loading */
img {
    image-rendering: auto;
}

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