:root {
  --Linear-gradient: hsl(249, 99%, 64%), hsl(278, 94%, 30%);
  --Blue-gradient: hsl(249, 99%, 64%);
  --Violet-gradient: hsl(278, 94%, 30%);
  --Red: hsl(0, 100%, 66%);
  --Light-grayish-violet: hsl(270, 3%, 87%);
  --Dark-grayish-violet: hsl(279, 6%, 55%);
  --Very-dark-violet: hsl(278, 68%, 11%);
}
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}
body {
  font-size: 18px;
  font-family: "Space Grotesk", serif;
}

main {
  display: flex;
  position: relative;
  min-height: 100vh;
  align-items: center;
}
main::before {
  content: '';
  background-image: url(./images/bg-main-desktop.png);
  background-size: cover;
  background-position-x: center;
  position: absolute;
  width: 30%;
  height: 100%;
  z-index: -1;
}

.cards {
  width: 50vw;
}
.cards .bg-front, .cards .bg-back {
  width: 28rem;
  height: 15rem;
  color: white;
  border-radius: 10px;
  background-repeat: no-repeat;
  background-size: 100% 100%;  
  padding: 30px;
  position: relative;
}
.cards .bg-front {
  background-image: url(./images/bg-card-front.png);
  margin: 0 auto 32px;
}
.cards .bg-front .cardNum {
  font-size: 30px;
  letter-spacing: 2px;
  padding: 45px 0 25px;
  font-weight: 500;
}
.cards .bg-front .info {
  display: flex;
  justify-content: space-between;
}
.cards .bg-back {
  background-image: url(./images/bg-card-back.png);
  margin: 0 2rem 0 auto;
}
.cards .bg-back span {
  position: absolute;
  right: 50px;
  top: 107px;
}

.detail {
  margin-left: 5rem;
}
.detail article {
  width: 25rem;
}
.detail .form label input {
  width: 100%;
  padding: 10px 15px;
  font-size: 18px;
  border-radius: 8px;
  border: 2px solid var(--Light-grayish-violet);
  margin-bottom: 25px;
  margin-top: 5px;
}
.detail .form label.error input {
  border-color: var(--Red);
}
.detail .form label input:focus {
  outline: none;
}
.detail .form label input:hover,
.detail .form label input:focus {
  background-image: linear-gradient(white, white), linear-gradient(to right, var(--Linear-gradient));
  border: 2px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.detail .form label .errorMsg {
  color: var(--Red);
  display: none;
  margin: -25px 0 10px;
}
.detail .form label.error .errorMsg {
  display: block;
}
.detail article button {
  width: 100%;
  background-color: var(--Very-dark-violet);
  color: white;
  padding: 13px 15px;
  font-size: 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: .3s;
}
.detail article button:hover {
  background-color: hsl(278deg 61.11% 18.66% / 90%);
}
.detail .form .dateCvc {
  display: flex;
  gap: 20px;
}
.detail .form .dateCvc label {
  flex: 1;
}
.detail .form .dateCvc .inputs {
  display: flex;
  gap: 10px;
}

.detail .complet {
  display: none;
  text-align: center;
}
.detail .complet h2 {
  color: var(--Very-dark-violet);
  margin-top: 20px;
  text-transform: uppercase;
  font-size: 25px;
  letter-spacing: 2px;
}
.detail .complet p {
  color: var(--Dark-grayish-violet);
  margin: 10px 0 30px;
}

footer {
  font-size: 12px;
  position: absolute;
  right: 20px;
  bottom: 10px;
  opacity: .8;
}
footer a {
  color: var(--Red);
  text-decoration: none;
}

@media (max-width: 1000px) {
  .cards .bg-front, .cards .bg-back {
    margin-left: 1.5rem;
  }
  .detail {
    margin-left: 3rem;
  }
}
@media (max-width: 920px) {
  .cards {
    width: 46vw;
  }
  .cards .bg-front, .cards .bg-back {
    width: 25rem;
  }
  .cards .bg-front .cardNum {
    font-size: 26px;
  }
}
@media (max-width: 840px) {
  main {
    flex-direction: column;
  }
  main::before {
    background-image: url(./images/bg-main-mobile.png);
    width: 100%;
    height: 40%;
  }
  .cards {
    width: fit-content;
  }
  .cards .bg-front {
    z-index: 5;
    top: 10.5rem;
    right: 2.5rem;
    width: 28rem;
    margin: 0;
  }
  .cards .bg-back {
    top: -13rem;
    right: -2.5rem;
    width: 28rem;
    margin: 0;
  }
  .detail {
    margin: -1.3rem 3rem 3rem;
  }
}
@media (max-width: 600px) {
  .cards .bg-front {
    top: 8.8rem;
    transform: scale(.8);
  }
  .cards .bg-back {
    transform: scale(.8);
  }
  .detail {
    margin: -4.5rem 3rem 3rem;
  }
}


