@import url("https://fonts.googleapis.com/css2?family=Rubik+Mono+One&display=swap");

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  display: grid;
  place-items: center;
  place-content: center;
  grid-template-areas: "body";
  background: #27052d;
  color: white;
  overflow: hidden;
}

body::before {
  --size: 150vmax;
  --bg-size: 50%;

  content: "";
  grid-area: body;
  width: var(--size);
  height: var(--size);
  opacity: var(--pattern-opacity, 1);
  background-color: blue;

  /* Pattern from https://heropatterns.com/ */
  background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='hotpink' %3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

  background-size: var(--bg-size);
  background-repeat: repeat;
  animation: var(--pattern-animation, pattern 20s linear infinite);
}

h1 {
  grid-area: body;
  position: relative;
  display: flex;
  align-items: center;
  font-family: "Outfit", sans-serif;
  font-size: calc(1rem + 15vmin);
  line-height: 0.9;
  text-transform: uppercase;
  mix-blend-mode: difference;
}

h1 span {
  display: block;
}

button {
  display: none;
  cursor: pointer;
  position: fixed;
  bottom: 5vh;
  left: 0;
  right: 0;
  width: fit-content;
  margin-inline: auto;
  padding: 0.75rem 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: blue;
  background: white;
  border: 1px solid transparent;
  border-radius: 360px;
  box-shadow: 0 6px 6px -3px hsla(0 0% 0% / 0.1);
}

@keyframes pattern {
  to {
    background-position: calc(var(--size) * -1) calc(var(--size) * -1);
  }
}

/* JS available and motion OK */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  body {
    --pattern-opacity: 0;
  }

  h1 {
    opacity: 0;
  }
}

/* JS disabled or reduced motion enabled */
@media (scripting: none), (prefers-reduced-motion) {
  h1 {
    display: flex;
    flex-direction: column;
  }

  .hash {
    display: none;
  }
}

@media (prefers-reduced-motion) {
  body {
    --pattern-animation: none;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 10vmin; /* Adjust font size based on viewport size */
  }

  .word {
    transform: translateX(0%); /* Ensure text is centered */
    text-align: center; /* Center align text */
  }
}
