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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--dd-bg);
    color: var(--dd-text);
    font-family: var(--dd-font-body);
    font-size: var(--dd-type-body);
    line-height: var(--dd-leading-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.nav-is-open {
    overflow: hidden;
}

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

img {
    font-style: italic;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea,
a {
    border-radius: 2px;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-block-start: 0;
}

h1,
h2,
h3 {
    font-family: var(--dd-font-display);
    line-height: var(--dd-leading-display);
    letter-spacing: -0.04em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.625rem, 7vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

p {
    margin-block-end: 1.25em;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.screen-reader-text:focus {
    clip: auto;
    clip-path: none;
    background: var(--dd-surface);
    color: var(--dd-text);
    height: auto;
    left: max(1rem, env(safe-area-inset-left));
    padding: 0.625rem 0.875rem;
    top: max(1rem, env(safe-area-inset-top));
    width: auto;
    z-index: calc(var(--dd-layer-header) + 1);
}

@media (hover: hover) and (pointer: fine) {
    a:hover {
        color: var(--dd-accent-hover);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .button,
    .site-branding__mark,
    .primary-navigation {
        animation: none !important;
        transition: none !important;
    }
}
