@layer fonts {
  /* dm-sans-regular - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400;
    src: url("fonts/dm-sans-v17-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
  }
  /* dm-sans-500 - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 500;
    src: url("fonts/dm-sans-v17-latin-500.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
  }
}
@layer colors {
  :root {
    --Purple-100: hsl(254, 88%, 90%);
    --Purple-500: hsl(256, 67%, 59%);
    --Yellow-100: hsl(33, 67%, 93%);
    --Yellow-500: hsl(39, 100%, 71%);
    --White: hsl(0, 0%, 100%);
    --Black: hsl(0, 0%, 7%);
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "DM Sans", sans-serif;
  background-color: hsla(33, 70%, 87%, 0.24);
}

li {
  list-style: none;
}
h2 {
  font-weight: 500;
  line-height: 0.9;
  font-size: 1.5rem;
}
p {
  font-size: calc((18 / 16) * 1rem);
}
.attribution {
  font-size: 0.9rem;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}
.container {
  max-width: 380px;
  width: 100%;
  display: grid;
  row-gap: 1.5rem;
  padding: 2rem 1rem;
  margin: 0 auto;
}
.box {
  border-radius: 10px;
}
.box img {
  width: 100%;
}
.box1 {
  background-color: var(--Purple-500);
  padding: 2rem 3rem;
  text-align: center;
  color: var(--White);
}
.box1 span {
  color: var(--Yellow-500);
}
.box1 h1 {
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
}
.box1 img {
  width: 12rem;
  margin: 1.2rem 0 0.5rem 0;
}
.box2 {
  background-color: var(--White);
  padding: 1rem;
}
.box2 img {
  margin-bottom: 1.2rem;
}
.box3 {
  background-color: var(--Yellow-500);
  overflow: hidden;
  padding: 0 1rem;
}
.box3 h2 {
  margin-top: 1rem;
}
.box3 img {
  width: 60%;
  position: relative;
  bottom: -1.2rem;
}
.box4 {
  background-color: var(--Purple-100);
  padding: 2rem 1rem;
  text-align: center;
}
.box4 img {
  margin: 1.5rem 0;
}
.box5 {
  background-color: var(--Purple-500);
  padding: 1.5rem 4rem;
  text-align: center;
  color: var(--White);
}
.box5 img {
  margin-bottom: 2rem;
}
.box6 {
  background-color: var(--White);
  padding: 1.5rem;
}
.box6 h2 {
  font-size: 2.7rem;
}
.box6 img {
  width: 60%;
}
.box6 p {
  margin: 1rem 0;
}
.box7 {
  background-color: var(--Yellow-100);
  padding: 2rem;
}
.box7 img {
  width: 60%;
  margin-top: 1.5rem;
}
.box7 span {
  color: var(--Purple-500);
  font-style: italic;
}
.box8 {
  background-color: var(--Yellow-500);
  padding: 1.5rem;
}
.box8 img {
  width: 60%;
  margin-top: 1.5rem;
}
@media screen and (min-width: 700px) {
  body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .container {
    display: grid;
    max-width: 1100px;
    width: 100%;
    grid-template-areas:
      "item7 item1 item1 item4"
      "item7 item1 item1 item4"
      "item7 item2 item3 item4"
      "item8 item2 item3 item4"
      "item8 item6 item5 item5";
    gap: 1rem;
    padding: 0;
    overflow: hidden;
  }
  .box {
    width: 100%;
  }
  h2 {
    line-height: 0.9;
    font-size: 1.8rem;
  }
  .box1 {
    grid-area: item1;
  }
  .box1 h1 {
    font-size: 3.2rem;
    line-height: 0.9;
  }

  .box2 {
    grid-area: item2;
    overflow: hidden;
  }
  .box2 img {
    width: 140%;
  }
  .box3 {
    grid-area: item3;
  }
  .box3 img {
    width: 100%;
    bottom: -2.7rem;
  }
  .box4 {
    grid-area: item4;
  }
  .box4 img {
    width: 140%;
  }
  .box5 {
    grid-area: item5;
    display: flex;
    padding: 1rem;
    align-items: center;
    text-align: left;
  }
  .box5 img {
    width: 50%;
  }
  .box6 {
    grid-area: item6;
  }
  .box6 h2 {
    font-size: 3rem;
  }
  .box6 img {
    width: 90%;
  }

  .box7 {
    grid-area: item7;
  }

  .box7 img {
    width: 100%;
    height: 6rem;
  }
  .box8 {
    grid-area: item8;
    padding: 1rem;
  }
  .box8 img {
    width: 100%;
    margin-top: 6rem;
  }
}
