/* Lista de Precios — landing-chat pública, tema "cibernético" de marca
   (negro void + cian eléctrico + magenta, ver Shared/Brand/css/sf-brand-tokens.css) */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sf-bg-deep);
  color: var(--sf-text-primary);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  min-height: 100dvh;
  /* iOS Safari calcula 100vw incluyendo espacio que el visual viewport no
     tiene — cualquier elemento en vw (o que se pase un pixel por redondeo)
     puede quedar más ancho que la pantalla real y correr/descentrar toda
     la página. Esto es el cinturón completo, no solo un div hijo:
     - width:100% + max-width:100% en el eje horizontal ata el documento
       exactamente al ancho real del dispositivo (device-width, del
       <meta viewport>), nunca más.
     - overflow-x:hidden en html Y body (los dos, no solo uno) es lo único
       que de verdad lo bloquea en iOS si algo se pasa por 1px.
     - touch-action:pan-y desactiva el gesto de arrastre horizontal con el
       dedo — aunque algo lograra desbordar, no se podría "correr" la
       página tocando y arrastrando, solo queda el scroll vertical normal.
     - overscroll-behavior-x:none quita el rebote elástico horizontal de
       iOS en los bordes. */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

.lp-page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.1rem, 4vw, 2.4rem) clamp(1rem, 4vw, 1.5rem) 2rem;
}

/* —— Fondo cibernético —— */
/* Contenedor con overflow:hidden real: los hijos son position:absolute
   (no fixed) para quedar SIEMPRE recortados a estos límites exactos, sin
   importar que un vw calculado un poco de más los saque de la pantalla. */
.lp-bg {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.lp-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 20%, black 15%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 65% at 50% 20%, black 15%, transparent 75%);
}
.lp-orb {
  position: absolute; border-radius: 50%; filter: blur(90px);
  animation: lpOrbDrift 20s ease-in-out infinite alternate;
}
.lp-orb--a { width: 46vw; height: 46vw; max-width: 480px; max-height: 480px; top: -12%; left: -14%; background: rgba(0,229,255,0.22); }
.lp-orb--b { width: 40vw; height: 40vw; max-width: 420px; max-height: 420px; bottom: -14%; right: -12%; background: rgba(224,64,251,0.18); animation-delay: -8s; }
@keyframes lpOrbDrift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(24px,-18px) scale(1.08); }
}

/* —— Hero —— */
.lp-shell {
  position: relative; z-index: 2;
  width: 100%;
  max-width: 720px;
  display: flex; flex-direction: column; align-items: center;
}

.lp-hero { text-align: center; margin-bottom: clamp(1.4rem, 4vw, 2.2rem); }
.lp-brand-link {
  display: inline-flex; flex-direction: column; align-items: center;
  text-decoration: none; max-width: 100%;
  transition: opacity 0.15s;
}
.lp-brand-link:hover { opacity: 0.85; }
.lp-seal {
  width: 64px; height: 64px; margin: 0 auto 0.9rem;
  filter: drop-shadow(0 0 18px rgba(0,229,255,0.5)) drop-shadow(0 0 34px rgba(224,64,251,0.2));
}
.lp-seal img { width: 100%; height: 100%; object-fit: contain; }
.lp-wordmark { width: 168px; max-width: 100%; height: auto; margin-bottom: 1.1rem; opacity: 0.95; }
.lp-kicker {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sf-accent-cyan); margin: 0 0 0.6rem;
}
.lp-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.1rem, 7vw, 3.1rem); font-weight: 800; line-height: 1.05;
  margin: 0 0 0.85rem;
  background: linear-gradient(135deg, #ffffff 0%, #bdf4ff 45%, #00e5ff 75%, #e040fb 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 46px rgba(0,229,255,0.22);
}
.lp-subtitle {
  font-size: clamp(0.9rem, 2.4vw, 1.02rem); line-height: 1.6;
  color: var(--sf-text-muted);
  max-width: 560px; margin: 0 auto;
}
.lp-subtitle strong { color: var(--sf-text-primary); font-weight: 700; }

/* —— Chat central (la pieza principal de la página) —— */
.lp-chat {
  position: relative; z-index: 2;
  width: 100%;
  display: flex; flex-direction: column;
  border-radius: 20px;
  border: 1px solid rgba(0,229,255,0.28);
  background: rgba(6,9,16,0.82);
  box-shadow: var(--sf-gradient-glow), 0 24px 60px rgba(0,0,0,0.5);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  overflow: hidden;
  height: min(62vh, 640px);
  min-height: 380px;
}

.lp-chat-head {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(0,229,255,0.18);
  background: rgba(0,229,255,0.06);
}
.lp-chat-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: #34d399; box-shadow: 0 0 8px #34d399;
}
.lp-chat-head strong { font-size: 0.92rem; color: var(--sf-text-primary); display: block; }
.lp-chat-head small { font-size: 0.72rem; color: var(--sf-text-muted); }

.lp-chat-msgs {
  flex: 1; overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}

.lp-msg {
  max-width: 88%;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  font-size: 0.9rem; line-height: 1.55;
  word-break: break-word;
}
.lp-msg--bot {
  align-self: flex-start;
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.2);
  color: var(--sf-text-primary);
  border-bottom-left-radius: 4px;
}
.lp-msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0,229,255,0.28), rgba(224,64,251,0.22));
  border: 1px solid rgba(0,229,255,0.3);
  color: #f5f9ff;
  border-bottom-right-radius: 4px;
}
.lp-msg p { margin: 0 0 0.55rem; }
.lp-msg p:last-child { margin-bottom: 0; }
.lp-msg ul { margin: 0.35rem 0 0.55rem; padding-left: 1.1rem; }
.lp-msg li { margin: 0.25rem 0; }
.lp-msg strong { color: var(--sf-accent-cyan); font-weight: 700; }
.lp-msg--user strong { color: #fff; }

.lp-msg-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.6rem; }
.lp-msg-opt {
  border: 1px solid rgba(0,229,255,0.4); background: rgba(0,229,255,0.12);
  color: var(--sf-text-primary); border-radius: 999px; padding: 6px 13px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.lp-msg-opt:hover { background: rgba(0,229,255,0.24); }

.lp-msg-copy { margin-top: 0.6rem; }
.lp-msg-copy-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid rgba(52,211,153,0.35); background: rgba(52,211,153,0.08);
  color: #6ee7b7; border-radius: 999px; padding: 5px 11px;
  font-size: 0.74rem; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.lp-msg-copy-btn:hover { background: rgba(52,211,153,0.18); }
.lp-msg-copy-btn.is-copied { border-color: #34d399; background: rgba(52,211,153,0.24); }
.lp-msg-copy-btn svg { flex-shrink: 0; }

.lp-typing {
  flex-shrink: 0;
  display: flex; gap: 4px; align-items: center;
  padding: 0 1.1rem 0.6rem;
}
.lp-typing[hidden] { display: none; }
.lp-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(0,229,255,0.55);
  animation: lpTypingBounce 1.2s ease-in-out infinite;
}
.lp-typing span:nth-child(2) { animation-delay: 0.15s; }
.lp-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes lpTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.lp-chat-foot {
  flex-shrink: 0;
  display: flex; gap: 0.5rem;
  padding: 0.8rem;
  border-top: 1px solid rgba(0,229,255,0.18);
  background: rgba(0,0,0,0.25);
}
.lp-chat-input {
  flex: 1;
  /* Un <input> dentro de un flex row tiene min-width:auto por defecto — o
     sea, "nunca encojas más allá de mi contenido/tamaño intrínseco", que
     en un <input type="text"> ronda ~170-200px de piso en Chrome/Android.
     Con el mic + botón Enviar al lado, en un celular angosto eso ya no
     entraba y el botón Enviar quedaba empujado fuera de la pantalla.
     min-width:0 es el override estándar para que sí pueda encoger. */
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(0,229,255,0.3);
  background: rgba(0,0,0,0.5);
  color: var(--sf-text-primary);
  /* 16px es el mínimo real, no cosmético: por debajo de eso, iOS Safari
     hace zoom automático de TODA la página al enfocar el campo (para que
     el texto que estás escribiendo se vea legible) — como este input se
     autoenfoca al cargar, la página entera aparecía "más grande que la
     pantalla" desde el primer segundo. */
  font: inherit; font-size: 16px;
}
.lp-chat-input:focus { outline: none; border-color: var(--sf-accent-cyan); }
.lp-chat-mic {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 10px; border: 1px solid rgba(0,229,255,0.3);
  background: rgba(0,229,255,0.08); color: var(--sf-accent-cyan);
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.lp-chat-mic:hover { border-color: var(--sf-accent-cyan); }
.lp-chat-mic.is-recording {
  background: rgba(239,68,68,0.14); border-color: #ef4444; color: #ef4444;
  animation: lpMicPulse 1.2s ease-in-out infinite;
}
@keyframes lpMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.35); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.lp-mic-status {
  margin: 0.4rem 0 0; padding: 0 0.8rem;
  font-size: 0.72rem; color: var(--sf-text-dim); text-align: center;
}
.lp-chat-send {
  flex-shrink: 0;
  padding: 0.7rem 1.1rem;
  border-radius: 10px; border: none;
  background: var(--sf-gradient-primary);
  color: #04121c; font-weight: 800; font-size: 0.86rem;
  cursor: pointer; font-family: inherit;
  transition: filter 0.15s;
  white-space: nowrap;
}
.lp-chat-send:hover { filter: brightness(1.1); }
.lp-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

.lp-fallback {
  margin-top: 1.2rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  text-align: center;
}
.lp-fallback p {
  margin: 0; font-size: 0.8rem; color: var(--sf-text-dim);
}
.lp-fallback-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(52,211,153,0.45);
  background: rgba(52,211,153,0.1);
  color: #6ee7b7; font-weight: 700; font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.lp-fallback-btn:hover { background: rgba(52,211,153,0.2); transform: translateY(-1px); }

@media (max-width: 560px) {
  .lp-chat { height: min(66vh, 620px); border-radius: 16px; }
  .lp-hero { margin-bottom: 1.1rem; }
}

@media (max-width: 400px) {
  .lp-chat-foot { padding: 0.6rem; gap: 0.35rem; }
  .lp-chat-send { padding: 0.7rem 0.85rem; font-size: 0.8rem; }
}
