/* Grundlegende Element-Stile */

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

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

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

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(--fs-base);
    line-height: 1.5;
}

main {
    flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
    /* lange Wörter („Datenschutzerklärung“) nie über den Rand laufen lassen */
    overflow-wrap: break-word;
}

/* auf schmalen Bildschirmen lange Wörter in Überschriften sauber trennen (lang="de") */
@media (max-width: 480px) {
    h1,
    h2,
    h3,
    h4 {
        hyphens: auto;
    }
}

p,
ul,
ol {
    margin: 0;
}

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

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 4px;
}

.visually-hidden {
    position: absolute !important;
    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-4);
    top: -100px;
    z-index: 100;
    padding: var(--space-3) var(--space-5);
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-pill);
    text-decoration: none;
}

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

/* Inhaltsbreite mit seitlichem Abstand wie im Figma-Raster (1440 − 2 × 120) */
.container {
    width: 100%;
    max-width: calc(var(--content-max) + 2 * var(--page-gutter));
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

.section {
    padding-block: var(--space-24) var(--space-28);
}

.section--tight-top {
    padding-top: var(--space-2);
}

.section--green {
    background: var(--color-green-light);
}

@media (max-width: 700px) {
    .section {
        padding-block: var(--space-12) var(--space-14);
    }

    .section--tight-top {
        padding-top: var(--space-6);
    }
}
