/* ============================================
   Auto Care Unlimited — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 149, 46, 0.2);
    color: #0a1628;
}

/* Clip path for diagonal section */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content is visible
   by default, JS adds the animated state.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    /* Staggered delays */
    .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; }

    .feature-item:nth-child(1) { transition-delay: 0.05s; }
    .feature-item:nth-child(2) { transition-delay: 0.1s; }
    .feature-item:nth-child(3) { transition-delay: 0.15s; }
    .feature-item:nth-child(4) { transition-delay: 0.2s; }
}

/* ============================================
   Hero Background Parallax
   ============================================ */
#hero-bg {
    will-change: transform;
}

/* ============================================
   Navbar Transitions
   ============================================ */
#navbar.scrolled #nav-logo-text,
#navbar.scrolled #nav-logo-sub,
#navbar.scrolled .nav-link,
#navbar.scrolled #nav-cta {
    color: #ffffff !important;
}

#navbar.scrolled #nav-logo-text,
#navbar.scrolled #nav-logo-sub {
    color: #ffffff !important;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* ============================================
   Service Card Hover
   ============================================ */
.service-card {
    transition: background-color 0.3s ease;
}

.service-card:hover {
    background-color: #fafafa;
}

/* ============================================
   Form Focus States
   ============================================ */
input:focus,
textarea:focus,
select:focus {
    border-color: #d4a843 !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
}

/* ============================================
   Smooth Image Loading
   ============================================ */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* ============================================
   Utility
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
