*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--sans);
    font-size: 1.05rem;
    line-height: 1.6;
    color-scheme: light;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 560;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.8rem);
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
}

h3 {
    font-size: 1.35rem;
}

a {
    color: var(--accent-deep);
}

p {
    color: var(--ink-soft);
}

::selection {
    background: #f0d2c4;
    color: var(--ink);
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

[id] {
    scroll-margin-top: calc(var(--header) + 1rem);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--ink);
    color: var(--cream);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    z-index: 20;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
