/* The one review slider (design-lab/vix-site/reviews/reviews.mjs): the clips first, then the written words, one track.
   Round 4 (11/17 Tella, row 16): two cards in view (one under 1100 px), every quote whole at one reading size, a clip
   card holds the clip, the person, their own words and their case link; nothing moves when a clip plays.
   Flat; colors come from the section's tokens, so it reads on the dark band and on a light one.
   Every card rule is held to the track (.rv-track > .rv): .rv is also the homepage's scroll-reveal class, on many
   blocks, and a bare .rv rule here restyles them. */
.rv-sec { --rv-gap: clamp(40px, 4.6vw, 64px); --rv-clip: 46%; --rv-size: clamp(17px, calc(13.6px + .38vw), 19px); }
.rv-sec .in { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 3.4vw, 44px); }
.rv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 40px; }
.rv-head h2 { margin: 0; max-width: 18ch; }
.rv-head > p { grid-column: 1; max-width: 52ch; margin: 0; color: var(--muted); font-size: 16px; }
.rv-nav { grid-column: 2; grid-row: 1 / span 2; align-self: end; display: flex; align-items: center; gap: 14px; }
.rv-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.rv-nav button:hover { border-color: var(--ink); }
.rv-nav button[aria-disabled="true"] { opacity: .35; cursor: default; border-color: var(--line); }
.rv-nav button:focus-visible { outline: 2px solid var(--orb); outline-offset: 3px; }
.rv-count { font: 500 13px/1 var(--body); letter-spacing: .08em; color: var(--muted); min-width: 6.4em; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-count b { color: var(--ink); font-weight: 600; }
.rv-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the track: a sideways scroll container, never a vertical one (so no data-lenis-prevent). Every card is as tall as
   the tallest, so the row height is one number for the whole track and stepping through it moves nothing up or down. */
.rv-track { list-style: none; margin: 0; padding: 0 0 8px; display: flex; align-items: stretch; gap: var(--rv-gap); width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rv-track::-webkit-scrollbar { display: none; }
.rv-track:focus-visible { outline: 2px solid var(--orb); outline-offset: 6px; }
/* a card, top to bottom: who it is (and the way to their case study), a thin rule, then the clip and the words */
.rv-track > .rv { position: relative; flex: 0 0 calc((100% - var(--rv-gap)) / 2); min-width: 0; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: 26px clamp(22px, 2.4vw, 34px); }
/* a thin rule between two cards, drawn in the gap: the card at the left edge of the view has none */
.rv-track > .rv + .rv::before { content: ""; position: absolute; left: calc(var(--rv-gap) / -2); top: 0; bottom: 0; width: 1px; background: var(--line); }

/* who said it: the first line of every card, so names and roles share one baseline across the row whatever the quotes
   run to. The case link rides on the same line, at the card's right edge. */
.rv-by { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 64px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rv-sec .rv-who { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; max-width: none; min-width: 0; font: 400 14px/1.4 var(--body); }
.rv-who b { font: 400 21px/1.15 var(--display); letter-spacing: -.005em; color: var(--ink); }
.rv-who span { margin-top: 3px; color: var(--muted); }
.rv-face { flex: none; order: 3; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.rv-case { flex: none; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font: 600 14px/1.3 var(--body); transition: transform .2s var(--ease); }
.rv-case span { display: inline-flex; align-items: center; gap: 8px; padding-bottom: 2px; border-bottom: 1px solid currentColor; border-radius: 1px; white-space: nowrap; }
.rv-case svg { transition: transform .2s var(--ease); }
.rv-case:hover svg { transform: translateX(4px); }
/* the link sits against the track's edge, where a scroll container cuts a focus ring: it steps in and shows it whole */
.rv-case:focus-visible { outline: none; transform: translateX(-7px); }
.rv-case:focus-visible span { outline: 2px solid var(--orb); outline-offset: 4px; }

/* a clip card: the clip on the left, the same person's written words on the right */
.rv-track > .rv-video { grid-template-columns: minmax(0, var(--rv-clip)) minmax(0, 1fr); }
/* the clip's box is fixed (9 by 16, the clips are filmed upright): the poster, the loading state and the player all
   take exactly this box, so pressing play changes no size and no position */
.rv-frame { grid-column: 1; position: relative; margin: 0; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; background: var(--surface); align-self: start; }
.rv-frame img, .rv-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.rv-frame img { z-index: 1; cursor: pointer; }
.rv-play { position: absolute; z-index: 2; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 18px 8px 9px; border-radius: 999px; border: 0; background: #f8f6f1; color: #121212; font: 600 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.rv-play:focus-visible { outline: 2px solid #f8f6f1; outline-offset: 3px; box-shadow: 0 0 0 5px #121212; }
.rv-play i { width: 28px; height: 28px; border-radius: 50%; background: #121212; position: relative; flex: none; transition: background .2s var(--ease); }
.rv-frame:not(.loading):hover .rv-play i, .rv-play:focus-visible i { background: #5b2fe6; } /* the purple dot */
.rv-play i::after { content: ""; position: absolute; left: 11px; top: 9px; border-left: 9px solid #f8f6f1; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
/* pressed: the poster stays and the control says so at once, until the player has its first frame */
.rv-frame.loading .rv-play { cursor: progress; }
.rv-frame.loading .rv-play i { background: none; border: 2px solid rgba(18, 18, 18, .22); border-top-color: #121212; animation: rv-spin .8s linear infinite; }
.rv-frame.loading .rv-play i::after { content: none; }
.rv-frame.playing img, .rv-frame.playing .rv-play { visibility: hidden; }
@keyframes rv-spin { to { transform: rotate(360deg); } }

/* the words: one size for every quote, set to be read; never clamped, nothing to open */
.rv-quote { margin: 0; padding: 0; border: 0; display: grid; align-content: start; gap: .8em; min-width: 0; }
.rv-video .rv-quote { grid-column: 2; }
.rv-sec .rv-quote p { margin: 0; max-width: 34em; font: 400 var(--rv-size)/1.58 var(--body); letter-spacing: 0; color: var(--ink); text-wrap: pretty; }

/* under 1100 px (where two cards no longer hold a name, a role and the case link on one line): one card in view, the
   next one's edge showing so the track reads as a track */
@media (max-width: 1099px) {
  .rv-sec { --rv-gap: 40px; --rv-clip: clamp(240px, 32%, 300px); }
  .rv-track > .rv { flex-basis: calc(100% - 96px); }
}
/* a phone: a written card's name and picture, then the words, then the case link; a clip card the same under its clip */
@media (max-width: 640px) {
  .rv-sec { --rv-gap: 24px; --rv-clip: 56%; --rv-size: 17px; }
  .rv-head { grid-template-columns: 1fr; }
  .rv-nav { grid-column: 1; grid-row: auto; }
  .rv-track > .rv { flex-basis: calc(100% - 48px); grid-template-rows: auto auto auto; row-gap: 20px; }
  .rv-by { display: contents; }
  .rv-sec .rv-who { grid-row: 1; grid-column: 1; }
  .rv-quote, .rv-video .rv-quote { grid-row: 2; grid-column: 1 / -1; }
  .rv-case { grid-row: 3; grid-column: 1 / -1; justify-self: start; margin-top: -8px; }
  .rv-case:focus-visible { transform: translateX(7px); }
  /* a written card: the name and the small picture on one line, a rule, the words. Room for a role on two lines, so
     the rule sits at one height on every written card */
  .rv-track > .rv-text { grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 18px; }
  .rv-sec .rv-text .rv-who { min-height: 66px; align-content: start; }
  .rv-face { grid-row: 1; grid-column: 2; align-self: start; }
  .rv-text .rv-quote { padding-top: 20px; border-top: 1px solid var(--line); }
  .rv-text .rv-case { margin-top: -6px; }
  /* a clip card (layout batch 1, Anthony 11/18 [893]: "stick the reviewer's name with videos and their own pfp to match
     the written only testimonials ... to make the videos wider"): the clip the card's full width, then the same name
     and picture line as a written card, a rule, the words, the case link */
  .rv-track > .rv-video { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto; column-gap: 14px; row-gap: 18px; }
  .rv-video .rv-frame { grid-row: 1; grid-column: 1 / -1; }
  .rv-sec .rv-video .rv-who { grid-row: 2; grid-column: 1; align-self: start; }
  .rv-video .rv-face { grid-row: 2; grid-column: 2; }
  .rv-video .rv-quote { grid-row: 3; padding-top: 20px; border-top: 1px solid var(--line); }
  .rv-video .rv-case { grid-row: 4; margin-top: -6px; }
  .rv-who b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-track { scroll-behavior: auto; }
  .rv-frame.loading .rv-play i { animation: none; border-top-color: rgba(18, 18, 18, .22); border-right-color: #121212; }
  .rv-case, .rv-case svg { transition: none; }
}
