kitbash Sign in Connect agent
Components

Floating field hero

The signature: a pale field where blurred festival photographs (and a few drawn cards) drift at different depths around a breathing red sun split by the year, with a big lime caption band under it.

Part of the style

Lime Field Mono

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --lime: #272b31;
  --night: #ffffff;
  --void: #ffffff;
  --fog: #21252b;
  --lime-dim: rgba(39, 43, 49, 0.55);
  --shade: rgba(255, 255, 255, 0.18);
  --pic-steel: #56595f;
  --pic-olive: #df7871;
  --pic-mustard: #fff0ed;
  --orb: #df7871;
  --pic-ember: #ea837c;
  --orb-deep: #bf8a84;
  --pic-clay: #d99993;
  --pic-magenta: #d16c65;
  --pic-violet: #cd8c86;
}
</style>

<section class="hero" aria-labelledby="hero-caption">
  <div class="hero__field" aria-hidden="true">
    <span class="hero__card hero__card--canopy" style="--x: 6%; --y: 10%; --w: 15%; --r: 9deg; --blur: 4px; --depth: 0.4; --order: 0"></span>
    <span class="hero__card hero__card--rig" style="--x: 21%; --y: 58%; --w: 18%; --r: -4deg; --blur: 2px; --depth: 0.7; --order: 1"></span>
    <span class="hero__card hero__card--lasers" style="--x: 13%; --y: 40%; --w: 7%; --r: -14deg; --blur: 0px; --depth: 1; --order: 2"></span>
    <span class="hero__card hero__card--crowd" style="--x: 44%; --y: 9%; --w: 9%; --r: -6deg; --blur: 5px; --depth: 0.3; --order: 3"></span>
    <span class="hero__card hero__card--wash" style="--x: 64%; --y: 13%; --w: 7%; --r: 8deg; --blur: 0px; --depth: 1.1; --order: 4"></span>
    <span class="hero__card hero__card--dancer" style="--x: 47%; --y: 58%; --w: 7%; --r: 3deg; --blur: 1px; --depth: 0.9; --order: 5"></span>
    <span class="hero__card hero__card--tent" style="--x: 76%; --y: 54%; --w: 15%; --r: -10deg; --blur: 3px; --depth: 0.6; --order: 6"></span>
    <span class="hero__card hero__card--gum" style="--x: 96%; --y: 30%; --w: 6%; --r: 4deg; --blur: 6px; --depth: 0.2; --order: 7"></span>
    <span class="hero__card hero__card--gum" style="--x: -2%; --y: 28%; --w: 5%; --r: -3deg; --blur: 6px; --depth: 0.2; --order: 8"></span>
    <span class="hero__sun"></span>
    <span class="hero__year hero__year--left">20</span>
    <span class="hero__year hero__year--right">28</span>
  </div>
  <p class="hero__caption" id="hero-caption">Low Orbit Sound &amp; Light, February 11 → 15 2028. A slow gathering of patient techno, land art and long talks out on the Copperhead Flats.</p>
</section>

<style>
  .hero {
    background: var(--night);
    color: var(--lime);
  }
  .hero__field {
    position: relative;
    overflow: hidden;
    height: clamp(440px, 50vw, 720px);
    background: var(--fog);
    --px: 0;
    --py: 0;
  }

  .hero__card {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    min-width: 44px;
    aspect-ratio: 4 / 3;
    opacity: 0;
    filter: blur(24px);
    transform:
      translate3d(calc(var(--px) * var(--depth) * 26px), calc(var(--py) * var(--depth) * 18px), 0)
      rotate(var(--r));
    transition:
      opacity 900ms var(--ease-out) calc(var(--order) * 90ms),
      filter 1200ms var(--ease-out) calc(var(--order) * 90ms),
      transform 600ms var(--ease-out);
    animation: hero-drift var(--drift-time) ease-in-out calc(var(--order) * -1.7s) infinite alternate;
    box-shadow: 0 10px 30px var(--shade);
  }
  .hero.is-ready .hero__card {
    opacity: 1;
    filter: blur(var(--blur));
  }
  @keyframes hero-drift {
    0% { translate: 0 0; }
    50% { translate: calc(var(--depth) * 12px) calc(var(--depth) * -16px); }
    100% { translate: calc(var(--depth) * -8px) calc(var(--depth) * 10px); }
  }

  /* Photographs from open collections (public domain, credits in assets/credits.json), and three drawn cards. */
  .hero__card--canopy { aspect-ratio: 5 / 4; background: url("assets/night-sky.jpg") center / cover; }
  .hero__card--rig { aspect-ratio: 16 / 9; background: url("assets/stage.jpg") center / cover; }
  .hero__card--crowd { aspect-ratio: 4 / 3; background: url("assets/dance-floor.jpg") center / cover; }
  .hero__card--wash { aspect-ratio: 3 / 5; background: url("assets/salt-flat.jpg") center / cover; }
  .hero__card--dancer { aspect-ratio: 3 / 4; background: url("assets/dry-lake.jpg") center / cover; }
  .hero__card--tent { aspect-ratio: 4 / 3; background: url("assets/tent.jpg") center / cover; }
  .hero__card--lasers {
    aspect-ratio: 3 / 4;
    background:
      conic-gradient(from 160deg at 50% 100%, transparent 0 8deg, var(--pic-ember) 8deg 10deg, transparent 10deg 18deg, var(--pic-magenta) 18deg 20deg, transparent 20deg 30deg, var(--pic-ember) 30deg 32deg, transparent 32deg),
      linear-gradient(180deg, var(--pic-violet), var(--void));
  }
  .hero__card--gum {
    aspect-ratio: 2 / 5;
    background:
      radial-gradient(60% 30% at 50% 20%, var(--pic-olive) 0 70%, transparent 72%),
      linear-gradient(90deg, transparent 0 44%, var(--pic-olive) 44% 56%, transparent 56%),
      linear-gradient(180deg, var(--fog), var(--pic-steel));
  }

  .hero__sun {
    position: absolute;
    left: 50%;
    top: 46%;
    width: clamp(110px, 12vw, 180px);
    aspect-ratio: 1;
    margin: calc(clamp(110px, 12vw, 180px) / -2) 0 0 calc(clamp(110px, 12vw, 180px) / -2);
    border-radius: var(--round);
    background: radial-gradient(circle, var(--orb-deep) 0, var(--orb) 32%, transparent 70%);
    filter: blur(6px);
    animation: hero-breathe 5s ease-in-out infinite alternate;
  }
  @keyframes hero-breathe {
    to { scale: 1.12; }
  }
  .hero__year {
    position: absolute;
    top: 46%;
    transform: translateY(-50%);
    color: var(--night);
    font-size: clamp(36px, 4vw, 58px);
    font-weight: var(--weight-light);
    line-height: 1;
  }
  .hero__year--left { right: calc(50% + clamp(56px, 6.4vw, 96px)); }
  .hero__year--right { left: calc(50% + clamp(56px, 6.4vw, 96px)); }

  .hero.is-resting .hero__card,
  .hero.is-resting .hero__sun {
    animation-play-state: paused;
  }

  .hero__caption {
    margin: 0;
    padding: var(--space-m) var(--edge) var(--space-l);
    max-width: 62ch;
    font-size: var(--text-l);
    font-weight: var(--weight-light);
    line-height: 1.3;
  }

  @media (max-width: 640px) {
    .hero__field {
      height: clamp(420px, 120vw, 560px);
    }
    .hero__card {
      width: calc(var(--w) * 2.1);
    }
    .hero__card--gum { display: none; }
    .hero__year {
      font-size: clamp(36px, 11vw, 52px);
    }
    .hero__year--left { right: calc(50% + 52px); }
    .hero__year--right { left: calc(50% + 52px); }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero__card {
      opacity: 1;
      filter: blur(var(--blur));
      transition: none;
      animation: none;
      transform: rotate(var(--r));
    }
    .hero__sun {
      animation: none;
    }
  }
</style>

<script>
  (() => {
    const still = matchMedia("(prefers-reduced-motion: reduce)");
    document.querySelectorAll(".hero").forEach((root) => {
      const field = root.querySelector(".hero__field");
      requestAnimationFrame(() => root.classList.add("is-ready"));

      field.addEventListener("pointermove", (event) => {
        if (still.matches) return;
        const box = field.getBoundingClientRect();
        field.style.setProperty("--px", ((event.clientX - box.left) / box.width - 0.5) * 2);
        field.style.setProperty("--py", ((event.clientY - box.top) / box.height - 0.5) * 2);
      });
      field.addEventListener("pointerleave", () => {
        field.style.setProperty("--px", 0);
        field.style.setProperty("--py", 0);
      });

      new IntersectionObserver(([entry]) => {
        root.classList.toggle("is-resting", !entry.isIntersecting);
      }).observe(root);
    });
  })();
</script>

Similar components

HUD hero

HUD hero

Tunnel heading

Tunnel heading

Error screen

Error screen

Red clock field

Red clock field

Split hero

Split hero

Masthead

Masthead

Spring headline

Spring headline

Unboxing hero

Unboxing hero