/* ============================================================
 * VilaTec 2.0 — Design System Principal
 * Identidad corporativa y arquitectura visual
 * Filosofía: 90% carbón, 10% Electric Blue tecnológico
 * ============================================================ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:ital,wght@0,100..900;1,100..900&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,600;0,700;1,300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
    /* Typography */
    --font-headline: 'Inter', sans-serif;
    --font-body:     'Inter', sans-serif;
    --font-brand:    'Inter', sans-serif;

    /* Surfaces: Soft Dark Mode (Estilo Grafana/MongoDB) para no dañar la vista */
    --color-bg:                #0B1120; /* Pizarra muy oscuro (Slate 900) */
    --color-surface:           #111827; /* Elevación 1 (Slate 800) */
    --color-surface-container: #1F2937; /* Elevación 2 (Slate 700) */
    --color-surface-bright:    #374151; /* Elevación 3 (Slate 600) */

    /* Text: Blancos rotos y grises suaves para evitar fatiga visual */
    --color-on-surface:         #F3F4F6; /* Gray 100 */
    --color-on-surface-variant: #9CA3AF; /* Gray 400 */
    --color-muted:              rgba(243, 244, 246, 0.45);

    /* Brand: Colores vibrantes pero con buen contraste sobre pizarra */
    --color-primary:   #3B82F6; /* Blue 500 */
    --color-primary-glow: rgba(59, 130, 246, 0.15);
    --color-secondary: #F59E0B; /* Amber 500 */
    --color-outline:   rgba(255, 255, 255, 0.08);

    /* Radius — más generoso que el diseño Stitch original */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   14px;
    --radius-xl:   20px;
    --radius-full: 9999px;

    /* Spacing */
    --space-section: clamp(5rem, 10vw, 8rem);

    /* Transitions */
    --transition-fast:   0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:   0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-blue: 0 20px 50px -15px rgba(0, 102, 255, 0.35);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.4);
    
    /* Hover Glow Colors */
    --hover-glow-blue:   rgba(59, 130, 246, 0.25);
    --hover-glow-violet: rgba(139, 92, 246, 0.25);
    --hover-glow-cyan:   rgba(6, 182, 212, 0.25);
}

/* ─── Modern Utilities ─────────────────────────────────────── */
.glass-card {
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    overflow: hidden;
}

.tech-grid {
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.micro-label {
    font-family: 'IBM Plex Sans', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
    user-select: none;
}

.card-glow-border {
    position: relative;
    transition: all var(--transition-normal);
}

/* Variantes de atmósfera hover */
.card-glow-border--blue:hover  { border-color: rgba(59,130,246,0.4) !important; }
.card-glow-border--violet:hover { border-color: rgba(139,92,246,0.4) !important; }
.card-glow-border--cyan:hover   { border-color: rgba(6,182,212,0.4) !important; }

.card-glow-border:hover {
    transform: translateY(-8px);
}


.mesh-gradient-ia {
    background: 
        radial-gradient(at 50% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 80%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        var(--color-bg);
}

/* ─── Buttons: Pill Style ─────────────────────────────────── */
.btn--pill {
    border-radius: var(--radius-full) !important;
    border: 1px solid var(--color-primary) !important;
    background: transparent;
    color: var(--color-primary);
    padding: 0.6rem 1.75rem !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
}

.btn--pill:hover {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}


/* ─── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--color-bg);
    color: var(--color-on-surface);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul { list-style: none; }

::selection {
    background: var(--color-primary);
    color: #fff;
}

/* ─── Material Symbols (CON BLINDAJE ANTI-TRADUCCIÓN) ────────── */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    display: inline-block;
    width: 1em;
    height: 1em;
    overflow: visible;
    white-space: nowrap;
    direction: ltr !important;
    unicode-bidi: isolate !important;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
}

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.text-headline-xl {
    font-size: clamp(2.5rem, 8vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.0;
}

.text-headline-lg {
    font-size: clamp(1.85rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.text-headline-md {
    font-size: clamp(1.35rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-headline-sm {
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.text-body-lg  { font-size: clamp(1rem, 1.2vw, 1.125rem); line-height: 1.6; }
.text-body-md  { font-size: 1rem;     line-height: 1.6; }
.text-body-sm  { font-size: 0.875rem; line-height: 1.5; }
.text-caption  { font-size: 0.75rem;  letter-spacing: 0.08em; }
.text-overline { font-size: 0.65rem;   letter-spacing: 0.15em; font-weight: 700; text-transform: uppercase; }

/* ─── VersalIA Brand Typography ─────────────────────────────── */
.versalia-brand {
    display: inline-flex;
    align-items: baseline;
    font-family: var(--font-brand);
    font-style: normal;
    line-height: 1;
}
.versalia-brand .versal {
    font-family: var(--font-brand);
    font-weight: 300;
    color: var(--color-on-surface-variant);
    letter-spacing: -0.02em;
}
.versalia-brand .ia {
    font-family: var(--font-brand);
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}
.versalia-brand--lg .versal { font-size: 3.5rem; font-weight: 700; }
.versalia-brand--lg .ia     { font-size: 3.5rem; }
.versalia-brand--sm .versal { font-size: 1.2rem; }
.versalia-brand--sm .ia     { font-size: 1.2rem; }
.versalia-brand--xs .versal { font-size: 0.875rem; }
.versalia-brand--xs .ia     { font-size: 0.875rem; }

/* ─── Layout Utilities ───────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.container--narrow {
    max-width: 900px;
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.section-padding {
    padding-block: var(--space-section);
}

/* ─── Alternating Sections ───────────────────────────────────── */
.section-alternate {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-outline);
    border-bottom: 1px solid var(--color-outline);
}

.section-alternate .bento-card {
    background: var(--color-surface-container);
}
.section-alternate .bento-card:hover {
    background: var(--color-surface-bright);
}

/* ─── Texture Backgrounds ───────────────────────────────────── */
.dot-grid {
    background-image: radial-gradient(rgba(0, 102, 255, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
}

.mesh-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(0,102,255,0.03) 100%);
    pointer-events: none;
}

/* ─── Glass Panel ────────────────────────────────────────────── */
.glass-panel {
    background: rgba(19, 19, 19, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 0.85rem 2rem;
    transition: all var(--transition-normal);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.08);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.btn:hover::after { opacity: 1; }

.btn--primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 0 rgba(0,102,255,0);
}
.btn--primary:hover {
    box-shadow: var(--shadow-blue);
    transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
    background: transparent;
    color: var(--color-on-surface);
    border: 1px solid rgba(255,255,255,0.12);
}
.btn--ghost:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(0,102,255,0.06);
}

.btn--outline {
    background: transparent;
    color: var(--color-on-surface);
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn--outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
}

.btn--white {
    background: #fff;
    color: var(--color-primary);
}
.btn--white:hover {
    background: var(--color-surface-bright);
    color: #fff;
}

.btn--sm {
    font-size: 0.75rem;
    padding: 0.6rem 1.25rem;
}

.btn--lg {
    font-size: 1rem;
    padding: 1.1rem 2.5rem;
}

/* ─── Section Headers ────────────────────────────────────────── */
.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 4rem;
}

.section-header--row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.section-eyebrow::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 1px;
    background: var(--color-primary);
}

.section-eyebrow--secondary {
    color: var(--color-secondary);
}
.section-eyebrow--secondary::before {
    background: var(--color-secondary);
}

/* ─── Bento Grid ─────────────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}

/* ─── Bento Cards ────────────────────────────────────────────── */
.bento-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: default; /* Cambiado a default para evitar confusión de UX en elementos que no son clickables */
    display: block;
}

/* Solo mostrar la mano (pointer) si la bento-card es un enlace o tiene comportamiento clickable */
a.bento-card,
.bento-card--link {
    cursor: pointer;
}

.bento-card:hover {
    transform: translateY(-8px) !important;
    background: var(--color-surface-container) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    box-shadow: var(--shadow-blue) !important;
    z-index: 2;
}

.mouse-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}
.bento-card:hover .mouse-glow { opacity: 1; }
.bento-card > *:not(.mouse-glow) { position: relative; z-index: 1; }

/* Mouse Glow Variants - Unificados */
.bento-card--secondary .mouse-glow {
    background: radial-gradient(circle, rgba(251, 146, 60, 0.15) 0%, transparent 65%);
}

.bento-card--secondary:hover {
    border-color: rgba(251, 146, 60, 0.3);
    box-shadow: 0 10px 30px -10px rgba(251, 146, 60, 0.15);
}
.mouse-glow--violet { background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 65%) !important; }
.mouse-glow--cyan   { background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 65%) !important; }


.bento-card--wide  { grid-column: span 8; }
.bento-card--mid   { grid-column: span 6; }
.bento-card--third { grid-column: span 4; }
.bento-card--full  { grid-column: span 12; }

.bento-card--accent {
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(0,102,255,0.06) 100%);
    border: 1px solid rgba(0,102,255,0.18);
}

.bento-card--kuraguardian {
    background: linear-gradient(135deg, var(--color-surface) 0%, rgba(6, 182, 212, 0.04) 100%) !important;
    border: 1px solid rgba(6, 182, 212, 0.12) !important;
}

.bento-card--kuraguardian:hover {
    border-color: rgba(6, 182, 212, 0.35) !important;
    box-shadow: 0 12px 40px -10px rgba(6, 182, 212, 0.18) !important;
}

.bento-card--kuraguardian .kuraguardian-logo {
    transition: transform 0.4s ease;
}

.bento-card--kuraguardian:hover .kuraguardian-logo {
    transform: scale(1.03);
}

.bento-card--kuraguardian .kuraguardian-cta-btn {
    transition: color 0.3s ease;
}

.bento-card--kuraguardian:hover .kuraguardian-cta-btn {
    color: var(--color-secondary) !important;
}

.bento-card--kuraguardian .kuraguardian-cta-btn span {
    transition: transform 0.3s ease;
}

.bento-card--kuraguardian:hover .kuraguardian-cta-btn span {
    transform: translateX(5px);
}

/* Animaciones e interactividad del widget de monitorización */
@keyframes pulse-cyan {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(6, 182, 212, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

@keyframes pulse-cyan-bg {
    0%, 100% {
        background: rgba(6, 182, 212, 0.05);
        border-color: rgba(6, 182, 212, 0.2);
    }
    50% {
        background: rgba(6, 182, 212, 0.09);
        border-color: rgba(6, 182, 212, 0.35);
        color: #00f2fe;
    }
}

/* Animación de carga para simular lecturas del sistema */
@keyframes cpu-flicker {
    0%, 100% { width: 24%; }
    25% { width: 29%; }
    50% { width: 21%; }
    75% { width: 26%; }
}

@keyframes mem-flicker {
    0%, 100% { width: 48%; }
    30% { width: 51%; }
    60% { width: 47%; }
    80% { width: 49%; }
}

.bento-card--kuraguardian .cpu-progress-fill {
    animation: cpu-flicker 5s infinite ease-in-out;
}

.bento-card--kuraguardian .mem-progress-fill {
    animation: mem-flicker 6s infinite ease-in-out;
}

/* ─── Service List (Systems/Dev columns) ──────────────────────── */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.service-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-item__header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.service-item__icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

.service-item__body {
    color: var(--color-on-surface-variant);
    font-weight: 300;
    line-height: 1.7;
    padding-left: 2.25rem;
}

/* ─── Methodology Steps ─────────────────────────────────────── */
.step-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}

.step-connector {
    display: none;
    position: absolute;
    top: 2rem;
    left: 12%;
    right: 12%;
    height: 1px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}

.step-connector__fill {
    position: absolute;
    inset-block: 0;
    left: 0;
    width: 0;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    transition: width 1.8s cubic-bezier(0.4,0,0.2,1);
}

.step-item {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.step-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 1px solid rgba(0,102,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    transition: all 0.5s ease;
    color: var(--color-primary);
}

.step-item:hover .step-icon {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(0,102,255,0.35);
}

/* ─── Quote block ────────────────────────────────────────────── */
.quote-block {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border-left: 2px solid var(--color-secondary);
    margin-top: 2.5rem;
}

.quote-block p {
    color: var(--color-on-surface-variant);
    font-style: italic;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ─── CTA Section ────────────────────────────────────────────── */
.cta-section {
    background: var(--color-surface-container);
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--color-outline);
}

.cta-section .dot-grid {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(rgba(0, 102, 255, 0.4) 1px, transparent 1px);
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
    background: linear-gradient(to bottom, #0A0F1B, #05070A);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(96, 165, 250, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    pointer-events: none;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 5rem;
    padding-block: 6rem 4rem;
    position: relative;
    z-index: 1;
}

.footer__logo { 
    height: 2.5rem; 
    width: auto; 
    margin-bottom: 1.75rem; 
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.2));
}

.footer__desc {
    color: var(--color-on-surface-variant);
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 26rem;
    opacity: 0.7;
    font-weight: 300;
}

.footer__col-title {
    font-family: var(--font-headline);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer__col-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer__link {
    color: var(--color-on-surface-variant);
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer__link:hover { 
    color: var(--color-primary); 
    opacity: 1;
    transform: translateX(4px);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-block: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    z-index: 1;
}

.footer__copyright {
    color: var(--color-on-surface-variant);
    font-size: 0.8rem;
    opacity: 0.5;
}

.footer__legal {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer__legal a {
    color: var(--color-muted);
    font-size: 0.8rem;
    transition: color var(--transition-fast);
}
.footer__legal a:hover { color: var(--color-primary); }

.footer__socials {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.footer__socials a {
    color: var(--color-on-surface-variant);
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.footer__socials a:hover {
    color: var(--color-primary);
    opacity: 1;
    transform: translateY(-3px);
    background: rgba(96, 165, 250, 0.05);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.15);
}

.footer__social-icon {
    transition: transform 0.3s ease;
}

.footer__socials a:hover .footer__social-icon {
    transform: scale(1.1);
}

/* ─── Scroll Reveal ──────────────────────────────────────────── */
.reveal-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1),
                transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Badge ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.badge--primary {
    background: var(--color-primary);
    color: #fff;
}

.badge--outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

/* ─── Link arrow ─────────────────────────────────────────────── */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    transition: gap var(--transition-fast);
}
.link-arrow:hover { gap: 0.6rem; }

/* ─── Glow accent blobs ──────────────────────────────────────── */
.glow-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(100px);
    opacity: 0.55;
}
.glow-blob--primary { background: var(--color-primary-glow); }
.glow-blob--secondary { background: rgba(255,140,0,0.08); }

/* ─── IA Bento Grid & Components ────────────────────────────────── */
.bento-ia-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.bento-ia-card {
    background: rgba(15, 20, 30, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.bento-ia-card:hover {
    transform: translateY(-8px);
    background: rgba(18, 24, 38, 0.6);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8),
                inset 0 0 20px rgba(96, 165, 250, 0.05);
    filter: saturate(1.25);
}

.bento-ia-card .mouse-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.bento-ia-card:hover .mouse-glow { opacity: 1; }
.bento-ia-card > *:not(.mouse-glow) { position: relative; z-index: 1; }


.bento-ia-card--full {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    padding: 2rem 3rem;
}
.bento-ia-card--full .ia-visual-container {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .bento-ia-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bento-ia-card:nth-child(1) {
        grid-column: 1 / -1;
    }
}
@media (max-width: 768px) {
    .bento-ia-grid {
        grid-template-columns: 1fr;
    }
    .bento-ia-card--full {
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
        padding: 2rem;
    }
}

.ia-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.70rem;
    font-weight: 700;
    color: #60a5fa;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    white-space: nowrap;
}
.ia-eyebrow-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(96,165,250,0.4), transparent);
}
.ia-eyebrow--orange { color: #fb923c; }
.ia-eyebrow--orange .ia-eyebrow-line { background: linear-gradient(90deg, rgba(251,146,60,0.4), transparent); }

.ia-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}
.ia-icon {
    font-size: 3.5rem; /* Duplicado */
    color: #60a5fa;
    position: relative;
    filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.4));
}
.ia-icon--orange { 
    color: #fb923c; 
    filter: drop-shadow(0 0 15px rgba(251, 146, 60, 0.4));
}

.ia-card-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.ia-card-desc {
    font-size: 0.95rem;
    color: #AAAAAA; /* Gris Soft elevado */
    line-height: 1.6;
    margin-bottom: 2rem;
}

.ia-visual-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
    border-radius: 8px;
    background: radial-gradient(circle at center, rgba(96,165,250,0.03) 0%, transparent 70%);
}

.vis-node {
    position: absolute;
    transform: translate(-50%, -50%);
    background: rgba(14,20,30,0.9);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.65rem; /* Más legible */
    font-weight: 600;
    color: #EEEEEE; /* Gris Claro / Blanco Humo */
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}
.vis-node .material-symbols-outlined { font-size: 14px; opacity: 0.8; }

/* Animaciones de IA */
@keyframes ia-pulse-glow {
    0%, 100% { opacity: 0.4; filter: blur(10px); }
    50% { opacity: 0.7; filter: blur(15px); }
}

@keyframes ia-shimmer {
    0% { opacity: 1; }
    50% { opacity: 0.4; transform: scale(1.1); }
    100% { opacity: 1; }
}

@keyframes ia-progress-loop {
    0% { width: 0%; }
    80% { width: 100%; }
    100% { width: 100%; }
}

@keyframes ia-data-flow {
    0% { stroke-dashoffset: 20; }
    100% { stroke-dashoffset: 0; }
}

@keyframes ia-log-fade {
    0%, 100% { opacity: 0; transform: translateY(5px); }
    20%, 80% { opacity: 1; transform: translateY(0); }
}

.ia-tag--red.shimmer {
    animation: ia-shimmer 2s infinite ease-in-out;
}

.progress-fill-loop {
    animation: ia-progress-loop 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.ia-flow-line {
    stroke-dasharray: 4;
    animation: ia-data-flow 1s linear infinite;
}

.ia-log-entry {
    animation: ia-log-fade 3s infinite;
}
.ia-log-entry:nth-child(2) { animation-delay: 1s; }
.ia-log-entry:nth-child(3) { animation-delay: 2s; }

.ia-check-anim {
    opacity: 0;
    animation: ia-log-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ia-log-fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.ia-check-anim--1 { animation-delay: 0.4s; }
.ia-check-anim--2 { animation-delay: 1.2s; }
.ia-check-anim--3 { animation-delay: 2.0s; }


.btn--outline-blue {
    background: transparent;
    border: 1px solid rgba(96,165,250,0.5);
    color: #60a5fa;
    align-self: flex-start;
}
.btn--outline-blue:hover { background: rgba(96,165,250,0.1); }
.btn--outline-orange {
    background: transparent;
    border: 1px solid rgba(251,146,60,0.5);
    color: #fb923c;
    align-self: flex-start;
}
.btn--outline-orange:hover { background: rgba(251,146,60,0.1); }


/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root { --space-section: 4.5rem; }
    .bento-card--wide  { grid-column: span 12; }
    .bento-card--third { grid-column: span 12; }
    .bento-card--mid   { grid-column: span 12; }
    .bento-card--full  { grid-column: span 12; }
    .step-grid         { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .footer__grid      { grid-template-columns: 1fr 1fr; gap: 3rem; }
    .footer__grid > *:first-child { grid-column: 1 / -1; }
    
    .bento-ia-grid { grid-template-columns: 1fr 1fr; }
    .bento-ia-card--full { flex-direction: column; align-items: stretch; }
}

@media (max-width: 768px) {
    :root { --space-section: 3.5rem; }
    .container { padding-inline: 1.25rem; }
    .section-header { margin-bottom: 2.5rem; }
    .step-grid      { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer__grid   { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer__bottom { flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
    .footer__legal  { justify-content: center; }
    .section-header--row { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .bento-card     { padding: 1.5rem; }
    .bento-ia-grid  { grid-template-columns: 1fr; gap: 1.25rem; }
    .ia-visual-container { min-height: 180px; margin-bottom: 1rem; }
    .ia-card-header h3 { font-size: 1.25rem; }
    .ia-icon { font-size: 2.5rem; }

    /* Fix para tarjetas IA que ahora son links */
    .bento-ia-card { display: block; }
    .bento-ia-card .ia-visual-container { display: flex; }

    /* IA - LLM Visual Fix */
    .ia-visual-container--llm { padding: 1rem !important; }
    .llm-connector { display: none; } /* Ocultamos el conector complejo en móvil para ganar espacio */

    /* SISTEMAS - Uptime Chart Fix */
    .uptime-chart-wrapper { gap: 2px !important; }
    .uptime-bar:nth-child(-n+45) { display: none; } /* Ocultamos 45 de las 90 barras en móvil para que las que queden sean más anchas */
    .uptime-bar { min-width: 4px !important; }

    /* DESARROLLO - Ecommerce Stats Fix */
    .perf-stats-container { 
        flex-direction: column !important; 
        gap: 1.5rem !important; 
        align-items: center !important;
        margin-top: 1rem;
    }

    /* VERSALIA - Centering Fix */
    .versalia-bento-hero { 
        flex-direction: column !important; 
        text-align: center !important; 
        padding: 2.5rem 1.5rem !important;
        gap: 3rem !important;
    }
    .versalia-hero-content { min-width: 100% !important; }
    .versalia-hero-logo { justify-content: center !important; min-width: 100% !important; }
    .versalia-hero-cta { display: flex; justify-content: center; }
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes flow-right {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes scan {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    5%, 15%, 25% { opacity: 0.4; }
    10%, 20% { opacity: 1; }
}

@keyframes particle-in {
    0% { transform: translate(-40px, -20px) scale(0); opacity: 0; }
    50% { opacity: 0.8; transform: translate(0, 0) scale(1); }
    100% { transform: translate(0, 0) scale(0); opacity: 0; }
}

@keyframes particle-out {
    0% { transform: translate(0, 0) scale(0); opacity: 0; }
    50% { opacity: 0.8; transform: translate(50px, 0) scale(1.2); }
    100% { transform: translate(110px, 10px) scale(0); opacity: 0; }
}

.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    box-shadow: 0 0 15px var(--color-primary);
    z-index: 10;
    pointer-events: none;
    animation: scan 4s linear infinite;
}


/* ─── IA High-End Visuals: Ingeniería Tangible ────────────────── */
.ui-window {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    height: 100%;
    position: relative;
    font-family: var(--font-brand);
    overflow: hidden;
}

.ui-header {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.ui-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.2); }

.ia-tag {
    font-size: 0.6rem;
    font-family: var(--font-headline);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}
.ia-tag--red { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.ia-tag--green { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.ia-tag--blue { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.blueprint-node {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: all 0.3s ease;
}

@keyframes progress-ia {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.ia-progress-bar {
    height: 2px;
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
    animation: progress-ia 3s ease-in-out infinite;
}

.ai-icon-mini {
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
}
@keyframes flow-right {
    0% { left: -5%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 105%; opacity: 0; }
}


@keyframes flicker {
    0%, 100% { opacity: 1; }
    5%, 15%, 25% { opacity: 0.4; }
    10%, 20% { opacity: 1; }
}
