:root {
    --font-primary: 'Barlow Semi Condensed', sans-serif;

    --fw-500: 500;
    --fw-600: 600;
    
    --fs-300: 0.6875rem;
    --fs-400: 0.8125rem;
    --fs-500: 1.25rem;

    --purple-50: hsl(260, 100%, 95%);
    --purple-300: hsl(264, 82%, 80%);
    --purple-500: hsl(263, 55%, 52%);
    --white: hsl(0, 0%, 100%);
    --grey-100: hsl(214, 17%, 92%);
    --grey-200: hsl(0, 0%, 81%);
    --grey-400: hsl(224, 10%, 45%);
    --grey-500: hsl(217, 19%, 35%);
    --dark-blue: hsl(219, 29%, 14%);
    --black: hsl(0, 0%, 7%);
}

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

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
}

body {
    min-height: 100vh;
    display: grid;
    place-content: center center;
    padding: 1rem;

    font-family: var(--font-primary);
    font-weight: var(--fw-500);

    background-color: var(--grey-100);
}

.wrapper {
    display: grid;
    gap: 2rem;
    justify-items: center;
}

h1,
h2,
h3 {
    font-weight: var(--fw-600);
}

/* Utilities */
.flex-content {
    display: flex;
    gap: 1rem;
}

.flow > :where(:not(:first-child)) {
    margin-top: 1em;
}

.bg-color-purple-500 {
    background-color: var(--purple-500);
}
.bg-color-grey-500 {
    background-color: var(--grey-500);
}
.bg-color-white {
    background-color: var(--white);
}
.bg-color-dark-blue {
    background-color: var(--dark-blue);
}
.text-color-white {
    color: var(--white);
}

.text-color-dark-blue {
    color: var(--dark-blue);
}

/* Components */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-auto-columns: 1fr;
    grid-template: 
        "one"
        "two"
        "three"
        "four"
        "five";

    padding-block: 2rem;
    width: min(95%, 70rem);
    margin-inline: auto;
}

.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;
}

@media (min-width: 33em) {
    .grid {
        grid-template-areas:
        "one one"
        "two three"
        "five five"
        "four four";
    }
}
  
@media (min-width: 38em) {
    .grid {
      grid-template-areas:
       'one one'
       'two five'
       'three five'
       'four four';
    }
}
  
@media (min-width: 54em) {
    .grid {
        grid-template-areas:
        "one one two"
        "five five five"
        "three four four";
    }
  }
  
@media (min-width: 75em) {
    .grid {
        grid-template-areas:
        "one one two five"
        "three four four five";
    }
}

.testimonial {
    font-size: var(--fs-300);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 2.5rem 3.75rem 3rem -3rem var(--grey-500);
}

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

.testimonial img {
    width: 2rem;
    aspect-ratio: 1;
    border-radius: 50%;
}

.testimonial .name {
    font-size: var(--fs-400);
    font-weight: var(--fw-500);
    line-height: 1;
}

.testimonial .position {
    font-size: var(--fs-300);
    opacity: 0.5;
}

.testimonial > p:first-of-type {
    font-size: var(--fs-500);
    line-height: 1.25;
}

.testimonial > p:last-of-type {
    opacity: 0.7;
}

.attribution {
    font-size: 11px; 
    text-align: center; 
}
.attribution a {
    color: hsl(228, 45%, 44%); 
}

.attribution a:hover,
a:active {
    color: blueviolet;
}
