/* CSS RESET  */
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
    box-sizing: border-box;
}
  
/* 2. Remove default margin */
* {
    margin: 0;
}
  
body {
/* 4. Add accessible line-height */
    line-height: 1.5;
/* 5. Improve text rendering */
    -webkit-font-smoothing: antialiased;
}
  
/* 6. Improve media defaults */
img {
    display: block;
    max-width: 100%;
}
  
/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* CUSTOM PROPERTIES  */
:root {
    /* 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%);
    --clr-grey-500: hsl(235, 12%, 34%);
    --clr-grey-400: hsl(0, 0%, 100%);
    --clr-white: hsl(0, 0%, 100%);
    /* FONT SIZE  */
    --fs-p: .9375rem; /* 15px  */
}

/* CUSTOM FONTS  */
/* poppins-200 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 200;
    src: url('./fonts/poppins-v22-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/poppins-v22-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* poppins-600 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    src: url('./fonts/poppins-v22-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* GENERAL STYLES  */

body {
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    display: grid;
    place-items: center;
    background-color: var(--clr-grey-400);
}

main {
    display: grid;
    gap: 2rem;
    margin-block: 2.5rem;
    padding-inline: 2rem;
    max-width: 375px;
}

.grid__text {
    display: grid;
    gap: 1rem;
}

h1 {
    font-size: 1.5rem;
    color: var(--clr-grey-500);
    font-weight: 200;
    justify-self: center;
    max-width: 315px;
}

strong {
    font-weight: 600;
}

.grid__text > p {
    text-align: center;
    font-size: var(--fs-p);
    color: var(--clr-grey-500);
    font-weight: 400;
    max-width: 540px;
    justify-self: center
}

.grid__cards {
    display: grid;
    gap: 1.5rem;

}

.card {
    border-top: 4px solid transparent;
    border-radius: .35rem;
    background-color: var(--clr-white);
    display: grid;
    gap: 2.5rem;
    padding: 2.2rem;
    box-shadow: 0px 5px 9px -5px var(--clr-grey-500);
}

.card__container {
    display: grid;
    gap: .35rem;
}

.card__title {
    font-size: 1.2rem;
    color: var(--clr-grey-500);
    font-weight: 600;
}

.card__description {
    font-size: .8rem;
    color: var(--clr-grey-500);
}

.card__icon {
    justify-self: end;
}

.card:nth-child(1){
    border-top-color: var(--clr-cyan)
}

.card:nth-child(2){
    border-top-color: var(--clr-red)
}

.card:nth-child(3){
    border-top-color: var(--clr-orange)
}

.card:nth-child(4){
    border-top-color: var(--clr-blue)
}

@media (width >= 768px) {
    main {
        max-width: revert;
    }

    .card {
        max-width: 315px;
    }
    
    .grid__cards {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        align-items: center;
    }


    .card:nth-child(1){
        grid-row: 1 / 3;
    }
    .card:nth-child(3){
        grid-row: 2 / 3;
        grid-column: 2 / 3;
    }
    
    .card:nth-child(4){
        grid-row: 1 / 3;
        grid-column: 3 / 4;
    }


}