[data-motion-hero]::before {
  content: none;
}

.hero > .hero-liquid {
  position: absolute;
  inset-block: 0;
  left: 50%;
  z-index: 0;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 79%, transparent);
}

.hero-liquid:not(.is-rendered) {
  background:
    radial-gradient(ellipse at 71% 32%, var(--green-soft), transparent 57%),
    radial-gradient(ellipse at 27% 70%, var(--green-soft), transparent 51%);
}

.hero > .hero-motion-toggle {
  position: absolute;
  right: 0;
  bottom: 10px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.hero > .hero-motion-toggle[hidden] {
  display: none;
}

.hero-motion-toggle::before {
  box-sizing: border-box;
  width: 9px;
  height: 11px;
  border-inline: 2px solid currentColor;
  content: "";
}

.hero-motion-toggle.is-paused::before {
  width: 0;
  height: 0;
  margin-left: 2px;
  border: 5px solid transparent;
  border-right: 0;
  border-left: 8px solid currentColor;
}

.hero-motion-toggle:hover {
  color: var(--text);
}

.hero-motion-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  .hero > .hero-motion-toggle {
    position: static;
    justify-self: end;
    margin-block: -22px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  [data-motion-hero] .tool-icon {
    transition: transform 280ms cubic-bezier(0.18, 0.85, 0.25, 1.45), border-radius 320ms ease,
      border-color 180ms ease, box-shadow 180ms ease;
  }

  [data-motion-hero] .tool-card:is(:hover, :focus-visible) .tool-icon {
    border-radius: 38% 62% 57% 43% / 62% 44% 56% 38%;
    transform: translateY(-3px) rotate(-10deg) scale(1.1);
  }

  [data-motion-hero] .tool-card:nth-child(even):is(:hover, :focus-visible) .tool-icon {
    border-radius: 56% 44% 37% 63% / 41% 60% 40% 59%;
    transform: translateY(-3px) rotate(10deg) scale(1.1);
  }

  .home-motion-project::after {
    position: absolute;
    z-index: 3;
    inset: 0;
    background: radial-gradient(circle 180px at var(--spot-x, 50%) var(--spot-y, 50%),
      rgba(105, 255, 184, 0.3), transparent);
    opacity: 0;
    mix-blend-mode: screen;
    transition: opacity 280ms ease;
    content: "";
    pointer-events: none;
  }

  .home-motion-project.has-spotlight::after {
    opacity: 1;
  }
}
