/* The home page's testimonials ("What clients say"): Laiz C.'s video testimonial sized up (her vertical clip beside her line), and under it one
   slow marquee of the four written reviews. Rahul, 2026-10-22, choosing between three options (docs/previews/testimonials/): "I like option B,
   but since there's one video and the rest are just text... combining option B and option C. I love the marquee, the way it's fading out at
   both ends... a section sized up that is just the video testimonial and the text by it, and then underneath it, we have the marquee."
   Every card shows one verbatim cut of its review in big type, then name, role and company, and the source as a text label; "Read full
   review" shows the whole review with the cut marked (in place for the video, in a dialog for the marquee's cards, which move). No photo,
   avatar, stars or logos besides her video's still (Rahul, 2026-10-22). The reviews are plain HTML; testimonials.js only adds the player, the
   marquee and the dialog, so without scripts the cuts, names and sources still read and the row is a still strip you can scroll.
   The card face, radius and gaps are How we help's (services.css), so the two sections read as one family. */

.testimonials,
.testimonials *,
.testimonials ::before,
.testimonials ::after { box-sizing: border-box; }

.testimonials {
  --testimonials-card: #1a1d24;                  /* Night, one step up: the same card face as How we help. 16.9:1 under white */
  --testimonials-muted: rgb(255 255 255 / 0.7);  /* the role and company, the full review: 8.8:1 on the card */
  --testimonials-line: rgb(255 255 255 / 0.1);
  --testimonials-pill: rgb(255 255 255 / 0.15);
  --testimonials-ease: cubic-bezier(0.23, 1, 0.32, 1);
  background-color: #0c0e12;                     /* Night: the band continues the services section */
  color: #fff;
  padding-block: 56px 64px;
  scroll-margin-top: -8px;                       /* lands at 80 px, the nav bar's edge (nav.css sets the 88 px scroll padding) */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 1024px) { .testimonials { padding-block: 72px 96px; } }

/* The page's own padding steps (the hero and the services use the same), up to the 1290 px column */
.testimonials__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-inline: auto; max-width: calc(1290px + 2 * 24px); padding-inline: 24px; }
@media (min-width: 640px) { .testimonials__inner { max-width: calc(1290px + 2 * 32px); padding-inline: 32px; } }
@media (min-width: 768px) { .testimonials__inner { gap: 32px; max-width: calc(1290px + 2 * 48px); padding-inline: 48px; } }
@media (min-width: 1024px) { .testimonials__inner { max-width: calc(1290px + 2 * 56px); padding-inline: 56px; } }

.testimonials__heading { margin: 0; color: #fff; }
/* The heading and, at its right (below it on a phone), the way to every case study (/work). Not after the reviews row: the footer
   holds the last part of the page mid-screen, and that must stay the reviews row */
.testimonials__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }

/* ───────── Pieces both kinds of card share ───────── */
/* The screen-reader-only span (.testimonials__vh: "Source: Upwork", "from Sid S.") is facade.css's, which this page loads first */
/* A long word or address in a quote, a name or a role wraps inside the card */
.testimonials__card, .testimonials__feature { overflow-wrap: break-word; }
/* The quote and its caption: a figure (the caption is its last child), with the controls outside it */
.testimonials__fig { display: flex; flex-direction: column; gap: 24px; margin: 0; }

/* The source, as a label and not a control: a pill like the nav's chips but flat, with no fill and no hover */
.testimonials__source { display: inline-flex; align-items: center; padding: 2px 10px; border: 1px solid var(--testimonials-pill); border-radius: 9999px; color: rgb(255 255 255 / 0.8); white-space: nowrap; }
.testimonials__who { display: grid; gap: 2px; min-width: 0; }
.testimonials__name { display: block; color: #fff; }
.testimonials__role { display: block; margin-top: 0; color: var(--testimonials-muted); }
.testimonials mark { background: none; color: #fff; font-weight: 600; }   /* the cut, inside the whole review */

/* The opening quote mark hangs in the padding, so the words line up under each other */
.testimonials__quote { margin: 0; }
.testimonials__excerpt, .testimonials__fulltext { margin: 0; text-indent: -0.4em; text-wrap: pretty; }
.testimonials__excerpt { color: #fff; }
.testimonials__fulltext { color: var(--testimonials-muted); }

/* Under the quote, after a hairline: the person on the left, the source on the right. On a phone the source drops under the role, so every
   card ends the same way; a role too long for the row sends it down there on a wider screen too. */
.testimonials__caption { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 20px; border-top: 1px solid var(--testimonials-line); }
@media (min-width: 640px) { .testimonials__caption { flex-flow: row wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; } }

/* "Read full review": a quiet ghost pill, 44 px tall, with a chevron that turns over when the text is open. It needs scripts, so without
   them it is not there (the whole review stays in the HTML). */
.testimonials__more { display: none; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px 0 18px; border: 1px solid var(--testimonials-pill); border-radius: 9999px; background: none; color: rgb(255 255 255 / 0.92); cursor: pointer; transition: background-color 150ms var(--testimonials-ease), scale 160ms var(--testimonials-ease); }
.js .testimonials__more { display: inline-flex; }
.testimonials__more svg { flex: none; width: 16px; height: 16px; transition: transform 200ms var(--testimonials-ease); }
.testimonials__more[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .testimonials__more:hover { background-color: rgb(255 255 255 / 0.08); } }
.testimonials__more:active { scale: 0.97; }
.testimonials__more:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ───────── The video, sized up ───────── */
/* The card holds the portrait frame and the words. On a phone the frame comes first, inset, never taller than 70% of the screen; from 768 px
   it is the left column, full height and full bleed, 9:16 at its narrowest (240, 300 and 360 px wide: 427, 533 and 640 px tall). */
.testimonials__feature { display: grid; margin: 0; padding: 12px; overflow: hidden; background-color: var(--testimonials-card); border-radius: 16px; }
/* The frame, the poster, the button and the player are facade.css's: the service pages and the case studies draw them too, so this page loads
   it first. The 768 px rule below turns the frame into this card's left column. */

.testimonials__feature-body { display: flex; flex-direction: column; justify-content: center; gap: 24px; min-width: 0; padding: 24px 8px 12px; }
.testimonials__feature .testimonials__quote { position: relative; }
.testimonials__feature .testimonials__excerpt { text-wrap: balance; font-size: clamp(1.875rem, 1.564rem + 1.326vw, 2.625rem); }    /* the scale's h2; from 1024 px its h1 */
.testimonials__feature .testimonials__fulltext { max-width: 40em; }
/* One of the two is in the flow at a time: the cut, or the whole review once it is opened. The other fades out. */
.testimonials__feature .testimonials__fulltext { position: absolute; top: 0; left: 0; width: 100%; visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity 160ms ease, transform 160ms var(--testimonials-ease), visibility 0s linear 160ms; }
.testimonials__feature[data-open] .testimonials__fulltext { position: static; visibility: visible; opacity: 1; transform: none; transition: opacity 260ms var(--testimonials-ease) 80ms, transform 260ms var(--testimonials-ease) 80ms, visibility 0s; }
.testimonials__feature[data-open] .testimonials__excerpt { position: absolute; top: 0; left: 0; width: 100%; visibility: hidden; opacity: 0; transition: opacity 120ms ease, visibility 0s linear 120ms; }

.testimonials__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
/* The link to the case study: text with an arrow that nudges up and right on hover, as the service cards' does */
.testimonials__case { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #fff; text-decoration: underline; text-decoration-color: rgb(255 255 255 / 0.35); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color 150ms var(--testimonials-ease); }
.testimonials__case svg { flex: none; width: 16px; height: 16px; transition: transform 180ms var(--testimonials-ease); }
@media (hover: hover) and (pointer: fine) {
  .testimonials__case:hover { text-decoration-color: currentColor; }
  .testimonials__case:hover svg { transform: translate(2px, -2px); }
}
.testimonials__case:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }

@media (min-width: 768px) {
  .testimonials__feature { --frame-w: 240px; grid-template-columns: var(--frame-w) minmax(0, 1fr); padding: 0; }
  .testimonials__frame { width: auto; height: 100%; min-height: calc(var(--frame-w) * 16 / 9); margin: 0; aspect-ratio: auto; border-radius: 0; }
  .testimonials__feature-body { padding: 40px; }
}
@media (min-width: 1024px) {
  .testimonials__feature { --frame-w: 300px; }
  .testimonials__feature-body { gap: 28px; padding: 56px; }
  .testimonials__feature .testimonials__excerpt { font-size: clamp(2.25rem, 1.732rem + 2.21vw, 3.5rem); line-height: 1.05; letter-spacing: -0.02em; }
}
@media (min-width: 1250px) { .testimonials__feature { --frame-w: 360px; } }

/* ───────── The marquee ───────── */
/* One row of the four written reviews, a slow drift to the left (about 15 px a second, linear), faded out at both ends. The row is never wider
   than the page's column plus its padding (1402 px), so at 1920 it shows what 1440 shows.
   No card may show twice at once. A card's copy sits one set away (4 cards and 4 gaps), so a set must be at least as wide as the row plus one
   card: 3 x card + 4 x gap >= row. 300 + 12 holds up to 639 px (948 against at most 639), 360 + 20 up to 1023 (1160 against 1023), 440 + 32
   from 1024 px (1448 against at most 1402). Change the card, the gap or the row and check that line first. */
.testimonials__shelf { --card-w: 300px; --gap: 12px; --dur: 80s; --edge: 24px; margin-top: 24px; }
@media (min-width: 640px) { .testimonials__shelf { --card-w: 360px; --gap: 20px; --dur: 100s; --edge: 32px; } }
@media (min-width: 768px) { .testimonials__shelf { --edge: 48px; margin-top: 32px; } }
@media (min-width: 1024px) { .testimonials__shelf { --card-w: 440px; --gap: 32px; --dur: 120s; --edge: 56px; } }

/* A pause button used to sit between the video and the row while it moved (44 px tall, 12 px above the row). Rahul took it out ("remove from all
   marquee", 2026-10-27); the row keeps its place, so nothing below the video moves. The still strip never had it, so it keeps its own gap. */
.testimonials__shelf[data-marquee="on"] { margin-top: 80px; }
@media (min-width: 768px) { .testimonials__shelf[data-marquee="on"] { margin-top: 88px; } }

/* A still strip you can scroll (no scripts, or reduced motion); the fade at each end is as wide as the padding, so the first card starts in
   line with the heading. It does not snap: a snap point pulls the row back and hides a card's button that the keyboard just focused.
   Moving: the row clips instead, and fades over 8% at each end. */
.testimonials__row {
  --fade: var(--edge);
  position: relative;   /* the containing block for the cards' screen-reader-only spans (position: absolute); without it they escape the row's clip and widen the page */
  display: flex; margin-inline: auto; max-width: calc(1290px + 2 * var(--edge)); padding-inline: var(--edge); overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / 0.25) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}
.testimonials__track { display: flex; flex: none; gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.testimonials__track > li { display: flex; flex: none; }
.testimonials__track[aria-hidden="true"] { display: none; }

[data-marquee="on"] .testimonials__row { --fade: 8%; gap: var(--gap); padding-inline: 0; overflow: hidden; }
[data-marquee="on"] .testimonials__track { animation: testimonials-run var(--dur) linear infinite; }
[data-marquee="on"] .testimonials__track[aria-hidden="true"] { display: flex; }
@keyframes testimonials-run { to { transform: translateX(calc(-100% - var(--gap))); } }
/* It stops under a mouse, while the keyboard is in it and while a review is open */
@media (hover: hover) and (pointer: fine) { .testimonials__row:hover .testimonials__track { animation-play-state: paused; } }
.testimonials__row:has(:focus-visible) .testimonials__track,
.testimonials:has(dialog[open]) .testimonials__track { animation-play-state: paused; }
/* Hold and drag (Rahul, 2026-10-23: "hold and drag them for reading through quickly rather than waiting for them to scroll"): a press stops
   the row, a drag moves it either way and a flick glides back into the drift (testimonials.js moves the animation itself). data-held stops
   the drift meanwhile. Up and down on a phone still scrolls the page; nothing in the row selects or calls out under a held finger. */
[data-marquee="on"] .testimonials__row { touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (hover: hover) and (pointer: fine) { [data-marquee="on"] .testimonials__row { cursor: grab; } }
[data-marquee="on"] .testimonials__row[data-dragging] { cursor: grabbing; }
.testimonials__row[data-held] .testimonials__track { animation-play-state: paused; }

.testimonials__card { display: flex; flex: 1; flex-direction: column; justify-content: space-between; gap: 20px; width: var(--card-w); margin: 0; padding: 22px 20px; background-color: var(--testimonials-card); border-radius: 16px; }
@media (min-width: 640px) { .testimonials__card { padding: 24px; } }
.testimonials__card .testimonials__fig { flex: 1; justify-content: space-between; gap: 20px; }   /* the caption sits at the bottom of every card, the same height across the row */
.testimonials__card .testimonials__more { align-self: flex-start; margin-top: -4px; }

/* ───────── The whole review of a marquee card, in a dialog ───────── */
.testimonials__dialog { width: min(640px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--testimonials-line); border-radius: 20px; background-color: var(--testimonials-card); color: #fff; box-shadow: 0 25px 50px rgb(0 0 0 / 0.5); opacity: 0; transform: translateY(12px) scale(0.98); transition: opacity 200ms var(--testimonials-ease), transform 200ms var(--testimonials-ease), overlay 200ms allow-discrete, display 200ms allow-discrete; }
.testimonials__dialog[open] { opacity: 1; transform: none; }
@starting-style { .testimonials__dialog[open] { opacity: 0; transform: translateY(12px) scale(0.98); } }
.testimonials__dialog::backdrop { background-color: rgb(8 9 12 / 0); transition: background-color 200ms ease, overlay 200ms allow-discrete, display 200ms allow-discrete; }
.testimonials__dialog[open]::backdrop { background-color: rgb(8 9 12 / 0.74); }
@starting-style { .testimonials__dialog[open]::backdrop { background-color: rgb(8 9 12 / 0); } }
html:has(.testimonials__dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }   /* the page behind stops scrolling, without shifting sideways */
.testimonials__dialog-in { display: grid; gap: 24px; padding: 20px 20px 28px; }
@media (min-width: 640px) { .testimonials__dialog-in { padding: 24px 32px 36px; } }
.testimonials__dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.testimonials__dialog-close { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; padding: 0; border: 0; border-radius: 9999px; background: none; color: #fff; cursor: pointer; transition: background-color 150ms var(--testimonials-ease), scale 160ms var(--testimonials-ease); }
.testimonials__dialog-close svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .testimonials__dialog-close:hover { background-color: rgb(255 255 255 / 0.1); } }
.testimonials__dialog-close:active { scale: 0.97; }
.testimonials__dialog-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.testimonials__dialog-who { display: grid; gap: 2px; padding-top: 20px; border-top: 1px solid var(--testimonials-line); }
.testimonials__dialog-who .t-small { color: var(--testimonials-muted); }
/* On a phone it is a sheet from the bottom */
@media (max-width: 639px) {
  .testimonials__dialog { width: 100%; max-height: 86dvh; margin: auto 0 0; border-width: 1px 0 0; border-radius: 20px 20px 0 0; transform: translateY(24px); }
  @starting-style { .testimonials__dialog[open] { transform: translateY(24px); } }
}

/* ───────── Reduced motion ───────── */
/* The row never moves (testimonials.js does not start it), and the same changes happen without the travel */
@media (prefers-reduced-motion: reduce) {
  [data-marquee="on"] .testimonials__track { animation: none; }
  [data-marquee="on"] .testimonials__track[aria-hidden="true"] { display: none; }
  [data-marquee="on"] .testimonials__row { --fade: var(--edge); padding-inline: var(--edge); overflow-x: auto; }
  .testimonials__more, .testimonials__dialog-close { transition: background-color 150ms var(--testimonials-ease); }   /* the fill still eases */
  .testimonials__more svg, .testimonials__case svg { transition: none; }
  .testimonials__more:active, .testimonials__dialog-close:active { scale: 1; opacity: 0.85; }
  .testimonials__case:hover svg { transform: none; }
  .testimonials__feature .testimonials__fulltext, .testimonials__feature[data-open] .testimonials__fulltext { transform: none; transition: opacity 120ms linear, visibility 0s; }
  .testimonials__feature[data-open] .testimonials__excerpt { transition: opacity 120ms linear, visibility 0s; }
  .testimonials__dialog, .testimonials__dialog[open] { transform: none; transition: opacity 120ms linear, overlay 120ms allow-discrete, display 120ms allow-discrete; }
  .testimonials__dialog::backdrop { transition: background-color 120ms linear, overlay 120ms allow-discrete, display 120ms allow-discrete; }
}
