/* ==========================================================================
   TESTIMONIALS — LIVING COMMUNITY SHOWCASE — Evolve Up Fitness (Phase 5)
   ==========================================================================
   Isolated, additive replacement of .testimonials__row and
   .testimonials__dots only — the section header, including the real
   rating-line elements (#testimonialsRatingLine/#testimonialsRatingText),
   is untouched. To roll back: restore the previous markup in index.html
   and remove this file's <link>/<script> tags — the original
   renderTestimonials() function in cms-render.js is left intact and
   unused for exactly this reason, same pattern as every prior section.

   Reuses the site's existing --accent, --ease, --radius, --glass-fill,
   --glass-border, --text-secondary tokens from main.css — same brand
   language as every other section, not a new one.

   "Living" means quiet, ambient presence — not more motion. Every
   continuous animation here is deliberately more restrained than
   Hero/Membership, per the approved spec's explicit clarification.
   ========================================================================== */

.showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 48px;
  align-items: start;
}

/* Varying visual weight by real content length — a genuinely longer
   real review gets more room, not an artificial hierarchy. JS applies
   this class when a review's text exceeds a length threshold. */
.showcase__card.is-substantial {
  grid-column: span 2;
}
@media (max-width: 900px) {
  .showcase__card.is-substantial { grid-column: span 1; }
}

.showcase__card {
  position: relative;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px 26px;
  /* Foundation refactor: was 14px, an unexplained one-off value that
     didn't match either dominant site-wide blur tier. Converged onto
     --blur-standard (16px) — visually negligible difference, genuine
     token consolidation per DESIGN_TOKEN_AUDIT.md. */
  backdrop-filter: blur(var(--blur-standard));
  -webkit-backdrop-filter: blur(var(--blur-standard));
  opacity: 0;
  transform: translateY(14px);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
/* Phase D: was `animation: showcase-card-in 0.7s var(--ease) forwards`
   directly on this rule — fired the instant the data fetch resolved,
   not when a visitor actually scrolled to Testimonials. Same fix as
   Transformations Spotlight: gated behind a class added by an
   IntersectionObserver on the wrapper (see
   js/testimonials-showcase.js). */
#showcaseMount.is-revealed .showcase__card {
  animation: showcase-card-in 0.7s var(--ease) forwards;
}
@keyframes showcase-card-in {
  to { opacity: 1; transform: translateY(0); }
}
.showcase__card:hover,
.showcase__card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(42, 167, 155, 0.3);
}

.showcase__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.showcase__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(42, 167, 155, 0.3);
  flex-shrink: 0;
}
.showcase__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.showcase__stars {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* Conversation, not advertisement — natural body-text treatment, not a
   glossy pull-quote. No oversized italics, no heavy quotation marks. */
.showcase__text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.showcase__text::before {
  content: '\201C';
  color: var(--text-tertiary);
  margin-right: 2px;
}
.showcase__text::after {
  content: '\201D';
  color: var(--text-tertiary);
  margin-left: 2px;
}

/* Small, quiet — never competing with the review text for attention. */
.showcase__verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(66, 133, 244, 0.1);
  border: 1px solid rgba(66, 133, 244, 0.3);
  font-size: 0.74rem;
  font-weight: 600;
  color: #3FBDB0;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}
.showcase__verified:hover { background: rgba(66, 133, 244, 0.18); }

/* Video testimonial — a real, functional play affordance. */
.showcase__watch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--text-primary);
}
.showcase__watch-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-solid, var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease);
}
.showcase__card:hover .showcase__watch-play { transform: scale(1.08); }
.showcase__watch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ------------------------------------------------------------- MOBILE */
@media (max-width: 640px) {
  .showcase { grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }
  .showcase__card { padding: 22px 20px; }
  /* Real reduction, not cosmetic — same lesson from the Membership Ring
     and Hero audits, applied here from the start rather than found
     later. Glassmorphism blur is genuinely expensive to composite. */
  .showcase__card { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
}

/* --------------------------------------------------- REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .showcase__card { animation: none !important; opacity: 1; transform: none; }
  .showcase__card, .showcase__verified, .showcase__watch-play { transition: none !important; }
}
