/* Custom properties */
:root {
    --clr-primary-1-bg: hsl(263, 55%, 52%);
    --clr-primary-2-bg: hsl(217, 19%, 35%);
    --clr-primary-3-bg: hsl(219, 29%, 14%);
    --clr-primary-1-general: hsl(0, 0%, 100%);
    --clr-primary-1-border: hsl(262, 73%, 68%);
    --clr-neutral-1-text: hsl(0, 0%, 81%);
    --clr-neutral-1-bg: hsl(210, 46%, 95%);

    --ff-primary: "Barlow Semi Condensed", sans-serif;

    --fw-medium: 500;
    --fw-semibold: 600;

    --fs-light: 0.6875rem;
    --fs-regular: 0.8125rem;
    --fs-medium: 1.25rem;
}

/* CSS Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
}

body {
    height: 100%;
}

/* body {
    line-height: 1.5;
} */

canvas,
img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* Utility classes */
.flex {
    display: flex;
    align-items: center;
    gap: 1em;
}

.testimonial {
    padding: 2em;
    border-radius: 0.5em;
    box-shadow: 0.25em 0.25em 1em var(--clr-neutral-1-text);
}

.face {
    min-width: 1.75em;
    max-width: 1.75em;
    aspect-ratio: 1;
    border-radius: 50%;
}

.headline {
    font-size: var(--fs-medium);
    font-weight: var(--fw-semibold);
    line-height: 1.25;
    margin-block: 0.5em;
}

.text {
    color: var(--clr-neutral-1-text);
    opacity: 0.7;
}

/* Components */
html {
    display: flex;
    justify-content: center;
    align-items: center;
}

body {
    display: grid;
    place-content: center;
    gap: 5em;
    padding: 2em;
    font-family: var(--ff-primary);
    font-weight: var(--fw-medium);
    font-size: var(--fs-regular);
    background-color: var(--clr-neutral-1-bg);
}

.testimonial-grid {
    display: grid;
    grid-template-areas:
        "one"
        "two"
        "three"
        "four"
        "five";
    grid-auto-columns: 1fr;
    gap: 2em;
}

.testimonial:nth-child(1) {
    grid-area: one;
}

.testimonial:nth-child(2) {
    grid-area: two;
}

.testimonial:nth-child(3) {
    grid-area: three;
}

.testimonial:nth-child(4) {
    grid-area: four;
}

.testimonial:nth-child(5) {
    grid-area: five;
}

.testimonial:nth-child(1) {
    background-color: var(--clr-primary-1-bg);
}

.quote {
    background-image: url("images/bg-pattern-quotation.svg");
    background-repeat: no-repeat;
    background-position: top right 10%;
}

.testimonial:nth-child(2) {
    background-color: var(--clr-primary-2-bg);
}

.testimonial:nth-child(3),
.testimonial:nth-child(5) {
    background-color: var(--clr-primary-1-general);
}

.testimonial:nth-child(4) {
    background-color: var(--clr-primary-3-bg);
}

.testimonial:nth-child(1) .face {
    border: 0.125em solid var(--clr-primary-1-border);
}

.testimonial:nth-child(4) .face {
    border: 0.125em solid var(--clr-primary-1-bg);
}

.name {
    font-size: var(--fs-regular);
    font-weight: var(--fw-semibold);
}

.position {
    color: var(--clr-neutral-1-text);
    font-size: var(--fs-light);
}

.testimonial:nth-child(1) .name,
.testimonial:nth-child(2) .name,
.testimonial:nth-child(4) .name,
.assessment-1 p:first-of-type,
.assessment-2 p:first-of-type,
.assessment-4 p:first-of-type {
    color: var(--clr-primary-1-general);
}

.attribution {
    font-size: 11px;
    text-align: center;
}

.attribution a {
    color: hsl(228, 45%, 44%);
}

@media (min-width: 50em) {
    body {
        max-width: min(90%, 100em);
    }

    .testimonial-grid {
        grid-template-areas:
            "one one two five"
            "three four four five";
    }
}
