/* Our Clients page and the logo strip on the home page. Editorial hero, then hairline grids of logo tiles; theme tokens only. */
.clients-page { background: #fff; color: var(--tm-color-ink); }
.clients-shell { width: min(var(--tm-shell-max), calc(100% - 2 * var(--tm-shell-gutter))); margin-inline: auto; }
@media (min-width: 1200px) {
  body .clients-page { padding-left: var(--tm-rail-width); }
}

/* Hero */
.clients-hero__grid { display: grid; grid-template-columns: 1.15fr minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 90px); align-items: end; }
.clients-hero h1 { margin-bottom: 0; }
.clients-hero .tm-editorial-hero__description { max-width: 520px; margin-bottom: 30px; }
.clients-hero__facts { display: flex; gap: clamp(28px, 4vw, 56px); margin: 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .16); }
.clients-hero__facts dd { margin: 0; color: var(--tm-color-inverse); font-size: clamp(34px, 3.4vw, 48px); font-weight: 600; letter-spacing: -1px; line-height: 1; }
.clients-hero__facts dt { margin-top: 8px; color: var(--tm-color-muted-inverse); font-size: 14px; font-weight: 400; }

/* Groups */
.clients-group { padding: clamp(56px, 7vw, 96px) 0 0; }
.clients-group:last-child { padding-bottom: clamp(72px, 9vw, 130px); }
.clients-group__head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--tm-border); }
.clients-group__no { margin: 0; color: var(--tm-color-accent-text); font-size: 12px; font-weight: 500; letter-spacing: 2px; }
.clients-group__head h2 { flex: 1; margin: 0; color: var(--tm-color-ink); font-size: clamp(26px, 2.8vw, 38px); font-weight: 500; letter-spacing: -1px; line-height: 1.15; }

/* Logo grid: the same white rounded tiles as the home page "Our Global Clients" (light border, no shadow, lifts a little on hover). */
.clients-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.clients-grid li { margin: 0; }
.clients-tile {
  display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 28px;
  border: 1px solid #eceef1; border-radius: 16px; background: #fff;
  transition: transform var(--tm-duration-normal) var(--tm-ease), border-color var(--tm-duration-normal) var(--tm-ease);
}
.clients-tile:hover { transform: translateY(-4px); border-color: var(--tm-border); }
.clients-tile img { display: block; max-width: 100%; height: auto; object-fit: contain; } /* width/height attributes come from clientsLogoSize() in our-clients.php */

@media (max-width: 1199.98px) { .clients-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .clients-hero__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767.98px) { .clients-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .clients-tile { padding: 20px; border-radius: 12px; } }
@media (prefers-reduced-motion: reduce) { .clients-tile { transition: none; } .clients-tile:hover { transform: none; } }

/* Home page "Our global clients": heading and a short line on the left; on the right, five columns of white logo tiles that drift
   slowly up and down (alternating), fade out at the top and bottom, and pause on hover. Theme tokens only. */
.home-clients { position: relative; padding: clamp(64px, 8vw, 120px) 0; background: #fff; color: var(--tm-color-ink); overflow: hidden; }
.home-clients__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(40px, 6vw, 96px); align-items: center; width: min(var(--tm-shell-max), calc(100% - 2 * var(--tm-shell-gutter))); margin-inline: auto; }
@media (min-width: 1200px) { .home-clients { padding-left: var(--tm-rail-width); } }

/* Same heading scale as Industries We Serve and Technologies We Work With. */
.home-clients__copy h2 { margin: 0 0 24px; color: var(--tm-color-ink); font-size: clamp(34px, 3.9vw, 54px); font-weight: 500; letter-spacing: -1.6px; line-height: 1.06; }
.home-clients__copy h2 em { color: var(--tm-color-accent); font-style: normal; } /* same amber as the highlighted words in About and the other sections */
.home-clients__copy p { margin: 0; max-width: 480px; color: var(--tm-color-muted); font-size: 17px; line-height: 1.7; }
.home-clients__copy .home-clients__more { margin-top: 32px; }

/* Tiles: five columns inside one window with the top and bottom edges faded out */
.home-clients__tiles {
  --hc-tile-h: 104px; --hc-gap: 16px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--hc-gap);
  height: clamp(400px, 31vw, 470px); /* about 4 tiles tall, so a logo rarely shows twice in one column */
  padding: 8px 6px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 82%, transparent 100%);
}
.home-clients__col { min-width: 0; }
/* One copy of a column is (tile + gap) x count tall; the track moves by exactly one copy, then repeats, so the loop has no seam.
   Every column moves at the same speed (8s per tile); odd columns move the other way, and each starts at a different point. */
.home-clients__track {
  display: flex; flex-direction: column;
  animation: home-clients-drift calc(var(--hc-count) * 8s) linear infinite;
  animation-delay: var(--hc-delay, 0s);
  will-change: transform;
}
.home-clients__col:nth-child(even) .home-clients__track { animation-direction: reverse; }
.home-clients__tiles:hover .home-clients__track { animation-play-state: paused; }
@keyframes home-clients-drift { from { transform: translateY(0); } to { transform: translateY(-25%); } }
.home-clients__list { display: flex; flex-direction: column; gap: var(--hc-gap); margin: 0 0 var(--hc-gap); padding: 0; list-style: none; }
.home-clients__list li {
  display: grid; place-items: center;
  height: var(--hc-tile-h); margin: 0; padding: 14px;
  border: 1px solid #eceef1; border-radius: 16px; background: #fff;

  transition: transform var(--tm-duration-normal) var(--tm-ease), border-color var(--tm-duration-normal) var(--tm-ease);
}
.home-clients__list li:hover { transform: translateY(-4px); border-color: var(--tm-border); }
.home-clients__list img { display: block; max-width: 100%; height: auto; object-fit: contain; }

@media (max-width: 991.98px) {
  .home-clients__inner { grid-template-columns: minmax(0, 1fr); }
  .home-clients__tiles { height: 440px; }
}
@media (max-width: 767.98px) {
  .home-clients__tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); --hc-tile-h: 88px; --hc-gap: 12px; }
  .home-clients__col:nth-child(5) { display: none; } /* four columns on tablets; every client is still listed on the Our Clients page */
}
@media (max-width: 575.98px) {
  .home-clients__tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); --hc-tile-h: 80px; height: 380px; }
  .home-clients__col:nth-child(4) { display: none; }
  .home-clients__list li { padding: 10px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  /* No drift: a still grid showing each logo once. */
  .home-clients__tiles { height: auto; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .home-clients__track { animation: none; will-change: auto; }
  .home-clients__list[aria-hidden="true"] { display: none; }
  .home-clients__list { margin-bottom: 0; }
  .home-clients__list li { transition: none; }
  .home-clients__list li:hover { transform: none; }
}

/* Home "Key Features" band: a light warm tint so it reads as its own section next to the white clients band above it. */
.home-key-features { background: var(--tm-surface-warm); }
