/* Testimonials page (/testimonials/). Loaded after shared/pages.css. */

/* ---- hero + intro video --------------------------------------------------- */
.cs-hero { padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 8vw, 112px); text-align: center; }
.cs-hero h1 {
  margin: 0 auto; max-width: 14ch; font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.02; letter-spacing: -.035em; font-weight: 700; text-wrap: balance;
}
.cs-intro {
  /* no frame: the video sits straight on the page, as wide as the content column */
  position: relative; margin: clamp(36px, 4.5vw, 56px) auto 0; width: 100%; max-width: 1040px; aspect-ratio: 16 / 9;
}
.cs-intro iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---- the reel: one pinned act per quote ------------------------------------
   The engine writes the act's pinned progress to --sc-p (0 when the stage
   reaches the top of the viewport, 1 when it unpins). Everything below is a
   function of it:
     --e  the video emerging from the centre of the quote   (p 0.06 -> 0.36)
     --s  quote and video parting to opposite sides         (p 0.24 -> 0.50)
   then a hold, where the muted preview plays, until the stage scrolls away.
   --side alternates per act (1: video goes right, -1: left). */
.cs-q {
  --p: var(--sc-p, 0);
  --e0: clamp(0, (var(--p) - 0.06) / 0.30, 1);
  --s0: clamp(0, (var(--p) - 0.24) / 0.26, 1);
  --e: calc(var(--e0) * var(--e0) * (3 - 2 * var(--e0)));
  --s: calc(var(--s0) * var(--s0) * (3 - 2 * var(--s0)));
  --side: 1;
  --film-h: min(74svh, calc(44vw / var(--ar)));
}
.cs-q[data-side="-1"] { --side: -1; }
.cs-q__stage { display: block; }

.cs-film {
  position: absolute; left: 50%; top: 50%; margin: 0;
  height: var(--film-h); aspect-ratio: var(--ar);
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--side) * var(--s) * 23vw))
    scale(calc(0.05 + 0.95 * var(--e)));
  opacity: clamp(0, calc(var(--e0) * 5), 1);
  border-radius: calc((1 - var(--e)) * 50% + var(--e) * 14px);
  overflow: hidden; background: var(--card);
  box-shadow: var(--sc-e3), 0 0 0 1px rgba(242, 248, 252, .08);
  will-change: transform, opacity;
}
.cs-film video { width: 100%; height: 100%; object-fit: cover; }

.cs-quote {
  position: absolute; left: 50%; top: 50%; margin: 0;
  width: min(42vw, 16ch); font-size: clamp(2.4rem, 4.4vw, 5rem);
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--side) * -1 * var(--s) * 25vw))
    scale(calc(1 - 0.16 * var(--s)));
  z-index: 2; will-change: transform;
}
.cs-quote p {
  margin: 0; font-weight: 700; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance;
  text-shadow: 0 2px 28px rgba(5, 9, 12, calc(0.75 * (1 - var(--s))));
}
.cs-quote p::before { content: "\201C"; position: absolute; transform: translate(-0.55em, -0.08em); color: var(--brand-blue); }
.cs-quote footer {
  display: grid; gap: 6px; margin-top: .9em; font-size: 16px;
  opacity: var(--s); transform: translateY(calc((1 - var(--s)) * 12px));
}
.cs-quote footer strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.cs-quote footer span { font-family: var(--sc-font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-foreground); }

/* the play button (styled in shared/pages.css) fades in as the two part */
.cs-q .cs-sound { opacity: var(--s); pointer-events: none; }
.cs-q.is-parted .cs-sound { pointer-events: auto; }
.cs-q.is-listening .cs-sound { display: none; }

/* Page-wide sound switch: shown while the reel is on screen. */
.cs-mute {
  position: fixed; left: 24px; bottom: 24px; z-index: var(--sc-z-chrome);
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px 11px 13px;
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
  background: rgba(11, 17, 21, .72); backdrop-filter: blur(10px);
  color: var(--muted-foreground); font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity var(--sc-d-slow) var(--sc-ease-out), transform var(--sc-d-slow) var(--sc-ease-out),
              color var(--sc-d-base) var(--sc-ease-out), border-color var(--sc-d-base) var(--sc-ease-out);
}
.cs-mute.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.cs-mute:hover { border-color: var(--brand-blue); color: var(--foreground); }
.cs-mute svg { width: 18px; height: 18px; }
.cs-mute .cs-mute__on { display: none; }
.cs-mute[aria-pressed="true"] { color: var(--foreground); border-color: var(--brand-blue); }
.cs-mute[aria-pressed="true"] .cs-mute__on { display: block; }
.cs-mute[aria-pressed="true"] .cs-mute__off { display: none; }

/* ---- written testimonials ------------------------------------------------
   Same voice as the reel (big bold type, one blue accent), lighter rhythm: no
   pinning. The text sits in a readable muted grey; each highlight brightens to
   white as a blue marker stroke sweeps under it. case-studies.js sets --m (0..1)
   on each <mark> from its position on screen, so they light one after another. */
.cs-written { padding: clamp(96px, 12vw, 168px) 0 0; }
.cs-written__head { text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.cs-written__head h2 { margin: 0 auto; max-width: 16ch; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; text-wrap: balance; }
.cs-w {
  display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--border);
}
.cs-w__who { position: sticky; top: 40px; align-self: start; display: grid; gap: 8px; justify-items: start; }
.cs-w__who strong { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.cs-w__who span { font-family: var(--sc-font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-foreground); line-height: 1.6; }
.cs-src {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 6px; color: var(--foreground); text-decoration: none; font-size: 13px;
  background: none; cursor: pointer; font-family: inherit;
}
.cs-src:hover { border-color: var(--brand-blue); }
.cs-w__text p {
  margin: 0 0 .9em; max-width: 40ch;
  font-size: clamp(1.35rem, 1rem + 1.2vw, 2.1rem); line-height: 1.3; letter-spacing: -.022em; font-weight: 600;
  color: #75808a; text-wrap: pretty;
}
.cs-w__text p:last-child { margin-bottom: 0; }
/* form answers: the question each answer was given to, above it */
.cs-w__q {
  display: block; margin-bottom: .5em; font-family: var(--sc-font-mono); font-size: 12px; font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brand-blue);
}

/* the short ones: a wall of cards, same type and sweep, smaller */
.cs-wall__head { padding: clamp(56px, 7vw, 96px) 0 28px; border-top: 1px solid var(--border); }
.cs-wall { columns: 3 300px; column-gap: 20px; }
.cs-card {
  break-inside: avoid; margin: 0 0 20px; padding: 26px 24px 22px;
  border: 1px solid var(--border); border-radius: 14px; background: color-mix(in oklab, var(--card) 55%, transparent);
}
.cs-card blockquote { margin: 0; }
.cs-card p {
  margin: 0 0 .6em; font-size: clamp(1.15rem, 1rem + .4vw, 1.4rem); line-height: 1.32; letter-spacing: -.018em;
  font-weight: 600; color: #75808a; text-wrap: pretty;
}
.cs-card p:last-child { margin-bottom: 0; }
.cs-card figcaption { display: grid; gap: 4px; justify-items: start; margin-top: 18px; }
.cs-card figcaption strong { font-size: 15px; font-weight: 600; }
.cs-card figcaption span { font-family: var(--sc-font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-foreground); }
.cs-card .cs-src { margin-top: 10px; padding: 6px 10px; font-size: 12px; }

/* screenshot lightbox */
.cs-shot { padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--card); max-width: min(92vw, 760px); max-height: 90vh; overflow: auto; }
.cs-shot::backdrop { background: rgba(5, 9, 12, .78); backdrop-filter: blur(4px); }
.cs-shot img { display: block; width: 100%; height: auto; }
.cs-shot form { position: sticky; top: 0; display: flex; justify-content: flex-end; height: 0; }
.cs-shot__close {
  margin: 10px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); cursor: pointer;
  background: rgba(11, 17, 21, .8); color: var(--foreground); font-size: 22px; line-height: 1;
}

.cs-written mark {
  --m: 0;
  color: color-mix(in oklab, var(--foreground) calc(var(--m) * 100%), #75808a);
  background: linear-gradient(rgba(12, 163, 239, .6), rgba(12, 163, 239, .6)) no-repeat 0 90% / calc(var(--m) * 100%) .34em;
  padding: 0 .04em;
}

/* ---- phones: the two part vertically instead of sideways ------------------ */
@media (max-width: 860px) {
  .cs-q { --film-h: min(50svh, calc(88vw / var(--ar))); }
  .cs-film {
    transform:
      translate(-50%, -50%)
      translateY(calc(var(--s) * 13svh))
      scale(calc(0.05 + 0.95 * var(--e)));
  }
  .cs-quote {
    width: calc(100vw - 40px); font-size: clamp(1.9rem, 8vw, 2.8rem); text-align: center;
    transform:
      translate(-50%, -50%)
      translateY(calc(var(--s) * -31svh))
      scale(calc(1 - 0.18 * var(--s)));
  }
  .cs-quote p::before { position: static; transform: none; }
  .cs-quote footer { margin-top: .6em; }

  .cs-w { grid-template-columns: 1fr; }
  .cs-w__who { position: static; }
  .cs-mute { left: 16px; bottom: 16px; }
}

/* Reduced motion: no scroll-linked movement. Each act shows its parted state. */
@media (prefers-reduced-motion: reduce) {
  .cs-q { --e0: 1; --s0: 1; }
}

/* ---- section heads around the reel: current offer first, then the coaching years ---- */
.cs-now { padding-bottom: 0; }
.cs-before { padding: clamp(56px, 7vw, 96px) 0 clamp(8px, 2vw, 24px); }

/* a current client on camera, under their name in the written card */
.cs-w__film { margin: 18px 0 0; width: 100%; max-width: 280px; border-radius: 12px; overflow: hidden; background: #000; }
.cs-w__film iframe { display: block; width: 100%; height: 100%; border: 0; }
.cs-w__film video { display: block; width: 100%; height: auto; }
