Skip to content

A Claude Code skill that reverse-engineers any animation frame by frame, then proves the copy moves the same.

5.7 KB
Raw Blame
/* vercel.com's homepage hero at 1440x900, light theme: the boxes, fonts and transitions measured on the
   page (.reanimate/vercel-hero/probe-dom.json). Narrower windows get the same layout scaled down. */

@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

:root {
  --fit: 1;
  --gray-1000: rgb(23, 23, 23);
  --gray-900: rgb(77, 77, 77);
  --bg: rgb(250, 250, 250);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

html, body { margin: 0; background: var(--bg); }
body {
  color: var(--gray-1000);
  font: 400 16px/24px "Geist", system-ui, sans-serif;
  font-feature-settings: "calt" 0, "rlig", "ss11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.vh-frame { width: calc(1440px * var(--fit)); height: calc(900px * var(--fit)); margin: 0 auto; overflow: hidden; }
.vh-page { position: relative; width: 1440px; height: 900px; transform: scale(var(--fit)); transform-origin: 0 0; }
.vh-section { position: absolute; left: 24px; top: 64px; width: 1392px; height: 836px; user-select: none; -webkit-user-select: none; }
/* the hero row, 1392 x 728: heading left, capabilities right, both centred vertically as on vercel.com, so the
   capabilities move up while one of them is open */
.vh-hero { position: absolute; inset: 0 0 108px 0; box-sizing: border-box; padding: 40px 0; display: flex; align-items: center; justify-content: space-between; }

/* the shader layer: a 3:2 box, 720 px tall, 20 px below the row's centre */
.vh-shader { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.vh-canvas-box { position: absolute; left: 156px; top: 24px; width: 1080px; height: 720px; }

.vh-fallback { position: absolute; inset: 0; transition: opacity 700ms linear; }
.vh-fallback[data-hidden] { opacity: 0; }
.vh-fallback__square { position: absolute; left: 50%; top: 50%; height: 100%; max-height: 560px; aspect-ratio: 1; translate: -50% -50%; scale: 1.3; pointer-events: none; }
.vh-fallback__svg { position: absolute; left: 50%; top: 50%; width: 30.47619047619048%; height: 30.47619047619048%; translate: -50% -50%; }

.vh-label {
  position: absolute; left: 50%; top: calc(50% + 20px + 20%); z-index: 20;
  display: grid; translate: -50% 0; white-space: nowrap; text-align: center; pointer-events: none;
  font-size: 24px; line-height: 32px; font-weight: 450; letter-spacing: -0.96px; color: var(--gray-1000);
  opacity: 0; transition: opacity 300ms var(--ease);
}
.vh-label > span { grid-area: 1 / 1; justify-self: center; transition: opacity 300ms var(--ease); }
.vh-label__loading { opacity: 0; }
[data-hero-drop-active="true"] .vh-label { opacity: 1; }
[data-hero-drop-staging="true"] .vh-label__drop { opacity: 0; }
[data-hero-drop-staging="true"] .vh-label__loading { opacity: 1; }

.vh-shader-root { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.vh-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1200ms linear; }
.vh-pointer-area { position: absolute; inset: 0; pointer-events: none; }

/* left: heading and buttons */
.vh-header {
  position: relative; width: 444px; z-index: 10;
  display: flex; flex-direction: column; align-items: flex-start; gap: 32px; text-align: left;
  user-select: text; -webkit-user-select: text;
  transition: opacity 300ms var(--ease);
}
.vh-title { margin: 0; font-size: 64px; line-height: 64px; font-weight: 400; letter-spacing: -3.84px; text-wrap: balance; }
.vh-buttons { display: flex; gap: 12px; }
.vh-button {
  display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 12px; border-radius: 9999px;
  font-size: 16px; line-height: 24px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.vh-button > span { padding: 0 6px; }
.vh-button--primary { background: var(--gray-1000); color: #fff; }
.vh-button--primary:hover { background: rgb(56, 56, 56); }
.vh-button--secondary { background: #fff; color: var(--gray-1000); box-shadow: rgb(235, 235, 235) 0 0 0 1px; }
.vh-button--secondary:hover { background: rgb(242, 242, 242); }

/* right: the three capabilities; hovering one lights an edge of the triangle */
.vh-nav-wrap { position: relative; width: 364px; z-index: 10; transition: opacity 300ms var(--ease); }
.vh-nav { display: flex; flex-direction: column; gap: 8px; padding: 32px 8px; }
.vh-item { position: relative; z-index: 10; display: flex; align-items: flex-start; height: 24px; overflow: hidden; cursor: default; text-align: left; text-wrap: pretty; transition: height 200ms var(--ease-out); }
.vh-item[data-open] { height: 84px; }
.vh-item__text { display: block; }
.vh-item__title { font-weight: 450; letter-spacing: -0.32px; color: var(--gray-900); transition: color 500ms var(--ease-out); }
.vh-nav[data-none] .vh-item__title, .vh-item[data-open] .vh-item__title { color: var(--gray-1000); }
.vh-item__desc { color: var(--gray-900); opacity: 0; transition: opacity 300ms var(--ease-out); }
.vh-item[data-open] .vh-item__desc { opacity: 1; transition-duration: 500ms; }

[data-hero-drop-active="true"] .vh-header,
[data-hero-drop-active="true"] .vh-nav-wrap { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .vh-label, .vh-label > span, .vh-header, .vh-nav-wrap { transition: none; }
}

/* ?embed: the canvas box alone */
html[data-embed] .vh-frame { width: calc(1080px * var(--fit)); height: calc(720px * var(--fit)); margin: 0; }
html[data-embed] .vh-page { left: calc(-180px * var(--fit)); top: calc(-88px * var(--fit)); position: relative; }