/* =========================================
   VARIABLES Y SISTEMA DE DISEÑO - Módulo 2
   ========================================= */
:root {
    /* Paleta de Colores Base */
    --bg-color: #05070A;
    --bg-secondary: #0A121A;
    --text-primary: #FFFFFF;
    --text-secondary: #A0ABC0;
    
    /* Acentos - Estilo IA & WhatsApp Focus */
    --neon-green: #00E676; /* WhatsApp style but neon */
    --emerald: #10B981;
    --electric-cyan: #00F0FF;
    --accent-glow: rgba(0, 230, 118, 0.4); /* Green glow */
    --purple-glow: rgba(138, 43, 226, 0.2);
    
    /* Estado / Utilidades */
    --warning-color: #FFB020;
    --danger-color: #FF3B30;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Tipografía */
    --font-main: 'Outfit', sans-serif;
}

/* =========================================
   RESET Y ESTILOS BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Fondo Animado (Orbes de luz) */
.ambient-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: pulse 8s infinite alternate;
}
.light-1 {
    top: -10%; left: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(0,230,118,0.15) 0%, rgba(0,0,0,0) 70%);
}
.light-2 {
    top: 40%; right: -20%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(0,240,255,0.12) 0%, rgba(0,0,0,0) 70%);
    animation-delay: 2s;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.2); opacity: 0.7; }
}

/* =========================================
   UTILIDADES
   ========================================= */
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.font-bold { font-weight: 800; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--neon-green), var(--electric-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-purple {
    background: linear-gradient(90deg, var(--electric-cyan), #8A2BE2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover, .hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 230, 118, 0.1);
    border-color: rgba(0, 230, 118, 0.3);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--neon-green), var(--emerald));
    color: #000;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.6);
    transform: scale(1.05);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--neon-green);
}

.btn-secondary:hover {
    background: rgba(0, 230, 118, 0.1);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Animaciones Scroll */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* =========================================
   Navegación
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-links {
    display: flex;
    gap: 32px;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: var(--neon-green);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}
.hero .badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.4);
    border-radius: 20px;
    color: var(--neon-green);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}
.hero h1 {
    font-size: 4.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}
.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 48px auto;
}
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Chat Mockup en Hero */
.chat-mockup {
    margin-top: 80px;
    border-radius: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 50px rgba(0, 230, 118, 0.15);
    text-align: left;
}
.chat-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 15px;
}
.chat-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--neon-green);
    display: flex; justify-content: center; align-items: center; color: #000;
}
.chat-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 350px;
    overflow-y: hidden;
    position: relative;
}
.message {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    opacity: 0;
    animation: fadeInMessage 0.5s forwards;
}
@keyframes fadeInMessage {
    to { opacity: 1; transform: translateY(0); }
    from { opacity: 0; transform: translateY(10px); }
}
.msg-client {
    background: rgba(255, 255, 255, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    animation-delay: 0.5s;
}
.msg-bot {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(0, 230, 118, 0.3);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.msg-bot-1 { animation-delay: 2s; }
.msg-bot-2 { animation-delay: 4.5s; }
.typing-indicator {
    padding: 10px 15px;
    background: rgba(0, 230, 118, 0.1);
    align-self: flex-end;
    border-radius: 20px;
    display: flex;
    gap: 5px;
    opacity: 0;
    animation: showTyping 2s forwards;
    animation-delay: 1s;
}
.typing-indicator.second {
    animation-delay: 3s;
}
.dot {
    width: 6px; height: 6px; background: var(--neon-green); border-radius: 50%;
    animation: typingBounce 1s infinite alternate;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce { to { transform: translateY(-3px); } from { transform: translateY(3px); } }
@keyframes showTyping { 0% { opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; display: none;} }

/* =========================================
   Secciones Generales
   ========================================= */
.section-padding { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 3rem; margin-bottom: 16px; line-height: 1.2; }
.section-header p { color: var(--text-secondary); font-size: 1.15rem; max-width: 650px; margin: 0 auto; }

/* Grid Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.icon-box {
    width: 64px; height: 64px; border-radius: 16px;
    background: rgba(0, 230, 118, 0.1); display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px; color: var(--neon-green);
}
.icon-box.cyan { background: rgba(0, 240, 255, 0.1); color: var(--electric-cyan); }
.icon-box.danger { background: rgba(255, 59, 48, 0.1); color: var(--danger-color); }
.icon-box.warning { background: rgba(255, 176, 32, 0.1); color: var(--warning-color); }
.feature-card h3 { font-size: 1.4rem; margin-bottom: 16px; }
.feature-card p { color: var(--text-secondary); }

/* Caso de Uso - Two columns */
.use-case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.step-list { display: flex; flex-direction: column; gap: 30px; }
.step-item { display: flex; gap: 20px; }
.step-number {
    width: 40px; height: 40px; flex-shrink: 0;
    background: rgba(0, 230, 118, 0.1); border: 2px solid var(--neon-green);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: var(--neon-green); font-size: 1.2rem;
}
.step-content h4 { font-size: 1.3rem; margin-bottom: 8px; color: #fff; }
.step-content p { color: var(--text-secondary); }

/* CTA Section */
.cta-section {
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(0, 230, 118, 0.1) 100%);
    text-align: center; position: relative; overflow: hidden; border-top: 1px solid var(--glass-border);
}

/* Footer */
footer { border-top: 1px solid var(--glass-border); padding: 40px 0; text-align: center; color: var(--text-secondary); }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); z-index: 1000;
    display: flex; align-items: center; justify-content: center; opacity: 0;
    pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
    background: var(--bg-secondary); border: 1px solid var(--glass-border); padding: 40px;
    border-radius: 24px; width: 90%; max-width: 500px; position: relative;
    transform: translateY(20px); transition: transform 0.3s ease; box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-modal {
    position: absolute; top: 20px; right: 20px; background: none; border: none;
    color: var(--text-secondary); cursor: pointer; padding: 5px; display: flex;
}
.close-modal:hover { color: var(--text-primary); }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9rem;}
.form-group input {
    width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border); border-radius: 8px; color: #fff;
    font-family: var(--font-main); outline: none; transition: border-color 0.3s;
}
.form-group input:focus { border-color: var(--neon-green); }

@keyframes spin { 100% { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Responsive */
@media (max-width: 992px) {
    .use-case-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3.5rem; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1.1rem; }
    .hero-buttons { flex-direction: column; }
    .grid-3 { grid-template-columns: 1fr; }
}
