/* v6 (owner 2026-11-29): 5-step sticky scroll stepper in #features.
   Steps 1-4 = our feature cards (text left, product video in a bracket frame right),
   step 5 = Gojiberry-style booked-calls week calendar. Markup + step-lock JS:
   templates/_agent_steps.html. Desktop (>=1024px): full-width panels stack, the previous
   panel peeks ~38px above (ghosted), old text blurs out. Phone: plain stacked list. */

#agent-steps{--ease:cubic-bezier(.2,.8,.2,1);--ln:#E6E8EC;--bk:#1F2937;--bk-len:11px;--bk-w:1.5px;--pk:38px;
  position:relative;margin-top:2.5rem;color:#0B1220}
@media (min-width:1024px){#agent-steps{margin-top:0}}

/* ---------- step text ---------- */
.st-top{display:flex;align-items:center;flex-wrap:wrap;gap:.8rem}
.st-badge{display:inline-flex;align-items:center;gap:8px;padding:.4rem .7rem;border-radius:.55rem;background:#FFEAE3;color:#F0643F;
  font-family:'Geist',ui-sans-serif,system-ui,sans-serif;font-weight:600;font-size:.95rem;line-height:1;font-variant-numeric:tabular-nums}
.st-badge svg{width:17px;height:17px;flex:none}
.st-eye{font-size:.875rem;font-weight:600;color:#64748B}
#agent-steps h4.st-h{margin-top:1.1rem;font-family:'Outfit','Geist',ui-sans-serif,system-ui,sans-serif;font-weight:400;
  font-size:clamp(1.75rem,2.4vw,2.4rem);line-height:1.08;letter-spacing:-.028em;color:#0B1220;text-wrap:balance}
.st-p{margin-top:.95rem;max-width:34rem;font-size:1.0625rem;line-height:1.6;color:#64748B}
.st-ul{margin-top:1.15rem;display:grid;gap:.6rem}
.st-ul li{display:flex;align-items:flex-start;gap:.6rem;font-size:.975rem;line-height:1.45;color:#334155}
.st-ul svg{width:18px;height:18px;flex:none;margin-top:1px;color:#F47552}
.st-pow{margin-top:2.25rem;display:flex;align-items:center;gap:12px;font-size:15px;color:#64748B}
.st-cl{display:inline-flex;align-items:center;gap:5px}
.st-cl b{font-weight:600;font-size:16px;color:#1F2937}
#agent-steps #sendcalc{margin-top:1.25rem}

/* ---------- frame + media box ---------- */
.st-frm::before{content:"";position:absolute;inset:-1px;pointer-events:none;z-index:2;
  background:
    linear-gradient(var(--bk) 0 0) left top/var(--bk-len) var(--bk-w) no-repeat,
    linear-gradient(var(--bk) 0 0) left top/var(--bk-w) var(--bk-len) no-repeat,
    linear-gradient(var(--bk) 0 0) right top/var(--bk-len) var(--bk-w) no-repeat,
    linear-gradient(var(--bk) 0 0) right top/var(--bk-w) var(--bk-len) no-repeat,
    linear-gradient(var(--bk) 0 0) left bottom/var(--bk-len) var(--bk-w) no-repeat,
    linear-gradient(var(--bk) 0 0) left bottom/var(--bk-w) var(--bk-len) no-repeat,
    linear-gradient(var(--bk) 0 0) right bottom/var(--bk-len) var(--bk-w) no-repeat,
    linear-gradient(var(--bk) 0 0) right bottom/var(--bk-w) var(--bk-len) no-repeat}
.st-in{display:flex;align-items:center;justify-content:center;width:100%;height:100%;transition:opacity .5s var(--ease),filter .5s var(--ease)}
.st-box{position:relative;aspect-ratio:4/3;border-radius:8px;overflow:hidden;background:#fff;container-type:inline-size;
  width:min(calc(100cqw - 64px),calc((100cqh - 64px)*4/3));
  box-shadow:0 0 0 1px #E8EAEE,0 12px 32px -16px rgba(15,23,42,.18)}
.st-box video,.st-box img{display:block}
.st-empty{height:100%;display:grid;place-items:center;font-size:.875rem;font-weight:600;color:#64748B}

/* ---------- desktop: sticky stage, stacked panels, step lock ---------- */
@media (min-width:1024px){
  #agent-steps{height:calc(100vh + var(--n)*60vh)}
  .st-sticky{position:sticky;top:0;height:100vh;box-sizing:border-box;display:flex;align-items:center;
    padding:calc(4.25rem + var(--pk) + 14px) 0 24px}
  .st-stage{position:relative;width:100%;height:100%;max-height:620px}

  .st-text{position:absolute;inset:0 54% 0 0;z-index:30;pointer-events:none}
  .st-t{position:absolute;inset:0;padding:2.75rem 1rem 2.5rem 3rem;display:flex;flex-direction:column;justify-content:center;
    opacity:0;filter:blur(6px);transform:translateY(10px);pointer-events:none;
    transition:opacity .45s var(--ease),filter .45s var(--ease),transform .55s var(--ease)}
  .st-t.is-active{opacity:1;filter:none;transform:none;pointer-events:auto;transition-delay:.08s}
  .st-t.is-past{transform:translateY(-10px)}

  .st-deck{position:absolute;inset:0}
  .st-slot{position:absolute;inset:0;background:#fff;border:1px solid var(--ln);opacity:0;transform:translateY(46px);z-index:1;
    transition:transform .65s var(--ease),opacity .45s var(--ease)}
  .st-slot.is-active{opacity:1;transform:none;z-index:5}
  .st-slot.is-prev{opacity:1;transform:translateY(calc(-1*var(--pk)));z-index:4}
  .st-slot.is-prev .st-in{opacity:.35;filter:blur(1.5px)}
  .st-slot.is-old,.st-slot.is-gone{opacity:0;transform:translateY(calc(-2*var(--pk)));z-index:3}
  .st-slot.is-next{opacity:0;transform:translateY(46px);z-index:6}
  .st-frm{position:absolute;inset:18px 18px 18px calc(46% + 6px);border:1px solid var(--ln);container-type:size;
    display:flex;align-items:center;justify-content:center}

  .st-t.has-calc .st-ul{display:none}
}
@media (min-width:1024px) and (max-width:1279.98px),(min-width:1024px) and (max-height:860px){
  .st-ul{display:none}
}

/* ---------- phone / tablet: stacked list ---------- */
@media (max-width:1023.98px){
  #agent-steps{display:flex;flex-direction:column;margin-top:1rem}
  #agent-steps .st-sticky,#agent-steps .st-stage,#agent-steps .st-text,#agent-steps .st-deck{display:contents}
  .st-t{order:var(--o);margin-top:3.5rem}
  .st-t[data-i="0"]{margin-top:1rem}
  .st-slot{order:var(--o);margin-top:1.5rem;position:relative}
  .st-frm{position:relative;padding:14px;border:1px solid var(--ln)}
  .st-box{width:100%}
}

/* ---------- step 5: booked-calls week calendar ---------- */
.c5-cal{--g:9.5%;display:flex;flex-direction:column;font-family:'Geist',ui-sans-serif,system-ui,sans-serif;color:#1F2937}
.c5-hd{flex:none;display:grid;grid-template-columns:var(--g) repeat(5,1fr);height:9%;min-height:18px;background:#F7F8FA;border-bottom:1px solid #ECEEF2}
.c5-nav{display:flex;align-items:center;justify-content:center;gap:max(2px,.5cqw)}
.c5-nav span{display:grid;place-items:center;width:max(10px,2.5cqw);height:max(10px,2.5cqw);border:1px solid #E1E4E9;border-radius:3px;background:#fff;
  color:#6B7280;font-size:max(8px,2cqw);line-height:1}
.c5-day{display:flex;align-items:center;justify-content:center;border-left:1px solid #ECEEF2;
  font-size:max(6.5px,1.4cqw);font-weight:600;letter-spacing:.04em;color:#6B7280;white-space:nowrap}
.c5-bd{position:relative;flex:1}
.c5-hr,.c5-hh{position:absolute;left:var(--g);right:0;height:0;border-top:1px solid #ECEEF2}
.c5-hh{border-top-color:#F5F6F8}
.c5-hr span{position:absolute;right:100%;top:0;transform:translateY(-50%);padding-right:max(4px,1.3cqw);
  font-size:max(6.5px,1.4cqw);font-weight:500;color:#9CA3AF;white-space:nowrap}
.c5-col{position:absolute;top:0;bottom:0;left:calc(var(--g) + var(--d)*(100% - var(--g))/5);border-left:1px solid #ECEEF2}
.c5-ev{position:absolute;left:calc(var(--g) + var(--d)*(100% - var(--g))/5 + 2px);width:calc((100% - var(--g))/5 - 4px);
  display:flex;flex-direction:column;gap:max(1px,.2cqw);overflow:hidden;border-radius:max(3px,.9cqw);padding:max(2px,.55cqw) max(3px,.8cqw)}
.c5-cy{background:#CCF6F2}.c5-pe{background:#FFD3A6}.c5-ye{background:#FCE588}.c5-sa{background:#F9B4AE}.c5-la{background:#CDBDFA}.c5-gr{background:#BDF5B5}
.c5-n{font-size:max(7.5px,1.75cqw);font-weight:600;line-height:1.2;color:#1F2937;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.c5-tall .c5-n{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.c5-tm{font-size:max(6.5px,1.5cqw);line-height:1.2;color:#4B5563;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.c5-avs{margin-top:auto;display:flex;align-items:center;min-width:0}
.c5-av{display:grid;place-items:center;flex:none;width:max(12px,3.3cqw);height:max(12px,3.3cqw);border-radius:50%;border:1.5px solid #fff;
  margin-left:min(-3px,-.8cqw);font-size:max(5px,1.05cqw);font-weight:700;color:#374151}
.c5-av:first-child{margin-left:0}
.c5-a0{background:#C7D2FE}.c5-a1{background:#FBCFE8}.c5-a2{background:#BBF7D0}.c5-a3{background:#FDE68A}
.c5-more{margin-left:max(3px,.7cqw);font-size:max(6px,1.35cqw);color:#4B5563}
.c5-on{margin-left:auto;padding-left:max(2px,.5cqw);font-size:max(6px,1.35cqw);color:#4B5563;white-space:nowrap}
.c5-lk{margin-top:auto;display:flex;align-items:center;gap:max(2px,.6cqw);font-size:max(6px,1.35cqw);color:#4B5563;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.c5-lk i{flex:none;width:max(5px,1.15cqw);height:max(5px,1.15cqw);border-radius:50%;background:#F97316}
@container (max-width:420px){
  .c5-tm,.c5-x{display:none}   /* 30-min events keep 1 line + ellipsis; tall ones clamp to 2 (above) */
}

/* booking animation: events drop in one by one each time step 5 becomes active (desktop)
   or scrolls into view (phone) */
.c5-ev.an{animation:c5in .55s var(--ease) both;animation-delay:calc(.25s + var(--k)*.15s);animation-play-state:paused}
@keyframes c5in{from{opacity:0;transform:translateY(5px) scale(.96)}to{opacity:1;transform:none}}
#agent-steps.armed .st-slot:not(.is-next) .an,#agent-steps .st-slot.is-seen .an{animation-play-state:running}
#agent-steps .st-slot.is-next .an{animation:none}

@media (prefers-reduced-motion:reduce){
  #agent-steps *,#agent-steps *::before{animation:none!important;transition:none!important}
}
