:root {
    --gold-mate: #C5B387; 
    --dark-bg: #090A0C; 
    --dark-surface: #121417; 
    
    --text-main: #EAEAEA; 
    --text-muted: #9BA0A6;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: var(--font-body); color: var(--text-main); background-color: var(--dark-bg); overflow-x: hidden; }

/* Fondo de Fibra de Carbono en local */
.carbon-bg-body { background-image: url('logo.jpg'); background-size: 500px; background-repeat: repeat; background-position: center top; }

@media (hover: hover) and (pointer: fine) { body, a, button { cursor: none; } }

.container { max-width: 1400px; margin: 0 auto; padding: 0 5%; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; }
a { text-decoration: none; color: var(--text-main); transition: all 0.3s ease; }
.section-title { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; }

/* Custom Cursor */
.cursor { width: 8px; height: 8px; background-color: var(--gold-mate); border-radius: 50%; position: fixed; pointer-events: none; z-index: 99999; transform: translate(-50%, -50%); display: none; }
.cursor-follower { width: 40px; height: 40px; border: 1px solid rgba(197, 179, 135, 0.4); border-radius: 50%; position: fixed; pointer-events: none; z-index: 99998; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background-color 0.3s; display: none; }
.cursor-follower.active { width: 60px; height: 60px; background-color: rgba(197, 179, 135, 0.1); border-color: var(--gold-mate); }
@media (hover: hover) and (pointer: fine) { .cursor, .cursor-follower { display: block; } }

/* Preloader */
.preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: var(--dark-bg); z-index: 10000; display: flex; justify-content: center; align-items: center; }
.preloader-content { display: flex; flex-direction: column; align-items: center; gap: 20px; overflow: hidden; }
.preloader-logo { width: clamp(40px, 8vw, 60px); opacity: 0; transform: translateY(50px); }
.preloader-text { font-family: var(--font-heading); font-size: clamp(1.2rem, 3.5vw, 2rem); font-weight: 600; letter-spacing: 4px; color: var(--gold-mate); transform: translateY(50px); opacity: 0; text-align: center; }
.preloader-text span { font-weight: 400; }

/* Navbar */
.navbar { position: fixed; top: 0; width: 100%; padding: 25px 5%; display: flex; justify-content: space-between; align-items: center; z-index: 100; background: linear-gradient(to bottom, rgba(9, 10, 12, 0.95) 0%, rgba(9, 10, 12, 0) 100%); backdrop-filter: blur(5px); }
.brand-container { display: flex; align-items: center; gap: 15px; }
.navbar-logo-icon { width: 35px; height: 35px; object-fit: contain; }
.logo { font-family: var(--font-heading); font-size: 1rem; font-weight: 600; letter-spacing: 3px; color: var(--gold-mate); white-space: nowrap; }
.logo span { font-weight: 400; }
.nav-links { list-style: none; display: flex; gap: 40px; align-items: center; }
.nav-links a { font-size: 0.85rem; font-weight: 600; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 2px; color: #ffffff; }
.nav-links a:hover { color: var(--gold-mate); }
.btn-gold { background: transparent; border: 1px solid var(--gold-mate); color: var(--gold-mate); font-family: var(--font-heading); padding: 12px 30px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border-radius: 100px; white-space: nowrap; cursor: pointer; transition: all 0.3s; }
.btn-gold:hover { background: var(--gold-mate); color: var(--dark-bg); box-shadow: 0 0 15px rgba(197, 179, 135, 0.4); }
.mobile-menu-btn { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 101; }
.mobile-menu-btn span { width: 30px; height: 2px; background-color: #fff; transition: 0.3s; }
.mobile-only { display: none; }

/* Hero */
.hero { position: relative; height: 100vh; display: flex; align-items: center; padding: 0 5%; overflow: hidden; background: none; }
.glow-bg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(197, 179, 135, 0.1) 0%, rgba(9, 10, 12, 0) 70%); z-index: 1; pointer-events: none; }
.hero-image-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.hero-content { position: relative; z-index: 2; margin-top: 100px; }
.reveal-text { overflow: hidden; }
.hero .subtitle { font-family: var(--font-heading); font-size: clamp(0.75rem, 2vw, 0.9rem); text-transform: uppercase; letter-spacing: 6px; color: var(--text-main); margin-bottom: 20px; font-weight: 600; }
.hero .title { font-size: clamp(3rem, 8vw, 7vw); line-height: 1; letter-spacing: -2px; text-transform: uppercase; color: #fff; }
.hero .gold-text { color: transparent; -webkit-text-stroke: 1px var(--gold-mate); }

/* Filosofía */
.about { padding: 120px 0; background: none; position: relative; z-index: 10; }
.logo-watermark { position: absolute; top: 50%; left: 10%; transform: translateY(-50%) rotate(-15deg); width: 30vw; opacity: 0.03; z-index: -1; pointer-events: none; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text p { font-size: 1.1rem; line-height: 1.8; color: var(--text-muted); margin-top: 30px; }
.about-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat h3 { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--gold-mate); line-height: 1; margin-bottom: 10px; transition: color 0.3s; }
.stat p { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; color: var(--text-main); font-weight: 600; }
.stat:hover h3 { color: #fff; }

/* Catálogo */
.catalog { padding: 80px 0 150px 0; background: none; }
.catalog-header { margin-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 20px; text-align: left; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 50px; }
.car-card { display: flex; flex-direction: column; background: rgba(18, 20, 23, 0.6); backdrop-filter: blur(10px); border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,0.03); transition: border-color 0.3s, transform 0.3s ease-out; }
.car-card:hover { border-color: rgba(197, 179, 135, 0.4); transform: translateY(-5px); }
.car-image-container { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.car-img { position: absolute; top: -10%; left: 0; width: 100%; height: 120%; object-fit: cover; transition: transform 0.6s ease-out; }
.car-card:hover .car-img { transform: scale(1.03); }
.car-info { padding: 30px; }
.car-info-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 10px; }
.car-info h3 { font-size: 1.4rem; letter-spacing: -1px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tagJDM, .tagEUR { font-family: var(--font-heading); font-size: 0.65rem; font-weight: 700; padding: 5px 12px; border: 1px solid var(--gold-mate); color: var(--gold-mate); border-radius: 50px; letter-spacing: 1px; }
.car-specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.spec-item { display: flex; flex-direction: column; gap: 4px; }
.spec-label { font-family: var(--font-heading); font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.spec-value { font-size: 0.95rem; font-weight: 600; color: var(--text-main); }
.btn-details { display: inline-block; color: var(--gold-mate); font-family: var(--font-heading); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; position: relative; padding-bottom: 5px; cursor: pointer;}
.btn-details::after { content: ''; position: absolute; width: 100%; height: 1px; bottom: 0; left: 0; background-color: var(--gold-mate); transform: scaleX(0); transform-origin: right; transition: transform 0.3s ease; }
.btn-details:hover::after { transform: scaleX(1); transform-origin: left; }

/* Footer y Redes Sociales */
footer { padding: 50px 0; border-top: 1px solid rgba(255,255,255,0.05); background: rgba(9, 10, 12, 0.8); backdrop-filter: blur(10px); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo-icon { width: 30px; height: 30px; object-fit: contain; }
footer p { color: var(--text-muted); font-size: 0.8rem; }

.footer-socials { display: flex; gap: 25px; margin: 15px 0; }
.social-link { color: var(--text-muted); transition: color 0.4s ease, transform 0.3s ease; display: flex; align-items: center; justify-content: center; }
.social-link svg { width: 22px; height: 22px; }
.social-link:hover { color: var(--gold-mate); transform: translateY(-3px); }

@media (min-width: 900px) {
    .footer-content { flex-direction: row; justify-content: space-between; text-align: left; }
    .footer-socials { margin: 0; }
}

/* Modal de Contacto */
.contact-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 10500; display: flex; justify-content: center; align-items: center;
    visibility: hidden;
}
.modal-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(4, 5, 6, 0.85); backdrop-filter: blur(15px);
    opacity: 0; cursor: pointer;
}
.modal-card {
    position: relative; z-index: 1;
    background: rgba(18, 20, 23, 0.95);
    width: 90%; max-width: 500px; padding: 50px; border-radius: 8px;
    border: 1px solid rgba(197, 179, 135, 0.2);
    box-shadow: 0 40px 80px rgba(0,0,0,0.9);
    transform: translateY(100px) scale(0.9); opacity: 0;
}
.modal-close {
    position: absolute; top: 20px; right: 25px;
    background: none; border: none; color: var(--text-muted);
    font-size: 2.5rem; line-height: 1; font-weight: 300;
    transition: color 0.3s, transform 0.3s;
}
.modal-close:hover { color: var(--gold-mate); transform: rotate(90deg); }
.modal-content { display: flex; flex-direction: column; align-items: center; }
.modal-logo { width: 45px; margin-bottom: 25px; }
.modal-title { font-size: 2.2rem; text-align: center; margin-bottom: 10px; }
.modal-title span { color: var(--gold-mate); }
.modal-desc { font-size: 0.9rem; color: var(--text-muted); text-align: center; margin-bottom: 35px; line-height: 1.6; }
.contact-form { width: 100%; display: flex; flex-direction: column; gap: 15px; }
.input-group input {
    width: 100%; padding: 15px 20px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-main); font-family: var(--font-body); font-size: 0.9rem;
    border-radius: 4px; outline: none; transition: border-color 0.3s, background 0.3s;
}
.input-group input:focus { border-color: var(--gold-mate); background: rgba(255,255,255,0.05); }
.btn-submit { width: 100%; margin-top: 10px; padding: 16px; font-size: 0.9rem; }
.modal-footer-info {
    width: 100%; display: flex; justify-content: space-between;
    margin-top: 35px; font-family: var(--font-heading);
    font-size: 0.75rem; color: var(--text-muted); letter-spacing: 1px;
}

/* Responsive Móvil */
@media (max-width: 900px) {
    .brand-container { gap: 10px; }
    .logo { font-size: 0.9rem; letter-spacing: 2px; }
    .navbar-logo-icon { width: 25px; height: 25px; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .about-text p { max-width: 600px; margin: 30px auto 0; }
    .about-stats { justify-content: center; }
    .catalog-grid { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; }
    .mobile-menu-btn { display: flex; }
    .desktop-only { display: none; }
    .mobile-only { display: block; margin-top: 20px; }
    .logo-watermark { display: none; }
    .nav-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: var(--dark-bg); display: flex; justify-content: center; align-items: center; transform: translateY(-100%); transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1); z-index: 100; }
    .nav-menu.active { transform: translateY(0); }
    .nav-links { flex-direction: column; text-align: center; gap: 30px; }
    .nav-links a { font-size: 1.5rem; }
    .mobile-menu-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-btn.active span:nth-child(2) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 500px) {
    .logo { font-size: 0.8rem; letter-spacing: 2px; }
    .car-info-top h3 { font-size: 1.2rem; }
    .spec-value { font-size: 0.85rem; }
    .hero .gold-text { -webkit-text-stroke: 0.5px var(--gold-mate); }
    .modal-card { padding: 40px 25px; }
    .modal-title { font-size: 1.8rem; }
    .modal-footer-info { flex-direction: column; align-items: center; gap: 10px; }
}

/* 1. Contenedor principal de la flecha */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 2. Dibujo de la flecha con CSS puro */
.arrow-container {
    width: 45px;
    height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 3. Estilos base para ambas flechas (los dos span) */
.arrow-container span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid var(--gold-mate);
    border-right: 3px solid var(--gold-mate);
    transform: rotate(45deg);
    margin: 0; /* El truco está aquí: 0 margen lateral */
    animation: arrow-bounce 2s infinite;
}

/* 4. Segunda parte de la flecha para dar profundidad (retraso en la animación) */
.arrow-container span:nth-child(2) {
    animation-delay: -0.2s; /* Hace que la segunda flecha se ilumine un poco después */
}

/* 5. Definición de la Animación de rebote y desvanecimiento */
@keyframes arrow-bounce {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-20px, -20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(20px, 20px);
    }
}

/* CARRUSEL DE VEHÍCULOS */

.carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

/* Modificamos ligeramente la imagen para la transición */
.carousel-container .car-img {
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease-in-out, transform 0.6s ease-out;
}

/* La imagen activa se hace visible */
.carousel-container .car-img.active {
    opacity: 1;
    z-index: 2;
}

/* Botones de las flechas */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(9, 10, 12, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    opacity: 0; /* Ocultos por defecto */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

/* Mostrar botones al pasar el ratón por la foto */
.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: var(--gold-mate);
    color: var(--dark-bg);
    border-color: var(--gold-mate);
}

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* Puntos inferiores (Indicadores) */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots .dot.active {
    background: var(--gold-mate);
    box-shadow: 0 0 8px rgba(197, 179, 135, 0.5);
    transform: scale(1.2);
}
/* LIGHTBOX / POP-UP DE IMÁGENES */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 20000; /* Por encima del menú y del modal de contacto */
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden; /* GSAP se encargará de mostrarlo */
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 5, 6, 0.95);
    backdrop-filter: blur(15px);
    opacity: 0;
    cursor: pointer;
}

.lightbox-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 20000; 
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden; 
    opacity: 0; /* AÑADE ESTA LÍNEA */
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 3.5rem;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s, transform 0.3s;
}

.lightbox-close:hover {
    color: var(--gold-mate);
    transform: rotate(90deg);
}

/* Indicador visual de que la foto se puede clickear */
.car-img {
    cursor: pointer;
}