/* ==========================================================
   District 6 — Hall of Legends
   Art direction: docs/aaa-experience/03-ART-DIRECTION.md §6

   Three halls that must not feel alike:
     The Floor        volatile, immediate, per-cabinet     — phosphor + amber
     The Championship ongoing, ceremonial, seasonal        — trophy gold
     Hall of Fame     permanent, quiet, engraved in stone  — legacy stone

   Rule with teeth: nothing purchasable affects position, colour, size or
   crown anywhere in this district. Spend is invisible here.
   ========================================================== */

.hall-floor-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 42% at 50% -8%, color-mix(in srgb, var(--aaa-light) 14%, transparent), transparent 64%),
    linear-gradient(0deg, hsl(250 30% 5%), transparent 72%);
}

/* Each hall re-lights the whole district. */
.hall-mode-floor  { --aaa-light: hsl(158 100% 52%); --aaa-light-ink: hsl(158 90% 78%); --aaa-light-deep: hsl(158 70% 20%); --aaa-light-on: hsl(160 90% 6%); }
.hall-mode-season { --aaa-light: hsl(45 90% 60%);   --aaa-light-ink: hsl(45 90% 84%);  --aaa-light-deep: hsl(45 50% 24%);  --aaa-light-on: hsl(42 90% 8%); }
.hall-mode-fame   { --aaa-light: hsl(28 24% 66%);   --aaa-light-ink: hsl(30 24% 84%);  --aaa-light-deep: hsl(28 18% 26%);  --aaa-light-on: hsl(28 30% 8%); }

.hall-head { padding: clamp(0.5rem, 2vw, 1rem) 0 0; }

/* ── Hall selector ──────────────────────────────────────────────────── */

.hall-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: var(--aaa-gap) 0 0;
  min-height: 46px;
}
.hall-tab {
  flex: 1 1 160px;
  display: grid;
  gap: 0.1rem;
  text-align: left;
  border: 1px solid var(--aaa-hairline);
  background: var(--aaa-night-1);
  color: var(--aaa-ink-2);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  min-height: 62px;
  cursor: pointer;
  transition: border-color var(--aaa-t-quick) var(--aaa-e-settle);
}
.hall-tab b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aaa-ink-1);
}
.hall-tab small { font-size: 0.76rem; color: var(--aaa-ink-3); }
.hall-tab:hover { border-color: color-mix(in srgb, var(--aaa-light) 45%, transparent); }
.hall-tab:focus-visible { outline: 2px solid var(--aaa-light); outline-offset: 2px; }
.hall-tab[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--aaa-light) 60%, transparent);
  background: color-mix(in srgb, var(--aaa-light) 9%, var(--aaa-night-1));
}
.hall-tab[aria-selected="true"] b { color: var(--aaa-light-ink); }

/* ── Podium: rises once on entry, then holds ────────────────────────── */

.hall-podium {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 0.6rem;
  align-items: end;
  margin: var(--aaa-gap) 0 0;
  /* Reserved to the filled height, because a board with names on it is the
     normal case — the podium arriving must not push the list down. */
  min-height: 218px;
}
/* Collapsed only when the board is known to be empty — a :empty selector
   would collapse it at first paint too, which is exactly the shift the
   reservation exists to prevent. */
.hall-podium.is-empty { min-height: 0; margin: 0; }
.hall-plinth {
  position: relative;
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  text-align: center;
  padding: 0.9rem 0.5rem 0.8rem;
  border-radius: 10px 10px 3px 3px;
  border: 1px solid var(--aaa-hairline);
  background: linear-gradient(180deg, var(--aaa-night-3), var(--aaa-night-1));
  text-decoration: none;
  color: inherit;
}
.hall-plinth:focus-visible { outline: 2px solid var(--aaa-light); outline-offset: 3px; }
.hall-plinth.p1 { min-height: 200px; border-color: color-mix(in srgb, var(--aaa-light) 60%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--aaa-light) 13%, var(--aaa-night-3)), var(--aaa-night-1)); }
.hall-plinth.p2 { min-height: 168px; }
.hall-plinth.p3 { min-height: 150px; }
.aaa-q-standard .hall-podium .hall-plinth,
.aaa-q-enhanced .hall-podium .hall-plinth { animation: hall-rise 520ms var(--aaa-e-settle) both; }
.hall-plinth.p2 { animation-delay: 60ms; }
.hall-plinth.p3 { animation-delay: 120ms; }
@keyframes hall-rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }

.hall-plinth-av {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--aaa-night-0);
  border: 1px solid color-mix(in srgb, var(--aaa-light) 34%, transparent);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--aaa-light-ink);
}
.hall-plinth-av img, .hall-plinth-av canvas, .hall-plinth-av svg { width: 100%; height: 100%; object-fit: cover; }
.hall-plinth-pos {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aaa-light-ink);
}
.hall-plinth-name { font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; line-height: 1.2; overflow-wrap: anywhere; }
.hall-plinth-val { font-family: var(--aaa-mono); font-size: 0.8rem; color: var(--aaa-ink-2); font-variant-numeric: tabular-nums; }

/* Hall of Fame keeps still. Stillness is the treatment for permanence. */
.hall-mode-fame .hall-podium .hall-plinth { animation: none; }

/* ── The engraved list ──────────────────────────────────────────────── */

.hall-list { display: flex; flex-direction: column; min-height: 260px; }
/* An authored empty wall fills the same height the skeleton reserved, so the
   integrity note below it does not move when the board resolves. */
.hall-list > .aaa-state { min-height: 260px; align-content: center; }
.hall-row {
  display: grid;
  grid-template-columns: 2.6rem 1.9rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.58rem 0.5rem;
  border-bottom: 1px solid var(--aaa-hairline);
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
}
.hall-row:last-child { border-bottom: 0; }
.hall-row:hover { background: color-mix(in srgb, var(--aaa-light) 7%, transparent); }
.hall-row:focus-visible { outline: 2px solid var(--aaa-light); outline-offset: 1px; }
.hall-row-pos {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.74rem;
  color: var(--aaa-ink-3);
  font-variant-numeric: tabular-nums;
}
.hall-row:nth-child(-n+3) .hall-row-pos { color: var(--aaa-light-ink); }
.hall-row-av {
  width: 28px; height: 28px; border-radius: 7px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--aaa-night-0); border: 1px solid var(--aaa-hairline);
  font-size: 0.7rem; font-weight: 700;
}
.hall-row-av img, .hall-row-av canvas, .hall-row-av svg { width: 100%; height: 100%; object-fit: cover; }
.hall-row-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; }
.hall-row-title { color: var(--aaa-ink-3); font-size: 0.78rem; margin-left: 0.4rem; }
.hall-row-val { font-family: var(--aaa-mono); font-size: 0.86rem; color: var(--aaa-ink-1); font-variant-numeric: tabular-nums; }

/* "You" — findable at rank 400, not just rank 4. */
.hall-row.is-you {
  background: color-mix(in srgb, var(--aaa-light) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--aaa-light) 45%, transparent);
}
.hall-you-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--aaa-light) 40%, transparent);
  font-size: 0.86rem;
  color: var(--aaa-ink-2);
}
.hall-you-bar b { color: var(--aaa-light-ink); font-family: var(--aaa-mono); }
.hall-you-jump {
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--aaa-light) 45%, transparent);
  background: transparent;
  color: var(--aaa-light-ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  min-height: 38px;
  cursor: pointer;
}
.hall-you-jump:focus-visible { outline: 2px solid var(--aaa-light); outline-offset: 2px; }

/* ── The Floor: cabinet selector ────────────────────────────────────── */

.hall-cabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  min-height: 46px;
  scrollbar-width: none;
  margin: var(--aaa-gap) 0 0.2rem;
  /* The rail runs past the edge; fade it so "there is more this way" is
     visible rather than an arbitrary clip. */
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
          mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.hall-cabs::-webkit-scrollbar { display: none; }
.hall-cab {
  flex: 0 0 auto;
  border: 1px solid var(--aaa-hairline);
  background: var(--aaa-night-1);
  color: var(--aaa-ink-2);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  min-height: 42px;
  cursor: pointer;
  white-space: nowrap;
}
.hall-cab[aria-pressed="true"] { background: var(--aaa-light); border-color: transparent; color: var(--aaa-light-on); }
.hall-cab:focus-visible { outline: 2px solid var(--aaa-light); outline-offset: 2px; }

/* ── Championship: seasons ──────────────────────────────────────────── */

.hall-season {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: var(--aaa-radius);
  border: 1px solid color-mix(in srgb, var(--aaa-light) 32%, transparent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--aaa-light) 12%, transparent), transparent 62%), var(--aaa-night-2);
}
.hall-season h3 { font-family: var(--font-display); font-size: 1rem; margin: 0; }
.hall-season p { margin: 0; font-size: 0.86rem; color: var(--aaa-ink-2); }
.hall-history { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }

/* ── Integrity note ─────────────────────────────────────────────────── */

.hall-note {
  margin-top: var(--aaa-gap);
  padding: 0.75rem 0.9rem;
  border-left: 2px solid color-mix(in srgb, var(--aaa-light) 45%, transparent);
  font-size: 0.82rem;
  color: var(--aaa-ink-2);
  line-height: 1.55;
}
.hall-note b { color: var(--aaa-ink-1); }

@media (max-width: 560px) {
  /* Stacked, so the reservation is three plinths tall, not one. */
  .hall-podium { grid-template-columns: 1fr; align-items: stretch; min-height: 438px; }
  .hall-podium.is-empty { min-height: 0; }
  .hall-plinth.p1, .hall-plinth.p2, .hall-plinth.p3 { min-height: 0; }
  .hall-row { grid-template-columns: 2.2rem 1.9rem minmax(0, 1fr) auto; gap: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .aaa-q-standard .hall-podium .hall-plinth,
  .aaa-q-enhanced .hall-podium .hall-plinth { animation: none; }
}

/* ── The board's own credential ─────────────────────────────────────────
   Every window returns boardClass + competitivelyEligible. Stating it on
   the board is the honest move: a rank with no stake behind it must not
   look like one that has. */
.hall-blurb {
  margin: -0.4rem 0 0.7rem;
  font-size: 0.88rem;
  color: var(--aaa-ink-2);
}
.hall-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  align-items: center;
  margin-bottom: var(--aaa-gap);
  min-height: 26px;
}
.hall-cred {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  border-radius: 3px;
  border: 1px solid var(--aaa-hairline);
  font-family: var(--font-display);
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.26rem 0.6rem;
  color: var(--aaa-ink-2);
  white-space: nowrap;
}
.hall-cred.is-verified {
  color: var(--aaa-good);
  border-color: color-mix(in srgb, var(--aaa-good) 45%, transparent);
}
.hall-cred-note { font-size: 0.78rem; color: var(--aaa-ink-3); }
