/* AI Buddy · "What clients say about us." (#clients, data-sec="clients")
   Headline and both testimonials read together in one window on a wide page. Nothing depends on scroll position;
   the entrance is the shared one (assets/kit.js): the headline, then each video frame and each quote as its own part.

   Layout   .cli-list       the two testimonials, one under the other, with a hairline between them
            .cli-q          one testimonial: a video (.cli-vid, a link to it on YouTube, showing its thumbnail .cli-img)
                            beside a quote (.cli-bq)
            .cli-flip       the second one is mirrored: quote first, video on the right
   Sizes    --cli-vw        the video column; its height is about a third of the window (16:10 frame), so both rows fit
            the quote uses the shared second headline size (--fs-h3)
   States   .is-armed / .is-in from kit.js (entrance only): the headline, then the list as one part, inside which the frames
            and quotes follow each other 120 ms apart (one part, so on a phone the second testimonial is ready when reached)
            :hover on the video tints the play button */

.cli{--cli-vw:min(46%,calc(var(--dvh) * .31 * 1.6))}
.cli-list{display:grid;margin-top:clamp(28px,calc(var(--u) * 3),56px)}

/* one testimonial */
.cli-q{
  display:grid;grid-template-columns:var(--cli-vw) minmax(0,1fr);align-items:center;gap:clamp(28px,5cqw,90px);
  padding-block:clamp(18px,calc(var(--dvh) * .03),36px);border-top:1px solid var(--line);
}
.cli-q:first-child{padding-top:0;border-top:0}
.cli-q:last-child{padding-bottom:0}
.cli-flip{grid-template-columns:minmax(0,1fr) var(--cli-vw)}
.cli-flip .cli-vid{order:2}

/* the video */
.cli-vid{
  position:relative;display:block;aspect-ratio:16/10;overflow:hidden;border-radius:16px;
  background:#0e0e12;border:1px solid rgba(255,255,255,.09);color:var(--ink-hi);text-decoration:none;
  transition:transform .8s var(--ease),border-color .5s;
}
.cli-vid::before{content:"";position:absolute;left:8%;right:8%;top:0;height:1px;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.55),rgba(255,255,255,0));opacity:.12;pointer-events:none}
.cli-vid:focus-visible{outline:2px solid var(--v2);outline-offset:4px}
.cli-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.cli-play{
  position:absolute;left:50%;top:50%;width:64px;height:64px;margin:-32px 0 0 -32px;border-radius:50%;
  display:grid;place-items:center;background:rgba(12,12,16,.62);border:1px solid rgba(255,255,255,.45);   /* dark, so it holds on a bright picture */
  transition:transform .6s var(--ease),background .4s,border-color .4s;
}
.cli-play svg{width:18px;height:18px;margin-left:3px;fill:#fff}
.cli-play::after{content:"";position:absolute;inset:-1px;border-radius:50%;border:1px solid var(--v2);opacity:0}
.cli-vid:hover{transform:scale(.985);border-color:rgba(180,140,255,.4)}
.cli-vid:hover .cli-play{transform:scale(1.14);background:var(--v);border-color:var(--v)}
.cli-vid:hover .cli-play::after{animation:ring 1.2s var(--ease) infinite}   /* ring: keyframes in site.css */

/* the quote */
.cli-bq{margin:0}
.cli-qm{display:block;font-size:64px;line-height:.6;font-weight:300;color:var(--v)}
.cli-bq p{margin:18px 0 0;font-family:var(--serif);font-size:var(--fs-h3);font-weight:300;line-height:1.08;letter-spacing:-.035em;color:var(--ink-hi);text-wrap:pretty}
.cli-bq cite{display:flex;align-items:center;gap:14px;margin-top:22px;font-style:normal;font-size:14px;line-height:1.3;color:#b5b5bd}
.cli-bq cite::before{content:"";width:28px;height:1px;background:#6d6d75}

/* entrance */
.is-armed .cli-list[data-u]{transform:none}
.is-armed .cli-list .cli-vid,.is-armed .cli-list .cli-bq{opacity:0;transform:translate3d(0,14px,0)}
.is-armed .cli-list.is-in .cli-vid,.is-armed .cli-list.is-in .cli-bq{opacity:1;transform:none;transition:opacity .5s var(--ease),transform .6s var(--ease)}
.is-armed .cli-list.is-in .cli-q .cli-bq{transition-delay:.12s}
.is-armed .cli-list.is-in .cli-q+.cli-q .cli-vid{transition-delay:.24s}
.is-armed .cli-list.is-in .cli-q+.cli-q .cli-bq{transition-delay:.36s}

/* narrow page (phones, and the phone preview): one column, the video above its quote in both testimonials */
@container (max-width:900px){
  .cli-q,.cli-flip{grid-template-columns:minmax(0,1fr);gap:22px;padding-block:32px}
  .cli-q:first-child{padding-top:0}
  .cli-q:last-child{padding-bottom:0}
  .cli-flip .cli-vid{order:0}
  .cli-bq p{font-size:28px}
}
