/*
|==========================================================================
| BASE STYLES — Reset + Foundation
|==========================================================================
|
| References tokens from tokens.css — NO hardcoded values here.
|
*/

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

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ── Typography ───────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-4);
}

a {
    color: var(--color-text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text-link-hover);
}

/* ── Lists ────────────────────────────────────────────────────────────── */
ul, ol {
    list-style: none;
}

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

/* ── Forms ────────────────────────────────────────────────────────────── */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

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

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
}

/* ── Table ────────────────────────────────────────────────────────────── */
table {
    border-collapse: collapse;
    width: 100%;
}

/* ── Selection ────────────────────────────────────────────────────────── */
::selection {
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
}

/* ── Scrollbar (WebKit) ───────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}
