/*
 * Reset and element defaults. No classes here, only plain HTML elements.
 */

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

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

body {
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 var(--space-3);
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    text-wrap: balance;
}

h1 { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
    margin: 0 0 var(--space-4);
}

a {
    color: var(--color-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--color-primary-hover);
    text-decoration-thickness: 2px;
}

code,
pre,
kbd {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

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

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Blazor focuses the h1 after navigation (FocusOnNavigate) for screen readers; no visible ring needed there */
[tabindex="-1"]:focus {
    outline: none;
    box-shadow: none;
}
