/* Modernes CSS-Reset + Basis-Typografie */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: calc(var(--lh-base) / var(--fs-base));
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    line-height: 1.2;
    font-weight: 600;
}

h1, h2 {
    font-family: var(--font-display);
    letter-spacing: 0.01em;
}

h1 {
    font-size: var(--fs-h1);
    line-height: calc(var(--lh-h1) / var(--fs-h1));
    font-weight: var(--weight-h1);
    color: var(--color-h1);
}

h2 {
    font-size: var(--fs-h2);
    line-height: calc(var(--lh-h2) / var(--fs-h2));
    font-weight: 700;
    color: var(--color-h2);
}

h3 {
    font-size: var(--fs-h3);
    line-height: calc(var(--lh-h3) / var(--fs-h3));
    font-weight: var(--weight-h3);
    color: var(--color-h3);
}

h4 {
    font-size: var(--fs-h4);
    font-weight: var(--weight-h4);
    color: var(--color-text-muted);
}

p + p { margin-top: 1em; }
ul, ol { padding-left: 1.5rem; }

a {
    color: var(--color-navy);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover, a:focus-visible {
    color: var(--color-primary);
}

/* Focus (A11y) */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Utilities */
.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: -9999px;
    top: 0;
    z-index: 100;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    text-decoration: none;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Responsive Font Scaling für große Headings */
@media (max-width: 768px) {
    :root {
        --fs-h1: 18px;
        --lh-h1: 24px;
        --fs-h2: 18px;
        --lh-h2: 23px;
    }
}
