/* Landing de DisT-At (dist-at.com) — plan 11, 11/10/2026.
   Colores = tokens de la app (web/src/index.css): crema y azul pizarra en claro, grafito en oscuro.
   --brand-* sale del logo (verde petróleo y turquesa de los pines). Sigue el tema del sistema. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-500.woff2') format('woff2');
}

:root {
  --bg: #f6f4ee;
  --surface: #fcfbf8;
  --surface2: #eaece8;
  --line: #dde4e1;
  --line2: #758b95;
  --text: #2e3a44;
  --muted: #4c5f6b;
  --primary: #2d6778;
  --on-primary: #f6f4ee;
  --deep: #1e4b59;
  --primary-tint: rgba(45, 103, 120, 0.1);
  --success: #346b46;
  --warning: #735d21;
  --map-bg: #dde4e1;
  --map-block: #eaece8;
  --map-road: #fcfbf8;
  --shadow: 0 2px 8px rgba(46, 58, 68, 0.07);
  --shadow-lg: 0 18px 40px rgba(46, 58, 68, 0.14);
  --brand-bg: #0d2626;
  --brand-ink: #f2f2f5;
  --brand-pin: #2bb5ab;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-body);
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --surface: #1a1a1d;
    --surface2: #232327;
    --line: rgba(242, 242, 245, 0.12);
    --line2: #797986;
    --text: #f2f2f5;
    --muted: #c9c9d2;
    --primary: #7cb8c9;
    --on-primary: #0e0e10;
    --deep: #7cb8c9;
    --primary-tint: rgba(124, 184, 201, 0.12);
    --success: #7fbf95;
    --warning: #d2a857;
    --map-bg: #141416;
    --map-block: #1f1f23;
    --map-road: #313136;
    --shadow: none;
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.salto { position: absolute; left: -9999px; }
.salto:focus { left: 16px; top: 12px; z-index: 20; background: var(--surface); padding: 8px 12px; }

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primario { background: var(--primary); color: var(--on-primary); }
.btn-primario:hover { background: var(--deep); }
@media (prefers-color-scheme: dark) { .btn-primario:hover { background: #9ccbd8; } }
.btn-borde { border-color: var(--line2); color: var(--text); background: transparent; }
.btn-borde:hover { border-color: var(--primary); color: var(--primary); }
.btn-chico { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* --- Encabezado --- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 244, 238, 0.86);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: dark) { .cabecera { background: rgba(14, 14, 16, 0.82); } }
.cabecera .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.marca { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 19px var(--font-display); letter-spacing: -0.01em; }
.marca img { width: 34px; height: 34px; border-radius: 9px; }
.menu { display: none; gap: 24px; margin-left: auto; }
.menu a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.menu a:hover { color: var(--text); }
.cabecera .btn { margin-left: auto; }
@media (min-width: 820px) {
  .menu { display: flex; }
  .cabecera .btn { margin-left: 8px; }
}

/* --- Portada --- */
.portada { padding: 48px 0 56px; }
.portada .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) {
  .portada { padding: 80px 0 88px; }
  .portada .wrap { grid-template-columns: 1.02fr 1fr; gap: 56px; }
}
.ceja {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 13px var(--font-mono);
  color: var(--primary);
  background: var(--primary-tint);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.ceja::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-pin); }
.portada h1 { font-size: clamp(36px, 7vw, 60px); }
.portada h1 em { font-style: normal; color: var(--primary); }
.portada .bajada { font-size: clamp(17px, 2.2vw, 19px); color: var(--muted); margin: 20px 0 30px; max-width: 34em; }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.nota-acceso { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* --- Datos rápidos --- */
.datos { border-block: 1px solid var(--line); background: var(--surface); }
.datos ul { list-style: none; margin: 0; padding: 22px 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .datos ul { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.datos li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--muted); }
.datos li strong { color: var(--text); display: block; font-weight: 600; }
.datos .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; flex: none; }
.datos .ico svg { width: 20px; height: 20px; }

/* --- Secciones --- */
.seccion { padding: 72px 0; }
@media (min-width: 960px) { .seccion { padding: 104px 0; } }
.seccion-alt { background: var(--surface); border-block: 1px solid var(--line); }
.titulo-seccion { max-width: 40em; margin-bottom: 44px; }
.titulo-seccion .ceja { margin-bottom: 14px; }
.titulo-seccion h2 { font-size: clamp(28px, 4.4vw, 42px); }
.titulo-seccion p { color: var(--muted); margin-top: 14px; font-size: 18px; }

/* --- Funciones (filas alternadas con maqueta) --- */
.funcion { display: grid; gap: 28px; align-items: center; }
.funcion + .funcion { margin-top: 64px; }
@media (min-width: 900px) {
  .funcion { grid-template-columns: 1fr 1fr; gap: 64px; }
  .funcion + .funcion { margin-top: 96px; }
  .funcion.invertida .funcion-texto { order: 2; }
}
.funcion h3 { font-size: clamp(24px, 3.2vw, 30px); margin-bottom: 14px; }
.funcion-texto > p { color: var(--muted); }
.lista-check { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.lista-check li { display: flex; gap: 10px; align-items: flex-start; }
.lista-check li::before {
  content: '';
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--primary-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5' fill='none' stroke='%232d6778' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .lista-check li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5' fill='none' stroke='%237cb8c9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}

/* --- Maquetas (datos inventados, nada real) --- */
.maqueta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.maqueta-barra { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface2); }
.maqueta-barra i { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); opacity: 0.5; }
.maqueta-barra span { margin-left: 8px; font: 500 12px var(--font-mono); color: var(--muted); }
.mono { font-family: var(--font-mono); font-weight: 500; }

.mapa { width: 100%; height: auto; }
.mapa .fondo { fill: var(--map-bg); }
.mapa .manzana { fill: var(--map-block); }
.mapa .ruta { fill: none; stroke: var(--primary); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.mapa .ruta-2 { fill: none; stroke: var(--warning); stroke-width: 3; stroke-dasharray: 6 6; stroke-linecap: round; opacity: 0.85; }
.mapa .comercio { fill: var(--surface); stroke: var(--line2); stroke-width: 1.5; }
.mapa .visitado { fill: var(--success); }
.mapa .pin { fill: var(--primary); }
.mapa .pin-2 { fill: var(--warning); }
.mapa .pin-txt { fill: var(--on-primary); font: 600 11px var(--font-body); }
.mapa .halo { fill: var(--primary); opacity: 0.18; }
@media (prefers-reduced-motion: no-preference) {
  .mapa .halo { animation: latido 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes latido { 0% { transform: scale(0.6); opacity: 0.35; } 100% { transform: scale(1.8); opacity: 0; } }

.tarjeta-flotante {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}
.tarjeta-flotante b { display: block; font-size: 14px; }
.tarjeta-flotante .mono { color: var(--muted); font-size: 12px; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--success); font-weight: 600; }
.estado::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado.ambar { color: var(--warning); }

/* Equipo en vivo: lista al costado del mapa */
.vivo { display: grid; }
@media (min-width: 560px) { .vivo { grid-template-columns: 1fr 190px; } }
.vivo-lista { list-style: none; margin: 0; padding: 8px; border-top: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
@media (min-width: 560px) { .vivo-lista { border-top: 0; border-left: 1px solid var(--line); } }
.vivo-lista li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; font-size: 13px; line-height: 1.3; }
.vivo-lista li:first-child { background: var(--primary-tint); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font: 600 12px var(--font-body); flex: none; }
.avatar.ambar { background: var(--warning); }
.avatar.gris { background: var(--line2); }
.vivo-lista small { display: block; color: var(--muted); font: 500 11px var(--font-mono); }

/* Celular: pedido */
.celular {
  width: min(300px, 100%);
  margin: 0 auto;
  border-radius: 34px;
  border: 8px solid #1b1b1f;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.celular-top { display: flex; justify-content: space-between; padding: 10px 16px 6px; font: 500 11px var(--font-mono); color: var(--muted); }
.celular-cuerpo { padding: 6px 14px 16px; display: grid; gap: 10px; }
.celular h4 { margin: 0; font: 600 15px var(--font-display); }
.celular .sub { font-size: 12px; color: var(--muted); margin-top: -6px; }
.renglon { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 13px; line-height: 1.3; }
.renglon .foto { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.renglon .det { flex: 1; min-width: 0; }
.renglon .det small { display: block; color: var(--muted); font: 500 11px var(--font-mono); }
.cant { font: 600 13px var(--font-mono); background: var(--surface2); border-radius: 8px; padding: 4px 8px; }
.total { display: flex; justify-content: space-between; align-items: center; font-weight: 600; padding: 4px 2px; }
.aviso-offline { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--warning); background: rgba(115, 93, 33, 0.1); border-radius: 10px; padding: 8px 10px; }
@media (prefers-color-scheme: dark) { .aviso-offline { background: rgba(210, 168, 87, 0.12); } }
.aviso-offline svg { width: 16px; height: 16px; flex: none; }
.boton-falso { text-align: center; background: var(--primary); color: var(--on-primary); border-radius: 12px; padding: 11px; font-weight: 600; font-size: 14px; }

/* Catálogo */
.catalogo { padding: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .catalogo { grid-template-columns: repeat(3, 1fr); } }
.producto { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); font-size: 12px; line-height: 1.35; }
.producto .foto { aspect-ratio: 4 / 3; display: grid; place-items: center; }
.producto .foto svg { width: 42%; opacity: 0.9; }
.producto .det { padding: 8px 9px 10px; }
.producto b { display: block; font-size: 12.5px; }
.producto .precio { font: 600 13px var(--font-mono); color: var(--primary); margin-top: 4px; display: block; }
.f1 { background: #e7d9c4; } .f2 { background: #cfe0da; } .f3 { background: #d8d3e6; }
.f4 { background: #e9cfc9; } .f5 { background: #d3dde8; } .f6 { background: #e3e1c7; }
@media (prefers-color-scheme: dark) {
  .f1 { background: #3a3226; } .f2 { background: #26352f; } .f3 { background: #2f2c3b; }
  .f4 { background: #3b2a27; } .f5 { background: #27303b; } .f6 { background: #35341f; }
}
.f1 svg, .f2 svg, .f3 svg, .f4 svg, .f5 svg, .f6 svg { color: var(--text); }

/* Panel de dirección */
.panel { padding: 16px; display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi small { display: block; font-size: 11.5px; color: var(--muted); }
.kpi b { display: block; font: 600 clamp(17px, 2.4vw, 22px) var(--font-display); margin-top: 2px; }
.kpi .sube { font: 500 11px var(--font-mono); color: var(--success); }
.barras { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 8px; }
.barras-tit { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.barras svg { width: 100%; height: auto; }
.barras .b { fill: var(--primary); opacity: 0.35; }
.barras .b.hoy { opacity: 1; }
.barras .eje { fill: var(--muted); font: 500 10px var(--font-mono); }

/* Integración con el sistema de gestión */
.flujo { padding: 22px 16px; display: grid; gap: 12px; align-items: center; }
@media (min-width: 560px) { .flujo { grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; } }
.nodo { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; font-size: 13.5px; line-height: 1.4; }
.nodo b { display: block; font: 600 15px var(--font-display); margin-bottom: 4px; }
.nodo .mono { font-size: 11.5px; color: var(--muted); }
.nodo.centro { background: var(--brand-bg); border-color: var(--brand-bg); color: var(--brand-ink); }
.nodo.centro img { width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 10px; }
.nodo.centro .mono { color: #9fd6d0; }
.flechas { display: grid; gap: 4px; justify-items: center; font: 500 11px var(--font-mono); color: var(--muted); }
.flechas svg { width: 34px; height: 14px; color: var(--primary); }
.flechas .vuelta { transform: scaleX(-1); }
@media (max-width: 559px) {
  .flechas { grid-auto-flow: column; justify-content: center; gap: 12px; }
  .flechas svg { transform: rotate(90deg); }
  .flechas .vuelta { transform: rotate(-90deg); }
}

/* --- Más funciones (grilla) --- */
.grilla { display: grid; gap: 16px; margin-top: 72px; }
@media (min-width: 640px) { .grilla { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grilla { grid-template-columns: repeat(3, 1fr); } }
.celda { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.seccion-alt .celda { background: var(--bg); }
.celda .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; }
.celda .ico svg { width: 21px; height: 21px; }
.celda h3 { font-size: 18px; margin-bottom: 6px; letter-spacing: -0.01em; }
.celda p { color: var(--muted); font-size: 15.5px; }

/* --- Roles --- */
.roles { display: grid; gap: 16px; }
@media (min-width: 640px) { .roles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .roles { grid-template-columns: repeat(4, 1fr); } }
.rol { border-top: 3px solid var(--primary); background: var(--bg); border-radius: 4px 4px var(--radius) var(--radius); padding: 22px; border-inline: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rol .mono { font-size: 12px; color: var(--primary); }
.rol h3 { font-size: 20px; margin: 6px 0 10px; }
.rol p { color: var(--muted); font-size: 15.5px; }

/* --- Pasos --- */
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: paso; }
@media (min-width: 820px) { .pasos { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.pasos li { counter-increment: paso; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.pasos li::before { content: counter(paso, decimal-leading-zero); display: block; font: 500 14px var(--font-mono); color: var(--primary); margin-bottom: 12px; }
.pasos h3 { font-size: 20px; margin-bottom: 8px; }
.pasos p { color: var(--muted); font-size: 15.5px; }

/* --- Preguntas --- */
.preguntas { max-width: 820px; display: grid; gap: 12px; }
.preguntas details { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.preguntas summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 600; position: relative; }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 500 22px var(--font-mono); color: var(--primary); }
.preguntas details[open] summary::after { content: '−'; }
.preguntas details p { color: var(--muted); padding-bottom: 18px; }

/* --- Contacto --- */
.contacto { background: var(--brand-bg); color: var(--brand-ink); border-radius: 24px; padding: 40px 22px; display: grid; gap: 28px; position: relative; overflow: hidden; }
@media (min-width: 900px) { .contacto { grid-template-columns: 1.2fr 1fr; padding: 56px; align-items: center; } }
.contacto::after { content: ''; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 2px solid rgba(43, 181, 171, 0.25); pointer-events: none; }
.contacto h2 { font-size: clamp(28px, 4.4vw, 40px); }
.contacto p { color: #c4d4d2; margin-top: 12px; }
.contacto .acciones { flex-direction: column; align-items: stretch; position: relative; z-index: 1; }
.contacto .btn-primario { background: var(--brand-pin); color: #06201e; }
.contacto .btn-primario:hover { background: #4cc9bf; }
.contacto .btn-borde { color: var(--brand-ink); border-color: rgba(242, 242, 245, 0.35); }
.contacto .btn-borde:hover { border-color: var(--brand-pin); color: var(--brand-pin); }
.contacto .chico { font-size: 14px; color: #9fb5b3; text-align: center; }
.contacto .chico a { color: var(--brand-ink); }

/* --- Pie --- */
.pie { padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
.pie .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.pie nav { display: flex; flex-wrap: wrap; gap: 18px; }
.pie a { color: var(--muted); text-decoration: none; }
.pie a:hover { color: var(--text); }

/* --- 404 --- */
.vacia { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.vacia h1 { font-size: clamp(30px, 6vw, 44px); margin: 18px 0 10px; }
.vacia p { color: var(--muted); margin-bottom: 26px; }
.vacia .acciones { justify-content: center; }
.vacia .codigo { font: 500 14px var(--font-mono); color: var(--primary); }
