/*
 * "No one to watch with?": the call to join the Discord. A small crowd of faces floats; two
 * of them drift toward each other, meet and smile, then wander off again, on a loop.
 */
.find {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px 64px;
  margin: 24px 0;
  padding: 48px;
  border: 1px solid rgba(255, 59, 92, 0.35);
  border-radius: 28px;
  background:
    radial-gradient(60% 90% at 85% 50%, rgba(196, 32, 63, 0.22), transparent 70%),
    var(--raised);
}

.find h2 {
  margin-bottom: 14px;
}

.find p {
  margin: 0 0 28px;
  color: var(--muted);
}

.crowd {
  position: relative;
  height: 240px;
  container-type: inline-size;
  --meet: 22cqw;
}

.face {
  position: absolute;
  width: 46px;
  height: 46px;
  animation: drift 6s ease-in-out infinite alternate;
}

.face .avatar {
  width: 100%;
  height: 100%;
}

.face-2 { animation-duration: 7s; animation-delay: -2s; }
.face-3 { animation-duration: 5.5s; animation-delay: -4s; }
.face-4 { width: 34px; height: 34px; animation-duration: 8s; }
.face-5 { width: 38px; height: 38px; animation-delay: -3s; }
.face-6 { width: 30px; height: 30px; animation-duration: 6.5s; animation-delay: -1s; }

/* The pair: bigger, and on their own path toward the middle. */
.face-0,
.face-1 {
  z-index: 1;
  width: 62px;
  height: 62px;
}

.is-visible .face-0 {
  animation: meet-left 7s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

.is-visible .face-1 {
  animation: meet-right 7s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

.is-visible .face-0 .eyes,
.is-visible .face-1 .eyes {
  animation: glad 7s infinite;
}

@keyframes drift {
  from { translate: 0 0; }
  to { translate: 10px -14px; }
}

@keyframes meet-left {
  0%, 10% { translate: 0 0; rotate: 0deg; }
  40%, 62% { translate: var(--meet) -6px; rotate: 8deg; }
  90%, 100% { translate: 0 0; rotate: 0deg; }
}

@keyframes meet-right {
  0%, 10% { translate: 0 0; rotate: 0deg; }
  40%, 62% { translate: calc(var(--meet) * -1) 6px; rotate: -8deg; }
  90%, 100% { translate: 0 0; rotate: 0deg; }
}

/* Once together they bounce, as the logo's faces do. */
@keyframes glad {
  0%, 42%, 64%, 100% { transform: none; }
  48% { transform: translateY(-3px) scaleY(1.15); }
  54% { transform: translateY(1px); }
}

@media (max-width: 900px) {
  .find {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }

  .crowd {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .face,
  .is-visible .face-0,
  .is-visible .face-1,
  .is-visible .face-0 .eyes,
  .is-visible .face-1 .eyes {
    animation: none;
  }
}
