/* ── Custom styles for Berkeley Car Care Center ── */

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

/* Header blur effect */
header.scrolled #site-header {
    background: rgba(255, 253, 245, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(91, 44, 111, 0.08);
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #F0B429;
    border-radius: 1px;
    transition: all 0.25s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after {
    width: 60%;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    opacity: 0;
}
#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Hamburger animation */
#menu-btn[aria-expanded="true"] #bar1 {
    transform: translateY(6px) rotate(45deg);
}
#menu-btn[aria-expanded="true"] #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn[aria-expanded="true"] #bar3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* Gradient blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}
.blob-plum {
    background: #D4BEFF;
    width: 500px;
    height: 500px;
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}
.blob-amber {
    background: #FFEAA8;
    width: 400px;
    height: 400px;
    bottom: 5%;
    left: -5%;
    animation-delay: -3s;
}
.blob-plum.blob-sm {
    width: 250px;
    height: 250px;
    top: 40%;
    left: 20%;
    opacity: 0.3;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.grid > .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.grid > .scroll-reveal:nth-child(2) { transition-delay: 0.12s; }
.grid > .scroll-reveal:nth-child(3) { transition-delay: 0.19s; }
.grid > .scroll-reveal:nth-child(4) { transition-delay: 0.26s; }
.grid > .scroll-reveal:nth-child(5) { transition-delay: 0.33s; }
.grid > .scroll-reveal:nth-child(6) { transition-delay: 0.40s; }

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

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F9F5FF; }
::-webkit-scrollbar-thumb { background: #D4BEFF; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #B088FF; }

/* Selection */
::selection { background: #E9DFFF; color: #3D1D4B; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .blob { animation: none; }
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
