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.4 KB
Raw Blame
<!doctype html>
<!--
  KALLAWAY · tier2 · label · HIGHLIGHT BOX
  A glowing box outline draws and illuminates around the `term` heading, then
  the `detail` line fades in beneath it. Dark glass backing. Right side anchor.
  Slots: term (~24 chars — word/phrase to spotlight), detail (~60 chars — context).
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; background: transparent; }

      #t2-lb-hbox {
        position: absolute; inset: 0; width: 1920px; height: 1080px;
        background: transparent; overflow: hidden;
        font-family: var(--font-display);
      }

      /* Localized ambient glow — right side */
      #t2-lb-hbox .local-glow {
        position: absolute; right: 50px; top: 260px;
        width: 560px; height: 400px; border-radius: 50%;
        background: radial-gradient(ellipse at 50% 50%,
          rgba(var(--accent-rgb), 0.22) 0%,
          rgba(var(--accent-rgb), 0.07) 52%,
          transparent 78%);
        filter: blur(44px);
        pointer-events: none;
      }

      /* Outer card — glass backing, right anchor */
      #t2-lb-hbox .card {
        position: absolute; right: 80px; top: 300px;
        width: 480px;
        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.08);
        border-radius: var(--radius-sm);
        padding: 36px 38px 34px;
        overflow: visible;
      }

      /* Top neon rim */
      #t2-lb-hbox .card::before {
        content: "";
        position: absolute; left: 0; right: 0; top: 0; height: 2px;
        background: linear-gradient(90deg,
          transparent 0%, rgba(var(--accent-rgb), 0.68) 40%,
          rgba(var(--accent-rgb), 0.68) 60%, transparent 100%);
        box-shadow: 0 0 11px rgba(var(--accent-rgb), 0.48);
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
      }

      /* Term wrapper — holds the glow box outline */
      #t2-lb-hbox .term-wrap {
        position: relative; display: inline-block;
        margin-bottom: 20px;
      }

      /* The glowing outline box that draws in — SVG overlay */
      #t2-lb-hbox .hbox-svg {
        position: absolute;
        /* extend 10px around the text on all sides */
        top: -10px; left: -14px; right: -14px; bottom: -10px;
        width: calc(100% + 28px); height: calc(100% + 20px);
        overflow: visible; pointer-events: none;
      }

      #t2-lb-hbox .hbox-rect {
        fill: none;
        stroke: var(--accent);
        stroke-width: 2px;
        rx: 6;
        filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.75));
      }

      /* Term text */
      #t2-lb-hbox .term {
        font-family: var(--font-display); font-weight: var(--wt-black);
        font-size: 42px; letter-spacing: var(--track-tight);
        line-height: 1.1;
        background: linear-gradient(110deg, #FFFFFF 0%, #FFFFFF 50%, var(--accent) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), 0.45));
        position: relative; /* above svg */
        display: block;
      }

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

      <div class="card">
        <div class="term-wrap">
          <!--
            SVG box — perimeter = 2*(W+H). We animate strokeDashoffset from full
            perimeter → 0 so the outline draws clockwise. Sized to match the text
            bounding box via CSS (100% + padding). Rect corners rounded via rx.
          -->
          <svg class="hbox-svg" viewBox="0 0 320 62" preserveAspectRatio="none" aria-hidden="true">
            <rect class="hbox-rect" x="1" y="1" width="318" height="60" rx="6"
                  stroke-dasharray="760" stroke-dashoffset="760" />
          </svg>
          <div class="term" data-slot="term">Network Effects</div>
        </div>
        <div class="detail" data-slot="detail">Value grows non-linearly — every new node strengthens every existing connection.</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-hbox";

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

        /* card glides in from right + blur */
        .from(`${COMP} .card`, {
            autoAlpha: 0, x: 58, filter: "blur(14px)",
            duration: 0.82, ease: "back.out(1.4)" }, 0.18)

        /* term word fades up */
        .from(`${COMP} .term`, {
            autoAlpha: 0, y: 12, filter: "blur(10px)",
            duration: 0.60, ease: "power4.out" }, 0.54)

        /* highlight box outline draws clockwise — stroke-dashoffset 760 → 0 */
        .to(`${COMP} .hbox-rect`, {
            strokeDashoffset: 0,
            duration: 0.70, ease: "power3.out" }, 0.72)

        /* box glows bright on completion */
        .to(`${COMP} .hbox-rect`, {
            attr: { "stroke-width": 2.5 },
            filter: "drop-shadow(0 0 16px rgba(55,189,248,0.90))",
            duration: 0.30, ease: "power2.out" }, 1.40)

        /* detail fades up */
        .from(`${COMP} .detail`, {
            autoAlpha: 0, y: 10, filter: "blur(6px)",
            duration: 0.58, ease: "power3.out" }, 1.08)

        /* finite glow pulse on the box */
        .to(`${COMP} .hbox-rect`, {
            attr: { "stroke-width": 2 },
            filter: "drop-shadow(0 0 7px rgba(55,189,248,0.45))",
            duration: 1.2, ease: "sine.inOut", repeat: 2, yoyo: true }, 1.90)

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

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