/* Anamorphics: testimonials ("What clients say"), rebuilt 2026-11-11.

   One quote on screen at a time, and the names are the navigation: the list of
   who is speaking is always visible, and choosing a name shows that quote.
   Replaces the edge-magnet carousel, whose next quote sat half cut off at the
   right edge and whose only visible controls were 7px dots.

   The quotes are real HTML rendered by index.php from php/testimonials.php, so
   they are readable with no JavaScript (stacked, one after another) and by
   search engines. js/testimonials.js adds .is-live and the behavior.

   Layout (.tq--row): the quote full width, the names in a row underneath.
   A second layout with the names in a left column was tried and dropped
   (2026-11-11); it is in git at merge bac702e.
   All the quotes sit in ONE grid cell, so the stage is always as tall as the
   longest quote and nothing below it moves when the quote changes.

   (css/kit.css still carries the old .tcar/.tslide rules. Nothing uses them.) */

.tq__wrap { max-width: 1280px; margin: 0 auto; position: relative; z-index: 2; }
.tq__eyebrow { display: block; margin-bottom: var(--s-7); }

/* ---- the quotes ---------------------------------------------------------- */
.tq__stage { position: relative; display: grid; grid-template-columns: 64px 1fr; column-gap: var(--s-5); align-items: start; }
.tq__mark { font-family: var(--font-serif); font-weight: 300; font-size: 96px; line-height: 0.7;
  color: var(--accent-500); margin-top: -4px; grid-row: 1 / span 2; }
.tq__quotes { display: grid; gap: var(--s-8); margin: 0; padding: 0; touch-action: pan-y; }
.tq__q { margin: 0; }
.tq__q .am-quote__body { font-size: clamp(24px, 2.5vw, 38px); line-height: 1.34; max-width: 31ch; text-wrap: pretty; }

/* live: stack every quote in the same cell and show one */
.tq.is-live .tq__quotes { gap: 0; }
.tq.is-live .tq__q { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), visibility 0s linear 260ms; }
.tq.is-live .tq__q.is-on { opacity: 1; visibility: visible; transform: none;
  transition: opacity 520ms var(--ease-out) 180ms, transform 620ms var(--ease-out) 180ms, visibility 0s; }
.tq.is-live .tq__q .am-quote__cite { opacity: 0; transition: opacity 400ms var(--ease-out); }
.tq.is-live .tq__q.is-on .am-quote__cite { opacity: 1; transition-delay: 420ms; }

/* ---- controls: counter + previous / next --------------------------------- */
.tq__ctl { display: none; grid-column: 2; align-items: center; gap: var(--s-5); margin-top: var(--s-7); }
.tq.is-live .tq__ctl { display: flex; }
.tq__count { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--fg-3); min-width: 7ch; }
.tq__count b { font-weight: 400; color: var(--fg); }
.tq__arrows { display: flex; gap: 10px; }
.tq__btn { width: 52px; height: 52px; padding: 0; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--fg); border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-size: 18px; line-height: 1;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out); }
.tq__btn span { display: block; transition: transform var(--dur-base) var(--ease-out); }
.tq__btn:hover { background: var(--accent-500); border-color: var(--accent-500); color: var(--ink-900); }
.tq__btn[data-dir="1"]:hover span { transform: translateX(3px); }
.tq__btn[data-dir="-1"]:hover span { transform: translateX(-3px); }
.tq__btn:focus-visible, .tq__name:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }

/* ---- the names ----------------------------------------------------------- */
.tq__names { display: none; list-style: none; margin: 0; padding: 0; }
.tq.is-live .tq__names { display: block; }
.tq__name { position: relative; display: flex; flex-direction: column; gap: 5px; width: 100%;
  padding: 14px 0 15px; text-align: left; cursor: pointer;
  background: none; border: 0; border-top: 1px solid var(--line); color: var(--fg-3);
  transition: color var(--dur-base) var(--ease-out), padding-left var(--dur-base) var(--ease-out); }
.tq__n { font-family: var(--font-sans); font-weight: 500; font-size: 14px; letter-spacing: 0.01em; }
.tq__o { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); }
.tq__name:hover { color: var(--fg-2); }
.tq__name[aria-current="true"] { color: var(--fg); }
/* the sage line over the current name. While the quotes advance on their own
   it fills left to right as the timer; once the reader has chosen, it is solid. */
.tq__name::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: var(--accent-500); transform: scaleX(0); transform-origin: left center; }
.tq__name[aria-current="true"]::before { transform: scaleX(1); }
.tq.is-auto .tq__name[aria-current="true"]::before { animation: tq-fill var(--tq-auto, 9s) linear both; }
.tq.is-auto.is-held .tq__name[aria-current="true"]::before { animation-play-state: paused; }
@keyframes tq-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- layout: row (quote on top, names underneath) ------------------------ */
.tq--row .tq__wrap { display: flex; flex-direction: column; }
.tq--row .tq__eyebrow { order: 0; }
.tq--row .tq__stage { order: 1; }
.tq--row .tq__names { order: 2; }
.tq--row .tq__q .am-quote__body { font-size: clamp(26px, 3vw, 46px); max-width: 34ch; }
.tq--row.is-live .tq__names { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  column-gap: var(--s-5); margin-top: var(--s-8); }
.tq--row .tq__ctl { position: absolute; right: 0; bottom: 0; margin: 0; }
.tq--row .tq__q .am-quote__cite { padding-right: 240px; }

/* ---- small screens: the quote, the counter and the arrows; swipe works ---- */
@media (max-width: 900px) {
  .tq.is-live .tq__names { display: none; }
  .tq__stage { grid-template-columns: 1fr; }
  .tq__mark { grid-row: auto; font-size: 72px; margin-bottom: -18px; }
  .tq__ctl, .tq--row .tq__ctl { grid-column: 1; position: static; margin-top: var(--s-6); justify-content: space-between; }
  .tq--row .tq__q .am-quote__cite { padding-right: 0; }
  .tq__eyebrow { margin-bottom: var(--s-6); }
}

@media (prefers-reduced-motion: reduce) {
  .tq.is-live .tq__q, .tq.is-live .tq__q.is-on, .tq.is-live .tq__q .am-quote__cite { transition: none; transform: none; }
  .tq.is-auto .tq__name[aria-current="true"]::before { animation: none; }
}
