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.

15.5 KB
Raw Blame
<template id="scene4-felt-it-template">
  <div
    data-composition-id="scene4-felt-it"
    data-start="0"
    data-width="1080"
    data-height="1920"
    data-duration="2.94"
  >
    <div class="s4-whip-wrap">
    <div class="s4-panel">
      <!-- Top chip: THE PATTERN -->
      <div class="s4-chip" id="s4-chip">
        <span class="s4-chip-dot"></span>
        <span>THE PATTERN</span>
        <span class="s4-chip-telemetry" id="s4-chip-telemetry">— 09 / 09</span>
      </div>

      <!-- 3x3 pain-grid — each cell lights up red-orange in sequence -->
      <div class="s4-grid" id="s4-grid">
        <div class="s4-cell" data-idx="0"><div class="s4-glyph">&infin;</div><div class="s4-lbl">INFINITE LOOP</div></div>
        <div class="s4-cell" data-idx="1"><div class="s4-glyph">&times;</div><div class="s4-lbl">ERROR CASCADE</div></div>
        <div class="s4-cell" data-idx="2"><div class="s4-glyph">&#x27F2;</div><div class="s4-lbl">CONTEXT LOSS</div></div>
        <div class="s4-cell" data-idx="3"><div class="s4-glyph">&#x25D0;</div><div class="s4-lbl">HALF-RIGHT CODE</div></div>
        <div class="s4-cell" data-idx="4"><div class="s4-glyph">&hellip;</div><div class="s4-lbl">SILENT FAIL</div></div>
        <div class="s4-cell" data-idx="5"><div class="s4-glyph">$</div><div class="s4-lbl">TOKEN WASTE</div></div>
        <div class="s4-cell" data-idx="6"><div class="s4-glyph">&#x21BB;</div><div class="s4-lbl">RETRY HELL</div></div>
        <div class="s4-cell" data-idx="7"><div class="s4-glyph">&asymp;</div><div class="s4-lbl">PROMPT DRIFT</div></div>
        <div class="s4-cell" data-idx="8"><div class="s4-glyph">&#x25BC;</div><div class="s4-lbl">DEBUG SPIRAL</div></div>
        <!-- Scan line swept across the grid just before the payoff -->
        <div class="s4-scan" id="s4-scan"></div>
      </div>

      <!-- Sparkline with YOU ARE HERE marker -->
      <svg
        class="s4-spark-wrap"
        viewBox="0 0 1000 140"
        preserveAspectRatio="none"
        aria-hidden="true"
      >
        <path
          id="s4-spark-path"
          class="s4-spark-path"
          d="M 0 110 L 140 108 L 260 104 L 360 100 L 450 92 L 520 82 L 580 68 L 630 50 L 670 30 L 700 16 L 720 10 L 740 16 L 780 36 L 840 70 L 920 96 L 1000 106"
          fill="none"
          stroke="#f09025"
          stroke-width="3.5"
          stroke-linecap="round"
          stroke-linejoin="round"
        />
      </svg>
      <div class="s4-spark-arrow" id="s4-spark-arrow">&#x25B2;</div>
      <div class="s4-spark-label" id="s4-spark-label">YOU ARE HERE</div>

      <!-- Payoff: YOU'VE FELT IT. -->
      <div class="s4-line1" id="s4-line1">YOU&rsquo;VE</div>
      <div class="s4-line2" id="s4-line2">FELT IT.</div>

      <!-- Sparks emit on "FELT IT" impact -->
      <div class="s4-sparks">
        <div class="s4-spark" id="s4-sp1"></div>
        <div class="s4-spark" id="s4-sp2"></div>
        <div class="s4-spark" id="s4-sp3"></div>
        <div class="s4-spark" id="s4-sp4"></div>
        <div class="s4-spark" id="s4-sp5"></div>
        <div class="s4-spark" id="s4-sp6"></div>
      </div>
    </div>
    </div>

    <style>
      [data-composition-id="scene4-felt-it"] {
        position: absolute;
        inset: 0;
      }
      [data-composition-id="scene4-felt-it"] .s4-whip-wrap {
        position: absolute;
        inset: 0;
        will-change: transform, filter;
      }
      [data-composition-id="scene4-felt-it"] .s4-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 1080px;
        height: 960px;
        background: #07121c;
        overflow: hidden;
        font-family: "Montserrat", sans-serif;
      }

      /* Top chip */
      [data-composition-id="scene4-felt-it"] .s4-chip {
        position: absolute;
        top: 44px;
        left: 50%;
        transform: translateX(-50%);
        padding: 14px 26px;
        border: 2px solid rgba(55, 189, 248, 0.55);
        background: rgba(13, 32, 49, 0.75);
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        gap: 14px;
        font-family: "Roboto Mono", monospace;
        font-weight: 500;
        font-size: 28px;
        letter-spacing: 0.18em;
        color: #bcd4e6;
        white-space: nowrap;
        opacity: 0;
      }
      [data-composition-id="scene4-felt-it"] .s4-chip-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #f09025;
        box-shadow: 0 0 14px rgba(240, 144, 37, 0.9);
      }
      [data-composition-id="scene4-felt-it"] .s4-chip-telemetry {
        color: #5c7290;
        font-size: 22px;
      }

      /* Grid container */
      [data-composition-id="scene4-felt-it"] .s4-grid {
        position: absolute;
        top: 138px;
        left: 60px;
        width: 960px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        opacity: 0;
        transform: translateY(20px);
      }
      [data-composition-id="scene4-felt-it"] .s4-cell {
        position: relative;
        height: 168px;
        padding: 18px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border: 2px solid rgba(55, 189, 248, 0.22);
        background: rgba(7, 18, 28, 0.7);
        border-radius: 18px;
        box-shadow: inset 0 0 22px rgba(55, 189, 248, 0.08);
        opacity: 0.55;
        transition: none;
      }
      [data-composition-id="scene4-felt-it"] .s4-cell.lit {
        border-color: #f09025;
        background: rgba(240, 144, 37, 0.16);
        box-shadow:
          0 0 24px rgba(240, 144, 37, 0.4),
          inset 0 0 28px rgba(240, 144, 37, 0.25);
        opacity: 1;
      }
      [data-composition-id="scene4-felt-it"] .s4-glyph {
        font-family: "Roboto Mono", monospace;
        font-weight: 700;
        font-size: 62px;
        line-height: 1;
        color: rgba(255, 255, 255, 0.55);
        text-shadow: 0 0 0 transparent;
        transition: none;
      }
      [data-composition-id="scene4-felt-it"] .s4-cell.lit .s4-glyph {
        color: #ffd9a8;
        text-shadow: 0 0 18px rgba(240, 144, 37, 0.9);
      }
      [data-composition-id="scene4-felt-it"] .s4-lbl {
        font-family: "Roboto Mono", monospace;
        font-weight: 500;
        font-size: 16px;
        letter-spacing: 0.16em;
        color: rgba(255, 255, 255, 0.55);
        text-align: center;
        white-space: nowrap;
      }
      [data-composition-id="scene4-felt-it"] .s4-cell.lit .s4-lbl {
        color: #f9c38c;
      }

      /* Scan line swept across the grid on the "all lit" beat */
      [data-composition-id="scene4-felt-it"] .s4-scan {
        position: absolute;
        top: 0;
        left: 0;
        width: 80px;
        height: 100%;
        background: linear-gradient(
          90deg,
          rgba(55, 189, 248, 0) 0%,
          rgba(55, 189, 248, 0.55) 50%,
          rgba(55, 189, 248, 0) 100%
        );
        pointer-events: none;
        opacity: 0;
        transform: translateX(-100px);
      }

      /* Sparkline (between grid and payoff) */
      [data-composition-id="scene4-felt-it"] .s4-spark-wrap {
        position: absolute;
        top: 690px;
        left: 40px;
        width: 1000px;
        height: 140px;
        overflow: visible;
      }
      [data-composition-id="scene4-felt-it"] .s4-spark-path {
        filter: drop-shadow(0 0 8px rgba(240, 144, 37, 0.65));
        stroke-dasharray: 2000;
        stroke-dashoffset: 2000;
      }
      [data-composition-id="scene4-felt-it"] .s4-spark-arrow {
        position: absolute;
        top: 694px;
        left: 713px;
        font-size: 32px;
        color: #f09025;
        text-shadow: 0 0 14px rgba(240, 144, 37, 0.85);
        opacity: 0;
        transform: translateY(30px);
      }
      [data-composition-id="scene4-felt-it"] .s4-spark-label {
        position: absolute;
        top: 666px;
        left: 684px;
        font-family: "Roboto Mono", monospace;
        font-weight: 700;
        font-size: 18px;
        letter-spacing: 0.2em;
        color: #f09025;
        text-shadow: 0 0 10px rgba(240, 144, 37, 0.7);
        opacity: 0;
        transform: scale(0.7);
      }

      /* Payoff text */
      [data-composition-id="scene4-felt-it"] .s4-line1 {
        position: absolute;
        top: 828px;
        left: 60px;
        font-family: "Montserrat", sans-serif;
        font-weight: 300;
        font-size: 52px;
        letter-spacing: -0.01em;
        color: #96a2b6;
        opacity: 0;
        transform: translateY(14px);
      }
      [data-composition-id="scene4-felt-it"] .s4-line2 {
        position: absolute;
        top: 828px;
        left: 270px;
        font-family: "Montserrat", sans-serif;
        font-weight: 900;
        font-size: 110px;
        line-height: 0.92;
        letter-spacing: -0.03em;
        color: #37bdf8;
        text-shadow:
          0 0 40px rgba(55, 189, 248, 0),
          0 6px 0 #07121c,
          0 14px 40px rgba(0, 0, 0, 0.6);
        opacity: 0;
        transform: scale(0.7);
      }

      /* Sparks radiating from FELT IT */
      [data-composition-id="scene4-felt-it"] .s4-sparks {
        position: absolute;
        top: 820px;
        left: 240px;
        width: 720px;
        height: 140px;
        pointer-events: none;
      }
      [data-composition-id="scene4-felt-it"] .s4-spark {
        position: absolute;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #f09025;
        box-shadow: 0 0 14px rgba(240, 144, 37, 0.85);
        opacity: 0;
      }
      [data-composition-id="scene4-felt-it"] .s4-spark#s4-sp1 { top: 20%;  left: 10%; }
      [data-composition-id="scene4-felt-it"] .s4-spark#s4-sp2 { top: 55%;  left: 28%; }
      [data-composition-id="scene4-felt-it"] .s4-spark#s4-sp3 { top: 12%;  left: 52%; }
      [data-composition-id="scene4-felt-it"] .s4-spark#s4-sp4 { top: 60%;  left: 72%; }
      [data-composition-id="scene4-felt-it"] .s4-spark#s4-sp5 { top: 28%;  left: 88%; }
      [data-composition-id="scene4-felt-it"] .s4-spark#s4-sp6 { top: 72%;  left: 46%; }
    </style>

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <script>
      (function () {
        const tl = gsap.timeline({ paused: true });
        const scope = '[data-composition-id="scene4-felt-it"] ';
        const DUR = 2.94;

        // ENTRY WHIP — wrapper rises from below with blur de-ramp.
        gsap.set(scope + ".s4-whip-wrap", {
          y: 120, filter: "blur(24px)", opacity: 0.35,
        });
        tl.to(
          scope + ".s4-whip-wrap",
          { y: 0, filter: "blur(0px)", opacity: 1, duration: 0.6, ease: "power3.out" },
          0,
        );

        // Top chip fades in
        tl.to(
          scope + "#s4-chip",
          { opacity: 1, duration: 0.22, ease: "power2.out" },
          0.00,
        );

        // Grid container slides up
        tl.to(
          scope + "#s4-grid",
          { opacity: 1, y: 0, duration: 0.30, ease: "power3.out" },
          0.10,
        );

        // Sparkline stroke-draws in sync with cells lighting up
        tl.to(
          scope + "#s4-spark-path",
          { strokeDashoffset: 0, duration: 0.95, ease: "power2.inOut" },
          0.25,
        );

        // 9 cells light up one-by-one, 0.10s stagger, landing at 0.30 -> 1.20
        // Class toggle adds the .lit state (border -> orange, glow blooms).
        const cells = document.querySelectorAll(scope + ".s4-cell");
        cells.forEach(function (cell, i) {
          tl.call(
            function (el) {
              el.classList.add("lit");
            },
            [cell],
            0.30 + i * 0.10,
          );
          // Pop scale on the glyph inside for bounce feedback
          tl.fromTo(
            cell.querySelector(".s4-glyph"),
            { scale: 0.88 },
            { scale: 1, duration: 0.22, ease: "back.out(2.2)" },
            0.30 + i * 0.10,
          );
        });

        // All-grid red-orange flash once last cell lands
        tl.fromTo(
          scope + "#s4-grid",
          { filter: "brightness(1)" },
          {
            filter: "brightness(1.25)",
            duration: 0.09,
            yoyo: true,
            repeat: 1,
            ease: "power2.inOut",
          },
          1.20,
        );

        // Scan line sweep across the grid
        tl.fromTo(
          scope + "#s4-scan",
          { x: -120, opacity: 0 },
          { x: 960, opacity: 1, duration: 0.35, ease: "power2.inOut" },
          1.30,
        );
        tl.to(
          scope + "#s4-scan",
          { opacity: 0, duration: 0.15, ease: "power2.in" },
          1.60,
        );

        // Sparkline spike arrow slams from below
        tl.to(
          scope + "#s4-spark-arrow",
          { opacity: 1, y: 0, duration: 0.25, ease: "expo.out" },
          1.35,
        );
        // YOU ARE HERE label pops in
        tl.to(
          scope + "#s4-spark-label",
          { opacity: 1, scale: 1, duration: 0.20, ease: "back.out(2)" },
          1.40,
        );

        // "YOU'VE" fades in dim grey (keeps the eye tracking the beat)
        tl.to(
          scope + "#s4-line1",
          { opacity: 1, y: 0, duration: 0.22, ease: "power3.out" },
          1.60,
        );

        // "FELT IT." slams in — payoff
        tl.to(
          scope + "#s4-line2",
          {
            opacity: 1,
            scale: 1,
            duration: 0.30,
            ease: "back.out(3)",
          },
          1.80,
        );
        // Tremor on FELT IT.
        tl.to(
          scope + "#s4-line2",
          {
            x: 4,
            duration: 0.04,
            yoyo: true,
            repeat: 3,
            ease: "power1.inOut",
          },
          2.12,
        );
        // Glow pulse on FELT IT. — 2 finite cycles
        tl.to(
          scope + "#s4-line2",
          {
            textShadow:
              "0 0 80px rgba(55, 189, 248, 0.9), 0 6px 0 #07121c, 0 14px 40px rgba(0, 0, 0, 0.6)",
            duration: 0.35,
            yoyo: true,
            repeat: 1,
            ease: "sine.inOut",
          },
          2.20,
        );

        // Orange sparks burst around FELT IT.
        const sparks = ["#s4-sp1", "#s4-sp2", "#s4-sp3", "#s4-sp4", "#s4-sp5", "#s4-sp6"];
        sparks.forEach(function (sel, i) {
          tl.fromTo(
            scope + sel,
            { opacity: 0, scale: 0.3 },
            {
              opacity: 1,
              scale: 1.4,
              duration: 0.26,
              ease: "back.out(2.5)",
            },
            2.10 + (i % 3) * 0.06,
          );
          tl.to(
            scope + sel,
            {
              opacity: 0,
              scale: 0.6,
              duration: 0.44,
              ease: "power2.in",
            },
            2.38 + (i % 3) * 0.06,
          );
        });

        // Subtle ambient oscillation on grid cells through the payoff —
        // by local 1.30 all 9 cells have .lit. Target `.s4-cell` (resolved at
        // timeline-construction time; GSAP doesn't re-query on playback).
        tl.to(
          scope + ".s4-cell",
          {
            scale: 1.025,
            duration: 0.28,
            yoyo: true,
            repeat: 3,
            ease: "sine.inOut",
            stagger: { each: 0.02, from: "random" },
          },
          1.30,
        );

        // EXIT WHIP — wrapper slides up with blur.
        tl.to(
          scope + ".s4-whip-wrap",
          { y: -120, filter: "blur(24px)", opacity: 0, duration: 0.3, ease: "power2.in" },
          DUR - 0.3,
        );

        tl.set({}, {}, DUR);

        window.__timelines = window.__timelines || {};
        window.__timelines["scene4-felt-it"] = tl;
      })();
    </script>
  </div>
</template>