/* velocity section, owned by velocity agent */
.s-velocity{
  --vfs:clamp(60px,7.8vw,150px);
  --vgap:.32em;
  position:relative;z-index:2;background:var(--paper);color:var(--ink);
  overflow:hidden;
  padding:clamp(56px,9vh,110px) 0;
  min-height:70vh;
  display:flex;flex-direction:column;justify-content:center;gap:clamp(10px,2.4vh,30px);
}
.s-velocity__row{position:relative;z-index:1;font-family:var(--f-wide);font-weight:800;font-size:var(--vfs);line-height:1;letter-spacing:-.03em;white-space:nowrap;user-select:none;-webkit-user-select:none}
.s-velocity__row:hover{z-index:3}
.s-velocity__track{display:flex;width:max-content;will-change:transform;transform-origin:50% 50%;backface-visibility:hidden}
.s-velocity__group{display:flex;align-items:center;flex:none}
.s-velocity__word{position:relative;display:block;flex:none;margin-right:var(--vgap);padding:.08em 0 .04em}

/* outlined row: stroke at rest, clay fill swept in by a band around viewport centre (clip-path set in JS) */
.s-velocity__row--outline .s-velocity__o{display:block;color:transparent;-webkit-text-stroke:max(1.5px,.011em) var(--ink)}
.s-velocity__row--outline .s-velocity__f{position:absolute;left:0;top:0;padding:inherit;display:block;color:var(--clay);-webkit-text-stroke:max(1.5px,.011em) var(--clay);clip-path:inset(0 100% 0 0);will-change:clip-path}

/* pills */
.s-velocity__pill{position:relative;display:block;flex:none;margin-right:var(--vgap);height:.78em;width:1.5em;outline-offset:6px;-webkit-tap-highlight-color:transparent}
.s-velocity__pill--vid{width:1.95em}
.s-velocity__oval{position:absolute;inset:0;display:block;border-radius:999px;background:var(--stone);
  clip-path:inset(0 round 999px);
  transition:transform .6s var(--ease),clip-path .6s var(--ease)}
.s-velocity__cut{position:absolute;left:50%;top:50%;height:135%;width:auto;max-width:none;transform:translate(-50%,-44%);pointer-events:none;
  filter:drop-shadow(0 .02em .03em rgba(14,11,9,.18));transition:transform .6s var(--ease)}
.s-velocity__cv{position:absolute;inset:0;width:100%;height:100%;display:block}
.s-velocity__tag{position:absolute;left:calc(100% + 14px);top:50%;z-index:2;display:flex;flex-direction:column;gap:2px;
  padding:9px 13px 10px;background:var(--ink);color:var(--paper);border-radius:8px;
  font-family:var(--f-sans);font-weight:500;font-size:14px;line-height:1.2;letter-spacing:0;white-space:nowrap;
  opacity:0;transform:translate3d(-10px,-50%,0) scale(.96);transform-origin:0 50%;pointer-events:none;
  transition:opacity .25s var(--ease),transform .5s var(--ease)}
.s-velocity__tag b{font-weight:600}
.s-velocity__tag span{color:rgba(255,255,255,.72);font-variant-numeric:tabular-nums}
.s-velocity__pill:focus-visible .s-velocity__oval{outline:2px solid var(--clay);outline-offset:4px}

@media (hover:hover) and (pointer:fine){
  .s-velocity__pill:hover{z-index:4}
  .s-velocity__pill:hover .s-velocity__oval{transform:scale(1.32) rotate(-7deg);clip-path:inset(-30% -6% round 999px)}
  .s-velocity__pill--vid:hover .s-velocity__oval{transform:scale(1.26) rotate(5deg);clip-path:inset(0 round 999px)}
  .s-velocity__pill:hover .s-velocity__cut{transform:translate(-50%,-50%) scale(1.06)}
  .s-velocity__pill:hover .s-velocity__tag{opacity:1;transform:translate3d(calc(.22em),-50%,0) scale(1)}
}
.s-velocity__pill:focus-visible{z-index:4}
.s-velocity__pill:focus-visible .s-velocity__tag{opacity:1;transform:translate3d(0,-50%,0)}

/* hidden source video for the canvas pills */
.s-velocity__src{position:absolute;width:2px;height:2px;left:0;bottom:0;opacity:0;pointer-events:none}

@media (max-aspect-ratio:1/1){
  .s-velocity{--vfs:clamp(54px,10.5vw,110px);min-height:0;padding:clamp(64px,9vh,120px) 0}
}
@media (max-width:640px){
  .s-velocity{--vfs:clamp(54px,15vw,84px);padding:72px 0}
  .s-velocity__tag{font-size:13px}
}
/* reduced motion: JS paints rows once (no loop, no skew), video pills show a still frame */
