/* ============================================
   INNOVA Y CREE — SISTEMA DE DISENO UNIFICADO
   Compartido por Hub + 6 Business Units
   ============================================ */

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* === BRAND PALETTE === */
:root {
    /* Base */
    --ic-dark: #06080f;
    --ic-surface: #0d1117;
    --ic-surface-2: #161b22;
    --ic-surface-3: #1c2333;
    --ic-border: rgba(255,255,255,0.06);
    --ic-border-hover: rgba(255,255,255,0.12);
    --ic-text: #e2e8f0;
    --ic-text-muted: #8b949e;
    --ic-text-dim: #484f58;

    /* Brand colors */
    --ic-blue: #2d7aff;
    --ic-blue-rgb: 45,122,255;
    --ic-cyan: #06d6a0;
    --ic-cyan-rgb: 6,214,160;
    --ic-violet: #7c5cfc;
    --ic-violet-rgb: 124,92,252;
    --ic-amber: #f59e0b;
    --ic-amber-rgb: 245,158,11;
    --ic-red: #ef4444;
    --ic-red-rgb: 239,68,68;

    /* BU accent colors (override per page via .bu-* class on body) */
    --bu-accent: var(--ic-cyan);
    --bu-accent-rgb: var(--ic-cyan-rgb);
    --bu-accent-light: #34d399;
    --bu-accent-glow: rgba(6,214,160,0.15);

    /* Fonts */
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* BU color themes */
.bu-datos { --bu-accent: #10b981; --bu-accent-rgb: 16,185,129; --bu-accent-light: #34d399; --bu-accent-glow: rgba(16,185,129,0.15); }
.bu-prospeccion { --bu-accent: #3b82f6; --bu-accent-rgb: 59,130,246; --bu-accent-light: #60a5fa; --bu-accent-glow: rgba(59,130,246,0.15); }
.bu-inteligencia { --bu-accent: #7c5cfc; --bu-accent-rgb: 124,92,252; --bu-accent-light: #a78bfa; --bu-accent-glow: rgba(124,92,252,0.15); }
.bu-presencia { --bu-accent: #10b981; --bu-accent-rgb: 16,185,129; --bu-accent-light: #34d399; --bu-accent-glow: rgba(16,185,129,0.15); }
.bu-agencias { --bu-accent: #f59e0b; --bu-accent-rgb: 245,158,11; --bu-accent-light: #fbbf24; --bu-accent-glow: rgba(245,158,11,0.15); }
.bu-global { --bu-accent: #ef4444; --bu-accent-rgb: 239,68,68; --bu-accent-light: #f87171; --bu-accent-glow: rgba(239,68,68,0.15); }

/* === BASE === */
body {
    font-family: var(--font-body);
    background: var(--ic-dark);
    color: var(--ic-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }

/* === HERO MESH === */
.hero-mesh {
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(var(--bu-accent-rgb),0.12), transparent),
                radial-gradient(ellipse 60% 50% at 80% 50%, rgba(var(--ic-cyan-rgb),0.06), transparent),
                radial-gradient(ellipse 40% 40% at 20% 80%, rgba(var(--ic-violet-rgb),0.05), transparent),
                var(--ic-dark);
}

/* === GLOW EFFECTS === */
.glow-accent { box-shadow: 0 0 60px rgba(var(--bu-accent-rgb),0.15), 0 0 120px rgba(var(--bu-accent-rgb),0.05); }
.glow-blue { box-shadow: 0 0 60px rgba(var(--ic-blue-rgb),0.15), 0 0 120px rgba(var(--ic-blue-rgb),0.05); }

/* === CARDS === */
.card-hover { transition: transform 0.3s, box-shadow 0.3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(var(--bu-accent-rgb),0.12); }

.card-pro { position: relative; overflow: hidden; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease; }
.card-pro::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s ease;
    background: linear-gradient(135deg, rgba(var(--bu-accent-rgb),0.04) 0%, rgba(var(--ic-cyan-rgb),0.03) 50%, transparent 100%); }
.card-pro:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px rgba(var(--bu-accent-rgb),0.08); }
.card-pro:hover::after { opacity: 1; }

.gradient-border { position: relative; }
.gradient-border::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
    background: linear-gradient(135deg, rgba(var(--bu-accent-rgb),0.4), rgba(var(--ic-cyan-rgb),0.4), rgba(var(--ic-violet-rgb),0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

.card-glow { position: relative; }
.card-glow::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; opacity: 0;
    background: linear-gradient(135deg, rgba(var(--bu-accent-rgb),0.6), rgba(var(--ic-cyan-rgb),0.6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    padding: 1px; transition: opacity 0.4s ease; pointer-events: none; }
.card-glow:hover::before { opacity: 1; }

.tilt-card { transition: transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.tilt-card:hover { transform: perspective(800px) rotateY(-2deg) rotateX(1deg) translateY(-4px); }

/* === ANIMATIONS === */
@keyframes pulse-dot { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: 0.5; transform: scale(1.5) } }
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: 0 } }
.cursor-blink { animation: blink 1s infinite; }

@keyframes gradient-shift { 0%,100% { background-position: 0% 50% } 50% { background-position: 100% 50% } }
.gradient-animate { background-size: 200% 200%; animation: gradient-shift 4s ease infinite; }

@keyframes float-orb { 0%,100% { transform: translate(0,0) scale(1) } 33% { transform: translate(30px,-20px) scale(1.1) } 66% { transform: translate(-20px,15px) scale(0.95) } }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; animation: float-orb 8s ease-in-out infinite; }

@keyframes float-badge { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.float-badge { animation: float-badge 3s ease-in-out infinite; }

@keyframes shine { 0% { transform: translateX(-100%) rotate(45deg) } 100% { transform: translateX(100%) rotate(45deg) } }
.shine-effect { position: relative; overflow: hidden; }
.shine-effect::after { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.03) 50%, transparent 60%);
    animation: shine 6s linear infinite; }

@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(var(--bu-accent-rgb),0.4) } 70% { box-shadow: 0 0 0 12px rgba(var(--bu-accent-rgb),0) } 100% { box-shadow: 0 0 0 0 rgba(var(--bu-accent-rgb),0) } }
.pulse-cta { animation: pulse-ring 2.5s infinite; }

@keyframes grid-move { 0% { transform: translate(0,0) } 100% { transform: translate(60px,60px) } }
.grid-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.grid-bg::before { content: ''; position: absolute; inset: -50%; width: 200%; height: 200%;
    background-image: linear-gradient(rgba(var(--bu-accent-rgb),0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(var(--bu-accent-rgb),0.03) 1px, transparent 1px);
    background-size: 60px 60px; animation: grid-move 20s linear infinite; }

@keyframes border-dance {
    0%,100% { border-color: rgba(var(--ic-blue-rgb),0.3) }
    33% { border-color: rgba(var(--ic-cyan-rgb),0.3) }
    66% { border-color: rgba(var(--ic-violet-rgb),0.3) }
}
.border-animate { animation: border-dance 6s ease infinite; }

/* Stagger children */
.stagger-children > * { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.stagger-children.revealed > * { opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.08s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.16s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.24s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.32s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(7) { transition-delay: 0.48s; }
.stagger-children.revealed > *:nth-child(8) { transition-delay: 0.56s; }

/* Reveal animation */
.reveal-up { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal-up.revealed { opacity: 1; transform: translateY(0); }

/* === LAYOUT UTILITIES === */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--bu-accent-rgb),0.15), rgba(var(--ic-cyan-rgb),0.1), transparent); }
.accent-line { width: 60px; height: 3px; border-radius: 99px; background: linear-gradient(90deg, var(--bu-accent), var(--ic-cyan)); margin: 0 auto 1.5rem; }
.subtitle { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.tag-pill { font-size: 0.65rem; padding: 3px 10px; border-radius: 99px; font-weight: 500;
    border: 1px solid rgba(255,255,255,0.06); transition: all 0.2s ease; }
.tag-pill:hover { border-color: rgba(var(--bu-accent-rgb),0.3); background: rgba(var(--bu-accent-rgb),0.08); }

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 64px; left: 0; height: 2px; z-index: 100;
    background: linear-gradient(90deg, var(--bu-accent), var(--ic-cyan), var(--ic-violet));
    transition: width 0.1s linear; width: 0%; }

/* Cursor glow */
.cursor-glow { position: fixed; width: 500px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--bu-accent-rgb),0.04) 0%, rgba(var(--ic-cyan-rgb),0.02) 40%, transparent 70%);
    pointer-events: none; z-index: 0; transform: translate(-50%,-50%);
    transition: opacity 0.4s ease; opacity: 0; will-change: transform; }
.cursor-glow.active { opacity: 1; }

/* Noise texture */
.noise::after { content: ''; position: absolute; inset: 0; border-radius: inherit;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; opacity: 0.4; mix-blend-mode: overlay; }

/* Section glow */
.section-glow { position: relative; }
.section-glow::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 80%; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--bu-accent-rgb),0.3), rgba(var(--ic-cyan-rgb),0.2), transparent); }

/* Link underline slide */
.link-slide { position: relative; display: inline-block; }
.link-slide::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1.5px;
    background: linear-gradient(90deg, var(--bu-accent), var(--ic-cyan)); transition: width 0.3s ease; }
.link-slide:hover::after { width: 100%; }

/* FAQ */
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease; }
.faq-item.active .faq-answer { max-height: 300px; padding-top: 12px; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 0.3s ease; }

/* === UNIVERSAL NAVBAR === */
.ic-nav { position: fixed; top: 0; width: 100%; z-index: 50;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(6,8,15,0.85);
    border-bottom: 1px solid var(--ic-border);
    transition: all 0.3s ease; }
.ic-nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 1rem; height: 64px;
    display: flex; align-items: center; justify-content: space-between; }
.ic-nav-links { display: flex; align-items: center; gap: 1.5rem; font-size: 0.875rem; font-weight: 500; }
.ic-nav-links a { color: #9ca3af; transition: color 0.2s; }
.ic-nav-links a:hover { color: #fff; }
.ic-nav-links a.active { color: var(--bu-accent); }

/* Mega menu */
.mega-trigger { position: relative; cursor: pointer; }
.mega-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: all 0.3s ease;
    background: rgba(13,17,23,0.98); backdrop-filter: blur(20px);
    border: 1px solid var(--ic-border); border-radius: 16px;
    padding: 1.5rem; min-width: 600px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.mega-trigger:hover .mega-menu,
.mega-menu:hover { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
.mega-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem; border-radius: 12px; transition: background 0.2s; }
.mega-item:hover { background: rgba(255,255,255,0.04); }
.mega-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mega-item h4 { font-size: 0.8rem; font-weight: 600; color: #fff; margin-bottom: 2px; }
.mega-item p { font-size: 0.65rem; color: #6b7280; line-height: 1.3; }

/* === UNIVERSAL FOOTER === */
.ic-footer { border-top: 1px solid var(--ic-border); padding: 3rem 0; }
.ic-footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.ic-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) {
    .ic-footer-grid { grid-template-columns: 1fr 1fr; }
    .mega-menu { display: none; }
    .ic-nav-links { display: none; }
}

/* === BENTO GRID === */
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(200px, auto); gap: 1rem; }
.bento-grid .bento-lg { grid-column: span 2; grid-row: span 2; }
.bento-grid .bento-tall { grid-row: span 2; }
.bento-grid .bento-wide { grid-column: span 2; }
@media (max-width: 768px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-grid .bento-lg, .bento-grid .bento-wide { grid-column: span 1; }
    .bento-grid .bento-lg, .bento-grid .bento-tall { grid-row: span 1; }
}

/* === COUNTER GIANT === */
.counter-giant { font-family: var(--font-display); font-weight: 900; font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1; background: linear-gradient(135deg, var(--bu-accent), var(--ic-cyan));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    background-size: 200% 200%; animation: gradient-shift 4s ease infinite; }

/* === PRICING CARD === */
.pricing-card { background: var(--ic-surface); border: 1px solid var(--ic-border); border-radius: 1rem; padding: 2rem;
    transition: all 0.3s ease; position: relative; overflow: hidden; }
.pricing-card:hover { border-color: rgba(var(--bu-accent-rgb),0.3); transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px rgba(var(--bu-accent-rgb),0.08); }
.pricing-card.featured { border-color: rgba(var(--bu-accent-rgb),0.5); }
.pricing-card.featured::after { content: 'POPULAR'; position: absolute; top: -1px; right: 20px;
    background: linear-gradient(135deg, var(--bu-accent), var(--ic-cyan)); color: white;
    font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 0 0 8px 8px; letter-spacing: 0.05em; }

/* === CTA SECTION === */
.cta-box { background: linear-gradient(135deg, var(--ic-surface), var(--ic-surface-2));
    border: 1px solid var(--ic-border); border-radius: 1.5rem; padding: 3rem; text-align: center;
    position: relative; overflow: hidden; }

/* === BTN === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-weight: 600; padding: 0.875rem 1.75rem; border-radius: 0.75rem; font-size: 0.875rem;
    transition: all 0.3s ease; cursor: pointer; border: none; text-decoration: none; }
.btn-accent { background: var(--bu-accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.1); box-shadow: 0 8px 24px rgba(var(--bu-accent-rgb),0.25); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.08); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #20bd5a; box-shadow: 0 8px 24px rgba(37,211,102,0.25); }

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .hero-mesh { min-height: auto; padding-top: 5rem; padding-bottom: 3rem; }
}

/* === MOBILE NAV === */
.mobile-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(6,8,15,0.98); backdrop-filter: blur(20px); z-index: 49; padding: 1.5rem;
    flex-direction: column; gap: 0.5rem; overflow-y: auto; }
.mobile-nav.open { display: flex; }
.mobile-nav a { display: block; padding: 0.75rem 1rem; color: #9ca3af; font-size: 0.95rem;
    font-weight: 500; border-radius: 0.75rem; transition: all 0.2s; }
.mobile-nav a:hover { background: rgba(255,255,255,0.04); color: #fff; }
.mobile-nav-divider { height: 1px; background: var(--ic-border); margin: 0.5rem 0; }

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; color: #9ca3af; }
@media (max-width: 768px) {
    .hamburger { display: flex; }
}

/* === LATAM MAP === */
.latam-map { position: relative; max-width: 500px; margin: 0 auto; }
.map-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%;
    background: var(--bu-accent); box-shadow: 0 0 12px rgba(var(--bu-accent-rgb),0.5);
    animation: pulse-dot 2s ease-in-out infinite; }
.map-dot::before { content: ''; position: absolute; inset: -4px; border-radius: 50%;
    border: 1px solid rgba(var(--bu-accent-rgb),0.3); animation: pulse-ring 2s infinite; }

/* === DATA TICKER === */
@keyframes ticker-scroll { 0% { transform: translateX(0) } 100% { transform: translateX(-50%) } }
.ticker-wrap { overflow: hidden; white-space: nowrap; }
.ticker-content { display: inline-flex; animation: ticker-scroll 30s linear infinite; }
.ticker-item { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0 2rem;
    font-size: 0.8rem; color: var(--ic-text-muted); }
.ticker-item .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--bu-accent); }

/* === COMPARISON TABLE === */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600;
    color: var(--ic-text-dim); text-transform: uppercase; letter-spacing: 0.05em;
    border-bottom: 1px solid var(--ic-border); }
.compare-table td { padding: 0.75rem 1rem; font-size: 0.875rem; border-bottom: 1px solid rgba(255,255,255,0.03); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-check { color: var(--bu-accent); }
.compare-x { color: #6b7280; }
