/* ToBroker — talkia.css
   Sección "Talkia" del Inicio: agentes de IA por WhatsApp, conversación demostrativa y recorrido "Cómo funciona".
   Contenido tomado del diseño tobroker-index.html facilitado por el cliente; estilo adaptado a los tokens del sitio. */

.talkia{padding:110px 0;background:var(--ink);color:#fff;overflow:hidden;overflow:clip}
.talkia::before{content:"";position:absolute;inset:0;background:
  radial-gradient(720px 520px at 82% 14%,rgba(26,40,125,.7),transparent 70%),
  radial-gradient(520px 420px at 6% 96%,rgba(158,238,252,.07),transparent 70%);pointer-events:none}
.talkia .container{position:relative}

/* --- Presentación --- */
.tk-top{display:grid;grid-template-columns:1.1fr .9fr;gap:64px;align-items:center}
.tk-top>*{min-width:0}
.tk-pill{display:inline-flex;align-items:center;gap:10px;padding:6px 14px 6px 7px;border-radius:999px;background:rgba(158,238,252,.08);border:1px solid rgba(158,238,252,.22);font-size:13px;font-weight:500;line-height:1.2;color:var(--celeste)}
.tk-pill b{background:var(--celeste);color:var(--ink);font-weight:700;border-radius:999px;padding:4px 9px;font-size:11px;letter-spacing:.06em}
.tk-copy h2{font-size:clamp(28px,3.6vw,44px);margin-top:18px;color:#fff}
.tk-copy h2 span{color:var(--celeste)}
.tk-copy>p{margin-top:16px;color:rgba(255,255,255,.7);font-size:18px;max-width:560px}
.tk-caps{list-style:none;margin:28px 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:10px;max-width:560px}
.tk-caps li{display:flex;gap:10px;align-items:center;padding:12px 14px;border-radius:12px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);font-size:14px;color:rgba(255,255,255,.9)}
.tk-caps svg{flex:none;width:18px;height:18px;color:var(--celeste)}

/* --- Conversación de WhatsApp (demostrativa) --- */
.tk-chat-wrap{display:flex;flex-direction:column;align-items:center;gap:14px}
.tk-chat{width:min(350px,100%);height:480px;border-radius:30px;background:#0B0F2A;padding:9px;box-shadow:0 40px 80px -30px rgba(0,0,0,.7),0 0 0 1px rgba(158,238,252,.15),inset 0 0 0 2px rgba(255,255,255,.04)}
.tk-screen{height:100%;border-radius:22px;overflow:hidden;background:#EFEAE2;display:flex;flex-direction:column}
.tk-head{display:flex;align-items:center;gap:10px;padding:13px 14px 11px;background:#075E54;color:#fff}
.tk-av{width:36px;height:36px;border-radius:50%;background:var(--celeste);color:var(--ink);display:grid;place-items:center;font:800 13px var(--font-h);flex:none}
.tk-name{font:600 14px/1.2 var(--font-b)}
.tk-status{font-size:11.5px;opacity:.85;display:flex;align-items:center;gap:5px}
.tk-status i{width:6px;height:6px;border-radius:50%;background:#25D366;display:inline-block}
.tk-body{flex:1;min-height:0;padding:12px 10px;display:flex;flex-direction:column;gap:6px;overflow:hidden;justify-content:flex-end;background-color:#EFEAE2;background-image:radial-gradient(rgba(0,0,0,.035) 1px,transparent 1px);background-size:14px 14px}
.tk-msg{flex:none;max-width:84%;padding:8px 10px 6px;border-radius:10px;font-size:13px;line-height:1.4;color:#111B21;box-shadow:0 1px .5px rgba(0,0,0,.12);opacity:0;transform:translateY(8px) scale(.98);animation:tk-pop .35s var(--ease) forwards}
.tk-msg.tk-in{background:#fff;align-self:flex-start;border-top-left-radius:2px}
.tk-msg.tk-out{background:#D9FDD3;align-self:flex-end;border-top-right-radius:2px}
.tk-msg .tk-t{display:block;text-align:right;font-size:10px;color:#667781;margin-top:2px}
.tk-msg.tk-sys{align-self:center;background:#FFF5C4;font-size:11.5px;padding:5px 10px;border-radius:8px;color:#54656F;font-weight:500}
.tk-msg .tk-ai{display:inline-flex;align-items:center;gap:4px;font:700 10px var(--font-b);color:var(--navy);background:rgba(26,40,125,.08);padding:2px 6px;border-radius:6px;margin-bottom:4px;letter-spacing:.04em}
.tk-msg .tk-ph{display:block;width:150px;height:90px;border-radius:6px;background:linear-gradient(135deg,#C9D3E6,#E9EEF7);margin-bottom:4px}
.tk-quote{margin-top:6px;display:flex;flex-direction:column;gap:5px}
.tk-q{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:7px 9px;border-radius:8px;background:#F5F7FB;border:1px solid #E3E7F0;font-size:12px}
.tk-q b{font-family:var(--font-h);color:var(--navy)}
.tk-q.tk-best{border-color:#25D366;background:#EAFBF0}
.tk-q .tk-tag{font-size:9.5px;font-weight:700;color:#0B6E4F;margin-left:6px}
.tk-pay{margin-top:6px;display:flex;align-items:center;gap:8px;padding:8px;border-radius:8px;background:#F0F2F5;font-size:12px}
.tk-pay .tk-ic{width:30px;height:30px;border-radius:7px;background:var(--navy);color:#fff;display:grid;place-items:center;flex:none}
.tk-pay small{color:#667781}
.tk-typing{flex:none;align-self:flex-start;background:#fff;border-radius:10px;padding:10px 12px;display:flex;gap:4px;box-shadow:0 1px .5px rgba(0,0,0,.12)}
.tk-typing span{width:6px;height:6px;border-radius:50%;background:#8696A0;animation:tk-blink 1.2s infinite}
.tk-typing span:nth-child(2){animation-delay:.2s}.tk-typing span:nth-child(3){animation-delay:.4s}
.tk-input{display:flex;gap:8px;padding:8px 10px 12px;background:#EFEAE2}
.tk-input div{flex:1;height:38px;border-radius:20px;background:#fff;font-size:13px;color:#8696A0;display:flex;align-items:center;padding:0 14px}
.tk-input span{width:38px;height:38px;border-radius:50%;background:#00A884;display:grid;place-items:center;color:#fff;flex:none}
.tk-demo{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;letter-spacing:.04em;color:rgba(255,255,255,.6);border:1px solid rgba(255,255,255,.16);padding:3px 9px;border-radius:999px;white-space:nowrap}
.tk-demo::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--warn)}
@keyframes tk-pop{to{opacity:1;transform:none}}
@keyframes tk-blink{0%,60%,100%{opacity:.3}30%{opacity:1}}

/* --- Cómo funciona: recorrido de un cliente --- */
.tk-how{margin-top:88px;padding-top:64px;border-top:1px solid rgba(255,255,255,.1)}
.tk-how-head{margin-bottom:48px;max-width:820px}
.tk-how-head .eyebrow{color:var(--celeste)}
.tk-how-head h3{font-size:clamp(22px,2.5vw,32px);color:#fff;margin-top:14px;line-height:1.2}
.tk-how-head p{color:rgba(255,255,255,.66);margin-top:12px;font-size:17px}
.tk-journey{position:relative;z-index:1;list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(6,1fr);gap:16px}
.tk-journey::before{content:"";position:absolute;top:27px;left:5%;right:5%;height:2px;background:linear-gradient(90deg,rgba(158,238,252,.1),rgba(158,238,252,.5),rgba(158,238,252,.1))}
.tk-step{position:relative;text-align:left}
.tk-dot{position:relative;z-index:1;width:56px;height:56px;border-radius:16px;background:#0C1559;border:1px solid rgba(158,238,252,.3);display:grid;place-items:center;color:var(--celeste);margin-bottom:18px}
.tk-dot svg{width:24px;height:24px}
.tk-tm{font:600 12px var(--font-b);color:var(--celeste);letter-spacing:.06em}
.tk-step h4{font-size:16px;color:#fff;margin:6px 0 8px;line-height:1.25;letter-spacing:-.01em}
.tk-step p{font-size:13.5px;color:rgba(255,255,255,.66);line-height:1.5}
.tk-who{display:inline-block;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:4px 8px;border-radius:6px}
.tk-who.ia{background:rgba(158,238,252,.14);color:var(--celeste)}
.tk-who.auto{background:rgba(37,211,102,.14);color:#6EE7A0}
.tk-foot{margin-top:52px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px;padding:22px 26px;border-radius:16px;background:rgba(158,238,252,.06);border:1px solid rgba(158,238,252,.16)}
.tk-foot p{font-size:17px;color:#fff;max-width:640px}
.tk-foot p b{color:var(--celeste)}

/* --- Storytelling del recorrido, guiado por el scroll: la línea avanza mientras el usuario baja y enciende cada etapa
       (clases y variables que pone talkia.js).
       Sin JavaScript o con prefers-reduced-motion el recorrido se muestra completo y estático. --- */
.tk-story-wrap{position:relative}
.tk-line{display:none}
.tk-story .tk-journey::before{display:none}
.tk-story .tk-line{display:block;position:absolute;z-index:0;left:var(--tk-a,28px);top:var(--tk-b,28px);width:var(--tk-len,0);height:2px;margin-top:-1px;border-radius:2px;background:rgba(158,238,252,.14);pointer-events:none}
.tk-story .tk-line i{position:absolute;left:0;top:0;height:100%;width:var(--tk-fill,0);border-radius:2px;background:linear-gradient(90deg,rgba(158,238,252,.35),var(--celeste));box-shadow:0 0 10px rgba(158,238,252,.55);transition:width .2s linear}
.tk-story .tk-line i::after{content:"";position:absolute;right:-5px;top:50%;width:10px;height:10px;margin-top:-5px;border-radius:50%;background:#fff;box-shadow:0 0 0 4px rgba(158,238,252,.25),0 0 14px 3px rgba(158,238,252,.8);opacity:0;transition:opacity .3s var(--ease)}
.tk-story.is-playing .tk-line i::after{opacity:1}
.tk-story.tk-noanim .tk-line i{transition:none}
/* bloque fijado (solo escritorio, lo activa talkia.js): el carril aporta el scroll y el bloque se queda quieto en pantalla */
.tk-pinned .tk-track{height:var(--tk-track)}
.tk-pinned .tk-pin{position:sticky;top:var(--tk-top,90px)}
/* en vertical (móvil y tablet) la línea baja en lugar de avanzar a la derecha */
.tk-story.tk-vert .tk-line{left:var(--tk-b,28px);top:var(--tk-a,28px);width:2px;height:var(--tk-len,0);margin:0 0 0 -1px}
.tk-story.tk-vert .tk-line i{width:100%;height:var(--tk-fill,0);background:linear-gradient(180deg,rgba(158,238,252,.35),var(--celeste));transition:height .2s linear}
.tk-story.tk-vert .tk-line i::after{right:auto;left:50%;top:auto;bottom:-5px;margin:0 0 0 -5px}
/* estados de cada paso: pendiente (atenuado), actual (encendido) y completado */
.tk-story .tk-step>:not(.tk-dot){opacity:.3;transition:opacity .35s var(--ease)}
.tk-story .tk-dot{border-color:rgba(158,238,252,.16);color:rgba(158,238,252,.4);transition:background .4s var(--ease),color .4s var(--ease),border-color .4s var(--ease),box-shadow .4s var(--ease),transform .4s var(--ease)}
.tk-story .tk-step.is-done>:not(.tk-dot),.tk-story .tk-step.is-on>:not(.tk-dot){opacity:1}
.tk-story .tk-step.is-done .tk-dot{border-color:rgba(158,238,252,.55);color:var(--celeste)}
.tk-story .tk-step.is-on .tk-dot{background:var(--celeste);border-color:var(--celeste);color:var(--ink);box-shadow:0 0 0 6px rgba(158,238,252,.14),0 0 26px rgba(158,238,252,.5);transform:scale(1.06)}

/* --- Responsive --- */
@media (max-width:1100px){
  .tk-top{gap:40px}
  .tk-journey{gap:12px}
}
@media (max-width:960px){
  .tk-top{grid-template-columns:1fr;gap:44px}
  .tk-copy>p,.tk-caps{max-width:none}
  .tk-journey{grid-template-columns:1fr;gap:0}
  .tk-journey::before{display:none}
  .tk-step{display:grid;grid-template-columns:56px 1fr;column-gap:18px;padding-bottom:30px}
  .tk-step:last-child{padding-bottom:0}
  .tk-step>*{grid-column:2;justify-self:start}
  .tk-step .tk-dot{grid-column:1;grid-row:1/span 4;margin-bottom:0}
  .tk-step .tk-tm{margin-top:4px}
  /* Bloque fijado en móvil y tablet (clase tk-solo, la pone talkia.js cuando el bloque cabe en pantalla):
     fila compacta de iconos con la línea y, debajo, solo el paso actual. Todos los textos comparten las mismas
     celdas, así el alto no cambia al pasar de un paso a otro. */
  .tk-solo .tk-how-head{margin-bottom:26px}
  .tk-solo .tk-how-head p{display:none}
  .tk-solo .tk-journey{grid-template-columns:repeat(6,44px);justify-content:space-between;gap:0}
  .tk-solo .tk-step{display:contents}
  .tk-solo .tk-step .tk-dot{grid-row:1;width:44px;height:44px;border-radius:13px;margin-bottom:22px}
  .tk-solo .tk-step:nth-child(1) .tk-dot{grid-column:1}.tk-solo .tk-step:nth-child(2) .tk-dot{grid-column:2}.tk-solo .tk-step:nth-child(3) .tk-dot{grid-column:3}.tk-solo .tk-step:nth-child(4) .tk-dot{grid-column:4}.tk-solo .tk-step:nth-child(5) .tk-dot{grid-column:5}.tk-solo .tk-step:nth-child(6) .tk-dot{grid-column:6}
  .tk-solo .tk-dot svg{width:20px;height:20px}
  .tk-solo .tk-step>:not(.tk-dot){grid-column:1/-1;justify-self:start;opacity:0;visibility:hidden;transition:opacity .3s var(--ease),visibility .3s}
  .tk-solo .tk-step.is-done>:not(.tk-dot){opacity:0}
  .tk-solo .tk-step.is-on>:not(.tk-dot){opacity:1;visibility:visible}
  .tk-solo .tk-step>.tk-tm{grid-row:2;margin-top:0;font-size:13px}
  .tk-solo .tk-step>h4{grid-row:3;font-size:20px;margin:8px 0 10px}
  .tk-solo .tk-step>p{grid-row:4;font-size:15px}
  .tk-solo .tk-step>.tk-who{grid-row:5;margin-top:14px}
}
@media (max-width:640px){
  .talkia{padding:76px 0}
  .tk-copy>p{font-size:16px}
  .tk-caps{grid-template-columns:1fr}
  .tk-chat{height:460px}
  .tk-how{margin-top:60px;padding-top:48px}
  .tk-how-head{margin-bottom:36px}
  .tk-how-head p{font-size:16px}
  .tk-foot{padding:20px}
  .tk-foot p{font-size:16px}
  .tk-foot .btn{width:100%}
}
