@font-face {
  font-family: Barlow;
  src: local("Poppins"), url("./assets/fonts/BarlowSremiCondensed-Regular.ttf");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* Primary */
  --violet: hsl(263, 55%, 52%);
  --very-dark-grayish-blue: hsl(217, 19%, 35%);
  --very-dark-blackish-blue: hsl(219, 29%, 14%);
  --white: hsl(0, 0%, 100%);
  /* Neutral */
  --light-gray: hsl(0, 0%, 81%);
  --light-grayish-blue: hsl(210, 46%, 95%);
  --fw-600: 600;
}

/* RESET */
/* Josh Comeau custom css reset */
/* https://www.joshwcomeau.com/css/custom-css-reset/ */
/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/* BASE STYLES */

.sr-only {
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  -webkit-clip-path: inset(50%) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  overflow: hidden !important;
  margin: -1px !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}

body {
  font-family: Barlow;
  min-height: 100dvh;
  background-color: var(--light-grayish-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

p {
  font-size: 0.8125rem;
}

.user-reviews {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-block: 1rem;
  width: min(90%, 65rem);
  margin-inline: auto;
}

.user-review {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 1rem;
  max-width: 25rem;
  padding-block: 1.5rem;
  padding-inline: 2.5rem;
  border-radius: 1rem;
  background-color: white;
}

.user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-pic {
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
}

.is-verified {
  opacity: 0.5;
}

.title {
  font-weight: var(--fw-600);
  line-height: 1.1;
  font-size: 1.25rem;
}

.sub-title {
  opacity: 0.7;
  line-height: 1.3;
}

.user-review:nth-child(1) {
  background: url("./assets/images/bg-pattern-quotation.svg");
  background-repeat: no-repeat;
  background-position-x: 90%;
  background-color: var(--violet);
}
.user-review:nth-child(2) {
  background-color: var(--very-dark-grayish-blue);
}
.user-review:nth-child(4) {
  background-color: var(--very-dark-blackish-blue);
}

.user-review:nth-child(1) .user > img,
.user-review:nth-child(4) .user > img {
  border: 0.3rem solid var(--violet);
}

.white {
  color: var(--white);
}
/* auto-fill */
@media screen and (min-width: 37.5rem) and (max-width: 62.5rem) {
  .user-reviews {
    display: grid;
    grid-template-columns: repeat(2, minmax(15.625rem, 1fr));
    margin-inline: 2rem;
    align-items: stretch;
  }
  .user-review {
    max-width: none;
  }
  .user-review:nth-child(1) {
    grid-column: 1 / 3;
  }
  .user-review:nth-child(4) {
    grid-column: 1 / 3;
  }
  .user-review:last-child {
    grid-row: 2 / 4;
    grid-column: 2;
  }
}

@media screen and (min-width: 62.6rem) {
  .user-reviews {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0 auto;
    align-items: stretch;
  }
  .user-review {
    max-width: none;
  }
  .user-review:nth-child(1) {
    grid-column: 1 / 3;
    background-position-x: 80%;
    background-position-y: 5%;
  }
  .user-review:nth-child(3) {
    grid-row: 2;
  }
  .user-review:nth-child(4) {
    grid-row: 2;
    grid-column: 2 / 4;
  }
  .user-review:last-child {
    grid-column: 4;
    grid-row: 1/3;
  }
}
