/*
 * A plain dark page in the game's own colours and face, and nothing more.
 *
 * This is the frame the site's artwork will be laid on, not its design: the
 * tokens below are where the palette and the faces live, so dressing it is a
 * matter of changing them and adding the pictures rather than of rewriting
 * the rules that lay the pages out.
 */

@font-face {
  font-family: "Oswald";
  src: url("/fonts/oswald.ttf?v=5b38c246e2") format("truetype-variations");
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --bg: #070b12;
  --panel: #0f1622;
  --line: #1f2a3a;
  --text: #f2f4f8;
  --muted: #9aa6b8;
  --accent: #e3b341;
  --accent-ink: #120d02;
  --display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --width: 1040px;
  --measure: 760px;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
}

/*
 * The stands behind every page.
 *
 * A fixed layer rather than `background-attachment: fixed`, which iOS Safari
 * ignores -- and then stretches a `cover` picture over the whole height of
 * the document. The gradient over it is what keeps text readable across the
 * floodlights and the smoke: lightest at the top, where the home page's title
 * sits, and darkest where the text runs.
 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgb(7 11 18 / 60%), rgb(7 11 18 / 84%) 50%,
      rgb(7 11 18 / 94%)),
    url("/art/background_stadium.webp?v=fb2fd0aa8a") center / cover no-repeat;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 6vw, 48px);
  text-transform: uppercase;
}

h2 {
  margin: 40px 0 12px;
  font-size: 26px;
  text-transform: uppercase;
}

h3 {
  margin: 28px 0 8px;
  font-size: 19px;
  color: var(--accent);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(7 11 18 / 92%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  max-width: var(--width);
  margin: 0 auto;
  padding: 10px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font: 600 20px/1 var(--display);
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a,
.lang-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font: 500 15px/1 var(--display);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.lang-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"],
.lang-nav a[aria-current="true"] {
  background: var(--panel);
  color: var(--text);
}

.lang-nav {
  display: flex;
  gap: 2px;
}

/* Page */

.site-main {
  max-width: var(--width);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.lead {
  max-width: var(--measure);
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
}

.hero {
  padding: 24px 0 8px;
  text-align: center;
}

.hero-logo {
  width: 160px;
  height: auto;
}

.hero-tagline {
  max-width: 640px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 20px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cta-start {
  justify-content: flex-start;
}

.button {
  display: inline-block;
  padding: 14px 22px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font: 600 16px/1 var(--display);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.about {
  max-width: var(--measure);
  margin: 48px auto 0;
}

.about ul {
  padding-left: 20px;
}

/* News */

.news-list {
  display: grid;
  gap: 16px;
  max-width: var(--measure);
}

.news-item {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.news-item time {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font: 500 14px/1.4 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-item p {
  margin: 0;
  white-space: pre-line;
}

/* Boards */

.board-note {
  margin: -4px 0 12px;
  color: var(--muted);
}

.board-scroll {
  overflow-x: auto;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
}

.board-table th,
.board-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.board-table th {
  color: var(--muted);
  font: 500 13px/1.2 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.board-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.board-table .place {
  width: 3em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/*
 * A nickname is typed by its owner: it can be long, and it can be stacked
 * with combining marks that climb out of their line. So a name may break
 * anywhere rather than push the figures off a phone's screen, and a cell
 * keeps whatever it holds inside its own box.
 */
.board-table td {
  overflow: hidden;
}

.board-table .name,
.board-table .club {
  overflow-wrap: anywhere;
}

.crest,
.emblem {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  object-fit: contain;
  vertical-align: middle;
}

.emblem {
  border-radius: 4px;
}

.feed-status,
.feed-updated {
  color: var(--muted);
}

.feed-updated {
  margin-top: 24px;
  font-size: 14px;
}

/* Guide */

.guide-toc ol {
  columns: 2;
  max-width: var(--measure);
  padding-left: 20px;
}

.guide-section {
  max-width: var(--measure);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 24px 20px 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .site-nav {
    order: 3;
    flex-basis: 100%;
  }

  .guide-toc ol {
    columns: 1;
  }

  .board-table th,
  .board-table td {
    padding: 8px 6px;
  }
}
