/* --- Configuración General y Variables --- */
:root {
    --bg-main: #0a0a12;
    --bg-secondary: #13131f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-cyan: #00f2ff;
    --accent-purple: #bd00ff;
    --accent-blue: #4353ff;
    --nav-height: 80px;
    /* Gradiente principal */
    --gradient-main: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Utilidades Modernas --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Efecto Vidrio Esmerilado (Glassmorphism) */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* --- Botones --- */
.btn {
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
}

.btn-glow:hover {
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* --- Navbar --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

/* Clase que se añade con JS al hacer scroll */
#navbar.scrolled {
    background: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 800;
}

.logo-gl { color: var(--text-primary); }
.logo-mind { color: var(--accent-purple); }

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a:not(.btn) {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn):hover {
    color: var(--accent-cyan);
}

.menu-toggle { display: none; color: white; font-size: 1.5rem; }

/* --- Canvas & Hero --- */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Detrás de todo */
    opacity: 0.6;
}

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.badge-tech {
    display: inline-block;
    background: rgba(0, 242, 255, 0.1);
    color: var(--accent-cyan);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 242, 255, 0.3);
}

#hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 20px;
}

/* --- Servicios Section --- */
section { padding: 100px 0; }

.section-header {
    margin-bottom: 60px;
}

.section-header h2 { font-size: 3rem; margin-bottom: 15px; }
.text-center { text-align: center; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
}

/* Tarjeta central destacada */
.service-card.featured {
    background: rgba(189, 0, 255, 0.05);
    border-color: rgba(189, 0, 255, 0.3);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 25px;
    display: inline-block;
}
.icon-cyan { color: var(--accent-cyan); }
.icon-purple { color: var(--accent-purple); }
.icon-blue { color: var(--accent-blue); }

.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.service-card p { color: var(--text-secondary); margin-bottom: 25px; }

.tech-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tags li {
    font-size: 0.8rem;
    background: rgba(255,255,255,0.05);
    padding: 5px 10px;
    border-radius: 5px;
    color: var(--text-secondary);
    font-family: monospace;
}

/* --- Tech Stack Marquee --- */
#tech-stack {
    padding: 40px 0;
    background: var(--bg-secondary);
    overflow: hidden;
}
.tech-marquee {
    white-space: nowrap;
    overflow: hidden;
}
.tech-track {
    display: inline-block;
    animation: marquee 20s linear infinite;
}
.tech-track span {
    margin: 0 30px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}
.tech-track i { margin-right: 10px; color: var(--accent-cyan); }

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- Contacto & Footer --- */
.contact-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px;
    background: linear-gradient(to right, rgba(255,255,255,0.03), rgba(0, 242, 255, 0.05));
}

.contact-text h2 { font-size: 2.5rem; margin-bottom: 10px; }
.small-print { margin-top: 10px; font-size: 0.9rem; color: var(--text-secondary); text-align: center;}

footer {
    background: var(--bg-secondary);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
}
.footer-logo { font-size: 1.5rem; font-weight: bold; margin-bottom: 10px; color: white;}

/* --- Responsive Básico --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; cursor: pointer; transition: all 0.3s ease; }

    .menu-toggle.active {
        color: var(--accent-cyan);
        text-shadow: 0 0 15px rgba(0, 242, 255, 0.8);
    }

    .nav-links {
        display: flex;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 10, 18, 0.95);
        backdrop-filter: blur(15px);
        padding: 30px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Efecto de aparición escalonada para enlaces */
    .nav-links a {
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active a:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active a:nth-child(5) { transition-delay: 0.5s; }

    #hero h1 { font-size: 2.8rem; }
    .cta-group { flex-direction: column; }
    .contact-container { flex-direction: column; text-align: center; gap: 30px; padding: 40px;}
}

/* --- Sugerencia: Sección El Método (Timeline Neural) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Línea central brillante */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-cyan), var(--accent-purple), transparent);
    transform: translateX(-50%);
}

.process-step {
    position: relative;
    margin-bottom: 60px;
    width: 50%;
    padding: 0 40px;
}

.process-step:nth-child(odd) { left: 0; text-align: right; }
.process-step:nth-child(even) { left: 50%; text-align: left; }

/* Nodos (Puntos) */
.process-step::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-main);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 15px var(--accent-cyan);
}

.process-step:nth-child(odd)::after { right: -10px; }
.process-step:nth-child(even)::after { left: -10px; }

/* Responsive para Timeline */
@media (max-width: 768px) {
    .timeline::before { left: 20px; }
    .process-step { width: 100%; padding-left: 50px; padding-right: 0; text-align: left; }
    .process-step:nth-child(even) { left: 0; }
    .process-step::after { left: 10px !important; }
}

/* --- Funcionalidad: Modal de Agendar --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-content {
    background: rgba(19, 19, 31, 0.95);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 242, 255, 0.3);
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.15);
    max-width: 450px;
    width: 90%;
    transform: scale(0.6) translateY(50px);
    opacity: 0;
    filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.modal-overlay.open .modal-content { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }

/* --- Estilos del Formulario en Modal --- */
.modal-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-input:focus { border-color: var(--accent-cyan); }