/* /clubs: search, cities and the leaderboard. Builds on club.css. */

.dir-hero { position: relative; color: var(--cream); background: var(--forest); overflow: hidden; isolation: isolate; }
.dir-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 90% at 88% 0%, rgba(247,227,160,.22), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgba(227,101,79,.20), transparent 60%); }
.dir-hero-body { padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(40px, 6vw, 72px); max-width: none; }
.dir-title { font: 330 clamp(64px, 12vw, 176px)/.88 "Fraunces", Georgia, serif; letter-spacing: -0.045em;
  font-variation-settings: "opsz" 144; text-wrap: balance; }
.dir-lead { margin-top: 22px; max-width: 36em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; opacity: .88; }
.search { margin-top: 32px; max-width: 640px; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 22px;
  border-radius: 999px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.search svg { width: 22px; height: 22px; flex: none; color: var(--ink-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: 400 18px/1 -apple-system, system-ui, sans-serif; }
.search input::placeholder { color: #8b9087; }
.search:focus-within { box-shadow: 0 20px 50px rgba(0,0,0,.18), 0 0 0 3px var(--butter); }
.topbar button.pill { font-family: -apple-system, system-ui, sans-serif; }

.club-page .dir-main { max-width: 1240px; margin: 0 auto; padding: 28px var(--edge) 0; }
.controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.sorts { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sand); }
.sort { height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer;
  font: 600 15px/1 -apple-system, system-ui, sans-serif; }
.sort.on { background: var(--ink); color: var(--cream); }
.cities { display: flex; flex-wrap: wrap; gap: 8px; }
.city { height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(34,40,32,.18); font: 500 15px/1 -apple-system, system-ui, sans-serif; }
.city.on { background: var(--forest); color: var(--cream); box-shadow: none; }
.sort-note { margin: 14px 0 26px; color: var(--ink-soft); font-size: 14px; }

#board { transition: opacity .15s; }
#board.loading { opacity: .5; }

/* Top three: big cover cards, the rank set huge in the corner. */
.podium { list-style: none; padding: 0; display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.podium-card a { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 420px;
  border-radius: 30px; overflow: hidden; color: var(--cream); text-decoration: none; background: var(--forest); isolation: isolate; }
.podium-card[data-rank="1"] a { min-height: 480px; }
.podium-card.no-cover a { background: radial-gradient(90% 70% at 80% 0%, rgba(247,227,160,.3), transparent 60%), var(--forest); }
.podium-card .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.podium-card a::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(22,27,21,.92), rgba(22,27,21,.35) 50%, rgba(22,27,21,.15)); }
.podium-card a:hover .cover { transform: scale(1.04); }
.podium-card .rank { position: absolute; top: 14px; left: 22px; font: 300 clamp(96px, 10vw, 150px)/1 "Fraunces", Georgia, serif;
  letter-spacing: -0.06em; font-variation-settings: "opsz" 144; color: var(--cream); }
.podium-card[data-rank="1"] .rank { color: var(--butter); }
.podium-card .body { display: flex; flex-direction: column; gap: 8px; padding: 24px; }
.podium-card .mark { width: 52px; height: 52px; border-radius: 30%; box-shadow: 0 0 0 3px var(--cream); margin-bottom: 6px; }
.podium-card .name { font: 400 clamp(26px, 2.6vw, 36px)/1.04 "Fraunces", Georgia, serif; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.podium-card .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; opacity: .88; }
.podium-card .trend { align-self: flex-start; margin-top: 4px; height: 30px; padding: 0 12px; display: inline-flex; align-items: center;
  border-radius: 999px; background: var(--butter); color: var(--ink); font-size: 14px; font-weight: 700; }

.mark { object-fit: cover; flex: none; }
.mark.ph { display: grid; place-items: center; background: var(--forest); color: var(--cream); font: 400 24px/1 "Fraunces", Georgia, serif; }

/* The rest: a ranked list. */
.board { list-style: none; padding: 0; background: var(--paper); border-radius: 26px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.board li + li { border-top: 1px solid var(--line); }
.board-row { display: grid; grid-template-columns: 56px 48px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 16px 24px 16px 12px; text-decoration: none; color: var(--ink); }
.board-row:hover { background: var(--cream); }
.board-row .rank { text-align: center; font: 400 28px/1 "Fraunces", Georgia, serif; color: var(--ink-soft); }
.board-row .mark { width: 48px; height: 48px; border-radius: 30%; }
.board-row .who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.board-row .name { font: 400 22px/1.15 "Fraunces", Georgia, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .handle { font-size: 14px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .num { font-size: 15px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.board-row .num.up { color: var(--forest); }
.board-row .num svg { width: 11px; height: 11px; }

.board-empty { padding: 56px 24px; text-align: center; background: var(--paper); border-radius: 26px; box-shadow: 0 0 0 1px var(--line); }
.board-empty h2 { font: 400 clamp(26px, 3vw, 34px)/1.15 "Fraunces", Georgia, serif; letter-spacing: -0.015em; }
.board-empty p { margin: 10px auto 0; max-width: 30em; color: var(--ink-soft); }

.start { margin-top: clamp(40px, 6vw, 72px); padding: clamp(28px, 4vw, 44px); border-radius: 30px; background: var(--butter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.start h2 { font: 400 clamp(28px, 3.2vw, 42px)/1.05 "Fraunces", Georgia, serif; letter-spacing: -0.02em; }
.start p { margin-top: 8px; max-width: 34em; color: var(--ink); opacity: .8; }
.start .button { flex: none; padding: 0 32px; }

@media (max-width: 900px) {
  .podium { grid-template-columns: 1fr; }
  .podium-card a, .podium-card[data-rank="1"] a { min-height: 300px; }
  .podium-card .rank { left: auto; right: 22px; font-size: 88px; }
  .controls { flex-direction: column; align-items: stretch; }
  .sorts { justify-content: space-between; }
  .sort { flex: 1; padding: 0 10px; font-size: 14px; }
  .cities { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--edge)); padding: 0 var(--edge); }
  .city { flex: none; }
  .board-row { grid-template-columns: 34px 44px minmax(0, 1fr); padding: 14px 16px 14px 8px; gap: 12px; }
  .board-row .num { grid-column: 3; font-size: 14px; }
  .board-row .mark { width: 44px; height: 44px; }
  .start { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .podium-card .cover, #board { transition: none; }
}
