/* ============================================================================
   The credentials row at the foot of About (creds.js runs it as a loop).

   Without the script, under reduced motion and under ?classic: a still row
   of the four marks between two hairlines, wrapping on a phone. The words
   are 600 at 1rem in the muted grey; the two club logos are 30px tall and
   grey. (The files are in the clubs' own greens; the No-Colour Rule takes
   the hue out, and a step of darkening sits them with the words.) In the
   dark they are inverted, as the header's logo is, so they read on the
   dark band.

   With the script (.is-loop): one line that runs, its two ends fading out
   through an alpha mask, not a gradient painted in the band's colour, so
   it is right on any ground and in both themes. The strip takes the
   page's own focus ring (tennis.css) when it is reached by the keyboard.
   ========================================================================== */

.creds {
  --creds-gap: 2.75rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.creds-list {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .9rem var(--creds-gap);
  margin: 0; padding: 1.15rem 0;
  list-style: none;
}
.creds-item {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--muted);
}
.creds-logo {
  display: block; flex: none; height: 30px; width: auto;
  filter: grayscale(1) brightness(.75);
}
:root[data-theme="dark"] .creds-logo { filter: grayscale(1) brightness(.75) invert(1); }
/* RSPA's one-colour logo is its white one: black on the page, white in the dark. */
.creds-logo--white { filter: brightness(0); }
:root[data-theme="dark"] .creds-logo--white { filter: none; }

/* --- The loop. */
.creds.is-loop {
  cursor: grab;
  touch-action: pan-y pinch-zoom;          /* the page still scrolls under a finger */
  -webkit-tap-highlight-color: transparent;
}
.creds.is-loop[data-dragging], .creds.is-loop[data-dragging] * { cursor: grabbing; }
.creds-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent);
  mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent);
}
.creds-track {
  display: flex; width: max-content;
  will-change: transform;
  user-select: none; -webkit-user-select: none;
}
/* Every item carries its gap after it, the last one too, so one list's
   length is the exact step from one copy to the next. */
.creds.is-loop .creds-list { flex: none; flex-wrap: nowrap; gap: 0; }
.creds.is-loop .creds-item { flex: none; white-space: nowrap; margin-inline-end: var(--creds-gap); }
.creds.is-loop .creds-logo { -webkit-user-drag: none; pointer-events: none; }
