/* Bead strands with scroll sway and pointer contact motion. Guests who are coming each
   have a larger bead, named when the cursor or a finger comes near. */
body {
  position: relative;
}
.animal-strands {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  color: #d2042d;
}
.animal-strands svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* fill-opacity, not opacity: opacity makes the browser blend every bead as its own layer. */
.animal-strands .bead {
  fill: currentColor;
  fill-opacity: 0.48;
}
.animal-strands .charm {
  fill: var(--paper);
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}
.animal-strands .detail {
  fill: none;
}
.animal-strands .eye {
  fill: currentColor;
  stroke: none;
}
@media (max-width: 700px) {
  .animal-strands .charm {
    opacity: 0.5;
  }
  .animal-strands .bead {
    fill-opacity: 0.36;
  }
}

/* Guests' beads. These follow the phone rules above so that they keep their full strength. */
.animal-strands .guest {
  fill: var(--red);
  fill-opacity: 0.92;
  stroke: var(--paper);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
}
/* The visitor's own bead is the one drawn the other way round. */
.animal-strands .guest.mine {
  fill: var(--white);
  fill-opacity: 1;
  stroke: var(--red);
  stroke-width: 2.5;
}
.animal-strands .guest.arriving {
  animation: bead-arrive 900ms cubic-bezier(0.2, 1.5, 0.4, 1);
}
@keyframes bead-arrive {
  from {
    transform: scale(0);
  }
  55% {
    transform: scale(2.1);
  }
  to {
    transform: scale(1);
  }
}
/* A zero-size point that strands.js keeps on the bead; the name sits just above it. */
.strand-label {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}
.strand-label[hidden] {
  display: none;
}
.strand-label span {
  position: absolute;
  bottom: 13px;
  translate: -50% 0;
  padding: 4px 11px;
  border: 1px solid var(--red);
  border-radius: 99px;
  background: var(--white);
  box-shadow: 0 4px 12px #32282a1f;
  color: var(--red-dark);
  font: italic 14px/1.3 var(--serif);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .animal-strands .guest.arriving {
    animation: none;
  }
}
