/* =========================================
   PROYECTO: LUCAS FERNANDEZ - DARK LUXURY V9.0 (PERFORMANCE)
   ========================================= */

:root {
    --bg-dark: #020617;
    --bg-card: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --brand-blue: #3b82f6;
    --brand-cyan: #06b6d4;
    --brand-magenta: #d946ef;
    --accent-gold: #fbbf24;
    --gradient-text: linear-gradient(90deg, #3b82f6, #06b6d4, #ffffff);
    --font-main: 'Outfit', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* scroll-behavior smooth es costoso en performance si hay muchas capas */
html { scroll-behavior: smooth; }

body { 
    background-color: var(--bg-dark); 
    color: var(--text-main); 
    font-family: var(--font-main); 
    overflow-x: hidden; 
    line-height: 1.6;
    text-rendering: optimizeSpeed; /* Prioriza velocidad sobre legibilidad perfecta */
}

/* OPTIMIZACIÓN: content-visibility
   Esto hace que el navegador NO renderice secciones que no están en pantalla.
   Ahorra MUCHO tiempo de bloqueo en la carga inicial. */
.section-dark, 
.section-mechanism, 
.section-speed, 
.section-lifestyle, 
.section-team, 
.pricing-section {
    content-visibility: auto;
    contain-intrinsic-size: 800px; /* Tamaño estimado para evitar saltos de scroll */
}

/* NOISE TEXTURE OPTIMIZADO */
.noise-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* Backface visibility ayuda a la GPU a manejar capas fijas */
    backface-visibility: hidden;
    transform: translateZ(0);
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnPjxmaWx0ZXIgaWQ9J24nPjxmZVR1cmJ1bGVuY2UgdHlwZT0nZnJhY3RhbE5vaXNlJyBiYXNlRnJlcXVlbmN5PScwLjUnIHN0aXRjaFRpbGVzPSdzdGl0Y2gnLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0nMTAwJScgaGVpZ2h0PScxMDAlJyBmaWxsPSd0cmFuc3BhcmVudCcvPjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbHRlcj0idXJsKCNuKSIgb3BhY2l0eT0iMC4wNSIvPjwvc3ZnPg==');
    opacity: 0.3; z-index: -1; pointer-events: none;
}

/* ANIMACION MATRIX */
.cyber-glitch {
    position: relative;
    color: #fff;
    font-weight: 800;
    display: inline-block;
    /* will-change avisa al navegador que esto se va a mover */
    will-change: transform; 
    animation: text-shudder 2s infinite linear;
}

.cyber-glitch::before,
.cyber-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark); 
}

.cyber-glitch::before {
    color: var(--brand-cyan);
    z-index: -1;
    text-shadow: 2px 0 var(--brand-magenta);
    animation: glitch-effect 3s infinite linear alternate-reverse;
}

.cyber-glitch::after {
    color: var(--brand-magenta);
    z-index: -2;
    text-shadow: -2px 0 var(--brand-cyan);
    animation: glitch-effect 2s infinite linear alternate-reverse;
}

@keyframes glitch-effect {
    0% { transform: translate(0); clip-path: inset(0 0 0 0); }
    10% { transform: translate(-2px, 2px); clip-path: inset(10% 0 85% 0); }
    20% { transform: translate(2px, -2px); clip-path: inset(85% 0 10% 0); }
    30% { transform: translate(-2px, 2px); clip-path: inset(40% 0 40% 0); }
    40% { transform: translate(2px, -2px); clip-path: inset(10% 0 60% 0); }
    50% { transform: translate(-1px, 1px); clip-path: inset(50% 0 30% 0); }
    100% { transform: translate(1px, -1px); clip-path: inset(0 0 0 0); }
}

@keyframes text-shudder {
    0%, 100% { filter: blur(0); }
    50% { filter: blur(0.5px); }
    51% { filter: blur(0); }
}

/* FONDO GRID */
.cyber-grid-bg {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
    will-change: background-position;
    animation: moveGrid 20s linear infinite;
}
@keyframes moveGrid {
    0% { background-position: 0 0; }
    100% { background-position: 0 40px; }
}

/* UTILIDADES */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
/* Importante para CLS: max-width asegura responsive, pero height auto mantiene ratio */
img { max-width: 100%; height: auto; display: block; }
.text-blue { color: var(--brand-blue); }
.text-gold { color: var(--accent-gold); }
.gradient-text { background: var(--gradient-text); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* BOTONES */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 14px 28px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.95rem; cursor: pointer; transition: all 0.3s ease; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; border: 1px solid rgba(255,255,255,0.2); background: transparent; color: white; }
.btn-sm:hover { background: var(--brand-blue); border-color: var(--brand-blue); }
.btn-primary { background: var(--brand-blue); color: white; border: none; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
.btn-primary:hover { background: #2563eb; transform: translateY(-3px); box-shadow: 0 0 40px rgba(59, 130, 246, 0.8); }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: white; }
.btn-outline:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: rgba(59, 130, 246, 0.05); transform: translateY(-3px); }
.full-width { width: 100%; }

/* NAVBAR */
.navbar { position: fixed; top: 0; width: 100%; z-index: 1000; background: rgba(2, 6, 23, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(59, 130, 246, 0.15); padding: 15px 0; }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; color: white; transition: 0.3s; }
.nav-brand:hover { text-shadow: 0 0 15px var(--brand-blue); }
.nav-actions { display: flex; align-items: center; gap: 15px; }
.insta-link { transition: transform 0.3s; display: block; }
.insta-link:hover { transform: scale(1.1); filter: drop-shadow(0 0 5px var(--brand-magenta)); }

/* HERO */
.hero { 
    padding-top: 100px; 
    padding-bottom: 40px; 
    min-height: 100vh; display: flex; align-items: center; position: relative; 
}
.hero-bg-immersive { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background-image: url('assets/fondo-home.webp'); 
    background-size: cover; background-position: center; 
    background-blend-mode: overlay; background-color: rgba(2, 6, 23, 0.85); 
    z-index: -1; 
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 800; }
.hero-desc { font-size: 1.1rem; color: #cbd5e1; margin-bottom: 30px; max-width: 90%; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.tech-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.3); color: var(--brand-cyan); padding: 6px 12px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; margin-bottom: 20px; border-radius: 4px; backdrop-filter: blur(5px); }
.pulse-dot { width: 8px; height: 8px; background: var(--brand-cyan); border-radius: 50%; animation: pulse 2s infinite; }
.hero-cta-group { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero-stats-mini { display: flex; gap: 20px; align-items: center; }
.stat-item strong { font-size: 1.5rem; color: white; display: block; line-height: 1; }
.stat-item small { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }
.vr { width: 1px; height: 30px; background: rgba(255,255,255,0.1); }
.hero-image-wrapper { position: relative; width: 100%; transition: transform 0.5s; }
.floating-anim { animation: breathing 6s ease-in-out infinite; will-change: transform; }
@keyframes breathing { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.image-container { position: relative; z-index: 1; border-radius: 20px; overflow: hidden; border: 1px solid rgba(59, 130, 246, 0.2); box-shadow: 0 0 50px rgba(2, 6, 23, 0.8); }
.lucas-img { width: 100%; display: block; object-fit: cover; }
.gradient-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 50%; background: linear-gradient(to top, #020617 10%, transparent 100%); pointer-events: none; }
.hero-stat-card { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(15, 23, 42, 0.95); padding: 15px 25px; border-radius: 12px; border: 1px solid rgba(59, 130, 246, 0.3); display: flex; align-items: center; gap: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); width: max-content; }
.stat-icon { width: 40px; height: 40px; background: rgba(59, 130, 246, 0.1); color: var(--brand-blue); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.stat-info { display: flex; flex-direction: column; }
.stat-info .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.stat-info .value { font-size: 1.1rem; font-weight: 700; color: white; }

.scroll-down { 
    position: absolute; 
    bottom: 20px; 
    left: 50%; transform: translateX(-50%); 
    color: var(--brand-blue); font-size: 2rem; 
    animation: bounce 2s infinite; cursor: pointer; z-index: 10; 
}
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -10px); } 60% { transform: translate(-50%, -5px); } }

/* --- MARQUEE --- */
.marquee-container { background: var(--brand-blue); padding: 12px 0; overflow: hidden; position: relative; z-index: 5; transform: skewY(-2deg); margin: -20px 0 40px 0; border-top: 2px solid #fff; border-bottom: 2px solid #fff; }
.marquee-content { display: flex; gap: 40px; white-space: nowrap; animation: marquee 25s linear infinite; will-change: transform; }
.marquee-content span { color: #fff; font-weight: 800; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 2px; }
.divider { color: rgba(255,255,255,0.5); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* SECCIONES VARIAS */
.section-dark { padding: 40px 0 40px; } 

.section-header { text-align: center; margin-bottom: 00px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 10px; }
.earnings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.earning-card { position: relative; height: 250px; overflow: hidden; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); transition: 0.4s ease; }
.earning-card.full-view { height: 320px; }
.earning-card.full-view img { opacity: 0.95; }
.earning-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; opacity: 0.8; }
.earning-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.3); }
.earning-card:hover img { transform: scale(1.05); opacity: 0.6; }
.earning-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); }
.earning-info.dark-bg { background: rgba(2, 6, 23, 0.8); }
.earning-info h4 { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; }
.earning-info .amount { font-size: 1.5rem; font-weight: 800; color: white; }

.section-mechanism { padding: 30px 0 50px; }

.mechanism-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.mech-card { background: var(--bg-card); padding: 30px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); text-align: center; transition: 0.3s; position: relative; }
.mech-card:hover { transform: translateY(-5px); border-color: var(--brand-blue); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.mech-icon { font-size: 2.5rem; color: var(--brand-cyan); margin-bottom: 20px; }
.mech-card h3 { font-size: 1.3rem; margin-bottom: 15px; color: white; }
.mech-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }
.mech-card.highlight { background: linear-gradient(145deg, #1e293b, #0f172a); border-color: rgba(59, 130, 246, 0.3); }

.section-speed { padding: 80px 0; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); background: linear-gradient(to right, #020617, #050b1f); }
.speed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.speed-intro { font-size: 1.2rem; color: #cbd5e1; margin-bottom: 30px; }
.speed-stats { display: flex; gap: 40px; margin-bottom: 30px; }
.s-item strong { font-size: 2rem; color: var(--brand-blue); display: block; line-height: 1; }
.s-item small { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.speed-image-wrapper { position: relative; }
.speed-img { border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 0 30px rgba(59, 130, 246, 0.1); transition: 0.5s; width: 100%; transform: rotate(2deg); }
.speed-img:hover { transform: scale(1.02) rotate(0deg); box-shadow: 0 0 50px rgba(59, 130, 246, 0.3); }
.floating-badge { position: absolute; bottom: 20px; right: -20px; background: var(--brand-blue); color: white; padding: 10px 20px; border-radius: 50px; font-weight: 700; box-shadow: 0 10px 20px rgba(0,0,0,0.3); animation: bounce 3s infinite; }

.section-lifestyle { padding: 100px 0 60px; }

.lifestyle-grid-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.video-container { width: 100%; height: 450px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(59, 130, 246, 0.2); box-shadow: 0 20px 50px rgba(0,0,0,0.5); position: relative; transition: 0.4s; }
.video-container:hover { border-color: var(--brand-blue); box-shadow: 0 0 30px rgba(59, 130, 246, 0.3); }
.video-frame { width: 100%; height: 100%; background: #000; display: flex; align-items: center; justify-content: center; }
.styled-video { width: 100%; height: 100%; object-fit: cover; }
.video-overlay-text { position: absolute; top: 20px; left: 20px; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); padding: 5px 15px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.1); font-weight: 700; font-size: 0.9rem; color: white; pointer-events: none; }
.family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-content: start; }
.family-card { height: 210px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); transition: transform 0.3s; position: relative; }
.family-card:hover { transform: scale(1.05); z-index: 2; border-color: var(--brand-blue); }
.family-card img { width: 100%; height: 100%; object-fit: cover; }

.section-team { padding: 10px 0 10px; border-top: 1px solid rgba(255,255,255,0.05); }

.scroller-wrapper, .pricing-scroll-container { 
    display: flex; 
    overflow-x: auto; 
    padding-bottom: 80px; 
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
}
.scroller-wrapper::-webkit-scrollbar, .pricing-scroll-container::-webkit-scrollbar { display: none; }
.team-scroller { display: flex; gap: 25px; width: max-content; padding-left: 10px; padding-right: 20px; }

.pricing-section { padding: 10px 0 20px; }

.pricing-scroll-container { display: flex; gap: 20px; padding: 100px 10px; }
.price-card { 
    min-width: 280px; width: 280px; 
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 30px; 
    position: relative; transition: all 0.4s; scroll-snap-align: center;
    display: flex; flex-direction: column; justify-content: space-between;
    flex-shrink: 0; 
}
.price-card:hover { transform: translateY(-15px); border-color: var(--brand-blue); box-shadow: 0 15px 40px rgba(0,0,0,0.6); }

.best-value { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand-blue); color: white; padding: 4px 15px; font-size: 0.75rem; font-weight: 800; border-radius: 20px; }
.price { font-size: 2.2rem; font-weight: 800; color: var(--brand-blue); margin-bottom: 0; line-height: 1; }
.price small { font-size: 1rem; color: #fff; }
.price-usd { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; font-style: italic; }
.features li { margin-bottom: 12px; font-size: 0.9rem; color: #cbd5e1; display: flex; gap: 8px; }
.features i { color: var(--brand-cyan); }
.spot-card { position: relative; overflow: hidden; }
.spotlight-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(59, 130, 246, 0.15) 0%, transparent 50%); pointer-events: none; z-index: 2; opacity: 0; transition: opacity 0.3s; }
.spot-card:hover .spotlight-overlay { opacity: 1; }

footer { padding: 60px 0; text-align: center; color: var(--text-muted); border-top: 1px solid rgba(255,255,255,0.05); }
.footer-brand { font-size: 1.5rem; font-weight: 800; color: white; margin-bottom: 20px; }
.credits a { color: var(--brand-blue); font-weight: 700; transition: color 0.3s; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero { padding-top: 100px; padding-bottom: 100px; text-align: center; } 
    .hero-grid { grid-template-columns: 1fr; }
    .hero-cta-group { align-items: center; width: 100%; }
    .hero-stats-mini { justify-content: center; }
    .hero h1 { font-size: 2.8rem; }
    .hero-stat-card { width: 90%; max-width: 300px; padding: 10px 15px; bottom: 20px; }
    .stat-icon { font-size: 1.1rem; }
    
    .scroll-down { bottom: 10px; } 
    .marquee-container { margin-top: 10px; }
    .marquee-content span { font-size: 1rem; }
    
    .earnings-grid { grid-template-columns: 1fr; }
    .earning-card.full-view { height: 280px; }
    .speed-grid { grid-template-columns: 1fr; }
    .mechanism-grid { grid-template-columns: 1fr; }
    .lifestyle-grid-layout { grid-template-columns: 1fr; }
    .video-container { height: 280px; }
    .family-grid { grid-template-columns: 1fr 1fr; }
    
    .pricing-scroll-container, .scroller-wrapper { 
        margin-left: -20px; margin-right: -20px; width: calc(100% + 40px);
        padding-left: 20px; padding-right: 40px !important; 
    }
}

/* FIX ESCRITORIO */
@media (min-width: 901px) {
    .pricing-scroll-container, .scroller-wrapper { 
        justify-content: center; 
        flex-wrap: wrap; 
        overflow: visible !important; 
        padding: 100px 0 40px 0; 
        display: flex; gap: 50px; 
    }
    .team-scroller { 
        justify-content: center; flex-wrap: wrap; width: 100%; padding: 0;
    }
    .price-card { 
        width: 220px; height: 100%; min-height: 550px; 
    }
}

/* --- NUEVA SECCIÓN EQUIPO (2 IMAGENES) --- */
.team-grid-images {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 40px;
    margin-top: 20px;
    align-items: center;
}

.tilt-left { transform: rotate(-2deg); }
.tilt-right { transform: rotate(2deg); }

.speed-image-wrapper:hover .tilt-left,
.speed-image-wrapper:hover .tilt-right {
    transform: rotate(0deg) scale(1.02);
    z-index: 5;
}

/* RESPONSIVE PARA MÓVIL */
@media (max-width: 900px) {
    .team-grid-images {
        grid-template-columns: 1fr; 
        gap: 30px;
    }
    
    .tilt-left, .tilt-right {
        transform: rotate(0deg); 
    }
}