/* ==========================================================================
   Base -- Reset, custom properties, typography (Archivo + Figtree)
   ========================================================================== */

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

/* Custom properties */
:root {
    /* Colours */
    --c-bg: #0A0A0F;
    --c-surface: #151519;
    --c-surface-2: #1E1E24;
    --c-text: #F0F0F0;
    --c-text-dim: #8A8A96;
    --c-accent: #E10600;
    --c-accent-hover: #FF2D1A;
    --c-accent-sec: #00D2BE;
    --c-accent-sec-text: #00E8D4;
    --c-border: #222228;
    --c-podium: #D4AF37;
    --c-win: #3B8868;
    --c-loss: #C44B4B;
    --c-error: #C44B4B;

    /* Typography */
    --f-heading: 'Archivo', sans-serif;
    --f-body: 'Figtree', sans-serif;

    /* Spacing */
    --s-4: 0.25rem;
    --s-8: 0.5rem;
    --s-12: 0.75rem;
    --s-16: 1rem;
    --s-20: 1.25rem;
    --s-24: 1.5rem;
    --s-32: 2rem;
    --s-40: 2.5rem;
    --s-48: 3rem;
    --s-56: 3.5rem;
    --s-64: 4rem;
    --s-80: 5rem;
    --s-96: 6rem;

    /* Layout */
    --max-w: 1200px;
    --header-h: 64px;

    /* Radius */
    --r-sm: 2px;
    --r-md: 4px;
    --r-lg: 6px;

    /* Transitions */
    --dur: 220ms;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base typography */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--f-body);
    font-weight: 400;
    line-height: 1.75;
    color: var(--c-text);
    background-color: var(--c-bg);
    overflow-wrap: break-word;
    word-break: break-word;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-heading);
    line-height: 1.2;
    color: var(--c-text);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

h1 em,
h2 em {
    font-style: italic;
    font-weight: 500;
}

a {
    color: var(--c-accent);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font-family: var(--f-body);
    cursor: pointer;
    border: none;
    background: none;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-variant-numeric: tabular-nums;
}
