

*,
*::before,
*::after {
    box-sizing: border-box !important; 
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + var(--space-md));
    overflow-x: clip;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--color-gray-800);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-900);
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--font-size-3xl); letter-spacing: -0.5px; }
h2 { font-size: var(--font-size-2xl); letter-spacing: -0.3px; }
h3 { font-size: var(--font-size-xl); letter-spacing: 0.2px; }
h4 { font-size: var(--font-size-lg); letter-spacing: 0.3px; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

a:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

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

ul, ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

::selection {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    z-index: calc(var(--z-header) + 1);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: var(--font-weight-semibold);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
    outline: none;
}

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

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: var(--space-sm);
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

[id] {
    scroll-margin-top: calc(var(--header-height) + var(--space-md));
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
