@font-face {
  font-family: "Raleway";
  src: url("fonts/Raleway-ExtraLight.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("fonts/Raleway-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-brand: #4a90e2;
  --color-brand-light: #dbe9fa;
  --color-grey: #999;
  --color-black: #000;
  --color-red: #f00;
  --circle-size: 1.05rem;
  --circle-margin: 0.32rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Raleway", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(
      ellipse at center top,
      #fdfdfd 0%,
      #fdfdfd 10%,
      #dcdcdc 100%
    )
    fixed;
}

a {
  color: var(--color-grey);
  text-decoration: none;
  transition: color 150ms ease;
}

a:link,
a:visited {
  color: var(--color-grey);
}

a:hover {
  color: var(--color-black);
}

a:active {
  color: var(--color-red);
}

a:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
}

.layout-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.full-height {
  height: 100%;
}

.flex-row {
  display: flex;
}

.circle {
  position: relative;
  flex: 0 0 auto;
  width: var(--circle-size);
  height: var(--circle-size);
  margin: var(--circle-margin);
  animation: dot-formation 550ms cubic-bezier(.2, .85, .25, 1.15) both;
  animation-delay: var(--formation-delay, 0ms);
  will-change: transform, opacity;
}

.circle-center {
  margin-inline: auto;
}

.rounded {
  border-radius: 50%;
}

.text-brand {
  color: var(--color-brand);
}

.text-kerned {
  letter-spacing: 0.1rem;
}

.bg-brand {
  background-color: var(--color-brand);
}

.bg-brand-light {
  background-color: var(--color-brand-light);
}

.text-grey {
  color: var(--color-grey);
}

.circle::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  background-color: inherit;
  opacity: 0;
  transform: scale(1);
}

.bg-brand::after {
  animation: dot-soft-wave 8s cubic-bezier(.4, 0, .2, 1) infinite;
  animation-delay: var(--wave-delay, 1900ms);
  box-shadow: 0 0 0 rgba(74, 144, 226, 0);
  will-change: transform, opacity, box-shadow;
}

aside > .flex-row:nth-child(1) .circle:nth-child(1) { --formation-delay: 0ms; }
aside > .flex-row:nth-child(2) .circle:nth-child(1) { --formation-delay: 35ms; }
aside > .flex-row:nth-child(2) .circle:nth-child(2) { --formation-delay: 70ms; }
aside > .flex-row:nth-child(2) .circle:nth-child(3) { --formation-delay: 105ms; }
aside > .flex-row:nth-child(2) .circle:nth-child(4) { --formation-delay: 140ms; }
aside > .flex-row:nth-child(2) .circle:nth-child(5) { --formation-delay: 175ms; }
aside > .flex-row:nth-child(3) .circle:nth-child(1) { --formation-delay: 210ms; }
aside > .flex-row:nth-child(3) .circle:nth-child(2) { --formation-delay: 245ms; }
aside > .flex-row:nth-child(3) .circle:nth-child(3) { --formation-delay: 280ms; }
aside > .flex-row:nth-child(3) .circle:nth-child(4) { --formation-delay: 315ms; }
aside > .flex-row:nth-child(3) .circle:nth-child(5) { --formation-delay: 350ms; }
aside > .flex-row:nth-child(4) .circle:nth-child(1) { --formation-delay: 385ms; }
aside > .flex-row:nth-child(4) .circle:nth-child(2) { --formation-delay: 420ms; }
aside > .flex-row:nth-child(4) .circle:nth-child(3) { --formation-delay: 455ms; }
aside > .flex-row:nth-child(4) .circle:nth-child(4) { --formation-delay: 490ms; }
aside > .flex-row:nth-child(4) .circle:nth-child(5) { --formation-delay: 525ms; }
aside > .flex-row:nth-child(5) .circle:nth-child(1) { --formation-delay: 560ms; }
aside > .flex-row:nth-child(5) .circle:nth-child(2) { --formation-delay: 595ms; }
aside > .flex-row:nth-child(5) .circle:nth-child(3) { --formation-delay: 630ms; }
aside > .flex-row:nth-child(5) .circle:nth-child(4) { --formation-delay: 665ms; }
aside > .flex-row:nth-child(5) .circle:nth-child(5) { --formation-delay: 700ms; }
aside > .flex-row:nth-child(6) .circle:nth-child(1) { --formation-delay: 735ms; }
aside > .flex-row:nth-child(5) .bg-brand:nth-child(1) { --wave-delay: 1900ms; }
aside > .flex-row:nth-child(4) .bg-brand:nth-child(1) { --wave-delay: 2015ms; }
aside > .flex-row:nth-child(3) .bg-brand:nth-child(1) { --wave-delay: 2130ms; }
aside > .flex-row:nth-child(2) .bg-brand:nth-child(1) { --wave-delay: 2245ms; }
aside > .flex-row:nth-child(3) .bg-brand:nth-child(2) { --wave-delay: 2360ms; }
aside > .flex-row:nth-child(4) .bg-brand:nth-child(3) { --wave-delay: 2475ms; }
aside > .flex-row:nth-child(3) .bg-brand:nth-child(4) { --wave-delay: 2590ms; }
aside > .flex-row:nth-child(2) .bg-brand:nth-child(5) { --wave-delay: 2705ms; }
aside > .flex-row:nth-child(3) .bg-brand:nth-child(5) { --wave-delay: 2820ms; }
aside > .flex-row:nth-child(4) .bg-brand:nth-child(5) { --wave-delay: 2935ms; }
aside > .flex-row:nth-child(5) .bg-brand:nth-child(5) { --wave-delay: 3050ms; }
@keyframes dot-formation {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(.35);
  }

  65% {
    opacity: 1;
    transform: translateY(-1px) scale(1.14);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dot-soft-wave {
  0%,
  3.5%,
  100% {
    opacity: 0;
    transform: scale(1);
    box-shadow: 0 0 0 rgba(74, 144, 226, 0);
  }

  1.75% {
    opacity: 1;
    transform: scale(1.55);
    box-shadow:
      0 0 0 .22rem rgba(74, 144, 226, .08),
      0 0 1rem rgba(74, 144, 226, .55);
  }
}

@media (prefers-reduced-motion: reduce) {
  .circle,
  .bg-brand::after {
    animation: none;
  }
}
