:root {
  --color-red: hsl(0, 78%, 62%);
  --color-cyan: hsl(180, 62%, 55%);
  --color-orange: hsl(34, 97%, 64%);
  --color-blue: hsl(212, 86%, 64%);

  --color-very-dark-blue: hsl(234, 12%, 34%);
  --color-grayish-blue: hsl(229, 6%, 66%);
  --color-very-light-gray: hsl(0, 0%, 98%);
  --color-white: #fff;

  --base-font-family: "Poppins", serif;
  --base-font-size: 15px;
  --fw-bold: 600;
  --fw-normal: 400;
  --fw-light: 200;
  --line-height: 1.5;

  --font-size-lg: 18px;
}

/* reset styles */
html {
  box-sizing: border-box;
}

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

html,
body {
  scroll-behavior: smooth;
  min-height: 100lvh;
}

body {
  font-size: var(--base-font-size);
  font-weight: var(--fw-normal);
  line-height: var(--line-height);
  font-family: var(--base-font-family);

  display: flex;
  flex-direction: column;
  background-color: var(--color-very-light-gray);
}

/* telling the main element fill the remaining space the rest will be sized by content */
body > main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

ul {
  list-style: none;
}

a {
  display: block;
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}
/* reset styles */

/* utilities ==================== */
.wrapper {
  width: 93%;
  margin: 0 auto;
}

.wrapper--sm {
  max-width: 600px;
}

.wrapper--normal {
  max-width: 980px;
}

.wrapper-lg {
  max-width: 1300px;
}

.main-title {
  color: var(--color-very-dark-blue);
  font-weight: var(--fw-light);
  font-size: 1.5rem;
  margin-bottom: 1em;
}

.main-title span {
  display: block;
  font-weight: var(--fw-bold);
  font-size: 1.5rem;
}

.lead {
  font-size: 1rem;
  color: var(--color-grayish-blue);
}

.card-title {
  color: var(--color-very-dark-blue);
  font-size: 1.25rem;
  margin-bottom: 0.5em;
}

.card-text {
  font-size: 1.05rem;
  color: var(--color-grayish-blue);
}

/* utilities ==================== */

/* header styles ================= */
.header {
  padding: 4rem 0;
  text-align: center;
  margin-bottom: 4rem;
  transition: all 0.3s ease-in-out;
  animation: fade-down 0.5s 0s ease-in-out;
}
/* header styles ================= */

/* cards styles ===================== */

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3em;
  align-items: center;
  margin-bottom: 8rem;
}

.card {
  height: 300px;
  max-width: 450px;
  padding: 3rem 1.5rem;
  background-color: var(--color-white);
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.15);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  border-top: 4px solid;
}

.card-img {
  margin-top: 2rem;
  order: 1;
  align-self: flex-end;
}

.card:first-child {
  border-color: var(--color-cyan);
  transform: translateX(-200%);
  /* transform: translateX(-200%); */
  animation: fade-right 0.6s 0.5s ease-in-out forwards;
}

.card:nth-of-type(2) {
  border-color: var(--color-red);
  transform: translateY(-300%);
  animation: fade-down 0.6s 1s ease-in-out forwards;
}

.card:nth-of-type(3) {
  border-color: var(--color-orange);
  transform: translateX(300%);
  animation: fade-left 0.6s 1.2s ease-in-out forwards;
}

.card:last-child {
  border-color: var(--color-blue);
  transform: translateY(300%);
  animation: fade-up 0.7s 1.4s ease-in-out forwards;
}

/* card styles ===================== */

/* footer */
.footer {
  background-color: var(--color-very-dark-blue);
  padding: 0.5em;
  color: var(--color-very-light-gray);
}

.footer p {
  justify-content: center;
  display: flex;
}
/* media styles */

@media screen and (min-width: 900px) {
  body > main {
    flex-grow: 0;
  }

  .main-title {
    font-size: 2rem;
    margin-bottom: 0.5em;
  }

  .main-title span {
    font-size: 1.75rem;
  }

  .lead {
    font-size: 1.25rem;
    width: 700px;
    margin: 0 auto;
  }
}

@media screen and (min-width: 1300px) {
  .header {
    padding: 2rem 0;
    margin-bottom: 1rem;
  }

  .cards {
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
  }

  .card {
    height: 260px;
  }

  .card:first-child {
    grid-column: 1 / span 6;
    grid-row: 2 / 3;
  }

  .card:nth-of-type(2) {
    grid-column: 5 / span 6;
  }

  .card:nth-of-type(3) {
    border-color: var(--color-orange);
    grid-column: 9 / -1;
  }

  .card:nth-of-type(4) {
    grid-column: 5 / span 6;
  }
}

@keyframes fade-down {
  0% {
    transform: translateY(-200%);
    opacity: 0;
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-right {
  0% {
    transform: translateX(-200%);
    opacity: 0;
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-left {
  0% {
    transform: translateX(200%);
    opacity: 0;
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-up {
  0% {
    transform: translateY(200%);
    opacity: 0;
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
