:root {
  /* Colors */
  --purple-100: hsl(254, 88%, 90%);
  --purple-500: hsl(256, 67%, 59%);

  --yellow-100: hsl(31, 66%, 93%);
  --yellow-500: hsl(39, 100%, 71%);

  --white: hsl(0, 0%, 100%);
  --black: hsl(0, 0%, 7%);

  /* Typography */
  --font-family-base: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-size-body: 1.8rem;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: var(--font-family-base);
}

html {
  font-size: 62.5%;
}

body {
  min-height: 100vh;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  background-color: hsl(0, 0%, 96%);
}

img {
  width: 100%;
}

main {
  min-height: 100vh;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1,
h2,
h3 {
  font-weight: var(--font-weight-medium);
}

.container-grid {
  max-width: 1200px;
  display: grid;
  gap: 2.5rem;
  grid-template-areas:
    "one"
    "two"
    "three"
    "four"
    "five"
    "six"
    "seven"
    "eight"
  ;
}

.grid-item {
  border-radius: 12px;
  overflow: hidden;
  line-height: 1;
  text-wrap: balance;
}

/* _______________Item 1________________ */

.grid-item:nth-child(1) {
  text-align: center;
  padding: 4rem 3rem;
  background: var(--purple-500);
  color: var(--white);
  grid-area: one;
}

.grid-item:nth-child(1) h1 {
  font-size: clamp(4rem, 10vw, 6.5rem);
}

.grid-item:nth-child(1) h1 span {
  font-style: italic;
}

.grid-item:nth-child(1) h1 span::before {
  content: "10x";
  color: var(--yellow-500);
  margin-right: 1rem;
  font-style: normal;
}

.grid-item:nth-child(1) img {
  width: 20rem;
}

/* _______________Item 2________________ */

.grid-item:nth-child(2) {
  padding: 1.6rem;
  background-color: var(--white);
  grid-area: two;
}
.grid-item:nth-child(2) h3 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.grid-item:nth-child(2) img {
  margin-bottom: 1rem;
  border-radius: 50px;
  filter: drop-shadow(-2px 4px 1rem hsl(0 0% 6% / .3));
}

/* _______________Item 3________________ */

.grid-item:nth-child(3) {
  background-color: var(--yellow-500);
  padding: 1.6rem;
  grid-area: three;
}

.grid-item:nth-child(3) h3 {
  font-size: clamp(2rem, 16vw, 3.5rem);
  margin-bottom: 1rem;
}

.grid-item:nth-child(3) img {
  width: 62%;
  margin-bottom: -3.5rem;
}

/* _______________Item 4________________ */

.grid-item:nth-child(4) {
  background-color: var(--purple-100);
  padding: 3rem 1.6rem;
  text-align: center;
  grid-area: four;
}

.grid-item:nth-child(4) h3 {
  font-size: clamp(2rem, 16vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.grid-item:nth-child(4) img {
  margin-bottom: 1rem;
}

.grid-item:nth-child(4) p {
  padding: 0 1rem;
}

/* _______________Item 5________________ */

.grid-item:nth-child(5) {
  background-color: var(--purple-500);
  padding: 2rem;
  text-align: center;
  grid-area: five;
}

.grid-item:nth-child(5) img {
  width: 76%;
  margin-bottom: 3rem;
}

.grid-item:nth-child(5) h2 {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  color: var(--white);
}

/* _______________Item 6________________ */

.grid-item:nth-child(6) {
  background-color: var(--white);
  padding: 2rem;
  grid-area: six;
}

.grid-item:nth-child(6) h1 {
  font-size: clamp(4rem, 10vw, 6.5rem);
  margin-bottom: 1rem;
}

.grid-item:nth-child(6) img {
  width: 60%;
  margin-top: 1.8rem;
}

/* _______________Item 7________________ */

.grid-item:nth-child(7) {
  background-color: var(--yellow-100);
  padding: 2rem 3rem;
  grid-area: seven;
}

.grid-item:nth-child(7) h2 {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  margin-bottom: 2rem;
}

.grid-item:nth-child(7) h2 span {
  color: var(--purple-500);
  font-style: italic;
}

.grid-item:nth-child(7) img {
  width: 68%;
}

/* _______________Item 8________________ */

.grid-item:nth-child(8) {
  background-color: var(--yellow-500);
  padding: 2rem;
  grid-area: eight;
}

.grid-item:nth-child(8) h2 {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
}

.grid-item:nth-child(8) img {
  width: 70%;
  margin-top: 2rem;
}

@media (min-width: 36rem) {
  .container-grid {
    padding: 4rem 0;
    grid-template-areas:
      "one one"
      "eight seven"
      "eight two"
      "five three"
      "five four"
      "six four"
    ;
  }

  .grid-item:nth-child(1)~.grid-item {
    text-align: start;
    padding: 2rem;
  }
}

@media (min-width: 56rem) {

  .container-grid {
    grid-auto-rows: max-content;
    grid-template-areas:
      "seven one one four"
      "seven one one four"
      "seven two three four"
      "eight two three four"
      "eight six five five";
  }

  .grid-item:nth-child(2) {
    align-content: center;
  }
  .grid-item:nth-child(2) img {
    width: 145%;
  }

  .grid-item:nth-child(3) h3 {
    width: 80%;
    margin: 0;
  }
  .grid-item:nth-child(3) img {
    width: 100%;
    margin-bottom: -200px;
  }

  .grid-item:nth-child(4) {
    align-content: center;
  }
  .grid-item:nth-child(4) img {
    width: 176%;
  }

  .grid-item:nth-child(5) {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    align-items: center;
    gap: 1rem;
  }
  .grid-item:nth-child(5) img {
    width: 100%;
    margin: 0;
  }

  .grid-item:nth-child(6) img {
    width: 90%;
  }

  .grid-item:nth-child(7) {
    align-content: center;
  }
  .grid-item:nth-child(7) h2 {
    width: 90%;
  }
  .grid-item:nth-child(7) img {
    width: 100%;
  }

  .grid-item:nth-child(8) img {
    width: 100%;
  }
  .grid-item:nth-child(8) h2 {
    margin-bottom: 4rem ;
    width: 80%;
  }
}