*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0e0e10;
  --surface: #1a1a2e;
  --accent: #e94560;
  --accent-dim: #c23152;
  --text: #eaeaea;
  --text-muted: #9a9aaf;
  --radius: 12px;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
header {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
}

header h1 {
  font-size: 3rem;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* ---- Filters ---- */
.filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.5rem;
}

.filter-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  max-width: 960px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.row-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 220px;
  max-width: 420px;
}

.search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid #2a2a3d;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.9rem;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:hover {
  border-color: var(--accent-dim);
}

.search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.filter-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--accent-dim);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filter-btn.year-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.sort-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed #444;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-btn:hover {
  color: var(--text);
  border-color: var(--accent-dim);
  border-style: solid;
}

.concert-count {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.85rem 1rem 0.75rem;
}

/* ---- Stats ---- */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
  width: calc(100% - 4rem);
  max-width: calc(1200px - 4rem);
  margin: 0 auto 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid #242438;
}

.year-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.year-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.25rem;
  padding: 0.3rem 0.55rem 0.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #2e2e42;
}

.year-stat.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.year-stat-year {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.year-stat.is-selected .year-stat-year {
  color: var(--accent);
}

.year-stats-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

.year-stat-n {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.year-stat-unit {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.year-stats-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.scope-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.scope-stats p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}

.scope-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

.scope-stats strong {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  max-width: 28rem;
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
  color: var(--text-muted);
}

.empty-state h2 {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.empty-state p {
  margin-bottom: 1.1rem;
  line-height: 1.5;
}

.grid.is-empty,
.timeline.is-empty {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* ---- Grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem 3rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* ---- Card ---- */
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-bg-icon {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 96px;
  height: 96px;
  opacity: 0.07;
  color: var(--text);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.15);
}

.card-body {
  padding: 1.25rem;
}

.card-body h2 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.card-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ---- Support acts (multi-artist bills) ---- */
.support-acts {
  list-style: none;
  margin-bottom: 0.5rem;
}

.support-acts li {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  padding-left: 0.85rem;
  position: relative;
}

.support-acts li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge + .badge {
  margin-left: 0.4rem;
}

.badge.local {
  background: #16213e;
  color: #4fc3f7;
  border: 1px solid #4fc3f7;
}

.badge.international {
  background: #2e1a2e;
  color: #e94560;
  border: 1px solid #e94560;
}

/* ---- Timeline ---- */
.timeline {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  flex: 1;
}

.tl-year + .tl-year {
  margin-top: 2.5rem;
}

.tl-year-label {
  font-size: 1.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  padding-bottom: 1rem;
}

.tl-events {
  list-style: none;
  border-left: 1px solid #2e2e42;
  margin-left: 0.4rem;
}

.tl-event {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 0 0 1.75rem 1.75rem;
}

.tl-event:last-child {
  padding-bottom: 0;
}

.tl-dot {
  position: absolute;
  left: -5px;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.tl-date {
  flex: 0 0 4.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.25rem;
}

.tl-body {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.tl-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

/* ---- Mute button ---- */
.mute-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid #333;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 100;
}

.mute-btn:hover {
  color: var(--text);
  border-color: var(--accent-dim);
}

.mute-btn svg {
  width: 18px;
  height: 18px;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.footer-icons a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-icons a:hover {
  color: var(--accent);
}

/* ---- Focus ---- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  header h1 {
    font-size: 2rem;
  }

  .search-field {
    flex: 1 1 100%;
    max-width: none;
  }

  .stats-strip {
    width: calc(100% - 2rem);
    align-items: stretch;
  }

  .year-stats-wrap {
    flex: 1 1 auto;
  }

  .year-stats {
    flex-wrap: nowrap;
    overflow-x: auto;
    /* `overflow-x: auto` would otherwise compute overflow-y to auto and
       Lenis would treat this chip row as a vertical scroller. */
    overflow-y: hidden;
    min-width: 0;
    max-width: 100%;
    padding-bottom: 0.15rem;
  }

  .scope-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 2rem;
  }

  .timeline {
    padding: 0 1rem 2rem;
  }

  .tl-event {
    flex-direction: column;
    gap: 0.35rem;
    padding-left: 1.25rem;
  }

  .tl-date {
    flex: none;
    padding-top: 0;
  }
}
