:root {
  /* Colors */
  --clr-magenta-dark: hsl(300, 43%, 22%);
  --clr-pink-soft: hsl(333, 80%, 67%);
  --clr-magenta-grayish: hsl(303, 10%, 53%);
  --clr-magenta-light: hsl(300, 24%, 96%);
  --clr-white: hsl(0, 0%, 100%);

  /* Typography Specs */
  --ff-sans: 'League Spartan', sans-serif;
  --fs-base: 15px;
  
  /* Layout Spacing */
  --gap-mobile: 1.5rem;
  --gap-desktop: 1.875rem;
}

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

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  line-height: 1.4;
  background-color: var(--clr-white);
  color: var(--clr-magenta-grayish);
  min-height: 100vh;
  display: grid;
  place-content: center;
  padding: 5.3rem 1.5rem;
  
  /* Mobile Background Pattern Setup */
  background-image: url('images/bg-pattern-top-mobile.svg'), url('images/bg-pattern-bottom-mobile.svg');
  background-repeat: no-repeat, no-repeat;
  background-position: top left, bottom right;
}

/* Accessibility: Structural Screen Reader Only 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;
}

.container {
  width: 100%;
  max-width: 1110px;
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
}

.top-layout {
  display: flex;
  flex-direction: column;
  gap: var(--gap-mobile);
}

/* Hero Heading Layout */
.hero-header {
  text-align: center;
}

.hero-header h1 {
  font-size: clamp(2.3rem, 8vw, 3rem);
  color: var(--clr-magenta-dark);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -1.4px;
  margin-block-end: 1.5rem;
}

.hero-header p {
  font-weight: 500;
  line-height: 1.6;
}

/* Ratings Stack Layout */
.ratings-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rating-item {
  background-color: var(--clr-magenta-light);
  border-radius: 8px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.stars {
  display: flex;
  gap: 0.5rem;
}

.rating-label {
  color: var(--clr-magenta-dark);
  font-weight: 700;
}

/* Testimonial Cards Layout */
.testimonials-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gap-mobile);
}

.testimonial-card {
  background-color: var(--clr-magenta-dark);
  color: var(--clr-white);
  padding: 2.5rem 2rem;
  border-radius: 8px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-block-end: 1.6rem;
}

.profile-img {
  border-radius: 50%;
  object-fit: cover;
}

.profile-title {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.profile-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.profile-status {
  color: var(--clr-pink-soft);
  font-weight: 400;
}

.testimonial-quote p {
  font-weight: 400;
  line-height: 1.6;
}

@media (min-width: 69.375em) {
  body {
    padding: 0;
    /* Desktop Background Pattern Setup */
    background-image: url('images/bg-pattern-top-desktop.svg'), url('images/bg-pattern-bottom-desktop.svg');
    background-position: top left, bottom right;
  }

  .container {
    gap: 4.4rem;
  }

  .top-layout {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 4rem;
    align-items: center;
  }

  .hero-header {
    text-align: left;
    padding-inline-end: 1rem;
  }

  .hero-header h1 {
    font-size: 3.5rem;
  }

  /* Desktop Ratings Stagger Layout */
  .ratings-stack {
    gap: 1rem;
    width: 100%;
  }

  .rating-item {
    flex-direction: row;
    padding: 1.25rem 2rem;
    gap: 2.1rem;
    max-width: 445px;
    width: 100%;
  }

  .rating-item:nth-child(1) { align-self: flex-start; }
  .rating-item:nth-child(2) { align-self: center; margin-inline-start: 3rem; }
  .rating-item:nth-child(3) { align-self: flex-end; margin-inline-start: 6rem; }

  /* Desktop Testimonials Grid Layout */
  .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-desktop);
    height: 266px; /* Bound tracking to ensure transform translation space matches perfectly */
    align-items: start;
  }

  .testimonial-card {
    height: 234px;
  }

  .testimonial-card:nth-child(1) { transform: translateY(0); }
  .testimonial-card:nth-child(2) { transform: translateY(16px); }
  .testimonial-card:nth-child(3) { transform: translateY(32px); }
}
