@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  font-family: "Barlow Semi Condensed", serif;
  font-size: 13px;
  box-sizing: border-box;
}

html {
  background: hsl(210, 46%, 95%);
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 30px;
  width: 100%;
  margin: 0 11rem;
}

.card {
  margin: 0 auto;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  border-radius: 10px;
}

.card-content {
  margin: 1.5rem 2rem;
}

.user {
  margin-bottom: 16px;
}

.user figure {
  display: flex;
  justify-content: start;
  gap: 12px;
  align-items: center;
}
.user figcaption {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.user img {
  width: 35px;
  border-radius: 50%;
}

.card-five .user img {
  border: 2px solid hsl(263, 55%, 52%);
}

.card-one .user img,
.card-two .user img,
.card-three .user img,
.card-four .user img {
  border: 2px solid hsla(0, 0%, 81%, 0.5);
}

.card-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  gap: 16px;
}

.card-text p,
.user figcaption {
  font-size: 1.3rem;
}

.card-text h2 {
  font-size: 1.6rem;
}

.card-text p {
  font-size: 1rem;
  padding-right: 2.8rem;
}

.card-one {
  grid-area: 1 / 1 / 2 / 3;
  background-color: hsl(263, 55%, 52%);
  background-image: url("./images/bg-pattern-quotation.svg");
  background-repeat: no-repeat;
  background-position: 75% top;
}
.card-two {
  grid-area: 1 / 3 / 2 / 4;
  background: hsl(217, 19%, 35%);
}
.card-three {
  grid-area: 1 / 4 / 3 / 4;
  background: hsl(0, 0%, 100%);
}
.card-four {
  grid-area: 2 / 1 / 3 / 2;
  background: hsl(0, 0%, 100%);
}
.card-five {
  grid-area: 2 / 2 / 3 / 4;
  background: hsl(219, 29%, 14%);
}

/* light text cards */
.card-one .author-name,
.card-two .author-name,
.card-five .author-name {
  color: hsl(0, 0%, 81%);
  font-weight: 500;
}
.card-one span,
.card-two span,
.card-five span {
  color: hsl(0, 0%, 81%);
}
.card-one h2,
.card-two h2,
.card-five h2 {
  color: hsl(0, 0%, 81%);
  font-weight: 600;
}
.card-one .card-text p,
.card-two .card-text p,
.card-five .card-text p {
  color: hsl(0, 0%, 81%);
  opacity: 70%;
}
.card-one .user span,
.card-two .user span,
.card-five .user span {
  color: hsl(0, 0%, 81%);
  opacity: 50%;
}

/* dark text cards */
.card-three .author-name,
.card-four .author-name {
  color: hsl(217, 19%, 35%);
  font-weight: 500;
}
.card-three span,
.card-four span {
  color: hsl(217, 19%, 35%);
}
.card-three h2,
.card-four h2 {
  color: hsl(217, 19%, 35%);
  font-weight: 600;
}
.card-three .card-text p,
.card-four .card-text p {
  color: hsl(217, 19%, 35%);
  opacity: 70%;
}
.card-three .user span,
.card-four .user span {
  color: hsl(217, 19%, 35%);
  opacity: 50%;
}

.attribution {
  font-size: .8rem;
  text-align: center;
  padding: 10px 0;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

@media screen and (max-width: 820px) { /* ipad portrait */
  .container {
    height: auto;
  }

  .grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    margin: 4rem;
  }

  .card-one {
    grid-area: 1/1/2/2;
  }

  .card-two {
    grid-area: 2/1/3/2;
  }

  .card-three {
    grid-area: 3/1/4/2;
  }

  .card-four {
    grid-area: 4/1/5/2;
  }

  .card-five {
    grid-area: 5/1/6/2;
  }

  .card-text p {
    font-size: 1rem;
    padding-right: 1.5rem;
  }
}
