/* ==========================================================================
   Testimonials — page-specific layout
   Uses shared tokens/components from main.css. No hard-coded palette values.
   ========================================================================== */

/* ---- Hero: rating summary panel ---- */
.rating-summary {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--sp-10);
  align-items: center;
  text-align: left;
  max-width: 900px;
  margin: var(--sp-12) auto 0;
  padding: var(--sp-8) var(--sp-10);
}
.rs-score { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
.rs-num {
  display: flex; align-items: baseline; gap: 4px;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1;
}
.rs-num .big { font-size: clamp(3.4rem, 2rem + 5vw, 5rem); color: var(--text-0); }
.rs-num .out { font-size: 1.5rem; color: var(--text-3); }
.rating-summary .stars svg { width: 22px; height: 22px; }
.rs-meta { color: var(--text-2); font-size: var(--fs-sm); }
.rs-meta strong { color: var(--text-0); font-weight: 600; }
.rs-source {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--text-3); text-transform: uppercase;
}
.rs-source svg { width: 15px; height: 15px; color: var(--emerald-bright); }

.rb-list { display: flex; flex-direction: column; gap: var(--sp-3); width: 100%; }
.rb-row { display: grid; grid-template-columns: 44px 1fr 46px; align-items: center; gap: var(--sp-4); }
.rb-star {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-2);
}
.rb-star svg { width: 13px; height: 13px; color: var(--gold); fill: currentColor; }
.rb-row .meter { width: 100%; }
.rb-row .meter > span { transition: width 1s var(--ease-out); }
.rb-pct { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); text-align: right; }

/* ---- Filter chips ---- */
.filter-bar {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-10);
}
.filter-bar .chip .cnt {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-3); margin-left: 2px;
}
.filter-bar .chip.is-active .cnt { color: inherit; opacity: 0.7; }

/* ---- Masonry review wall (CSS columns) ---- */
.reviews-wall {
  columns: 3;
  column-gap: var(--sp-6);
}
.reviews-wall .testimonial {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  height: auto;
  margin: 0 0 var(--sp-6);
}
.reviews-wall .testimonial .quote { font-size: 0.98rem; }
.t-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.t-verified {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: var(--r-pill);
  color: var(--emerald-bright);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.22);
  white-space: nowrap;
}
.t-verified svg { width: 13px; height: 13px; }

/* Avatar accent variants for visual variety */
.avatar.av-blue { background: linear-gradient(135deg, var(--blue-bright), var(--blue-deep)); color: #04121f; }
.avatar.av-gold { background: var(--grad-gold); color: #2a1c02; }
.avatar.av-emerald { background: var(--grad-emerald); color: #04120c; }

/* Empty state (shown by JS when a filter has no matches — safety) */
.wall-empty {
  display: none;
  text-align: center; color: var(--text-2);
  padding: var(--sp-12) 0;
}

/* ---- Featured video testimonials ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.vt-card {
  display: flex; flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.vt-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  overflow: hidden;
}
.vt-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 8, 22, 0.65));
}
.vt-a { background: radial-gradient(90% 90% at 20% 15%, rgba(16, 185, 129, 0.35), transparent 60%), linear-gradient(140deg, var(--bg-3), var(--bg-inset)); }
.vt-b { background: radial-gradient(90% 90% at 80% 20%, rgba(59, 130, 246, 0.35), transparent 60%), linear-gradient(140deg, var(--bg-3), var(--bg-inset)); }
.vt-c { background: radial-gradient(90% 90% at 50% 15%, rgba(245, 184, 61, 0.3), transparent 60%), linear-gradient(140deg, var(--bg-3), var(--bg-inset)); }
.vt-play {
  position: relative; z-index: 2;
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad-emerald); color: #04120c;
  border: 0; cursor: pointer;
  box-shadow: 0 14px 34px -12px rgba(16, 185, 129, 0.65);
  transition: transform var(--t-med) var(--ease-spring);
}
.vt-play svg { width: 26px; height: 26px; fill: currentColor; margin-left: 3px; }
.vt-play:hover, .vt-play:focus-visible { transform: scale(1.08); }
.vt-play::before {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.4);
  animation: vt-ping 2.6s var(--ease-out) infinite;
}
@keyframes vt-ping { 0% { transform: scale(1); opacity: 0.7; } 70%, 100% { transform: scale(1.35); opacity: 0; } }
/* Chips sit on the dark scrim over the thumbnail art, so their text stays
   light in both themes rather than following the (dark) light-mode token. */
:root[data-theme='light'] .vt-dur,
:root[data-theme='light'] .vt-tag { color: #f6f9ff; }
.vt-dur {
  position: absolute; z-index: 2; bottom: 12px; right: 12px;
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 3px 8px; border-radius: var(--r-xs);
  background: rgba(5, 8, 22, 0.7); color: var(--text-1);
  border: 1px solid var(--glass-border); backdrop-filter: blur(6px);
}
.vt-tag {
  position: absolute; z-index: 2; top: 12px; left: 12px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(5, 8, 22, 0.65); color: var(--text-0);
  border: 1px solid var(--glass-border); backdrop-filter: blur(6px);
}
.vt-body { padding: var(--sp-5) var(--sp-6) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); flex: 1; }
.vt-body h3 { font-size: var(--fs-h4); line-height: 1.3; }
.vt-body .author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.vt-body .author .name { color: var(--text-0); font-weight: 600; font-size: 0.9rem; }
.vt-body .author .role { color: var(--text-2); font-size: 0.8rem; }

/* ---- Verification band ---- */
.verify-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
.verify-grid .feature-card h3 { font-size: 1.02rem; }
.verify-grid .feature-card p { font-size: var(--fs-sm); color: var(--text-2); }

/* ---- Join CTA panel ---- */
.join-cta {
  position: relative; overflow: hidden;
  text-align: center;
  padding: clamp(var(--sp-10), 6vw, var(--sp-24)) var(--sp-8);
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(16, 185, 129, 0.12), transparent 60%),
    linear-gradient(180deg, var(--glass-2), var(--glass));
}
.join-cta .jc-inner { position: relative; z-index: 2; max-width: 620px; margin-inline: auto; }
.join-cta h2 { margin: var(--sp-4) 0; }
.join-cta .lead { max-width: 520px; }
.jc-note { font-size: 0.82rem; margin-top: var(--sp-8); max-width: 560px; margin-inline: auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .reviews-wall { columns: 2; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .verify-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .rating-summary { grid-template-columns: 1fr; gap: var(--sp-8); padding: var(--sp-6); text-align: center; }
  .rs-score { align-items: center; }
  .rb-row { grid-template-columns: 40px 1fr 42px; }
}
@media (max-width: 620px) {
  .reviews-wall { columns: 1; }
  .video-grid { grid-template-columns: 1fr; }
  .verify-grid { grid-template-columns: 1fr; }
}
