/* 1ball.rw — home / schedule page (loads after base.css) */

/* ── Hero ─────────────────────────────────────── */
.hero { padding-block: 14px 10px; }
.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-weight: 600;
  font-size: .9375rem;
  color: var(--muted);
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 5.6rem);
  line-height: .95;
  letter-spacing: -.045em;
  max-width: 14ch;
  text-wrap: balance;
}
.hero-sub {
  margin: 16px 0 20px;
  max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.1875rem);
  color: var(--muted);
}

/* ── Sport filter bar ─────────────────────────── */
.sport-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 900;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.sport-nav-list {
  display: flex;
  gap: 8px;
  margin: 0 auto;
  max-width: var(--wrap);
  padding: 10px var(--gutter);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sport-nav-list::-webkit-scrollbar { display: none; }
.sport-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
}
.sport-nav a::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c, var(--accent));
}
@media (hover: hover) { .sport-nav a:hover { border-color: var(--c, var(--accent)); } }
.sport-nav .n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── Schedule ─────────────────────────────────── */
.matches { padding-block: 4px 24px; }

.sport { padding-top: 18px; scroll-margin-top: calc(var(--header-h) + 60px); }

.league {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  letter-spacing: -.03em;
  line-height: 1;
}
.league::before {
  content: "";
  align-self: stretch;
  width: 6px;
  border-radius: 3px;
  background: var(--c, var(--accent));
}
.league .count { font: 500 .9375rem var(--font-body); color: var(--muted); letter-spacing: 0; }

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 10px;
}

.match {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 16px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .15s;
}
@media (hover: hover) { .match:hover { border-color: var(--c, var(--accent)); } }
.match:active { transform: scale(.99); border-color: var(--line); }

.match-time {
  display: grid;
  place-items: center;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--accent)) 13%, var(--surface));
  color: var(--ink);
  font: 700 1rem var(--font-display);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.teams { display: grid; gap: 6px; min-width: 0; }
.team {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
  line-height: 1.25;
}
.team-name {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.team-badge, .national-flag {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  object-fit: contain;
}
.national-flag { border-radius: 3px; }
.team-spacer { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; font-size: 15px; }
.f1-icon { width: 24px; height: 24px; object-fit: contain; }
@media (prefers-color-scheme: dark) { .f1-icon { filter: invert(1); } }
.fight-icon { width: 24px; height: 24px; flex: 0 0 24px; object-fit: contain; }
.team.team-single { align-items: center; }
.team.is-away { color: var(--muted); font-weight: 500; }

.match-go {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: background-color .15s, color .15s, border-color .15s;
}
@media (hover: hover) { .match:hover .match-go { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); color: #fff; } }

.hidden { display: none !important; }

/* ── 404 ──────────────────────────────────────── */
.notfound { padding-block: clamp(48px, 12vw, 120px); }
.notfound h1 {
  margin: 0 0 12px;
  font: 800 clamp(2.2rem, 8vw, 4rem)/1 var(--font-display);
  letter-spacing: -.04em;
}
.notfound p { margin: 0 0 24px; color: var(--muted); }

/* ── Phones ───────────────────────────────────── */
@media (max-width: 640px) {
  .sport-nav { position: sticky; top: var(--header-h); }
  .sport-nav-list { flex-wrap: wrap; overflow-x: visible; padding: 8px var(--gutter); }
  .sport-nav a { min-height: 34px; padding: 0 12px; font-size: .8125rem; }
  /* Wrapped pills make the sticky bar taller — offset anchor jumps accordingly. */
  .sport { scroll-margin-top: calc(var(--header-h) + 130px); }
}
@media (max-width: 480px) {
  .matches { padding-block: 2px 16px; }
  .sport { padding-top: 14px; }
  .league { margin-bottom: 8px; font-size: 1.25rem; }
  .match-grid { gap: 8px; }
  .match { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px 8px 8px; min-height: 60px; border-radius: 14px; }
  .match-time { height: 36px; font-size: .875rem; border-radius: 10px; }
  .teams { gap: 4px; }
  .team { gap: 8px; line-height: 1.2; font-size: .9375rem; }
  .team-badge, .national-flag { width: 20px; height: 20px; flex-basis: 20px; }
  .team-spacer { width: 20px; height: 20px; flex-basis: 20px; font-size: 13px; }
  .f1-icon, .fight-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .match-go { width: 28px; height: 28px; }
}
