/* ─────────────────────────────────────────────────────────────────
   base.css — Resets, base element styles, typography.
   Loads after tokens.css. Sets defaults that components inherit from.
   ───────────────────────────────────────────────────────────────── */

/* ── Modern reset ── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Lock scroll when nav is open */
body.nav-open {
    overflow: hidden;
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    margin: 0 0 0.5em;
    font-weight: 600;
    color: var(--color-ink);
}
h1 { font-size: clamp(2rem,    4vw,   3.25rem); }
h2 { font-size: clamp(1.6rem,  3vw,   2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* ── Paragraphs & inline ── */
p { margin: 0 0 1em; }
strong, b { font-weight: 600; }
small { font-size: 0.85em; }

/* ── Links ── */
a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}
a:hover { text-decoration: underline; }
a:focus-visible {
    outline: 2px solid var(--color-honey);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ── Lists ── */
ul, ol { margin: 0 0 1em; padding-left: 1.5em; }
li { margin-bottom: 0.25em; }

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

/* ── Forms ── */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}
button { cursor: pointer; }
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-honey);
    outline-offset: 2px;
}

/* ── Code ── */
code, pre, kbd, samp {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

/* ── Horizontal rule ── */
hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: var(--space-8) 0;
}

/* ── Accessibility: skip link ── */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-ink);
    color: #fff;
    padding: 12px 16px;
    z-index: 1000;
    text-decoration: none;
}
.skip-link:focus {
    left: 12px;
    top: 12px;
}

/* ── Visually hidden (for screen readers only) ── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Selection ── */
::selection {
    background: var(--color-honey);
    color: var(--color-ink);
}
