:root {
  --bg: #050505;
  --slate: #3a3a3e;
  --charcoal: #1c1c1f;
  --mist: #6a6a72;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Atmosphere ---- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.blob-a {
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  top: -15%;
  left: -10%;
  background: radial-gradient(
    circle,
    rgba(90, 90, 98, 0.45) 0%,
    rgba(40, 40, 44, 0.2) 50%,
    transparent 70%
  );
  animation: drift-a 18s ease-in-out infinite;
}

.blob-b {
  width: min(80vw, 860px);
  height: min(80vw, 860px);
  bottom: -25%;
  right: -15%;
  background: radial-gradient(
    circle,
    rgba(70, 70, 78, 0.4) 0%,
    rgba(28, 28, 32, 0.25) 45%,
    transparent 70%
  );
  animation: drift-b 22s ease-in-out infinite;
}

.blob-c {
  width: min(55vw, 560px);
  height: min(55vw, 560px);
  top: 35%;
  left: 40%;
  background: radial-gradient(
    circle,
    rgba(110, 110, 120, 0.22) 0%,
    rgba(50, 50, 56, 0.12) 40%,
    transparent 70%
  );
  animation: drift-c 16s ease-in-out infinite;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
  animation: grain-shift 8s steps(8) infinite;
}

@keyframes drift-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(12%, 18%) scale(1.08);
  }
  66% {
    transform: translate(-8%, 10%) scale(0.94);
  }
}

@keyframes drift-b {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(-16%, -12%) scale(1.1);
  }
  70% {
    transform: translate(8%, -20%) scale(0.92);
  }
}

@keyframes drift-c {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-18%, 14%) scale(1.15);
  }
}

@keyframes grain-shift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-2%, 1%);
  }
  50% {
    transform: translate(1%, -2%);
  }
  75% {
    transform: translate(-1%, -1%);
  }
}

/* ---- Brand ---- */

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 2rem;
}

.logo {
  width: min(42vw, 280px);
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  animation: rise-in 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob-a,
  .blob-b,
  .blob-c,
  .grain,
  .logo {
    animation: none;
  }

  .logo {
    opacity: 1;
    transform: none;
  }
}
