/* ── base.css ─ Reset, custom properties, typography ─────── */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--f-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--c-text);
    background-color: var(--c-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol { list-style: none; }

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

button { cursor: pointer; }

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

/* ── Custom Properties ───────────────────────────────────── */
:root {
    /* Colour */
    --c-bg:             #08080C;
    --c-surface:        #111116;
    --c-surface-2:      #19191F;
    --c-text:           #E8E8EC;
    --c-text-dim:       #6E6E82;
    --c-accent:         #B833FF;
    --c-accent-hover:   #CC66FF;
    --c-accent-sec:     #00F0C0;
    --c-accent-sec-text:#33FFD4;
    --c-border:         #1A1A22;
    --c-win:            #00F0C0;
    --c-loss:           #FF4466;
    --c-error:          #FF4466;

    /* Typography */
    --f-heading: 'Chakra Petch', sans-serif;
    --f-body:    'IBM Plex Sans', 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: 60px;

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

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

/* ── Typography ──────────────────────────────────────────── */
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;
}

.text-dim {
    color: var(--c-text-dim);
}

/* Tabular numbers for stats */
.tabular-nums,
.stat-table td,
.stat-table th,
.hud-card__value,
.stat-counter__number {
    font-variant-numeric: tabular-nums;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}
