:root {
  --dark-magenta: hsl(300, 43%, 22%);
  --soft-pink: hsl(333, 80%, 67%);

  --dark-grayish-magenta: hsl(303, 10%, 53%);
  --light-grayish-magenta: hsl(300, 24%, 96%);
  --white: hsl(0, 0%, 100%);
}

/* @import url('https://fonts.googleapis.com/css2?family=Spartan:wght@400;500;700&display=swap'); */

body {
  font-family: 'Spartan', sans-serif;
  margin: 0;
  background-image:  url(images/bg-pattern-top-mobile.svg);
  background-repeat: no-repeat;
}

main {
  margin: 80px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}


/* INTRO SECTION */

h1 {
  margin: auto;
  color: var(--dark-magenta);
  font-weight: 700;
  font-size: 2em;
  letter-spacing: -0.05em;
  line-height: 99%;
  max-width: 10ch;
}

.intro p {
  margin: 25px auto;
  color: var(--dark-grayish-magenta);
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 160%;
  max-width: 26ch;
}


/*  RATING CARDS  */

.ratings {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rating-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--light-grayish-magenta);
  margin: 15px 0;
  padding: 10px 0;
  border-radius: 5px;
  min-width: 350px;
  max-width: 350px;
}

.stars img{
  margin: 3px;
}
.rating-card h2 {
  color: var(--dark-magenta);
  font-size: 0.85em;
  font-weight: 700;
  margin: 5px 10px;
}


/*  REVIEW CARDS  */

.reviews {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.review-card {
  background-color: var(--dark-magenta);
  border-radius: 5px;
  padding: 30px;
  margin: 15px 0;
  text-align: start;
  max-width: 300px;
}

.review-header {
  margin: 10px 0;
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: repeat(2, 20px);
  column-gap: 20px;
  align-items: center;
}

.review-header img {
  grid-column: 1 / 2;
  grid-row: 1 / 3;

  transform: scale(0.5);
  border-radius: 50%;
  justify-self: center;
}

.review-header h2 {
  color: var(--white);
  font-weight: 700;
  font-size: 0.8em;
  margin: 0;
}

.review-header h3 {
  color: var(--soft-pink);
  font-weight: 400;
  font-size: 0.7em;
  margin: 0;
}

.review-card p {
  color: var(--white);
  font-size: 0.8em;
  line-height: 180%;
  padding-right: 10px;
  margin-top: 25px;
}

.attribution {
  font-size: 11px;
  text-align: center;
  font-weight: 500;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}



@media screen and (min-width: 1200px) {

  body {
    background-image:url(images/bg-pattern-top-desktop.svg), url(images/bg-pattern-bottom-desktop.svg);
    background-position: bottom 60vh right 50vw, top 20vh left 20vw;
  background-repeat: no-repeat;
  }

  main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    row-gap: 50px;
    align-content: center;
    justify-content: center;
    margin: 80px 50px;
  }

  /*   INTRO SECTION   */

  .intro {
    text-align: start;
  }

  .intro h1 {
    margin: 10px;
    font-size: 2.8em;
  }

  .intro p {
    margin: 20px 10px;
    max-width: 35ch;
  }


  /*   RATINGS SECTION   */

  .rating-card {
    flex-direction: row;
    min-width: 450px;
    padding: 15px 0;
    margin: 10px 0;
  }

  .stars {
    margin: 0 20px;
  }

  .rating-card:nth-child(1) {
    align-self: flex-start;
  }

  .rating-card:nth-child(2) {
    align-self: center;
  }

  .rating-card:nth-child(3) {
    align-self: flex-end;
  }


  /*   REVIEWS SECTION   */

  .reviews {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-height: 270px;
  }

  .review-card {
    margin: 0 10px;
  }
  .review-card:nth-child(1) {
    align-self: flex-start;
  }

  .review-card:nth-child(2) {
    align-self: center;
  }

  .review-card:nth-child(3) {
    align-self: flex-end;
  }
}


@media screen and (min-width:1400px) {
  main {
    margin: 95px 150px;
  }
}