/* =====================================================
   Chatea — página de inicio (landing)
   Identidad: la taza de té que es también una burbuja de chat.
   Azul/turquesa para la conversación, naranja/ámbar (el té) para Empresarial+.
   ===================================================== */
:root {
    --navy: #002a6c;
    --azul: #0072f5;
    --azul-oscuro: #0052cc;
    --turquesa: #00d9b5;
    --naranja: #e06201;
    --ambar: #fea809;
    --cielo: #eef5ff;
    --tinta: #0e1b33;
    --gris: #5b6b80;
    --linea: #dbe6f5;
    --titulos: "Fredoka", "Figtree", system-ui, sans-serif;
    --texto: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--texto); font-size: 17px; line-height: 1.55; color: var(--tinta); background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--azul-oscuro); }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--titulos); font-weight: 600; line-height: 1.12; margin: 0; color: var(--navy); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.contenedor { width: min(1140px, 100% - 40px); margin-inline: auto; }
.contenedor-angosto { width: min(760px, 100% - 40px); }

/* ---------- Botones ---------- */
.boton {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
    text-decoration: none; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.boton-grande { padding: 14px 26px; font-size: 16.5px; }
.boton-primario { background: var(--azul); color: #fff; }
.boton-primario:hover { background: var(--azul-oscuro); }
.boton-contorno { border-color: var(--navy); color: var(--navy); background: transparent; }
.boton-contorno:hover { background: var(--navy); color: #fff; }
.boton-te { background: linear-gradient(135deg, var(--ambar), var(--naranja)); color: #fff; }
.boton-te:hover { background: var(--naranja); }

/* ---------- Navegación ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.nav-fila { display: flex; align-items: center; gap: 28px; height: 70px; }
.nav-marca img { display: block; height: 44px; width: auto; }
.nav-enlaces { display: flex; gap: 24px; margin-right: auto; }
.nav-enlaces > a { color: var(--tinta); text-decoration: none; font-weight: 500; font-size: 15.5px; }
.nav-enlaces > a:hover { color: var(--azul); }
.nav-acciones { display: flex; align-items: center; gap: 18px; }
.nav-ingresar { color: var(--navy); font-weight: 600; text-decoration: none; }
.nav-ingresar:hover { color: var(--azul); }
.nav-acciones-movil { display: none; }
.nav-menu { display: none; }

/* ---------- Portada ---------- */
.portada { background: var(--cielo); padding: 72px 0 84px; overflow: hidden; }
.portada-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.portada h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 700; letter-spacing: -0.01em; }
.portada-bajada { font-size: 19.5px; color: #33445e; max-width: 34ch; margin: 22px 0 30px; }
.portada-botones { display: flex; flex-wrap: wrap; gap: 12px; }
.portada-nota { margin: 18px 0 0; color: var(--gris); font-size: 15px; }

/* La conversación de ejemplo: el elemento protagonista de la página */
.demo {
    background: #fff; border-radius: 28px; overflow: hidden; max-width: 420px; justify-self: center; width: 100%;
    box-shadow: 0 30px 60px -20px rgba(0, 42, 108, 0.35), 0 0 0 1px rgba(0, 42, 108, 0.06);
    transform: rotate(1.5deg);
}
.demo-cabecera { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--navy); color: #fff; }
.demo-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--ambar), var(--naranja)); font-family: var(--titulos); font-weight: 600;
}
.demo-quien { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.demo-quien strong { font-size: 16px; }
.demo-quien small { font-size: 13px; opacity: 0.8; }
.demo-enlinea { font-size: 12.5px; color: var(--turquesa); }
.demo-mensajes { display: flex; flex-direction: column; gap: 8px; padding: 20px 16px 10px; min-height: 330px; background: #f3f7fc; }
.dm { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 15px; line-height: 1.4; }
.dm-otro { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 1px rgba(0,0,0,0.05); }
.dm-propio { align-self: flex-end; background: #dceeff; border-bottom-right-radius: 4px; }
.dm-doc { display: flex; align-items: center; gap: 10px; }
.dm-doc-ico { width: 36px; height: 36px; border-radius: 8px; background: #6b5b95; display: grid; place-items: center; font-size: 17px; }
.dm-doc span:last-child { display: flex; flex-direction: column; font-size: 14px; }
.dm-doc small { color: var(--gris); font-size: 12px; }
.demo-escribiendo { display: flex; gap: 5px; padding: 0 16px 18px 26px; height: 32px; background: #f3f7fc; opacity: 0; }
.demo-escribiendo i { width: 8px; height: 8px; border-radius: 50%; background: var(--azul); }

/* Animación (solo si JS la activa y la persona no pidió reducir movimiento) */
.demo.animar [data-paso] { opacity: 0; transform: translateY(10px); }
.demo.animar [data-paso].visto { opacity: 1; transform: none; transition: opacity .35s ease, transform .35s ease; }
.demo-escribiendo.activo { opacity: 1; }
.demo-escribiendo.activo i { animation: punto 1s infinite ease-in-out; }
.demo-escribiendo.activo i:nth-child(2) { animation-delay: .15s; }
.demo-escribiendo.activo i:nth-child(3) { animation-delay: .3s; }
@keyframes punto { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-5px); opacity: 1; } }

/* ---------- Personas y empresas ---------- */
.dos-publicos { padding: 96px 0; }
.dos-publicos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.publico { padding: 8px 56px 8px 0; }
.publico-empresa { padding: 8px 0 8px 56px; border-left: 2px solid var(--linea); }
.publico h2 { font-size: clamp(30px, 3.4vw, 40px); }
.publico-bajada { color: #33445e; margin: 12px 0 22px; max-width: 42ch; }
.lista-check { list-style: none; padding: 0; margin: 0 0 26px; }
.lista-check li { position: relative; padding: 9px 0 9px 34px; border-bottom: 1px solid #edf2f9; }
.lista-check li::before {
    content: ""; position: absolute; left: 0; top: 13px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--turquesa) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/13px no-repeat;
}
.publico-empresa .lista-check li::before { background-color: var(--azul); }
.enlace-fuerte { font-weight: 700; color: var(--azul-oscuro); text-underline-offset: 4px; }

/* ---------- Empresarial+ ---------- */
.plus { background: var(--navy); color: #e3ecfb; padding: 96px 0 88px; }
.plus h2 { color: #fff; font-size: clamp(40px, 5vw, 58px); font-weight: 700; }
.plus h2::after {
    content: ""; display: block; width: 64px; height: 6px; border-radius: 3px; margin-top: 16px;
    background: linear-gradient(90deg, var(--ambar), var(--naranja));
}
.plus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.plus-bajada { font-size: 19px; color: #fff; margin: 22px 0 26px; max-width: 36ch; }
.plus-lista { list-style: none; padding: 0; margin: 0 0 30px; }
.plus-lista li { padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.12); font-size: 16px; }
.plus-lista strong { color: #fff; }
.plus-precio { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.plus-monto { font-family: var(--titulos); font-size: 40px; font-weight: 700; color: var(--ambar); }
.plus-periodo { color: #b9c9e6; }

/* Ilustración del botón de chat en un sitio web */
.navegador {
    position: relative; background: #fff; border-radius: 14px; overflow: hidden; min-height: 440px;
    box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6);
}
.navegador-barra { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #e9eef6; }
.navegador-barra i { width: 10px; height: 10px; border-radius: 50%; background: #c3cddd; }
.navegador-barra span { margin-left: 10px; font-size: 12.5px; color: var(--gris); background: #fff; padding: 3px 12px; border-radius: 999px; }
.navegador-pagina { padding: 26px; }
.pagina-bloque { height: 12px; border-radius: 6px; background: #e6ecf5; margin-bottom: 12px; width: 70%; }
.pagina-titulo { height: 22px; width: 50%; background: #cfdcef; }
.pagina-corto { width: 40%; }
.pagina-productos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.pagina-productos span { aspect-ratio: 1; border-radius: 10px; background: #eef2f8; }
.widget-panel {
    position: absolute; right: 18px; bottom: 84px; width: min(260px, 78%); background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 42, 108, 0.28); color: var(--tinta);
}
.widget-cabecera { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, var(--azul), var(--turquesa)); color: #fff; font-size: 13.5px; font-weight: 600; }
.widget-cuerpo { padding: 12px 14px 14px; display: flex; flex-direction: column; }
.widget-etiqueta { font-size: 11.5px; color: var(--gris); margin-top: 4px; }
.widget-campo { border: 1px solid var(--linea); border-radius: 8px; padding: 6px 10px; font-size: 13px; margin: 3px 0 6px; }
.widget-aviso { font-size: 11.5px; color: var(--gris); margin: 4px 0 10px; line-height: 1.35; }
.widget-boton { text-align: center; background: var(--azul); color: #fff; border-radius: 999px; padding: 8px; font-size: 13.5px; font-weight: 600; }
.widget-burbuja {
    position: absolute; right: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%;
    background: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0, 42, 108, 0.3);
}

/* Pasos: esto sí es una secuencia, por eso va numerado */
.pasos-titulo { color: #fff; font-size: 26px; margin: 80px 0 26px; }
.pasos { list-style: none; counter-reset: paso; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.pasos li { counter-increment: paso; font-size: 15.5px; }
.pasos li::before {
    content: counter(paso); display: block; font-family: var(--titulos); font-weight: 700; font-size: 44px; line-height: 1;
    color: var(--ambar); margin-bottom: 10px;
}
.pasos strong { color: #fff; display: block; }

/* ---------- Planes ---------- */
.planes { padding: 96px 0; }
.planes h2 { font-size: clamp(32px, 4vw, 46px); }
.planes-bajada { color: #33445e; margin: 12px 0 36px; }
.tabla-envoltura { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabla-planes { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: 15.5px; }
.tabla-planes th, .tabla-planes td { padding: 13px 16px; border-bottom: 1px solid #edf2f9; text-align: center; }
.tabla-planes tbody th { text-align: left; font-weight: 500; }
.tabla-planes thead th { font-family: var(--titulos); font-size: 21px; font-weight: 600; color: var(--navy); vertical-align: bottom; padding-top: 22px; }
.tabla-planes thead small { display: block; font-family: var(--texto); font-size: 14px; color: var(--gris); font-weight: 500; margin-top: 2px; }
.tabla-planes .col-plus { background: #fff6e8; }
.tabla-planes thead .col-plus { border-radius: 16px 16px 0 0; color: var(--naranja); }
.tabla-planes tfoot .col-plus { border-radius: 0 0 16px 16px; }
.tabla-planes tfoot td, .tabla-planes tfoot th { border-bottom: none; padding: 20px 16px 22px; }
.si { color: #00a38a; font-weight: 700; font-size: 18px; }
.col-plus .si { color: var(--naranja); }
.no { color: #b8c3d3; }

/* Grupos de la tabla de planes (se arman desde el panel de administración) */
.tabla-planes .fila-grupo th {
    text-align: left; font-family: var(--titulos); font-size: 15px; font-weight: 600; color: var(--navy);
    padding-top: 22px; border-bottom: 2px solid var(--linea);
}
.tabla-planes .proximamente { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--naranja); background: #fff1e0; border-radius: 8px; padding: 1px 7px; margin-left: 4px; }

/* ---------- Preguntas frecuentes ---------- */
.faq { background: var(--cielo); padding: 88px 0; }
.faq h2 { font-size: clamp(30px, 3.6vw, 40px); margin-bottom: 26px; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary {
    cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
    font-weight: 600; font-size: 17.5px; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 28px; font-weight: 400; color: var(--azul); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 20px; color: #33445e; max-width: 65ch; }

/* ---------- Cierre y pie ---------- */
.cierre { padding: 80px 0; }
.cierre-fila { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cierre h2 { font-size: clamp(28px, 3.6vw, 42px); max-width: 18ch; }
.pie { border-top: 1px solid var(--linea); padding: 28px 0; }
.pie-fila { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pie-fila img { height: 36px; width: auto; }
.pie-enlaces { display: flex; gap: 20px; margin-right: auto; }
.pie-enlaces a { color: var(--gris); text-decoration: none; font-size: 15px; }
.pie-enlaces a:hover { color: var(--azul); }
.pie-copy { margin: 0; color: var(--gris); font-size: 14px; }

/* ---------- Tabletas y celulares ---------- */
@media (max-width: 960px) {
    .nav-enlaces, .nav-acciones { display: none; }
    .nav-fila { justify-content: space-between; }
    .nav-menu {
        display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px;
        background: none; border: none; cursor: pointer; padding: 10px;
    }
    .nav-menu span { display: block; height: 2.5px; border-radius: 2px; background: var(--navy); transition: transform .2s, opacity .2s; }
    .nav.abierto .nav-menu span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .nav.abierto .nav-menu span:nth-child(2) { opacity: 0; }
    .nav.abierto .nav-menu span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
    .nav.abierto .nav-enlaces {
        display: flex; flex-direction: column; gap: 0; position: absolute; top: 70px; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--linea); padding: 8px 20px 20px;
    }
    .nav.abierto .nav-enlaces > a { padding: 13px 0; border-bottom: 1px solid #edf2f9; font-size: 17px; }
    .nav.abierto .nav-acciones-movil { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

    .portada { padding: 48px 0 64px; }
    .portada-grid, .plus-grid { grid-template-columns: 1fr; gap: 48px; }
    .demo { transform: none; }
    .dos-publicos { padding: 64px 0; }
    .dos-publicos-grid { grid-template-columns: 1fr; gap: 48px; }
    .publico, .publico-empresa { padding: 0; border-left: none; }
    .plus { padding: 72px 0 64px; }
    .pasos { grid-template-columns: 1fr 1fr; }
    .pasos-titulo { margin-top: 56px; }
    .planes { padding: 72px 0; }
}
@media (max-width: 640px) {
    /* La tabla de planes se reacomoda: cada función ocupa una fila completa y debajo
       van las tres columnas, así Empresarial+ siempre se ve sin desplazar de lado. */
    .tabla-planes { min-width: 0; display: block; }
    .tabla-planes thead, .tabla-planes tbody, .tabla-planes tfoot { display: block; }
    .tabla-planes tr { display: grid; grid-template-columns: repeat(3, 1fr); }
    .tabla-planes thead th:first-child, .tabla-planes tfoot th { display: none; }
    .tabla-planes tbody th { grid-column: 1 / -1; padding: 14px 4px 4px; border-bottom: none; font-weight: 600; }
    .tabla-planes .fila-grupo th { padding-top: 24px; border-bottom: 2px solid var(--linea); }
    .tabla-planes td { padding: 6px 4px 12px; }
    .tabla-planes thead th { font-size: 16px; padding: 14px 4px 10px; position: sticky; top: 70px; background: #fff; z-index: 1; }
    .tabla-planes thead th.col-plus { background: #fff6e8; }
    .tabla-planes thead small { font-size: 12px; }
    .tabla-planes tfoot td { padding: 16px 4px; }
    .tabla-planes tfoot .boton { padding: 9px 10px; font-size: 13.5px; white-space: normal; text-align: center; }
    .tabla-envoltura { overflow: visible; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .portada-bajada { font-size: 17.5px; }
    .portada-botones .boton { width: 100%; }
    .navegador { min-height: 400px; }
    .pasos { grid-template-columns: 1fr; gap: 20px; }
    .pie-enlaces { margin-right: 0; }
}

/* ---------- Páginas de texto: Quiénes somos, Términos, Privacidad, Contacto ---------- */
.legal { padding: 56px 0 72px; background: var(--cielo); min-height: 60vh; }
.legal h1 { font-size: clamp(32px, 4.4vw, 46px); margin-bottom: 8px; }
.legal-fecha { color: var(--gris); font-size: 14.5px; margin: 0 0 18px; }
.legal-texto { background: #fff; border-radius: 18px; padding: 30px 34px; margin-top: 18px; box-shadow: 0 1px 2px rgba(0,42,108,.06); }
.legal-texto h2 { font-size: 22px; margin: 28px 0 10px; }
.legal-texto h2:first-child { margin-top: 0; }
.legal-texto h3 { font-size: 18px; margin: 20px 0 8px; }
.legal-texto p, .legal-texto li { color: #2b3a52; line-height: 1.65; }
.legal-texto ul { padding-left: 22px; }
.legal-texto li { margin: 5px 0; }
.legal-texto a { color: var(--azul-oscuro); }
.nav-acciones-siempre { margin-left: auto; }
@media (max-width: 960px) {
    .pagina-legal .nav-acciones-siempre { display: flex; gap: 10px; }
    .pagina-legal .nav-acciones-siempre .nav-ingresar { display: none; }
    .legal-texto { padding: 22px 20px; }
}

.contacto-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 18px 0; }
.contacto-dato { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 14px 16px; color: var(--tinta); text-decoration: none; box-shadow: 0 1px 2px rgba(0,42,108,.06); }
a.contacto-dato:hover { box-shadow: 0 0 0 2px var(--azul); }
.contacto-dato span { font-size: 22px; }
.contacto-dato small { display: block; color: var(--gris); font-size: 12.5px; }
.contacto-form { background: #fff; border-radius: 18px; padding: 26px 30px; margin-top: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 2px rgba(0,42,108,.06); }
.contacto-form h2 { font-size: 22px; }
.contacto-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14.5px; color: var(--navy); }
.contacto-form input, .contacto-form select, .contacto-form textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 11px 13px; border: 1px solid var(--linea); border-radius: 10px; background: #fff; color: var(--tinta); }
.contacto-form textarea { resize: vertical; }
.contacto-form input:focus, .contacto-form select:focus, .contacto-form textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0,114,245,.15); }
.contacto-form .boton { align-self: flex-start; }
.contacto-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contacto-nota { font-size: 13.5px; color: var(--gris); margin: 0; }
.contacto-nota a { color: var(--azul-oscuro); }
.contacto-ok { background: #e3f8ef; color: #136243; border-radius: 14px; padding: 18px 20px; margin-top: 18px; font-size: 16px; }
.contacto-error { background: #fdecea; color: #c0392b; border-radius: 10px; padding: 10px 14px; font-size: 14.5px; }
@media (max-width: 560px) { .contacto-fila { grid-template-columns: 1fr; } .contacto-form { padding: 20px; } }

.boton-peligro { background: #c0392b; color: #fff; }
.boton-peligro:hover { background: #a93226; }
.acepto-check { flex-direction: row !important; align-items: flex-start; gap: 8px !important; font-weight: 500 !important; }
.acepto-check input { margin-top: 4px; }
