@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root{
    --red: hsl(0, 78%, 62%);
    --cyan: hsl(180, 62%, 55%);
    --orange: hsl(34, 97%, 64%);
    --blue: hsl(212, 86%, 64%);
    --powdered-blue: rgb(245, 255, 245);
    --grey-500: hsl(234, 12%, 34%);
    --grey-400: hsl(212, 6%, 44%);
    --white: hsl(0, 0%, 100%);

    --body-copy: 15px;
    --small-copy: 9px;
    
    --font: 'Poppins', sans-serif;
}

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font);
    background-color: var(--powdered-blue);
    color: var(--grey-500);
    font-size: var(--body-copy);
}

.bold {font-weight: 600;}

/* Main content! */

.wrapper {
    width: 80dvw;
    margin: auto;
    margin-block: 4rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {margin-bottom: .5rem;}

header h1 {
    font-size: 24px;
    font-weight: 300;
    text-align: center;
    line-height: 1.25;
}

header span {display: block;}

.caption {
    margin-block: 5px 2.5rem;
    font-size: var(--small-copy);
    text-align: center;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 1.2rem;
    justify-content: center;
    align-items: center;
}

.card {
    display: grid;
    grid-template-rows: repeat(3, auto);
    flex: 0 1 200px;
    
    border-radius: 6px;
    background-color: var(--white);
    padding: 30px 25px 30px 25px;
    height: 130px;
    box-shadow: 1px 7px 12px rgba(0, 0, 0, 0.1);
}

.middle__two {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex: 0 1 250px;
    gap: 30px;
}

.cards .card:nth-child(1) {border-top: 3.5px solid var(--cyan);}
.middle__two .card:nth-child(1) {border-top: 3.5px solid var(--red)}
.middle__two .card:nth-child(2) {border-top: 3.5px solid var(--orange);}
.cards .card:nth-child(3) {border-top: 3.5px solid var(--blue)}

.card h2 {
    font-size: var(--body-copy);
    font-weight: 500;
}

.card p {
    font-size: var(--small-copy);
}

.card img {
    width: 48px;
    place-self: end;
}

/* Media Query: Repsonsive layouts */

@media only screen and (min-width: 660px) {
    .middle__two {
        order: 1;
        flex-basis: auto;
    }
}   

@media only screen and (min-width: 1020px) {
    .middle__two {
        order: 0;
        flex-basis: 250px;
    }
}   