/* ------------------- */
/* Custom properties   */
/* ------------------- */
:root {
  --clr-violet-300: 264 82% 70%;
  --clr-violet-400: 263 55% 52%;
  --clr-blue-400: 217 19% 35%;
  --clr-blue-500: 219 29% 14%;
  --clr-neutral-100: 0 0% 100%;
  --clr-neutral-200: 0 0% 81%;
  --clr-neutral-300: 210 46% 95%;

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

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

  --fw-500: 500;
  --fw-600: 600;
}

/* ------------------- */
/* Reset               */
/* ------------------- */

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

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

/* 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;
  font-size: var(--fs-400);
  font-family: var(--ff-sans-cond);
  font-weight: var(--fw-500);
  background-color: hsl(var(--clr-neutral-300));
}

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

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

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

h1,
h2,
h3 {
  line-height: 1.3;
}

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

.grid {
  display: grid;
  gap: var(--grid-gap, 1rem);
}

.space-y > *:where(:not(:first-child)) {
  margin-top: var(--space, 1rem);
}

/* ------------------- */
/* Utility             */
/* ------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bg-violet-400 {
  background-color: hsl(var(--clr-violet-400));
}
.bg-blue-400 {
  background-color: hsl(var(--clr-blue-400));
}
.bg-blue-500 {
  background-color: hsl(var(--clr-blue-500));
}
.bg-neutral-100 {
  background-color: hsl(var(--clr-neutral-100));
}
.bg-neutral-200 {
  background-color: hsl(var(--clr-neutral-200));
}
.bg-neutral-300 {
  background-color: hsl(var(--clr-neutral-300));
}

.text-blue-400 {
  color: hsl(var(--clr-blue-400));
}
.text-neutral-100 {
  color: hsl(var(--clr-neutral-100));
}
.text-neutral-200 {
  color: hsl(var(--clr-neutral-200));
}
.text-neutral-300 {
  color: hsl(var(--clr-neutral-300));
}

.border-violet-300 {
  border: 2px solid hsl(var(--clr-violet-300));
}

.text-center {
  text-align: center;
}

/* ------------------- */
/* Block               */
/* ------------------- */
.container {
  place-items: center;
  grid-template-rows: 1fr auto 1fr;
  grid-template-areas:
    "header"
    "main"
    "footer";
  min-height: 100vh;
  min-width: fit-content;
  padding: 1rem 1.5rem;
}

.container > main {
  grid-area: main;
}

.container > footer {
  grid-area: footer;
  align-self: end;
}

section.testimonials {
  --grid-gap: 1.5rem;
  grid-auto-columns: 1fr;
  grid-template-areas:
    "one"
    "two"
    "three"
    "four"
    "five";
  width: min(90%, 70rem);
  margin-inline: auto;
}

section.testimonials > .testimonial:nth-child(1) {
  grid-area: one;
  background-image: url(/assets/bg-pattern-quotation.svg);
  background-repeat: no-repeat;
  background-position: top right 15%;
}

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

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

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

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

@media (min-width: 35em) {
  section.testimonials {
    grid-template-areas:
      "one one"
      "two three"
      "four four"
      "five five";
  }
}

@media (min-width: 55em) {
  section.testimonials {
    grid-template-areas:
      "one one two"
      "three four four"
      "five five five";
  }
}

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

.testimonial {
  padding: 2rem;
  box-shadow: 40px 60px 50px -47px hsl(var(--clr-blue-400) / 0.25);
  border-radius: 8px;
}

.testimonial .flex {
  align-items: center;
}

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

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

.testimonial .designation {
  font-size: var(--fs-300);
  font-weight: var(--fw-500);
  line-height: 1;
  opacity: 0.5;
  margin-top: 0.25rem;
}

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

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