:root {
  --clr-primary-700: hsl(300, 43%, 22%);
  --clr-primary-300: hsl(333, 80%, 67%);

  --clr-neutral-300: hsl(302, 10%, 53%);
  --clr-neutral-200: hsl(300, 24%, 96%);
  --clr-neutral-100: hsl(0, 0%, 100%);

  --ff-family: 'League Spartan', sans-serif;

  --fs-400: 0.815rem;
  --fs-500: 0.9625rem;
  --fs-900: 2rem;

  --br: 0.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--ff-family);
  font-size: var(--fs-400);
  padding-top: 5rem;
  text-align: center;
  background-image: url(images/bg-pattern-top-desktop.svg),
    url(images/bg-pattern-bottom-desktop.svg);
  background-position: top left, bottom right;
  background-repeat: no-repeat;
  background-size: max(50%, 400px);
}

.container {
  max-width: 70rem;
  padding: 0 2em;
  margin: 0 auto;
}

.split {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

h1 {
  font-size: var(--fs-900);
  color: var(--clr-primary-700);
  line-height: 1;
  max-width: 15ch;
  margin-bottom: 0.25em;
  font-weight: 700;
}

.lead {
  font-size: var(--fs-500);
}

.ratings,
.quotes {
  padding: 0;
}

.ratings li {
  background: var(--clr-neutral-200);
  font-weight: 700;
  color: var(--clr-primary-700);
  padding: 0.75rem 2rem;
  border-radius: var(--br);
  max-width: 25rem;
  margin-left: auto;
  margin-right: auto;
}

.ratings img {
  margin: 0 0.5rem 0.5rem;
}

.stars {
  display: flex;
  justify-content: center;
}

.ratings li:not(:last-child),
.quotes blockquote {
  margin-bottom: 1em;
}

.quotes blockquote {
  background: var(--clr-primary-700);
  color: var(--clr-neutral-200);
  text-align: left;
  border-radius: var(--br);
  padding: 2rem;
  max-width: 25rem;
  margin-left: auto;
  margin-right: auto;
  height: 100%;
}

.quotes blockquote img {
  border-radius: 50%;
  width: 3rem;
}

.quotes blockquote .quote {
  margin-top: 2rem;
}

.quotes blockquote .status {
  color: var(--clr-primary-300);
}

.quotes blockquote .name {
  font-weight: 700;
}

.a-center {
  align-items: center;
}

main {
  display: grid;
  gap: 3rem;
}

@media (min-width: 50em) {
  :root {
    --fs-900: 3rem;
  }

  body {
    padding-top: 10rem;
  }

  main {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    text-align: left;
  }

  .intro {
    grid-column: 1/2;
  }

  .ratings {
    grid-column: 2/3;
    align-self: center;
  }

  .quotes {
    grid-column: 1/-1;
  }

  .split {
    flex-direction: row;
  }

  .ratings li {
    display: flex;
    align-items: center;
    padding: 1em 3rem;
  }

  .ratings li:first-child {
    transform: translateX(-3rem);
  }

  .ratings li:last-child {
    transform: translateX(3rem);
  }

  .ratings img {
    margin: -0.25rem 0.5rem 0 0;
  }

  .quotes li:nth-child(2) {
    transform: translateY(1.5rem);
  }

  .quotes li:nth-child(3) {
    transform: translateY(3rem);
  }

  .quotes blockquote img {
    margin-right: 2rem;
  }
}

@media (max-width: 50em) {
  h1 {
    margin-left: auto;
    margin-right: auto;
  }

  h1 {
    margin-bottom: 1em;
  }
}
