/* landing.css - MASTER ENTERPRISE STYLESHEET (Final Version) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --text-main: #0f172a;     
    --text-muted: #64748b;    
    --primary: #4f46e5;
    --primary-light: rgba(79, 70, 229, 0.1);
    --border: #e2e8f0;
    --bg-body: #ffffff;
    --bg-alt: #f8fafc;
    --radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
}

/* --- ANIMACIONES GLOBALES --- */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- NAVEGACIÓN (HEADER) --- */
.top-bar { 
    background: #0f172a; color: #94a3b8; padding: 10px 0; font-size: 0.75rem; 
    width: 100%; position: relative; z-index: 1001; 
}
.top-bar .container { display: flex; justify-content: flex-end; gap: 25px; }
.top-bar a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color 0.3s; }
.top-bar a:hover { color: white; }

.navbar { 
    position: fixed; top: 0; left: 0; width: 100%; padding: 20px 0; 
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 1000; border-bottom: 1px solid rgba(0,0,0,0.05); 
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); 
}
.navbar.scrolled { padding: 12px 0; background: rgba(255, 255, 255, 0.98); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
.nav-content { display: flex; justify-content: space-between; align-items: center; }

.brand { font-size: 24px; font-weight: 900; color: var(--text-main); text-decoration: none; letter-spacing: -1.5px; display: flex; align-items: center; gap: 10px; }
.brand i { color: var(--primary); font-size: 1.8rem; }

.nav-links { display: flex; gap: 35px; align-items: center; }
.nav-link { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: all 0.3s; position: relative; }
.nav-link:hover { color: var(--text-main); }
.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s ease; }
.nav-link:hover::after { width: 100%; }

/* --- MENU MOVIL --- */
.hamburger-btn { display: none; background: #f1f5f9; border: none; width: 45px; height: 45px; border-radius: 10px; font-size: 24px; color: var(--text-main); cursor: pointer; }
.mobile-menu-overlay { position: fixed; top: 0; right: -100%; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px); z-index: 2000; transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1); visibility: hidden; }
.mobile-menu-overlay.active { right: 0; visibility: visible; }
.mobile-menu-content { position: absolute; top: 0; right: 0; width: 85%; max-width: 350px; height: 100%; background: white; padding: 40px 30px; box-shadow: -20px 0 60px rgba(0,0,0,0.1); } 
.close-menu-btn { background: #f1f5f9; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; color: var(--text-main); cursor: pointer; float: right; margin-bottom: 40px; display: flex; align-items: center; justify-content: center; }
.mobile-links { display: flex; flex-direction: column; gap: 25px; margin-top: 80px; clear: both; }
.mobile-link { font-size: 1.2rem; font-weight: 800; color: var(--text-main); text-decoration: none; letter-spacing: -0.5px; }

/* --- HERO --- */
.hero-wrapper { height: 100vh; position: sticky; top: 0; z-index: 10; }
.hero { height: 100%; background: #fff; display: flex; align-items: center; justify-content: center; position: relative; padding-top: 80px; overflow: hidden; }
.tech-grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 60px 60px; opacity: 0.2; mask-image: radial-gradient(circle at center, black, transparent 80%); }
.hero-giant-circle { position: absolute; bottom: -400px; left: 50%; transform: translateX(-50%); width: 140%; height: 600px; background: radial-gradient(50% 50% at 50% 0%, #f8fafc 0%, #fff 100%); border-radius: 50%; border-top: 1px solid var(--border); z-index: 1; }
.hero-content { position: relative; z-index: 10; text-align: center; max-width: 1000px; }
.badge-tech { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; background: #f1f5f9; border: 1px solid var(--border); border-radius: 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 30px; }
.pulse-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; animation: pulse 2s infinite; }
.main-title { font-size: clamp(2.2rem, 8vw, 4.5rem); font-weight: 900; line-height: 1.1; letter-spacing: -3px; color: var(--text-main); margin-bottom: 30px; }
.main-title span { color: #64748b; }
.main-description { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-muted); max-width: 700px; margin: 0 auto 50px; line-height: 1.6; }

/* --- BLOQUE PRINCIPAL (CUBIERTA) --- */
main { position: relative; z-index: 100; background: white; width: 100%; }

/* --- AI PROCESSOR DEMO --- */
.preview-track { height: 260vh; position: relative; background: white; z-index: 100; }
.preview-sticky-container { position: sticky; top: 120px; height: 100vh; display: flex; align-items: flex-start; justify-content: center; }

.ai-processor-box { 
    background: #ffffff; border-radius: 20px; box-shadow: 0 50px 100px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; 
    position: relative; overflow: hidden; width: 65%; height: 520px; max-width: 850px;
}
.demo-header { padding: 15px 25px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: space-between; background: #fff; }
.demo-dots { display: flex; gap: 6px; }
.demo-dots .dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-dots .red { background: #ff5f56; } .demo-dots .yellow { background: #ffbd2e; } .demo-dots .green { background: #27c93f; }
.demo-title { font-size: 0.7rem; font-weight: 800; color: #94a3b8; letter-spacing: 2px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }

.demo-body { padding: 40px; display: flex; flex-direction: column; gap: 30px; }
.demo-field label { display: block; font-size: 0.7rem; font-weight: 800; color: #94a3b8; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.demo-input-container { width: 100%; height: 65px; background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 12px; display: flex; align-items: center; padding: 0 25px; font-size: 1.4rem; color: #0f172a; font-weight: 700; }
.demo-input-container i { margin-right: 15px; color: #4f46e5; font-size: 1.8rem; }
#demo-cursor-blink { width: 3px; height: 30px; background: #4f46e5; display: inline-block; margin-left: 4px; animation: blink 1s infinite; }

.demo-ai-status { display: none; align-items: center; gap: 15px; color: #4f46e5; font-weight: 600; font-size: 0.9rem; margin-top: -10px; }
.spinner-ia { width: 20px; height: 20px; border: 3px solid rgba(79, 70, 229, 0.1); border-top-color: #4f46e5; border-radius: 50%; animation: spin-ia 0.8s linear infinite; }

.demo-result-card { opacity: 0; transform: translateY(20px); transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); background: #f0fdf4; border: 1px solid #bbf7d0; padding: 20px; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; }
.res-avatar { width: 45px; height: 45px; background: #22c55e; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.res-badge { font-size: 0.65rem; color: #166534; font-weight: 800; text-transform: uppercase; }
.res-name { font-size: 1.1rem; font-weight: 800; color: #0f172a; } 
.res-icon { color: #22c55e; font-size: 1.8rem; }

.demo-action-btn { width: 100%; height: 60px; background: #0f172a; color: white; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; gap: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.demo-pointer-device { position: absolute; top: 85%; left: 85%; z-index: 100; pointer-events: none; transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1); }
.demo-pointer-device i { font-size: 32px; color: #0f172a; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2)); }

/* --- STACK SCROLL --- */
.stack-wrapper { margin-top: -80vh !important; padding-top: 150px !important; background: #ffffff !important; position: relative !important; z-index: 100 !important; box-shadow: 0 -50px 100px rgba(0,0,0,0.1) !important; width: 100%; }
.stack-header { position: sticky; top: 70px; z-index: 60; background: white; padding: 60px 0; }
.stack-upper-label { text-transform: uppercase; letter-spacing: 2px; font-size: 0.7rem; font-weight: 800; color: var(--primary); margin-bottom: 15px; display: block; }
.stack-main-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; letter-spacing: -0.04em; }

.stack-container-flex { display: flex; max-width: 1200px; margin: 0 auto; gap: 50px; padding: 0 24px; }
.stack-progress-sidebar { width: 60px; position: sticky; top: 350px; height: 300px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.progress-line-bg { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #f1f5f9; transform: translateX(-50%); }
#stackProgressFill { width: 100%; height: 0%; background: var(--primary); transition: height 0.3s ease; }
.progress-dot { width: 40px; height: 40px; border-radius: 50%; background: white; border: 2px solid #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; z-index: 2; transition: 0.3s; }
.progress-dot.active { border-color: var(--primary); color: var(--primary); transform: scale(1.1); }

.stack-cards-area { flex: 1; }
.stack-card { position: sticky; top: 150px; height: 480px; margin-bottom: 120px; background: white; border: 1px solid #e2e8f0; border-radius: 24px; display: flex; box-shadow: 0 20px 50px rgba(0,0,0,0.05); overflow: hidden; }
.card-2 { background: #0f172a !important; color: white; border: none; }

.stack-text { flex: 1; padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.stack-text h3 { font-size: 2.2rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -1px; }
.stack-label { display: inline-block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--primary); border: 1px solid var(--primary); padding: 5px 12px; border-radius: 4px; margin-bottom: 25px; align-self: flex-start; }
.stack-list { list-style: none; padding: 0; }
.stack-list li { display: flex; align-items: center; gap: 12px; font-size: 1rem; margin-bottom: 12px; font-weight: 600; color: var(--text-muted); }
.stack-list li i { font-size: 1.2rem; color: var(--primary); }
.card-2 .stack-list li { color: #94a3b8; }

.stack-visual { flex: 1; background: #f8fafc; display: flex; align-items: center; justify-content: center; border-left: 1px solid #f1f5f9; padding: 40px; }
.card-2 .stack-visual { background: #1e293b; border: none; }

/* --- HOW IT WORKS --- */
.how-it-track { height: 400vh; position: relative; z-index: 110; background: #fff; }
.how-it-sticky { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; display: flex; align-items: center; transition: background 0.8s ease; }
.how-it-content-wrapper { display: flex; width: 300%; position: relative; z-index: 10; }
.how-step-slide { width: 100%; height: 100vh; display: flex; align-items: center; justify-content: center; padding: 0 100px; flex-shrink: 0; }
.step-card-mega { display: flex; align-items: center; gap: 60px; max-width: 1000px; width: 100%; }
.step-num-big { font-size: clamp(5rem, 15vw, 12rem); font-weight: 900; color: rgba(79, 70, 229, 0.4); line-height: 1; letter-spacing: -10px; }

/* --- OTHER SECTIONS --- */
.stats-upgrade, .testimonial-stack-section, .faq-section, .cta-final-upgrade { position: relative; z-index: 120; background: #fff; padding: 100px 0; border-top: 1px solid var(--border); }

/* --- FOOTER REVEAL --- */
.main-footer-sticky { position: sticky; bottom: 0; left: 0; width: 100%; background: #0f172a; color: white; padding: 100px 0 40px; z-index: 1; }

/* --- BUTTONS & MISC --- */
.hero-buttons { display: flex; justify-content: center; gap: 15px; }
.btn { padding: 14px 32px; font-weight: 700; font-size: 0.95rem; text-decoration: none; border-radius: 8px; transition: all 0.2s; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.btn-dark { background: var(--text-main); color: #fff; border: 1px solid var(--text-main); }
.btn-dark:hover { background: #000; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

@keyframes spin-ia { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse { 0% { transform: scale(0.95); opacity: 0.5; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(0.95); opacity: 0.5; } }

/* ==========================================================================
   MOBILE OPTIMIZATION
   ========================================================================== */
@media screen and (max-width: 768px) {
    .container { padding: 0 20px; }
    .nav-links, .top-bar, .stack-progress-sidebar { display: none; }
    .hamburger-btn { display: flex; align-items: center; justify-content: center; }

    .hero-wrapper { height: auto; position: relative; }
    .hero { height: auto; min-height: 100vh; padding: 120px 0 60px; }
    .main-title { font-size: 2.5rem !important; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }

    .preview-track { height: auto; }
    .preview-sticky-container { position: relative; height: auto; top: 0; padding: 0 15px; }
    .ai-processor-box { width: 100% !important; transform: none !important; opacity: 1 !important; height: auto !important; min-height: 450px; }
    .demo-pointer-device { display: none; }

    .stack-wrapper { margin-top: 0 !important; padding-top: 60px !important; }
    .stack-header { position: relative; top: 0; padding: 40px 0; }
    .stack-card { position: relative !important; top: 0 !important; height: auto !important; flex-direction: column; margin-bottom: 40px; }
    .stack-text { padding: 30px 20px; }
    .stack-visual { display: none; } 

    .how-it-track { height: auto !important; }
    .how-it-sticky { position: relative !important; height: auto !important; width: 100% !important; overflow: visible !important; }
    .how-it-content-wrapper { flex-direction: column !important; width: 100% !important; transform: none !important; }
    .how-step-slide { width: 100% !important; height: auto !important; padding: 60px 20px !important; }
}