:root {
  --color-grey-500: hsl(234, 12%, 34%);
  --color-grey-400: hsl(212, 6%, 44%);
  --color-white: hsl(0, 0%, 100%);
  --color-red: hsl(0, 78%, 62%);
  --color-cyan: hsl(180, 62%, 55%);
  --color-blue: hsl(212, 86%, 64%);
  --color-orange: hsl(34, 97%, 64%);
  --color-background: hsl(0, 0%, 98%);

  /* Typography */
  --font-family: "Poppins", sans-serif;
  --font-weight-extralight: 200;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;

  /* Spacing */
  --space-500: 2.5rem; /* 40px */
  --space-400: 2rem; /* 32px */
  --space-300: 1.5rem; /* 24px */
  --space-200: 1rem; /* 16px */
  --space-100: 0.5rem; /* 8px */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: 0.9375rem; /* 15px */
  font-weight: var(--font-weight-regular);
  background-color: var(--color-background);
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 3.5rem var(--space-400) 2.875rem;

  @media (min-width: 40.5rem) {
    padding: 5rem 3.375rem;
  }

  @media (min-width: 65.625rem) {
    padding-top: 6.375rem;
  }
}

h1 {
  font-size: 1.5rem;
  line-height: 1.4;
  letter-spacing: 0.25px;
  margin-bottom: var(--space-200);
  color: var(--color-grey-500);

  @media (min-width: 40.5rem) {
    font-size: 2.25rem;
  }
}

h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--color-grey-500);
  margin-bottom: 0.375rem;
}

img {
  display: block;
}

.intro {
  text-align: center;
  max-width: 33.75rem;
}

.intro__title {
  font-weight: var(--font-weight-extralight);
}

.intro__title--bold {
  font-weight: var(--font-weight-semibold);
  display: block;
}

.intro__description {
  color: var(--color-grey-500);
  line-height: 1.4;
}

.card-layout {
  margin-top: 3.75rem;
  display: grid;
  gap: var(--space-400);

  @media (min-width: 40.5rem) {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    margin-top: 4.625rem;
  }

  @media (min-width: 65.625rem) {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-400);
  padding: var(--space-400);
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0px 15px 30px -11px rgb(131 166 210 / 50%);

  @media (min-width: 40.5rem) {
    max-width: 19.625rem;
  }

  @media (min-width: 65.625rem) {
    max-width: 21.875rem;
  }
}

.card__description {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-grey-400);
}

.card__icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.9375rem;
  align-self: flex-end;
}

.supervisor {
  border-top: 4px solid var(--color-cyan);

  @media (min-width: 40.5rem) {
    grid-column: 1;
    grid-row: 2;
  }

  @media (min-width: 65.625rem) {
    grid-column: 1;
    grid-row: 1 / span 2;

    align-self: center;
  }
}

.team-builder {
  border-top: 4px solid var(--color-red);

  @media (min-width: 40.5rem) {
    grid-column: 1 / span 2;
    grid-row: 1;

    justify-self: center;
  }

  @media (min-width: 65.625rem) {
    grid-column: 2;
    grid-row: 1;

    justify-self: auto;
  }
}

.karma {
  border-top: 4px solid var(--color-orange);

  @media (min-width: 40.5rem) {
    grid-column: 2;
    grid-row: 2;
  }
}

.calculator {
  border-top: 4px solid var(--color-blue);

  @media (min-width: 40.5rem) {
    grid-column: 1 / span 2;
    grid-row: 3;

    justify-self: center;
  }

  @media (min-width: 65.625rem) {
    grid-column: 3;
    grid-row: 1 / span 2;

    align-self: center;
    justify-self: auto;
  }
}
