/*
 * Homepage hero · The results board (live; /?board=v1 for the old band)
 * template-parts/results-board.php · assets/js/home-board.js
 *
 * A departures board under the hero: each client's mark, its headline
 * result on split-flap tiles, one plain line, a link. The tiles start
 * blank only once the script is running (.rb.is-live).
 */

.rb {
  position: relative;
  margin-top: 3.25rem;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #0f1828 0%, #0a111e 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.rb .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rb-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.rb-title, .rb-meta { margin: 0; font-family: 'Space Mono', monospace; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
.rb-title { color: #C9A44A; }
.rb-meta { display: inline-flex; align-items: center; gap: 0.5rem; color: rgba(255, 255, 255, 0.5); }
.rb-meta i { width: 7px; height: 7px; border-radius: 50%; background: #3fb27f; box-shadow: 0 0 0 3px rgba(63, 178, 127, 0.18); animation: rb-pulse 2.4s ease-in-out infinite; }

.rb-rows { margin: 0; padding: 0; list-style: none; }
.rb-rows li { margin: 0; }
.rb-rows li + li .rb-row { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.rb-row {
  display: grid;
  grid-template-columns: 11rem 18.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.6rem;
  padding: 1.05rem 1.5rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.25s ease;
}
.rb-row:hover { color: inherit; text-decoration: none; background: rgba(255, 255, 255, 0.03); }
.rb-row--still:hover { background: none; }
.rb-row:focus-visible { outline: 2px solid #e6c77e; outline-offset: -2px; }

.rb-logo { display: flex; align-items: center; height: 2.6rem; }
.rb-logo img { display: block; width: auto; max-width: 10.5rem; height: 2rem; object-fit: contain; object-position: left center; opacity: 0.92; }
.rb-row--southdowns .rb-logo img { height: 2.5rem; }
.rb-row--ealing .rb-logo img { height: 2.25rem; }
.rb-row--miles .rb-logo img { height: 1.3rem; }

/* The split-flap tiles */
.rb-flaps { display: inline-flex; gap: 3px; font-size: 1.3rem; }
.rb-f {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.32em;
  height: 1.8em;
  perspective: 200px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  line-height: 1;
  color: #f3d58a;
  background: linear-gradient(180deg, #1d2739 0%, #1a2334 49.5%, #141c2b 50.5%, #121a28 100%);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 4px rgba(0, 0, 0, 0.45);
}
.rb-f::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.6); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03); }
.rb-f > span { display: block; transform-origin: 50% 50%; }
.rb-f--sp { width: 0.55em; background: none; box-shadow: none; }
.rb-f--sp::after { content: none; }
.rb-f.is-flip > span { animation: rb-flip 0.07s ease-in-out; }

.rb-line { font-family: 'Inter', sans-serif; font-size: 0.95rem; line-height: 1.45; color: rgba(255, 255, 255, 0.78); }
.rb-go { font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 700; color: #e6c77e; white-space: nowrap; }
.rb-go i { display: inline-block; font-style: normal; transition: transform 0.2s ease; }
.rb-row:hover .rb-go i { transform: translateX(3px); }

@keyframes rb-flip { 0% { transform: scaleY(1); } 45% { transform: scaleY(0.06); } 100% { transform: scaleY(1); } }
@keyframes rb-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(63, 178, 127, 0.18); } 50% { box-shadow: 0 0 0 5px rgba(63, 178, 127, 0.05); } }

/* Screen widths */
@media (max-width: 1100px) {
  .rb-row { grid-template-columns: 9.5rem 18.4rem minmax(0, 1fr); }
  .rb-go { display: none; }
}
@media (max-width: 760px) {
  .rb { margin-top: 2.4rem; border-radius: 12px; }
  .rb-head { padding: 0.75rem 1.1rem; }
  .rb-title, .rb-meta { font-size: 0.62rem; letter-spacing: 0.16em; }
  .rb-meta-k { display: none; }
  .rb-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo go" "flaps flaps" "line line";
    gap: 0.7rem 1rem;
    padding: 1.05rem 1.1rem 1.15rem;
  }
  .rb-logo { grid-area: logo; height: 2.1rem; }
  .rb-logo img { height: 1.6rem; }
  .rb-row--southdowns .rb-logo img { height: 2rem; }
  .rb-row--ealing .rb-logo img { height: 1.8rem; }
  .rb-row--miles .rb-logo img { height: 1.05rem; }
  .rb-flaps { grid-area: flaps; font-size: 1.12rem; }
  .rb-line { grid-area: line; font-size: 0.9rem; }
  .rb-go { grid-area: go; display: inline; font-size: 0.8rem; }
}
@media (max-width: 380px) {
  .rb-flaps { font-size: 1rem; gap: 2.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .rb *, .rb *::before, .rb *::after { animation: none !important; }
}
