/* The video facade: a poster in a frame, and a button over it that nothing but a click answers. Then the clip's own file plays in a <video> in the
   frame (facade.js). The home page's testimonials made it (Rahul, 2026-10-22 and 23: "The play button for Laiz's video needs a fix"); the service
   pages' quotes and the case studies draw the same markup (2026-11-06), so these are the frame's rules and no page's: how wide it is and where it
   sits belong to the page that holds it (testimonials.css, service-page/quote-video.css, work/work.css). Without scripts the poster stays and a
   link takes the button's place. The transcript under it is here too, in the colors of whatever holds it. */

/* Only for screen readers: "Source: Upwork", "from Sid S.", "(opens in a new tab)". testimonials.css uses it too. */
.testimonials__vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The frame has the poster's shape, 9:16 unless the markup says otherwise (style="--frame-ratio: 720 / 1280" is the poster's size), so the page
   never shifts when the poster loads. On a phone it is never taller than 70% of the screen. */
.testimonials__frame {
  --testimonials-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --frame-ratio: 9 / 16;
  position: relative; aspect-ratio: var(--frame-ratio); margin-inline: auto; overflow: hidden; border-radius: 12px; background-color: #0c0e12;
  width: min(100%, calc(70vh * var(--frame-ratio)));
  width: min(100%, calc(70svh * var(--frame-ratio)));
}
.testimonials__poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; }   /* her eyes sit a third of the way down */
/* The poster is a facade: a button over it, named for screen readers, until it is clicked. Then the Wistia player takes the frame. */
.testimonials__facade { position: absolute; inset: 0; z-index: 1; display: none; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.js .testimonials__facade { display: block; }
/* The keyboard's ring sits 4 px inside the frame: white, with a dark band outside it so it shows on a light poster too. The extra class beats blog.css's
   `.blog-page main :is(a, button):focus-visible` (blue, 2 px outside), which the frame's overflow would clip, on the pages that load it. */
.testimonials__frame .testimonials__facade:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 12px; box-shadow: inset 0 0 0 4px #0c0e12; }
.testimonials__facade[aria-busy="true"] { cursor: progress; }
.testimonials__facade[aria-busy="true"] .testimonials__play { opacity: 0.7; }
.testimonials__play {
  position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px;   /* the middle of the frame (Rahul, 2026-10-23) */
  border-radius: 9999px; background-color: rgb(255 255 255 / 0.4); color: #171717;   /* see-through, so her face shows (Rahul, 2026-10-23) */
  transition: scale 160ms var(--testimonials-ease), opacity 150ms var(--testimonials-ease), background-color 150ms var(--testimonials-ease);
}
.testimonials__play svg { width: 24px; height: 24px; margin-left: 3px; }   /* the triangle's weight sits left of its box */
.testimonials__facade:active .testimonials__play { scale: 0.97; }
/* A mouse over the poster lights the button up (see-through 40% to 60% white); a touch screen has no hover, so it never sticks */
@media (hover: hover) and (pointer: fine) { .testimonials__facade:hover .testimonials__play { background-color: rgb(255 255 255 / 0.6); } }
.testimonials__player { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; object-fit: cover; object-position: 50% 36%; background-color: #0c0e12; }   /* the poster's crop, so play changes nothing but the motion */
/* Without scripts the facade is not there; this link takes its place */
.testimonials__watch { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; display: grid; place-items: center; min-height: 44px; border-radius: 9999px; background-color: #fff; color: #171717; text-decoration: none; }
.js .testimonials__watch { display: none; }
@media (min-width: 1024px) {
  .testimonials__play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
}

/* ───────── The transcript, under the video ───────── */
/* A <details> in the colors of whatever holds it, closed until asked for: a summary 44 px tall with the chevron the home page's "Read full review"
   turns over. The words are the captions', word for word. */
.testimonials__transcript { --testimonials-ease: cubic-bezier(0.23, 1, 0.32, 1); text-align: left; }
.testimonials__transcript summary { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none; transition: scale 160ms var(--testimonials-ease); }
.testimonials__transcript summary::-webkit-details-marker { display: none; }
.testimonials__transcript summary > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.testimonials__transcript summary svg { flex: none; width: 16px; height: 16px; transition: transform 200ms var(--testimonials-ease); }
.testimonials__transcript[open] summary svg { transform: rotate(180deg); }
.testimonials__transcript summary:active { scale: 0.97; }
@media (hover: hover) and (pointer: fine) { .testimonials__transcript summary:hover > span { text-decoration-thickness: 2px; } }
.testimonials__transcript summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
.testimonials__transcript-text { display: grid; gap: 1em; max-width: 44em; padding-block: 4px 12px; text-wrap: pretty; }
.testimonials__transcript-text p { margin: 0; }

/* ───────── Reduced motion ───────── */
/* The same changes happen without the travel: no turning chevron, no press that shrinks */
@media (prefers-reduced-motion: reduce) {
  .testimonials__play { transition: opacity 150ms var(--testimonials-ease), background-color 150ms var(--testimonials-ease); }   /* its fill still eases */
  .testimonials__transcript summary, .testimonials__transcript summary svg { transition: none; }
  .testimonials__facade:active .testimonials__play { scale: 1; opacity: 0.85; }
  .testimonials__transcript summary:active { scale: 1; opacity: 0.85; }
}
