:root {
    --bg-main: #04070d;
    --card-bg: rgba(18, 22, 35, 0.4);
    --card-hover: rgba(25, 30, 48, 0.6);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --nexus-blue: #7a88ff;
    --cyan-neon: #00f0ff;
    --purple-neon: #9d4edd;
    --border-light: rgba(255, 255, 255, 0.08);
}

/* Evitar el scroll horizontal globalmente en la Landing */
html, body { 
    overflow-x: hidden; 
    width: 100%; 
    max-width: 100vw; 
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    position: relative;
}

/* Luces de fondo (Blobs) */
.blob {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    border-radius: 50%;
    animation: pulseBlob 10s infinite alternate;
}
.blob-purple { top: -100px; right: -100px; width: 400px; height: 400px; background: radial-gradient(circle, var(--purple-neon), transparent 70%); }
.blob-cyan { top: 40%; left: -150px; width: 500px; height: 500px; background: radial-gradient(circle, var(--cyan-neon), transparent 70%); animation-delay: -5s; }
@keyframes pulseBlob { 0% { transform: scale(1) translate(0, 0); opacity: 0.3; } 100% { transform: scale(1.2) translate(-20px, 20px); opacity: 0.5; } }

/* Header */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; background: rgba(4, 7, 13, 0.7); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-light); position: sticky; top: 0; z-index: 1000; }
.header-left { display: flex; align-items: center; gap: 30px; }
.back-btn { display: flex; align-items: center; gap: 8px; color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 8px; background: rgba(255,255,255,0.03); transition: 0.3s; }
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.1); }
.logo { font-size: 22px; font-weight: 700; }
.logo .nexus-blue { color: var(--nexus-blue); }
.project-tag { font-size: 13px; color: var(--cyan-neon); border: 1px solid rgba(0,240,255,0.3); padding: 5px 12px; border-radius: 20px; background: rgba(0,240,255,0.05);}

/* Botones */
.btn-primary { background: linear-gradient(135deg, var(--cyan-neon), var(--purple-neon)); color: #000; border: none; padding: 14px 28px; border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer; transition: 0.3s; position: relative; z-index: 1; overflow: hidden; }
.btn-primary::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); transition: 0.5s; z-index: -1; }
.btn-primary:hover::before { left: 100%; }
.btn-primary.glow-effect:hover { box-shadow: 0 0 25px rgba(0, 240, 255, 0.4); transform: translateY(-3px); }
.btn-secondary { background: rgba(255,255,255,0.03); color: var(--text-main); border: 1px solid var(--border-light); padding: 14px 28px; border-radius: 8px; font-weight: 500; font-size: 16px; cursor: pointer; transition: 0.3s; }
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); transform: translateY(-3px);}
.btn-outline { background: transparent; color: var(--cyan-neon); border: 1px solid var(--cyan-neon); padding: 12px; border-radius: 8px; font-weight: 600; width: 100%; cursor: pointer; transition: 0.3s; }
.btn-outline:hover { background: rgba(0, 240, 255, 0.15); }

/* Typography */
.section-title { text-align: center; font-size: 36px; font-weight: 700; margin-bottom: 50px; }
.gradient-text { background: linear-gradient(to right, var(--cyan-neon), var(--purple-neon)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Hero Section */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 80px 5% 40px; max-width: 1000px; margin: 0 auto; }
.badge { display: inline-block; padding: 6px 16px; border-radius: 30px; background: rgba(157, 78, 221, 0.1); color: #d8b4fe; font-size: 14px; font-weight: 500; margin-bottom: 24px; border: 1px solid rgba(157, 78, 221, 0.3); }
.hero h1 { font-size: 60px; line-height: 1.1; margin-bottom: 24px; font-weight: 800; letter-spacing: -1px;}
.hero p { font-size: 18px; color: var(--text-muted); margin-bottom: 40px; max-width: 700px; line-height: 1.6;}
.hero-buttons { display: flex; gap: 16px; justify-content: center; margin-bottom: 60px; }

/* Imagen Hero */
.hero-image-wrapper { width: 100%; max-width: 950px; border-radius: 16px; padding: 8px; background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02)); box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0, 240, 255, 0.1); animation: floatImage 6s ease-in-out infinite; }
.hero-img { width: 100%; height: auto; border-radius: 12px; display: block; object-fit: cover; }
@keyframes floatImage { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }

/* Marquee */
.marquee-container { padding: 30px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); background: rgba(0,0,0,0.2); overflow: hidden; margin-bottom: 60px; }
.marquee-title { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px;}
.marquee { white-space: nowrap; overflow: hidden; position: relative; width: 100%; }
.marquee::before, .marquee::after { position: absolute; top: 0; width: 250px; height: 100%; content: ""; z-index: 2; }
.marquee::before { left: 0; background: linear-gradient(to right, var(--bg-main) 0%, transparent 100%); }
.marquee::after { right: 0; background: linear-gradient(to left, var(--bg-main) 0%, transparent 100%); }
.marquee-content { display: inline-block; animation: scroll 20s linear infinite; font-size: 24px; font-weight: 600; color: rgba(255,255,255,0.3); }
.marquee-content span { padding: 0 20px; transition: 0.3s; }
.marquee-content span:hover:not(.dot) { color: var(--text-main); text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.dot { color: var(--purple-neon); font-size: 20px; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Features (Bento Grid) */
.features { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; grid-auto-rows: minmax(220px, auto); }
.bento-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 20px; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; transition: 0.4s; position: relative; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.bento-card:hover { transform: translateY(-5px); border-color: rgba(0,240,255,0.4); background: var(--card-hover); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.bento-card.span-2 { grid-column: span 2; flex-direction: row; align-items: center; gap: 30px; padding: 0; overflow: hidden;}
.card-content { padding: 30px; flex: 1; }
.bento-img-container { flex: 1; height: 100%; min-height: 250px; overflow: hidden; }
.bento-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.bento-card.span-2:hover .bento-img { transform: scale(1.05); }
.card-icon { font-size: 28px; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 12px; margin-bottom: 20px; background: rgba(255,255,255,0.05); }
.card-icon.cyan { color: var(--cyan-neon); border: 1px solid rgba(0,240,255,0.2); }
.card-icon.purple { color: var(--purple-neon); border: 1px solid rgba(157,78,221,0.2); }
.bento-card h3 { font-size: 22px; margin-bottom: 12px; font-weight: 600; }
.bento-card p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

/* Pricing Section */
.pricing { padding: 80px 5%; max-width: 1000px; margin: 0 auto; text-align: center; }
.billing-toggle { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 50px; }
.toggle-label { font-size: 16px; color: var(--text-muted); font-weight: 500; transition: 0.3s; }
.toggle-label.active { color: var(--text-main); }
.discount-badge { background: rgba(0, 240, 255, 0.15); color: var(--cyan-neon); font-size: 12px; padding: 4px 10px; border-radius: 12px; margin-left: 8px; font-weight: 600;}
.switch { position: relative; display: inline-block; width: 60px; height: 32px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.05); transition: .4s; border: 1px solid var(--border-light); }
.slider:before { position: absolute; content: ""; height: 24px; width: 24px; left: 4px; bottom: 3px; background-color: var(--cyan-neon); transition: .4s; box-shadow: 0 0 10px rgba(0,240,255,0.5);}
input:checked + .slider { background-color: rgba(157, 78, 221, 0.1); border-color: rgba(157, 78, 221, 0.4); }
input:checked + .slider:before { transform: translateX(26px); background-color: var(--purple-neon); box-shadow: 0 0 10px rgba(157, 78, 221, 0.5);}
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }
.pricing-cards { display: flex; justify-content: center; gap: 30px; align-items: center; }
.price-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 20px; padding: 40px; width: 100%; max-width: 350px; text-align: left; transition: 0.4s; backdrop-filter: blur(10px); }
.price-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-5px);}
.price-card.popular { border-color: var(--purple-neon); transform: scale(1.05); position: relative; box-shadow: 0 20px 40px rgba(157, 78, 221, 0.15); background: rgba(25, 20, 40, 0.8); }
.price-card.popular:hover { transform: scale(1.05) translateY(-5px); }
.popular-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, var(--cyan-neon), var(--purple-neon)); color: #000; font-size: 13px; font-weight: 700; padding: 6px 20px; border-radius: 20px; box-shadow: 0 5px 15px rgba(157, 78, 221, 0.4); }
.price-card h3 { font-size: 24px; margin-bottom: 15px; }
.price { font-size: 48px; font-weight: 800; margin-bottom: 25px; display: flex; align-items: baseline; }
.currency { font-size: 24px; margin-right: 5px; color: var(--text-muted); }
.period { font-size: 16px; color: var(--text-muted); font-weight: 400; margin-left: 5px; }
.features-list { list-style: none; margin-bottom: 30px; }
.features-list li { margin-bottom: 15px; font-size: 15px; color: #cbd5e1; display: flex; align-items: center; gap: 10px;}
footer { text-align: center; padding: 40px; color: var(--text-muted); font-size: 14px; border-top: 1px solid var(--border-light); margin-top: 50px; background: rgba(0,0,0,0.3);}
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ------------- RESPONSIVE (Tablets) ------------- */
@media (max-width: 992px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.span-2 { grid-column: span 1; flex-direction: column; text-align: center; }
    .bento-img-container { width: 100%; min-height: 200px; }
    .pricing-cards { flex-direction: column; }
    .price-card.popular { transform: scale(1); }
    .price-card.popular:hover { transform: translateY(-5px); }
    .hero h1 { font-size: 44px; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
}

/* ------------- RESPONSIVE (Celulares - CORRECCIONES) ------------- */
@media (max-width: 768px) {
    /* Reparación de encabezado apretado */
    .navbar { flex-direction: column; padding: 15px; gap: 15px; align-items: center;}
    .header-left { width: 100%; justify-content: space-between; }
    
    /* Separar el título superior y dar espacio inferior para la animación */
    .hero { padding-top: 40px; margin-bottom: 50px; }
    .hero h1 { font-size: 34px; margin-bottom: 15px; }
    .badge { margin-bottom: 20px; }
    
    /* Solución Imagen 1: Evitar que los botones rompan el ancho y dar margen abajo */
    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto 80px auto; }
    .hero-buttons button { width: 100%; }

    /* Solución Imagen 3: Hacer las tarjetas Bento más compactas en móvil */
    .bento-grid {
        grid-template-columns: repeat(2, 1fr); /* Fuerza 2 columnas en móvil para las pequeñas */
        gap: 15px;
    }
    
    /* Las tarjetas que originalmente eran 'span-2' (las que tienen imagen) siguen ocupando todo el ancho en móvil */
    .bento-card.span-2 {
        grid-column: span 2;
    }

    /* Ajustes internos de las tarjetas pequeñas para que no se vean apretadas en 2 columnas */
    .bento-card:not(.span-2) {
        padding: 20px;
    }
    .bento-card:not(.span-2) .card-icon {
        width: 40px; height: 40px; font-size: 20px; margin-bottom: 15px;
    }
    .bento-card:not(.span-2) h3 {
        font-size: 16px; margin-bottom: 8px;
    }
    .bento-card:not(.span-2) p {
        font-size: 13px; line-height: 1.4;
    }

    /* Solución Imagen 2: Planes de precio uno al lado del otro */
    .pricing-cards { 
        flex-direction: row; /* Forzar fila en lugar de columna */
        gap: 15px; /* Reducir espacio entre ellas */
        align-items: stretch; /* Que ambas tengan la misma altura */
    }
    .price-card {
        padding: 20px 15px; /* Reducir padding interno para ganar espacio */
    }
    .price-card.popular {
        transform: scale(1); /* Quitar el escalado que la hace sobresalir */
    }
    .price-card.popular:hover {
        transform: translateY(-5px);
    }
    
    /* Ajustes de texto en los planes para que quepan en 2 columnas */
    .price-card h3 { font-size: 18px; margin-bottom: 10px; }
    .price { font-size: 32px; margin-bottom: 15px; }
    .currency { font-size: 18px; }
    .period { font-size: 12px; }
    .features-list li { font-size: 12px; margin-bottom: 10px; gap: 6px; }
    .popular-badge { font-size: 10px; padding: 4px 12px; top: -10px; }
    .btn-outline, .btn-primary { padding: 10px; font-size: 14px; }
}

/* Ajuste extremo para celulares muy pequeños (ej. iPhone SE) */
@media (max-width: 400px) {
     /* Si la pantalla es minúscula, volvemos a 1 columna en precios y bento para evitar que el texto se rompa */
    .pricing-cards { flex-direction: column; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.span-2 { grid-column: span 1; }
}
