/**
 * Reset, base element styles, and layout primitives shared by every page.
 */

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

html {
    -webkit-text-size-adjust: 100%;
    /* Keeps fragment/anchor jumps (e.g. the service pages' "Services"
       breadcrumb link) from landing a target under the sticky header. */
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-surface);
    line-height: 1.55;
    font-size: 16px;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-ink);
    line-height: 1.2;
    margin: 0 0 var(--space-4);
    font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 1.5rem + 1.8vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
    margin: 0 0 var(--space-4);
    max-width: 68ch;
}

a {
    color: var(--color-ink-soft);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--color-accent-dark);
}

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

ul, ol {
    padding-left: var(--space-5);
}

button {
    font: inherit;
}

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

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-4);
}

.page-section {
    padding-block: var(--space-7);
}

.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;
}

.skip-link {
    position: absolute;
    left: var(--space-3);
    top: -100px;
    background: var(--color-ink);
    color: #fff;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    z-index: 1000;
    transition: top var(--transition-fast);
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
