@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@500;700;900&display=swap");

:root {
  /* Primary */
  --Pale-blue: hsl(225, 100%, 94%);
  --Bright-blue: hsl(245, 75%, 52%);

  /* Neutral */
  --Very-pale-blue: hsl(225, 100%, 98%);
  --Desaturated-blue: hsl(224, 23%, 55%);
  --Dark-blue: hsl(223, 47%, 23%);
}

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

html {
  font-size: 62.5%;
}

body {
  font-family: "Red Hat Display", sans-serif;
  background-image: url(images/pattern-background-desktop.svg);
  background-repeat: no-repeat;
  background-size: 100% 40rem;
  background-color: var(--Pale-blue);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.card {
  width: min(80%, 30rem);
  /* margin: 10rem auto 10rem; */
  border-radius: 10px;
  background-color: #fff;
  border-radius: 10px;
}
.hero {
  margin: 0 0 2rem;
}

.hero img {
  display: block;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  width: 100%;
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* card body - main area */

.card-body .main {
  width: 25rem;
  text-align: center;
}

.main-title {
  padding: 0 0 1.2rem;
  font-size: 1.8rem;
  font-weight: 900;
}

.main-text {
  color: var(--Desaturated-blue);
  padding: 0 0 2rem;
  letter-spacing: 0.05rem;
  line-height: 1.5;
}

/* card body - sub area  */

.card-body .sub {
  background-color: var(--Very-pale-blue);
  width: 80%;
  height: 6rem;
  border-radius: 10px;
  margin: 0 2rem 2rem;
  position: relative;
}

.plan {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: 2rem 2rem;
  column-gap: 1rem;
  justify-content: center;
  padding: 1rem;
}

.icon {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  align-self: center;
}

.icon img {
  display: block;
  width: 3.2rem;
  height: 3.2rem;
}

.plan-text {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  align-self: center;
}

.plan-text p:first-child {
  font-weight: 700;
}

.plan-text p:last-child {
  color: #888;
}

.change {
  grid-column: 3 / 4;
  grid-row: 1 / 3;
  align-self: center;
}

.change-link:active {
  cursor: pointer;
  color: var(--Desaturated-blue);
}

/* Card Footer */

.card-footer {
  display: flex;
  flex-direction: column;
}

.payment {
  cursor: pointer;
  width: 24rem;
  margin: 0 auto 2rem;
  padding: 0.7rem;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background-color: var(--Bright-blue);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04rem;
  font-family: inherit;
  box-shadow: 0 1rem 2rem rgba(51, 37, 211, 0.2);
}

.payment:active {
  background-color: rgba(56, 41, 224, 0.643);
}

.cancel {
  cursor: pointer;
  border: 0;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02rem;
  color: var(--Desaturated-blue);
  background-color: transparent;
  margin-bottom: 3rem;
}

.cancel:active {
  color: #000;
}

@media screen and (max-width: 700px) {
  .card {
    width: min(75%, 28rem);
  }
  .hero {
    margin: 0 0 1.85rem;
  }
  .main-title {
    font-size: 1.75rem;
    padding: 0 0 1.05rem;
  }

  .main-text {
    font-size: 0.95rem;
    line-height: 1.4;
    letter-spacing: 0.07rem;
  }

  .card-body .sub {
    width: 76%;
  }
  .payment {
    width: 22rem;
  }
}

@media screen and (max-width: 375px) {
  .card {
    width: min(70%, 26rem);
  }
  .hero {
    margin: 0 0 1.6rem;
  }
  .card-body .main {
    width: 20rem;
  }
  .main-title {
    font-size: 1.6rem;
    padding: 0 0 1rem;
  }
  .main-text {
    font-size: 0.9rem;
    line-height: 1.3;
    letter-spacing: 0.08rem;
  }
  .plan {
    padding-right: 2rem;
    column-gap: 0.7rem;
  }
  .card-body .sub {
    width: 73%;
  }
  .payment {
    width: 20rem;
  }
}
