/* W-045: subtle motion and three example visuals for the home page only.
   Loaded after home.css by index.html alone, scoped to body.zl-home. Every colour is a live token from zl.css, so the light theme follows.
   Motion rules:
   - Section reveal needs html.zl-mo, which the inline script in <head> sets only when IntersectionObserver exists and the visitor has not asked for reduced motion. Without it nothing is hidden.
   - The hero ticks and card lift are pure CSS and sit inside prefers-reduced-motion:no-preference.
   - Only opacity and transform move, so nothing shifts the layout. */

/* ---- 1. sections fade and rise once ---- */
html.zl-mo .zl-rv{transition:opacity .6s ease,transform .6s cubic-bezier(.2,.7,.2,1)}
html.zl-mo .zl-rv:not(.zl-in){opacity:0;transform:translateY(16px)}
html.zl-mo .zl-rv.zl-now{transition:none}
@media print{html.zl-mo .zl-rv:not(.zl-in){opacity:1;transform:none}}

@media (prefers-reduced-motion:no-preference){
  /* ---- 2. the hero slip ticks its list once on load ---- */
  .zl-slip li svg path,.zl-slip-ok svg path{stroke-dasharray:24;animation:zl-tick .45s ease-out both}
  .zl-slip li:nth-child(1) svg path{animation-delay:.5s}
  .zl-slip li:nth-child(2) svg path{animation-delay:.9s}
  .zl-slip li:nth-child(3) svg path{animation-delay:1.3s}
  .zl-slip li:nth-child(4) svg path{animation-delay:1.7s}
  .zl-slip-ok span{animation:zl-pop .4s cubic-bezier(.2,.7,.2,1) 2.2s both}
  .zl-slip-ok svg path{animation-delay:2.35s}

  /* ---- 3. a gentle lift on agent cards (the Who we help rows already lift in home.css) ---- */
  @media (hover:hover){
    :root body.zl-home.zl-home .zl-plans>.zl-plan:nth-child(n){transition:transform .2s ease,box-shadow .2s ease}
    :root body.zl-home.zl-home .zl-plans>.zl-plan:nth-child(n):hover{transform:translateY(-3px);box-shadow:0 26px 44px -26px var(--lift)}
  }
}
@keyframes zl-tick{from{stroke-dashoffset:24}to{stroke-dashoffset:0}}
@keyframes zl-pop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}
@keyframes zl-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes zl-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes zl-ring{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--zl-ink) 45%,transparent)}100%{box-shadow:0 0 0 7px transparent}}

/* ---- example visuals: what an agent does, drawn in HTML and CSS ---- */
.zl-see{display:grid;grid-template-columns:minmax(0,1fr);gap:1.25rem;margin-top:clamp(2.5rem,5vw,3.5rem)}
@media (min-width:900px){.zl-see{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem}}
:root body.zl-home.zl-home .zl-fig{
  --edge:var(--zl-rule-a);
  position:relative;margin:0;background:var(--bg-card);color:var(--text);
  border-radius:var(--r) var(--tab) var(--r) var(--r);
  padding:var(--pv) var(--pr) var(--pv) var(--pl);box-shadow:0 22px 40px -26px var(--lift);
}
:root body.zl-home.zl-home .zl-fig::before{content:"";position:absolute;inset:0 auto 0 0;width:6px;border-radius:var(--r) 0 0 var(--r);background:var(--edge)}
:root body.zl-home.zl-home .zl-fig:nth-child(2){--edge:var(--zl-rule-m)}
:root body.zl-home.zl-home .zl-fig:nth-child(3){--edge:var(--zl-rule-b)}
.zl-fig-in{display:flex;flex-direction:column;gap:.9rem;height:100%}
.zl-fig-t{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem;font-size:1.125rem;font-weight:700;letter-spacing:-.015em;line-height:1.25;color:var(--zl-white)}
.zl-fig-tag{font-size:.8125rem;font-weight:600;letter-spacing:.02em;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:.1rem .6rem}
.zl-fig-l{margin:0;font-size:.8125rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.zl-fig-v{margin:0;font-size:1rem;font-weight:600;line-height:1.35;color:var(--zl-white)}
.zl-fig-s{margin:0;font-size:.875rem;color:var(--muted)}
.zl-fig ul{margin:0;padding:0;list-style:none}
.zl-fig-box{background:var(--bg);border:1px solid var(--line);border-radius:var(--r) 12px var(--r) var(--r);padding:.85rem 1rem;display:grid;gap:.45rem}

/* checked list */
.zl-fig-list li{display:flex;align-items:center;gap:.7rem;min-height:2.5rem;border-bottom:1px solid var(--line);font-size:.9375rem;line-height:1.3}
.zl-fig-list li svg{flex:none;width:18px;height:18px;fill:none;stroke:var(--zl-text-a);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.zl-fig-list li span{margin-left:auto;font-size:.8125rem;color:var(--muted)}
.zl-fig-msg{margin:0;font-size:.9375rem;line-height:1.45;color:var(--text)}
.zl-fig-in>.zl-fig-box:last-child:not(.zl-fig-job){margin-top:auto}

/* waiting-for-approval pill */
.zl-fig-wait{margin:0;display:inline-flex;align-self:flex-start;justify-self:start;align-items:center;gap:.55rem;font-size:.875rem;font-weight:700;line-height:1.2;color:var(--zl-ink);background:var(--zl-a-solid);border-radius:var(--r);padding:.5rem .8rem}
.zl-fig-wait i{flex:none;width:.6rem;height:.6rem;border-radius:50%;background:var(--zl-ink)}
.zl-fig-in>.zl-fig-wait{margin-top:auto}

/* lead to job */
.zl-fig-arrow{align-self:center;width:22px;height:22px;fill:none;stroke:var(--zl-text-m);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.zl-fig-job dl{margin:0;display:grid;gap:.3rem}
.zl-fig-job dl div{display:flex;gap:.75rem;font-size:.9375rem;line-height:1.35}
.zl-fig-job dt{flex:none;width:4.2rem;color:var(--muted)}
.zl-fig-job dd{margin:0;color:var(--text);font-weight:600}

/* expiry reminders */
.zl-fig-exp li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.35rem .75rem;align-items:baseline;padding:.6rem 0;border-bottom:1px solid var(--line);font-size:.9375rem;line-height:1.3}
.zl-fig-exp li b{font-weight:600;color:var(--text)}
.zl-fig-exp li em{font-style:normal;font-size:.8125rem;color:var(--muted)}
.zl-fig-exp .m{grid-column:1/-1;height:.5rem;border-radius:999px;background:var(--line);overflow:hidden}
.zl-fig-exp .m i{display:block;height:100%;width:var(--w);border-radius:999px;background:var(--zl-text-a);transform-origin:left}
.zl-fig-exp li:first-child .m i{background:var(--zl-a-solid)}

/* the visuals play once when they scroll into view (html.zl-mo and .zl-in are set by the inline script; without them the finished state shows) */
@media (prefers-reduced-motion:no-preference){
  html.zl-mo .zl-fig.zl-in :is(.zl-fig-list li,.zl-fig-box,.zl-fig-job,.zl-fig-exp li,.zl-fig-arrow){animation:zl-rise .5s ease-out both}
  html.zl-mo .zl-fig.zl-in :is(.zl-fig-list li,.zl-fig-exp li):nth-child(2){animation-delay:.25s}
  html.zl-mo .zl-fig.zl-in :is(.zl-fig-list li,.zl-fig-exp li):nth-child(3){animation-delay:.5s}
  html.zl-mo .zl-fig.zl-in .zl-fig-list li svg path{stroke-dasharray:24;animation:zl-tick .4s ease-out both}
  html.zl-mo .zl-fig.zl-in .zl-fig-list li:nth-child(1) svg path{animation-delay:.3s}
  html.zl-mo .zl-fig.zl-in .zl-fig-list li:nth-child(2) svg path{animation-delay:.55s}
  html.zl-mo .zl-fig.zl-in .zl-fig-list li:nth-child(3) svg path{animation-delay:.8s}
  html.zl-mo .zl-fig.zl-in .zl-fig-box{animation-delay:1s}
  html.zl-mo .zl-fig.zl-in .zl-fig-first{animation-delay:0s}
  html.zl-mo .zl-fig.zl-in .zl-fig-exp .m i{animation:zl-grow .8s cubic-bezier(.2,.7,.2,1) .4s both}
  html.zl-mo .zl-fig.zl-in .zl-fig-arrow{animation-delay:.3s}
  html.zl-mo .zl-fig.zl-in .zl-fig-job{animation-delay:.55s}
  html.zl-mo .zl-fig.zl-in .zl-fig-wait{animation:zl-rise .5s ease-out 1.1s both}
  html.zl-mo .zl-fig.zl-in .zl-fig-wait i{animation:zl-ring 1.4s ease-out 1.6s 2}
}
