@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;500;700&display=swap');

:root {
  --very-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%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'League Spartan', sans-serif;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url('./images/bg-pattern-top-desktop.svg') left top no-repeat,
              url('./images/bg-pattern-bottom-desktop.svg') right bottom no-repeat;
  padding: 2rem;
}

.container {
  max-width: 1110px;
  margin: 0 auto;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

.intro {
  max-width: 445px;
}

.intro h1 {
  color: var(--very-dark-magenta);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1rem;
}

.intro p {
  color: var(--dark-grayish-magenta);
  line-height: 1.5;
}

.ratings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
}

.rating {
  background-color: var(--light-grayish-magenta);
  padding: 1rem 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 445px;
}

.rating:nth-child(2) {
  margin-left: 2rem;
}

.rating:nth-child(3) {
  margin-left: 4rem;
}

.stars {
  display: flex;
  gap: 0.5rem;
}

.rating p {
  color: var(--very-dark-magenta);
  font-weight: 700;
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial {
  background-color: var(--very-dark-magenta);
  color: var(--white);
  padding: 2rem;
  border-radius: 8px;
}

.testimonial:nth-child(2) {
  margin-top: 1rem;
}

.testimonial:nth-child(3) {
  margin-top: 2rem;
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.testimonial-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.testimonial-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.testimonial-info p {
  color: var(--soft-pink);
}

.testimonial-text {
  line-height: 1.5;
}

.attribution {
  margin-top: 2rem;
  font-size: 11px;
  text-align: center;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .intro {
    margin: 0 auto;
  }

  .ratings {
    align-items: center;
  }

  .rating {
    margin-left: 0 !important;
    flex-direction: column;
    width: 100%;
    max-width: 445px;
    padding: 1rem;
    gap: 1rem;
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .testimonial {
    margin-top: 0 !important;
  }
}

@media (max-width: 375px) {
  body {
    background: url('./images/bg-pattern-top-mobile.svg') left top no-repeat,
                url('./images/bg-pattern-bottom-mobile.svg') right bottom no-repeat;
    padding: 1rem;
  }

  .intro h1 {
    font-size: 2.5rem;
  }
}
