/* Honed to Perfection – the live leaderboard page. Same black and golden orange, same Mulish, same orange-block hover as the
   rest of the site; numbers use tabular figures so the columns line up. */

/* ---------- banner ---------- */

.lb-hero {
  position: relative; margin-top: var(--header-h); padding: clamp(4rem, 10vw, 7rem) 1rem clamp(3rem, 7vw, 5rem);
  text-align: center; overflow: hidden;
  background:
    radial-gradient(700px 260px at 50% 100%, rgba(255, 163, 26, .16), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .78) 60%, var(--black)),
    url("../img/cta-band.webp") center 38% / cover no-repeat;
}
.lb-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); opacity: .8; }
.lb-hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.lb-hero .eyebrow { justify-content: center; margin-bottom: .9rem; }
.lb-hero h1 {
  margin: 0; font-weight: 900; font-size: clamp(2.3rem, 7vw, 4.4rem); line-height: 1.05; letter-spacing: .14em;
  text-transform: uppercase; color: var(--orange);
  text-shadow: 0 4px 30px rgba(0, 0, 0, .9), 0 0 40px rgba(255, 163, 26, .25);
}
.lb-hero-text { max-width: 36em; margin: 1.2rem auto 0; font-size: clamp(1rem, 2vw, 1.15rem); font-weight: 600; color: var(--orange-soft); text-shadow: 0 2px 12px rgba(0, 0, 0, .95); }
.lb-live {
  display: inline-flex; align-items: center; gap: .55rem; margin: 1.6rem 0 0; padding: .4rem 1rem;
  border: 1px solid rgba(255, 163, 26, .55); border-radius: 999px; background: rgba(0, 0, 0, .7);
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; color: var(--orange-muted);
}
.lb-live strong { color: var(--orange); letter-spacing: .22em; text-transform: uppercase; }
.lb-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255, 163, 26, .7); animation: lb-pulse 2s ease-out infinite; }
@keyframes lb-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 163, 26, .7); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 163, 26, 0); } }

.lb { padding-top: clamp(2.2rem, 5vw, 3.4rem); }

/* ---------- board tabs ---------- */

.lb-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; margin-bottom: 1rem; }
.lb-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; min-height: 96px; padding: .9rem .5rem;
  font: inherit; font-weight: 800; font-size: .8rem; line-height: 1.25; letter-spacing: .12em; text-transform: uppercase; text-align: center;
  color: var(--orange); background: linear-gradient(180deg, var(--black-800), var(--black-900));
  border: 1px solid rgba(255, 163, 26, .35); border-radius: 6px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, box-shadow .25s, transform .2s;
}
.lb-tab svg { width: 28px; height: 28px; }
.lb-tab:hover { background: var(--orange); color: var(--on-orange); border-color: var(--orange); transform: translateY(-2px); }
.lb-tab[aria-selected="true"] {
  background: var(--orange); color: var(--on-orange); border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--black), 0 0 0 4px rgba(255, 163, 26, .55), 0 12px 30px rgba(0, 0, 0, .55), 0 0 30px var(--orange-glow);
}

/* one button per boss */
.lb-bosses { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 1rem; }
.lb-boss {
  padding: .45rem 1rem; font: inherit; font-weight: 700; font-size: .82rem; letter-spacing: .08em;
  color: var(--orange); background: var(--black); border: 1px solid rgba(255, 163, 26, .45); border-radius: 999px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.lb-boss small { margin-left: .4rem; font-weight: 600; letter-spacing: .04em; opacity: .75; }
.lb-boss:hover, .lb-boss[aria-pressed="true"] { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }

/* ---------- the board ---------- */

.lb-board {
  position: relative; padding: clamp(1.2rem, 3.5vw, 2.2rem);
  background: radial-gradient(700px 240px at 50% 0, rgba(255, 163, 26, .09), transparent 70%), var(--black-900);
  border: 1px solid rgba(255, 163, 26, .45); border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.lb-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.lb-board-head h2 { margin: 0; font-weight: 900; font-size: clamp(1.3rem, 3vw, 1.8rem); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.lb-board-desc { margin: .35rem 0 0; max-width: 40em; color: var(--orange-muted); font-size: .98rem; line-height: 1.55; }
.lb-count { margin: 0; font-size: .8rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--orange-muted); white-space: nowrap; }

.lb-name { color: var(--orange-soft); font-weight: 800; overflow-wrap: anywhere; }
a.lb-name { padding: 0 .2em; margin: 0 -.2em; border-radius: 3px; transition: background .2s, color .2s; }
a.lb-name:hover { background: var(--orange); color: var(--on-orange); }
.lb-num { font-variant-numeric: tabular-nums; }

/* podium: the top three, first place in the middle */
.lb-podium { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: end; }
.lb-podium:empty { display: none; }
.lb-podium li:nth-child(1) { order: 2; }
.lb-podium li:nth-child(2) { order: 1; }
.lb-podium li:nth-child(3) { order: 3; }
.lb-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 2.6rem 1rem 1.4rem; margin-top: 22px;
  background: linear-gradient(180deg, var(--black-800), var(--black-900));
  border: 1px solid rgba(255, 163, 26, .4); border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  animation: lb-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.lb-podium li:nth-child(1) .lb-card {
  padding-top: 3.4rem; padding-bottom: 2rem; border-color: var(--orange);
  background: radial-gradient(260px 160px at 50% 0, rgba(255, 163, 26, .18), transparent 75%), linear-gradient(180deg, var(--black-800), var(--black-900));
  box-shadow: 0 24px 50px rgba(0, 0, 0, .6), 0 0 40px rgba(255, 163, 26, .2);
}
.lb-podium li:nth-child(2) .lb-card { animation-delay: .08s; }
.lb-podium li:nth-child(3) .lb-card { animation-delay: .16s; }
@keyframes lb-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.lb-medal { /* a diamond with the place in roman numerals, sitting on the card's top edge */
  position: absolute; left: 50%; top: -22px; width: 44px; height: 44px; margin-left: -22px; transform: rotate(45deg);
  display: grid; place-items: center; background: var(--black); border: 1px solid var(--orange);
  box-shadow: 0 0 0 4px var(--black-900), 0 0 18px var(--orange-glow);
}
.lb-medal span { transform: rotate(-45deg); font-weight: 900; font-size: .95rem; letter-spacing: .04em; color: var(--orange); }
.lb-podium li:nth-child(1) .lb-medal { width: 54px; height: 54px; top: -27px; margin-left: -27px; background: var(--orange); }
.lb-podium li:nth-child(1) .lb-medal span { color: var(--on-orange); font-size: 1.1rem; }
.lb-card .lb-name { font-size: 1.08rem; }
.lb-card-value { margin: .55rem 0 0; font-weight: 900; font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.1; color: var(--orange); }
.lb-podium li:nth-child(1) .lb-card-value { font-size: clamp(1.8rem, 4vw, 2.6rem); }
/* rank names are words, not numbers: a size smaller so they stay on one line */
[data-kind="rank"] .lb-card-value { font-size: clamp(1.1rem, 2.2vw, 1.45rem); }
[data-kind="rank"] .lb-podium li:nth-child(1) .lb-card-value { font-size: clamp(1.25rem, 2.6vw, 1.75rem); }
.lb-card-sub { margin: .35rem 0 0; font-size: .86rem; font-weight: 700; color: var(--orange-muted); }
.lb-card-when { margin: .6rem 0 0; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8f6c3c; }
.lb-card .lb-stats { justify-content: center; margin-top: .7rem; }

/* the rest: one row per player */
.lb-table { border-top: 1px solid rgba(255, 163, 26, .3); }
.lb-rows { list-style: none; margin: 0; padding: 0; }
.lb-row {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto minmax(110px, auto) 104px; align-items: center; gap: 1rem;
  padding: .7rem .8rem; border-bottom: 1px solid rgba(255, 163, 26, .14);
  transition: background .2s;
}
.lb-rows .lb-row:nth-child(odd) { background: rgba(255, 255, 255, .012); }
.lb-rows .lb-row:hover { background: rgba(255, 163, 26, .07); }
.lb-row-head {
  padding-top: .55rem; padding-bottom: .55rem; font-size: .7rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--orange-muted); border-bottom-color: rgba(255, 163, 26, .3);
}
.lb-pos { display: flex; justify-content: center; }
.lb-pos-mark {
  width: 32px; height: 32px; display: grid; place-items: center; transform: rotate(45deg);
  border: 1px solid rgba(255, 163, 26, .6); background: var(--black);
}
.lb-pos-mark span { transform: rotate(-45deg); font-weight: 800; font-size: .78rem; color: var(--orange); font-variant-numeric: tabular-nums; }
.lb-player { min-width: 0; }
.lb-player small { display: block; margin-top: .1rem; font-size: .8rem; font-weight: 600; color: var(--orange-muted); }
.lb-value { text-align: right; font-weight: 900; font-size: 1.12rem; color: var(--orange); white-space: nowrap; }
.lb-detail { text-align: right; color: var(--orange-muted); font-size: .88rem; font-weight: 600; }
.lb-when { text-align: right; font-size: .78rem; font-weight: 700; color: #8f6c3c; white-space: nowrap; }
.lb-row-head .lb-value, .lb-row-head .lb-detail, .lb-row-head .lb-when { font-size: .7rem; font-weight: 800; color: var(--orange-muted); }

/* the six attributes on the stats board */
.lb-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.lb-stat {
  display: inline-flex; align-items: baseline; gap: .3rem; padding: .12rem .45rem; border-radius: 3px;
  border: 1px solid rgba(255, 163, 26, .28); background: rgba(0, 0, 0, .5);
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums;
}
.lb-stat b { font-weight: 700; color: var(--orange-muted); }
.lb-stat i { font-style: normal; color: var(--orange); }

/* the rank board: a small gem in the division's colour */
.lb-gem { display: inline-block; width: .62em; height: .62em; margin-right: .45em; transform: rotate(45deg); vertical-align: .05em; border: 1px solid rgba(0, 0, 0, .6); }

/* empty, error and loading */
.lb-empty { padding: clamp(2rem, 6vw, 3.4rem) 1rem; text-align: center; }
.lb-empty h3 { margin: 1.4rem 0 .4rem; font-weight: 900; font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.lb-empty p { margin: 0 auto; max-width: 30em; color: var(--orange-muted); }
.lb-empty .btn { margin-top: 1.2rem; }
.lb-empty-mark {
  display: inline-block; width: 46px; height: 46px; transform: rotate(45deg);
  border: 1px solid var(--orange); box-shadow: inset 0 0 0 8px var(--black-900), inset 0 0 0 9px rgba(255, 163, 26, .55), 0 0 26px var(--orange-glow);
}
.lb-loading { display: flex; justify-content: center; gap: .6rem; padding: 2.6rem 0; }
.lb-loading[hidden] { display: none; }
.lb-loading span { width: 10px; height: 10px; transform: rotate(45deg); background: var(--orange); animation: lb-blink 1.1s ease-in-out infinite; }
.lb-loading span:nth-child(2) { animation-delay: .15s; }
.lb-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes lb-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.lb-more-wrap { display: flex; justify-content: center; }
.lb-more-wrap .btn { margin-top: 1.4rem; }
.lb-noscript { text-align: center; color: var(--orange-muted); }

/* how the boards stay fair */
.lb-rules { list-style: none; margin: clamp(2rem, 5vw, 3rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.lb-rules li {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 1.2rem 1.3rem;
  border: 1px solid rgba(255, 163, 26, .25); border-radius: 6px; background: var(--black-900);
}
.lb-rules svg { flex: none; width: 30px; height: 30px; color: var(--orange); }
.lb-rules h3 { margin: 0 0 .3rem; font-weight: 800; font-size: .92rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.lb-rules p { margin: 0; font-size: .93rem; line-height: 1.55; color: var(--orange-muted); }

.page-leaderboard .final-cta { margin-top: 0; }

/* ---------- smaller screens ---------- */

@media (max-width: 1100px) {
  .lb-tabs { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .lb-rules { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .lb-tabs { display: flex; overflow-x: auto; gap: .5rem; padding-bottom: .4rem; scroll-snap-type: x proximity; margin-inline: -1rem; padding-inline: 1rem; }
  .lb-tab { flex: 0 0 auto; min-height: 0; flex-direction: row; padding: .7rem 1rem; scroll-snap-align: start; }
  .lb-tab svg { width: 22px; height: 22px; }
  .lb-podium { grid-template-columns: 1fr; gap: 1.2rem; }
  .lb-podium li:nth-child(n) { order: 0; }
  .lb-card, .lb-podium li:nth-child(1) .lb-card { padding: 2.2rem .9rem 1.1rem; }
  .lb-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: .2rem .8rem; }
  .lb-row-head { display: none; }
  .lb-pos { grid-row: span 2; }
  .lb-detail { grid-column: 2 / -1; grid-row: 2; text-align: left; }
  .lb-detail:empty { display: none; }
  .lb-stats { justify-content: flex-start; }
  .lb-when { display: none; }
}
