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.

6.5 KB
Raw Blame
<!doctype html>
<!--
  KALLAWAY · tier2 · label · NUMBER CALLOUT
  A big glowing gradient number (term) + label (detail) anchored right side.
  The number counts up from 0. Transparent overlay — only the figure paints.
  Slots: term (the number, e.g. "94" or "3.4×"), detail (~70 chars label).
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; background: transparent; }

      #t2-lb-numc {
        position: absolute; inset: 0; width: 1920px; height: 1080px;
        background: transparent; overflow: hidden;
      }

      /* Localized glow — right side, larger for the big number */
      #t2-lb-numc .local-glow {
        position: absolute; right: 50px; top: 280px;
        width: 620px; height: 440px; border-radius: 50%;
        background: radial-gradient(ellipse at 50% 50%,
          rgba(var(--accent-rgb), 0.24) 0%,
          rgba(var(--accent-rgb), 0.08) 50%,
          transparent 78%);
        filter: blur(50px);
        pointer-events: none;
      }

      /* Wrapper anchored right */
      #t2-lb-numc .wrapper {
        position: absolute; right: 120px; top: 330px;
        display: flex; flex-direction: column; align-items: flex-end;
      }

      /* Dark glass underlay behind the figure so it reads on light footage */
      #t2-lb-numc .glass-underlay {
        background: var(--glass-bg-dark);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        border: 1.5px solid var(--glass-border);
        border-top: 1.5px solid var(--glass-hi);
        box-shadow: var(--glass-shadow),
                    0 0 0 1px rgba(var(--accent-rgb), 0.10);
        border-radius: var(--radius);
        padding: 32px 44px 28px 44px;
        text-align: right;
        overflow: hidden;
        position: relative;
      }

      /* Top neon rim */
      #t2-lb-numc .glass-underlay::before {
        content: "";
        position: absolute; left: 0; right: 0; top: 0; height: 2px;
        background: linear-gradient(90deg,
          transparent 0%, rgba(var(--accent-rgb), 0.72) 45%,
          rgba(var(--accent-rgb), 0.72) 55%, transparent 100%);
        box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.52);
      }

      /* Big gradient number */
      #t2-lb-numc .figure {
        font-family: var(--font-display); font-weight: var(--wt-black);
        font-size: 140px; line-height: 1; letter-spacing: var(--track-tight);
        background: linear-gradient(135deg,
          var(--white) 0%, var(--accent) 55%, rgba(var(--accent-rgb), 0.55) 100%);
        -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        background-clip: text;
        filter: drop-shadow(0 0 28px rgba(var(--accent-rgb), 0.50))
                drop-shadow(0 0 60px rgba(var(--accent-rgb), 0.28));
        line-height: 1.05;
      }

      /* Suffix/unit displayed alongside (comes from data-suffix attr if set) */
      #t2-lb-numc .suffix {
        font-family: var(--font-display); font-weight: var(--wt-semi);
        font-size: 52px; letter-spacing: var(--track-snug);
        background: linear-gradient(135deg, var(--white) 0%, var(--accent) 100%);
        -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-left: 6px;
        vertical-align: 14px;
      }

      /* Thin accent rule */
      #t2-lb-numc .rule {
        height: 2px; width: 100%;
        background: linear-gradient(90deg,
          transparent 0%, var(--accent) 50%, rgba(var(--accent-rgb), 0.20) 100%);
        box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.45);
        margin: 14px 0 16px;
        transform-origin: right center;
      }

      /* Label detail */
      #t2-lb-numc .label {
        font-family: var(--font-body); font-weight: var(--wt-med);
        font-size: 26px; line-height: 1.4; text-align: right;
        color: var(--text-dim);
      }
    </style>
  </head>
  <body>
    <div id="t2-lb-numc" data-composition-id="t2-lb-numc" data-start="0" data-width="1920" data-height="1080">
      <div class="local-glow"></div>

      <div class="wrapper">
        <div class="glass-underlay">
          <!-- figure holds the live count-up text -->
          <div class="figure"><span id="numc-val">0</span><span class="suffix">%</span></div>
          <div class="rule"></div>
          <div class="label" data-slot="detail">of enterprise AI projects never reach production.</div>
        </div>
      </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 });

      const COMP = "#t2-lb-numc";

      /* Target number — read from slot text if present, else default 94 */
      const termSlot = document.querySelector(`${COMP} [data-slot="term"]`);
      const TARGET_NUM = termSlot ? parseFloat(termSlot.textContent) || 94 : 94;
      /* Remove original slot element — we drive the display via JS counter */
      if (termSlot) termSlot.remove();

      const counter = { val: 0 };

      /* glow blooms first */
      tl.from(`${COMP} .local-glow`, {
            autoAlpha: 0, scale: 0.55, transformOrigin: "50% 50%",
            duration: 1.4, ease: "expo.out" }, 0)

        /* glass card glides in from right */
        .from(`${COMP} .glass-underlay`, {
            autoAlpha: 0, x: 50, filter: "blur(14px)",
            duration: 0.85, ease: "back.out(1.4)" }, 0.25)

        /* count-up — uses tl.to (2-arg form, no position as third arg) */
        .to(counter, {
            val: TARGET_NUM,
            duration: 1.40,
            ease: "power2.out",
            onUpdate: function() {
              document.getElementById("numc-val").textContent = Math.round(counter.val);
            }
          }, 0.60)

        /* rule draws right→left */
        .from(`${COMP} .rule`, {
            scaleX: 0, transformOrigin: "100% 50%",
            duration: 0.55, ease: "power3.out" }, 0.82)

        /* label fades up */
        .from(`${COMP} .label`, {
            autoAlpha: 0, y: 12, filter: "blur(6px)",
            duration: 0.62, ease: "power3.out" }, 1.0)

        /* finite glow pulse on the figure */
        .to(`${COMP} .figure`, {
            filter: "drop-shadow(0 0 42px rgba(55,189,248,0.72)) drop-shadow(0 0 90px rgba(55,189,248,0.36))",
            duration: 1.1, ease: "sine.inOut", repeat: 2, yoyo: true }, 2.4)

        .set({}, {}, 7);

      window.__timelines["t2-lb-numc"] = tl;
    </script>
  </body>
</html>