:root {
    --clr-bg: #030B14;
    --clr-primary: #071A2F;
    --clr-primary-light: #15365F;
    --clr-accent: #AAB4C0;
    --clr-white: #FFFFFF;
    --clr-text: #E2E8F0;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--clr-text); background-color: var(--clr-bg); overflow-x: hidden; position: relative; }

.ambient-glow { position: fixed; border-radius: 50%; filter: blur(120px); z-index: -1; opacity: 0.6; }
.glow-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, #0B2748, transparent 70%); }
.glow-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: radial-gradient(circle, #15365F, transparent 70%); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

h1, h2, h3 { font-family: var(--font-heading); color: var(--clr-white); line-height: 1.2; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

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

/* Buttons */
.btn { display: inline-block; padding: 12px 24px; border-radius: 8px; font-weight: 600; font-family: var(--font-body); cursor: pointer; transition: var(--transition); border: 1px solid transparent; text-align: center; font-size: 0.95rem; }
.btn-primary { background: linear-gradient(135deg, #15365F, #0B2748); border: 1px solid rgba(255,255,255,0.2); color: var(--clr-white); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); border-color: var(--clr-accent); }
.btn-outline { background: transparent; border-color: var(--clr-accent); color: var(--clr-white); }
.btn-outline:hover { background: var(--clr-white); color: var(--clr-primary); }
.btn-full { width: 100%; }

.highlight-gradient { background: linear-gradient(to right, #FFFFFF, #AAB4C0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Header Fixes */
.header { position: fixed; top: 0; width: 100%; z-index: 1000; transition: var(--transition); padding: 15px 0; border-bottom: 1px solid transparent; }
.header.scrolled { background: rgba(3, 11, 20, 0.8); backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); padding: 10px 0; }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.nav-list { display: flex; list-style: none; gap: 40px; }
.nav-link { font-weight: 500; font-size: 0.95rem; opacity: 0.8; }
.nav-link:hover { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.nav-cta-mobile { display: none; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 5px; z-index: 1001; }
.hamburger .bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--clr-white); transition: var(--transition); }

/* Hero Fixes - Blended Background Layout */
.hero {
    position: relative;
    padding: 220px 0 140px;
    overflow: hidden;
}

/* Background Image Layer */
.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center; /* Anchors the car to the right side */
}

/* Gradient Fades for Blending */
.hero-fade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fades from solid background color on the left to completely transparent on the right */
    background: linear-gradient(to right, var(--clr-bg) 15%, rgba(3, 11, 20, 0.85) 45%, transparent 100%);
}
.hero-fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    /* Fades the bottom edge seamlessly into the vehicles section */
    background: linear-gradient(to top, var(--clr-bg) 0%, transparent 100%);
}

/* Content Container Overrides */
.hero-container-blended {
    display: block;
    position: relative;
    z-index: 2;
}
.hero-content {
    max-width: 650px; /* Prevents text from stretching over the car */
}
.hero h1 { font-size: 3.5rem; letter-spacing: -1px; margin-bottom: 20px; }
.hero p { font-size: 1.1rem; opacity: 0.8; margin-bottom: 30px; line-height: 1.6; }
.hero-buttons { display: flex; gap: 15px; margin-bottom: 40px; }

/* Fixed Icon Widths */
.trust-highlights { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.9rem; opacity: 0.8; }
.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-item svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--clr-accent); }

/* Mobile Adjustments for the Blended Hero */
@media (max-width: 992px) {
    .hero-content { max-width: 100%; }
    .hero-fade-overlay {
        /* On smaller screens, darkens the fade further to ensure text over the car stays readable */
        background: linear-gradient(to right, var(--clr-bg) 0%, rgba(3, 11, 20, 0.95) 60%, rgba(3, 11, 20, 0.5) 100%);
    }
}
/* Fixed Icon Widths */
.trust-highlights { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.9rem; opacity: 0.8; }
.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-item svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--clr-accent); }

/* Vehicles */
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 15px; }
.filter-group { display: inline-flex; padding: 5px; border-radius: 30px; gap: 5px; }
.filter-btn { background: transparent; border: none; color: var(--clr-text); padding: 8px 20px; border-radius: 25px; cursor: pointer; transition: var(--transition); }
.filter-btn.active, .filter-btn:hover { background: rgba(255,255,255,0.1); color: var(--clr-white); }
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 25px; }
.vehicle-card { padding: 15px; transition: transform 0.4s ease, border-color 0.4s; }
.vehicle-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.3); }
.vehicle-img { position: relative; border-radius: 8px; overflow: hidden; height: 200px; margin-bottom: 20px; }
.vehicle-img img { width: 100%; height: 100%; object-fit: cover; }
.glass-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.5); backdrop-filter: blur(10px); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.2); }
.vehicle-info h3 { font-size: 1.15rem; margin-bottom: 10px; }
.vehicle-specs { display: flex; justify-content: space-between; font-size: 0.85rem; opacity: 0.6; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--glass-border); }
.vehicle-price { font-size: 1.3rem; font-weight: 700; color: var(--clr-white); margin-bottom: 15px; }
.vehicle-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.center-btn { text-align: center; }

/* Why Choose Us - Tighter Layout */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature-card { display: flex; align-items: flex-start; gap: 15px; text-align: left; }
.feature-icon svg { width: 30px; height: 30px; flex-shrink: 0; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 5px; }
.feature-card p { font-size: 0.9rem; opacity: 0.7; }

/* How It Works */
.steps-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; text-align: center; }
.step-number { width: 45px; height: 45px; background: var(--clr-primary); color: var(--clr-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-family: var(--font-heading); font-weight: 700; margin: 0 auto 15px; border: 1px solid var(--clr-accent); }
.step h3 { font-size: 1rem; margin-bottom: 5px; }
.step p { font-size: 0.85rem; opacity: 0.7; }

/* Forms Layout - Reduced length */
.form-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.form-desc { opacity: 0.8; font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; }
.custom-form .form-group { margin-bottom: 15px; }
.custom-form input, .custom-form textarea { width: 100%; padding: 12px 15px; background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); border-radius: 8px; color: var(--clr-white); font-family: var(--font-body); font-size: 0.95rem; outline: none; transition: var(--transition); }
.custom-form input:focus, .custom-form textarea:focus { border-color: var(--clr-accent); background: rgba(0,0,0,0.4); }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(3, 11, 20, 0.8); backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: 0.4s ease; z-index: 2000; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { text-align: center; padding: 40px; max-width: 400px; transform: translateY(30px); transition: 0.4s ease; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-content h3 { margin: 15px 0 10px; }
.modal-content p { opacity: 0.7; margin-bottom: 25px; font-size: 0.9rem; }
.animated-letter-container { height: 80px; display: flex; justify-content: center; margin-bottom: 15px; perspective: 1000px; }
.envelope { position: relative; width: 70px; height: 45px; background: #AAB4C0; border-radius: 0 0 5px 5px; margin-top: 25px; }
.envelope-flap { position: absolute; top: 0; left: 0; width: 0; height: 0; border-left: 35px solid transparent; border-right: 35px solid transparent; border-top: 25px solid #FFFFFF; transform-origin: top; transition: transform 0.6s 0.2s ease; z-index: 3; }
.modal-overlay.active .envelope-flap { transform: rotateX(180deg); z-index: 1; }
.letter { position: absolute; top: 5px; left: 5px; right: 5px; height: 35px; background: #FFF; border-radius: 3px; z-index: 2; transition: transform 0.6s 0.5s ease; display: flex; justify-content: center; align-items: center; }
.letter svg { width: 18px; opacity: 0; transition: opacity 0.3s 1s ease; }
.modal-overlay.active .letter { transform: translateY(-35px); }
.modal-overlay.active .letter svg { opacity: 1; }
.envelope::after { content: ''; position: absolute; bottom: 0; left: 0; border-left: 35px solid rgba(0,0,0,0.05); border-right: 35px solid rgba(0,0,0,0.05); border-bottom: 20px solid #F5F7FA; z-index: 4; }

/* CTA */
.cta-section { background: rgba(255,255,255,0.02); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); padding: 60px 0; text-align: center; }
.cta-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 20px; }

/* Footer */
.footer { padding: 60px 0 20px; border-top: 1px solid var(--glass-border); }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { opacity: 0.7; margin: 15px 0; font-size: 0.9rem; max-width: 350px; }
.footer h3 { font-size: 1.1rem; margin-bottom: 15px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; font-size: 0.9rem; opacity: 0.7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.85rem; opacity: 0.6; text-align: center; }

/* Scroll Top */
.scroll-to-top { position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px; background: var(--clr-primary); color: var(--clr-white); border: 1px solid var(--glass-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition); z-index: 99; }
.scroll-to-top.show { opacity: 1; visibility: visible; }
.scroll-to-top:hover { transform: translateY(-3px); }
.scroll-to-top svg { width: 20px; height: 20px; }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.fade-right { transform: translateX(30px); }
.fade-right.active { transform: translateX(0); }

/* Mobile CSS Overrides */
@media (max-width: 992px) {
    .hero-container, .form-layout, .features-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.8rem; }
    .footer-container { grid-template-columns: 1fr 1fr; }
    .steps-container { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 768px) {
    .hamburger { display: block; }
    .btn-desktop-only { display: none; }
    .nav-menu { position: fixed; top: 80px; left: -100%; width: 100%; height: calc(100vh - 80px); background: rgba(3, 11, 20, 0.95); backdrop-filter: blur(20px); flex-direction: column; align-items: center; justify-content: flex-start; transition: 0.4s ease; padding: 40px 20px; }
    .nav-menu.active { left: 0; }
    .nav-list { flex-direction: column; text-align: center; width: 100%; gap: 20px; margin-bottom: 30px; }
    .nav-cta-mobile { display: block; width: 100%; text-align: center; padding: 0 20px; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .hero { padding-top: 140px; text-align: center; }
    .hero-buttons { justify-content: center; flex-direction: column; }
    .trust-highlights { justify-content: center; }
    .footer-container { grid-template-columns: 1fr; }
}