/* Reset + typography. Built on Eric Meyer / modern-normalize spirit. */

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

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--t-base);
    line-height: var(--lh-normal);
    color: var(--ink);
    background: var(--paper);
    font-feature-settings: "ss01" on, "cv11" on;
    /* Subtle paper-grain via layered noise (SVG data-uri) */
    background-image:
        radial-gradient(circle at 20% 10%, rgba(160, 101, 26, 0.04), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(44, 63, 51, 0.035), transparent 50%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-attachment: fixed;
}

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

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

button { cursor: pointer; background: none; border: none; padding: 0; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Headings ───────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    margin: 0;
    font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 30;
}

h1 { font-size: var(--t-4xl); font-variation-settings: "SOFT" 30, "opsz" 144; }
h2 { font-size: var(--t-2xl); font-variation-settings: "SOFT" 40, "opsz" 80; }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-lg); font-weight: 600; }

/* Display number — e.g. big stat figures on dashboard cards */
.display-num {
    font-family: var(--font-display);
    font-variation-settings: "SOFT" 20, "opsz" 144, "wght" 400;
    font-size: var(--t-4xl);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ink);
    font-feature-settings: "tnum" on, "ss01" on;
}

p { margin: 0; }

/* Editorial section label — small, caps, tracked, ochre */
.eyebrow {
    font-family: var(--font-body);
    font-size: var(--t-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-label);
    color: var(--accent-ink);
}

.muted { color: var(--muted); }

/* Mono for codes, UUIDs, identifiers */
code, .mono {
    font-family: var(--font-mono);
    font-size: 0.92em;
    color: var(--ink-2);
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--rad-xs);
}

/* Scrollbars (webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--hair-2);
    border-radius: 999px;
    border: 2px solid var(--paper);
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
