/* Sala de demos pública: 3 WhatsApp realistas. Marca Staffwork arriba. */

:root {
  --wa-verde: #075e54;
  --wa-verde-claro: #128c7e;
  --wa-chat: #e5ddd5;
  --wa-propio: #dcf8c6;
  --wa-otro: #ffffff;
  --wa-tick: #34b7f1;
  --wa-hora: #667781;
  --violeta: #7c5cfc;
  --cian: #22d3ee;
  --fondo: #0a0b10;
  --texto: #e9ecf5;
  --texto-suave: #9aa1b5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(124, 92, 252, 0.14), transparent 60%),
    var(--fondo);
  color: var(--texto);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* -------------------------------------------------------------- hero */
.hero { text-align: center; padding: 34px 20px 10px; }
.hero-marca { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.hero-marca img { width: 34px; height: 34px; border-radius: 9px; }
.hero-marca span { font-size: 1.05rem; letter-spacing: 0.02em; }
.hero-marca b { color: var(--cian); }
.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.15; font-weight: 700;
  background: linear-gradient(120deg, #fff, #b7c0d8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 640px; margin: 14px auto 0; color: var(--texto-suave); font-size: 1.02rem; line-height: 1.5; }
.hero-sub b { color: var(--texto); }

/* ---------------------------------------------------------- teléfonos */
.telefonos {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 26px;
  padding: 30px 20px 10px;
}
.tel { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* marco del teléfono */
.marco {
  width: 310px; height: 620px;
  background: #0b0b0d; border-radius: 40px; padding: 11px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 2px #22242b, inset 0 0 0 2px #000;
  position: relative;
}
.marco::before { /* notch */
  content: ""; position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 22px; background: #0b0b0d; border-radius: 0 0 14px 14px; z-index: 4;
}

.wa { width: 100%; height: 100%; border-radius: 30px; overflow: hidden; display: flex; flex-direction: column; background: var(--wa-chat); position: relative; }

/* barra de estado del celu */
.wa-status {
  background: var(--wa-verde); color: #fff; height: 34px;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 16px 4px; font-size: 0.72rem; font-weight: 600;
}
.wa-status .der { display: flex; gap: 5px; align-items: center; opacity: 0.95; }

/* header del chat */
.wa-top {
  background: var(--wa-verde); color: #fff;
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; height: 58px;
}
.wa-top .volver { font-size: 1.5rem; line-height: 1; opacity: 0.95; }
.wa-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.15rem; color: #fff; flex-shrink: 0;
}
.wa-quien { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.wa-quien strong { font-size: 0.92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-quien .estado { font-size: 0.72rem; opacity: 0.85; }
.wa-iconos { display: flex; gap: 16px; opacity: 0.95; }
.wa-iconos svg { width: 19px; height: 19px; }

/* área de mensajes */
.wa-chat {
  flex: 1; overflow-y: auto; padding: 12px 9px;
  display: flex; flex-direction: column; gap: 5px;
  background-color: var(--wa-chat);
  background-image: radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  scroll-behavior: smooth;
}
.msg {
  max-width: 82%; padding: 6px 9px 5px; border-radius: 8px; font-size: 0.86rem; line-height: 1.35;
  position: relative; box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13); color: #111b21;
  white-space: pre-wrap; overflow-wrap: break-word; animation: aparece 0.16s ease-out;
}
@keyframes aparece { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.msg .hora { font-size: 0.63rem; color: var(--wa-hora); float: right; margin: 6px 0 -2px 8px; }
.msg .tick { color: var(--wa-tick); font-size: 0.7rem; margin-left: 2px; }
.msg.negocio { align-self: flex-start; background: var(--wa-otro); border-top-left-radius: 2px; }
.msg.cliente { align-self: flex-end; background: var(--wa-propio); border-top-right-radius: 2px; }

/* "escribiendo…" burbuja */
.escribiendo { align-self: flex-start; background: var(--wa-otro); border-radius: 8px; border-top-left-radius: 2px; padding: 9px 12px; box-shadow: 0 1px 0.5px rgba(0,0,0,0.13); }
.escribiendo i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #90a4ae; margin: 0 1.5px; animation: latir 1s infinite; }
.escribiendo i:nth-child(2){animation-delay:.15s} .escribiendo i:nth-child(3){animation-delay:.3s}
@keyframes latir { 0%,60%,100%{opacity:.3;transform:none} 30%{opacity:1;transform:translateY(-3px)} }

/* barra de escribir */
.wa-input { display: flex; align-items: center; gap: 7px; padding: 7px 8px; background: #f0f0f0; }
.wa-input .campo { flex: 1; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 22px; padding: 8px 12px; }
.wa-input input { flex: 1; border: none; outline: none; font-size: 0.88rem; background: transparent; color: #111b21; }
.wa-input .enviar { width: 40px; height: 40px; border: none; border-radius: 50%; background: var(--wa-verde-claro); color: #fff; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.wa-input .enviar svg { width: 20px; height: 20px; }
.wa-input .emoji { font-size: 1.2rem; opacity: 0.5; }

/* botón CTA bajo cada teléfono */
.tel .cta {
  background: #25d366; color: #05310f; border: none; border-radius: 999px;
  padding: 11px 20px; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: transform 0.12s ease;
}
.tel .cta:hover { transform: translateY(-1px); }
.tel .rubro-tag { font-size: 0.8rem; color: var(--texto-suave); letter-spacing: 0.02em; }

/* ============ RECORRIDO COMPLETO (pantalla dividida) ============ */
.recorrido { max-width: 1180px; margin: 30px auto 0; padding: 0 20px; }
.rec-titulo { text-align: center; margin-bottom: 32px; }
.rec-tag {
  display: inline-block; font-size: 0.9rem; letter-spacing: 0.16em; font-weight: 700;
  background: linear-gradient(135deg, #7C5CFC, #38C6E8); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 12px;
}
.rec-titulo h2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.12; font-weight: 800; }
.rec-titulo h2 b { background: linear-gradient(135deg, #7C5CFC, #38C6E8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rec-titulo p { max-width: 720px; margin: 14px auto 0; color: var(--texto-suave); line-height: 1.55; font-size: 1.02rem; }

.rec-split { display: grid; grid-template-columns: 360px 1fr; gap: 30px; align-items: start; justify-content: center; }
.rec-tel-label { font-size: 0.86rem; color: var(--texto-suave); margin-bottom: 12px; text-align: center; }
.rec-tel { display: flex; flex-direction: column; align-items: center; }
.rec-tel .marco { width: 340px; height: 620px; }
.rec-tel .wa-chat { padding: 14px 10px; }

.rec-panel { min-width: 0; }
.panel { background: #0f1117; border: 1px solid #23263a; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.4); }
.panel-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; background: linear-gradient(120deg, rgba(124,92,252,0.12), rgba(56,198,232,0.08)); border-bottom: 1px solid #23263a; }
.panel-marca { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.panel-marca .pt-logo { font-size: 1.3rem; }
.panel-marca .pt-tag { font-size: 0.7rem; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 0.14em; border: 1px solid #2b2f45; border-radius: 6px; padding: 2px 8px; }
.panel-vivo { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; color: #34d399; }
.panel-vivo .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: pulso 1.6s infinite; }
@keyframes pulso { 50% { opacity: 0.4; } }

.panel-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 22px; }
.kpi { background: #161922; border: 1px solid #23263a; border-radius: 14px; padding: 14px 16px; }
.kpi-lbl { display: block; font-size: 0.76rem; color: var(--texto-suave); margin-bottom: 6px; }
.kpi strong { font-size: 1.5rem; font-weight: 800; transition: color 0.3s ease; }
.kpi strong.alerta { color: #fbbf24; }
.kpi strong.flash { color: #34d399; }

.panel-seccion { padding: 4px 22px 8px; font-size: 0.76rem; color: var(--texto-suave); text-transform: uppercase; letter-spacing: 0.12em; }
.panel-stock { list-style: none; padding: 0 22px; display: flex; flex-direction: column; gap: 10px; }
.panel-stock li { display: flex; align-items: center; gap: 12px; }
.panel-stock .p-emoji { width: 42px; height: 42px; border-radius: 10px; background: #161922; border: 1px solid #23263a; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; transition: box-shadow .3s, border-color .3s; }
.panel-stock .p-info { flex: 1; min-width: 0; }
.panel-stock .p-nombre { font-size: 0.9rem; }
.panel-stock .p-barra { height: 6px; border-radius: 4px; background: #23263a; margin-top: 6px; overflow: hidden; }
.panel-stock .p-barra span { display: block; height: 100%; background: linear-gradient(90deg, #7C5CFC, #38C6E8); border-radius: 4px; transition: width 0.6s ease; }
.panel-stock .p-num { font-size: 0.92rem; font-weight: 700; min-width: 96px; text-align: right; transition: color 0.3s ease; }
.panel-stock .p-num.baja { color: #f87171; }
.panel-stock li.flash .p-emoji { border-color: #34d399; box-shadow: 0 0 14px rgba(52,211,153,0.3); }

.panel-ranking { list-style: none; counter-reset: r; padding: 0 22px; display: flex; flex-direction: column; gap: 8px; }
.panel-ranking li { counter-increment: r; display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.panel-ranking li::before { content: counter(r); width: 24px; height: 24px; border-radius: 7px; background: #161922; border: 1px solid #2b2f45; display: grid; place-items: center; font-size: 0.78rem; color: var(--texto-suave); font-weight: 700; flex-shrink: 0; }
.panel-ranking li .r-nombre { flex: 1; }
.panel-ranking li .r-cant { color: var(--texto-suave); font-size: 0.82rem; }
.panel-ranking li.top::before { background: linear-gradient(135deg, #7C5CFC, #38C6E8); color: #05060a; border-color: transparent; }

.panel-feed { margin: 16px 22px 22px; min-height: 58px; }
.feed-venta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(120deg, rgba(52,211,153,0.14), rgba(56,198,232,0.06)); border: 1px solid rgba(52,211,153,0.3); animation: entra 0.4s ease-out; }
.feed-venta .fv-ico { font-size: 1.4rem; }
.feed-venta .fv-txt { flex: 1; font-size: 0.9rem; }
.feed-venta .fv-txt small { display: block; color: var(--texto-suave); font-size: 0.78rem; margin-top: 2px; }
.feed-venta .fv-monto { font-weight: 800; color: #34d399; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }

.rec-controles { text-align: center; margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rec-btn { background: linear-gradient(135deg, #7C5CFC, #38C6E8); color: #05060a; border: none; border-radius: 999px; padding: 16px 36px; font-size: 1.05rem; font-weight: 800; cursor: pointer; box-shadow: 0 0 40px rgba(124,92,252,0.4); transition: transform 0.12s ease; }
.rec-btn:hover { transform: translateY(-2px); }
.rec-btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.rec-hint { color: var(--texto-suave); font-size: 0.9rem; }

.rec-sep { text-align: center; margin: 56px auto 10px; max-width: 900px; position: relative; color: var(--texto-suave); }
.rec-sep::before { content: ""; position: absolute; top: 50%; left: 20px; right: 20px; height: 1px; background: #23263a; z-index: 0; }
.rec-sep span { position: relative; background: #0a0b10; padding: 0 20px; font-size: 1rem; z-index: 1; }

@media (max-width: 860px) {
  .rec-split { grid-template-columns: 1fr; gap: 26px; }
  .rec-tel .marco { width: 300px; height: 560px; }
  .panel { max-width: 420px; margin: 0 auto; }
}

/* ------------------------------------------- qué es un agente de IA */
.explica {
  max-width: 900px; margin: 40px auto 0; padding: 0 20px; text-align: center;
}
.explica h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: 12px; }
.explica-intro { color: var(--texto-suave); max-width: 640px; margin: 0 auto 28px; line-height: 1.55; }
.explica-intro b, .explica-cierre b { color: var(--texto); }

.beneficios {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; text-align: left; margin-bottom: 28px;
}
.beneficio {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255, 255, 255, 0.03); border: 1px solid #23263a;
  border-radius: 14px; padding: 16px;
}
.beneficio span { font-size: 1.4rem; }
.beneficio p { font-size: 0.88rem; line-height: 1.45; color: var(--texto-suave); }
.beneficio b { color: var(--texto); }

.explica-cierre {
  color: var(--texto-suave); max-width: 620px; margin: 0 auto; line-height: 1.55; font-size: 1rem;
}

/* -------------------------------------------------------------- pie */
.pie { text-align: center; padding: 30px 20px 50px; }
.pie p { color: var(--texto-suave); margin-bottom: 16px; }
.pie p b { color: var(--texto); }
.cta-grande {
  background: linear-gradient(120deg, var(--violeta), var(--cian));
  color: #06070c; border: none; border-radius: 999px; padding: 14px 30px;
  font-weight: 700; font-size: 1.02rem; cursor: pointer; box-shadow: 0 0 30px rgba(124,92,252,0.4);
  transition: transform 0.12s ease;
}
.cta-grande:hover { transform: translateY(-2px); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 5px; }

/* --------------------------------------- selector de rubro (solo celular) */
.chips { display: none; }

@media (max-width: 900px) {
  /* En el celular (el tráfico de Instagram): UN teléfono por vez, con chips
     para cambiar de rubro. Tres teléfonos apilados eran interminables. */
  .chips {
    display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
    padding: 18px 16px 0;
  }
  .chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 15px; border-radius: 999px; cursor: pointer;
    background: transparent; border: 1px solid #33364a; color: var(--texto-suave);
    font-size: 0.86rem; transition: all 0.15s ease;
  }
  .chip.activo {
    background: linear-gradient(120deg, var(--violeta), var(--cian));
    color: #06070c; border-color: transparent; font-weight: 600;
  }
  .telefonos .tel { display: none; }
  .telefonos .tel.visible { display: flex; }
  .marco { width: 92vw; max-width: 340px; height: 74vh; max-height: 640px; }
}
