/* El final de la portada: el cuadro que arma las tarjetas se apaga y, bajando
   desde arriba, queda en su lugar la tarjeta del agente conversando.
   Vive dentro del .hero-stage, asi que hero.js es quien la trae con el scroll. */
.hero-assembly{position:absolute;inset:0;transform-origin:50% 50%;will-change:transform,opacity}
.hero-chat{--fit:1;position:absolute;z-index:6;left:50%;top:48%;transform:translate(-50%,-50%);width:min(1060px,calc(100% - 60px));text-align:center;will-change:transform,opacity}
.js-hero .hero-chat{opacity:0}
.hero-chat-intro{margin-bottom:24px}
.hero-chat-intro .eyebrow{justify-content:center;margin-bottom:13px;color:#8d8676}
.hero-chat-intro h2{font-size:clamp(29px,2.9vw,42px);line-height:1.04}

.wa-chat{text-align:left;background:#fff;border:1px solid #e7e4dd;border-radius:22px;padding:24px 30px 22px;box-shadow:0 30px 70px #2a271f1a,0 2px 6px #2a271f08}

.wa-top{display:flex;align-items:center;gap:12px;padding-bottom:20px}
.wa-avatar{width:40px;height:40px;border-radius:11px;background:#f8d64b;display:grid;place-items:center;flex:none;overflow:hidden}
.wa-avatar img{width:29px;height:29px}
.wa-who{display:flex;align-items:baseline;gap:10px;min-width:0}
.wa-who strong{font-size:16px;font-weight:550;letter-spacing:-.02em}
.wa-presence{font-size:12px;color:#9a9386;display:flex;align-items:center;gap:6px}
.wa-presence:before{content:"";width:6px;height:6px;border-radius:50%;background:#6fb98a;flex:none}
.wa-chat.is-typing .wa-presence:before{background:#d8ae2c}
.wa-reset{margin-left:auto;display:flex;align-items:center;gap:8px;background:none;padding:7px 2px;font-size:13px;color:#8a8375;transition:color .18s}
.wa-reset:hover{color:var(--ink)}
.wa-reset svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.wa-body{min-height:172px;display:flex;flex-direction:column;gap:18px;padding-bottom:4px}
.wa-msg{max-width:80%;font-size:clamp(16px,1.3vw,19px);line-height:1.5;color:var(--ink)}
.wa-msg p{margin:0;font-size:inherit;line-height:inherit}
.wa-in{align-self:flex-start}
.wa-out{align-self:flex-end;background:var(--ink);color:#fdfcf9;border-radius:999px;padding:13px 24px;max-width:72%;font-size:clamp(15px,1.15vw,17px);line-height:1.35}

.wa-typing{align-self:flex-start;display:flex;gap:5px;padding:9px 0}
.wa-typing span{width:7px;height:7px;border-radius:50%;background:#c3bdb0;animation:wa-bounce 1.1s infinite}
.wa-typing span:nth-child(2){animation-delay:.16s}
.wa-typing span:nth-child(3){animation-delay:.32s}
@keyframes wa-bounce{0%,60%,100%{opacity:.4;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

.wa-replies{border-top:1px solid #eceae4;margin-top:20px;padding-top:16px}
.wa-replies-note{font-size:12px;color:#9a9386;margin-bottom:11px}
.wa-replies{display:grid;gap:10px;grid-template-columns:repeat(3,1fr)}
.wa-replies-note{grid-column:1/-1;margin-bottom:0}
.wa-reply{display:flex;align-items:center;justify-content:center;gap:9px;background:#fff;color:#1b9de3;border:1px solid #e2e5e8;border-radius:11px;padding:14px 16px;font-size:14.5px;font-weight:500;text-align:center;line-height:1.25;transition:transform .18s,box-shadow .18s,border-color .18s,background .18s}
.wa-reply:hover{transform:translateY(-1px);box-shadow:0 6px 16px #23221d14;border-color:#bfe2f6;background:#fbfdff}
.wa-reply svg{width:15px;height:15px;fill:currentColor;flex:none}

/* El guion se arma solo: con JS las burbujas parten ocultas y van apareciendo. */
.js-chat .wa-chat .wa-msg,.js-chat .wa-chat .wa-typing,.js-chat .wa-chat .wa-replies>*{opacity:0;transform:translateY(8px)}
.js-chat .wa-chat .wa-msg.shown,.js-chat .wa-chat .wa-typing.shown,.js-chat .wa-chat .wa-replies>.shown{opacity:1;transform:none;transition:opacity .32s ease,transform .32s cubic-bezier(.2,.8,.2,1)}
.js-chat .wa-chat .wa-typing{display:none}
.js-chat .wa-chat .wa-typing.shown{display:flex}

/* Pantallas bajas: la tarjeta se achica en vez de salirse. */
@media(min-width:761px) and (max-height:820px){.hero-chat{--fit:.93;top:47%}.hero-chat-intro{margin-bottom:18px}}
@media(min-width:761px) and (max-height:730px){.hero-chat{--fit:.85}.hero-chat-intro h2{font-size:28px}}
@media(min-width:761px) and (max-height:650px){.hero-chat{--fit:.76}.hero-chat-intro{display:none}}
@media(min-width:761px) and (max-width:1000px){.wa-replies{grid-template-columns:1fr}.wa-body{min-height:170px}}

/* En movil no hay animacion de portada: la tarjeta es un bloque mas. */
@media(max-width:760px){
 .hero-assembly{display:contents}
 .hero-chat{position:relative;left:auto;top:auto;width:auto;grid-column:1/-1;transform:none!important;opacity:1!important;margin-top:28px;text-align:left}
 .hero-chat-intro{margin-bottom:18px}
 .hero-chat-intro .eyebrow{justify-content:flex-start;font-size:8px;letter-spacing:.1em;margin-bottom:14px}
 .hero-chat-intro h2{font-size:34px}
 .wa-chat{padding:18px 18px 16px;border-radius:16px}
 .wa-top{padding-bottom:16px}
 .wa-who{flex-direction:column;align-items:flex-start;gap:1px}
 .wa-reset{font-size:11px}
 .wa-reset span{display:none}
 .wa-body{min-height:0;gap:14px}
 .wa-msg{max-width:92%;font-size:16px}
 .wa-out{max-width:88%;font-size:15px;padding:11px 18px}
 .wa-replies{grid-template-columns:1fr;margin-top:16px;padding-top:14px}
 .wa-reply{font-size:14px;padding:13px 14px}
}
@media(prefers-reduced-motion:reduce){
 .hero-chat{transform:translate(-50%,-50%)!important;opacity:1!important}
 .hero-assembly{transform:none!important;opacity:1!important}
 .js-chat .wa-chat .wa-msg,.js-chat .wa-chat .wa-replies>*{opacity:1;transform:none}
 .js-chat .wa-chat .wa-typing{display:none!important}
}
