:root {
  /* Colors */
  --clr-purple-100: hsl(254, 88%, 90%);
  --clr-purple-500: hsl(256, 67%, 59%);
  --clr-yellow-100: hsl(31, 66%, 93%);
  --clr-yellow-500: hsl(39, 100%, 71%);
  --clr-white: hsl(0, 0%, 100%);
  --clr-black: hsl(0, 0%, 7%);
  --clr-bkg: hsl(0, 0%, 98%);

  /* Spaces */
  --space-3xs: clamp(0.3125rem, 0.3125rem + 0vw, 0.3125rem);
  --space-2xs: clamp(0.5625rem, 0.5408rem + 0.1087vw, 0.625rem);
  --space-xs: clamp(0.875rem, 0.8533rem + 0.1087vw, 0.9375rem);
  --space-s: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
  --space-m: clamp(1.6875rem, 1.6223rem + 0.3261vw, 1.875rem);
  --space-l: clamp(2.25rem, 2.163rem + 0.4348vw, 2.5rem);
  --space-xl: clamp(3.375rem, 3.2446rem + 0.6522vw, 3.75rem);
  --space-2xl: clamp(4.5rem, 4.3261rem + 0.8696vw, 5rem);
  --space-3xl: clamp(6.75rem, 6.4891rem + 1.3043vw, 7.5rem);

  /* Font sizes */
  --fs--3xs: clamp(0.75rem, 0.7747rem + 0.0326vw, 0.8rem);
  --fs--2xs: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
  --fs--xs: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8rem);
  --fs-s: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
  --fs-m: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
  --fs-l: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
  --fs-xl: clamp(1.944rem, 1.771rem + 0.8651vw, 2.4414rem);
  --fs-2xl: clamp(2.3328rem, 2.0827rem + 1.2504vw, 3.0518rem);
  --fs-3xl: clamp(2.7994rem, 2.4462rem + 1.7658vw, 3.8147rem);

  /* border radius*/

  --br--3xs: clamp(0.125rem, 0.125rem + 0vw, 0.125rem);
  --br--2xs: clamp(0.25rem, 0.25rem + 0vw, 0.25rem);
  --br--xs: clamp(0.375rem, 0.375rem + 0vw, 0.375rem);
  --br-s: clamp(0.5rem, 0.5rem + 0vw, 0.5rem);
  --br-m: clamp(0.75rem, 0.75rem + 0vw, 0.75rem);
  --br-l: clamp(1rem, 1rem + 0vw, 1rem);
  --br-xl: clamp(1.5rem, 1.5rem + 0vw, 1.5rem);
  --br-2xl: clamp(2rem, 2rem + 0vw, 2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* utilities classes */

.text-yellow {
  color: var(--clr-yellow-500);
}

.text-purple {
  color: var(--clr-purple-500);
}

body {
  font-family: "DM Sans", sans-serif;
  padding: var(--space-m);
  height: 100vh;
  background-color: var(--clr-bkg);
  color: var(--clr-black);
  p {
    text-wrap: pretty;
    font-weight: 400;
  }
  h2 {
    font-size: var(--fs-l);
    line-height: 0.9;
    font-weight: 500;
  }
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

main {
  display: grid;
  margin-inline: auto;
  gap: var(--space-s);

  @media screen and (min-width: 768px) {
    max-width: 1024px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 50px 0.5fr 0.1fr;
    grid-template-areas:
      "create social social time"
      "create manage maintain time"
      "write manage maintain time"
      "write growth followers followers";
  }

}


.social {
  background-color: var(--clr-purple-500);
  border-radius: var(--br-m);
  color: var(--clr-white);
  padding: var(--space-xl) var(--space-m);

  @media screen and (min-width: 768px) {
    grid-area: social;
  }

  h2 {
    font-size: var(--fs-2xl);
    text-align: center;
    margin-bottom: var(--space-xs);
  }
  img {
    width: 50%;
    margin-inline: auto;
    margin-bottom: 0.5rem;
  }
  p {
    text-align: center;
    opacity: 0.8;
  }
}

.manage {
  background-color: var(--clr-white);
  padding: var(--space-xs) var(--space-s);
  border-radius: var(--br-m);
  overflow: hidden;

  @media screen and (min-width: 768px) {
    grid-area: manage;
  }

  img {
    margin-inline: auto;
    margin-bottom: var(--space-xs);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: var(--br-2xl);

    @media screen and (min-width: 768px) {
      max-width: 140%;
    }
  }
  h2 {
    letter-spacing: -1px;
  }
}
.maintain {
  background-color: var(--clr-yellow-500);
  padding: 0 var(--space-s);
  border-radius: var(--br-m);
  overflow: hidden;

  @media screen and (min-width: 768px) {
    grid-area: maintain;
  }

  div {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    transform: translateY(10%);
  }

  h2 {
    letter-spacing: -1px;
    margin-bottom: var(--space-xs);
  }

  img {
    margin-inline: auto;
  }
}
.time {
  background-color: var(--clr-purple-100);
  padding: var(--space-s);
  border-radius: var(--br-m);
  text-align: center;
  overflow: hidden;

  @media screen and (min-width: 768px) {
    grid-area: time;
  }

  @media screen and (min-width: 768px) {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    text-align: left;
  }

  h2 {
    letter-spacing: -1px;
    margin-bottom: var(--space-xs);
  }
  img {
    margin-inline: auto;
    margin-bottom: var(--space-xs);

    @media screen and (min-width: 768px) {
      max-width: 175%;
    }
  }
}
.followers {
  background-color: var(--clr-purple-500);
  padding: var(--space-s);
  border-radius: var(--br-m);
  @media screen and (min-width: 768px) {
    grid-area: followers;
  }

  div {
    max-width: 70%;
    margin-inline: auto;

    @media screen and (min-width: 768px) {
      margin: 0;
      max-width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }

  img {
    margin-inline: auto;
    margin-bottom: var(--space-l);

    @media screen and (min-width: 768px) {
      max-width: 50%;
      margin: 0;
    }
  }
  p {
    color: var(--clr-white);
    font-size: var(--fs-xl);
    text-align: center;
    line-height: 0.9;
    letter-spacing: -1px;
    @media screen and (min-width: 768px) {
      text-align: left;
      margin: 0;
      font-size: var(--fs-xl);
      text-wrap: wrap;
    }
  }
}
.growth {
  background-color: var(--clr-white);
  padding: var(--space-s);
  border-radius: var(--br-m);
  @media screen and (min-width: 768px) {
    grid-area: growth;
  }

  div {
    max-width: 70%;
    @media screen and (min-width: 768px) {
      max-width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
    }
  }
  h2 {
    font-size: var(--fs-2xl);
    letter-spacing: -1px;
    margin-bottom: var(--space-xs);
  }
  p {
    margin-bottom: var(--space-xs);
  }
  img {
    max-width: 80%;
  }
}
.create {
  background-color: var(--clr-yellow-100);
  padding: var(--space-s);
  border-radius: var(--br-m);
  @media screen and (min-width: 768px) {
    grid-area: create;
    place-content: center;
  }

  div {
    max-width: 85%;
    margin-inline: auto;
    @media screen and (min-width: 768px) {
      max-width: 100%;
    }
  }

  h2 {
    font-size: var(--fs-xl);
    letter-spacing: -1px;
    margin-bottom: var(--space-s);
  }
  img {
    max-width: 60%;
    @media screen and (min-width: 768px) {
      max-width: 100%;
    }
  }
}
.write {
  background-color: var(--clr-yellow-500);
  padding: var(--space-s) var(--space-3xs);
  border-radius: var(--br-m);
  @media screen and (min-width: 768px) {
    grid-area: write;
  }

  div {
    max-width: 85%;
    margin-inline: auto;

    @media screen and (min-width: 768px) {
      max-width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-s);
      padding: var(--space-3xs) var(--space-s);
    }
  }

  h2 {
    font-size: var(--fs-xl);
    letter-spacing: -1px;
    margin-bottom: var(--space-xs);

    @media screen and (min-width: 768px) {
      margin: 0;
    }
  }

  img {
    max-width: 80%;
    @media screen and (min-width: 768px) {
      max-width: 100%;
      margin: 0;
    }
  }
}

@media screen and (min-width: 768px) {
  .social:hover, .manage:hover, .maintain:hover, .time:hover, .followers:hover, .growth:hover, .create:hover, .write:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
  }  
}

footer {
  text-align: center;
  margin-top: var(--space-s);
  font-size: var(--fs--2xs);
  opacity: 0.8;
}
