/* AutCala — landing.
   Sin fuentes externas ni frameworks a propósito: la landing es el destino de
   una campaña paga y cada request bloqueante a un tercero se paga en rebote
   (y en Quality Score). Todo se sirve desde el mismo edge que el HTML. */

:root {
  --bg: #0b1120;
  --bg-soft: #131c31;
  --line: #24304d;
  --fg: #e8edf7;
  --fg-dim: #9aa8c4;
  --em: #10b981;
  --em-dark: #059669;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--em); }

/* ── Nav ── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1040px; margin: 0 auto; padding: 20px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg); text-decoration: none; font-weight: 700; font-size: 19px;
}

/* ── Botones ── */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--em); color: #04231a; }
.btn-primary:hover { background: #34d399; }
.btn-lg { padding: 16px 34px; font-size: 17px; }
.btn-ghost { color: var(--fg-dim); padding: 8px 14px; }
.btn-ghost:hover { color: var(--fg); }
.btn-outline { border: 1px solid var(--em); color: var(--em); white-space: nowrap; }
.btn-outline:hover { background: rgba(16,185,129,.1); }

/* ── Hero ── */
.hero {
  max-width: 760px; margin: 0 auto; padding: 72px 24px 64px; text-align: center;
}
.hero h1 { font-size: clamp(32px, 6vw, 52px); letter-spacing: -.02em; }
.hl { color: var(--em); }
.lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--fg-dim); margin-bottom: 32px; }
.micro { font-size: 14px; color: var(--fg-dim); margin-top: 16px; }
.center { text-align: center; }

/* ── Secciones ── */
.section { max-width: 1040px; margin: 0 auto; padding: 56px 24px; }
.section h2 { font-size: clamp(24px, 4vw, 32px); text-align: center; }
.sub { text-align: center; color: var(--fg-dim); max-width: 620px; margin: 0 auto 36px; }

/* ── Grillas de tarjetas ── */
.grid {
  display: grid; gap: 16px; margin-top: 36px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px;
}
.card h3 { font-size: 18px; color: var(--em); }
.card p { color: var(--fg-dim); margin: 0; font-size: 15px; }
.card-soft { background: transparent; border-style: dashed; }
.card-soft h3 { color: var(--fg-dim); }

/* ── Pasos ── */
.steps { list-style: none; padding: 0; margin: 36px auto 0; max-width: 680px; }
.steps li { display: flex; gap: 18px; margin-bottom: 28px; }
.num {
  flex: 0 0 38px; height: 38px; border-radius: 50%;
  background: var(--em); color: #04231a;
  display: grid; place-items: center; font-weight: 700;
}
.steps h3 { font-size: 17px; margin-bottom: .2em; }
.steps p { color: var(--fg-dim); margin: 0; font-size: 15px; }

/* ── Modalidades: las dos tarjetas llevan CTA, así que necesitan que el botón
      quede alineado abajo aunque los textos midan distinto. ── */
.mode { display: flex; flex-direction: column; }
.mode p { flex: 1; margin-bottom: 20px; }
.mode .btn { align-self: flex-start; }

/* ── Precios: uno solo, centrado. Antes había tres packs con descuento por
      volumen; ahora el precio es plano (US$ 1) y la tarjeta única es el punto
      —si hubiera varias, el lector busca la diferencia que no existe. ── */
.price-solo {
  max-width: 460px; margin: 36px auto 0; padding: 32px 28px;
  background: var(--bg-soft); border: 1px solid var(--em); border-radius: 14px;
  text-align: center;
}
.price-solo .amount {
  font-size: 52px; font-weight: 700; color: var(--fg);
  margin: 0; line-height: 1;
}
.price-solo .unit { color: var(--fg-dim); font-size: 15px; margin: 6px 0 0; }

.price-facts {
  list-style: none; padding: 0;
  margin: 26px 0 0; text-align: left;
  border-top: 1px solid var(--line); padding-top: 22px;
}
.price-facts li {
  color: var(--fg-dim); font-size: 15px;
  padding-left: 26px; position: relative; margin-bottom: 12px;
}
.price-facts li:last-child { margin-bottom: 0; }
.price-facts li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--em); font-weight: 700;
}

/* ── FAQ ── */
details {
  border-bottom: 1px solid var(--line); padding: 18px 0;
  max-width: 720px; margin: 0 auto;
}
summary { cursor: pointer; font-weight: 600; }
summary::marker { color: var(--em); }
details p { color: var(--fg-dim); margin: 12px 0 0; font-size: 15px; }

/* ── Cierre ── */
.cta-final {
  text-align: center; padding: 64px 24px 72px;
  border-top: 1px solid var(--line); margin-top: 32px;
}
.cta-final p { color: var(--fg-dim); }

/* ── Footer ── */
footer {
  text-align: center; padding: 32px 24px 48px;
  border-top: 1px solid var(--line); color: var(--fg-dim); font-size: 14px;
}
footer a { color: var(--fg-dim); }
footer a:hover { color: var(--em); }

/* En pantallas chicas el plan gestionado apila y el botón ocupa el ancho:
   un botón angosto al lado de un párrafo largo se pierde. */
@media (max-width: 600px) {
  .managed { flex-direction: column; align-items: stretch; }
  .managed .btn { text-align: center; }
}

/* ── Páginas legales ────────────────────────────────────────────────────────
   privacy/terms/refund vienen de la landing anterior y traen su propio set de
   clases. Sin estas reglas el texto se renderiza igual (son párrafos y
   títulos) pero sin ancho máximo: líneas de 1900px, ilegibles.
   Google Ads revisa estas páginas antes de aprobar los anuncios, así que
   tienen que verse tan cuidadas como la landing. */
.wrap { max-width: 760px; margin: 0 auto; padding: 24px; }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1040px; margin: 0 auto; padding: 20px 24px;
}
.legal { padding-bottom: 64px; }
.legal h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: .3em; }
.legal h2 { font-size: 20px; text-align: left; margin-top: 2em; }
.legal p, .legal li { color: var(--fg-dim); }
.legal ul, .legal ol { padding-left: 1.2em; }
.legal li { margin-bottom: .5em; }
.updated { font-size: 14px; color: var(--fg-dim); margin-bottom: 2em; }
.back { display: inline-block; margin-bottom: 24px; font-size: 15px; }
.note {
  background: rgba(16,185,129,.08); border: 1px solid var(--line);
  border-left: 3px solid var(--em);
  border-radius: 10px; padding: 16px 18px; margin-bottom: 2em; font-size: 15px;
}
/* Marca los datos que faltan completar (CUIT, domicilio, jurisdicción). Que
   se vean feos es deliberado: publicar con estos huecos hace que Google Ads
   rechace los anuncios por información del anunciante incompleta. */
.ph {
  background: #fde68a; color: #78350f;
  padding: 1px 6px; border-radius: 4px; font-weight: 600;
}
/* ── Selector de idioma ─────────────────────────────────────────────────────
   Mismo markup que las páginas legales (contenedor + dos <button>), para que
   la landing y los legales se vean iguales. Lo maneja /i18n.js, que le pone
   la clase .active al idioma vigente. */
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  display: inline-flex; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; font-size: 13px; font-weight: 600;
}
.lang-toggle button {
  background: transparent; color: var(--fg-dim); border: 0;
  padding: 6px 11px; cursor: pointer; transition: background .15s, color .15s;
  font: inherit;
}
.lang-toggle button:hover { color: var(--fg); }
.lang-toggle button.active { background: var(--em); color: #04231a; }

/* ── Globito del chat ───────────────────────────────────────────────────
   Reemplaza al iframe que estaba embebido en la página. Como flotante no
   empuja contenido y está disponible desde cualquier punto del scroll. */
.chat-bubble {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: var(--em); color: #04231a;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 20px rgba(16,185,129,.35);
  transition: transform .15s, background .15s;
}
.chat-bubble:hover { background: #34d399; transform: scale(1.05); }
.chat-bubble .chat-ico-close { display: none; }
.chat-bubble.abierto .chat-ico-open { display: none; }
.chat-bubble.abierto .chat-ico-close { display: block; }

/* El cartelito que invita a abrirlo. Se va solo a los 8s o al primer
   scroll: permanente taparía contenido en pantallas chicas. */
.chat-hint {
  position: fixed; right: 88px; bottom: 33px; z-index: 59;
  background: var(--bg-soft); color: var(--fg);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  transition: opacity .25s, transform .25s;
}
.chat-hint.oculto { opacity: 0; transform: translateX(8px); pointer-events: none; }

.chat-panel {
  position: fixed; right: 20px; bottom: 90px; z-index: 60;
  width: 380px; height: 560px;
  /* Que nunca exceda el viewport: con el globito abajo y el header del
     panel arriba, en un teléfono apaisado se salía de la pantalla. */
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 130px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.chat-panel[hidden] { display: none; }

.chat-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 15px; flex-shrink: 0;
}
.chat-x {
  background: none; border: none; color: var(--fg-dim);
  font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.chat-x:hover { color: var(--fg); }

.chat-panel-body { flex: 1; min-height: 0; }
.chat-panel-body iframe { display: block; width: 100%; height: 100%; border: 0; }

/* En móvil ocupa casi toda la pantalla: un panel de 380px en un teléfono de
   360 deja márgenes inútiles y el teclado virtual se come el resto. */
@media (max-width: 480px) {
  .chat-panel {
    right: 10px; left: 10px; bottom: 84px;
    width: auto; max-width: none; height: calc(100vh - 110px);
  }
  .chat-hint { display: none; }
}
