/* ============================================
   MTK Auto Detailing — Custom Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
    --forest-600: #1B5E20;
    --forest-500: #2e7d32;
    --cream-50: #FAFAF5;
    --cream-100: #F5F5EE;
    --accent-amber: #F59E0B;
    --accent-coral: #FF6B6B;
    --accent-teal: #14B8A6;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Geometric Background Shapes --- */
.geo-shapes {
    z-index: 0;
}

.geo-shape {
    position: absolute;
    opacity: 0.03;
    pointer-events: none;
}

.shape-circle-1 {
    width: 600px;
    height: 600px;
    border: 3px solid #1B5E20;
    border-radius: 50%;
    top: 10%;
    right: -200px;
    animation: float-shape 20s ease-in-out infinite;
}

.shape-circle-2 {
    width: 400px;
    height: 400px;
    background: #1B5E20;
    border-radius: 50%;
    bottom: 20%;
    left: -100px;
    animation: float-shape 15s ease-in-out infinite reverse;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid #1B5E20;
    top: 50%;
    left: 10%;
    animation: rotate-shape 25s linear infinite;
}

.shape-square {
    width: 120px;
    height: 120px;
    border: 3px solid #F59E0B;
    top: 30%;
    right: 5%;
    animation: rotate-shape 30s linear infinite reverse;
}

.shape-dots {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, #1B5E20 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    top: 60%;
    left: 5%;
    animation: float-shape 18s ease-in-out infinite;
}

@keyframes float-shape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes rotate-shape {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Navigation --- */
#navbar {
    background: transparent;
    transition: background 0.4s var(--transition-smooth), box-shadow 0.4s var(--transition-smooth), backdrop-filter 0.4s var(--transition-smooth);
}

#navbar.scrolled {
    background: rgba(250, 250, 245, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-link {
    color: #4b5563;
}

#navbar.scrolled .nav-link:hover {
    color: var(--forest-600);
}

#navbar.scrolled .font-display {
    color: #111827;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--forest-600);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s var(--transition-smooth);
    border: 2px solid var(--forest-600);
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--forest-500);
    border-color: var(--forest-500);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(27, 94, 32, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: all 0.3s var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--forest-600), var(--forest-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--transition-smooth);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.badge-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--cream-100);
    color: #6b7280;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s var(--transition-smooth);
}

.service-card:hover .badge-tag {
    background: var(--forest-100);
    color: var(--forest-700);
}

/* --- Floating Cards (Hero) --- */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-main {
    animation-delay: 0s;
}

.card-stat-1 {
    animation-delay: 1s;
}

.card-stat-2 {
    animation-delay: 2s;
}

.card-stat-3 {
    animation-delay: 3s;
}

.card-badge {
    animation-delay: 0.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* --- Gallery --- */
.gallery-item {
    cursor: pointer;
    transition: transform 0.5s var(--transition-smooth);
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* --- Input Fields --- */
.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #1f2937;
    background: white;
    transition: all 0.3s var(--transition-smooth);
    outline: none;
}

.input-field:focus {
    border-color: var(--forest-600);
    box-shadow: 0 0 0 4px rgba(27, 94, 32, 0.1);
}

.input-field::placeholder {
    color: #9ca3af;
}

.input-field:hover {
    border-color: #d1d5db;
}

/* --- Mobile Menu --- */
.menu-line {
    transition: all 0.3s var(--transition-smooth);
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(0.35rem, 0.35rem);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-0.5rem);
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(0.25rem, -0.25rem);
    width: 1.25rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 1.0625rem;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--forest-600);
    color: white;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s var(--transition-smooth);
    z-index: 40;
    box-shadow: 0 4px 20px rgba(27, 94, 32, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--forest-500);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(27, 94, 32, 0.4);
}

/* --- Scroll Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .geo-shapes {
        display: none;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    #hero .floating-card {
        display: none;
    }

    .service-card {
        padding: 1.5rem;
    }

    #about .relative img {
        height: 350px;
    }

    .gallery-item {
        border-radius: 1rem;
    }

    .gallery-item:first-child {
        grid-column: span 2;
        height: 250px;
    }

    .gallery-item:not(:first-child) {
        height: 180px;
    }

    .gallery-item:not(:first-child) img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2.25rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .flex.flex-wrap.gap-4 {
        flex-direction: column;
    }
}
