/* styles come with the file */
.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }

/* variables */
:root {
  --Red: hsl(0, 78%, 62%);
  --Cyan: hsl(180, 62%, 55%);
  --Orange: hsl(34, 97%, 64%);
  --BlueShadow: rgba(131, 166, 210, 35%);
  --BlueShadowHover: rgba(131, 166, 210, 30%);
  --Blue: hsl(212, 86%, 64%);
  --DarkBlue: hsl(234, 12%, 34%);
  --GrayishBlue: hsl(229, 6%, 66%);
  --LightGray: hsl(0, 0%, 98%);
}

/* reset */
body, p, a, ul, li, h1, h2, h3 {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

li {
  list-style-type: none;
}

/* utilities */
.text-bold {
  font-weight: 600;
}

.text-regular {
  font-weight: 400;
}

.text-light {
  font-weight: 200;
}

/* base styles */
/* styles that won't change by the size of the devices */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--LightGray);
  color: var(--DarkBlue);
}

footer {
  margin-top: 100px;
}

/* cards section */
.card {
  background-color: #fff;
  border-radius: 8px;
  display: block;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0px 15px 20px var(--BlueShadow);
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3.55px;
}

.card:hover {
  transform: translate(0px, -3px);
  box-shadow: 0px 17px 30px var(--BlueShadowHover);
}

.card h1 {
  font-size: 20px;
  line-height: 28px;
  margin-bottom: 4px;
}

.card h2 {
  opacity: 50%;
  font-size: 13px;
  line-height: 23px;
  letter-spacing: 0.09px;
}

.card-img {
  display: flex;
  justify-content: flex-end;
}

.card-img img {
  width: 57px;
}

.cards {
  margin-top: 76px;
}

.card {
  padding: 27px 28px 28px;
  margin: 0 auto;
  max-width: 312px;
}

.card:not(:last-of-type) {
  margin-bottom: 25px;
}


.card-img {
  margin-top: 33px;
}

/* colored borders */
.card:nth-child(1)::before {
  background-color: var( --Cyan);
}
.card:nth-child(2)::before {
  background-color: var( --Red);
}
.card:nth-child(3)::before {
  background-color: var( --Orange);
}
.card:nth-child(4)::before {
  background-color: var( --Blue);
}

/* mobile styles */
main {
  padding: 0 32px;
  max-width: 375px;
  margin: 0 auto;
  margin-top: 85px;
}

/* welcome section */
.welcome {
  text-align: center;
}

.welcome h1 {
  font-size: 24px;
  letter-spacing: .17px;
  line-height: 33px;
}
.welcome h1:nth-child(2) {
  margin-top: 4px;
}


.welcome h2 {
  opacity: 50%;
  font-size: 15px;
  margin-top: 16px;
  line-height: 25px;
  letter-spacing: 0.1px;
  margin: 16px auto 0;
}


/* desktop styles */
@media screen and (min-width: 1200px) {
  main {
    max-width: 1110px;
    margin-top: 80px;
    padding: 0;
  }

  body {
    height: 100vh;
  }

  /* welcome section */
  .welcome h1 {
    font-size: 36px;
    line-height: 51px;
    letter-spacing: .25px;
  }

  .welcome h1:nth-child(2) {
    margin-top: 0;
  }
  
  .welcome h2 {
    max-width: 540px;
  }

  /* cards section */
  .cards {
    margin-top: 64px;
  }
  /* grid layout */
  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  .card.cyan {
    grid-column: 1/2;
    grid-row: 2/4;
  }
  .card.red {
    grid-column: 2/3;
    grid-row: 1/3;
  }
  .card.orange {
    grid-column: 2/3;
    grid-row: 3/5;
  }
  .card.blue {
    grid-column: 3/4;
    grid-row: 2/4;
  }
  /* card detail */
  .card:not(:last-of-type) {
    margin-bottom: 0;
  }

  .card {
    max-width: 350px;
    margin: 0 auto;
    padding: 32px;
  }

  .card h1 {
    margin-bottom: 8.5px;
  }

  .card-img {
    margin-top: 40px;
  }

  .card-img img {
    width: 64px;
  }

  .card::before {
    height: 4px;
  }
}