/* ══════════════════════════════════════════════════════════
   TutorX base — reset, typography, a11y fundamentals.
   Loads after tokens.css, before components.css.
   ══════════════════════════════════════════════════════════ */

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

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

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

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

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

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.01em;
}

a { color: inherit; }

/* ── Focus visibility ── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Skip link ── */
.skip-link {
    position: absolute;
    top: -48px;
    left: 12px;
    z-index: 2000;
    padding: 10px 18px;
    background: var(--ink-btn);
    color: var(--ink-btn-text);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus-visible { top: 12px; }

/* ── Reduced motion: kill all animation globally ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Screen-reader-only utility ── */
.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;
}
