/* Reset + basistypografie. */

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

html {
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 var(--space-2);
    color: var(--color-navy);
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
}

h2 {
    font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--color-primary);
}

p {
    margin: 0 0 var(--space-2);
}

a {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--color-primary);
}

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

img {
    height: auto;
    display: block;
}

ul,
ol {
    margin: 0 0 var(--space-2);
    padding-left: 1.25rem;
}

address {
    font-style: normal;
}

button,
input,
textarea {
    font-family: inherit;
}

/* Doelen van ankerlinks blijven onder de sticky header uit beeld. */
[id] {
    scroll-margin-top: calc(var(--header-height) + 16px);
}

/* Hulpklasse: visueel verbergen, wel beschikbaar voor screenreaders. */
.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;
}

/* Skiplink: verborgen tot hij toetsenbordfocus krijgt. */
.skip-link {
    position: absolute;
    top: -4rem;
    left: var(--space-2);
    z-index: 1000;
    background: var(--color-navy);
    color: var(--color-white);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.15s ease-in-out;
}

.skip-link:focus {
    top: var(--space-2);
}

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