:root {
    font-size: 15px;
}

body {
    font-family: 'League Spartan', sans-serif;
    min-height: calc(100vh - 2rem);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1rem;
    gap: 2rem;
    position: relative;
    padding-bottom: calc(115px - 1rem);
}

.bg-pattern-top-desktop {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    max-width: 100%;
}

.bg-pattern-bottom-desktop {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 0;
}

.bg-pattern-top-mobile {
    display: none;
}

.bg-pattern-bottom-mobile {
    display: none;
}

main {
    z-index: 2;
    position: relative;
    max-width: 1110px;
    gap: 5rem;
    display: flex;
    flex-direction: column;
    margin-top: calc(115px - 1rem);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    max-width: 400px;
    line-height: 3.25rem;
}

p {
    line-height: 1.5rem;
    font-size: 1.2rem;
    color: hsl(303, 10%, 53%);
    font-weight: 500;
}

.rating-row:nth-of-type(1) {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.rating-row:nth-of-type(2) {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.buyer-review-item {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background-color: hsl(300, 43%, 22%);
    border-radius: .5rem;
    gap: 2rem;
    justify-content: center;
}

.buyer-review-item:nth-of-type(2) {
    margin-top: 1rem;
    height: calc(100% - 4rem);
}

.buyer-review-item:nth-of-type(3) {
    margin-top: 2rem;
    height: calc(100% - 4rem);
}

.buyer-review-item p {
    color: hsl(0, 0%, 100%);
    font-weight: 400;
    font-size: 1.12rem;
}

.buyer-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.12rem;
}

.buyer-pic {
    width: 40px;
    border-radius: 50%;
}

.buyer-name {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    color: hsl(0, 0%, 100%);
    gap: .25rem;
}

.buyer-name span {
    font-weight: 400;
    color: hsl(333, 80%, 67%);
}

.header-copy-col {
    width: 435px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.star-rating-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: calc(100% - 435px);
    gap: 1.25rem;
}

.star-rating-row {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    background-color: hsl(300, 24%, 96%);
    padding: 1rem 2rem;
    border-radius: .75rem;
    width: calc(445px - 4rem);
}

.star-rating-row p,
h1 {
    color: hsl(300, 43%, 22%);
}

.star-rating-row p {
    font-weight: 700;
    margin-top: .35rem;
}

.star-rating-row:nth-of-type(1) {
    margin-right: 100px;
}

.star-rating-row:nth-of-type(2) {
    margin-right: 50px;
}

.stars {
    display: flex;
    gap: .5rem;
}

footer {
    text-align: center;
    line-height: 1.5rem;
    z-index: 2;
}

footer a {
    color: hsl(300, 43%, 22%);
    font-weight: 700;
}

@media screen and (max-width: 1024px) {
  body {
    overflow-x: hidden;
  }

  .bg-pattern-top-desktop {
    display: none;
  }

  .bg-pattern-bottom-desktop {
    display: none;
  }

  .bg-pattern-top-mobile {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
  }

  .bg-pattern-bottom-mobile {
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 0;
    width: 100%;
  }

  main {
    flex-direction: column;
    max-width: 375px;
    gap: 3rem;
  }

  .rating-row:nth-of-type(1) {
    flex-direction: column;
    gap: 3rem;
  }

  .rating-row:nth-of-type(2) {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .buyer-review-item:nth-of-type(2), .buyer-review-item:nth-of-type(3) {
    margin-top: 0;
  }

  .header-copy-col {
    text-align: center;
    width: 100%;
  }

  .star-rating-col {
    flex-direction: column;
    width: 100%;
  }

  .star-rating-row {
    flex-direction: column;
    gap: .5rem;
    width: calc(100% - 4rem);
  }

  .star-rating-row p {
    margin-bottom: -.25rem;
  }

  .star-rating-row:nth-of-type(1) {
    margin-right: 0;
}

  .star-rating-row:nth-of-type(2) {
    margin-right: 0;
  }
}
