@import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Young+Serif&display=swap");

:root {
  --red: hsl(0, 78%, 62%);
  --cyan: hsl(180, 62%, 55%);
  --orange: hsl(34, 97%, 64%);
  --blue: hsl(212, 86%, 64%);
  --grey500: hsl(234, 12%, 34%);
  --grey400: hsl(212, 6%, 44%);
  --white: hsl(0, 0%, 100%);

  /* Widths */
  --mobile-w: 375px;
  --desktop-w: 1440px;

  /* Fonts */
  --font-size: 15px;
  --heading-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);

  --fw-light: 200;
  --fw-regular: 400;
  --fw-bold: 600;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins";
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

main {
  max-width: clamp(var(--mobile-w), 90vw, var(--desktop-w));
  display: flex;
  flex-direction: column;
  align-items: center;
}

img {
  width: 64px;
  height: 64px;
}

.header-container {
  text-align: center;
}

.heading {
  font-size: var(--heading-size);
  font-weight: var(--fw-bold);
  line-height: 140%;
  letter-spacing: 0.25px;
  margin-bottom: 1rem;
  color: var(--grey500);
}

.top-text {
  font-size: var(--heading-size);
  font-weight: var(--fw-light);
  color: var(--grey400);
}

.description {
  font-size: 0.9375rem;
  color: var(--grey500);
  max-width: 55ch;
}

.card-heading {
  font-size: 1.25rem;
  color: var(--grey500);
  margin-bottom: 0.375rem;
}

.card > p {
  font-size: 0.8125rem;
  color: var(--grey400);
  margin-bottom: 2rem;
}

.card-grid {
  margin-top: 60px;
  display: grid;
  grid-gap: 2rem;
  grid-template-columns: 1fr;
  justify-items: center;
}

.card {
  max-width: 350px;
  min-width: 314px;
  min-height: 250px;
  border-radius: 0.5rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  border-top: 8px solid var(--orange);
  box-shadow: 0px 15px 30px -10px rgba(131, 166, 210, 0.5);
}

/* Specific colors for each card class */
.supervisor {
  border-top-color: var(--cyan);
}
.team-builder {
  border-top-color: var(--red);
}
.karma {
  border-top-color: var(--orange);
}
.calculator {
  border-top-color: var(--blue);
}

.icon {
  align-self: flex-end;
}

@media (min-width: 768px) {
  .header-container {
    max-width: 540px;
  }

  .card-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }

  .team-builder {
    grid-area: 1 / 3 / 2 / 5;
  }

  .supervisor {
    grid-area: 2 / 2 / 3 / 4;
  }

  .karma {
    grid-area: 2 / 4 / 3 / 6;
  }

  .calculator {
    grid-area: 3 / 3 / 4 / 5;
  }
}

@media (min-width: 1440px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    align-items: center;
  }

  .supervisor {
    grid-area: 1 / 1 / 3 / 2;
  }

  .team-builder {
    grid-area: 1 / 2 / 2 / 3;
  }

  .karma {
    grid-area: 2 / 2 / 3 / 3;
  }

  .calculator {
    grid-area: 1 / 3 / 3 / 4;
  }
}
