/* ------------------------------------------------------------------
   iNBest client logo carousel
   Two rows of client logos scrolling in opposite directions.
   Framework free: no React, no Tailwind, no build step.

   Tokens you can override on .ilc (or on :root):
     --ilc-surface  background of the band
     --ilc-text     logo / wordmark color
     --ilc-line     hairline color
     --ilc-speed    seconds per full loop (default 90s)
   ------------------------------------------------------------------ */

.ilc {
  --ilc-surface: #0a1729;
  --ilc-text: #eaf1fa;
  --ilc-line: rgba(234, 241, 250, .16);
  --ilc-speed: 90s;

  box-sizing: border-box;
  padding: 26px 0 30px;
  background: var(--ilc-surface);
  color: var(--ilc-text);
}

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

.ilc__inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 640px) {
  .ilc__inner { padding: 0 18px; }
}

.ilc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.ilc__label {
  display: block;
  margin: 0;
  color: rgba(234, 241, 250, .58);
  font: 10px "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Optional pause button. Hidden until JS enables it. */
.ilc__pause {
  min-height: 34px;
  border: 1px solid rgba(234, 241, 250, .34);
  padding: 7px 11px;
  background: transparent;
  color: var(--ilc-text);
  cursor: pointer;
  font: 10px "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ilc__pause:hover { border-color: #64c7f5; color: #64c7f5; }
.ilc__pause[hidden] { display: none; }

.ilc__track {
  overflow: hidden;
  border-top: 1px solid var(--ilc-line);
  border-bottom: 1px solid var(--ilc-line);
  /* Soft fade at both edges. Remove this line for hard edges. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ilc__row {
  display: flex;
  width: max-content;
  min-width: 100%;
  animation: ilc-marquee var(--ilc-speed) linear infinite;
  animation-play-state: paused;
  animation-direction: reverse;   /* row 1 travels left to right */
}

.ilc__row--reverse { animation-direction: normal; }  /* row 2 travels right to left */

.ilc__row.is-running { animation-play-state: running; }

/* Pause on hover and on keyboard focus inside the band. */
.ilc__track:hover .ilc__row,
.ilc__track:focus-within .ilc__row { animation-play-state: paused; }

.ilc.is-paused .ilc__row { animation-play-state: paused; }

.ilc__strip {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
}

.ilc__logo {
  display: flex;
  width: clamp(142px, 16vw, 204px);
  min-height: 78px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(234, 241, 250, .12);
  padding: 13px 20px;
  color: inherit;
  text-decoration: none;
}

a.ilc__logo:hover,
a.ilc__logo:focus-visible { background: rgba(234, 241, 250, .06); }

.ilc__logo:focus-visible {
  outline: 2px solid #64c7f5;
  outline-offset: -2px;
}

/* The mark stacks the wordmark fallback and the image in one grid cell,
   so the row never reflows when an image finishes loading. */
.ilc__mark {
  display: grid;
  width: 100%;
  min-height: 44px;
  place-items: center;
}

.ilc__mark > * { grid-area: 1 / 1; }

.ilc__mark img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 34px;
  object-fit: contain;
  opacity: 0;
  /* Forces any logo to pure white. Drop this line to keep original colors. */
  filter: brightness(0) invert(1);
}

/* Squarer marks get more height so every logo carries the same weight. */
.ilc__mark img[data-shape="compact"] { max-height: 42px; }
.ilc__mark img[data-shape="square"]  { max-height: 50px; }

.ilc__mark.is-loaded img { opacity: 1; }
.ilc__mark.is-loaded .ilc__name { visibility: hidden; }

.ilc__name {
  max-width: 14ch;
  color: rgba(234, 241, 250, .78);
  font-size: clamp(16px, 4.2vw, 20px);
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: break-word;
  hyphens: auto;
}

@keyframes ilc-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ilc__row {
    animation: none !important;
    transform: none !important;
  }
  .ilc__track {
    overflow-x: auto;
    scrollbar-width: thin;
  }
}
