html {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--ink-900);
    background: var(--surface);
    line-height: 1.6;
    color-scheme: light;
    text-rendering: optimizeLegibility;
    font-optical-sizing: auto;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--surface);
    color: var(--ink-900);
    /**
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity 250ms ease,
        transform 250ms ease;
        **/
}

/*****
body.page-loaded {
    opacity: 1;
    transform: translateY(0);
}

body.page-transitioning {
    opacity: 0;
    transform: translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
    body {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
*****/

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-synthesis: none;
    line-height: 1.1;
    letter-spacing: -.035em;
    color: var(--primary-900);
}

h1 {
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    font-weight: 800;
}
h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
}
h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 750;
}

p {
    max-width: 70ch;
}

a {
    text-decoration-thickness: .1em;
    text-underline-offset: .18em;
}

a:hover {
    text-decoration-thickness: .16em;
}

strong,
b {
    font-weight: 700;
}

em {
    font-style: italic;
}

::selection {
    background: var(--secondary-100);
    color: var(--primary-900);
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
    }
}
