/* Testimonials module — uses the site's tokens from style.css */
.testimonials { padding: 5rem 1.5rem 5.4rem; max-width: var(--max); margin-inline: auto; }
.tm-carousel { position: relative; }
.tm-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.2rem;
  padding: 0.95rem 0.2rem 1.1rem;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.tm-track::-webkit-scrollbar { display: none; }
.tm-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 1rem; }
.tm-card {
  position: relative;
  flex: 0 0 calc((100% - 2.5rem) / 3);
  scroll-snap-align: start;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 1.5rem;
  padding: 1.6rem 1.45rem 1.35rem;
  box-shadow: 6px 6px 0 var(--tint);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tm-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--accent); }
.tm-card--accent { background: var(--accent-soft); }
.tm-mark {
  position: absolute;
  top: 0.6rem;
  left: 1.1rem;
  font-size: 4.2rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.18;
  font-family: Georgia, serif;
  pointer-events: none;
}
.tm-sample {
  position: absolute;
  top: -0.7rem;
  right: 1.2rem;
  background: var(--paper);
  color: var(--muted);
  border: 1.5px dashed var(--muted);
  border-radius: 999px;
  padding: 0.05rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  transform: rotate(-3deg);
}
.tm-stars { display: flex; gap: 0.15rem; font-size: 1.05rem; line-height: 1; direction: rtl; }
.tm-stars span { color: #D5D9D0; }
.tm-stars span.on { color: var(--gold); }
.tm-quote { margin: 0; flex: 1; }
.tm-quote p { font-size: 1.04rem; line-height: 2; color: var(--ink); }
.tm-person { display: flex; align-items: center; gap: 0.75rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.tm-avatar { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--ink); flex: 0 0 auto; }
.tm-avatar--initial { display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 1.15rem; }
.tm-card--accent .tm-avatar--initial { background: var(--ink); }
.tm-who { display: flex; flex-direction: column; line-height: 1.6; min-width: 0; }
.tm-who strong { font-size: 0.98rem; }
.tm-who span { font-size: 0.85rem; color: var(--muted); }
.tm-link { margin-inline-start: auto; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); font-weight: 700; }
.tm-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.tm-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.8rem; }
.tm-controls .work-btn { width: 2.75rem; height: 2.75rem; }
.tm-dots { display: flex; gap: 0.4rem; }
.tm-dots i { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: #C6CEC3; transition: width 0.3s var(--ease), background 0.3s; }
.tm-dots i.is-on { width: 1.4rem; background: var(--accent); }

@media (max-width: 1000px) {
  .tm-card { flex-basis: calc((100% - 1.25rem) / 2); }
}
@media (max-width: 800px) {
  .testimonials { padding: 3.4rem 0 3.6rem; }
  .testimonials .section-head { padding-inline: 1.25rem; }
  .tm-track { gap: 0.9rem; padding: 0.9rem 1.25rem 1rem; scroll-padding-inline: 1.25rem; }
  .tm-card { flex-basis: calc(100vw - 4.2rem); max-width: 24rem; padding: 1.4rem 1.2rem 1.15rem; box-shadow: 5px 5px 0 var(--tint); }
  .tm-card:hover { transform: none; box-shadow: 5px 5px 0 var(--tint); }
  .tm-track::after { content: ""; flex: 0 0 0.35rem; }
  .tm-quote p { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-card, .tm-dots i { transition: none; }
}
.tm-dots i[hidden], .tm-controls[hidden] { display: none; }
