*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

img,
picture,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Logo keeps natural width from max-height scaling */
img.brand-logo {
    max-width: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

fieldset {
    border: none;
    min-width: 0;
}

legend {
    padding: 0;
}

ul[role='list'],
ol[role='list'] {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h1 em,
h2 em {
    font-style: italic;
    font-weight: 400;
}

.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;
}

::selection {
    background: var(--color-beige);
    color: var(--color-text);
}
