/* ==========================================================================
   Premium Car Detailing Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --color-bg: #070709;
    --color-surface: #121216;
    --color-primary: #0066ff;
    --color-primary-hover: #3385ff;
    --color-text: #f8f9fa;
    --color-text-muted: #a1a1aa;
    --color-border: rgba(255, 255, 255, 0.1);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   Utilities & Glassmorphism
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.glass-panel {
    background: rgba(18, 18, 22, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.section-padding {
    padding: 15px 0;
}

#about {
    padding-bottom: 30px;
}

#showcase {
    padding-bottom: 30px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title span {
    color: var(--color-primary);
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 1.2rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

.btn-outline:hover {
    background: var(--color-text);
    color: var(--color-bg);
    transform: translateY(-2px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    z-index: 0;
    height: auto;
    display: grid;
    grid-template-rows: min-content 1fr;
    gap: 1rem;
    background-color: #000;
    padding-bottom: 1rem;
    /* Buffer to prevent car from touching next section */
}

.hero-bg {
    grid-row: 2;
    position: relative;
    width: 100%;
    max-width: 1600px;
    /* Limit width on ultrawide screens */
    margin: 0 auto;
    /* Center the image container */
    height: 100%;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    /* Overlay on top of image but behind text if needed? No, let's keep it behind */
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0.5rem auto 0;
    /* Padding from top of screen */
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 2.5rem;
    /* Matched to .section-title font size as requested */
    margin-bottom: 1rem;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -1px;
    animation: fadeInUp 1s ease forwards;
}

.hero-subtitle {
    font-size: 1.2rem;
    /* Make subtitle slightly smaller */
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    /* Center the buttons */
    gap: 1rem;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

/* ==========================================================================
   Introduction Section
   ========================================================================== */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

.intro-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.intro-image img {
    width: 100%;
    height: auto;
    transition: transform 0.7s ease;
}

.intro-image:hover img {
    transform: scale(1.03);
}

.intro-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    pointer-events: none;
}

.intro-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Before/After Sliders
   ========================================================================== */
.showcase-slider-wrapper {
    margin-bottom: 1.5rem;
}

.showcase-slider-wrapper h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.showcase-slider-wrapper p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.ba-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: ew-resize;
}

.ba-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
    /* Adjusted for Audi RS6 side profile */
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.img-after {
    z-index: 1;
}

.img-before {
    z-index: 2;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--color-primary);
    z-index: 3;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.8);
}

.slider-handle::after {
    content: '< >';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: monospace;
    font-size: 14px;
}

.slider-labels {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 4;
    pointer-events: none;
}

.label-before,
.label-after {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 5px 15px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Portfolio Grid
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.2rem;
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 1/1;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center 20%;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    /* Symmetric gradient for top and bottom text legibility */
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0) 25%,
            rgba(0, 0, 0, 0) 75%,
            rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 1.5rem 2% 1.5rem;
    transition: var(--transition);
}

.portfolio-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 0;
}

.portfolio-info {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.portfolio-title {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.portfolio-snippet {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
    margin-bottom: 0;
    /* Increased height for 3 full lines (approx. 1.5rem per line) */
    height: 4.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.portfolio-item:hover .portfolio-snippet {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
}

.service-card {
    padding: 2.5rem;
    text-align: left;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 102, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 102, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Footer & Contact
   ========================================================================== */
.footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem 0 1rem;
    background: #050507;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
}

.social-proof {
    padding: 2rem;
    border-left: 3px solid var(--color-primary);
}

.quote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.quote-author {
    font-weight: 600;
    font-family: var(--font-heading);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .ba-slider {
        height: 350px;
    }
}