/* ==========================================================================
   1. IMPORTACIÓN E INYECCIÓN DE TU FUENTE IBRAND (DESDE ASSETS)
   ========================================================================== */
@font-face {
    font-family: 'Ibrand';
    src: url('assets/fonts/Ibrand.woff2') format('woff2'),
         url('assets/fonts/Ibrand.woff') format('woff'),
         url('assets/fonts/Ibrand.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ibrand';
    src: url('assets/fonts/Ibrand.woff2') format('woff2'),
         url('assets/fonts/Ibrand.woff') format('woff'),
         url('assets/fonts/Ibrand.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. CONFIGURACIÓN DE COLORES DINÁMICOS (SISTEMA DE TEMAS DE COLOR)
   ========================================================================== */
:root {
    /* --- MODO CLARO (Por defecto) --- */
    --white-bg: #FAFAFB;
    --dark-blue: #0A1128;
    --section-bg-light: #FAFAFB;
    --card-bg: #FFFFFF;
    --primary-blue: #0066FF;
    --cyan-brand: #00D2FF;
    --text-main: #1F2421;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --badge-bg: #EEF2FF;
    
    /* Variables de Fuentes */
    --font-heading: 'Ibrand', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- MODO OSCURO ACTIVO (Controlado por theme.js) --- */
[data-theme="dark"] {
    --white-bg: #050B1A;          /* El fondo general cambia a marino ultra oscuro */
    --dark-blue: #FFFFFF;         /* Los títulos principales pasan a blanco puro */
    --section-bg-light: #070F24;  /* Secciones alternas en tono azul noche profundo */
    --card-bg: #0A1128;           /* Las tarjetas se oscurecen al color base de la app */
    --text-main: #ffffff;         /* Texto de lectura en gris muy claro */
    --text-muted: #9CA3AF;        /* Textos secundarios suavizados */
    --border-color: #1E293B;      /* Bordes sutiles oscuros */
    --badge-bg: #111827;          /* Etiquetas de fondo oscuro */
}

/* ==========================================================================
   3. ESTILOS BASE Y CONFIGURACIÓN ESTRUCTURAL
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0; padding: 0;
}

body {
    background-color: var(--white-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   4. BARRA DE NAVEGACIÓN (NAVBAR)
   ========================================================================== */
.main-navbar {
    background-color: var(--white-bg);
    opacity: 0.95;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 2000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}

.logo-box { display: flex; align-items: center; gap: 8px; }
.nav-logo { height: 28px; width: auto; }
.logo-text { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--dark-blue); }
.blue-text { color: var(--primary-blue); }

.nav-menu { display: flex; gap: 25px; }
.nav-menu a { text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-menu a:hover { color: var(--primary-blue); }

.nav-auth-buttons { display: flex; align-items: center; gap: 15px; }
.btn-link { text-decoration: none; color: var(--text-main); font-size: 0.9rem; font-weight: 500; }

.btn-nav-primary {
    text-decoration: none; background-color: var(--primary-blue); color: #FFF;
    padding: 10px 18px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; transition: opacity 0.2s;
}
.btn-nav-primary:hover { opacity: 0.9; }

/* Botón Interruptor del Modo Oscuro */
.btn-theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s;
}
.btn-theme-toggle:hover {
    background-color: var(--badge-bg);
    border-color: var(--primary-blue);
}

/* ==========================================================================
   5. SECCIÓN PRINCIPAL (HERO)
   ========================================================================== */
.hero-section { padding: 80px 20px; max-width: 1200px; margin: 0 auto; }
.hero-container { display: flex; gap: 40px; align-items: center; }
.hero-text-side { flex: 1; }

.badge-tag {
    display: inline-block; background-color: var(--badge-bg); color: var(--primary-blue);
    padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 20px;
}

.hero-text-side h1 {
    font-family: var(--font-heading); font-size: 3.5rem; font-weight: 700; line-height: 1.1;
    color: var(--dark-blue); letter-spacing: -1px; margin-bottom: 20px;
}
.blue-title { color: var(--primary-blue); }
.hero-subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 35px; max-width: 500px; }

.hero-actions { display: flex; gap: 15px; margin-bottom: 40px; }
.btn-action-primary {
    text-decoration: none; background-color: var(--primary-blue); color: white;
    padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 1rem;
}
.btn-action-secondary {
    text-decoration: none; background-color: transparent; color: var(--text-main);
    padding: 14px 28px; border-radius: 8px; font-weight: 600; border: 1px solid var(--border-color);
}

.hero-badges-row { display: flex; gap: 25px; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border-color); padding-top: 20px; }

/* Mockup Simulado e Interactivo de la Galería */
.hero-mockup-side { flex: 1; display: flex; justify-content: center; position: relative; }
.window-mockup {
    background-color: #FFF; border: 1px solid var(--border-color); border-radius: 12px;
    width: 100%; max-width: 520px; box-shadow: 0 40px 80px rgba(0,0,0,0.08); overflow: hidden;
}

.window-header {
    background-color: #F9FAFB; padding: 12px 20px; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center; position: relative;
}
.window-header .dots { display: flex; gap: 6px; }
.window-header .dots span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.window-header .dots .r { background-color: #FF5F56; }
.window-header .dots .y { background-color: #FFBD2E; }
.window-header .dots .g { background-color: #27C93F; }
.window-title { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.counter-bubble { background-color: #0A1128; color: white; padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

.window-body { padding: 20px; }
.client-info-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.client-info-bar h4 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; }
.client-info-bar p { font-size: 0.8rem; color: var(--text-muted); }

.progress-box { display: flex; align-items: center; gap: 10px; }
.progress-bar { width: 80px; height: 6px; background-color: #E5E7EB; border-radius: 3px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background-color: var(--primary-blue); }
.progress-text { font-size: 0.8rem; font-weight: 600; color: var(--primary-blue); }

.mockup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-card { aspect-ratio: 1; border-radius: 6px; position: relative; padding: 8px; display: flex; justify-content: space-between; align-items: flex-end; }
.mock-card .chk { background-color: var(--primary-blue); color: white; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; position: absolute; top: 8px; left: 8px; }
.mock-card .hrt { background-color: white; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* Gradientes estéticos de la cuadrícula de fotos */
.c1 { background: linear-gradient(135deg, #6366F1, #4F46E5); }
.c2 { background: linear-gradient(135deg, #EC4899, #F43F5E); }
.c3 { background: linear-gradient(135deg, #38BDF8, #0EA5E9); }
.c4 { background: linear-gradient(135deg, #34D399, #059669); }
.c5 { background: linear-gradient(135deg, #FBBF24, #D97706); }
.c6 { background: linear-gradient(135deg, #A78BFA, #7C3AED); }

/* ==========================================================================
   6. SUB-BARRA DE TECNOLOGÍA (STACK BAR)
   ========================================================================== */
.tech-stack-bar { border-top: 1px solid var(--border-color); text-align: center; padding: 40px 20px; background-color: var(--section-bg-light) !important; transition: background-color 0.3s; }
.tech-stack-bar p { font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 15px; }
.tech-logos { font-size: 1.1rem; font-weight: 500; color: #9CA3AF; }
.tech-logos span { color: var(--text-main); font-weight: 600; }

/* ==========================================================================
   7. SECCIÓN DE PASOS (CÓMO FUNCIONA)
   ========================================================================== */
.steps-section { padding: 100px 20px; max-width: 1200px; margin: 0 auto; }
.section-title-box { margin-bottom: 60px; max-width: 600px; }
.badge-tag-blue { color: var(--primary-blue); font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; display: block; margin-bottom: 15px; }
.steps-section h2 { font-family: var(--font-heading); font-size: 3rem; font-weight: 700; line-height: 1.1; letter-spacing: -1px; margin-bottom: 15px; }
.section-title-box p { color: var(--text-muted); font-size: 1.1rem; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step-card { border: 1px solid var(--border-color); border-radius: 16px; padding: 40px 30px; background-color: var(--card-bg) !important; position: relative; transition: background-color 0.3s, border-color 0.3s; }
.step-number { font-family: var(--font-heading); font-size: 4rem; font-weight: 700; color: var(--badge-bg) !important; position: absolute; top: 15px; right: 25px; line-height: 1; transition: color 0.3s; }
.step-icon { font-size: 1.8rem; margin-bottom: 25px; background: var(--badge-bg); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 10px; transition: background-color 0.3s; }
.step-card h3 { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; color: var(--dark-blue); }
.step-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================================================
   8. SECCIÓN AZUL OSCURO (LO QUE NOS DIFERENCIA)
   ========================================================================== */
.dark-blue-section { background-color: #0A1128; padding: 100px 20px; color: white; }
.dark-blue-container { max-width: 1200px; margin: 0 auto; display: flex; gap: 50px; align-items: center; }
.dark-text-side { flex: 1; }
.badge-tag-light { color: var(--cyan-brand); font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; display: block; margin-bottom: 15px; }
.dark-text-side h2 { font-family: var(--font-heading); font-size: 3.2rem; font-weight: 700; line-height: 1.1; letter-spacing: -1px; margin-bottom: 20px; }
.cyan-text { color: var(--cyan-brand); }
.dark-text-side p { color: #94A3B8; font-size: 1.1rem; margin-bottom: 30px; }

.features-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.features-list li { color: #E2E8F0; font-size: 0.95rem; font-weight: 500; }

.dark-mockup-side { flex: 1; display: flex; justify-content: center; }
.window-mockup.dark-theme { background-color: #0F172A; border-color: #1E293B; box-shadow: 0 40px 80px rgba(0,0,0,0.5); }
.window-mockup.dark-theme .window-header { background-color: #1E293B; border-bottom-color: #334155; }
.counter-bubble.cyan { background-color: #172554; color: var(--cyan-brand); border: 1px solid rgba(0,210,255,0.2); }
.mockup-grid.items-3 { grid-template-columns: repeat(3, 1fr); padding-bottom: 20px; border-bottom: 1px solid #1E293B; }
.mock-card.liked .chk-v { color: var(--cyan-brand); font-weight: 700; position: absolute; top: 8px; left: 8px; }
.mock-card.liked .hrt { background-color: var(--cyan-brand); color: #0A1128; }

.mock-footer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; font-size: 0.85rem; color: #94A3B8; }
.btn-cyan-demo { background-color: var(--cyan-brand); color: #0A1128; border: none; padding: 8px 14px; border-radius: 6px; font-weight: 600; font-size: 0.8rem; cursor: pointer; }

/* ==========================================================================
   9. TABLA DE PRECIOS (PRICING)
   ========================================================================== */
.pricing-section { padding: 100px 20px; max-width: 1200px; margin: 0 auto; }
.section-title-box.center { text-align: center; margin: 0 auto 60px auto; }
.pricing-section h2 { font-family: var(--font-heading); font-size: 3rem; font-weight: 700; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.price-card { border: 1px solid var(--border-color); border-radius: 16px; padding: 30px 24px; background-color: var(--card-bg) !important; display: flex; flex-direction: column; position: relative; transition: background-color 0.3s, border-color 0.3s; }
.price-card h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.card-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 25px; min-height: 40px; }
.price-value { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; color: var(--dark-blue); margin-bottom: 25px; }
.per-month { font-family: var(--font-body); font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }

.card-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 35px; flex: 1; }
.card-features li { font-size: 0.85rem; color: var(--text-main); }
.card-features li.disabled { color: #9CA3AF; text-decoration: line-through; opacity: 0.6; }

.btn-price-action { text-decoration: none; text-align: center; border: 1px solid var(--border-color); padding: 12px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; color: var(--text-main); transition: background-color 0.2s, border-color 0.2s; }
.btn-price-action:hover { background-color: var(--badge-bg); }

.price-card.popular { border: 2px solid var(--primary-blue); box-shadow: 0 20px 40px rgba(0,102,255,0.05); }
.popular-badge { background-color: var(--primary-blue); color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; position: absolute; top: -12px; left: 24px; }
.btn-price-action.btn-blue { background-color: var(--primary-blue); color: white; border: none; }
.btn-price-action.btn-blue:hover { opacity: 0.9; }

/* ==========================================================================
   10. PREGUNTAS FRECUENTES (FAQ)
   ========================================================================== */
.faq-section { padding: 100px 20px; max-width: 1000px; margin: 0 auto; }
.faq-section h2 { font-family: var(--font-heading); font-size: 3rem; font-weight: 700; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.faq-item { border: 1px solid var(--border-color); padding: 25px; border-radius: 12px; background-color: var(--card-bg) !important; transition: background-color 0.3s; }
.faq-item h4 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin-bottom: 10px; color: var(--dark-blue); }
.faq-item p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* ==========================================================================
   11. SECCIÓN DE CONVERSIÓN INFERIOR (CTA BOTTOM)
   ========================================================================== */
.cta-bottom-section { background-color: #030814; padding: 100px 20px; text-align: center; color: white; }
.cta-content h2 { font-family: var(--font-heading); font-size: 3.5rem; font-weight: 700; line-height: 1.1; letter-spacing: -1px; margin-bottom: 20px; }
.cta-content p { color: #94A3B8; font-size: 1.1rem; margin-bottom: 35px; }
.cta-buttons { display: flex; justify-content: center; gap: 15px; }
.btn-cta-white { text-decoration: none; background-color: white; color: var(--dark-blue); padding: 14px 28px; border-radius: 8px; font-weight: 600; }
.btn-cta-outline { text-decoration: none; border: 1px solid #334155; color: white; padding: 14px 28px; border-radius: 8px; font-weight: 600; }

/* ==========================================================================
   12. PIE DE PÁGINA (FOOTER)
   ========================================================================== */
.main-footer { background-color: #000000; color: white; padding: 60px 20px 30px 20px; font-size: 0.85rem; }
.footer-top { max-width: 1200px; margin: 0 auto 50px auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-brand { max-width: 300px; }
.footer-logo-text { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; display: block; margin-bottom: 15px; }
.footer-brand p { color: #94A3B8; line-height: 1.5; }
.footer-links-column { display: flex; flex-direction: column; gap: 12px; }
.footer-links-column h4 { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: #ffffff; margin-bottom: 8px; }
.footer-links-column a { color: #94A3B8; text-decoration: none; }
.footer-links-column a:hover { color: white; }

.footer-bottom { max-width: 1200px; margin: 0 auto; border-top: 1px solid #1E293B; padding-top: 30px; display: flex; justify-content: space-between; color: #64748B; }
.footer-socials { display: flex; gap: 20px; }
.footer-socials a { color: #64748B; text-decoration: none; }

/* ==========================================================================
   13. DISPOSITIVOS MÓVILES (MEDIA QUERIES RESPONSIVE)
   ========================================================================== */
@media (max-width: 968px) {
    /* Ajustes generales del Navbar Móvil */
    .nav-container {
        padding: 12px 15px;
        flex-wrap: wrap;
    }
    .nav-menu { display: none; } /* Ocultar menú largo en celulares */
    
    .nav-auth-buttons {
        gap: 16px; /* Separación fija y sana entre elementos */
        display: flex;
        align-items: center;
    }
    .btn-link {
        white-space: nowrap; /* Bloquea la ruptura incómoda de líneas */
        font-size: 0.85rem;
    }
    .btn-nav-primary {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    /* Ajustes de secciones apiladas */
    .hero-container, .dark-blue-container { flex-direction: column; text-align: center; }
    .hero-text-side h1 { font-size: 2.4rem; }
    .hero-subtitle { margin: 0 auto 30px auto; }
    .hero-actions, .cta-buttons { justify-content: center; }
    .hero-badges-row { justify-content: center; }
    
    .steps-grid, .pricing-grid, .faq-grid { grid-template-columns: 1fr; gap: 25px; }
    
    .dark-text-side h2 { font-size: 2.2rem; }
    .features-list { align-items: center; }
    .cta-content h2 { font-size: 2.2rem; }
}

/* Seguro extra anti-colapso para pantallas mini (menores a 400px) */
@media (max-width: 400px) {
    .nav-container {
        flex-direction: column;
        gap: 12px;
    }
    .nav-auth-buttons {
        width: 100%;
        justify-content: space-between;
    }
}