/* CSS RESET */
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
/* END CSS RESET */

:root {
  /* COLORS */
  --primary-red: hsl(0, 78%, 62%);
  --primary-cyan: hsl(180, 62%, 55%);
  --primary-orange: hsl(34, 97%, 64%);
  --primary-blue: hsl(212, 86%, 64%);
  --neutral-dark-gray: hsl(234, 12%, 34%);
  --neutral-light-gray: hsl(212, 6%, 44%);

  /* FONTS */
  --default-font-size: 15px;

  /* SPACING */
  --space-500: 2.5rem;
  --space-400: 2rem;
  --space-300: 1.5rem;
  --space-200: 1rem;
  --space-100: 0.5rem;
}

.text-preset-1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 24px;
  line-height: 140%;
  color: var(--neutral-dark-gray);
}

.text-preset-2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: 24px;
  line-height: 140%;
  color: var(--neutral-dark-gray);
}

.text-preset-3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 20px;
  line-height: 135%;
  color: var(--neutral-dark-gray);
}

.text-preset-4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 15px;
  line-height: 140%;
  color: var(--neutral-dark-gray);
}

.text-preset-5 {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  line-height: 160%;
  color: var(--neutral-light-gray);
}

.bg-red {
  background-color: var(--primary-red);
}
.bg-cyan {
  background-color: var(--primary-cyan);
}
.bg-orange {
  background-color: var(--primary-orange);
}
.bg-blue {
  background-color: var(--primary-blue);
}

body {
  font-size: var(--default-font-size);
  background-color: #fafafa;
}

main {
  padding: 56px 30px;
}

.title-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  margin-bottom: 60px;
}

.card-container {
  display: grid;
  justify-items: center;
  gap: 2rem;
}

.card {
  position: relative;
  padding: 2rem;
  min-height: 250px;
  width: 314px;
  box-shadow: 0px 15px 30px -11px rgba(131, 166, 210, 0.5);
  border-radius: 0.5rem;
  overflow: hidden;
  box-sizing: border-box;
}

.card > img {
  position: absolute;
  bottom: 47px;
  right: 2rem;
}

.top-border {
  height: 5px;
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

footer {
  margin-bottom: 2rem;
}

.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

@media (min-width: 768px) {
  main {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .card-container {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    max-width: 660px;
    margin: 0 auto;
    gap: 2rem;
  }

  .supervisor {
    grid-column: 1 / span 2;
    grid-row: 2 / 3;
  }
  .team-builder {
    grid-column: 2 / span 2;
    grid-row: 1 / 2;
  }
  .karma {
    grid-column: 3 / span 2;
    grid-row: 2 / 3;
  }
  .calculator {
    grid-column: 2 / span 2;
    grid-row: 3 / 4;
  }

  .text-preset-1,
  .text-preset-2 {
    font-size: 36px;
  }

  .title-container {
    max-width: 540px;
    margin: 0 auto 60px auto;
  }
}

@media (min-width: 1440px) {
  main {
    padding-top: 102px;
    padding-bottom: 102px;
  }

  .card-container {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    max-width: 1114px;
    max-height: 532px;
    margin: 0 auto;
  }

  .team-builder {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
  }

  .supervisor {
    grid-column: 1 / 2;
    grid-row: 2 / span 2;
  }

  .karma {
    grid-column: 2 / 3;
    grid-row: 3 / span 2;
  }
  .calculator {
    grid-column: 3 / 4;
    grid-row: 2 / span 2;
  }

  .card {
    width: 350px;
  }
}
