/* ============================================================
   TRUST STRIP — a rolling band of certification badges between
   the hero and "What we do". Each badge links to its verification
   page. js/trust.js repeats the badge group to fill the screen and
   sets --shift (one group's width) and the loop duration.
   ============================================================ */

.trust {
  padding: 2.25rem 0 2.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.trust-label {
  margin: 0 auto 1.5rem;
  padding: 0 16px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Soft fade at both edges so badges drift in and out */
.trust-marquee {
  overflow: hidden;
  /* Headroom so a badge can grow on hover without its top and bottom being
     clipped; the negative margin keeps the strip the same height */
  padding: 12px 0;
  margin: -12px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.trust-track {
  display: flex;
  width: max-content;
}
.trust-group,
.trust-group li { flex: none; }   /* never let the row shrink the badges */
.trust-track.is-rolling {
  animation: trust-roll var(--roll-time, 30s) linear infinite;
}
.trust-marquee:hover .trust-track,
.trust-marquee:focus-within .trust-track { animation-play-state: paused; }

@keyframes trust-roll {
  to { transform: translateX(calc(var(--shift, 0px) * -1)); }
}

.trust-group {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.trust-group li { padding: 0 1.75rem; }

.trust-badge {
  display: block;
  border-radius: 50%;
  transition: transform 0.25s ease;
}
/* Round Google badges are sized by width, the wide DMI logo by height */
.trust-badge img { display: block; width: 92px; height: 92px; object-fit: contain; }
.trust-badge--dmi { border-radius: 8px; }
.trust-badge--dmi img { width: auto; height: 70px; aspect-ratio: 600 / 318; }
.trust-badge:hover,
.trust-badge:focus-visible { transform: scale(1.06); }
.trust-badge:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

@media (max-width: 600px) {
  .trust { padding: 1.75rem 0 2rem; }
  .trust-group li { padding: 0 1.1rem; }
  .trust-badge img { width: 72px; height: 72px; }
  .trust-badge--dmi img { width: auto; height: 54px; }
}

/* Reduced motion: no rolling, badges sit still and wrap */
@media (prefers-reduced-motion: reduce) {
  .trust-marquee { -webkit-mask-image: none; mask-image: none; }
  .trust-track { width: auto; justify-content: center; }
  .trust-group { flex-wrap: wrap; justify-content: center; row-gap: 1rem; }
  .trust-badge { transition: none; }
  .trust-badge:hover,
  .trust-badge:focus-visible { transform: none; }
}
