/*
 * Basis-Layer: Reset, Typografie-Grundlagen, Layout-Primitive.
 * Nur Selektoren, die für die ganze Website gelten — Komponenten in components.css.
 */

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

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

body {
    margin: 0;
    background: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: var(--line-height-body);
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--color-near-black);
    font-family: var(--font-heading);
    /* Marcellus gibt es nur in 400 — nie fett setzen. */
    font-weight: 400;
    line-height: var(--line-height-heading);
}

h1 {
    font-size: var(--font-size-h1-sub);
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

p {
    margin: 0;
}

a {
    color: var(--color-green);
    text-decoration: none;
}

a:hover {
    color: var(--color-green-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-green);
    outline-offset: 2px;
}

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

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

/* --- Layout-Primitive --------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container--header {
    padding: 0 var(--container-padding-header);
}

.section {
    padding: var(--section-gap) 0;
}

.section--natural {
    background: var(--color-surface-natural);
}

/* Naturton-Kopfband der Unterseiten */
.page-head {
    padding: var(--page-head-padding) 0;
    background: var(--color-surface-natural);
    border-bottom: 1px solid var(--color-border);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Lesebreite für Einleitungstexte (Handover: max. 720 px) */
.measure {
    max-width: 720px;
}

/* --- Typografie-Hilfsklassen ------------------------------------------- */

.eyebrow {
    color: var(--color-green);
    font-size: var(--font-size-eyebrow);
    font-weight: 700;
    letter-spacing: var(--letter-spacing-eyebrow);
    text-transform: uppercase;
}

.lead {
    font-size: var(--font-size-lead);
    line-height: var(--line-height-body);
}

.meta {
    color: var(--color-text-meta);
    font-size: var(--font-size-meta);
}

.text-secondary {
    color: var(--color-text-secondary);
}

/* Grüner Trennstrich unter zentrierten H2 (56 × 3 px) */
.rule {
    width: 56px;
    height: 3px;
    background: var(--color-green);
    border: 0;
    margin: var(--space-4) 0;
}

.text-center {
    text-align: center;
}

.text-center .rule {
    margin-inline: auto;
}

/* --- Barrierefreiheit --------------------------------------------------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: var(--space-2) var(--space-4);
    background: var(--color-surface);
    color: var(--color-green);
    font-weight: 700;
}

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

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

/* --- Mobil (Prototyp ist Desktop 1280px) -------------------------------- */

@media (max-width: 1024px) {
    .container,
    .container--header {
        padding: 0 var(--container-padding-mobile);
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 26px;
    }
}

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

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