* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #000;
  color: #fff;
  font-size: 16px;
  overflow: hidden;
}

header {
  position: fixed;
  width: 80vw;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 600px;
  gap: 100px;
  z-index: 2;

  & img {
    width: 250px;
  }

  & nav {
    & ul {
      display: grid;
      grid-template-columns: repeat(3, 200px);
    }
  }
}

section {
  background-image: radial-gradient(#470964, #791fd3);
  height: 100vh;
  position: relative;
  overflow: hidden;

  & .list {
    width: 70vw;
    height: 100%;
    margin: auto;
    position: relative;

    & .item {
      position: absolute;
      inset: 0;

      display: grid;
      grid-template-columns: 55% 45%;
      align-items: center;
      padding: 0 60px;
      will-change: transform, opacity;

      & .car-img {
        position: relative;
        max-width: 650px;
        justify-self: center;
        width: 100%;
        z-index: 1;

        & img {
          width: 100%;
          transform: rotate(-18deg);
          display: block;
          pointer-events: none;
        }

        &::before {
          content: "";
          position: absolute;
          background-color: #000;
          width: 100%;
          height: 100px;
          top: 150%;
          left: 50px;
          border-radius: 50%;
          filter: blur(50px);
        }
      }

      & .content {
        width: 100%;
        max-width: 480px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        text-align: left;
        padding-left: 30px;
        margin-top: 30px;

        & .car-information {
          font-weight: bold;
        }

        & h2 {
          font-size: 5em;
          line-height: 1em;
          font-family: "League Gothic", sans-serif;
        }

        & .description {
          color: #d4d4d4ff;
          font-size: 0.9rem;
          line-height: 1.4;
          max-width: 380px;
          margin-top: 10px;
        }

        & .information {
          padding: 8px 25px; 
          max-width: 200px; 
          margin: 0 auto; 
          display: block; 
          text-align: center; 
          border-radius: 30px;
          font-size: 0.9rem;
          border: 2px solid #791fd3;
          background-color: #beff1b;
          color: #000;
          cursor: pointer;
          font-weight: bold;
          font-family: "League Gothic", sans-serif;
          transition: 0.3s;
        }

        & .information:hover {
          background-color: #fff;
          color: #000;
          transform: scale(1.5);
          border-color: #beff1b;
        }
      }
    }

    &::before {
      content: "";
      position: absolute;
      height: 200px;
      width: 100%;
      top: 50%;
      border-top: 1px solid #fff;
    }
  }

  .arrows {
    width: 70vw;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: space-between;

    & button:nth-child(1) {
      & img {
        transform: scale(-1);
      }
    }

    & button {
      width: 35px;
      height: 35px;
      border-radius: 50%;
      border: none;
      cursor: pointer;
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: 0.3s;

      & img {
        width: 20px;
        margin-top: 2px;
        cursor: pointer;
      }

      &:hover {
        background-color: #beff1b;
      }
    }
  }

  .indicators {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    height: 200px;
    width: 90vw;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 15px;

    & .number {
      font-size: 5em;
      font-family: "League Gothic", sans-serif;
    }

    & ul {
      display: flex;
      gap: 10px;

      & li {
        width: 50px;
        height: 5px;
        background-color: #beff1b;
        border-radius: 5px;
        transition: 0.5s;
      }

      & .active {
        background-color: #fff;
      }
    }
  }
}

section {
  & .list {
    --calculation: 1;
    & .item {
      transform: translateX(calc(100vw * var(--calculation)));
      transition: 0.5s;
      opacity: 0;

      & .car-img {
        & img {
          transform: rotate(0);
          transition: 0.5s;
          transition-delay: 0.3s;
        }
      }

      & .content {
        & .car-information,
        h2,
        .description,
        .information {
          transform: translateX(calc(200px * var(--calculation)));
          transition: 0.7s;
          transition-delay: 0.3s;
          opacity: 0;
        }

        & h2 {
          transition-delay: 0.5s;
        }

        & .description {
          transition-delay: 0.7s;
        }

        & .information {
          transition-delay: 0.9s;
        }
      }
    }

    & .active {
      transform: translateX(0);
      transition: 0.5s;
      opacity: 1;

      & .car-img {
        & img {
          transform: rotate(-20deg);
        }
      }

      & .content {
        & .car-information,
        h2,
        .description,
        .information {
          transform: translateX(0);
          opacity: 1;
        }
      }
    }
  }
}
