/* ==========================================================================
   base.css — Reset, CSS custom properties, typography base
   ========================================================================== */

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

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

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;
}

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 */
    --c-bg:           #0D1117;
    --c-surface:      #161B22;
    --c-surface-2:    #1C2128;
    --c-text:         #E6EDF3;
    --c-text-dim:     #8B949E;
    --c-accent:       #2EA043;
    --c-accent-hover: #3FB950;
    --c-accent-sec:   #D29922;
    --c-accent-loss:  #DA3633;
    --c-border:       #21262D;
    --c-white:        #FFFFFF;
    --c-error:        #DA3633;

    /* Typography */
    --f-heading: 'Source Serif 4', Georgia, serif;
    --f-body:    'Inter', -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 ------------------------------------------ */
td,
th,
.stat-number,
.hero__stat-number,
[data-stat] {
    font-variant-numeric: tabular-nums;
}
