/* CSS RESETS */

/* 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;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'] {
  list-style: none;
}

h1, h2 {
  line-height: 1.4;    /* Set shorter line heights on headings and interactive elements */
  text-wrap: balance;  /* Balance text wrapping on headings */
}

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

/* 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('../assets/fonts/poppins-v24-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('../assets/fonts/poppins-v24-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('../assets/fonts/poppins-v24-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {

    /* COLORS */

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

    /* TYPOGRAPHY */

    --ff-main: "Poppins", sans-serif;
    --fs-body: .9375rem;
    --fs-header: clamp(1.5rem, 0.7844rem + 3.0534vw, 2.25rem);

    /* SPACINGS */

    --space-1000: 5rem;
    --space-900: 4.5rem;
    --space-800: 4rem;
    --space-700: 3.5rem;
    --space-600: 3rem;
    --space-500: 2.5rem;
    --space-400: 2rem;
    --space-300: 1.5rem;
    --space-200: 1rem;
    --space-100: .5rem;

    /* BORDER RADIUS */

    --rounded-sm: 8px;

    /* BOX SHADOW */

    --shadow: 0px 15px 30px -11px hsla(213, 47%, 67%, 0.5);

}

body {
  font-family: var(--ff-main);
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--clr-grey-500);
  min-height: 100dvh;
  padding-inline: clamp(var(--space-400), 0.5687rem + 6.1069vw, var(--space-700));
  padding-block: clamp(var(--space-700), 2.0687rem + 6.1069vw, var(--space-1000));
}

.header {
    max-width: 33.75rem;
    margin: 0 auto;
    text-align: center;
    margin-block-end: clamp(3.75rem, 2.9151rem + 3.5623vw, 4.625rem);
}

.header__title {
    font-size: var(--fs-header);
    font-weight: 200;
    margin-block-end: var(--space-200);
}

.header__title-strong {
    font-weight: 600;
}

.cards {
    display: grid;
    gap: var(--space-400);
    max-width: 69.625rem;
    margin: 0 auto;
}

.card {
    display: flex;
    flex-direction: column;
    padding: var(--space-400);
    padding-block-end: var(--space-600);
    border-radius: var(--rounded-sm);
    box-shadow: var(--shadow);
    border-block-start: 4px solid;
}

.card--cyan {
    border-color: var(--clr-cyan);
}

.card--red {
    border-color: var(--clr-red);
}

.card--orange {
    border-color: var(--clr-orange);
}

.card--blue {
    border-color: var(--clr-blue);
}

.card__title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    margin-block-end: .375rem;
}

.card__description {
    font-size: .8125rem;
    line-height: 1.6;
    color: var(--clr-grey-400);
    margin-block-end: var(--space-400);
}

.card__img {
    align-self: flex-end;
}

@media screen and (min-width: 48em) {
    
    .cards {
        grid-template-columns: repeat(4, 1fr);
    }

    .card--cyan, .card--orange {
        grid-row: 2 / 3;
        grid-column: span 2;
    }

    .card--red, .card--blue {
        grid-column: 2 / 4;
    }

}

@media screen and (min-width: 64em) {

    .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .card--red, .card--orange {
        grid-column: 2 / 3;
        grid-row: span 2;
    }
    
    .card--cyan, .card--blue {
        grid-row: 2 / 4;
    }
    
    .card--cyan {
        grid-column: 1;
    }

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