kitbash Sign in Connect agent
Components

Sticker headline hero

Top bar with a wordmark, an EN/NL toggle that rewrites the copy and a black contact pill; an 'available' pill with a breathing green dot; a centred chunky condensed headline with four draggable stickers (two gradient pills, a winking smiley whose eyes follow the pointer, a lime rating starburst); two pill buttons; a 32 s strip of greyed client logos; and the floating black pill menu at the bottom of the screen.

Part of the style

Clothesline Pitch

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --paper: #334493;
  --white: #2f3f8e;
  --ink: #fff2f1;
  --ink-soft: #f6cecc;
  --grey: #f4b1af;
  --grey-light: #3f5092;
  --dim: rgba(255, 242, 241, 0.45);
  --unread: rgba(255, 242, 241, 0.14);
  --unread-dark: rgba(47, 63, 142, 0.22);
  --soft-dark: rgba(47, 63, 142, 0.45);
  --line: rgba(255, 242, 241, 0.2);
  --line-dark: rgba(47, 63, 142, 0.14);
  --night: #fff3f3;
  --card-black: #fff2f1;
  --panel: #f1c5c3;
  --chip: #ecbebc;
  --edge-dark: #e9b8b6;
  --menu-edge: #e0aaa8;
  --lime: #a95858;
  --lime-ink: #feeceb;
  --sun: #975858;
  --live: #9f5555;
  --blue: #8d5772;
  --pink: #a95858;
  --pink-ink: #e0b5b3;
  --orange: #cd92af;
  --violet: #a95858;
}
</style>

<section class="hero" aria-label="Intro">
  <header class="hero__bar">
    <a class="hero__logo" href="#" aria-label="Hullo, home">
      <span class="hero__logo-word">hullo</span>
      <svg class="hero__logo-wave" viewBox="0 0 40 16" aria-hidden="true"><path d="M2 10c4-8 8-8 12 0s8 8 12 0 8-8 12 0" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"/></svg>
    </a>
    <div class="hero__bar-end">
      <div class="hero__lang" role="group" aria-label="Language">
        <button class="hero__lang-btn is-on" type="button" data-lang="en" aria-pressed="true"><span class="hero__lang-face">EN</span></button>
        <button class="hero__lang-btn" type="button" data-lang="nl" aria-pressed="false"><span class="hero__lang-face">NL</span></button>
      </div>
      <a class="hero__contact" href="#">Contact <svg class="hero__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 12 12 4M5.5 4H12v6.5" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg></a>
    </div>
  </header>

  <div class="hero__main">
    <a class="hero__status" href="#">
      <span class="hero__dot" aria-hidden="true"></span>
      <span data-en="Taking new projects" data-nl="Nieuwe projecten welkom">Taking new projects</span>
      <span class="hero__status-muted" data-en="Book a chat" data-nl="Plan een gesprek">Book a chat</span>
      <svg class="hero__status-arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
    </a>

    <div class="hero__stage">
      <h1 class="hero__title" data-en="Sites that do|the talking" data-nl="Sites die het|woord doen">Sites that do<br>the talking</h1>

      <span class="hero__sticker hero__sticker--pill hero__sticker--sunset" style="--rot: -9deg; --delay: 0.9s;" aria-hidden="true">one-person band</span>

      <span class="hero__sticker hero__sticker--face" style="--rot: 12deg; --delay: 1.05s;" aria-hidden="true">
        <svg class="hero__face" viewBox="0 0 120 120">
          <circle class="hero__face-disc" cx="60" cy="60" r="52"/>
          <ellipse class="hero__face-cheek" cx="30" cy="72" rx="9" ry="6"/>
          <ellipse class="hero__face-cheek" cx="90" cy="72" rx="9" ry="6"/>
          <g class="hero__face-eyes">
            <ellipse class="hero__face-eye" cx="43" cy="48" rx="7" ry="10"/>
            <ellipse class="hero__face-eye hero__face-eye--wink" cx="77" cy="48" rx="7" ry="10"/>
            <path class="hero__face-shut" d="M69 50q8 -7 16 0"/>
          </g>
          <path class="hero__face-smile" d="M36 74q24 26 48 0"/>
        </svg>
      </span>

      <span class="hero__sticker hero__sticker--burst" style="--rot: -12deg; --delay: 1.2s;" aria-hidden="true">
        <svg class="hero__burst" viewBox="0 0 140 140">
          <defs>
            <radialGradient id="hero-burst-fill" cx="35%" cy="30%" r="80%"><stop offset="0" stop-color="#e9ff8a"/><stop offset=".45" stop-color="#c6f432"/><stop offset="1" stop-color="#8fd61a"/></radialGradient>
          </defs>
          <polygon class="hero__burst-shape" fill="url(#hero-burst-fill)" points="70,6 80,30 104,16 104,44 132,44 116,66 136,84 108,92 116,120 90,110 78,134 64,112 42,130 40,102 12,104 24,80 4,62 30,52 20,26 48,32"/>
          <text class="hero__burst-num" x="70" y="76" text-anchor="middle">5.0</text>
          <text class="hero__burst-stars" x="70" y="96" text-anchor="middle">★★★★★</text>
        </svg>
      </span>

      <span class="hero__sticker hero__sticker--pill hero__sticker--dusk" style="--rot: 7deg; --delay: 1.35s;" aria-hidden="true">made in Rotterdam</span>
    </div>

    <p class="hero__sub" data-en="A one-person web studio. I design and build quick, warm, hard-working websites for small brands, cafés, makers and anyone tired of a site that just sits there." data-nl="Een webstudio van één persoon. Ik ontwerp en bouw snelle, warme websites voor kleine merken, cafés en makers.">A one-person web studio. I design and build quick, warm, hard-working websites for small brands, cafés, makers and anyone tired of a site that just sits there.</p>

    <div class="hero__actions">
      <a class="hero__btn hero__btn--solid" href="#" data-en="Start a project" data-nl="Start een project">Start a project</a>
      <a class="hero__btn hero__btn--line" href="#" data-en="See the work" data-nl="Bekijk het werk">See the work</a>
    </div>
  </div>

  <div class="hero__trusted">
    <p class="hero__trusted-label" data-en="Trusted by" data-nl="Vertrouwd door">Trusted by</p>
    <div class="hero__strip">
      <ul class="hero__track">
        <li class="hero__logo-item hero__logo-item--serif"><svg class="hero__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2 4 20h16z"/></svg>Hollow Pine</li>
        <li class="hero__logo-item hero__logo-item--caps"><svg class="hero__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M1 14c4-6 7-6 11 0s7 6 11 0v8H1z"/></svg>BRINE</li>
        <li class="hero__logo-item hero__logo-item--mono"><svg class="hero__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 3h8v18H3zM13 3h8v18h-8z"/></svg>two_doors</li>
        <li class="hero__logo-item hero__logo-item--round"><svg class="hero__mark" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="13" r="9"/><rect x="9" y="1" width="6" height="4" rx="1"/></svg>odd pot</li>
        <li class="hero__logo-item hero__logo-item--wide">KETTLE&amp;CO</li>
        <li class="hero__logo-item hero__logo-item--caps"><svg class="hero__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 1l3 8h8l-6 5 2 9-7-5-7 5 2-9-6-5h8z"/></svg>NORTHSTAR</li>
        <li class="hero__logo-item hero__logo-item--serif">Fennel <svg class="hero__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 22V8M12 8C6 8 4 4 4 2c4 0 8 2 8 6zm0 0c6 0 8-4 8-6-4 0-8 2-8 6z"/></svg></li>
      </ul>
    </div>
  </div>

  <nav class="hero__menu" aria-label="Sections">
    <a class="hero__menu-link" href="#"><svg class="hero__menu-ico" viewBox="0 0 16 16" aria-hidden="true"><path d="M2.5 2.5h4v4h-4zM9.5 2.5h4v4h-4zM2.5 9.5h4v4h-4zM9.5 9.5h4v4h-4z"/></svg>Work</a>
    <a class="hero__menu-link" href="#"><svg class="hero__menu-ico" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.5c.6 3.4 2.1 4.9 5.5 5.5-3.4.6-4.9 2.1-5.5 5.5C7.4 9.1 5.9 7.6 2.5 7 5.9 6.4 7.4 4.9 8 1.5z"/></svg>Services</a>
    <a class="hero__menu-link" href="#"><svg class="hero__menu-ico" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="5.5" r="3"/><path d="M2.5 14.5c.6-3 2.8-4.5 5.5-4.5s4.9 1.5 5.5 4.5"/></svg>About</a>
    <a class="hero__menu-link" href="#"><svg class="hero__menu-ico" viewBox="0 0 16 16" aria-hidden="true"><path d="M2.5 3.5h11v7.5H7l-3 2.5V11H2.5z"/></svg>Contact</a>
  </nav>
</section>

<style>
  .hero {
    position: relative;
    padding: 0 var(--edge) 96px;
    background: var(--paper);
    overflow-x: clip;
  }

  /* Top bar */
  .hero__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 32px 0 0;
  }
  .hero__logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--ink);
    text-decoration: none;
  }
  .hero__logo-word {
    font: 900 40px/1 var(--font-display);
    font-stretch: var(--display-stretch);
    letter-spacing: -0.02em;
  }
  .hero__logo-wave { width: 34px; transition: transform var(--lift) var(--spring); }
  .hero__logo:hover .hero__logo-wave { transform: translateY(-3px) rotate(-8deg); }
  .hero__bar-end { display: flex; align-items: center; gap: 12px; }
  .hero__lang {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  }
  .hero__lang-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: -10px -6px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .hero__lang-face {
    display: grid;
    place-items: center;
    width: 31px;
    height: 24px;
    border-radius: var(--radius-pill);
    color: rgba(255, 255, 255, 0.5);
    font: 500 11px/1 var(--font-mono);
    letter-spacing: 0.06em;
    transition: color var(--quick), background var(--quick);
  }
  .hero__lang-btn:hover .hero__lang-face { color: var(--white); }
  .hero__lang-btn.is-on .hero__lang-face { background: var(--white); color: var(--ink); }
  .hero__lang-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
  .hero__contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 20px 0 22px;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--white);
    font: 500 var(--text-s)/1 var(--font-body);
    text-decoration: none;
    transition: background 0.3s;
  }
  .hero__contact:hover { background: #262626; }
  .hero__arrow { width: 14px; transition: transform 0.3s var(--spring); }
  .hero__contact:hover .hero__arrow { transform: translate(2px, -2px); }

  /* Centre block */
  .hero__main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: clamp(36px, 7vw, 104px);
    text-align: center;
  }
  .hero__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px 0 14px;
    border-radius: var(--radius-pill);
    background: var(--white);
    box-shadow: var(--pill-shadow);
    color: var(--ink);
    font: 500 var(--text-xs)/1.2 var(--font-body);
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: box-shadow 0.3s, transform 0.3s;
  }
  .hero__status:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 10px 24px -8px rgba(0, 0, 0, 0.25); }
  .hero__dot {
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-radius: 50%;
    background: var(--live);
    animation: hero-live 1.6s ease-in-out infinite;
  }
  .hero__status-muted { margin-left: 8px; color: var(--grey); }
  .hero__status-arrow { width: 14px; color: var(--grey); transition: transform 0.3s; }
  .hero__status:hover .hero__status-arrow { transform: translateX(3px); }

  .hero__stage {
    position: relative;
    width: min(100%, 1000px);
    margin-top: 28px;
  }
  .hero__title {
    margin: 0;
    font: 900 var(--text-hero)/0.95 var(--font-display);
    font-stretch: var(--display-stretch);
    letter-spacing: -0.01em;
    text-transform: uppercase;
    text-wrap: balance;
    animation: hero-rise 0.6s var(--ease) 0.5s backwards;
  }

  /* Stickers: a white rim, a soft drop shadow, stuck at an angle, popping in one after another. */
  .hero__sticker {
    --dx: 0px;
    --dy: 0px;
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 2;
    display: block;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    filter: var(--sticker-shadow);
    transition: transform var(--lift) var(--spring), filter 0.3s;
    animation: hero-pop var(--pop) var(--spring) var(--delay) backwards;
  }
  .hero__sticker:hover { transform: translate(var(--dx), var(--dy)) rotate(calc(var(--rot) * -0.6)) scale(1.08); filter: var(--sticker-shadow-up); }
  .hero__sticker.is-dragging { cursor: grabbing; transition: filter 0.3s; transform: translate(var(--dx), var(--dy)) rotate(calc(var(--rot) * 0.4)) scale(1.12); filter: var(--sticker-shadow-up); }

  .hero__sticker--pill {
    overflow: hidden;
    padding: 12px 22px;
    border: var(--sticker-border) solid var(--white);
    border-radius: var(--radius-pill);
    color: var(--white);
    font: 800 var(--text-sticker)/1 var(--font-body);
    letter-spacing: -0.03em;
    white-space: nowrap;
  }
  .hero__sticker--sunset { --x: 2%; --y: -14%; background: var(--grad-sunset); }
  .hero__sticker--dusk { --x: 72%; --y: 74%; background: var(--grad-dusk); }
  .hero__sticker--face { --x: 89%; --y: -22%; }
  .hero__sticker--burst { --x: -6%; --y: 52%; }
  .hero__sticker--pill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--shine);
    background-size: 250% 100%;
    background-position: 120% 0;
    transition: background-position 0.7s var(--ease);
  }
  .hero__sticker--pill:hover::after { background-position: -40% 0; }

  .hero__face { width: clamp(84px, 10vw, 140px); overflow: visible; }
  .hero__face-disc { fill: var(--sun); stroke: var(--white); stroke-width: 9; paint-order: stroke; }
  .hero__face-cheek { fill: var(--orange); opacity: 0.35; }
  .hero__face-eyes { transition: transform 0.2s ease-out; }
  .hero__face-eye { fill: var(--ink); transform-box: fill-box; transform-origin: center; transition: transform 0.15s; }
  .hero__face-shut, .hero__face-smile { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
  .hero__face-shut { opacity: 0; transition: opacity 0.1s; }
  .hero__face-smile { transform-box: fill-box; transform-origin: center top; transition: transform 0.3s var(--spring); }
  .hero__sticker--face:hover .hero__face-eye--wink { transform: scaleY(0); }
  .hero__sticker--face:hover .hero__face-shut { opacity: 1; }
  .hero__sticker--face:hover .hero__face-smile { transform: scale(1.12, 1.25); }

  .hero__burst { width: clamp(96px, 12vw, 172px); overflow: visible; }
  .hero__burst-shape { stroke: var(--white); stroke-width: 9; stroke-linejoin: round; paint-order: stroke; transform-box: fill-box; transform-origin: center; transition: transform 0.6s var(--spring); }
  .hero__sticker--burst:hover .hero__burst-shape { transform: rotate(36deg); }
  .hero__burst-num { fill: var(--lime-ink); font: 800 34px var(--font-body); letter-spacing: -0.03em; }
  .hero__burst-stars { fill: var(--lime-ink); font: 800 13px var(--font-body); letter-spacing: 0.05em; }

  .hero__sub {
    max-width: 640px;
    margin: 28px 0 0;
    color: var(--grey);
    font-size: var(--text-m);
    line-height: 1.4;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }
  .hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
  .hero__btn {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    font: 500 var(--text-s)/1 var(--font-body);
    text-decoration: none;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  }
  .hero__btn--solid { background: var(--ink); color: var(--white); }
  .hero__btn--solid:hover { background: #262626; }
  .hero__btn--line { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .hero__btn--line:hover { background: var(--ink); color: var(--white); box-shadow: inset 0 0 0 1px var(--ink); }

  /* Trusted-by strip */
  .hero__trusted { max-width: 1104px; margin: clamp(48px, 7vw, 100px) auto 0; }
  .hero__trusted-label { margin: 0 0 28px; color: var(--dim); font-size: var(--text-s); text-align: center; }
  .hero__strip {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  }
  .hero__track {
    display: flex;
    align-items: center;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
    animation: hero-roll var(--strip) linear infinite;
  }
  .hero__strip:hover .hero__track { animation-play-state: paused; }
  .hero__strip.is-away .hero__track { animation-play-state: paused; }
  .hero__logo-item {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
    height: 40px;
    margin-right: 72px;
    color: var(--ink);
    opacity: 0.32;
    white-space: nowrap;
    transition: opacity 0.3s;
  }
  .hero__logo-item:hover { opacity: 0.9; }
  .hero__mark { width: 22px; height: 22px; fill: currentColor; stroke: none; }
  .hero__logo-item--serif { font: italic 600 23px/1 var(--font-tight); letter-spacing: -0.04em; }
  .hero__logo-item--caps { font: 900 21px/1 var(--font-display); font-stretch: 100%; letter-spacing: 0.08em; }
  .hero__logo-item--mono { font: 500 19px/1 var(--font-mono); }
  .hero__logo-item--round { font: 800 24px/1 var(--font-body); letter-spacing: -0.06em; }
  .hero__logo-item--wide { font: 800 18px/1 var(--font-display); font-stretch: 125%; letter-spacing: 0.02em; }

  /* Floating pill menu */
  .hero__menu {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 50;
    display: flex;
    gap: 2px;
    padding: 6px;
    border-radius: var(--radius-pill);
    background: var(--ink);
    box-shadow: var(--menu-shadow);
    transform: translateX(-50%);
    animation: hero-menu-in 0.6s var(--spring) 1.6s backwards;
  }
  .hero__menu-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    color: var(--white);
    font: 500 var(--text-s)/1 var(--font-body);
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--quick);
  }
  .hero__menu-link:hover, .hero__menu-link:focus-visible { background: #1f1f1f; }
  .hero__menu-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; transition: transform var(--lift) var(--spring); }
  .hero__menu-link:hover .hero__menu-ico { transform: rotate(-12deg) scale(1.15); }

  @keyframes hero-pop { 0% { opacity: 0; scale: 0.4; } }
  @keyframes hero-rise { 0% { opacity: 0; translate: 0 24px; } }
  @keyframes hero-live { 50% { opacity: 0.4; transform: scale(0.75); } }
  @keyframes hero-roll { to { transform: translateX(-50%); } }
  @keyframes hero-menu-in { 0% { opacity: 0; translate: 0 40px; } }

  @media (max-width: 720px) {
    .hero__sticker { scale: 0.72; }
    .hero__sticker--pill { font-size: 18px; padding: 10px 16px; }
    .hero__contact { height: 44px; padding: 0 16px; }
  }
  @media (max-width: 480px) {
    .hero__logo-word { font-size: 32px; }
    .hero__lang { display: none; }
    .hero__status-muted, .hero__status-arrow { display: none; }
    .hero__stage { margin-top: 56px; margin-bottom: 24px; }
    .hero__sticker { scale: 0.6; }
    .hero__sticker--sunset { --x: -4%; --y: -46%; }
    .hero__sticker--face { --x: 76%; --y: -58%; }
    .hero__sticker--burst { --x: -10%; --y: 78%; }
    .hero__sticker--dusk { --x: 44%; --y: 100%; }
    .hero__menu-link { padding: 0 10px; gap: 6px; font-size: 13px; }
    .hero__menu-ico { width: 14px; height: 14px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero__sticker, .hero__title, .hero__menu { animation: none; }
    .hero__track { animation: none; }
    .hero__dot { animation: none; }
  }
</style>

<script>
(() => {
  const LOGO_COPIES = 1;

  function setLanguage(root, lang) {
    root.querySelectorAll('.hero__lang-btn').forEach((btn) => {
      const on = btn.dataset.lang === lang;
      btn.classList.toggle('is-on', on);
      btn.setAttribute('aria-pressed', String(on));
    });
    root.querySelectorAll('[data-' + lang + ']').forEach((el) => {
      const text = el.dataset[lang];
      if (el.classList.contains('hero__title')) {
        el.replaceChildren(...text.split('|').flatMap((line, i) => (i ? [document.createElement('br'), line] : [line])));
      } else {
        el.textContent = text;
      }
    });
  }

  function loopLogos(track) {
    for (let copy = 0; copy < LOGO_COPIES; copy++) {
      for (const item of [...track.children]) {
        const clone = item.cloneNode(true);
        clone.setAttribute('aria-hidden', 'true');
        track.append(clone);
      }
    }
  }

  function makeDraggable(sticker) {
    let start = null;
    sticker.addEventListener('pointerdown', (event) => {
      const style = getComputedStyle(sticker);
      start = { x: event.clientX, y: event.clientY, dx: parseFloat(style.getPropertyValue('--dx')) || 0, dy: parseFloat(style.getPropertyValue('--dy')) || 0 };
      sticker.setPointerCapture(event.pointerId);
      sticker.classList.add('is-dragging');
    });
    sticker.addEventListener('pointermove', (event) => {
      if (!start) return;
      sticker.style.setProperty('--dx', start.dx + event.clientX - start.x + 'px');
      sticker.style.setProperty('--dy', start.dy + event.clientY - start.y + 'px');
    });
    const drop = () => { start = null; sticker.classList.remove('is-dragging'); };
    sticker.addEventListener('pointerup', drop);
    sticker.addEventListener('pointercancel', drop);
  }

  function followPointer(root) {
    const eyes = root.querySelector('.hero__face-eyes');
    if (!eyes) return;
    root.addEventListener('pointermove', (event) => {
      const box = eyes.getBoundingClientRect();
      const dx = event.clientX - (box.left + box.width / 2);
      const dy = event.clientY - (box.top + box.height / 2);
      const reach = Math.min(1, Math.hypot(dx, dy) / 400);
      const angle = Math.atan2(dy, dx);
      eyes.style.transform = `translate(${Math.cos(angle) * 4 * reach}px, ${Math.sin(angle) * 4 * reach}px)`;
    });
  }

  function pauseStripOffScreen(strip) {
    new IntersectionObserver(([entry]) => strip.classList.toggle('is-away', !entry.isIntersecting)).observe(strip);
  }

  for (const root of document.querySelectorAll('.hero')) {
    root.querySelectorAll('.hero__lang-btn').forEach((btn) => btn.addEventListener('click', () => setLanguage(root, btn.dataset.lang)));
    root.querySelectorAll('.hero__track').forEach(loopLogos);
    root.querySelectorAll('.hero__strip').forEach(pauseStripOffScreen);
    root.querySelectorAll('.hero__sticker').forEach(makeDraggable);
    followPointer(root);
  }
})();
</script>

Similar components

Split hero

Split hero

Hero with device panel

Hero with device panel

Masthead

Masthead

Sky hero

Sky hero

Error screen

Error screen

HUD hero

HUD hero

Ruled hero

Ruled hero

Cut-out hero

Cut-out hero