/* The opening scene (beef.js). */

.beef { height: 1000vh; --s: 152px; }
.duo { position: absolute; left: 50%; top: 47%; width: 0; height: 0; }
.rig { position: absolute; left: 0; top: 0; }
.app { position: absolute; left: calc(var(--s) / -2); top: calc(var(--s) / -2); width: var(--s); height: var(--s); will-change: transform, opacity; }
.app .label {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font: 600 15px/1.2 var(--body);
  letter-spacing: -0.01em;
  color: var(--text);
}
.app.figma { z-index: 3; transform-origin: 50% 100%; }
.figma-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 22.5%;
  background: #1e1e1e;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 18px 40px -16px rgba(0, 0, 0, 0.5);
}
.figma-icon { transform-origin: 50% 100%; }
.figma-icon svg { height: 54%; width: auto; }

/* Ours: ten strips of the icon, so it can bend like a card (beef.js turns
   each one a little more than the one under it). */
.app.ff { z-index: 1; }
/* The perspective sits here, with the strips, so the shadow can't flatten it (beef.js uses the same numbers for the arms). */
.ff-strips { position: absolute; inset: 0; perspective: calc(var(--s) * 2.3); perspective-origin: 50% 70%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.22)); }
.ff-strips i {
  position: absolute;
  left: 0;
  width: 100%;
  height: calc(10% + 0.6px);
  background: url("img/ff-icon-round.png") 0 0 / var(--s) var(--s) no-repeat;
  transform-origin: 50% 100%;
  backface-visibility: hidden;
}
.app.ff .label { opacity: 0; }

/* Its arms (from its sides, redrawn by beef.js as it moves), behind Figma's icon, and its fingers, over the icon's edges. */
.limbs { position: absolute; left: calc(var(--s) * -1.5); top: calc(var(--s) * -1.9); width: calc(var(--s) * 3); height: calc(var(--s) * 3); overflow: visible; pointer-events: none; }
.arms { z-index: 2; fill: none; stroke: #111; stroke-width: 15; stroke-linecap: round; }
.arms path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.arms .skin { stroke: #fff; stroke-width: 9.5; }
.app.figma .limbs { left: calc(var(--s) * -1); top: calc(var(--s) * -1.4); }
.hands { fill: #fff; stroke: #111; stroke-width: 2.6; }
.hand { opacity: 0; }
.hands .smack { fill: none; stroke: var(--text); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.bonk { z-index: 6; fill: none; stroke: var(--text); stroke-width: 5; stroke-linecap: round; opacity: 0; }

.beef-lines { position: absolute; left: 0; right: 0; top: calc(47% + var(--s) * 0.5 + 64px); height: 4em; text-align: center; }
.beef-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(92vw, 760px);
  margin: 0;
  transform: translateX(-50%);
  opacity: 0;
  font: 750 clamp(22px, 2.8vw, 34px)/1.18 var(--display);
  letter-spacing: -0.025em;
}
.beef-line[data-line="1"] { color: var(--muted); }
/* "Give me", then a word with each hit (beef.js). */
.beef-line .bw { display: inline-block; transform-origin: 50% 85%; }

.beef-end {
  position: absolute;
  left: 50%;
  top: calc(47% - var(--s) * 0.75 + 52px);
  width: min(92vw, 860px);
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
.beef-end.live { pointer-events: auto; }
.beef-end h1 { font-size: clamp(36px, 5.6vw, 66px); }
.beef-end .aside { margin: 10px 0 0; font: 600 clamp(17px, 1.9vw, 22px)/1.3 var(--display); letter-spacing: -0.015em; color: var(--muted); }
.beef-end .lede { margin-top: 16px; }
.beef-end .actions { margin-top: 28px; }

/* The scroll hint: clear of phones' bottom bars, with three chevrons falling
   in turn to say "down". beef.js fades it out once the scroll starts. */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: max(64px, 10svh);
  display: grid;
  justify-items: center;
  gap: 10px;
  width: max-content;
  max-width: 92vw;
  margin: 0;
  transform: translateX(-50%);
  font: 600 15px/1.3 var(--body);
  color: var(--muted);
  text-align: center;
}
.scroll-arrows { display: grid; justify-items: center; }
.scroll-arrows i { width: 12px; height: 12px; margin-top: -4px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); opacity: 0; animation: scroll-down 1.5s ease-in-out infinite; }
.scroll-arrows i:nth-child(2) { animation-delay: 0.18s; }
.scroll-arrows i:nth-child(3) { animation-delay: 0.36s; }
@keyframes scroll-down {
  0% { opacity: 0; transform: translateY(-6px) rotate(45deg); }
  40% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(6px) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) { .scroll-arrows i { animation: none; opacity: 0.8; } }

/* Smaller screens */

@media (max-width: 720px) {
  .beef { --s: 112px; }
  .app .label { font-size: 13px; top: calc(100% + 9px); }
  .beef-lines { top: calc(47% + var(--s) * 0.5 + 48px); }
  .beef-end { top: calc(47% - var(--s) * 0.75 + 40px); }
  .beef-end .lede { font-size: 16px; }
  .beef-end .actions .button { width: auto; }
}

@media (max-height: 760px) and (min-width: 721px) {
  .beef { --s: 128px; }
  .beef-end h1 { font-size: clamp(34px, 4.6vw, 54px); }
}
