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.

14.9 KB
Raw Blame
<template id="beat-5-pip-template">
  <div
    data-composition-id="beat-5-pip"
    data-start="0"
    data-duration="10.33"
    data-width="1920"
    data-height="1080"
  >
    <!-- BG — covers the whole frame with dark navy. In the PiP window area
         (x>1340) the root face-wrapper sits on top, so this BG only actually
         reads on the left ~1340px. Grid lines + starfield drift add the
         "techy control room" texture without being busy. -->
    <div class="b5-bg"></div>
    <div class="b5-grid"></div>
    <div class="b5-stars"></div>
    <div class="b5-vignette"></div>
    <!-- Glow pool behind the PiP — orange halo seeping out of the face window -->
    <div class="b5-pip-halo"></div>

    <!-- Side hit #1: "Natural language." Anchors to "using my natural language"
         at master 15.42–16.40 → local 2.58–3.56. -->
    <div class="b5-hit b5-hit-1">
      <div class="b5-hit-kicker">INPUT</div>
      <div class="b5-hit-title">
        <span class="b5-hit-word">Natural</span>
        <span class="b5-hit-word">language.</span>
      </div>
      <div class="b5-hit-sub">Describe it. Claude builds it.</div>
    </div>

    <!-- Side hit #2: "No code required." Anchors to "You don't have to know how
         to code at all" at master 17.08–18.26 → local 4.24–5.42. -->
    <div class="b5-hit b5-hit-2">
      <div class="b5-hit-kicker">BARRIER</div>
      <div class="b5-hit-title">
        <span class="b5-hit-word">No code</span>
        <span class="b5-hit-word">required.</span>
      </div>
      <div class="b5-hit-strike">
        <span>for (const pixel of frame) { ... }</span>
      </div>
    </div>

    <!-- Outro CTA — "Let's get into it." Anchors to "let's just get straight
         into the video" at master 21.84–22.62 → local 9.00–9.78. Holds to end. -->
    <div class="b5-outro">
      <div class="b5-outro-tick"></div>
      <div class="b5-outro-eyebrow">WATCH THIS</div>
      <div class="b5-outro-title">
        Let's get<br/>into it.
      </div>
      <div class="b5-outro-bar"></div>
    </div>

    <style>
      [data-composition-id="beat-5-pip"] {
        position: absolute;
        inset: 0;
        overflow: hidden;
        font-family: "Inter", sans-serif;
      }
      [data-composition-id="beat-5-pip"] .b5-bg {
        position: absolute;
        inset: 0;
        background:
          radial-gradient(ellipse at 25% 40%,
            rgba(217, 119, 87, 0.10) 0%,
            transparent 55%),
          radial-gradient(ellipse at 70% 80%,
            rgba(40, 90, 160, 0.08) 0%,
            transparent 60%),
          #05080f;
      }
      [data-composition-id="beat-5-pip"] .b5-grid {
        position: absolute;
        inset: 0;
        background-image:
          repeating-linear-gradient(0deg,
            rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 90px),
          repeating-linear-gradient(90deg,
            rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 90px);
        mask-image: radial-gradient(ellipse at 30% 50%,
          #000 40%, transparent 85%);
      }
      [data-composition-id="beat-5-pip"] .b5-stars {
        position: absolute;
        inset: 0;
        /* Deterministic starfield: 40 sin/cos-hashed radial gradients. Built in
           JS below so we can compute positions from a seeded sequence instead
           of Math.random(). */
      }
      [data-composition-id="beat-5-pip"] .b5-star {
        position: absolute;
        width: 3px;
        height: 3px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 0 6px #fff;
      }
      [data-composition-id="beat-5-pip"] .b5-vignette {
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(ellipse at center,
          transparent 35%,
          rgba(0, 0, 0, 0.55) 95%);
      }
      [data-composition-id="beat-5-pip"] .b5-pip-halo {
        position: absolute;
        top: -100px;
        right: -100px;
        width: 900px;
        height: 1200px;
        background: radial-gradient(ellipse at 70% 50%,
          rgba(217, 119, 87, 0.22) 0%,
          rgba(217, 119, 87, 0.05) 45%,
          transparent 70%);
        filter: blur(30px);
        pointer-events: none;
      }

      /* ---------- Side hits ---------- */
      [data-composition-id="beat-5-pip"] .b5-hit {
        position: absolute;
        top: 50%;
        left: 130px;
        transform: translateY(-50%);
        width: 1080px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        opacity: 0;
      }
      [data-composition-id="beat-5-pip"] .b5-hit-kicker {
        font-family: "JetBrains Mono", monospace;
        font-size: 22px;
        font-weight: 700;
        letter-spacing: 0.42em;
        color: #d97757;
        text-shadow: 0 0 16px rgba(217, 119, 87, 0.6);
      }
      [data-composition-id="beat-5-pip"] .b5-hit-title {
        font-size: 136px;
        font-weight: 900;
        line-height: 0.95;
        letter-spacing: -0.03em;
        display: flex;
        flex-wrap: wrap;
        gap: 0 28px;
      }
      [data-composition-id="beat-5-pip"] .b5-hit-word {
        display: inline-block;
        background: linear-gradient(180deg, #ffffff 0%, #b8b8b8 62%, #f1f1f1 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow:
          0 0 26px rgba(255, 255, 255, 0.35),
          0 0 50px rgba(255, 255, 255, 0.14);
      }
      [data-composition-id="beat-5-pip"] .b5-hit-2 .b5-hit-word:last-child {
        /* Claude orange on "required." for emphasis. */
        background: linear-gradient(180deg, #ffffff 0%, #f5b39a 55%, #d97757 100%);
        -webkit-background-clip: text;
        background-clip: text;
      }
      [data-composition-id="beat-5-pip"] .b5-hit-sub {
        margin-top: 8px;
        font-family: "JetBrains Mono", monospace;
        font-size: 28px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.68);
        letter-spacing: 0.02em;
      }
      [data-composition-id="beat-5-pip"] .b5-hit-strike {
        margin-top: 8px;
        font-family: "JetBrains Mono", monospace;
        font-size: 26px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.45);
        letter-spacing: 0.01em;
      }
      [data-composition-id="beat-5-pip"] .b5-hit-strike span {
        position: relative;
        display: inline-block;
        padding: 4px 8px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 6px;
      }
      [data-composition-id="beat-5-pip"] .b5-hit-strike span::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 8px;
        width: 0;
        height: 2px;
        background: #d97757;
        box-shadow: 0 0 10px #d97757;
      }

      /* ---------- Outro CTA ---------- */
      [data-composition-id="beat-5-pip"] .b5-outro {
        position: absolute;
        top: 50%;
        left: 130px;
        transform: translateY(-50%);
        width: 1080px;
        display: flex;
        flex-direction: column;
        gap: 22px;
        opacity: 0;
      }
      [data-composition-id="beat-5-pip"] .b5-outro-tick {
        width: 80px;
        height: 6px;
        background: #d97757;
        border-radius: 3px;
        box-shadow: 0 0 18px rgba(217, 119, 87, 0.8);
      }
      [data-composition-id="beat-5-pip"] .b5-outro-eyebrow {
        font-family: "JetBrains Mono", monospace;
        font-size: 22px;
        font-weight: 700;
        letter-spacing: 0.42em;
        color: #d97757;
        text-shadow: 0 0 16px rgba(217, 119, 87, 0.6);
      }
      [data-composition-id="beat-5-pip"] .b5-outro-title {
        font-size: 160px;
        font-weight: 900;
        line-height: 0.92;
        letter-spacing: -0.03em;
        background: linear-gradient(180deg, #ffffff 0%, #f5b39a 60%, #d97757 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow:
          0 0 40px rgba(255, 255, 255, 0.3),
          0 0 80px rgba(217, 119, 87, 0.35);
      }
      [data-composition-id="beat-5-pip"] .b5-outro-bar {
        margin-top: 8px;
        width: 280px;
        height: 4px;
        background: linear-gradient(90deg, #d97757, rgba(217,119,87,0));
        border-radius: 2px;
        box-shadow: 0 0 14px rgba(217, 119, 87, 0.6);
      }
    </style>

    <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 root = '[data-composition-id="beat-5-pip"]';

        // -------- Seeded starfield (deterministic, no Math.random) --------
        // Simple sin/cos hash per index → 40 stars. Only drawn in the LEFT
        // ~1340px since that's where the BG is visible (PiP sits right).
        const starsEl = document.querySelector(`[data-composition-id="beat-5-pip"] .b5-stars`);
        const STAR_COUNT = 40;
        const stars = [];
        for (let i = 0; i < STAR_COUNT; i++) {
          const el = document.createElement("div");
          el.className = "b5-star";
          const hx = Math.abs(Math.sin(i * 12.9898 + 78.233));
          const hy = Math.abs(Math.cos(i * 4.1414 + 23.456));
          const size = 1.5 + (Math.abs(Math.sin(i * 2.71)) * 3);
          el.style.left   = (40 + hx * 1260) + "px";
          el.style.top    = (40 + hy * 1000) + "px";
          el.style.width  = size + "px";
          el.style.height = size + "px";
          el.style.opacity = (0.25 + Math.abs(Math.sin(i * 3.14)) * 0.55).toFixed(2);
          starsEl.appendChild(el);
          stars.push(el);
        }

        // Local 0.00 == master 12.84. Beat runs 10.33s.
        // Face wrapper is already shrinking (root timeline drives that at 12.54).
        // Give the BG ~0.15s to crossfade in as the wrapper arrives in position.

        tl.from(`[data-composition-id="beat-5-pip"] .b5-bg`,
          { opacity: 0, duration: 0.50, ease: "power2.out" }, 0);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-grid`,
          { opacity: 0, duration: 0.80, ease: "power2.out" }, 0.10);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-pip-halo`,
          { opacity: 0, scale: 0.85, duration: 0.8, ease: "power3.out" }, 0.15);

        // Star drift — every star drifts up slowly + breathes in opacity.
        // Finite repeat: (beat 10.33s) / (cycle 3.2s) = ~3.2 cycles → use 3.
        stars.forEach((s, i) => {
          const dx = (Math.sin(i * 0.9) * 22);
          const dy = -14 - Math.abs(Math.cos(i * 1.3)) * 10;
          gsap.to(s,
            { x: dx, y: dy, duration: 3.2, repeat: 3, yoyo: true,
              ease: "sine.inOut", delay: (i % 8) * 0.08 });
        });
        // Vignette breath.
        gsap.to(`[data-composition-id="beat-5-pip"] .b5-vignette`,
          { opacity: 0.7, duration: 3.5, repeat: 2, yoyo: true,
            ease: "sine.inOut" });

        // ---- Hit #1: "Natural language." local 2.58–4.00 ----
        tl.to(`[data-composition-id="beat-5-pip"] .b5-hit-1`, { opacity: 1, duration: 0.01 }, 2.58);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-hit-1 .b5-hit-kicker`,
          { x: -20, opacity: 0, duration: 0.35, ease: "expo.out" }, 2.58);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-hit-1 .b5-hit-word`,
          { y: 60, opacity: 0, scale: 0.92, filter: "blur(12px)",
            duration: 0.55, ease: "power3.out", stagger: 0.12 }, 2.68);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-hit-1 .b5-hit-sub`,
          { x: -14, opacity: 0, duration: 0.4, ease: "power2.out" }, 3.10);
        // Fade out ~4.00 so hit 2 can arrive fresh. Hard-kill at 4.30 so
        // word-level stagger tweens can't leak the hit back to visible.
        tl.to(`[data-composition-id="beat-5-pip"] .b5-hit-1`,
          { opacity: 0, y: -30, filter: "blur(14px)",
            duration: 0.30, ease: "power2.in" }, 4.00);
        tl.set(`[data-composition-id="beat-5-pip"] .b5-hit-1`,
          { opacity: 0, visibility: "hidden" }, 4.30);

        // ---- Hit #2: "No code required." local 4.24–6.80 ----
        tl.to(`[data-composition-id="beat-5-pip"] .b5-hit-2`, { opacity: 1, duration: 0.01 }, 4.24);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-hit-2 .b5-hit-kicker`,
          { x: -20, opacity: 0, duration: 0.35, ease: "expo.out" }, 4.24);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-hit-2 .b5-hit-word`,
          { y: 60, opacity: 0, scale: 0.92, filter: "blur(12px)",
            duration: 0.55, ease: "power3.out", stagger: 0.12 }, 4.34);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-hit-2 .b5-hit-strike`,
          { y: 14, opacity: 0, duration: 0.35, ease: "power2.out" }, 4.80);
        // Strikethrough sweep: the ::after width animates from 0 → full.
        const strikeSpan = document.querySelector(
          `[data-composition-id="beat-5-pip"] .b5-hit-2 .b5-hit-strike span`);
        if (strikeSpan) {
          const css = document.createElement("style");
          css.textContent = `[data-composition-id="beat-5-pip"] .b5-hit-2 .b5-hit-strike span.struck::after { width: calc(100% - 16px); transition: width 0.6s ease-out; }`;
          document.head.appendChild(css);
          tl.add(() => strikeSpan.classList.add("struck"), 5.15);
        }
        // Hit 2 fades out before the outro. Hard-kill at 7.10.
        tl.to(`[data-composition-id="beat-5-pip"] .b5-hit-2`,
          { opacity: 0, y: -30, filter: "blur(14px)",
            duration: 0.30, ease: "power2.in" }, 6.80);
        tl.set(`[data-composition-id="beat-5-pip"] .b5-hit-2`,
          { opacity: 0, visibility: "hidden" }, 7.10);

        // ---- Outro CTA: local 7.20 → end (10.33). Enters then HOLDS long
        // (Motion Philosophy: outro = 4-6s of stillness). ----
        tl.to(`[data-composition-id="beat-5-pip"] .b5-outro`, { opacity: 1, duration: 0.01 }, 7.20);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-outro-tick`,
          { width: 0, opacity: 0, duration: 0.45, ease: "power3.out" }, 7.20);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-outro-eyebrow`,
          { x: -16, opacity: 0, duration: 0.4, ease: "expo.out" }, 7.30);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-outro-title`,
          { y: 70, opacity: 0, scale: 0.92, filter: "blur(14px)",
            duration: 0.7, ease: "power3.out" }, 7.45);
        tl.from(`[data-composition-id="beat-5-pip"] .b5-outro-bar`,
          { width: 0, opacity: 0, duration: 0.55, ease: "power3.out" }, 8.10);

        // Subtle shimmer on the outro title (3 sweeps, 1.2s each covers 3.6s
        // of the ~3s CTA hold).
        gsap.fromTo(`[data-composition-id="beat-5-pip"] .b5-outro-title`,
          { backgroundPosition: "0% 50%" },
          { backgroundPosition: "200% 50%",
            duration: 1.8, ease: "sine.inOut",
            repeat: 1, yoyo: true, delay: 8.20 });

        // Duration anchor.
        tl.to({}, { duration: 10.33 }, 0);
        window.__timelines["beat-5-pip"] = tl;
      })();
    </script>
  </div>
</template>