/* stimmen: Sandra's clients' voices "Stimmen über mich" on a quiet card, one quote at a time. Her wishes (mail of 23.10, call of 20.11):
   simple and calm, one saying at a time; the name below it, smaller, in the middle; a quote flies in from the right and out to the
   left when an arrow is clicked, in both directions; the quotes change slowly by themselves, with a pause; no stars, symbols or
   categories. It reads only the page's tokens. Without its script every quote stands as a plain list. */

.stimmen { color: var(--ink); }
.stimmen-title {
  font-family: "Cinzel", serif;
  font-size: var(--fs-title);
  font-weight: 400;
  line-height: 1.22;
  text-align: center;
}
.stimmen-row { margin-top: clamp(28px, 3vw, 44px); }
.stimmen-list { list-style: none; }
.stimmen-list li + li { margin-top: 2em; }
.stimmen-list figure, .stimmen-list blockquote { margin: 0; }
.stimmen-list blockquote { font-size: var(--fs-body); line-height: 1.65; text-align: center; }
.stimmen-who {
  margin-top: .9em;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;   /* in the middle, as all of the card (Sandra, call 20.11: "zentriert alles"; Heinz's sketch) */
}

/* the script's: the arrows stand on either side of the quote; every quote lies in one grid cell, so the card keeps the longest
   quote's height and nothing below it moves. The viewport clips what has flown out. */
.stimmen.is-live .stimmen-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-areas: "prev list next" ". pause .";
  align-items: center;
  column-gap: clamp(12px, 2vw, 32px);
}
.stimmen.is-live .stimmen-prev { grid-area: prev; }
.stimmen.is-live .stimmen-next { grid-area: next; }
.stimmen.is-live .stimmen-pause { grid-area: pause; justify-self: center; margin-top: 1rem; }
.stimmen.is-live .stimmen-list {
  grid-area: list;
  display: grid;
  overflow: clip;
  padding: 0 0 4px;
}
.stimmen.is-live .stimmen-list li {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* a quote waits off to the side it will come from, then eases in; the one before eases out to the other side */
.stimmen.is-live .stimmen-list li.is-current,
.stimmen.is-live .stimmen-list li.is-leaving { visibility: visible; }
.stimmen.is-live .stimmen-list li.is-current {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}
.stimmen.is-live .stimmen-list li.is-leaving {
  opacity: 0;
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.stimmen.is-live .stimmen-list li.from-right, .stimmen.is-live .stimmen-list li.from-left { visibility: visible; transition: none; }
.stimmen.is-live .stimmen-list li.from-right, .stimmen.is-live .stimmen-list li.out-right { transform: translateX(var(--fly, 96px)); }
.stimmen.is-live .stimmen-list li.from-left, .stimmen.is-live .stimmen-list li.out-left { transform: translateX(calc(-1 * var(--fly, 96px))); }

/* the arrows and the pause: quiet glyphs drawn in her ink, no ground until hovered; 44 px to touch */
.stimmen-prev, .stimmen-next, .stimmen-pause {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color var(--hover);
}
.stimmen-prev[hidden], .stimmen-next[hidden], .stimmen-pause[hidden] { display: none; }
.stimmen-pause { width: 36px; height: 36px; opacity: .6; }
.stimmen-row svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stimmen-pause svg { width: 16px; height: 16px; }
.stimmen-row button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .stimmen-row button:hover { background: color-mix(in srgb, currentColor 7%, transparent); }
}
.stimmen-pause .is-play, .stimmen.is-paused .stimmen-pause .is-hold { display: none; }
.stimmen.is-paused .stimmen-pause .is-play { display: block; }
.stimmen.is-still .stimmen-pause { display: none; }   /* reduced motion: nothing changes on its own, so there is nothing to pause */

/* the phone: the quote takes the card's whole width, the arrows and the pause stand in a row below it */
@media (max-width: 600px) {
  .stimmen.is-live .stimmen-row {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas: "list list list" "prev pause next";
    row-gap: 12px;
  }
  .stimmen.is-live .stimmen-pause { margin-top: 0; }
  .stimmen { --fly: 48px; }
}

/* reduced motion: a manual change is an instant swap, nothing flies */
.stimmen.is-still .stimmen-list li { transition: none !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .stimmen .stimmen-list li { transition: none !important; transform: none !important; }
  .stimmen-prev, .stimmen-next, .stimmen-pause { transition: none; }
}
