/*
 * The Pledged Value mark: the P and V of the brand font (Plus Jakarta Sans 800).
 * The V tucks under the P and is cut off along the edge of the P's bowl, with
 * an even gap, so it reads as a tick. P and V share the same top and bottom.
 *
 *   <span class="pv-logo done">…</span>   the finished mark (still)
 *   <span class="pv-logo play">…</span>   "Pledged Value" folds down into it, once (needs brand.js)
 *
 * Markup (the same for both):
 *   <span class="pv-logo play" role="img" aria-label="Pledged Value"><span class="pv-p">P</span><span
 *   class="pv-rest">ledged</span><span class="pv-gap"></span><span class="pv-v">V</span><span class="pv-rest">alue</span></span>
 *
 * Set --pv-gap to the colour behind the mark (the gap around the P is drawn in it),
 * and font-size for the size. Linked by landing/index.html, app/index.html and app/join.html.
 * Not used in the printed report: the PDF renderer can't draw the gap or the cut.
 */
.pv-logo{
  --pv-gap:#F6F4F9; --pv-p:#34204F; --pv-v:#D9502F;
  --pv-tuck:-.38em; --pv-drop:0em;   /* P and V share top and bottom */
  display:inline-flex; align-items:baseline; white-space:nowrap; line-height:1;
  font-family:"Plus Jakarta Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-weight:800; letter-spacing:-.03em;
}
.pv-logo>span{display:inline-block}
.pv-p{color:var(--pv-p); position:relative; z-index:2;
  -webkit-text-stroke:.07em var(--pv-gap); paint-order:stroke fill}
.pv-v{color:var(--pv-v); position:relative; z-index:1}
.pv-rest{overflow:hidden; max-width:5em; vertical-align:bottom}
.pv-gap{width:.26em}

/* Finished mark */
.pv-logo.done .pv-rest,.pv-logo.done .pv-gap{max-width:0; width:0; opacity:0}
.pv-logo.done .pv-v{transform:translate(var(--pv-tuck),var(--pv-drop));
  clip-path:polygon(0 74%,70% 0,100% 0,100% 100%,0 100%)}

/* The animation (smooth: only transform, opacity and the cut move, nothing re-lays out).
   brand.js measures how far the V must travel to tuck under the P, sets --pv-travel and adds
   .go: "ledged" and "alue" fade and drift towards the P, the V glides into place, then the
   cut settles in. Every page that plays it loads brand.js. */
.pv-logo.play .pv-rest,.pv-logo.play .pv-v{will-change:transform,opacity}
.pv-logo.play .pv-rest{overflow:visible}   /* nothing folds now, so the g keeps its tail */
.pv-logo.play.go .pv-rest{transition:opacity .45s ease,transform .6s cubic-bezier(.4,0,.2,1);opacity:0;transform:translateX(-.35em)}
.pv-logo.play.go .pv-rest:last-child{transition-delay:.08s}
.pv-logo.play.go .pv-v{transition:transform .75s .18s cubic-bezier(.65,0,.35,1),clip-path .45s .18s ease-out;
  transform:translate(var(--pv-travel,var(--pv-tuck)),var(--pv-drop));
  clip-path:polygon(0 74%,70% 0,100% 0,100% 100%,0 100%)}
.pv-logo.play .pv-v{clip-path:polygon(0 0,0 0,100% 0,100% 100%,0 100%)}
.pv-logo.play:not(.ready) .pv-rest,.pv-logo.play:not(.ready) .pv-v{transition:none}

/* No motion for people who ask for less of it: straight to the finished mark. */
@media (prefers-reduced-motion:reduce){
  .pv-logo.play .pv-rest,.pv-logo.play .pv-gap{transition:none!important; max-width:0; width:0; opacity:0}
  .pv-logo.play .pv-v{transition:none!important; transform:translate(var(--pv-tuck),var(--pv-drop));
    clip-path:polygon(0 74%,70% 0,100% 0,100% 100%,0 100%)}
}
