@import url('https://fonts.googleapis.com/css2?family=Karla:wght@400;700&display=swap');

:root {
    --color-primary-cyan: hsl(179, 62%, 43%);
    --color-primary-bright-yellow: hsl(71, 73%, 54%);

    --color-neutral-light-gray: hsl(204, 43%, 93%);
    --color-neutral-grayish-blue: hsl(218, 22%, 67%);

    --ff: 'Karla', sans-serif;
    --fw-400: 400;
    --fw-700: 700;
    --fs: 16px;
}

/* ********************** */
/* RESETS */
/* ********************** */

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

/* Remove default margin */
* {
    margin: 0;
    padding: 0;
    font: inherit;
}

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

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

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

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ********************** */
/* UTILITY CLASSES */
/* ********************** */

.clr-white {
    color: white;
}

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

.clr-bright-yellow {
    color: var(--color-primary-bright-yellow);
}

.clr-light-gray {
    color: var(--color-neutral-light-gray);
}

.clr-grayish-blue {
    color: var(--color-neutral-grayish-blue);
}

.bg-clr-white {
    background-color: white;
}

.bg-clr-cyan {
    background-color: var(--color-primary-cyan);
}

.bg-clr-bright-yellow {
    background-color: var(--color-primary-bright-yellow);
}

.bg-clr-light-gray {
    background-color: var(--color-neutral-light-gray);
}

.bg-clr-grayish-blue {
    background-color: var(--color-neutral-grayish-blue);
}

.fw-400 {
    font-weight: var(--fw-400);
}

.fw-700 {
    font-weight: var(--fw-700);
}

.fs-900 {
    font-size: 200%;
}

.lower-opacity {
    opacity: .7;
}

/* ********************** */
/* GENERAL STYLING */
/* ********************** */

body {
    font-family: var(--ff);
    font-size: var(--fs);
    background-color: var(--color-neutral-light-gray);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

h1 {
    font-size: 175%;
    padding-bottom: 1.5rem;
}

h2 {
    font-size: 125%;
    padding-bottom: 1.5rem;
}

p{
    line-height: 1.8;
}

button {
    cursor: pointer;
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    border: none;
    border-radius: .5rem;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);

}

button:hover{
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.section {
    display: grid;    
    border-radius: 1rem;
    box-shadow: 0 0 20px 1px var(--color-neutral-grayish-blue);
}

.article {
    padding: 1.5rem;
}

.article:nth-child(1) {
    border-radius: 1rem 1rem 0 0;
}

.article:nth-child(3) {
    border-radius: 0 0 1rem 1rem;
}

.price{    
    display: flex;    
    align-items: center;    
}

.price span:last-child{
    margin-left: .7rem;
}

.attribution{
    margin-top: 2rem;
    text-align: center;
}

@media screen and (min-width: 600px){
    .section{
        max-width: 50rem;
        grid-template-columns: 1fr 1fr;
    }

    .article{
        padding: 2.5rem;
    }

    .article:nth-child(1){
        grid-column: span 2;
        border-radius: 1rem 1rem 0 0;
    }   

    .article:nth-child(2) {
        border-radius: 0 0 0 1rem;
    }
    
    .article:nth-child(3) {
        border-radius: 0 0 1rem 0;
    }
}