/* xGrowth home-logos v3. Scoped to #words: company marks rail and testimonial app icons.
   Marks are the supplied artwork, unchanged. Every image is cropped by its own box so transparent padding never
   adds width. Two crop models, both inside a fixed 36px mark height:
   - padded gray PNGs (original five): scaled from visible width (--w, CSS px) and fraction of the file width (--f);
   - optical windows (other ten): window --w x --h shows a canvas --cw x --ch offset by --cl/--ct (all CSS px).
   A neutral dark chip backs the marks so contrast holds in both themes.
   Static baseline: a wrapped list with every company visible. home-logos.js adds data-xghl-rail="on" on
   .xghl-rail only when it can run the slow transform marquee, so no-JS, reduced motion and unsupported browsers
   keep this baseline. */
#words .trust .xghl__head{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 24px}
#words .xghl-rail{flex:1 1 100%;min-width:0;max-width:100%}
#words .xghl-rail__view{min-width:0}
#words .xghl-rail__track{display:block}
#words .xghl{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:12px}
#words .xghl__item{--s:1;flex:0 0 auto;margin:0;display:flex;align-items:center;justify-content:center;padding:10px 18px;border-radius:999px;
  background:var(--dark2,#181A15);border:1px solid rgba(243,248,252,.10)}
#words .xghl__crop{position:relative;width:calc(var(--w) * 1px * var(--s));height:calc(36px * var(--s));overflow:hidden}
#words .xghl__crop img{position:absolute;left:50%;top:50%;display:block;max-width:none;height:auto;
  width:calc(var(--w) / var(--f) * 1px * var(--s));transform:translate(-50%,-50%)}
#words .xghl__item--google{--w:92;--f:.50}
#words .xghl__item--meta{--w:100;--f:.48}
#words .xghl__item--liftoff{--w:100;--f:.46}
#words .xghl__item--pangle{--w:116;--f:.58}
#words .xghl__item--ttd{--w:150;--f:.74}

/* Optical-window model. The crop only reserves width and the 36px height; the window clips the canvas. */
#words .xghl__crop--win{overflow:visible;display:flex;align-items:center;justify-content:center}
#words .xghl__win{position:relative;display:block;flex:none;overflow:hidden;
  width:calc(var(--w) * 1px * var(--s));height:calc(var(--h) * 1px * var(--s))}
#words .xghl__crop--win .xghl__win img{left:calc(var(--cl) * 1px * var(--s));top:calc(var(--ct) * 1px * var(--s));
  width:calc(var(--cw) * 1px * var(--s));height:calc(var(--ch) * 1px * var(--s));transform:none}
@media (max-width:560px){#words .xghl__item{--s:.84;padding:8px 14px}}

/* One monochrome treatment for all fifteen marks. The source art mixes gray PNGs, dark SVGs (#171717, #1A1A1A, black)
   and colored SVGs (Singular, TikTok, Digital Turbine), so no per-company rule can balance them. Instead every <img>
   is flattened by one paint filter: brightness(0) makes each visible pixel black (alpha kept), invert(.8) lifts it to a
   single soft off-white (~#CCC). The marks then sit quietly on the #181A15 chip and xGrowth green stays the only accent
   (the static hover border). Files stay byte-identical; a filter changes no box, so crops, layout and motion are
   untouched. The chip is dark in both themes, and the filter is static, so one rule serves both themes and every
   state (static, moving, hover, focus, reduced motion). The aria-hidden clone shares the classes and matches. */
#words .xghl__crop img{filter:grayscale(1)}
/* Correction: the flatten above turned BidMachine's gray PNG into a solid pale square, because brightness(0) discards the
   internal luminance. The ten gray PNGs already are the intended monochrome art, so they only get grayscale(1), which
   is a no-op on gray pixels and keeps their inner detail. Only the five SVGs (dark or colored paint) are flattened. */
#words .xghl__item--appsflyer .xghl__crop img,
#words .xghl__item--adjust .xghl__crop img,
#words .xghl__item--tiktok .xghl__crop img,
#words .xghl__item--singular .xghl__crop img,
#words .xghl__item--digital-turbine .xghl__crop img{filter:brightness(0) invert(.8)}

/* Pause/Play. Hidden until the script confirms the rail can move. */
#words .xghl-ctl{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;gap:8px;margin:0;cursor:pointer;
  font:inherit;font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;line-height:1;color:var(--mute);
  background:transparent;border:1px solid var(--line2);border-radius:999px;padding:8px 14px;min-height:32px;
  transition:color .3s,border-color .3s}
#words .xghl-ctl[hidden]{display:none}
#words .xghl-ctl::before{content:"";width:8px;height:10px;flex:none;border-left:2.5px solid currentColor;border-right:2.5px solid currentColor;box-sizing:border-box}
#words .xghl-ctl[data-state=paused]::before{width:0;height:0;border:0;border-style:solid;border-width:5px 0 5px 9px;border-color:transparent transparent transparent currentColor}
@media (hover:hover){#words .xghl-ctl:hover{color:var(--ink);border-color:var(--ink2)}}
#words .xghl-ctl:focus-visible{color:var(--ink);outline:2px solid var(--ink);outline-offset:3px;border-radius:999px}

/* Marquee mode. The track holds the original list and an aria-hidden, inert clone of equal width (each carries
   the trailing gap as padding), so a translation of -50% loops seamlessly. The animation itself is created by
   the script (Web Animations, linear) so pausing keeps position and resizing keeps progress. */
#words .xghl-rail[data-xghl-rail=on] .xghl-rail__view{overflow:hidden;padding:4px 0;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 48px,#000 calc(100% - 48px),transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 48px,#000 calc(100% - 48px),transparent 100%)}
#words .xghl-rail[data-xghl-rail=on] .xghl-rail__track{display:flex;flex-wrap:nowrap;width:max-content;will-change:transform}
#words .xghl-rail[data-xghl-rail=on] .xghl{flex:0 0 auto;flex-wrap:nowrap;padding-right:12px}
#words .xghl-rail[data-xghl-rail=on] .xghl__item{transition:none;transform:none}

@media (max-width:560px){
  #words .xghl-rail[data-xghl-rail=on] .xghl-rail__view{
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 24px,#000 calc(100% - 24px),transparent 100%);
    mask-image:linear-gradient(90deg,transparent 0,#000 24px,#000 calc(100% - 24px),transparent 100%)}
}

/* Reduced motion: never a moving rail, no control. The wrapped baseline shows every company. */
@media (prefers-reduced-motion:reduce){
  #words .xghl-ctl{display:none}
  #words .xghl-rail .xghl-rail__view{overflow:visible;-webkit-mask-image:none;mask-image:none}
  #words .xghl-rail .xghl-rail__track{display:block;width:auto;transform:none}
  #words .xghl-rail .xghl{flex-wrap:wrap;padding-right:0}
  #words .xghl-rail .xghl[aria-hidden=true]{display:none}
}

/* Testimonials: app icon beside the quote. DOM order stays quote, attribution, icon. */
#words .qs figure{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:clamp(16px,2vw,28px);align-items:start}
#words .qs figure blockquote{grid-column:2;grid-row:1;margin:0}
#words .qs figure figcaption{grid-column:2;grid-row:2}
#words .qs .xgq__icon{grid-column:1;grid-row:1 / span 2;display:block;width:clamp(52px,5vw,72px);height:auto;aspect-ratio:1;border-radius:22%;
  box-shadow:0 0 0 1px var(--line2,rgba(14,15,12,.22))}

/* Static-mode hover lift only; the moving rail is clipped and stays still on hover. */
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  #words .xghl-rail:not([data-xghl-rail=on]) .xghl__item{transition:transform .3s var(--ease,cubic-bezier(.2,.7,.1,1)),border-color .3s}
  #words .xghl-rail:not([data-xghl-rail=on]) .xghl__item:hover{transform:translateY(-2px);border-color:rgba(190,255,116,.55)}
}
