/* Neutrale Grundlage: Zurücksetzen, Zugänglichkeit, Inhaltsbreite.
   Hier steht kein Design. Das Aussehen gehört nach main.css und nutzt nur Variablen aus tokens.css. */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--space-6);
}

body {
    margin: 0;
    background: var(--c-background);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: var(--fs-0);
    line-height: var(--lh-body);
}

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

h1, h2, h3, h4 {
    margin: 0 0 0.6em;
    font-family: var(--font-heading);
    line-height: var(--lh-heading);
}

/* --fs-5 und --fs-6 stehen für große Schaustücke (z. B. Einstiegszeile) zur Verfügung */
h1 { font-size: var(--fs-4); }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-2); }
h4 { font-size: var(--fs-1); }

p {
    margin: 0 0 1em;
}

a {
    color: var(--c-primary);
}

.wrap {
    width: 100%;
    max-width: calc(var(--max-width) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Zugänglichkeit */

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.6em 1em;
    background: var(--c-primary);
    color: var(--c-background);
}

.skip-link:focus {
    left: 0;
}

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

/* Menüknopf: erscheint erst, wenn tokens.css ihn bei kleiner Breite einblendet */
.nav-toggle {
    display: none;
    font: inherit;
    cursor: pointer;
}

.site-nav ul,
.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
