:root {
  --sm: 320px;
  --md: 768px;
  --lg: 1240px;

  --color-purple-100: hsl(254, 88%, 90%);
  --color-purple-500: hsl(256, 67%, 59%);
  --color-yellow-100: hsl(31, 66%, 93%);
  --color-yellow-500: hsl(39, 100%, 71%);
}

body {
  font-size: 18px;
  font-family: "DM Sans";
  font-weight: 400;
  background-color: #e9e9e9;
  line-height: 0.9;
}
p {
  font-size: 2rem;
}

@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/static/DMSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/static/DMSans-MediumItalic.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
}
@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/static/DMSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}
.container {
  margin: 50px auto;
  max-width: var(--lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  grid-template-rows: 300px 50px 200px 280px;
  grid-template-areas:
    "box-1 box-2 box-2 box-3"
    "box-1 box-4 box-5 box-3"
    "box-6 box-4 box-5 box-3"
    "box-6 box-7 box-8 box-8";
  gap: 2rem;
}

.item {
  border-radius: 1rem;
  padding: 10px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.item-img {
  max-width: 80%;
}
.bg-yellow-100 {
  background-color: var(--color-yellow-100);
}
.bg-yellow-500 {
  background-color: var(--color-yellow-500);
}
.bg-purple-500 {
  background-color: var(--color-purple-500);
}
.bg-purple-100 {
  background-color: var(--color-purple-100);
}
.bg-white {
  background-color: white;
}
.text-purple {
  color: var(--color-purple-500);
}
.text-white {
  color: white;
}
.text-yellow {
  color: var(--color-yellow-500);
}
.text-large {
  font-size: 3.3rem;
  text-align: center;
  margin: 20px 0;
}
.text-small {
  font-size: 1.1rem;
  font-weight: normal;
}
.text-medium {
  font-size: 1.2rem;
  font-weight: normal;
}

@media (max-width: 950px) {
  .container {
    grid-template-columns: auto;
    grid-template-rows: auto;
    grid-template-areas:
      "box-1 box-2 box-3"
      "box-4 box-5 box-3"
      "box-6 box-7 box-8";

    gap: 1rem;
    padding: 0px 10px;
  }
  .last-item {
    flex-direction: column !important;
  }
  .item {
    padding: 15px;
  }
  .text-large {
    font-size: 2.5rem;
  }
  p {
    font-size: 1.5rem;
  }
  .item-img {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .container {
    grid-template-areas:
      "box-2 box-2"
      "box-1 box-4"
      "box-3 box-5"
      "box-3 box-6"
      "box-7 box-6"
      "box-8 box-8";
  }
  .last-item {
    flex-direction: row !important;
  }
}
@media (max-width: 450px) {
  .container {
    display: flex;
    flex-direction: column;
  }
}

.attribution {
  display: flex;
  margin: 0 auto;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
