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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    min-width: min(320px, 100%);
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background: var(--background);
    font-family: var(--font-sans);
    /* Move whole words to the next line when space runs out. */
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

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

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

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

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

ul,
ol,
dl,
dd {
    padding: 0;
    margin: 0;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
    margin: 0;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

::selection {
    color: var(--white);
    background: var(--primary);
}

[hidden] {
    display: none !important;
}
