/* ═══════════════════════════════════════════════════════
   OnLIMS Design System — Global Stylesheet
   Visual Identity: "Industrial Reliability & Technical Precision"
   ═══════════════════════════════════════════════════════ */

/* Las fuentes (Inter, Outfit, Roboto Mono) ya NO se piden con @import.
   Un @import obliga al navegador a descargar y parsear este archivo ANTES de
   enterarse siquiera de que existen las fuentes: tres saltos en serie
   (HTML -> style.css -> css2 de Google -> los .woff2) con el texto esperando.
   Medido el 2026-07-28: style.css terminaba a 825 ms y la peticion a Google
   arrancaba justo entonces, a 825 ms.
   Ahora se declaran en el <head> de cada pagina con preconnect, para que la
   descarga arranque en paralelo con este CSS. Auditoria 2026-07-28. */

/* ─── CSS Tokens ─────────────────────────────────────── */
:root {
    /* Colors - BRAND Dark Mode (Optimized) */
    --red: #C1272D;
    /* Primary Brand Red */
    --red-dark: #9C1F24;
    --red-glow: rgba(193, 39, 45, 0.4);
    /* Stronger glow for dark mode */

    --bg-main: #0a0b0d;
    /* Industrial Black */
    --bg-surface: #121417;
    /* Charcoal */
    --bg-alt: #161B22;

    --text-main: #F0F6FC;
    /* Off-white for high contrast */
    --text-muted: #8B949E;
    --text-light: #484F58;

    --border: rgba(255, 255, 255, 0.08);
    --border-red: rgba(193, 39, 45, 0.4);

    --charcoal:   #1a1c1f;
    --dark:       #0f1012;
    --slate:      #2c3140;

    --white: #ffffff;
    --black: #000000;

    /* Typography */
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    /* Spacing */
    --section-gap: 120px;
    --container: 1200px;

    /* Effects */
    --glass: rgba(13, 15, 18, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.9);
    --shadow-red: 0 4px 20px rgba(193, 39, 45, 0.4);

    --radius: 8px;
    --radius-sm: 4px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s var(--ease);
}

/* ─── Premium Text Utilities ─────────────────────────────── */
.text-highlight {
    color: var(--red);
    font-weight: 750;
    position: relative;
    display: inline-block;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

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

/* Salto al contenido: invisible hasta que recibe foco por teclado (auditoria 2026-07-28).
   Sin esto, quien navega con teclado o lector de pantalla tiene que recorrer todo el
   menu en cada pagina antes de llegar al contenido. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 12px 20px;
    background: var(--red);
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 6px 0;
}

.skip-link:focus {
    left: 0;
    outline: 3px solid var(--white);
    outline-offset: -3px;
}

img {
    display: block;
    max-width: 100%;
    /* Imprescindible junto a los atributos width/height del HTML (anadidos para
       reservar espacio y evitar CLS): sin esto, max-width:100% encoge el ancho
       pero el alto se queda en el del atributo y la imagen se deforma. */
    height: auto;
}

ul {
    list-style: none;
}

/* ─── Container ──────────────────────────────────────── */
.container {
    width: 90%;
    max-width: var(--container);
    margin: 0 auto;
}

/* ─── Navigation ─────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(6, 7, 9, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s var(--ease);
}

.logo-mask {
    display: block;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.nav.scrolled {
    background: var(--bg-main);
    box-shadow: var(--shadow-sm);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    padding: 0;
    height: 72px;
    max-width: var(--container);
    margin: 0 auto;
}

.nav__logo {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 40px;
}

.nav__logo-img {
    height: 42px;
    width: auto;
    display: block;
}

.nav__logo-text {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 40px;
}

@media (max-width: 1150px) {
    .nav__links {
        gap: 20px;
    }
    .nav__links a {
        font-size: 0.85rem;
    }
}

.nav__links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.nav__links a:hover,
.nav__links a.active {
    color: var(--white);
    font-weight: 600;
}

.nav__cta {
    background: var(--red);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s !important;
}

.nav__cta:hover {
    background: var(--red-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-red);
}

.nav__toggle { display: none; }

/* ─── Hero ───────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 72px;
    background: var(--bg-surface);
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/hero-lab.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    filter: brightness(0.65) contrast(1.1);
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--bg-surface) 10%, rgba(13, 15, 18, 0.4) 50%, var(--bg-surface) 90%),
        radial-gradient(circle at 70% 30%, transparent, var(--bg-surface));
}

.hero__grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    padding: 100px 0;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--red);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 24px;
    border: 1px solid var(--border-red);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: var(--red-glow);
}

.hero__eyebrow::before {
    content: '//';
    opacity: 0.5;
}

.hero__headline {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 850;
    line-height: 1.05;
    color: var(--text-main);
    letter-spacing: -0.04em;
    max-width: 850px;
    margin-bottom: 24px;
}

.hero__headline span {
    color: var(--red);
    position: relative;
}

.hero__authority {
    font-size: 1rem;
    color: var(--text-main);
    opacity: 0.8;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.hero__authority::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--red);
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__stats {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding-top: 48px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}

.hero__stat {
    background: rgba(255, 255, 255, 0.03);
    padding: 32px 40px;
    backdrop-filter: blur(8px);
}

.hero__stat-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 6px;
}

.hero__stat-num span {
    color: var(--red);
}

.hero__stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-red);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-arrow::after {
    content: ' →';
}

/* ─── Section Commons ─────────────────────────────────── */
.section {
    padding: var(--section-gap) 0;
    scroll-margin-top: 72px;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--red);
}

.section-eyebrow::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--red-glow);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 850;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.section-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    line-height: 1.6;
}

/* ─── Problem Section ─────────────────────────────────── */
.problem {
    background: var(--bg-surface);
}

.problem__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.problem__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 48px;
}

.problem__item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 32px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s var(--ease);
}

.problem__item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-red);
}

.problem__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--red-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Antes vivian aqui tres emoji. Ahora son SVG de linea que heredan el rojo
       de marca via currentColor (auditoria 2026-07-28). */
    font-size: 1.4rem;
    color: var(--red);
}

.problem__item-title {
    font-size: 1.1rem;
    font-weight: 750;
    color: var(--text-main);
    margin-bottom: 8px;
}

.problem__item-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.problem__visual {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
}

.problem__quote {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 11, 13, 0.95), transparent);
    padding: 32px 24px 24px;
}

.problem__quote-text {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 8px;
}

.problem__quote-author {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ─── Challenges Section ──────────────────────────────── */
.challenges {
    background: var(--bg-main);
    border-top: 1px solid var(--border);
}

.challenges__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.challenges__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
}

.challenges__item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s var(--ease);
}

.challenges__item:hover {
    border-color: var(--border-red);
    transform: translateX(8px);
}

.challenges__num {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--red);
}

.challenges__item-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.challenges__item-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.challenges__visual {
    position: relative;
    padding: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.challenges__visual img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    filter: contrast(1.05) brightness(0.95);
    transition: transform 0.4s var(--ease);
}

.challenges__visual:hover img {
    transform: scale(1.02);
}

/* ─── Capabilities ────────────────────────────────────── */
.capabilities {
    background: var(--bg-main);
}

.capabilities__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 64px;
    box-shadow: var(--shadow-md);
}

.cap-card {
    background: var(--bg-surface);
    padding: 40px;
    transition: all 0.3s var(--ease);
    position: relative;
}

.cap-card:hover {
    background: var(--bg-alt);
}

.cap-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--red);
    transition: height 0.3s var(--ease);
}

.cap-card:hover::before {
    height: 100%;
}

.cap-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.cap-app-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--red);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 850;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.cap-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 850;
    color: var(--white);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.cap-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.cap-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cap-list li {
    display: grid;
    grid-template-columns: 20px 180px 1fr;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 8px;
    align-items: start;
}

.cap-list li::before {
    content: '→';
    color: var(--red);
    font-weight: 900;
}

.cap-list li strong {
    color: var(--white);
    font-weight: 700;
}

@media (max-width: 1024px) {
  :root { --section-gap: 64px; }
  
  .nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 15px;
    box-sizing: content-box;
    margin-right: -10px;
  }
  .nav__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
    border-radius: 2px;
  }
  .nav__toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav__toggle.active span:nth-child(2) { opacity: 0; }
  .nav__toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* height:100% fallaba: .nav tiene backdrop-filter -> es containing block del
       fixed, así 100% = altura de la barra (72px). 100vh/100dvh = viewport real. */
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    background: rgba(10, 11, 13, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all 0.4s var(--ease);
    z-index: 1000;
  }
  .nav__links.active {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .nav__links a { font-size: 1.5rem; color: var(--text-light); }
  body.no-scroll { overflow: hidden; }
  
  .problem__grid, .challenges__grid, .tech__grid {
    gap: 40px !important;
  }
}

/* ─── Stats Bar ───────────────────────────────────────── */
.stats-bar {
    background: var(--bg-surface);
    padding: 80px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-bar .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
}

.stats-bar__item {
    text-align: center;
    padding: 0 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-bar__item:last-child {
    border-right: none;
}

.stats-bar__num {
    font-size: 3rem;
    font-weight: 850;
    color: var(--white);
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 8px;
}

.stats-bar__label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ─── Technology ─────────────────────────────────────── */
.technology {
    background: var(--bg-alt);
}

.tech__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: start;
    margin-top: 64px;
}

.tech__stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech__item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.tech__item:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-md);
}

.tech__item-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--red-glow);
    border: 1px solid var(--border-red);
    color: var(--red);
    white-space: nowrap;
}

.tech__item-text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 2px;
}

.tech__item-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tech__diagram {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    font-family: var(--font-mono);
}

.tech__diagram-title {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech__diagram-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.arch-node {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.arch-row {
    display: flex;
    gap: 8px;
}

.arch-box {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.arch-box.layer-ui {
    background: rgba(100, 116, 139, 0.15);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

.arch-box.layer-app {
    background: rgba(171, 36, 48, 0.12);
    border: 1px solid var(--border-red);
    color: #f87171;
}

.arch-box.layer-db {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

.arch-box.layer-hw {
    background: rgba(107, 114, 128, 0.12);
    border: 1px solid rgba(107, 114, 128, 0.25);
    color: var(--text-muted);
}

.arch-connector {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.4;
    margin: 4px 0;
}

/* ─── CTA Section ─────────────────────────────────────── */
.cta-section {
    background: var(--dark);
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(171, 36, 48, 0.12) 0%, transparent 65%);
    pointer-events: none;
}

.cta-section .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-section .section-title {
    max-width: 620px;
    margin: 0 auto 16px;
}

.cta-section .section-sub {
    margin: 0 auto 48px;
    text-align: center;
}

.cta-section__actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-section__note {
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ─── Footer ─────────────────────────────────────────── */
.footer {
    background: var(--charcoal);
    border-top: 1px solid var(--border);
    padding: 60px 0 32px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 48px;
}

.footer__brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer__brand-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 280px;
}

.footer__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 5px 12px;
    background: var(--red-glow);
    border: 1px solid var(--border-red);
    border-radius: var(--radius-sm);
    color: var(--red);
    letter-spacing: 0.08em;
}

.footer__social {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.2s var(--ease);
}

.footer__social-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.footer__social-link:hover {
    color: var(--white);
    background: var(--red);
    border-color: var(--red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 0, 0, 0.2);
}

.footer__col-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.footer__col-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__col-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer__col-links a:hover {
    color: var(--white);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.footer__copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.footer__tech {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.footer__tech span {
    color: var(--red);
}


/* ─── Grid Utilities ─────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
    align-items: center;
}
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

/* ─── Scroll animations ───────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* El contenido sobre el pliegue (titular, propuesta de valor y los dos CTA) NO puede
   depender de que corra el IntersectionObserver: si el JS falla, va bloqueado o el
   navegador difiere la animacion, el hero quedaria en blanco. Se muestra siempre.
   Auditoria 2026-07-28. */
.hero .reveal {
    opacity: 1;
    transform: none;
}

/* Respeta a quien pide menos movimiento: sin animacion de entrada, contenido visible. */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}
/* ═══ COMPARISON ═══ */
.comparison {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.comparison__table-wrapper {
    margin-top: 50px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-main);
}

.comparison__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.comparison__table th,
.comparison__table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison__table th {
    background: var(--bg-surface);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison__table tr:last-child td {
    border-bottom: none;
}

.comparison__header-onlims {
    color: var(--red);
    font-weight: 700;
}

.comparison__feature {
    font-weight: 600;
    color: var(--text-main);
    width: 30%;
}

.comparison__legacy {
    color: var(--text-muted);
    width: 35%;
}

.comparison__onlims {
    color: var(--text-main);
    font-weight: 500;
    width: 35%;
    background: rgba(255, 60, 0, 0.02);
}

@media (max-width: 768px) {

    .comparison__table th,
    .comparison__table td {
        padding: 15px 10px;
        font-size: 0.9rem;
    }
}

/* ═══ NEWS SECTION ═══ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
}

.news-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.news-card__content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card__date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--red);
    margin-bottom: 12px;
    display: block;
}

.news-card__title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    line-height: 1.3;
}

.news-card__excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.news-card__link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.news-card__link:hover {
    color: var(--red);
}

.news-card__link::after {
    content: '→';
}

/* ═══ ARTICLE PAGE ═══ */
.article-header {
    padding-top: 160px;
    padding-bottom: 60px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.article-content {
    padding: 80px 0;
    max-width: 800px;
    margin: 0 auto;
}

.article-content p {
    margin-bottom: 24px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.article-content h2,
.article-content h3 {
    margin: 40px 0 20px;
    color: var(--white);
}

@media (max-width: 768px) {
    :root {
        --section-gap: 64px;
    }

    /* Collapse standard grids on mobile to prevent squished columns */
    .product-grid, .solutions-grid,
    .problem__grid, .challenges__grid, .tech__grid, .capabilities__grid {
        grid-template-columns: 1fr !important;
    }

    .cap-list li {
        display: block !important;
        padding-left: 28px;
        position: relative;
        margin-bottom: 20px;
    }

    .cap-list li::before {
        position: absolute;
        left: 0;
        top: 0;
    }

    .cap-list li strong, .cap-list li .text-highlight {
        display: block;
        margin-bottom: 6px;
    }

    .hero__stats {
        grid-template-columns: 1fr;
    }

    .stats-bar .container {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ───────────────────────────────────────────────────────
   TRUSTED BY & TESTIMONIAL SECTIONS
   Added by Senior UX/UI Architect
   ─────────────────────────────────────────────────────── */

/* ─── Trusted By Section ──────────────────────────────── */
.trusted-by {
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    padding: 30px 0;
    position: relative;
    z-index: 10;
}

.trusted-by__wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.trusted-by__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.8;
}

.trusted-by__grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    gap: 24px;
}

.trusted-by__item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color 0.3s var(--ease), filter 0.3s var(--ease);
    filter: brightness(0.85);
    height: 40px;
}

.trusted-by__logo {
    height: 26px;
    width: auto;
    max-width: 160px;
}

.trusted-by__item:hover {
    color: var(--text-main);
    filter: brightness(1.2);
    cursor: pointer;
}

/* ─── Testimonial Section ──────────────────────────────── */
.testimonial {
    background: var(--bg-main);
    border-top: 1px solid var(--border);
    position: relative;
}

.testimonial__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.testimonial__card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--radius);
    padding: 48px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.testimonial__quote-icon {
    font-family: var(--font-display);
    font-size: 8rem;
    line-height: 1;
    color: var(--red);
    opacity: 0.08;
    position: absolute;
    top: -20px;
    left: 20px;
    pointer-events: none;
}

.testimonial__quote {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 400;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    font-style: italic;
}

.testimonial__author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.testimonial__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.testimonial__name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--white);
    font-style: normal;
}

.testimonial__role {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.testimonial__metrics {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.testimonial__metrics-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 850;
    color: var(--white);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.testimonial__metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.testimonial__metric-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    transition: var(--transition);
}

.testimonial__metric-card:hover {
    border-color: var(--border-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.testimonial__metric-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.testimonial__metric-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

/* ─── Responsive Adjustments ──────────────────────────── */
@media (max-width: 1024px) {
    .trusted-by__wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .trusted-by__grid {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 24px 32px;
    }

    .testimonial__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .testimonial__card {
        padding: 32px 24px;
    }
    
    .testimonial__metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial__quote-icon {
        font-size: 5rem;
        top: -10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .trusted-by__grid {
        justify-content: space-between;
        gap: 16px;
    }
    
    .trusted-by__logo {
        height: 22px;
    }
}

/* ─── Brochure Modal ─────────────────────────────────────── */
dialog#brochure-modal {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-main);
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1001;
    overflow: hidden;
}

dialog#brochure-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

dialog#brochure-modal .modal-content {
    position: relative;
    padding: 40px;
}

dialog#brochure-modal .modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

dialog#brochure-modal .modal-close:hover {
    color: var(--white);
}

dialog#brochure-modal h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: var(--white);
    line-height: 1.2;
}

dialog#brochure-modal .modal-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

dialog#brochure-modal .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

dialog#brochure-modal label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

dialog#brochure-modal input {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

dialog#brochure-modal input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 2px var(--red-glow);
}

dialog#brochure-modal .error-msg {
    color: #ff4a4a;
    font-size: 0.8rem;
    margin-top: 4px;
    min-height: 18px;
}

dialog#brochure-modal button[type="submit"] {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

