/* ============================================
   MBP Auto Services — Custom Styles
   ============================================ */

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

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

/* ============================================
   HERO ANIMATIONS
   ============================================ */

/* Hero badge - slide down */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero title - fade up */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero subtitle - fade up with delay */
@keyframes fadeUpSlow {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero CTA - fade up with delay */
@keyframes fadeUpCta {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero trust - fade up with delay */
@keyframes fadeUpTrust {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 25px) scale(1.08); }
    66% { transform: translate(15px, -15px) scale(0.92); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

/* Apply hero animations */
.hero-badge {
    animation: slideDown 0.7s ease-out both;
}

.hero-title {
    animation: fadeUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeUpSlow 0.8s ease-out 0.4s both;
}

.hero-cta {
    animation: fadeUpCta 0.8s ease-out 0.6s both;
}

.hero-trust {
    animation: fadeUpTrust 0.8s ease-out 0.8s both;
}

.hero-blob {
    animation: float1 8s ease-in-out infinite;
}

.blob-2 {
    animation: float2 10s ease-in-out infinite;
}

.blob-3 {
    animation: float3 7s ease-in-out infinite;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   (Below-the-fold only, progressive enhancement)
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

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

    /* Staggered delays for service cards */
    .service-card:nth-child(1) { transition-delay: 0.05s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.15s; }
    .service-card:nth-child(4) { transition-delay: 0.2s; }
    .service-card:nth-child(5) { transition-delay: 0.25s; }
    .service-card:nth-child(6) { transition-delay: 0.3s; }
}

/* ============================================
   NAVBAR
   ============================================ */

#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

/* ============================================
   MOBILE MENU
   ============================================ */

#mobile-menu {
    animation: menuSlideDown 0.3s ease-out;
}

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

.mobile-link {
    display: block;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* ============================================
   FORM STYLES
   ============================================ */

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='%23855f34' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ============================================
   ACCESSIBILITY: Reduced motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-badge,
    .hero-title,
    .hero-subtitle,
    .hero-cta,
    .hero-trust {
        animation: none;
        opacity: 1;
    }
}
