:root {
  --shadow: 0rem 2rem 4rem rgba(0, 0, 0, 0.262);
  --text-gap: 0.8rem;
  --outline: #0000002f;
}

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

html {
  scroll-behavior: smooth;
  font-size: 62.5%;
}

body {
  overflow: hidden;
  position: relative;
  font-size: 2.4rem;
  font-family: sans-serif;
  display: flex;
  /* align-items: center; */
  justify-content: center;
  z-index: 0;
}

html,
body {
  background-color: rgba(242, 242, 242, 1);
}

body.welcome {
  height: 120dvh;
  background: #8c8f77;
  background: linear-gradient(
    to top,
    rgba(140, 143, 119, 1) 0%,
    rgba(242, 242, 242, 1) 100%
  );
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  align-items: center;
  max-width: 40rem;
  gap: 2rem;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  margin-top: 8rem;
  /* padding-bottom: 8rem; */
  z-index: 2;
}
.backg::after {
  content: "";
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  left: 0px;
  opacity: 1;
  background: url("backg.svg") repeat left;
  background-size: 240rem;
  filter: blur(4px);
  z-index: 1;
  pointer-events: none; /* prevents blocking clicks */

  /* Animation */
  animation: slowZoom 60s ease-out forwards;
  transform: scale(1);
}

@keyframes slowZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(2); /* adjust zoom amount */
  }
}

.logo-box {
  outline: solid 1px var(--outline);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 0.8rem;
  background-color: white;
  aspect-ratio: 2 / 1;

  z-index: inherit;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
}

.logo-box:hover {
  /* background-color: black; */

  transform: translateY(-0.8rem);
}

/* .logo-box:hover .logo {
  color: white;
} */

.logo {
  color: black;
  height: 80%;
  width: 80%;
}

.text-container.welcome {
  outline: solid 1px var(--outline);
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: var(--text-gap);
  font-size: 2rem;
  background-color: white;
  border-radius: 0.8rem;
  padding: 10%;
  z-index: inherit;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
}

.text-container.sharing {
  outline: solid 1px var(--outline);
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: var(--text-gap);
  background-color: white;
  border-radius: 0.8rem;
  padding: 10%;
  z-index: inherit;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
}

.text-container:hover {
  transform: translateY(-0.8rem);
}

.btn {
  outline: solid 1px var(--outline);
  font-weight: bold;
  text-align: center;
  background-color: white;
  border-radius: 0.8rem;
  padding: 2rem;
  z-index: inherit;
  box-shadow: var(--shadow);
  width: 100%;
  transition: all 0.4s ease;
}

.btn:hover {
  background-color: black;
  color: #edff84;
  transform: translateY(-0.8rem);
}

body.grain {
  isolation: isolate; /* critical for blend-mode sanity */
}

body.grain::after {
  content: "";
  position: fixed;
  inset: -120%;
  pointer-events: none;
  z-index: 9999;

  background-image: url("/noise-bk.png");
  background-repeat: repeat;
  background-size: 120px 120px;

  opacity: 0.5;
  mix-blend-mode: soft-light;

  animation: grain 8s steps(10) infinite;
  will-change: transform;
}

@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-5%, -10%);
  }
  20% {
    transform: translate(-15%, 5%);
  }
  30% {
    transform: translate(5%, -25%);
  }
  40% {
    transform: translate(-5%, 25%);
  }
  50% {
    transform: translate(-15%, 10%);
  }
  60% {
    transform: translate(15%, 0%);
  }
  70% {
    transform: translate(0%, 15%);
  }
  80% {
    transform: translate(5%, 35%);
  }
  90% {
    transform: translate(-10%, 10%);
  }
}

@media (max-width: 80em) {
  .backg::after {
    left: -200px;
  }
}

@media (max-width: 42em) {
  html {
    font-size: 50%;
  }

  .backg::after {
    left: -200px;
  }

  @keyframes slowZoom {
    from {
      transform: scale(1.5);
    }
    to {
      transform: scale(2); /* adjust zoom amount */
    }
  }
}
