:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --apple-blue: #2997ff;
    --apple-blue-hover: #0077ed;
    --glass-bg: rgba(0, 0, 0, 0.72);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --cursor-color: #2997ff;
}

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

/* Custom Cursor Requires Hiding Default */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor */
}
a, button { cursor: none; }

/* Cinematic Overlays */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 99999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    /* En modo oscuro, el blend mode overlay ayuda a dar textura */
    mix-blend-mode: overlay;
}

.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background-color: var(--apple-blue);
    width: 0%;
    z-index: 10000;
    transition: width 0.1s;
}

/* Custom Cursor Elements */
.cursor {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    background-color: var(--cursor-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100000;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-follower {
    position: fixed;
    top: 0; left: 0;
    width: 40px; height: 40px;
    border: 1px solid rgba(41, 151, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s, width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor.hover-active {
    width: 60px; height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    mix-blend-mode: difference;
}
.cursor-follower.hover-active {
    opacity: 0;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }

/* Global Nav */
.global-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 9999;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
}

.nav-content {
    width: 100%; max-width: 980px; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center; height: 100%;
}

.logo { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--text-primary); }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; font-size: 0.85rem; font-weight: 500; color: var(--text-primary); transition: opacity 0.3s; }
.nav-links a:hover { opacity: 0.6; }

.btn-nav {
    background: var(--apple-blue); color: #fff; text-decoration: none;
    font-size: 0.85rem; padding: 8px 18px; border-radius: 20px; font-weight: 600;
}

/* Hero Section */
.hero {
    height: 100vh; width: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: relative; overflow: hidden; background: var(--bg-secondary);
}

.hero-bg-orbs {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; will-change: transform; }
.orb1 { width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(41, 151, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%); top: -20vh; left: -20vw; }
.orb2 { width: 70vw; height: 70vw; background: radial-gradient(circle, rgba(134, 134, 139, 0.15) 0%, rgba(0, 0, 0, 0) 70%); bottom: -30vh; right: -20vw; }

.bg-moving-car {
    position: absolute; bottom: 5vh; left: -60vw; width: 60vw; min-width: 600px;
    opacity: 0.15; 
    /* Truco Modo Oscuro: invertimos la imagen y usamos screen */
    filter: invert(1);
    mix-blend-mode: screen; 
    z-index: 1; pointer-events: none; will-change: transform;
}

.bg-huge-text {
    position: absolute; font-size: 22vw; font-weight: 800; color: transparent;
    -webkit-text-stroke: 3px rgba(255, 255, 255, 0.04); white-space: nowrap; top: 50%; left: 100vw;
    transform: translateY(-50%); z-index: 0; pointer-events: none; will-change: transform;
}

.hero-container { text-align: center; z-index: 2; margin-top: -10vh; }

.hero-title {
    font-size: 9vw; font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; display: flex; flex-direction: column;
}
/* For split text animation */
.line-wrap { overflow: hidden; display: block; }
.hero-title .line {
    background: linear-gradient(180deg, #ffffff 0%, #a1a1a6 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: block;
}

.hero-subtitle { margin-top: 2rem; font-size: 1.8rem; font-weight: 500; color: var(--text-secondary); }

.hero-car { position: absolute; bottom: -20vh; width: 80%; max-width: 1200px; z-index: 1; transform: scale(1.2); opacity: 0; }
.hero-car img { width: 100%; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5)); }

/* Bento Grid */
.bento-section { padding: 15vh 20px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 4rem; font-weight: 700; letter-spacing: -0.03em; }
.section-header p { font-size: 1.5rem; color: var(--text-secondary); margin-top: 10px; }
.section-header.center { margin-bottom: 10vh; }

.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 300px); gap: 20px; }
.bento-box {
    background: #111111; border-radius: 32px; padding: 40px; display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden; transition: box-shadow 0.5s ease;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}
.bento-box:hover { box-shadow: 0 25px 50px rgba(0,0,0,0.1); }
.bento-box h3 { font-size: 2rem; font-weight: 600; z-index: 2; margin-bottom: 10px; }
.bento-box p { font-size: 1.2rem; color: var(--text-secondary); z-index: 2; }
.bento-graphic { position: absolute; bottom: -20px; right: -20px; font-size: 15rem; color: rgba(0, 102, 204, 0.05); font-weight: 800; line-height: 1; }
.box-large { grid-column: span 2; grid-row: span 2; justify-content: flex-start; }
.box-large h3 { font-size: 3rem; }
.box-small { grid-column: span 1; grid-row: span 1; }
.box-wide { grid-column: span 2; grid-row: span 1; }

/* Gallery Showcase */
.gallery-section { padding: 10vh 20px 20vh; max-width: 1400px; margin: 0 auto; background-color: var(--bg-primary); }
.car-showcase { display: flex; align-items: center; justify-content: space-between; height: 120vh; margin-bottom: 10vh; gap: 5%; }
.car-showcase.reverse { flex-direction: row-reverse; }

.showcase-text { width: 40%; padding: 0 40px; }
.showcase-text h3 { font-size: 3.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 10px; }
.showcase-text h3 span { font-size: 1.5rem; color: var(--apple-blue); vertical-align: middle; margin-left: 10px; }
.showcase-text p { font-size: 1.4rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 15px; }
.showcase-text .price { font-size: 2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 30px; }

.btn-primary {
    display: inline-block; background: var(--apple-blue); color: #fff; padding: 16px 36px;
    border-radius: 980px; text-decoration: none; font-size: 1.1rem; font-weight: 600; transition: background 0.3s;
}
.btn-primary:hover { background: var(--apple-blue-hover); }

.showcase-img-container {
    width: 55%; height: 70vh; border-radius: 40px; overflow: hidden; background: #e5e5ea;
    position: relative; box-shadow: 0 30px 60px rgba(0,0,0,0.1); transition: transform 0.5s ease;
}
.car-showcase:hover .showcase-img-container { transform: scale(1.02); }

.parallax-img { width: 100%; height: 100%; object-fit: cover; transform-origin: center; opacity: 0; transform: scale(0.7); will-change: transform, opacity; }

/* EXPLODED VIEW SECTION */
.exploded-section {
    height: 100vh;
    width: 100%;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.exploded-container {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10vh;
}

.exploded-header {
    text-align: center;
    margin-bottom: 5vh;
    z-index: 10;
}
.exploded-header h2 { font-size: 4rem; font-weight: 700; letter-spacing: -0.03em; }
.exploded-header p { font-size: 1.5rem; color: var(--text-secondary); margin-top: 10px; }

.exploded-visuals {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 60vh;
    margin-top: 5vh;
}

.explode-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    transform: scaleX(-1); /* El carro silueta que usamos está invertido */
    /* Truco Modo Oscuro: Invertimos y usamos Screen para eliminar el fondo blanco original */
    filter: invert(1);
    mix-blend-mode: screen; 
    will-change: transform;
}

/* CLIP PATHS: Cortando el coche horizontalmente en 3 pedazos */
/* Top: Del 0% al 38% de altura */
.layer-top { clip-path: polygon(0 0, 100% 0, 100% 38%, 0 38%); }
/* Mid: Del 38% al 70% de altura */
.layer-mid { clip-path: polygon(0 38%, 100% 38%, 100% 70%, 0 70%); }
/* Bot: Del 70% al 100% de altura */
.layer-bot { clip-path: polygon(0 70%, 100% 70%, 100% 100%, 0 100%); }

.tech-label {
    position: absolute;
    opacity: 0;
    width: 250px;
    padding-left: 20px;
    border-left: 2px solid var(--apple-blue);
    will-change: opacity, transform;
}
.tech-label h4 { font-size: 1.2rem; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.tech-label p { font-size: 0.9rem; color: var(--text-secondary); }

.label-top { top: 10%; right: -10%; }
.label-mid { top: 45%; left: -10%; border-left: none; border-right: 2px solid var(--apple-blue); padding-left: 0; padding-right: 20px; text-align: right; }
.label-bot { bottom: 10%; right: -10%; }

/* CTA & Footer */
.cta-section { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--bg-secondary); padding: 20px; }
.cta-content { max-width: 800px; }
.cta-content h2 { font-size: 4rem; font-weight: 700; letter-spacing: -0.04em; margin-bottom: 20px; }
.cta-content p { font-size: 1.5rem; color: var(--text-secondary); margin-bottom: 40px; }
.footer { text-align: center; padding: 40px; background: var(--bg-primary); color: var(--text-secondary); font-size: 0.9rem; border-top: 1px solid var(--glass-border); }

/* Magnetic items need display inline-block or block to translate smoothly */
.magnetic { display: inline-block; }
