/* Reset, typography and focus. Values come from tokens.css only. */

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

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    line-height: var(--leading-tight);
    letter-spacing: 0;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: var(--weight-bold); line-height: var(--leading-snug); }
h4 { font-size: var(--text-md); font-family: var(--font-body); font-weight: var(--weight-bold); line-height: var(--leading-snug); }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

a {
    color: var(--color-accent-text);
    text-underline-offset: var(--underline-offset);
}

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

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

.on-chrome :focus-visible,
.chrome :focus-visible {
    box-shadow: var(--focus-ring-chrome);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: var(--space-2);
    z-index: var(--z-modal);
    padding: var(--space-2) var(--space-4);
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-md);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.tabular { font-variant-numeric: tabular-nums; }

.eyebrow {
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    color: var(--color-text-muted);
}

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