/* ============================================
   Advanced Motors Sales & Services
   Custom Styles — terracotta + sand palette
   ============================================ */

/* ---------- Base / Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: #C4653A;
    color: #FDF6EE;
}

/* ---------- Navbar ---------- */
#navbar {
    background: rgba(253, 246, 238, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
    background: rgba(253, 246, 238, 0.95);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C4653A;
    transition: width 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

.menu-line {
    transition: all 0.3s ease;
}

#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) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

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

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

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

/* ---------- Geometric Shapes (Hero) ---------- */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.shape-circle-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(196, 101, 58, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    top: -80px;
    right: -100px;
}

.shape-circle-2 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(201, 149, 74, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
}

.shape-square-1 {
    width: 120px;
    height: 120px;
    border: 3px solid rgba(196, 101, 58, 0.12);
    border-radius: 20px;
    top: 22%;
    left: 8%;
    transform: rotate(15deg);
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(196, 101, 58, 0.06);
    top: 35%;
    right: 5%;
    transform: rotate(-20deg);
}

.shape-dots {
    width: 80px;
    height: 80px;
    background-image: radial-gradient(circle, rgba(196, 101, 58, 0.15) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    bottom: 18%;
    right: 12%;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #C4653A, #C9954A);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(196, 101, 58, 0.1), transparent, rgba(201, 149, 74, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover::after {
    opacity: 1;
}

/* ---------- Scroll Animations (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ---------- 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='%236b7280' stroke-width='2' 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 12px center;
    padding-right: 36px;
}

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

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

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

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

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .shape-circle-1 {
        width: 240px;
        height: 240px;
    }
    
    .shape-circle-2 {
        width: 140px;
        height: 140px;
    }
    
    .shape-square-1 {
        width: 60px;
        height: 60px;
    }
    
    .shape-triangle {
        border-left-width: 30px;
        border-right-width: 30px;
        border-bottom-width: 52px;
    }
}
