/* The client logo band. Shared by every page that shows one; the markup
   comes from assets/projects-data.js. Moved out of index.html 11/11/2026 so
   the agency landing page runs the same band. Edit it here only. */

/* ── Client band: four logos, standing still, across the whole page ───────
   Chosen 01/09/2026 from mockups/hero-marquee-v2.html, option 5. It used to
   be a marquee inside the hero's text column, which capped it at 528px and
   carried the client name and the project title under every logo.
   Two things changed and both are deliberate:
   1. It left the column. Inside it the row could never pass the partner
      badge, so a full-width band is the only place it gets real width.
   2. It stopped moving. With four clients a scrolling row draws attention
      to how few there are, and a wide window would have had to show the
      same logo twice at once to fill itself. Standing still, four logos
      spread across the page with air between them read as confidence.
   The captions went with the motion: name plus project title made the row
   a list of case studies. The logo itself is still a link to its project,
   so nothing became unreachable. */
/* the margin under the strip is gone with the stats row it used to hold off */
#hero-logos { width: 100%; }
/* Desktop: one static row, the duplicate copy hidden. The duplicate only
   exists so phones can run the same markup as a marquee, see the media
   query near the bottom of this stylesheet. */
.ks-logo-track {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; width: 100%;
}
.ks-logo[data-dup] { display: none; }
.ks-logo {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; opacity: 0.78;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.ks-logo:hover, .ks-logo:focus-visible { opacity: 1; transform: translateY(-2px); }
.ks-logo:focus-visible { outline: 2px solid #f07316; outline-offset: 6px; border-radius: 4px; }

/* Hover a logo and it lifts away, uncovering what we did for that client.
   Every figure here is the one already published on that project's own page.
   No hover on a touch screen, so phones keep showing the logos. */
.ks-logo { position: relative; overflow: hidden; }
/* the logo leaves first and the figure follows. Without the delay the two crossfade
   through each other and the number sits on top of the logo for a beat. */
/* -120% of the logo's OWN height, not a fixed 52px: the Ridman mark is 96px tall and a
   fixed lift left its lower half sitting inside the cell while the figure faded in. */
.ks-logo img { transition: transform 0.34s cubic-bezier(0.22,1,0.36,1), opacity 0.12s linear; }
.ks-logo:hover img, .ks-logo:focus-visible img { transform: translateY(-120%); opacity: 0; }
.ks-res {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; text-align: center;
  padding: 0 0.5rem; pointer-events: none;
  opacity: 0; transform: translateY(30px);
  /* the figure starts only after the logo has faded out, so the two never overlap */
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1) 0.14s, opacity 0.18s linear 0.14s;
}
.ks-logo:hover .ks-res, .ks-logo:focus-visible .ks-res { opacity: 1; transform: none; }
/* the arrow and the figure share a line, arrow on the leading edge */
.ks-res-top { display: flex; align-items: center; justify-content: center; gap: 6px; color: #f07316; }
.ks-res-arrow { flex: 0 0 auto; }
.ks-res b {
  font-family: 'Assistant', sans-serif; font-weight: 800; font-size: 1.85rem;
  color: #f07316; line-height: 1; white-space: nowrap;
}
.ks-res-lab { font-size: 0.85rem; line-height: 1.35; color: rgba(255,255,255,0.62); }
@media (prefers-reduced-motion: reduce) {
  .ks-logo img, .ks-res { transition: none; }
}
/* Taken verbatim from mockups/home-wide.html, 01/09/2026, chosen by eye.
   An earlier version matched the four by painted area, which put the round
   marks at 108 and Krembo at a height whose wordmark could not be read.
   These are the proportions Kfir picked instead: the round marks sit at the
   base 84, Ridman at 96, and Krembo is scaled rather than sized, so it
   paints 487x122 and spills past its cell on purpose. transform does not
   affect layout, so nothing reflows around it. */
/* SUPERSEDED 16/11/2026: the hand-tuned heights above drifted as logos were added
   (five marks, five visual sizes). Now every file is trimmed to its ink and every
   mark paints the same area: --logo-a is the side of that area's square, --f comes
   from projects-data.js per logo. Krembo keeps a floor because at equal area its
   wordmark was the one Kfir could not read on 01/09. */
.ks-logo img {
  --logo-a: 64px;
  width: auto; max-width: 100%; object-fit: contain;
  height: max(calc(var(--logo-a) * var(--f, 1)), var(--floor, 0px));
}
.ks-logo img.logo-krembo { --floor: 48px; }
@media (prefers-reduced-motion: reduce) {
  .ks-logo { transition: none; }
  .ks-logo:hover { transform: none; }
}

/* the phones run it as a marquee */
@media (max-width: 767px) {
  /* Logo strip - tighter cells, still one moving row */
  /* Phones run the marquee, desktop stays static, and the reason is the
     ratio between the window and one copy of the list. One copy is about
     640px. A phone window is ~342px, narrower than a copy, so a moving row
     never shows the same client twice. The desktop band is ~1824px, wider
     than a copy, which is exactly why a marquee there had to repeat itself
     and why it stands still instead.
     It also buys back the height: four logos stacked one per row ran 477px
     down a 390px screen. */
  #hero-logos { overflow: hidden;
    -webkit-mask-image: linear-gradient(to left, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(to left, transparent, #000 12%, #000 88%, transparent); }
  .ks-logo-track {
    width: max-content; justify-content: flex-start; gap: 0;
    animation: ks-logo-slide 20s linear infinite;
  }
  /* The logos are links, so the row holds still under a finger. */
  #hero-logos:active .ks-logo-track,
  #hero-logos:focus-within .ks-logo-track { animation-play-state: paused; }
  .ks-logo[data-dup] { display: flex; }
  .ks-logo { flex: 0 0 auto; width: 160px; }
  /* RTL: the track overflows to the LEFT, so it travels right. At +50% the
     second copy sits exactly where the first one started. */
  @keyframes ks-logo-slide { from { transform: translateX(0); } to { transform: translateX(50%); } }
  @media (prefers-reduced-motion: reduce) {
    .ks-logo-track { animation: none; width: 100%; justify-content: space-between; }
    .ks-logo[data-dup] { display: none; }
    #hero-logos { -webkit-mask-image: none; mask-image: none; }
  }
  .ks-logo img { --logo-a: 44px; }
  .ks-logo img.logo-krembo { --floor: 32px; }
  /* the wide wordmarks keep a wider cell so the marquee spacing stays even */
  .ks-logo.ks-logo-wide { width: 200px; }
}

/* A band with fewer than three logos (the agency landing page shows two).
   Spread across the full width two marks look stranded, so they sit together
   in the middle, and on a phone they stand still: two logos cannot fill a
   marquee without showing the same client twice at once. */
#hero-logos.ks-logos-few .ks-logo-track { justify-content: center; gap: clamp(3rem, 10vw, 9rem); }
#hero-logos.ks-logos-few .ks-logo { flex: 0 0 auto; width: 200px; }
@media (max-width: 767px) {
  #hero-logos.ks-logos-few { -webkit-mask-image: none; mask-image: none; }
  #hero-logos.ks-logos-few .ks-logo-track { animation: none; width: 100%; gap: 1.5rem; }
  #hero-logos.ks-logos-few .ks-logo[data-dup] { display: none; }
  #hero-logos.ks-logos-few .ks-logo { width: 140px; }
}
