/* ==========================================================================
   METRIX LAB - testimonials.css
   Social-proof cards. Self-contained hover (NO base .card class) so the
   pointer tilt from js/interactions.js fully owns the transform without
   fighting the global card-lift rule. Degrades to a static card if JS is off.
   ========================================================================== */
.testimonials__glow {
  position: absolute;
  bottom: 0;
  right: 8%;
  width: min(620px, 70%);
  height: 320px;
  background: radial-gradient(50% 50% at 70% 60%, var(--color-accent-tint), transparent 70%);
  z-index: var(--z-decor);
  pointer-events: none;
  filter: blur(12px);
}

.testimonials__grid {
  position: relative;
  z-index: var(--z-content);
}

.testimonial {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
  background-color: var(--color-surface);
  border: 1px solid var(--color-grey-700);
  border-radius: var(--radius-card);
  /* tilt JS sets these custom props; default is flat */
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition:
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
  will-change: transform;
}

.testimonial__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}
.testimonial__result {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent-tint);
  border: 1px solid var(--color-accent-tint-2);
  color: var(--color-accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.testimonial__mark {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 0.6;
  color: var(--color-accent);
  opacity: 0.35;
  height: 1.4rem;
}

.testimonial__stars {
  display: inline-flex;
  gap: 0.15rem;
  color: var(--color-amber);
}
.testimonial__stars svg { width: 1.05rem; height: 1.05rem; }

.testimonial__quote {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-body);
  flex: 1;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color-soft);
}
.testimonial__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--gradient-accent);
  color: var(--color-text-on-accent);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
}
.testimonial__meta { display: flex; flex-direction: column; }
.testimonial__name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  font-size: var(--fs-sm);
}
.testimonial__role {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* Forced-colors: keep the gradient avatar legible */
@media (forced-colors: active) {
  .testimonial__avatar { background: ButtonFace; color: ButtonText; }
}

/* Under reduced motion, never tilt - keep cards flat and calm */
@media (prefers-reduced-motion: reduce) {
  .testimonial {
    transform: none;
    will-change: auto;
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  }
}
