/* ==========================================================================
   Reset and element defaults.
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--color-surface);
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background: var(--color-surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-display);
    line-height: var(--leading-tight);
    font-weight: 800;
    /* Unbounded is already wide; the usual negative tracking would close it up
       and lose exactly what makes it distinctive. */
    letter-spacing: -0.01em;
    text-wrap: balance;
}

p {
    margin: 0;
    text-wrap: pretty;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: var(--color-accent-hover);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

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

:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* The intro locks the page while it runs; JS is the only thing that sets it,
   so a visitor without JavaScript is never trapped in a non-scrolling page. */
.is-intro-locked body {
    overflow: hidden;
}
