/* ==========================================================================
   Grundlagen: Typografie, Layout-Rhythmus, Seitenkopf
   ========================================================================== */

html {
    scroll-behavior: smooth;
    /* Damit Sprungziele nicht unter der klebenden Navigation verschwinden. */
    scroll-padding-top: 6.5rem;
}

body {
    font-family: var(--schrift);
    color: var(--text);
    background-color: var(--papier);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* --- Ueberschriften ------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--schrift-titel);
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--anthrazit);
    text-wrap: balance;
    /* Lange deutsche Komposita duerfen umbrechen statt ueberzulaufen. */
    overflow-wrap: break-word;
    hyphens: auto;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem); line-height: 1.1; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.3vw, 2.15rem); line-height: 1.2; }
h3 { font-size: clamp(1.2rem, 1.08rem + .55vw, 1.5rem);  line-height: 1.25; }
h4 { font-size: 1.1rem; line-height: 1.3; }

p {
    line-height: 1.75;
    margin-bottom: 1.1em;
}

.fliesstext p,
.fliesstext li {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #2c333c;
}

.fliesstext > p:last-child { margin-bottom: 0; }

.fliesstext--gross p {
    font-size: 1.15rem;
}

/* Erster Absatz eines Fliesstextes etwas kraeftiger. */
.fliesstext--anriss > p:first-of-type {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--anthrazit-hell);
}

a {
    color: var(--rot-dunkel);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
    transition: color var(--uebergang);
}

a:hover,
a:focus-visible {
    color: var(--rot);
}

strong { font-weight: 700; color: var(--anthrazit); }

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

/* --- Sichtbarer Fokus fuer Tastaturbedienung ----------------------------- */

:focus-visible {
    outline: 3px solid var(--rot);
    outline-offset: 3px;
    border-radius: 3px;
}

/* --- Sprunglink ---------------------------------------------------------- */

.sprunglink {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 2000;
    transform: translate(-50%, -110%);
    padding: .75rem 1.5rem;
    background: var(--rot);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--radius-m) var(--radius-m);
    transition: transform var(--uebergang);
}

.sprunglink:focus {
    transform: translate(-50%, 0);
    color: #fff;
}

/* --- Abschnittsrhythmus --------------------------------------------------- */

.abschnitt {
    padding-block: clamp(2.75rem, 1.5rem + 4vw, 5rem);
}

.abschnitt--schmal { padding-block: clamp(2rem, 1.2rem + 2.5vw, 3.25rem); }

.abschnitt--hell   { background: var(--weiss); }
.abschnitt--papier { background: var(--papier); }
.abschnitt--sand   { background: var(--papier-dunkel); }

.abschnitt--dunkel {
    background: var(--anthrazit);
    color: var(--text-invers);
}
.abschnitt--dunkel h2,
.abschnitt--dunkel h3 { color: #fff; }
.abschnitt--dunkel p  { color: rgba(242, 244, 246, .82); }

/* Auf dunklem Grund brauchen hervorgehobener Text und Links helle Farben. */
.abschnitt--dunkel strong,
.themenplan strong { color: #fff; }

.abschnitt--dunkel a:not(.knopf),
.themenplan a:not(.knopf) { color: var(--orange); }

.abschnitt--dunkel a:not(.knopf):hover,
.themenplan a:not(.knopf):hover { color: #ffb45c; }

.inhalt-schmal { max-width: 46rem; }
.inhalt-mittel { max-width: 62rem; }

/* --- Abschnittsueberschrift mit Schienen-Akzent -------------------------- */

.abschnitt-titel {
    margin-bottom: var(--abstand-l);
}

.abschnitt-titel__ueberzeile {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .6rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rot);
}

.abschnitt-titel__ueberzeile::before {
    content: "";
    width: 2rem;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--rot), var(--orange));
}

.abschnitt--dunkel .abschnitt-titel__ueberzeile { color: var(--orange); }

.abschnitt-titel__text { margin: 0; }

.abschnitt-titel__einleitung {
    margin-top: .9rem;
    margin-bottom: 0;
    max-width: 48rem;
    font-size: 1.075rem;
    color: var(--text-leise);
}

.abschnitt--dunkel .abschnitt-titel__einleitung { color: rgba(242, 244, 246, .78); }

.abschnitt-titel--zentriert {
    text-align: center;
}
.abschnitt-titel--zentriert .abschnitt-titel__einleitung { margin-inline: auto; }
.abschnitt-titel--zentriert .abschnitt-titel__ueberzeile::before { display: none; }

/* --- Schienen-Trenner ----------------------------------------------------- */

.schiene {
    height: 10px;
    border: 0;
    margin: 0;
    opacity: 1;
    background:
        repeating-linear-gradient(90deg,
            var(--anthrazit) 0 6px, transparent 6px 16px) center/auto 10px no-repeat,
        linear-gradient(180deg, transparent 2px, var(--rot) 2px 4px, transparent 4px 6px, var(--rot) 6px 8px, transparent 8px);
}

/* --- Seitenkopf ----------------------------------------------------------- */

.seitenkopf {
    position: relative;
    padding-block: clamp(2.5rem, 1.5rem + 3.5vw, 4.5rem);
    background: var(--anthrazit);
    color: #fff;
    overflow: hidden;
}

.seitenkopf::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rot) 0%, var(--rot) 55%, var(--orange) 100%);
}

/* Dezentes Wappen-Muster im Hintergrund */
.seitenkopf::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -6%;
    width: 32rem;
    height: 32rem;
    background: radial-gradient(circle at 50% 50%, rgba(225, 9, 22, .30), transparent 62%);
    pointer-events: none;
}

.seitenkopf--bild {
    background-image:
        linear-gradient(100deg, rgba(20, 25, 31, .95) 12%, rgba(20, 25, 31, .78) 48%, rgba(20, 25, 31, .55) 100%),
        var(--kopfbild);
    background-size: cover;
    background-position: center;
}

.seitenkopf--bild::before { display: none; }

.seitenkopf__ueberzeile {
    margin-bottom: .65rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--orange);
}

.seitenkopf__titel {
    position: relative;
    margin: 0;
    color: #fff;
    max-width: 22ch;
}

.seitenkopf__einleitung {
    position: relative;
    margin: 1.1rem 0 0;
    max-width: 52rem;
    font-size: clamp(1.02rem, .96rem + .35vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, .84);
}

/* --- Kleinigkeiten -------------------------------------------------------- */

.email-link { word-break: break-word; }

.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

::selection {
    background: var(--rot);
    color: #fff;
}

/* Eigener Scrollbalken (nur Browser mit Unterstuetzung) */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--grau) var(--papier-dunkel);
}
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--papier-dunkel); }
::-webkit-scrollbar-thumb {
    background: var(--grau);
    border: 3px solid var(--papier-dunkel);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--schiefer); }

@media print {
    .hauptnavigation, .markenleiste, .fusszeile, .sprunglink, .heft-filter { display: none !important; }
    body { background: #fff; }
    .seitenkopf { background: #fff; color: #000; }
    .seitenkopf__titel { color: #000; }
}
