/* ============ testimonials ============ */
/* A zone screen like the studio, with a narrower band: the engine starts the
   pattern just past the type, so the wider column leaves the opinion more of
   the screen. The quote and its author share one hairline. */
.voices-screen.sec-zone .wrap { --prf: .19; }
.voices-screen .slide-head { margin-bottom: 34px; }

/* All opinions share one cell: the track is as tall as the longest. */
.voices-track { display: grid; }
.voice {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 56px;
  align-items: start; margin: 0;
  opacity: 0; visibility: hidden;
  transform: translateX(calc(var(--dir, 1) * 32px));
  /* the outgoing one fades in place, then waits off to the side */
  transition: opacity .25s ease, visibility 0s .25s, transform 0s .25s;
}
.voice.is-on {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .45s ease .15s, transform .6s cubic-bezier(.2,.85,.2,1) .15s, visibility 0s;
}

.voice-text {
  margin: 0; padding: 22px 0 0; border: 0; border-top: 1px solid var(--ink);
  quotes: none; font-style: normal;
}
.voice-text::before, .voice-text::after { content: none; }
.voice-text p {
  max-width: 70ch; margin: 0;
  font-size: 16.5px; line-height: 1.55; color: var(--ink-60);
}
.voice-text p + p { margin-top: .8em; }
/* the opening paragraph carries the verdict, so it is set in the display face */
.voice-text p:first-child {
  max-width: 48ch; margin-bottom: 1em;
  font-family: var(--display); font-size: clamp(19px, 1.6vw, 23px); font-weight: 500;
  line-height: 1.3; color: var(--ink); text-wrap: pretty;
}

.voice-who {
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 22px; border-top: 1px solid var(--ink);
}
.voice-pic {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; overflow: hidden;
  background: var(--acid); color: var(--ink);
  font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: .02em;
}
.voice-pic--img { width: 96px; height: 96px; background: var(--card); }
.voice-pic img { width: 100%; height: 100%; object-fit: cover; }
.voice-id { display: flex; flex-direction: column; gap: 6px; }
.voice-name {
  font-family: var(--display); font-size: 20px; font-weight: 600;
  line-height: 1.15; text-transform: uppercase;
}
.voice-id .meta { font-size: 12px; line-height: 1.5; letter-spacing: .14em; }
/* The parent theme recolours a:hover/:focus/:active inline, so every state is set. */
.voice-link,
.voice-link:hover,
.voice-link:focus,
.voice-link:active {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  min-height: 36px; padding: 0 2px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; color: var(--lav-deep);
  border-bottom: 1px solid currentColor;
  transition: color .2s, background .2s;
}
.voice-link:hover { color: var(--ink); background: var(--acid); }
.voice-link:focus-visible { outline: 2px solid var(--lav-deep); outline-offset: 2px; }
.sec-dark .voice-link, .sec-dark .voice-link:focus { color: var(--acid); }
.sec-dark .voice-link:hover { color: var(--ink); }

/* The parent theme paints every <button> on :hover/:focus/:active, so each
   state is declared here. */
.voices-nav { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.voices-arrow,
.voices-arrow:hover,
.voices-arrow:focus,
.voices-arrow:active {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink); box-shadow: none;
  font-family: var(--mono); font-size: 18px; line-height: 1;
  cursor: pointer; transition: background .2s, color .2s;
}
.voices-arrow:hover { background: var(--ink); color: var(--paper); }
.voices-arrow:active { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.voices-arrow:focus-visible { outline: 2px solid var(--lav-deep); outline-offset: 2px; }
.voices-count {
  min-width: 64px; text-align: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em;
  color: var(--ink-60); font-variant-numeric: tabular-nums;
}
.voices-count b { color: var(--ink); font-weight: 700; }

/* dark ground */
.sec-dark .voice-text, .sec-dark .voice-who { border-top-color: var(--light); }
.sec-dark .voice-text p { color: var(--light-60); }
.sec-dark .voice-text p:first-child { color: var(--light); }
.sec-dark .voices-arrow, .sec-dark .voices-arrow:focus { border-color: var(--light); color: var(--light); }
.sec-dark .voices-arrow:hover { background: var(--light); color: var(--lav-deep); }
.sec-dark .voices-count { color: var(--light-60); }
.sec-dark .voices-count b { color: var(--light); }

@media (max-width: 900px) {
  .voices-screen { background: var(--paper); }
  .voices-screen.sec-dark { background: var(--lav-deep); }
  .voice { grid-template-columns: 1fr; gap: 30px; }
  .voice-who { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
  /* name and photo fill the row, so the link drops under them */
  .voice-id { flex: 1 0 calc(100% - 112px); min-width: 0; }
}

@media (max-width: 560px) {
  .voice-text p { font-size: 16px; }
  .voice-text p:first-child { font-size: 19px; }
  .voice-pic { width: 56px; height: 56px; font-size: 21px; }
  .voice-pic--img { width: 80px; height: 80px; }
  .voice-name { font-size: 18px; }
}

/* Short viewports: the screen still has to hold the whole opinion. */
@media (min-width: 901px) and (max-height: 980px) {
  .voices-screen .slide-head { margin-bottom: 26px; }
  .voice-text p { font-size: 15.5px; line-height: 1.5; }
  .voice-text p:first-child { font-size: clamp(18px, 1.45vw, 21px); }
}
@media (min-width: 901px) and (max-height: 800px) {
  .voices-screen .slide-head { margin-bottom: 18px; }
  .voice-text, .voice-who { padding-top: 16px; }
  .voice-text p { font-size: 14.5px; line-height: 1.45; }
  .voice-text p:first-child { font-size: clamp(16px, 1.3vw, 19px); margin-bottom: .7em; }
  .voices-nav { margin-top: 16px; }
  .voices-arrow, .voices-arrow:hover, .voices-arrow:focus, .voices-arrow:active { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .voice, .voice.is-on { transform: none; transition: none; }
}
