/* ============================================================
   SIVEM — Landing institucional
   HTML5 + CSS3 puro. Tipografía: Schibsted Grotesk.
   ============================================================ */

:root {
    /* Paleta oscura, tomada del modo oscuro de la app. */
    --blue: #0064F8;
    --blue-dark: #0052cc;
    --blue-text: #5c9bff;           /* azul legible como texto sobre fondo oscuro */
    --blue-tint: rgba(0, 100, 248, 0.14);
    --ink: #f1f3f7;                 /* títulos */
    --text: #a9b1bf;                /* texto corrido */
    --muted: #7c8595;
    --border: #262a33;
    --border-strong: #363b47;
    --surface: #171a20;             /* barra superior de la app */
    --card: #1a1d23;                /* tarjetas de la app */
    --page: #0f1115;                /* fondo de la app */
    --warn: #b45309;
    --ok: #047857;

    /* Fondos de sección alternados. */
    --bg-base: #0f1115;
    --bg-alt: #13161c;

    /* Marco de las capturas (la app se muestra en modo oscuro). */
    --app-bg: #0f1115;
    --app-bar: #1b1e25;
    --app-line: #2a2e37;

    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 64px rgba(0, 0, 0, 0.5);

    color-scheme: dark;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --font: "Schibsted Grotesk", -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    /* Cada sección ocupa la pantalla entera: el ancla va al borde, sin offset. */
    scroll-padding-top: 0;
}
/* El scroll suave se activa recién con la página cargada (script.js agrega
   .is-ready): si no, al recargar el salto inicial se veía como un recorrido. */
html.is-ready { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--page);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }
body.no-scroll { overflow: hidden; }

/* ---------- Accesibilidad: foco visible y skip link ---------- */
:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
    border-radius: 4px;
}
.btn--light:focus-visible, .cta__email:focus-visible { outline-color: #fff; }
.skip-link {
    position: fixed; top: 8px; left: 8px; z-index: 200;
    padding: 10px 18px;
    background: var(--blue); color: #fff;
    border-radius: 8px; font-size: 14px; font-weight: 600;
    transform: translateY(-200%);
    transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Layout ---------- */
.container { max-width: 1140px; margin-inline: auto; padding-inline: 24px; }
.container--narrow { max-width: 860px; }
/* Las secciones son translúcidas para dejar ver la vista explotada fija del fondo:
   solo aportan un brillo azul y, las alternas, un velo apenas más claro. */
.section {
    background:
        radial-gradient(760px 420px at 0% 100%, rgba(0, 100, 248, 0.04), transparent 65%);
}
.section--alt {
    background:
        radial-gradient(900px 480px at 100% 0%, rgba(0, 100, 248, 0.05), transparent 62%),
        rgba(255, 255, 255, 0.015);
}
.hero, .section, .cta { position: relative; }

/* ============================================================
   FONDO — vista explotada del sistema
   Ilustración fija detrás de toda la página. Arriba se ve como una sola
   pantalla de frente; al bajar gira a isométrica y las capas de los
   módulos se separan hacia atrás. script.js actualiza --p (apertura, 0 a 1)
   y --q (avance total de la página) según el scroll.
   ============================================================ */
.explode {
    position: fixed; inset: 0; z-index: -1;
    pointer-events: none; overflow: hidden;
    perspective: 1800px;
    /* La opacidad va acá y no en __stack: en el hijo aplanaría la escena 3D. */
    opacity: 0.5;
    transition: opacity 0.6s var(--ease);
    --p: 0; --q: 0;
}
/* Oculta hasta que script.js la ubica detrás del video (evita verla corrida al cargar). */
.explode:not(.is-anchored) { opacity: 0; }
.explode__stack {
    /* Cerrada, queda justo detrás del video del inicio (--x0/--y0 los calcula
       script.js); al abrirse se mueve a su lugar y sube para entrar en pantalla. */
    position: absolute;
    --xe: 64vw; --ye: 32vh;
    left: calc(var(--x0, 64vw) * (1 - var(--p)) + var(--xe) * var(--p));
    top: calc(var(--y0, 52vh) * (1 - var(--p)) + var(--ye) * var(--p));
    width: 520px; height: 325px;
    margin: -162px 0 0 -260px;
    transform-style: preserve-3d;
    transform:
        rotateX(calc(var(--p) * 56deg))
        rotateZ(calc(var(--p) * -38deg - var(--q) * 12deg))
        /* Cerrada, mide lo mismo que el cuadro del video (--k0); abierta, --k. */
        scale(calc(var(--k0, 1) * (1 - var(--p)) + 0.88 * var(--k, 1) * var(--p)));
    will-change: transform;
}
/* Cada capa recibe de script.js:
   --z  profundidad (0 adelante, negativa hacia atrás),
   --s  cuánto se deslizó fuera de la pila (0 a 1),
   --hl resaltado de la capa que está al frente (0 a 1).
   Las capas pares salen hacia un lado y las impares hacia el otro. */
.explode__plate {
    position: absolute; inset: 0;
    --dir: 1; --z: 0; --s: 0; --hl: 0;
    border: 1.5px solid rgba(92, 155, 255, calc(0.3 + var(--hl) * 0.35));
    border-radius: 14px;
    background: rgba(20, 23, 29, 0.92);
    box-shadow: 0 0 calc(20px + var(--hl) * 30px) rgba(0, 100, 248, calc(0.04 + var(--hl) * 0.1));
    transform: translate3d(calc(var(--s) * var(--dir) * 680px), 0, calc(var(--z) * 1px));
    opacity: calc(1 - var(--s));
    padding: 22px 24px;
}
.explode__plate:nth-child(even) { --dir: -1; }

/* Capa frontal: la pantalla completa (barra, indicadores y gráfico). */
.explode__plate--screen {
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 18px 64px 1fr;
    gap: 14px;
    border-color: rgba(92, 155, 255, 0.6);
}
.explode__plate--screen span { border-radius: 6px; background: rgba(92, 155, 255, 0.14); }
.explode__plate--screen .xp-bar { grid-column: 1 / -1; background: rgba(92, 155, 255, 0.22); }
.explode__plate--screen .xp-chart {
    grid-column: 1 / -1;
    background:
        linear-gradient(to top, rgba(0, 100, 248, 0.35) 0 38%, transparent 38%) 6% 100% / 9% 100% no-repeat,
        linear-gradient(to top, rgba(0, 100, 248, 0.35) 0 62%, transparent 62%) 20% 100% / 9% 100% no-repeat,
        linear-gradient(to top, rgba(0, 100, 248, 0.35) 0 48%, transparent 48%) 34% 100% / 9% 100% no-repeat,
        linear-gradient(to top, rgba(0, 100, 248, 0.35) 0 80%, transparent 80%) 48% 100% / 9% 100% no-repeat,
        linear-gradient(to top, rgba(0, 100, 248, 0.35) 0 56%, transparent 56%) 62% 100% / 9% 100% no-repeat,
        linear-gradient(to top, rgba(0, 100, 248, 0.35) 0 70%, transparent 70%) 76% 100% / 9% 100% no-repeat,
        linear-gradient(to top, rgba(0, 100, 248, 0.35) 0 44%, transparent 44%) 90% 100% / 9% 100% no-repeat,
        rgba(92, 155, 255, 0.06);
}

/* Ilustraciones de los módulos. Viven en una capa propia que flota apenas por
   encima de la tarjeta del frente (relieve), con una copia como sombra pegada
   a la tarjeta. Al scrollear, la tarjeta se desliza y el dibujo se transforma
   en el siguiente: sus líneas se borran y en el mismo lugar se trazan las del
   próximo. script.js da a cada dibujo --draw (0 trazado, 1 borrado). */
.explode__art {
    position: absolute; inset: 0;
    transform: translateZ(calc(var(--p) * 30px));
    pointer-events: none;
}
.explode__art--shadow { transform: translateZ(1px); filter: blur(3px); }
.xp-art {
    position: absolute; inset: 0; width: 100%; height: 100%;
    --draw: 1;
    fill: none;
    stroke: rgba(122, 176, 255, 0.85); stroke-width: 3;
    stroke-linecap: round; stroke-linejoin: round;
    opacity: calc(var(--p) * (1 - var(--draw) * 0.6));
    filter: drop-shadow(0 0 4px rgba(0, 100, 248, 0.2));
}
/* Trazado: con pathLength="1" (lo agrega script.js) la línea se dibuja o se
   borra con el desfasaje del guion, del 0 (completa) al 1 (vacía). */
.xp-art [pathLength] { stroke-dasharray: 1 1; stroke-dashoffset: var(--draw); }
.xp-art .xp-f { fill: rgba(0, 100, 248, calc(0.22 * (1 - var(--draw)))); }  /* superficie rellena */
.xp-art .xp-t { stroke: rgba(122, 176, 255, 0.4); }                          /* trazo secundario */
.xp-art .xp-d { stroke-dasharray: 6 8; opacity: calc(1 - var(--draw)); }     /* troquel */
.xp-art .xp-bg { fill: rgba(20, 23, 29, calc(1 - var(--draw))); }            /* tapa lo de atrás (ruedas) */
.xp-art .xp-tooth { stroke-width: 12; stroke-linecap: butt; }
/* La sombra: mismo dibujo, oscuro y difuso, sobre la tarjeta. */
.explode__art--shadow .xp-art { stroke: rgba(0, 0, 0, 0.7); filter: none; }
.explode__art--shadow .xp-art .xp-f,
.explode__art--shadow .xp-art .xp-bg { fill: none; }

/* ---------- Pantallas completas ----------
   Cada bloque ocupa exactamente el alto y el ancho de la ventana, con su
   contenido centrado. El enganche por secciones lo maneja script.js
   (animación propia, más suave que el scroll-snap nativo).
   Se usa min-height (no height) para que nada quede cortado si el contenido
   crece: el contenido de cada sección está ajustado para entrar en una pantalla. */
.hero, .section, .cta {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    /* 72px de navbar fija + aire */
    padding-block: 104px 56px;
}
.hero > .container,
.section > .container,
.cta > .container { width: 100%; }

.section__head { max-width: 640px; margin-bottom: 24px; }
.section__head--wide { max-width: 760px; }
.eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-text);
    margin-bottom: 10px;
}
.section__title {
    font-size: clamp(28px, 3.6vw, 36px);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 14px;
}
.section__title--xl { font-size: clamp(30px, 4vw, 40px); }
.section__lead { font-size: 16.5px; line-height: 1.6; color: var(--text); }

/* ---------- Iconos (Phosphor) ---------- */
.icon {
    font-size: 22px;
    line-height: 1;
    display: inline-block;
    flex: none;
}
.icon--sm { font-size: 16px; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 26px;
    border-radius: 8px;
    font-weight: 600; font-size: 15.5px;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
                border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
                transform 0.2s var(--ease);
}
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 100, 248, 0.28); }
.btn--ghost { background: var(--card); color: var(--ink); border: 1px solid var(--border-strong); }
.btn--ghost:hover { border-color: #4a5061; background: #20242c; transform: translateY(-1px); }
.btn--light { background: #fff; color: var(--page); }
.btn--light:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }

/* ---------- Animaciones de aparición ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
[data-delay="1"] { --d: 1; } [data-delay="2"] { --d: 2; }
[data-delay="3"] { --d: 3; } [data-delay="4"] { --d: 4; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    background: transparent;
    transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
                border-color 0.3s var(--ease);
    border-bottom: 1px solid transparent;
}
.nav--scrolled {
    background: rgba(23, 26, 32, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.nav__brand-logo { height: 32px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links > a:not(.btn) {
    font-size: 14.5px; font-weight: 500; color: var(--text);
    position: relative; padding-block: 4px;
    transition: color 0.2s var(--ease);
}
.nav__links > a:not(.btn)::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 100%; height: 1.5px; background: var(--blue);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.25s var(--ease);
}
.nav__links > a:not(.btn):hover,
.nav__links > a.is-active { color: var(--ink); }
.nav__links > a:not(.btn):hover::after,
.nav__links > a.is-active::after { transform: scaleX(1); }
/* Botón del header en oscuro, para que no compita con el contenido. */
.nav__cta { margin-left: 8px; }
.nav__links .nav__cta {
    background: var(--card); color: var(--ink);
    border: 1px solid var(--border-strong); box-shadow: none;
}
.nav__links .nav__cta:hover {
    background: #20242c; border-color: #4a5061;
    box-shadow: none;
}
.nav__toggle {
    display: none; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    min-width: 44px; min-height: 44px; padding: 8px;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.25s; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background:
        radial-gradient(1000px 560px at 88% -8%, rgba(0, 100, 248, 0.1), transparent 62%),
        radial-gradient(760px 520px at -6% 108%, rgba(0, 40, 255, 0.05), transparent 60%);
    overflow: hidden;
}
/* Composición: el video arriba a la derecha y el título abajo, a lo ancho.
   La esquina superior izquierda queda para la S grande difuminada. */
/* Título a la izquierda, video a la derecha, centrados en altura. */
.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 56px;
    align-items: center;
}
.hero__copy { order: -1; }
/* Isotipo grande, cortado contra la esquina y desvanecido hacia el centro.
   Sin filtro de desenfoque: el difuminado lo da solo la máscara, así el
   borde del SVG queda nítido. */
.hero__mark {
    position: absolute; bottom: -50px; left: -120px; z-index: -1;
    width: 560px; height: auto;
    opacity: 0.08;
    -webkit-mask-image: radial-gradient(circle at 30% 70%, rgba(0, 0, 0, 0.9) 0%, transparent 62%);
            mask-image: radial-gradient(circle at 30% 70%, rgba(0, 0, 0, 0.9) 0%, transparent 62%);
    pointer-events: none;
}
.hero__title {
    font-size: clamp(40px, 4.8vw, 68px);
    font-weight: 700; line-height: 1.04; letter-spacing: -0.035em;
    color: var(--ink);
}
.hero__title span { color: var(--blue-text); }
/* Logo dentro del título: alto de las mayúsculas, apoyado en la línea de base. */
.hero__logo {
    display: inline-block; height: 0.72em; width: auto;
    vertical-align: baseline; margin-left: 0.06em;
}
.hero__sub { margin-top: 22px; font-size: 18px; line-height: 1.5; color: var(--text); }

/* Videos alternados: la computadora y el celular se turnan. Con .is-phone
   el celular pasa al frente, más grande, y la pantalla queda atenuada. */
/* El transform de .mockup lo usa el parallax: solo se animan opacidad y filtro. */
.mockup { transition: filter 0.7s var(--ease); }
/* El celular se agranda cambiando su ancho (no con scale): un video escalado
   con transform quedaba ampliado y recortado al volver a su tamaño. */
.hero__phone { transition: width 0.7s var(--ease), transform 0.7s var(--ease); }
/* Se oscurece en vez de volverse transparente: así sigue tapando la pantalla
   del fondo, que está justo detrás. */
.hero__visual.is-phone .mockup { filter: brightness(0.38) saturate(0.6); }
.hero__visual.is-phone .clip__hint { opacity: 0 !important; }
.hero__visual.is-phone .hero__phone { width: calc(var(--phone-w) * 1.65); transform: translateX(-90px); }

/* ---------- Mockup (captura real) ---------- */
.hero__visual { min-width: 0; position: relative; }
.mockup {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(92, 155, 255, 0.06), 0 0 70px rgba(0, 100, 248, 0.07);
    overflow: hidden;
    font-size: 11px;
    will-change: transform;
}
.mockup__bar {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--app-line);
    background: var(--app-bar);
}
.mockup__dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3f4a; }
.mockup__url {
    margin-left: 10px; padding: 3px 14px;
    background: var(--app-bg); border: 1px solid var(--app-line); border-radius: 20px;
    color: #8b93a1; font-size: 10.5px;
}
/* El aspect-ratio fijo reserva el lugar del video antes de que cargue. */
.mockup__slides { position: relative; aspect-ratio: 16 / 9; background: var(--app-bg); }

/* ---------- Teléfono flotante (vista mobile / instalable) ---------- */
.hero__phone {
    position: absolute; right: -14px; bottom: -30px;
    --phone-w: 132px;
    width: var(--phone-w); margin: 0;
    z-index: 2;
}
.hero__phone-shot {
    display: block; width: 100%; height: auto; aspect-ratio: 374 / 666;
    border: 5px solid #2a2e37;
    border-radius: 22px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 20px 50px rgba(0, 0, 0, 0.55);
    background: var(--app-bg);
}

/* ============================================================
   COMPARATIVA — hoy vs. con SIVEM
   ============================================================ */
.compare__table {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.compare__head, .compare__row {
    display: grid; grid-template-columns: 1fr 1fr;
}
.compare__head {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.compare__head span {
    padding: 11px 22px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
}
.compare__head-before { color: var(--muted); }
.compare__head-after { color: var(--blue-text); border-left: 1px solid var(--border); }
.compare__row + .compare__row { border-top: 1px solid var(--border); }
.compare__row > span {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 22px;
    font-size: 14px; line-height: 1.4;
}
.compare__before { color: var(--muted); }
.compare__before .icon { color: #4a5160; }
.compare__after {
    color: var(--ink); font-weight: 500;
    border-left: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(0, 100, 248, 0.08), transparent 70%);
}
.compare__after .icon { color: var(--blue-text); }

/* ============================================================
   MÓDULOS
   ============================================================ */
.modules__grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
/* Dos tarjetas lado a lado (Combustible, Reportes). */
.split {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    align-items: start;
}
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease),
                opacity 0.7s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card .icon { color: var(--blue-text); margin-bottom: 10px; font-size: 20px; }
.card h3 { font-size: 15.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; letter-spacing: -0.01em; }
.card p { font-size: 13px; line-height: 1.45; color: var(--text); }

/* Ficha de módulo: icono y nombre en una línea, descripción debajo. */
.card--module {
    display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 6px;
    align-items: center;
    padding: 15px 17px;
}
.card--module .icon { margin-bottom: 0; }
.card--module h3 { margin-bottom: 0; font-size: 14.5px; }
.card--module p { grid-column: 1 / -1; font-size: 13px; }

.card--featured {
    padding: 22px 24px;
    border-color: rgba(0, 100, 248, 0.4);
    background: linear-gradient(180deg, var(--card) 0%, #15233f 160%);
}
.card--featured__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card--featured__head .icon { margin-bottom: 0; }
.card--featured__head h3 { margin-bottom: 0; font-size: 16.5px; }
.card--featured__list { margin-top: 12px; display: grid; gap: 7px; }
.card--featured__list li {
    position: relative; padding-left: 16px; font-size: 12.5px; line-height: 1.45; color: var(--text);
}
.card--featured__list li::before {
    content: ""; position: absolute; left: 0; top: 6px;
    width: 6px; height: 6px; border-radius: 2px; background: var(--blue); opacity: 0.6;
}
.card--featured p strong,
.card--featured__list li strong { font-weight: 600; color: var(--ink); }
.split .card--featured__list li { font-size: 13.5px; }
.split .card--featured p { font-size: 14px; line-height: 1.5; }

/* ============================================================
   CÓMO FUNCIONA — pasos horizontales
   ============================================================ */
.timeline {
    position: relative;
    --tl-gap: 28px;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--tl-gap);
}
.timeline__item {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
/* Conector entre pasos: pista gris que se rellena de azul al entrar en pantalla.
   Va de 10px después de un círculo a 10px antes del siguiente (que empieza
   donde termina el hueco entre columnas). */
.timeline__item::before {
    content: ""; position: absolute; top: 21px; left: 54px; right: calc(10px - var(--tl-gap)); height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--blue)) no-repeat, var(--border);
    background-size: 0% 100%;
    transition: background-size 0.55s var(--ease);
    transition-delay: calc(var(--d, 0) * 260ms);
}
.timeline__item:last-child::before { content: none; }
.timeline.is-drawn .timeline__item::before { background-size: 100% 100%; }
.timeline__num {
    position: relative; z-index: 1; flex: none;
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--card); border: 1.5px solid var(--border-strong);
    font-weight: 700; font-size: 16px; color: var(--muted);
    transition: border-color 0.4s var(--ease), color 0.4s var(--ease), background-color 0.4s var(--ease);
}
/* Fondo sólido (el tinte azul ya mezclado con el fondo): uno translúcido deja
   ver la línea y el dibujo de fondo a través del círculo. */
.timeline__item.is-visible .timeline__num { border-color: var(--blue-text); color: var(--blue-text); background: #11213d; }
.timeline__item h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: -6px; letter-spacing: -0.01em; line-height: 1.35; }
.timeline__item p { font-size: 14px; line-height: 1.55; color: var(--text); }
.flow__notes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.flow__note {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 13px 16px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 14px; line-height: 1.5; color: var(--ink);
}
.flow__note .icon { color: var(--blue-text); font-size: 19px; margin-top: 1px; }

/* ============================================================
   VIDEOS DE MÓDULOS
   ============================================================ */
/* Video del inicio, dentro del marco de navegador: clic para ampliarlo. */
.clip__open {
    position: absolute; inset: 0; display: block; width: 100%; height: 100%;
    background: var(--app-bg);
    cursor: zoom-in;
}
.clip__video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.clip__hint {
    position: absolute; right: 10px; bottom: 10px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 6px;
    background: rgba(15, 17, 21, 0.82); border: 1px solid var(--app-line);
    font-size: 12px; font-weight: 600; color: var(--ink);
    opacity: 0; transition: opacity 0.2s var(--ease);
}
.clip__hint .ph { font-size: 14px; }
.clip__open:hover .clip__hint, .clip__open:focus-visible .clip__hint { opacity: 1; }

.clip-dialog {
    margin: auto; padding: 0; border: 1px solid var(--app-line); border-radius: var(--radius-lg);
    width: min(1180px, 92vw); background: var(--app-bg); color: var(--ink);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
    overflow: visible;
}
.clip-dialog::backdrop { background: rgba(5, 7, 10, 0.82); backdrop-filter: blur(4px); }
.clip-dialog__video { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.clip-dialog__close {
    position: absolute; top: -46px; right: 0;
    display: grid; place-items: center; width: 38px; height: 38px;
    border-radius: 50%; background: var(--card); border: 1px solid var(--border-strong);
    color: var(--ink); font-size: 18px;
}
.clip-dialog__close:hover { background: #20242c; }

/* ============================================================
   ACCESOS Y CONTROL
   ============================================================ */
.roles__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
/* Para qué flotas: cuatro tipos de organización. */
.fleets__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fleets__grid .card--role__head { align-items: flex-start; }
.fleets__grid .card--role__head .icon { margin-top: 2px; }
.fleets__grid .card--role__head h3 { line-height: 1.3; }
.card--role__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.card--role__head .icon { margin-bottom: 0; }
.card--role__head h3 { margin-bottom: 0; font-size: 16px; }
.card--role p { font-size: 13.5px; line-height: 1.55; }

.controls {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px;
    margin-top: 26px; padding-top: 22px;
    border-top: 1px solid var(--border);
}
.controls__item {
    display: flex; align-items: flex-start; gap: 11px;
    font-size: 14px; line-height: 1.5; color: var(--ink);
}
.controls__item .icon { color: var(--blue-text); font-size: 20px; margin-top: 1px; }

/* ============================================================
   CONFIANZA
   ============================================================ */
.section--trust {
    background:
        radial-gradient(900px 420px at 50% 0%, rgba(0, 100, 248, 0.07), transparent 70%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
/* Encabezado con el escudo del municipio a la derecha. */
.trust__top {
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
    margin-bottom: 24px;
}
.trust__top .section__head { margin-bottom: 0; }
.trust__logo { flex: none; height: 96px; width: auto; opacity: 0.92; }
/* Carrusel y prensa lado a lado: es lo que permite que la sección entre en una pantalla. */
.trust__body {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px;
    align-items: center;
}
.trust__slider { min-width: 0; }
.trust__slides {
    position: relative; aspect-ratio: 3 / 2;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.trust__slide {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0;
    transition: opacity 0.7s var(--ease);
}
.trust__slide.is-active { opacity: 1; }
.trust__dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.trust__dot { padding: 8px 4px; line-height: 0; }
.trust__dot::before {
    content: ""; display: block;
    width: 8px; height: 8px; border-radius: 4px;
    background: #3a4050;
    transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}
.trust__dot:hover::before { background: #5a6274; }
.trust__dot.is-active::before { width: 24px; background: var(--blue); }

.trust__subtitle { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 12px; letter-spacing: -0.01em; }

.trust__press-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.press-card {
    display: flex; flex-direction: column; gap: 4px;
    padding: 13px 16px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease),
                opacity 0.7s var(--ease);
}
.press-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.press-card__source {
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--muted);
}
.press-card__title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4; letter-spacing: -0.01em; }
.press-card__link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; color: var(--blue-text); margin-top: 2px;
}
.press-card__link .icon--sm { transition: transform 0.25s var(--ease); }
.press-card:hover .press-card__link .icon--sm { transform: translate(2px, -2px); }

/* ============================================================
   IMPLEMENTACIÓN — fases
   ============================================================ */
.phases__list {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
}
.phase {
    display: flex; flex-direction: column; gap: 6px;
    padding-top: 18px;
    border-top: 2px solid var(--blue);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.phase__num { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-text); }
.phase h3 { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.35; }
.phase__duration { font-size: 13.5px; color: var(--muted); }
.phases__note { margin-top: 36px; max-width: 860px; }
.phases__note strong { font-weight: 600; }
.phase__desc { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--text); }
/* ============================================================
   FAQ
   ============================================================ */
/* Dos columnas independientes: abrir una pregunta no desplaza la otra columna. */
.faq__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; align-items: start; }
.faq__list { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 15px 4px;
    font-size: 15.5px; font-weight: 600; color: var(--ink);
    cursor: pointer; list-style: none;
    transition: color 0.2s var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--blue-text); }
.faq__item summary .icon--sm { color: var(--muted); transition: transform 0.3s var(--ease); }
.faq__item[open] summary .icon--sm { transform: rotate(180deg); color: var(--blue-text); }
.faq__answer { overflow: hidden; }
.faq__answer p { padding: 0 4px 18px; font-size: 14.5px; line-height: 1.55; color: var(--text); max-width: 68ch; }

/* ============================================================
   CTA FINAL
   ============================================================ */
.cta {
    background:
        radial-gradient(900px 500px at 50% 0%, rgba(0, 100, 248, 0.14), transparent 70%),
        linear-gradient(180deg, #0d1a33 0%, #0a1224 100%);
    border-top: 1px solid var(--border);
    text-align: center;
}
.cta__logo { height: 52px; width: auto; margin: 0 auto 28px; }
.cta__title {
    font-size: clamp(30px, 4.4vw, 44px);
    font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
    color: #fff; margin-bottom: 20px;
}
.cta__sub { font-size: 17.5px; color: rgba(255, 255, 255, 0.72); margin-bottom: 36px; max-width: 52ch; margin-inline: auto; }
.cta__note { margin-top: 22px; font-size: 13.5px; color: rgba(255, 255, 255, 0.78); }
.cta__email { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Menú para elegir con qué correo escribir (lo abre script.js). */
.contact { position: relative; z-index: 2; display: inline-block; }
.contact__caret { margin-left: 8px; font-size: 14px; transition: transform 0.2s var(--ease); }
.contact__toggle[aria-expanded="true"] .contact__caret { transform: rotate(180deg); }
.contact__menu {
    position: absolute; top: calc(100% + 10px); left: 50%;
    width: 280px; max-width: calc(100vw - 32px);
    transform: translateX(-50%);
    padding: 8px;
    background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    text-align: left;
    animation: contact-in 0.18s var(--ease);
}
.contact__menu[hidden] { display: none; }
@keyframes contact-in {
    from { opacity: 0; transform: translate(-50%, -6px); }
}
.contact__label { padding: 6px 10px 8px; font-size: 12.5px; color: var(--muted); }
.contact__option {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px; border-radius: 6px;
    font-size: 14.5px; font-weight: 500; color: var(--ink); text-align: left;
    transition: background-color 0.15s var(--ease);
}
.contact__option:hover { background: rgba(255, 255, 255, 0.06); }
.contact__option:focus-visible { outline-offset: -2px; }
.contact__option .ph { font-size: 18px; color: var(--blue-text); }
@media (prefers-reduced-motion: reduce) {
    .contact__menu { animation: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #0b0d10; border-top: 1px solid var(--border); padding-top: 56px; }
.footer__inner {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px;
    padding-bottom: 40px;
}
.footer__brand p { margin-top: 18px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col h2 {
    font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--ink); margin-bottom: 4px;
}
.footer__col a, .footer__col span { font-size: 14.5px; color: var(--text); }
.footer__col a { transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--blue-text); }
.footer__bottom {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    padding-block: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px; color: var(--muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Portátiles de poco alto (1366x768 y similares): mismo diseño, más apretado,
   para que cada sección siga entrando en una pantalla. */
@media (min-width: 769px) and (max-height: 820px) {
    .hero, .section, .cta { padding-block: 88px 36px; }
    .section__head { margin-bottom: 18px; }
    .section__title { font-size: clamp(24px, 3vw, 30px); margin-bottom: 10px; }
    .section__title--xl { font-size: clamp(26px, 3.2vw, 32px); }
    .section__lead { font-size: 15px; }
    .eyebrow { font-size: 12px; margin-bottom: 8px; }

    .hero__title { font-size: clamp(36px, 4.2vw, 56px); }
    .hero__sub { margin-top: 16px; font-size: 16px; }
    .hero__inner { gap: 44px; }
    .hero__mark { width: 340px; }

    .modules__grid { gap: 10px; }
    .split { gap: 10px; }
    .card { padding: 13px 15px; }
    .card .icon { margin-bottom: 7px; font-size: 18px; }
    .card h3 { font-size: 14.5px; margin-bottom: 3px; }
    .card p { font-size: 12.5px; line-height: 1.4; }
    .card--module { padding: 11px 14px; row-gap: 4px; }
    .card--module h3 { font-size: 13.5px; }
    .card--module p { font-size: 12px; }
    .card--featured { padding: 16px 18px; }
    .card--featured__list { margin-top: 8px; gap: 5px; }
    .card--featured__list li { font-size: 11.5px; }
    .split .card--featured__list li { font-size: 12.5px; }
    .split .card--featured p { font-size: 13px; }

    .flow__notes { margin-top: 22px; gap: 10px; }
    .flow__note { padding: 10px 14px; font-size: 13px; }
    .card--role p { font-size: 12.5px; line-height: 1.5; }
    .controls { margin-top: 18px; padding-top: 16px; gap: 10px 28px; }
    .controls__item { font-size: 13px; }
    .phase__desc { font-size: 13px; }
    .phases__note { margin-top: 24px; }

    .trust__logo { height: 80px; }
    .trust__top { margin-bottom: 18px; }
    .trust__body { gap: 32px; grid-template-columns: 1fr 1fr; }
    .trust__slides { aspect-ratio: 16 / 10; }
    .trust__dots { margin-top: 8px; }
    .press-card { padding: 9px 13px; }
    .press-card__title { font-size: 12.5px; }
    .trust__subtitle { font-size: 15px; margin-bottom: 9px; }

    .compare__row > span { padding: 8px 20px; font-size: 13px; }
    .compare__head span { padding: 8px 20px; }
    .faq__item summary { padding: 11px 4px; font-size: 14.5px; }
    .faq__answer p { padding-bottom: 14px; font-size: 13.5px; }
    .timeline { --tl-gap: 20px; }
    .cta__title { font-size: clamp(26px, 3.4vw, 34px); }
    .cta__sub { font-size: 16px; margin-bottom: 26px; }
    .cta__logo { height: 44px; margin-bottom: 20px; }
}

/* Con siete enlaces el menú no entra en una fila por debajo de este ancho:
   pasa a hamburguesa antes que el resto del layout móvil. */
@media (max-width: 1100px) {
    .nav__toggle { display: flex; }
    .nav__links {
        position: fixed; inset: 72px 0 auto 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--surface); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        padding: 12px 24px 20px;
        transform: translateY(-12px); opacity: 0; pointer-events: none;
        transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
    }
    .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
    .nav.is-open { background: var(--surface); border-bottom-color: var(--border); }
    .nav__links > a:not(.btn) { padding-block: 13px; font-size: 16px; border-bottom: 1px solid var(--border); }
    .nav__links > a:not(.btn)::after { display: none; }
    .nav__cta { margin: 16px 0 0; justify-content: center; }
}

@media (max-width: 1024px) {
    .explode__stack { --k: 0.85; }
    .fleets__grid { grid-template-columns: repeat(2, 1fr); }
    /* En una columna el título va primero y el video debajo. */
    .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .hero__visual { justify-self: start; width: 100%; }
    .modules__grid { grid-template-columns: repeat(3, 1fr); }
    .hero__visual { max-width: 640px; }
    .hero__phone { --phone-w: 116px; right: -6px; bottom: -24px; }
    .trust__body { grid-template-columns: 1fr; gap: 28px; }
    /* justify-self en vez de margin-inline:auto: un grid item con márgenes auto
       se achica a max-content y la foto queda diminuta. */
    .trust__slider { width: 100%; max-width: 560px; justify-self: center; }
    .trust__press-grid { grid-template-columns: repeat(2, 1fr); }
    .phases__list { grid-template-columns: repeat(3, 1fr); }
    .timeline { grid-template-columns: repeat(3, 1fr); --tl-gap: 28px; row-gap: 36px; }
    .timeline__item:nth-child(3)::before { content: none; }
    .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* En móvil el contenido no entra en una pantalla (12 módulos, 7 filas de
       comparativa): se vuelve al flujo normal antes que recortar contenido. */
    html { scroll-padding-top: 76px; }
    .hero, .section, .cta {
        min-height: 0;
        display: block;
        padding-block: 72px;
    }
    .hero { padding-top: 128px; padding-bottom: 72px; }
    .cta { padding-block: 96px; }
    .hero__phone { --phone-w: 96px; right: 4px; bottom: -18px; }
    .explode { opacity: 0.32; }
    .explode__stack { --k: 0.62; --xe: 50vw; --ye: 40vh; }
    .hero__mark { width: 380px; bottom: -40px; left: -100px; }
    .modules__grid { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
    .trust__top { align-items: flex-start; gap: 20px; }
    .trust__logo { height: 56px; }
    .flow__notes { grid-template-columns: 1fr; }
    .clip__hint { opacity: 1; }
    .roles__grid { grid-template-columns: 1fr; }
    .fleets__grid { grid-template-columns: 1fr; }
    .controls { grid-template-columns: 1fr; }
    .faq__cols { grid-template-columns: 1fr; }
    /* Apiladas, la segunda lista ya tiene el borde inferior de la primera. */
    .faq__list + .faq__list { border-top: none; }
    .trust__press-grid { grid-template-columns: 1fr; }
    /* Fotos más verticales: en pantallas angostas el recorte 3/2 dejaba a las
       personas demasiado chicas. */
    .trust__slider { max-width: none; }
    .trust__slides { aspect-ratio: 4 / 5; }
    .trust__slide { object-position: center 40%; }
    .trust__dots { margin-top: 14px; }
    .phases__list { grid-template-columns: 1fr; gap: 20px; }
    .timeline { grid-template-columns: 1fr; row-gap: 28px; }
    .timeline__item::before { content: none; }
    .compare__head { display: none; }
    .compare__row { grid-template-columns: 1fr; }
    .compare__after { border-left: none; border-top: 1px dashed var(--border); }
    .compare__row > span { padding: 12px 18px; }
    .footer__inner { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 480px) {
    .container { padding-inline: 20px; }
    .modules__grid { grid-template-columns: 1fr; }
    /* En pantallas muy angostas el badge no entra al lado del teléfono:
       queda debajo, alineado al borde derecho. */
    .hero__phone { --phone-w: 84px; right: 0; bottom: -14px; }
}

/* ============================================================
   ACCESIBILIDAD — reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html, html.is-ready { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .timeline.is-drawn .timeline__item::before { background-size: 100% 100%; }
}
