/* Salesforge rebuild: homepage testimonials, "10,000+ Businesses Run on Salesforge" (blocks 18 to 21).
   New code written for this rebuild. Design values (colours, sizes, timings, breakpoints) follow salesforge.ai.
   Uses site.css (tokens, .wrap, .container, .rule, .sr-only) and home.css (.h4, .case-badge, .band). */

.tst {
  --tst-lilac: #d6bbfb;                          /* highlighted words on the purple and black cards */
  --tst-violet-400: #b692f6;                     /* outline of the UniteSync pill */
  --tst-night: #111;                             /* AKOOL card */
  --tst-glow: #1b56ff;                           /* VidLab glows */
  --tst-out-circ: cubic-bezier(0, .55, .45, 1);  /* the hover curves of the live page */
  --tst-out-back: cubic-bezier(.34, 1.56, .64, 1);
  --tst-ease-out: cubic-bezier(0, 0, .58, 1);
  --tst-slide-ease: cubic-bezier(.075, .82, .165, 1);
}

/* ---------------------------------------------------------------- frame: heading column + tile grid */
.tst__frame {
  display: grid; grid-template-columns: .4fr 1fr; column-gap: 5%;
  padding: 48px 0 48px 32px;
  border-left: 1px solid var(--gray-200);
  box-shadow: inset -1px 0 0 var(--gray-200);
}
.tst__left { display: flex; flex-direction: column; align-items: flex-start; padding-bottom: 8px; }
.tst__sticky {
  position: sticky; top: 8rem;
  display: flex; flex-direction: column; align-items: flex-start; padding-left: 8px;
}

.tst__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--gray-200); }

/* ---------------------------------------------------------------- logo tiles (shown, not clickable) */
.tst-tile {
  position: relative; height: 15rem; padding: 20px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  border-right: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200);
}
/* empty boxes that keep the live tiles' spacing (it has an invisible 12px label on top of each tile,
   and an invisible pill on the SalesCaptain tile) */
.tst-tile::before { content: ""; flex: none; height: 16.8px; }
.tst-tile--nobadge::after { content: ""; flex: none; height: 27.8px; }
.tst-tile--g2 { justify-content: center; }
.tst-tile--g2::before { content: none; }
.tst-tile--end { border-right-width: 0; }
.tst-tile--last { border-bottom-width: 0; }
.tst-tile__logo { width: 50%; height: auto; }
.tst-tile__logo--strongest { width: 52%; }
.tst-tile__logo--netnew { width: 40%; }
.tst-tile__logo--vai { width: 62%; }
/* the G2 badge is drawn at 60% of the tile for its full 166 units; its click arrow (21 units) is left out,
   so the remaining 145 units keep that scale and sit centred */
.tst-tile__g2 { width: calc(60% * 145 / 166); height: auto; }

/* ---------------------------------------------------------------- case cards (shown, not clickable) */
.tst-case {
  position: relative; overflow: hidden; grid-column: span 2; height: 15rem;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  padding: 20px 10% 24px 24px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--white); font-weight: 500;
}
.tst-case--unitesync { background: var(--violet); }
.tst-case--akool { background: var(--tst-night); }
.tst-case--vidlab { background: var(--white); border-bottom-width: 0; color: var(--ink); }

/* one line of words: 6px between words and 4px between lines, as on the live page */
.tst-case__title {
  position: relative; z-index: 1; margin: -2px 0;
  font-size: 1.5rem; line-height: calc(1.3em + 4px); font-weight: 500;
  word-spacing: calc(6px - .2666015625em);  /* Inter's space is .2666em at this weight */
}
.tst-case__hl { color: var(--tst-lilac); }
.tst-case--vidlab .tst-case__hl { color: var(--violet); }
.tst-nowrap { white-space: nowrap; word-spacing: normal; }
.tst-case__logo { display: inline; height: 28px; width: auto; vertical-align: top; position: relative; top: 5px; }
.tst-case__logo--akool { width: 138px; top: 4px; }
.tst-case__logo--vidlab { height: 26px; top: 4px; }

.tst-case__badge {
  position: relative; z-index: 1; overflow: hidden;   /* also set by .case-badge; the rising fill needs them */
  padding: 6px 12px; font-size: .875rem;
  transition: color .3s var(--tst-ease-out), border-color .3s linear;
}
.tst-case__badge::before {           /* fill that rises into the pill on hover */
  content: ""; position: absolute; z-index: -1; left: 0; top: 100%;
  width: calc(100% + 2px); height: calc(100% + 2px); border-radius: 9999px;
  background: var(--white);
  transition: transform .3s var(--tst-ease-out);
}
.tst-case--unitesync .tst-case__badge { background: var(--violet); border-color: var(--tst-violet-400); color: var(--white); }
.tst-case--akool .tst-case__badge { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .4); color: var(--white); }
.tst-case--vidlab .tst-case__badge::before { background: var(--violet); }

.tst-case__circle {
  position: absolute; border-radius: 999px; background: var(--white); opacity: .1;
  transition: transform .3s var(--tst-ease-out);
}
.tst-case__circle--dot { width: 34px; height: 34px; top: 60%; right: 10%; }
.tst-case__circle--low { width: 234px; height: 234px; bottom: -60%; left: -19%; }
.tst-case__circle--high { width: 234px; height: 234px; top: -42%; right: -18%; }

.tst-case__art { position: absolute; top: 0; left: 0; width: 100%; height: auto; transition: transform .3s var(--tst-ease-out); }

.tst-case__glow {
  position: absolute; width: 80%; aspect-ratio: 2.39; border-radius: 9999px;
  background: var(--tst-glow); opacity: .3; filter: blur(60px);
  transition: transform .3s var(--tst-ease-out);
}
.tst-case__glow--top { right: 120%; bottom: 80%; }
.tst-case__glow--bottom { top: 80%; left: 10%; }

/* hover looks run on wide screens only, as on the live page (992px and up) */
@media (min-width: 992px) {
  .tst-case__art { will-change: transform; }   /* ready for the hover zoom; as live, the card text then draws in grey smoothing */
  .tst-case--vidlab .tst-case__badge { color: var(--body); }
  /* The "Case Study" pill does not fill in on hover: the cards are not links on this site,
     so nothing should look like a button (main builder's decision, 2026-11-15). */

  .tst-case:hover .tst-case__circle,
  .tst-case:hover .tst-case__art,
  .tst-case:hover .tst-case__glow { transition: transform .6s var(--tst-out-back); }
  .tst-case:hover .tst-case__circle--high { transform: scale(1.2); }
  .tst-case:hover .tst-case__circle--dot { transform: translate(-30px, 30px) scale(1.3); }
  .tst-case:hover .tst-case__circle--low { transform: scale(1.4); }
  .tst-case:hover .tst-case__art { transform: scale(1.15) rotate(-5deg); }
  .tst-case:hover .tst-case__glow { transition-duration: .7s; }
  .tst-case:hover .tst-case__glow--top { transform: translateX(80%); }
  .tst-case:hover .tst-case__glow--bottom { transform: translateX(60%); }
}

/* ---------------------------------------------------------------- quote slider */
.tst-slider {
  grid-column: 1 / -1; position: relative; height: 300px; padding-right: 80px;
  border-bottom: 1px solid var(--gray-200);
}
.tst-slider__mask { position: relative; z-index: 1; display: flex; height: 100%; overflow: hidden; }
.tst-slide {
  flex: 0 0 100%; min-width: 0; padding: 28px 40px 28px 28px; background: var(--white);
  transition: transform .5s var(--tst-slide-ease);
}
.tst-slide__body { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.tst-slide__quote { font-size: 18px; line-height: 1.4; color: var(--ink); }
.tst-slide__quote strong { font-weight: 600; }
.tst-slide__person { display: flex; align-items: center; gap: 12px; }
.tst-slide__photo { width: 40px; height: 40px; border-radius: 9999px; object-fit: cover; }
.tst-slide__who { display: flex; align-items: center; gap: 4px; font-size: 15px; line-height: 1.4; color: var(--ink); }
.tst-slide__name { font-weight: 600; }

.tst-slider__arrow {
  position: absolute; right: 0; width: 80px; height: 50%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--gray-50); color: var(--gray-400);
  border-left: 1px solid var(--gray-200);
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
.tst-slider__arrow--prev { top: 0; z-index: 3; border-bottom: 1px solid var(--gray-200); transition: color .2s; }
.tst-slider__arrow--next { bottom: 0; z-index: 4; transition: color .3s; }
.tst-slider__arrow:hover { color: var(--ink); }
.tst-slider__arrow:focus { outline: none; }
.tst-slider__arrow:focus-visible { outline: 2px solid var(--violet); outline-offset: -3px; }
.tst-slider__arrow svg { width: 32px; height: 32px; flex: none; }
.tst-slider__texture {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: calc(100% + 13px);
  background: url("../img/bg-line-shape.svg") 0 0;
}
.tst-slider__arrow--next .tst-slider__texture { background-image: url("../img/bg-line-shape-inverted.svg"); }

/* the live page keeps its dots invisible; here they also show while a keyboard user is on them */
.tst-slider__dots {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 40px; padding-top: 10px;
  display: flex; justify-content: center; opacity: 0;
}
.tst-slider__dots:has(:focus-visible) { opacity: 1; }
.tst-slider__dot {
  flex: none; width: 16px; height: 16px; margin: 8px; background: var(--gray-200);
  transition: background-color .1s, color .1s;
}
.tst-slider__dot[aria-current="true"] { background: var(--violet); }
.tst-slider__dot:focus { outline: none; }
.tst-slider__dot:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* ---------------------------------------------------------------- tablet */
@media (max-width: 991px) {
  .tst__frame { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 36px 0 48px; }
  .tst__left { align-items: center; }
  .tst__sticky { align-items: center; justify-content: center; }
  .tst__grid { border-left-width: 0; border-right-width: 0; }
  .tst-case--vidlab { border-right: 1px solid var(--gray-200); }
  .tst-case__title { font-size: 1.35rem; }
  .tst-case__logo { top: 3px; }
  .tst-case__logo--akool, .tst-case__logo--vidlab { top: 2px; }
  .tst-slider { border-right: 1px solid var(--gray-200); }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 767px) {
  .tst-tile__logo { width: 59%; }
  .tst-tile__logo--strongest { width: 52%; }
  .tst-tile__logo--netnew { width: 49%; }
  .tst-tile__logo--vai { width: 83%; }
  .tst-case { padding-left: 20px; padding-right: 28px; }
  .tst-case__title { margin: 0; font-size: 1.1rem; line-height: 1.3; }
  .tst-case__logo { height: 20px; top: 2px; }
  .tst-case__logo--akool { width: 100px; top: 1px; }
  .tst-case__logo--vidlab { top: 0; }
  /* round 6 fix: on phones the AKOOL card is narrow and its wide picture put the bubbles under the title; the picture
     is now as tall as the card and anchored to the right, so the title sits on the dark sky */
  .tst-case--akool .tst-case__art { width: auto; height: 100%; max-width: none; left: auto; right: -22%; }
  /* round 6 fix: the slider had a fixed height, and on narrow phones the longest quote ran past it and was cut.
     It now grows to its tallest quote; the old heights stay as the minimum, and the slides still stretch to the
     same height, so the name stays at the bottom. */
  .tst-slider { height: auto; }
  .tst-slider__mask { min-height: 25rem; }
  .tst-slide { padding-left: 24px; padding-right: 24px; }
  .tst-slide__quote--long { font-size: 16px; }
}
@media (max-width: 479px) {
  .tst__title { text-align: center; }
  .tst-slider__mask { min-height: 28rem; }
  .tst-slide__who { flex-direction: column; align-items: flex-start; gap: 0; }
}
@media (max-width: 359px) {
  /* round 6 fix: on the smallest phones the six-line AKOOL title still crosses two bubbles; a soft dark glow behind
     the letters keeps it readable */
  .tst-case--akool .tst-case__title { text-shadow: 0 1px 14px rgba(0, 0, 0, .85); }
}

@media (prefers-reduced-motion: reduce) {
  .tst-slide { transition: none; }
}
