/*
 * Kit de páginas con el estilo nuevo (prefijo zl-).
 * Uso: envolver el contenido de la página en <div class="zl"> y combinar estos bloques:
 *
 *   .zl-wrap                     contenedor centrado
 *   .zl-hero                     cabecera: .zl-eyebrow, .zl-title (h1), .zl-title em, .zl-hero__row,
 *                                .zl-lead, .zl-actions, .zl-note
 *   .zl-cover                    imagen o vídeo grande redondeado bajo la cabecera
 *   .zl-section / --soft / --navy  sección (soft = banda gris redondeada, navy = banda marino)
 *   .zl-head                     cabecera de sección: .zl-label, h2, p
 *   .zl-tiles                    cuadrícula de iconos/imagen + título: .zl-tile, .zl-tile__ico, h3, p
 *   .zl-cards                    tarjetas de texto: .zl-card, .zl-card__ico (i.bi), h3, p
 *   .zl-row (+ .is-flip)         fila imagen + texto: .zl-row__copy, .zl-row__media
 *   .zl-plans                    planes: .zl-plan (+ .is-featured), .zl-plan__badge, h3, p, ul.zl-check, .zl-btn
 *   .zl-form                     formulario: .zl-form__grid, .zl-field (label + input/select/textarea),
 *                                .zl-field--full, .zl-alert--ok / --error, .zl-btn
 *   .zl-faq                      lista de <details> con <summary>
 *   .zl-cta                      banda final marino con h2, p, .zl-actions
 *   .zl-btn (+ --solid, --light, --ghost)  botones píldora
 */
.zl {
    --zl-ink: #010440;
    --zl-orange: #C64106;
    --zl-peach: #FFE3D3;
    --zl-soft: #F2F3F8;
    --zl-muted: #5A5D78;
    --zl-copy: #2E3150;
    --zl-line: rgba(1, 4, 64, .12);
    --zl-ease: cubic-bezier(.2, .9, .2, 1);
    background: #fff;
    color: var(--zl-ink);
    font-family: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    overflow-x: clip;
}
.zl *, .zl *::before, .zl *::after { box-sizing: border-box; }
.zl img, .zl video { max-width: 100%; }
.zl a:focus-visible, .zl button:focus-visible, .zl summary:focus-visible { outline: 2px solid var(--zl-orange); outline-offset: 4px; }
.zl-wrap { max-width: 1320px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* Botones */
.zl-btn {
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; padding: 16px 28px; border-radius: 999px;
    border: 1.5px solid var(--zl-ink); background: transparent; color: var(--zl-ink);
    font: 600 16px/1.2 inherit; text-decoration: none; text-align: center; cursor: pointer;
    transition: color .35s, border-color .35s;
}
.zl-btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--zl-orange); transform: translateY(101%); transition: transform .5s var(--zl-ease); z-index: -1; }
.zl-btn:hover { color: #fff; border-color: var(--zl-orange); }
.zl-btn:hover::before { transform: none; }
.zl-btn--solid { background: var(--zl-ink); color: #fff; }
.zl-btn--light { background: #fff; border-color: #fff; color: var(--zl-ink); }
.zl-btn--ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.zl-btn small { display: block; font-size: 12px; font-weight: 400; opacity: .8; }
.zl-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cabecera */
.zl-hero { padding-top: 48px; }
.zl-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 500; color: var(--zl-muted); }
.zl-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--zl-orange); flex: none; animation: zl-ping 2s infinite; }
@keyframes zl-ping { 0% { box-shadow: 0 0 0 0 rgba(198, 65, 6, .5); } 100% { box-shadow: 0 0 0 14px rgba(198, 65, 6, 0); } }
.zl-title { margin: 24px 0 0; font-size: clamp(48px, 8.6vw, 136px); line-height: .92; letter-spacing: -.05em; font-weight: 600; text-wrap: balance; animation: zl-rise 1.1s var(--zl-ease) both; }
.zl-title em { font-style: italic; font-weight: 500; color: var(--zl-orange); }
@keyframes zl-rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.zl-hero__row { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-end; margin-top: 36px; }
.zl-lead { flex: 1 1 420px; max-width: 640px; margin: 0; font-size: 20px; line-height: 1.55; color: var(--zl-muted); }
.zl-note { margin: 14px 0 0; font-size: 14px; color: var(--zl-muted); }

.zl-cover { margin-top: 48px; }
.zl-cover__frame { position: relative; overflow: hidden; border-radius: 32px; aspect-ratio: 16 / 7; background: var(--zl-soft); }
.zl-cover__frame img, .zl-cover__frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Secciones */
.zl-section { padding: 110px 0 0; }
.zl-section--soft > .zl-wrap > .zl-band,
.zl-band { padding: clamp(28px, 5vw, 72px); border-radius: 40px; background: var(--zl-soft); }
.zl-band--navy { background: var(--zl-ink); color: #fff; }
.zl-band--navy .zl-head p, .zl-band--navy p { color: #C9CBE6; }
.zl-head { max-width: 900px; margin-bottom: 48px; }
.zl-label { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 15px; font-weight: 500; color: var(--zl-muted); }
.zl-label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--zl-orange); flex: none; }
.zl-head h2 { margin: 0; font-size: clamp(36px, 5vw, 76px); line-height: .98; letter-spacing: -.045em; font-weight: 600; text-wrap: balance; }
.zl-head p { margin: 18px 0 0; font-size: 19px; color: var(--zl-muted); max-width: 680px; }

/* Cuadrícula de iconos */
.zl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.zl-tile { display: flex; flex-direction: column; gap: 16px; padding: 26px; border-radius: 28px; background: var(--zl-soft); color: inherit; text-decoration: none; transition: background .4s, color .4s, transform .5s var(--zl-ease); }
.zl-band .zl-tile { background: #fff; }
.zl-tile:hover { background: var(--zl-ink); color: #fff; transform: translateY(-6px); }
.zl-tile__ico { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--zl-orange); font-size: 26px; overflow: hidden; transition: transform .5s var(--zl-ease); }
.zl-band .zl-tile__ico { background: var(--zl-soft); }
.zl-tile__ico img { width: 60%; height: auto; }
.zl-tile:hover .zl-tile__ico { transform: rotate(-10deg); }
.zl-tile h3 { margin: 0; font-size: 20px; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
.zl-tile p { margin: 0; font-size: 15px; color: var(--zl-muted); transition: color .4s; }
.zl-tile:hover p { color: #C9CBE6; }

/* Tarjetas de texto */
.zl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.zl-card { padding: 32px; border-radius: 28px; background: var(--zl-soft); transition: background .4s, color .4s, transform .5s var(--zl-ease); }
.zl-band .zl-card { background: #fff; }
.zl-card:hover { background: var(--zl-ink); color: #fff; transform: translateY(-6px); }
.zl-card__ico { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--zl-orange); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 20px; }
.zl-band .zl-card__ico { background: var(--zl-soft); }
.zl-card h3 { margin: 0 0 10px; font-size: 22px; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
.zl-card p { margin: 0; font-size: 16px; color: var(--zl-muted); transition: color .4s; }
.zl-card:hover p { color: #C9CBE6; }
.zl-card a { color: var(--zl-orange); font-weight: 600; }

/* Fila imagen + texto */
.zl-row { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 48px 0; border-top: 1px solid var(--zl-line); }
.zl-row.is-flip { flex-direction: row-reverse; }
.zl-row__copy { flex: 1 1 400px; min-width: 0; }
.zl-row__copy h2, .zl-row__copy h3 { margin: 0 0 16px; font-size: clamp(30px, 3.4vw, 50px); line-height: 1; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
.zl-row__copy p { margin: 0 0 14px; max-width: 560px; font-size: 18px; color: var(--zl-copy); }
.zl-row__media { flex: 1.2 1 440px; min-width: 0; border-radius: 28px; overflow: hidden; background: var(--zl-soft); }
.zl-row__media img, .zl-row__media video { display: block; width: 100%; height: auto; }

/* Listas con marca */
.zl-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.zl-check li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; }
.zl-check li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--zl-orange); flex: none; transform: translateY(-2px); }

/* Planes */
.zl-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.zl-plan { display: flex; flex-direction: column; gap: 16px; padding: 36px; border-radius: 36px; background: var(--zl-soft); transition: transform .6s var(--zl-ease); }
.zl-plan:hover { transform: translateY(-10px); }
.zl-plan.is-featured { background: var(--zl-ink); color: #fff; }
.zl-plan.is-featured p { color: #C9CBE6; }
.zl-plan.is-featured .zl-btn { background: #fff; border-color: #fff; color: var(--zl-ink); }
.zl-plan.is-featured .zl-btn:hover { color: #fff; border-color: var(--zl-orange); }
.zl-plan__badge { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--zl-orange); color: #fff; font-size: 13px; font-weight: 600; }
.zl-plan h3 { margin: 0; font-size: 30px; line-height: 1; letter-spacing: -.035em; font-weight: 600; }
.zl-plan p { margin: 0; color: var(--zl-muted); }
.zl-plan .zl-btn { margin-top: auto; }

/* Formulario */
.zl-form { padding: clamp(20px, 3vw, 40px); border-radius: 32px; background: var(--zl-soft); }
.zl-band .zl-form { background: #fff; }
.zl-band--navy .zl-form { color: var(--zl-ink); }
.zl-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.zl-field { display: flex; flex-direction: column; gap: 8px; }
.zl-field--full { grid-column: 1 / -1; }
.zl-field label { font-size: 14px; font-weight: 600; color: var(--zl-ink); }
.zl-field input, .zl-field select, .zl-field textarea {
    width: 100%; padding: 15px 18px; border: 1.5px solid transparent; border-radius: 16px;
    background: #fff; color: var(--zl-ink); font: 400 16px/1.4 inherit; box-shadow: none;
    transition: border-color .25s, box-shadow .25s;
}
.zl-band .zl-field input, .zl-band .zl-field select, .zl-band .zl-field textarea { background: var(--zl-soft); }
.zl-field input:focus, .zl-field select:focus, .zl-field textarea:focus { outline: none; border-color: var(--zl-orange); box-shadow: 0 0 0 4px rgba(198, 65, 6, .12); }
.zl-field__error { margin: 0; font-size: 14px; color: #B42318; }
.zl-alert--ok, .zl-alert--error { grid-column: 1 / -1; padding: 16px 20px; border-radius: 16px; font-size: 15px; }
.zl-alert--ok { background: #E7F6EC; color: #14532D; }
.zl-alert--error { background: #FDECEA; color: #8A1C12; }
.zl-form .zl-btn { width: 100%; }
@media (max-width: 640px) { .zl-form__grid { grid-template-columns: 1fr; } }

/* Preguntas frecuentes */
.zl-faq { display: flex; flex-direction: column; gap: 10px; }
.zl-faq details { padding: 0 28px; border-radius: 24px; background: var(--zl-soft); transition: background .3s; }
.zl-band .zl-faq details { background: #fff; }
.zl-faq details[open] { background: var(--zl-peach); }
.zl-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.zl-faq summary::-webkit-details-marker { display: none; }
.zl-faq summary::after { content: "+"; width: 36px; height: 36px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 20px; transition: transform .4s var(--zl-ease); }
.zl-faq details[open] summary::after { transform: rotate(45deg); }
.zl-faq details > *:not(summary) { margin: 0 0 24px; color: var(--zl-copy); max-width: 760px; }

/* Llamada final */
.zl-cta { margin-top: 120px; padding: clamp(32px, 6vw, 88px); border-radius: 44px; background: var(--zl-ink); color: #fff; }
.zl-cta h2 { margin: 0; font-size: clamp(44px, 7vw, 110px); line-height: .92; letter-spacing: -.05em; font-weight: 600; }
.zl-cta p { margin: 20px 0 32px; max-width: 640px; font-size: 19px; color: #C9CBE6; }
.zl-cta .zl-btn { border-color: #fff; color: #fff; }
.zl-cta .zl-btn--light { background: #fff; color: var(--zl-ink); }
.zl-cta .zl-btn:hover { color: #fff; border-color: var(--zl-orange); }

.zl-end { height: 80px; }

@media (prefers-reduced-motion: reduce) {
    .zl *, .zl *::before, .zl *::after { animation: none !important; transition: none !important; }
}

/* Lista con iconos en lugar de punto */
.zl-check--icons li::before { display: none; }
.zl-check--icons li { align-items: center; }
.zl-check--icons .bi { width: 34px; height: 34px; border-radius: 50%; background: var(--zl-soft); color: var(--zl-orange); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }

/* Revisión 21/10: los marcadores de captura nunca se salen de la pantalla */
.zl [class*="ph"], .zl-ph { max-width: 100%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }

/* Conversaciones simuladas (components/chat-mock) */
.zc-chat { width: 100%; max-width: 520px; margin: 0 auto; border-radius: 28px; overflow: hidden; background: #ECE5DD; font-family: var(--zl-font, inherit); box-shadow: 0 30px 60px -35px rgba(1, 4, 64, .45); text-align: left; }
.zc-chat--assistant { background: #F7F7F8; }
.zc-chat__top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #075E54; color: #fff; }
.zc-chat--assistant .zc-chat__top { background: var(--zl-ink); }
.zc-chat__top b { display: block; font-size: 16px; }
.zc-chat__top small { display: block; font-size: 12px; opacity: .8; }
.zc-chat__avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .15); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.zc-chat__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 16px; }
.zc-msg { position: relative; max-width: 86%; padding: 10px 14px 20px; border-radius: 16px; font-size: 15px; line-height: 1.4; color: #111B21; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.zc-msg time { position: absolute; right: 10px; bottom: 4px; font-size: 11px; color: #667781; }
.zc-msg--user { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 4px; }
.zc-msg--bot { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.zc-chat--assistant .zc-msg--user { background: var(--zl-ink); color: #fff; }
.zc-chat--assistant .zc-msg--user time { color: #C9CBE6; }
.zc-msg--alert { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; background: #fff; border-top-left-radius: 4px; border: 2px solid #E5484D; }
.zc-msg__alert-title { font-weight: 700; color: #B42318; }
.zc-msg__voice { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: #075E54; }
.zc-msg__wave { flex: 1; height: 18px; min-width: 90px; background: repeating-linear-gradient(90deg, #8FBDB2 0 3px, transparent 3px 6px); border-radius: 4px; }
.zc-msg__voice small { color: #667781; }
.zc-msg__file { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px 10px; border-radius: 10px; background: #F0F2F5; font-weight: 600; }
.zc-msg__file i { color: #E5484D; }
.zc-chat__note { margin: 0; padding: 10px 16px 14px; font-size: 12px; color: #667781; text-align: center; }
.zl-row__media .zc-chat, .zf-hero__media .zc-chat { margin: clamp(16px, 3vw, 32px) auto; }
