html {
  background-color: black;
}

body {
  background-image: url("../img/home-min-blurred.webp");
}

.backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  object-fit: contain;
  z-index: -1;
  /* backdrop-filter: grayscale(50%) blur(20px) brightness(20%); */
}

main {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 2rem;
  padding-top: 4vh;
  padding-bottom: 2rem;

  h1 {
    font-size: 2.5rem;
    font-weight: 500;
    text-align: center;
    animation-duration: 2s;
    animation-name: fadeInLeft;
    animation-timing-function: ease;

    @starting-style {
      opacity: 0;
      transform: translateX(-50%);
    }


  }

  place-items: center;

  @media (min-width: 700px) {
    h1 {
      font-size: 3.5rem;
    }

    padding-top: 6vh;
  }
}


.songs-list {
  position: relative;
  width: 100%;

  .song-controls {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5%;
    right: 5%;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: center;

    @media (min-width: 1000px) {
      left: 20%;
      right: 20%;
    }

    button {
      all: unset;
      pointer-events: all;
      background: rgba(88, 88, 88, 0.15);
      border-radius: 4px;
      font-size: 2rem;
      font-weight: bold;
      padding: 1rem;
      transition: all 0.2s;

      &:hover {
        transform: translateY(-2px);
        background: rgba(120, 120, 120, 0.3)
      }

      &:active {
        transform: translateY(4px);
      }
    }
  }
}

.song-select {
  position: relative;
  user-select: none;
  overflow: hidden;
  width: 100vw;
  margin-top: 1.5rem;
  mask: linear-gradient(to right, transparent 20vw, black 40vw, black 60vw, transparent 80vw);

  @media(max-width: 1200px) {
    mask: linear-gradient(to right, transparent 5vw, black 20vw, black 80vw, transparent 95vw);
  }



  ul {
    overflow: visible;
    display: flex;
    align-items: center;
    list-style-type: none;
    gap: 10vw;
    padding-inline: 50vw;
    scroll-snap-type: x mandatory;
    width: max-content;
    font-size: clamp(3vw, 4rem, 8vw);

    opacity: 0;
    animation: fadeIn 0.5s ease 0.5s forwards;

    @starting-style {
      opacity: 0;
    }


    li {
      cursor: pointer;
      transition: scale 0.5s, opacity 0.5s;
      scroll-snap-align: center;
      text-wrap: nowrap;

      &:not(.focused) {
        scale: 0.4;
        opacity: 0;
      }
    }
  }
}

@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50%);
  }

  25% {
    opacity: 0;
    transform: translateX(-50%);
  }

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

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}


@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes cassetteIntro {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cassette-wrapper {
  width: 89%;
  max-width: 500px;
  margin-bottom: -80px;

  @media (min-width: 800px) {
    margin-bottom: -80px;
  }
}

.cassette {
  user-select: none;
  position: relative;
  width: 100%;
  container-type: inline-size;

  img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
  }

  .circle-left {
    position: absolute;
    top: 35.5%;
    left: 22%;
    filter: brightness(0.7);
    width: 15%;
    height: auto;
  }

  .circle-right {
    position: absolute;
    top: 35.5%;
    left: 64%;
    filter: brightness(0.7);
    width: 15%;
    height: auto;
  }

  .title {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 11%;
    left: 0;
    right: 0;
    color: #003273;
    font-weight: bold;
    font-size: 4.5cqi;
    line-height: 1.4;
    font-family: 'Shadows Into Light', Courier, monospace;
    mix-blend-mode: multiply;
    opacity: 0.7;
  }

  &[data-playing="false"] {
    .spin {
      animation-play-state: paused;
    }
  }

  &[data-active="false"] {
    display: none;
  }
}

.spin {
  animation: spin infinite 3s linear;
}

h1.hero-title {
  display: none;
  color: white;
  font-size: 3.5rem;
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.credits {
  min-height: 32px;
  display: flex;
  flex-direction: column;
  z-index: 10;

  a:link,
  a:visited {
    color: cadetblue;
  }

  a:hover,
  a:active {
    color: khaki;
  }
}