/* ==========================================================================
   base.css — Reset, CSS custom properties, typography base
   Throsmex: midnight-blue + amber + Space Grotesk + Lora
   ========================================================================== */

/* --- 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: 0.9375rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
    word-wrap: break-word;
    padding-top: var(--header-h);
}

img,
svg {
    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 {
    /* Palette — midnight-blue + amber willow + ball-red + cream */
    --c-bg:           #0B1120;
    --c-surface:      #111827;
    --c-surface-2:    #1A2234;
    --c-text:         #EDE8E0;
    --c-text-dim:     #9CA3AF;
    --c-accent:       #D4883A;
    --c-accent-hover: #E09B4E;
    --c-accent-sec:   #C73E3E;
    --c-win:          #2EA043;
    --c-draw:         #D4883A;
    --c-loss:         #C73E3E;
    --c-border:       #1E293B;
    --c-white:        #FFFFFF;
    --c-error:        #C73E3E;

    /* Typography — Space Grotesk (body/data) + Lora (headings/editorial) */
    --f-heading: 'Lora', Georgia, serif;
    --f-body:    'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 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-64: 4rem;
    --s-80: 5rem;

    /* Layout */
    --max-w:    1200px;
    --header-h: 64px;
    --dur:      200ms;
    --ease:     cubic-bezier(0.25, 0.1, 0.25, 1);

    /* Border radius */
    --r-sm: 4px;
    --r-md: 6px;
    --r-lg: 8px;
}

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

h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    line-height: 1.12;
}

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

h3 {
    font-size: 1.125rem;
}

p {
    margin-bottom: var(--s-16);
}

p:last-child {
    margin-bottom: 0;
}

/* --- Tabular numbers on ALL data (rule 11) -------------------------------- */
td,
th,
.stat-number,
.hero__stat-number,
[data-stat] {
    font-variant-numeric: tabular-nums;
}
