.gears__axes,
.gears__gear,
.gears__hub {
  position: absolute;
}

.gears__axes {
  inset: 0;
  width: 100%;
  height: 100%;
}

.gears__axes,
.gears__gear {
  overflow: visible;
  fill: none;
}

.gears__axes path,
.gears__pitch {
  stroke: var(--c-grid-strong);
  stroke-width: 1;
  stroke-dasharray: 14 4 2 4;
}

.gears__gear {
  left: calc((var(--x) - var(--size) / 2) * 1px);
  top: calc((var(--y) - var(--size) / 2) * 1px);
  width: calc(var(--size) * 1px);
  height: calc(var(--size) * 1px);
  stroke: currentColor;
  stroke-width: 1.5;
  animation: mechanica-turn var(--turn) linear infinite;
}

.gears__gear--big {
  --turn: 48s;

  color: var(--c-blue);
  stroke-width: 2;
}

.gears__gear--medium {
  --turn: 28s;

  color: var(--c-line-strong);
  animation-direction: reverse;
}

.gears__gear--small {
  --turn: 20s;

  color: var(--c-accent);
  animation-direction: reverse;
}

.gears__hub {
  left: calc(var(--x) * 1px);
  top: calc(var(--y) * 1px);
  display: flex;
  color: var(--c-accent);
  transform: translate(-50%, -50%);
}

.gears__hub svg {
  width: 34px;
  height: 34px;
}

@keyframes mechanica-turn {
  to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
  .gears__gear { animation: none; }
}
