/* poppins-200 - latin */
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-200.woff2') format('woff2'); 
  font-weight: 200;
  font-style: normal;
  font-display: swap; 
}

/* poppins-regular - latin */
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-regular.woff2') format('woff2'); 
  font-weight: 400;
  font-style: normal;
  font-display: swap; 
}

/* poppins-600 - latin */
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-600.woff2') format('woff2'); 
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}


/*--CSS RESET--*/

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

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  height: 100%;
}

/* Remove list styles on ul, ol elements */
ul, ol {
  list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* Make images easier to work with */
img,
picture,
video {
  display: block;
  max-width: 100%;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

:root {
  /*== Color Pallette==*/

  /* Primary Colors */
  --clr-red: hsl(0, 78%, 62%);
  --clr-cyan: hsl(180, 62%, 55%);
  --clr-orange: hsl(34, 97%, 64%);
  --clr-blue: hsl(212, 86%, 64%);

  /* Neutral Colors */
  --clr-white: hsl(0, 0%, 100%);
  --clr-grey-400: hsl(212, 6%, 44%);
  --clr-grey-500: hsl(234, 12%, 34%);
  --clr-light-gray: hsl(0, 0%, 98%);
  --clr-gray: hsl(0, 0%, 86%);

  /* == Fonts ==*/

  /* Font family */
  --ff-body: 'Poppins', sans-serif;

  /* Font weights */
  --fw-light: 200;
  --fw-medium: 400;
  --fw-bold: 600;

  /* Font sizes */
  --fs-normal: 0.9375rem;
  --fs-smaller: 0.8rem;
}

body {
  width: 100%;
  min-height: 100svh;
  background-color: var(--clr-light-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--ff-body);
  font-size: var(--fs-normal);
}

main{
  width: 86%;
  margin-block-start: 2rem;
  margin-block-end: 2rem;
}

header {
  display: grid;
  place-items: center;
  text-align: center;
}

.main__intro {
  color: var(--clr-grey-500);
  font-size: clamp(1.5rem, 2.5vw, 3rem);
  margin-block-end: 0.2rem;
  font-weight: var(--fw-light);
}

.main__heading {
  color: var(--clr-grey-500);
  font-size: clamp(1.5rem, 2.5vw, 3rem);
  font-weight: var(--fw-bold);
  margin-block-end: 1rem;
}

.main__description {
  color: var(--clr-grey-400);
  font-weight: var(--fw-medium);
  align-items: center;
  margin-block-end: clamp(1.4rem, 2vw, 1.8rem);
}

.main__section--cards {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cards {
  width: 90%;
  box-sizing: border-box;
  background-color: var(--clr-white);
  font-weight: var(--fw-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem;
  padding: 2rem 1.5rem 2.5rem;
  border-radius: 0.8rem;
  border: 1px solid var(--clr-light-gray);
  box-shadow: 0.2rem 0.56rem 0.75rem var(--clr-gray);
  transition: transform 2s ease, box-shadow 0.3s ease;
}

.cards:hover {
  transform: translateY(-0.36em);
  box-shadow: 0 0.9375rem 1.875rem rgba(0, 0, 0, 0.15);
}

.cards::before {
  content: "";
  display: block;
  height: 0.28rem;
  width: auto;
  margin: -1.95rem -1.38rem 0.7rem;
  border-radius: 0.56rem 0.56rem 0 0;
}

.cyan-card::before {
  background: var(--clr-cyan);
}

.red-card::before {
  background: var(--clr-red);
}

.orange-card::before {
  background: var(--clr-orange);
}

.blue-card::before {
  background: var(--clr-blue);
}

.cards h2 {
  color: var(--clr-grey-500);
  font-size: var(--fs-normal);
  font-weight: var(--fw-bold);
  margin-block-end: 0.1rem;
}

.cards p {
  color: var(--clr-grey-400);
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  line-height: 1.4;
}

.icons {
  height: 3rem;
  width: 3rem;
  align-self: flex-end;
  margin-block-start: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  .cards {
    transition: none;
  }
}

@media screen and (min-width:48rem) {
  main {
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-block: 0rem;
    min-height: fit-content;
  }

  header {
    display: block;
    text-align: center;
    margin-block-end: 1rem;
  }

  .main__description {
    font-size: var(--fs-normal);
    width: clamp(32rem, 20vw, 44rem);
  }

  .main__section--cards {
    display: grid;
    place-items: center;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem 0.7rem;
  }

  .cards {
    width: clamp(14.5rem, 30vw, 22rem);
  }

  .cyan-card {
    grid-column: 1;
  }

  .red-card {
    grid-column: 2;
    grid-row: 1;
  }

  .orange-card {
    grid-column: 2;
    grid-row: 2;
  }

  .blue-card {
    grid-column: 3;
  }

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


  .card-title {
    margin-block-start: 1rem;
    margin-block-end: 1rem;
  }

  .card-description {
    font-size: 0.9rem;
    margin-block-end: 1.5rem;
  }
}

@media screen and (min-width:62rem) {
  main {
    width: 90%;
  }

  .cards {
    width: 19rem;
    height: 15rem;
  }

}
