/* Gigs page: the library view */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-1); justify-self: start; max-width: 100%; }
.filters .btn { flex: 1 1 auto; }
/* Below desktop: one sticky row that scrolls sideways, so the bar stays one button tall. A fade on either edge shows there is more */
@media (max-width: 1023px) {
  .filters { position: sticky; top: var(--header); z-index: 5; justify-self: stretch; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block: var(--s-1); background: var(--bg); }
  .filters .btn { flex: none; }
  .filters::before, .filters::after { content: ''; position: sticky; z-index: 1; flex: none; width: 2.5rem; pointer-events: none; opacity: 0; transition: opacity .2s; }
  .filters::before { left: 0; margin-right: calc(-2.5rem - var(--s-1)); background: linear-gradient(to left, transparent, var(--bg)); }
  .filters::after { right: 0; margin-left: calc(-2.5rem - var(--s-1)); background: linear-gradient(to right, transparent, var(--bg)); }
  .filters[data-l]::before, .filters[data-r]::after { opacity: 1; }
}

/* Atlas: world map with region pins */
.atlas, .gigs { grid-template-columns: minmax(0, 1fr); } /* the zoomed phone map must not widen the track */
.atlas { padding-top: var(--s-4); padding-bottom: 0; display: grid; gap: var(--s-5); overflow-x: clip; } /* clip: the phone map bleeds past the gutters */
/* No page-head on gigs: the featured rows open the page and clear the fixed header */
.featured { display: grid; gap: var(--s-2); padding: calc(var(--header) + var(--s-3)) 0 0; } /* rows run edge to edge, no gutter */
.map { position: relative; aspect-ratio: 1000 / 394.4; } /* world.svg viewBox; pins are % of this box */
.map-art svg { display: block; width: 100%; height: auto; }
.map-art path { fill: color-mix(in srgb, var(--text) 6%, var(--bg)); stroke: var(--line); stroke-width: .5; stroke-linejoin: round; }
.map-art path.on { fill: url(#gig-fade); stroke: none; }
.map-art .states path:not(.on) { display: none; } /* state shapes only show when lit */
.map-art stop:first-child { stop-color: var(--cue); }
.map-art stop:last-child { stop-color: var(--cue-2); }
.pin { --s: 6px; position: absolute; left: var(--x); top: var(--y); } /* one small size: the count sits in the label */
.pin:not([style*="--x"]) { display: none; }
.pin::before, .pin::after { content: ''; position: absolute; width: var(--s); height: var(--s); translate: -50% -50%; background: var(--cue); }
.pin::before { animation: ping 3.2s ease-out infinite; }
.pin::after { box-shadow: 0 0 0 1.5px var(--bg); }
@keyframes ping { from { scale: 1; opacity: .45; } to { scale: 2.4; opacity: 0; } }
/* gigs.js sets each label's place in a column beside its pins and draws the leader lines; these are the no-script fallback */
.pin-label { position: absolute; z-index: 1; top: 0; left: calc(var(--s) / 2 + .4rem); translate: 0 -50%; padding: 2px .35rem; text-shadow: 0 0 3px var(--bg), 0 0 8px var(--bg); font: 500 .6875rem/1.2 var(--ff); letter-spacing: var(--track); text-transform: uppercase; white-space: nowrap; cursor: default; transition: color .25s; }
.pin[data-side^="left"] .pin-label { left: auto; right: calc(var(--s) / 2 + .4rem); }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.leaders polyline { fill: none; stroke: color-mix(in srgb, var(--text) 35%, transparent); stroke-width: 1; transition: stroke .25s, opacity .25s; }
/* Hover or tap a place: its area swells and glows, its dot steps aside, the rest dim */
.pin, .map-art path.on { transition: opacity .3s; }
.pin::before, .pin::after { transition: opacity .3s; }
.map-art path.on { transform-box: fill-box; transform-origin: center; transition: opacity .3s, scale .5s cubic-bezier(.2, .9, .3, 1.2), filter .5s; }
.map.is-hot .pin:not(.hot), .map.is-hot .leaders polyline:not(.hot), .map.is-hot .map-art path.on:not(.hot) { opacity: .3; }
.pin.hot { z-index: 2; }
.pin.hot::before, .pin.hot::after { opacity: 0; animation: none; }
.pin.hot .pin-label { color: var(--cue); }
.leaders polyline.hot { stroke: var(--cue); }
.map-art path.on.hot { scale: var(--grow, 1.15); filter: drop-shadow(0 0 2px var(--cue)) drop-shadow(0 0 7px color-mix(in srgb, var(--cue) 70%, transparent)); }
@media (prefers-reduced-motion: reduce) { .map-art path.on { transition: opacity .3s, filter .3s; } .map-art path.on.hot { scale: none; } }

.flag { flex: none; width: 1.4em; height: auto; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.flag:not([src]) { display: none; }

/* Venue list: country, then city, then venues */
.gigs { padding-top: var(--s-5); padding-bottom: calc(var(--section) / 2); display: grid; gap: var(--s-4); }
/* Countries read like the rider: a 2px rule per country; on desktop the name holds in a sticky left column */
.tick { min-width: 0; overflow: clip; border-block: 1px solid var(--line); padding-block: var(--s-2); }
.tick-track { display: flex; width: max-content; }
.tick-set { display: flex; margin: 0; padding: 0; list-style: none; font: 800 var(--fs-title)/1 var(--ff); font-stretch: var(--head-stretch); text-transform: uppercase; white-space: nowrap; } /* sized to sit under the map, never over it */
.tick-set li { display: flex; align-items: center; gap: .5em; padding-right: .5em; }
.tick-set li::after { content: ''; width: .2em; height: .2em; background: var(--cue); }
@media (prefers-reduced-motion: no-preference) {
  .tick-track { animation: tick var(--d) linear infinite; }
  .tick + .tick .tick-track { animation-direction: reverse; }
  .tick:hover .tick-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .tick-track, .tick-set { width: auto; flex-wrap: wrap; white-space: normal; } .tick-set[aria-hidden] { display: none; } }
/* Full list as a line-up poster: every venue in one size and colour, cue squares between */
.countries { display: grid; margin-top: var(--s-4); }
.country { display: grid; gap: var(--s-3); padding: var(--s-4) 0; border-top: 2px solid var(--text); }
.country h2 { display: flex; align-items: center; gap: .35em; font: 800 var(--fs-title)/1 var(--ff); font-stretch: var(--head-stretch); text-transform: uppercase; }
.country h2 .flag { width: .8em; }
.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: var(--s-3) var(--s-2); }
.city { display: grid; align-content: start; gap: .6rem; min-width: 0; }
.city[data-big] { grid-column: 1 / -1; padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); } /* the home city leads, small towns tile under it */
.city h3 { font: 500 var(--fs-label)/1 var(--ff); letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); }
.venues { display: flex; flex-wrap: wrap; align-items: baseline; margin: 0; padding: 0; list-style: none; font: 700 var(--fs-h3)/var(--lh-snug) var(--ff); font-stretch: var(--head-stretch); text-transform: uppercase; }
.venues li { display: inline-flex; align-items: baseline; }
/* Cue square before every name; the list is pulled left by one square and clipped, so the square that starts a line is cut and no line starts or ends on one */
.city[data-big] { overflow: clip; }
.city[data-big] .venues { margin-left: -1.22em; }
.venues li::before { content: ''; align-self: center; width: .22em; height: .22em; margin-inline: .5em; background: var(--cue); }
.city:not([data-big]) .venues { flex-direction: column; gap: .3rem; }
.city:not([data-big]) .venues li { display: block; }
.city:not([data-big]) .venues li::before { display: none; }
.city:not([data-big]) .note { display: block; margin: .35em 0 0; } /* the year sits under the name in narrow columns */
.city:not([data-big]) .note:empty { display: none; } /* no year: no gap under the name */
/* the Gigs tabs hide venues, cities and countries outside the chosen kind; the layout rules above would otherwise override hidden */
.country[hidden], .city[hidden], .venues li[hidden] { display: none; }
.note { margin-left: .4em; font: 500 var(--fs-label)/1 var(--ff); letter-spacing: var(--track); text-transform: none; color: var(--muted); white-space: nowrap; }
.note:empty { display: none; }
.venue { transition: color .3s; -webkit-tap-highlight-color: transparent; }
.venue.lit { color: var(--cue); } /* tapped on touch (gigs.js) */
@media (hover: hover) { .venue:hover { color: var(--cue); } }
@media (min-width: 600px) { .cities { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); column-gap: var(--s-3); } }
@media (min-width: 1024px) {
  .country { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--s-5); align-items: start; }
  .country h2 { position: sticky; top: calc(var(--header) + 1.5rem); }
}

/* Phones and tablets: a globe (globe.js) takes the flat map's place, edge to edge, melting into the page */
.globe { position: relative; display: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.globe:active { cursor: grabbing; }
.globe canvas { position: absolute; inset: 0; display: block; }
@media (max-width: 1023px) {
  .map:has(+ .globe) { display: none; } /* no script: the flat map stays */
  .globe { display: block; margin-inline: calc(-1 * var(--gutter)); }
}

/* Phones and tablets: one even rhythm. The two ticker rows share a line, and every gap between blocks
   (globe, tabs, countries, footer) is the same --s-4 */
@media (max-width: 1023px) {
  .featured { gap: 0; }
  .tick + .tick { border-top: 0; }
  .atlas { padding-top: var(--s-2); } /* the globe's own faded rim adds the rest */
  .gigs { padding-top: 0; padding-bottom: 0; }
  .countries { margin-top: 0; }
  .city:not([data-big]) .venues { gap: .4rem; }
}
