/*
 * The stylesheet an app includes first: the tokens, Saira, a small reset and the page defaults.
 * Components bring their own styles on top of it.
 */
@import "./tokens.css";

/* Saira, self-hosted: one variable font with weight (100–900) and width (50–125%) axes. Latin and
   Latin Extended only; other scripts in player names fall back to the system font. */
@font-face {
  font-family: Saira;
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
  src: url("./fonts/saira-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Saira;
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
  src: url("./fonts/saira-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1 {
  font-size: var(--heading-size);
  font-weight: var(--heading-weight);
  font-stretch: var(--heading-width);
  line-height: 1.1;
}

h2,
h3,
h4,
h5,
h6 {
  font-size: var(--title-size);
  font-weight: var(--title-weight);
  font-stretch: var(--title-width);
  line-height: 1.2;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--green);
  text-underline-offset: 0.15em;
}

/* Numbers that line up: table cells and anything marked as a value. */
table,
time,
data,
output,
.gb-num {
  font-variant-numeric: tabular-nums;
}

/* Big numbers and hero text. */
.gb-display {
  font-size: var(--display-size);
  font-weight: var(--display-weight);
  font-stretch: var(--display-width);
  line-height: 1;
}

/* Small uppercase labels above values and sections. */
.gb-label {
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  font-stretch: var(--label-width);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--muted);
}

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

/* Reduced motion: nothing animates, including the title effects. Rules inside a component's
   shadow root aren't reached from here, so components handle it themselves too. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
