/* PRINCIPIOS
   Panel a pantalla casi completa con tres principios que rotan.
   Cuando haya testimonios autorizados ocupan este mismo lugar: basta
   con cambiar la lista en script.js. */
.clients {
  padding: 0 var(--edge);
}

.clients-image {
  position: relative;
  display: grid;
  min-height: 520px;
  padding: clamp(28px, 6vw, 104px) max(clamp(20px, 6.2vw, 90px), calc(var(--gutter) + 12px)) clamp(24px, 3.6vw, 54px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--night-deep);
  color: #fff;
}

.client-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clients-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(7, 11, 44, .86) 0%, rgba(7, 11, 44, .58) 52%, rgba(7, 11, 44, .28) 100%);
  pointer-events: none;
}

.client-main,
.client-reach,
.client-dots {
  position: relative;
  z-index: 1;
}

.client-main {
  max-width: 640px;
  grid-row: 2;
}

.client-marker,
.client-reach > i {
  display: block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--star-yellow);
}

.client-main h2 {
  margin-top: 10px;
  font-size: clamp(2.5rem, 5.85vw, 5.25rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.043em;
  text-wrap: balance;
}

/* Las tres frases no miden lo mismo: el alto mínimo evita que la
   firma salte al cambiar de una a otra. */
.client-main > p {
  min-height: 4.5em;
  margin-top: clamp(36px, 7vw, 110px);
  font-size: clamp(1.375rem, 2.1vw, 1.875rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: pretty;
}

.client-person {
  display: flex;
  margin-top: clamp(24px, 2.8vw, 40px);
  gap: clamp(14px, 1.6vw, 24px);
  align-items: center;
}

.client-person img {
  width: clamp(64px, 7vw, 104px);
  height: clamp(64px, 7vw, 104px);
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.client-person span {
  display: flex;
  gap: 6px;
  flex-direction: column;
}

.client-person b {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
}

.client-person small {
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: 0;
}

.client-reach {
  display: flex;
  gap: 12px;
  grid-row: 1;
  align-items: flex-start;
  font-size: clamp(0.875rem, 1.25vw, 1.125rem);
  line-height: 1.38;
}

.client-reach > i {
  margin-top: .45em;
}

.client-dots {
  display: flex;
  padding: 0 4px;
  grid-row: 3;
  justify-self: start;
  border-radius: 20px;
  background: rgba(255, 255, 255, .2);
}

/* El punto mide 6px, pero el botón ofrece 30x44 para el dedo. */
.client-dots button {
  display: grid;
  width: 30px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
}

.client-dots button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  transition: background-color .3s ease, transform .3s ease;
}

.client-dots button[aria-pressed="true"]::before {
  background: var(--star-yellow);
  transform: scale(1.4);
}

@media (min-width: 900px) {
  .clients-image {
    min-height: min(940px, calc(100vh - var(--edge) * 2));
    min-height: min(940px, calc(100svh - var(--edge) * 2));
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto;
  }

  .client-main {
    grid-column: 1;
    grid-row: 1;
  }

  .client-reach {
    grid-column: 2;
    grid-row: 1;
    flex-direction: row-reverse;
    text-align: right;
  }

  .client-dots {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
