Skip to content

Herk Edit Kit by Nate Herk: edit videos, reels, and YouTube Shorts with Codex or Claude Code. 15 skills, transcript-driven cuts, storytelling, 406 motion-graphics cards, and HyperFrames templates.

7.8 KB
Raw Blame
<!doctype html>
<!--
  VOX EXPLAINER · tier1 · stat · MAGNIFYING GLASS
  A magnifier prop hovers over the number: a circular LENS (functional — OK per
  contract) with a handle, the number INSIDE the lens rendered larger/sharper
  than a faint smaller "background" version behind it. The lens drifts in and
  settles over the figure.
  Slots: kicker, stat, label (richtext <em>), source.
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; }
      #t1-stat-mag {
        position: absolute; inset: 0; width: 1920px; height: 1080px;
        background: var(--paper); color: var(--ink);
        font-family: var(--font-display); overflow: hidden;
      }
      #t1-stat-mag .grid {
        position: absolute; inset: -2px;
        background-image:
          repeating-linear-gradient(0deg,  var(--grid-line) 0 1px, transparent 1px var(--grid-size)),
          repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px var(--grid-size));
      }
      #t1-stat-mag .grain {
        position: absolute; inset: -40px; background: var(--tex-grain);
        background-size: 180px 180px; mix-blend-mode: multiply; opacity: 0.4; pointer-events: none; z-index: 8;
      }
      #t1-stat-mag .vignette {
        position: absolute; inset: 0; pointer-events: none; z-index: 7;
        background: radial-gradient(120% 120% at 52% 48%, transparent 54%, rgba(23,19,14,0.18) 100%);
      }

      /* kicker */
      #t1-stat-mag .kicker {
        position: absolute; left: 130px; top: 220px; z-index: 4;
        font-family: var(--font-label); font-weight: var(--wt-bold);
        font-size: var(--size-label); letter-spacing: var(--track-wide);
        text-transform: uppercase; color: var(--red);
      }

      /* ── faint background number (behind lens) ─────────────────────────── */
      #t1-stat-mag .stat-bg {
        position: absolute; left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        font-weight: var(--wt-black); font-size: 340px; line-height: 1;
        letter-spacing: -0.06em; color: var(--ink); opacity: 0.13;
        font-variant-numeric: tabular-nums;
        z-index: 2; user-select: none;
      }

      /* ── magnifier prop ─────────────────────────────────────────────────── */
      /* The lens is a circle; the handle is a thick rotated rectangle.
         Both are children of .mag-group which translates as one unit.         */
      #t1-stat-mag .mag-group {
        position: absolute;
        /* centred over the stat — lens centre at 52% 46% */
        left: calc(52% - 280px); top: calc(46% - 280px);
        width: 560px; height: 560px;
        z-index: 5;
      }

      /* lens ring */
      #t1-stat-mag .lens-ring {
        position: absolute; inset: 0; border-radius: 50%;
        border: 22px solid var(--ink);
        background: var(--yellow);
        box-shadow:
          0 18px 48px rgba(23,19,14,0.30),
          inset 0 0 0 6px rgba(23,19,14,0.08);
      }
      /* glare highlight inside lens */
      #t1-stat-mag .lens-ring::after {
        content: "";
        position: absolute; top: 38px; left: 52px;
        width: 110px; height: 60px; border-radius: 50%;
        background: rgba(255,255,255,0.35);
        transform: rotate(-22deg);
      }

      /* number inside the lens — large + sharp = "magnified" */
      #t1-stat-mag .stat-mag {
        position: absolute; inset: 0;
        display: flex; align-items: center; justify-content: center;
        font-weight: var(--wt-black); font-size: 300px; line-height: 1;
        letter-spacing: -0.06em; color: var(--ink);
        font-variant-numeric: tabular-nums;
        /* clip to circle */
        border-radius: 50%; overflow: hidden;
        z-index: 2;
      }

      /* handle — thick rotated bar extending down-right */
      #t1-stat-mag .handle {
        position: absolute;
        width: 44px; height: 240px;
        background: var(--ink);
        border-radius: 4px;
        /* pivot at top-center of handle, which sits at lens bottom-right */
        top: 470px; left: 392px;
        transform-origin: 22px 0;
        transform: rotate(42deg);
        box-shadow: 4px 6px 14px rgba(23,19,14,0.32);
        z-index: 4;
      }
      /* handle end cap — round rubber grip feel */
      #t1-stat-mag .handle::after {
        content: "";
        position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
        width: 52px; height: 52px; border-radius: 50%;
        background: var(--orange);
        box-shadow: 0 4px 10px rgba(23,19,14,0.3);
      }

      /* label */
      #t1-stat-mag .label {
        position: absolute; left: 130px; right: 130px; bottom: 190px; z-index: 4;
        font-weight: var(--wt-thin); font-size: 60px; line-height: 1.08;
        letter-spacing: var(--track-tight); color: var(--ink);
        text-align: center;
      }
      #t1-stat-mag .label em {
        font-style: italic; font-weight: var(--wt-black);
      }

      /* source */
      #t1-stat-mag .source {
        position: absolute; left: 130px; bottom: 96px; z-index: 4;
        font-family: var(--font-label); font-weight: var(--wt-bold);
        font-size: var(--size-tiny); letter-spacing: var(--track-wide);
        text-transform: uppercase; color: var(--muted);
      }
    </style>
  </head>
  <body>
    <div id="t1-stat-mag" data-composition-id="t1-stat-mag" data-start="0" data-width="1920" data-height="1080">
      <div class="grid"></div>

      <!-- faint background number -->
      <div class="stat-bg" data-slot="stat">62%</div>

      <!-- magnifier prop -->
      <div class="mag-group">
        <div class="lens-ring">
          <div class="stat-mag" data-slot="stat">62%</div>
        </div>
        <div class="handle"></div>
      </div>

      <div class="kicker" data-slot="kicker">UNDER THE LENS</div>
      <div class="label" data-slot="label">of clicks go to the <em>top three results</em></div>
      <div class="source" data-slot="source">SOURCE · SEARCH STUDY 2026</div>
      <div class="vignette"></div>
      <div class="grain"></div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <script>
      window.__timelines = window.__timelines || {};
      const tl = gsap.timeline({ paused: true });

      // grain flicker
      tl.fromTo("#t1-stat-mag .grain", { backgroundPosition: "0px 0px" },
                { backgroundPosition: "150px 130px", duration: 0.5, ease: "steps(4)", repeat: 11, yoyo: true }, 0);

      // kicker
      tl.from("#t1-stat-mag .kicker", { autoAlpha: 0, x: -20, duration: 0.3, ease: "steps(4)" }, 0.2);

      // background stat fades in first (so the lens reveals it as magnified)
      tl.from("#t1-stat-mag .stat-bg", { autoAlpha: 0, duration: 0.35 }, 0.28);

      // lens + handle drift in from slightly above-left, then settle
      tl.from("#t1-stat-mag .mag-group", {
        autoAlpha: 0, x: -80, y: -50, scale: 0.72,
        duration: 0.55, ease: "back.out(2.0)", transformOrigin: "50% 50%"
      }, 0.42);

      // magnified number pops inside lens after it lands
      tl.from("#t1-stat-mag .stat-mag", {
        autoAlpha: 0, scale: 0.6, transformOrigin: "50% 50%",
        duration: 0.38, ease: "back.out(2.6)"
      }, 0.88);

      // subtle settle drift — lens nudges slightly into final resting spot
      tl.to("#t1-stat-mag .mag-group", {
        x: 8, y: 6, duration: 0.22, ease: "power2.inOut"
      }, 0.95);

      // label + source
      tl.from("#t1-stat-mag .label",  { autoAlpha: 0, y: 20, duration: 0.4, ease: "power3.out" }, 1.1);
      tl.from("#t1-stat-mag .source", { autoAlpha: 0, duration: 0.3 }, 1.4);

      tl.set({}, {}, 6);
      window.__timelines["t1-stat-mag"] = tl;
    </script>
  </body>
</html>