/* Motion layer: live chat pop-ups around the hero devices, @name typing */
.stage{--sp:0}
.stage .phone,.stage .desk{transition:translate .5s cubic-bezier(.2,.7,.2,1)}
.stage .phone.l{translate:calc(var(--sp)*-60px) calc(var(--sp)*20px)}
.stage .phone.r{translate:calc(var(--sp)*60px) calc(var(--sp)*20px)}
.stage .desk{translate:calc(var(--sp)*-50px) calc(var(--sp)*16px)}

/* Glass pop-ups. motion.js places them and keeps them inside the screen. */
.note{position:absolute;left:0;top:0;z-index:5;display:flex;align-items:center;padding:10px 14px 10px 10px;border-radius:18px;text-align:left;
  width:max-content;max-width:min(250px,calc(100vw - 24px));visibility:hidden;
  background:rgba(19,30,42,.74);border:1px solid rgba(255,255,255,.1);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  box-shadow:0 18px 40px -18px rgba(0,0,0,.8);font:500 13px/1.3 var(--sans);color:var(--ink)}
.note.placed{visibility:visible;animation:noteIn .7s var(--in,.4s) cubic-bezier(.2,.7,.2,1) both}
.note>div{display:flex;gap:10px;align-items:center;min-width:0;animation:bob 6s var(--b,0s) ease-in-out infinite}
.note.live{width:250px}
.note small{display:block;font-weight:400;font-size:12px;color:var(--grey)}
.note .av{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font:600 11px var(--sans);color:#fff;background:var(--c,#3a6ea5)}
.note .av svg{width:16px;height:16px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.note .txt{display:block;min-height:34px}
@keyframes noteIn{from{opacity:0;scale:.85}to{opacity:1;scale:1}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}

/* Typing dots, then the message */
.dots{display:inline-flex;gap:4px;padding:5px 0}
.dots i{width:6px;height:6px;border-radius:50%;background:var(--grey);animation:dot 1s infinite}
.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
.swapin{animation:swapIn .35s ease both}
@keyframes swapIn{from{opacity:0;transform:translateY(6px)}}

/* @name typing */
.note.handle{font-size:15px;white-space:nowrap}
.note.handle .at{color:var(--gold)}
.note.handle .caret{display:inline-block;width:2px;height:16px;background:var(--gold);margin-left:2px;vertical-align:-3px;animation:caret 1s steps(1) infinite}
.note.handle .free{display:inline-flex;align-items:center;gap:5px;margin-left:10px;font-size:12px;color:#2fb36b;opacity:0;transition:opacity .3s}
.note.handle .free.on{opacity:1}
.note.handle .free svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
@keyframes caret{50%{opacity:0}}

/* Tablets show three, phones two, smaller */
@media (max-width:900px){.note.hide-md{display:none}}
@media (max-width:640px){.note{font-size:12px;padding:8px 10px 8px 8px}.note.live{width:min(210px,calc(100vw - 24px))}.note .av{width:26px;height:26px;font-size:10px}.note.handle{font-size:13px}.note.hide-sm{display:none}}

@media (prefers-reduced-motion:reduce){
  .note.placed,.note>div,.dots i,.caret{animation:none!important}
  .stage .phone,.stage .desk{translate:none!important}
}
