/* Mobile: 375px - Desktop: 1440px */
/* Font size: 13px */
/* Family: [Barlow Semi Condensed](https://fonts.google.com/specimen/Barlow+Semi+Condensed) - Weights: 500, 600 */

:root {
    /* Colors */
    
    /* Primary Colors */
    --purple-50: hsl(260, 100%, 95%);
    --purple-300: hsl(264, 82%, 80%);
    --purple-500: hsl(263, 55%, 52%);

    /* Neutral */ 
    --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%);

    /* font */
    --ff-primary: "Barlow Semi Condensed", sans-serif;
    --fw-400: 500;
    --fw-700: 600;

    --fs-300: 0.6875rem;
    --fs-400: 0.8125rem;
    --fs-500: 1.25rem;
}

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

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

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

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

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

  font-family: var(--ff-primary);
  font-weight: var(--fw-400);

  background-color: var(--white);
}

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

/* utilities */
.flex {
  display: flex;
  gap: var(--gap, 1rem);
}

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

.bg-primary-400 {
  background: var(--purple-500);
}

.bg-secondary-400 {
  background: var(--grey-500);
}

.bg-secondary-500 {
  background: var(--dark-blue);
}

.bg-neutral-100 {
  background: var(--white);
}

.text-neutral-100 {
  color: var(--white);
}
.text-secondary-400 {
  color: var(--grey-500);
}
.border-primary-400 {
  border: 2px solid #a775f1;
}

/* components */
.testimonial-grid {
  display: grid;
  gap: 1.5rem;
  grid-auto-columns: 1fr;
  grid-template-areas:
   'one'
   'two'
   'three'
   'four'
   'five';

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

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

.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 screen and (min-width: 33em) {
  .testimonial-grid {
      grid-template-areas:
      "one one"
      "two three"
      "five five"
      "four four";
  }
}

@media screen and (min-width: 38em) {
  .testimonial-grid {
    grid-template-areas:
     'one one'
     'two five'
     'three five'
     'four four';
  }
}

@media screen and (min-width: 54em) {
  .testimonial-grid {
      grid-template-areas:
      "one one two"
      "five five five"
      "three four four";
  }
}

@media screen and (min-width: 75em) {
  .testimonial-grid {
      grid-template-areas:
      "one one two five"
      "three four four five";
  }
}

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

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

.testimonial .name {
  font-size: var(--fs-400);
  font-weight: var(--fw-400);
  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.2;
}

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