/* --- VARIABLES Y RESET --- */
:root {
    --bg-base: #090a0f;
    --bg-surface: #12141d;
    --bg-card: #1a1d27;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #2e364f;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); background-color: var(--bg-base); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

/* --- NAVEGACIÓN --- */
.navbar { background-color: rgba(9, 10, 15, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; position: relative; }
.logo { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.5px; z-index: 1001; }
.logo-icon { color: var(--primary); font-family: var(--font-mono); font-weight: normal; }
.logo-dot { color: var(--primary); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: var(--transition); }
.nav-links a:hover { color: var(--text-main); }

.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-main); width: 32px; height: 32px; cursor: pointer; z-index: 1001; }

/* --- BOTONES --- */
.btn-primary, .btn-primary-sm { background-color: var(--primary); color: white !important; text-decoration: none; border-radius: 6px; font-weight: 600; transition: var(--transition); display: inline-block; text-align: center; }
.btn-primary-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-primary { padding: 0.8rem 1.8rem; font-size: 1rem; }
.btn-primary:hover, .btn-primary-sm:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }

.btn-secondary { background-color: transparent; color: var(--text-main); border: 1px solid var(--border-color); padding: 0.8rem 1.8rem; border-radius: 6px; text-decoration: none; font-weight: 600; transition: var(--transition); text-align: center; }
.btn-secondary:hover { background-color: var(--bg-card); border-color: var(--text-muted); }

/* --- HERO SECTION --- */
.hero { max-width: 1200px; margin: 0 auto; padding: 6rem 2rem 4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.badge { display: inline-block; background-color: rgba(59, 130, 246, 0.1); color: var(--primary); padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem; border: 1px solid rgba(59, 130, 246, 0.2); }
.hero h1 { font-size: 3.2rem; line-height: 1.1; font-weight: 700; letter-spacing: -1px; margin-bottom: 1.5rem; }
.text-gradient { background: linear-gradient(to right, #60a5fa, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 2.5rem; max-width: 480px; }
.hero-actions { display: flex; gap: 1rem; }

/* Ventana de IDE */
.code-window { background-color: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); width: 100%; }
.window-header { background-color: var(--bg-card); padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-color); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot.red { background-color: #ef4444; } .dot.yellow { background-color: #f59e0b; } .dot.green { background-color: #10b981; }
.window-title { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.window-body { padding: 1.5rem; font-family: var(--font-mono); font-size: 0.9rem; color: #cbd5e1; overflow-x: auto; } /* overflow-x crucial para móviles */

/* --- SERVICIOS --- */
.services { max-width: 1200px; margin: 5rem auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 1rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { background-color: var(--bg-surface); border: 1px solid var(--border-color); padding: 2.5rem; border-radius: 12px; transition: var(--transition); }
.service-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }

.card-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.card-icon svg { width: 24px; height: 24px; }
.web-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; } .desktop-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; } .backend-icon { background: rgba(168, 85, 247, 0.1); color: #a855f7; }

.service-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.tech-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tech-tags span { background-color: var(--bg-card); border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

/* --- METODOLOGÍA --- */
.workflow { background-color: var(--bg-surface); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 6rem 2rem; margin: 4rem 0; }
.workflow-container { max-width: 800px; margin: 0 auto; text-align: center; }
.workflow-container h2 { font-size: 2.2rem; margin-bottom: 1.5rem; }
.workflow-container p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }
.feature-list { list-style: none; text-align: left; background-color: var(--bg-card); border: 1px solid var(--border-color); padding: 2rem; border-radius: 12px; }
.feature-list li { margin-bottom: 1rem; padding-left: 1.5rem; position: relative; color: var(--text-muted); }
.feature-list li::before { content: "→"; position: absolute; left: 0; color: var(--primary); font-family: var(--font-mono); }
.feature-list li:last-child { margin-bottom: 0; }
.feature-list strong { color: var(--text-main); }

/* --- CONTACTO Y AVISO --- */
.contact { max-width: 800px; margin: 6rem auto; padding: 0 2rem; text-align: center; }
.contact h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.contact p { color: var(--text-muted); font-size: 1.1rem; }

.exclusion-alert { display: flex; gap: 1rem; background-color: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.2); padding: 1.5rem; border-radius: 8px; text-align: left; margin-top: 3rem; align-items: flex-start; }
.alert-icon svg { width: 24px; height: 24px; color: #ef4444; flex-shrink: 0; }
.alert-text { font-size: 0.9rem; color: #fca5a5; }
.alert-text strong { color: #ef4444; }

/* --- FOOTER --- */
footer { text-align: center; padding: 3rem 2rem; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.9rem; margin-top: 4rem; }

/* --- ANIMACIONES DE SCROLL --- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* ========================================= */
/* --- MEDIA QUERIES (MAGIA RESPONSIVE) --- */
/* ========================================= */

@media (max-width: 850px) {
    /* Navbar Móvil */
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
        z-index: 999;
        pointer-events: none; /* Evita clics cuando está oculto */
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    /* Ajustes del Hero (Encabezado) */
    .hero {
        grid-template-columns: 1fr;
        padding: 4rem 1.5rem 2rem;
        gap: 3rem;
        text-align: center;
    }

    .hero h1 { font-size: 2.2rem; }
    .hero-subtitle { margin: 0 auto 2rem; font-size: 1rem; }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .btn-primary, .btn-secondary { width: 100%; }

    /* Ajustes Ventana IDE */
    .window-body { font-size: 0.75rem; padding: 1rem; }

    /* Ajustes Generales de Secciones */
    .services { margin: 4rem auto; padding: 0 1.5rem; }
    .section-header h2 { font-size: 1.8rem; }
    .section-header { margin-bottom: 2rem; }
    .service-card { padding: 1.5rem; }

    .workflow { padding: 4rem 1.5rem; margin: 3rem 0; }
    .workflow-container h2 { font-size: 1.8rem; }
    .feature-list { padding: 1.5rem; font-size: 0.95rem; }

    .contact { padding: 0 1.5rem; margin: 4rem auto; }
    .contact h2 { font-size: 2rem; }

    /* Ajuste de Alerta Móvil */
    .exclusion-alert {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }
}