/* =========================================
   VARIABLES Y SISTEMA DE DISEÑO
   ========================================= */
:root {
    --bg-color: #05070A;
    --bg-secondary: #0A0F1A;
    --text-primary: #FFFFFF;
    --text-secondary: #A0ABC0;
    
    /* Acentos */
    --neon-purple: #8A2BE2;
    --electric-cyan: #00F0FF;
    --whatsapp-green: #25D366;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Outfit', sans-serif;
    --font-main: 'Inter', 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;
}

h1, h2, h3, h4, h5 { font-family: var(--font-heading); }

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

@keyframes pulse-bg {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0.6; }
}

/* =========================================
   COMPONENTES REUTILIZABLES
   ========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--electric-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* Fallback for modern browsers */
}

/* Layout helpers */
.relative { position: relative; }
.dark-bg-alt { background-color: var(--bg-secondary); }
.bg-dark-layer { background: rgba(0,0,0,0.3); }

/* Glass Cards */
.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;
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
}
.glass-card-no-padding {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Tags & Badges */
.section-tag {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}
.error-tag { background: rgba(255, 50, 50, 0.1); color: #ff4d4d; border: 1px solid rgba(255, 50, 50, 0.2); }
.success-tag { background: rgba(37, 211, 102, 0.1); color: var(--whatsapp-green); border: 1px solid rgba(37, 211, 102, 0.2); }
.badge-success {
    font-size: 0.8rem; background: rgba(138, 43, 226, 0.1); color: var(--neon-purple); 
    padding: 4px 10px; border-radius: 12px; border: 1px solid rgba(138, 43, 226, 0.2);
    font-weight: 600;
}

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

.btn-primary {
    background: linear-gradient(90deg, var(--electric-cyan), var(--neon-purple));
    color: #000;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
    transform: scale(1.05);
    color: #fff;
}
.btn-full { width: 100%; margin-top: 10px; }

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

/* 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.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* =========================================
   SECCIONES ESPECÍFICAS
   ========================================= */

/* Nav */
nav {
    position: fixed; top: 0; width: 100%; padding: 16px 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-family: var(--font-heading); font-weight: 800; color: var(--text-primary); text-decoration: none; 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: 500; transition: color 0.3s; font-size: 0.95rem; }
.nav-links a:hover { color: var(--electric-cyan); }

/* Hero Section */
.hero {
    padding-top: 150px; padding-bottom: 80px;
    min-height: 100vh;
    display: flex; align-items: center; position: relative;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-family: var(--font-heading);
}
.hero-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
}
.hero h1 {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    font-weight: 800; line-height: 1.15; margin-bottom: 24px; letter-spacing: -1px;
}
.hero p {
    font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 40px;
}

/* Kanban Dashboard Mockup */
.kanban-mockup {
    overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(138,43,226,0.15);
    display: flex; flex-direction: column; height: 420px;
    background: #0b141a;
}
.kanban-header {
    background: #172129; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.kanban-body {
    flex: 1; padding: 20px; background-color: #0d1b2a;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px;
}
.kanban-column {
    background: rgba(255,255,255,0.02); border-radius: 12px; padding: 12px;
    border: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; gap: 10px;
}
.kanban-col-title {
    font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase;
    padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 5px; font-family: var(--font-heading);
}
.k-card {
    background: #1e2a33; border-radius: 8px; padding: 14px;
    border: 1px solid rgba(255,255,255,0.05); position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.k-card-title { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 2px;}
.k-card-desc { font-size: 0.75rem; color: var(--text-secondary); }
.cyan-text { color: var(--electric-cyan); }
.success-text { color: var(--whatsapp-green); font-weight: 600; }
.border-success { border-color: var(--whatsapp-green); }

.k-card-tag {
    font-size: 0.65rem; padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; font-weight: 600; text-transform: uppercase;
}
.tag-fb { background: rgba(24, 119, 242, 0.2); color: #60a5fa; }
.tag-angi { background: rgba(255, 102, 0, 0.15); color: #ff8c42; }
.tag-success { background: rgba(37,211,102,0.2); color: var(--whatsapp-green); }

/* Animated Kanban Card */
.animated-card {
    animation: moveKanban 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 10;
}
.follow-up-badge {
    position: absolute; top: -8px; right: -8px; background: var(--neon-purple); color: #fff;
    font-size: 0.6rem; padding: 3px 6px; border-radius: 10px; opacity: 0;
    animation: showBadge 6s infinite; font-weight: bold; display: flex; align-items: center; gap: 4px;
}

@keyframes moveKanban {
    0%, 15% { transform: translate(0, 0); border-color: rgba(255,255,255,0.05); }
    30%, 60% { transform: translate(calc(100% + 15px), 0); border-color: var(--neon-purple); box-shadow: 0 0 15px rgba(138,43,226,0.3); }
    75%, 100% { transform: translate(calc(200% + 30px), 0); border-color: var(--whatsapp-green); box-shadow: 0 0 15px rgba(37,211,102,0.3); }
}
@keyframes showBadge {
    0%, 25% { opacity: 0; transform: scale(0.8); }
    30%, 70% { opacity: 1; transform: scale(1); }
    75%, 100% { opacity: 0; transform: scale(0.8); }
}

/* Sections Global */
.section-padding { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 70px; }
.section-header h2 { font-size: clamp(2rem, 3vw, 2.7rem); margin-bottom: 20px; line-height: 1.2; font-weight: 800;}
.section-header p { color: var(--text-secondary); font-size: 1.1rem; max-width: 700px; margin: 0 auto; }
.border-y { border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }

/* Grid 3 Cols */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.icon-box {
    width: 60px; height: 60px; border-radius: 16px; margin-bottom: 24px;
    display: flex; align-items: center; justify-content: center;
}
.icon-box.cyan { background: rgba(0, 240, 255, 0.1); color: var(--electric-cyan); }
.icon-box.purple { background: rgba(138, 43, 226, 0.1); color: var(--neon-purple); }
.icon-box.red { background: rgba(255, 50, 50, 0.1); color: #ff4d4d; }

.feature-card h3 { font-size: 1.35rem; margin-bottom: 16px; font-weight: 700; }
.feature-card p { color: var(--text-secondary); font-size: 1rem; }

/* Transition Alert */
.transition-alert {
    text-align: center; margin-top: 60px;
}
.transition-alert p {
    font-size: 1.15rem; color: var(--electric-cyan); font-weight: 600; padding: 25px; 
    background: rgba(0,240,255,0.05); border-radius: 16px; display: inline-block; 
    border: 1px solid rgba(0,240,255,0.2); max-width: 900px;
}

/* Solución Highlight */
.solution-box {
    text-align: center; max-width: 900px; margin: 0 auto;
    position: relative; overflow: hidden; padding: 60px 40px;
}
.solution-box::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,240,255,0.08) 0%, transparent 60%); z-index: -1;
}
.inner-highlight {
    background: rgba(0,0,0,0.5); padding: 35px; border-radius: 20px; border: 1px solid var(--glass-border); text-align: left;
}
.inner-highlight h4 {
    font-size: 1.3rem; margin-bottom: 12px;
}

/* Timeline (Caso de Uso) */
.timeline { display: flex; flex-direction: column; gap: 40px; position: relative; max-width: 900px; margin: 0 auto; }
.timeline::before {
    content: ''; position: absolute; left: 50%; transform: translateX(-50%);
    width: 2px; height: 100%; background: linear-gradient(to bottom, var(--electric-cyan), var(--neon-purple)); opacity: 0.3;
}
.timeline-item { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-content { width: 45%; }
.empty-content { background: transparent; border: none; }
.timeline-dot {
    width: 28px; height: 28px; background: var(--bg-color); border: 4px solid var(--electric-cyan);
    border-radius: 50%; z-index: 1; box-shadow: 0 0 15px var(--electric-cyan);
    display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.85rem; color: white;
}
.timeline-title { margin-bottom: 12px; font-size: 1.4rem; font-weight: 800;}
.border-accent { border-color: var(--electric-cyan); box-shadow: 0 0 20px rgba(0,240,255,0.1); }

/* CTA Section */
.cta-section {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(138,43,226,0.1) 100%);
    text-align: center; border-top: 1px solid var(--glass-border); overflow: hidden;
}
.orb-3 {
    width: 600px; height: 600px; background: rgba(0, 240, 255, 0.1); 
    top: 50%; left: 50%; transform: translate(-50%, -50%); position: absolute; 
    filter: blur(120px); z-index: -1; border-radius: 50%; pointer-events: none;
}

/* Footer */
footer { border-top: 1px solid var(--glass-border); padding: 30px 0; color: var(--text-secondary); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.logo-footer { font-size: 1.2rem; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); 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: 480px;
    position: relative; transform: translateY(20px); transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8); text-align: left;
}
.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; transition: color 0.3s;
}
.close-modal:hover { color: var(--text-primary); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;}
.form-group input {
    width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border); border-radius: 12px; color: #fff;
    font-family: var(--font-main); outline: none; transition: all 0.3s; font-size: 1rem;
}
.form-group input:focus { border-color: var(--electric-cyan); background: rgba(255,255,255,0.06); box-shadow: 0 0 10px rgba(0,240,255,0.1); }

/* Responsive */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero p { margin: 0 auto 40px auto; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .kanban-mockup { max-width: 600px; margin: 0 auto; height: 450px; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .timeline::before { left: 20px; }
    .timeline-item { flex-direction: column !important; align-items: flex-start; padding-left: 50px; position: relative; }
    .timeline-content { width: 100%; margin-bottom: 30px; }
    .timeline-dot { position: absolute; left: 6px; top: 0; }
    .btn { width: 100%; }
    .kanban-mockup { height: 500px; }
    .kanban-body { grid-template-columns: 1fr; overflow-y: hidden; }
    .kanban-column:not(:first-child) { display: none; }
}
