/* =============================================================================
 * Klimawegweiser – Öffentliches Design-System
 * -----------------------------------------------------------------------------
 * Ein konsolidierter Layer (Stand: Public Redesign 2026).
 *
 * Aufbau:
 *   1. Fonts (Open Sans, lokal gehostet)
 *   2. Design-Tokens (Kunden-Vertrag --kw-* + neutrale UI-Tokens)
 *   3. Reset & Basis
 *   4. Typografie & Barrierefreiheit
 *   5. Buttons
 *   6. Header & Navigation
 *   7. Layout & Sektionen
 *   8. Karten (vereinheitlicht: .content-card / .content-grid)
 *   9. Blöcke (Hero, Feature, Story, Kacheln, Steps, FAQ, Stats, CTA,
 *      Kontakt, Bild+Text, Link-Liste, Referenzen, Embed)
 *  10. Prose, Footer, Landing-/Fehlerseiten
 *  11. Responsive Feinheiten & Reduced Motion
 *
 * Kunden-Theming: theme.css (generiert) überschreibt ausschließlich die
 * Tenant-Tokens (--kw-primary, --kw-background, ...). Alle neutralen
 * UI-Farben leiten sich per color-mix daraus ab.
 * ========================================================================== */

/* ---- 1. Fonts ------------------------------------------------------------ */

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-Regular-latin.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-Regular-latin-ext.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-Medium-latin.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-Medium-latin-ext.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-SemiBold-latin.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-SemiBold-latin-ext.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-Bold-latin.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-Bold-latin-ext.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- 2. Design-Tokens ----------------------------------------------------- */

:root {
    color-scheme: light;

    /* Kunden-Tokens (theme.css des Kunden überschreibt bei Bedarf).
     * Default = tetraeder-Orange wie EPK / dz-portal --color-com-red.
     * Auf dem Orange steht weisser Text (Buttons, Schrittzahlen).
     * Seitenhintergrund ist neutrales Grau wie EPK-Chrome, nicht die CTA. */
    --kw-primary: #E9573D;
    --kw-primary-light: #EB6F58;
    --kw-primary-dark: #B4432F;
    --kw-text: #222222;
    --kw-background: #F9F9F9;
    --kw-surface: #FFFFFF;
    --kw-btn-text: #FFFFFF;

    /* Semantische Textfarben */
    --kw-text-lead: #333333;
    --kw-text-muted: #666666;

    /* Neutrale UI-Farben, abgeleitet aus den Kunden-Tokens */
    --kw-page: var(--kw-background);
    --kw-surface-soft: color-mix(in srgb, var(--kw-surface) 82%, var(--kw-page));
    --kw-ink-soft: color-mix(in srgb, var(--kw-text) 72%, #ffffff);
    --kw-line: color-mix(in srgb, var(--kw-text) 11%, transparent);
    --kw-line-strong: color-mix(in srgb, var(--kw-text) 18%, transparent);
    --kw-primary-soft: color-mix(in srgb, var(--kw-primary) 11%, var(--kw-surface));

    /* Typografie (fluide Skala) */
    --kw-font: 'Open Sans', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --kw-fs-xs: clamp(0.78rem, 0.76rem + 0.08vw, 0.84rem);
    --kw-fs-sm: clamp(0.9rem, 0.87rem + 0.12vw, 0.97rem);
    --kw-fs-base: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
    --kw-fs-lead: clamp(1.13rem, 1.03rem + 0.45vw, 1.38rem);
    --kw-fs-h3: clamp(1.25rem, 1.11rem + 0.56vw, 1.65rem);
    --kw-fs-h2: clamp(1.85rem, 1.45rem + 1.55vw, 3rem);
    --kw-fs-h1: clamp(2.1rem, 1.5rem + 2.1vw, 3.5rem);

    /* Radien: Buttons wie EPK (.epk-btn-primary = 8px), Karten bleiben weicher. */
    --kw-radius-sm: 8px;
    --kw-radius: 20px;
    --kw-radius-lg: 24px;

    /* Layout & Abstände (8pt-Skala) */
    --kw-max-width: 76rem;
    --kw-max-width-wide: 90rem;
    --kw-max-width-prose: 46rem;
    --kw-space: clamp(1rem, 3.5vw, 2rem);
    --kw-block-gap: clamp(4rem, 8vw, 7rem);
    --kw-header-height: 4.75rem;
    --kw-scroll-offset: calc(var(--kw-header-height) + 0.75rem);
    --kw-space-1: 0.5rem;
    --kw-space-2: 1rem;
    --kw-space-3: 1.5rem;
    --kw-space-4: 2rem;
    --kw-space-5: 2.5rem;
    --kw-space-6: 3rem;
    --kw-space-8: 4rem;
    --kw-space-10: 5rem;
    --kw-space-12: 6rem;

    /* Schatten: Key-Light + Ambient */
    --kw-shadow-card:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 8px 24px rgba(15, 23, 42, 0.06);
    --kw-shadow-card-hover:
        0 2px 4px rgba(15, 23, 42, 0.06),
        0 18px 44px rgba(15, 23, 42, 0.10);
    --kw-shadow-header:
        0 8px 32px rgba(15, 23, 42, 0.04);
    --kw-shadow-hero:
        0 4px 12px rgba(15, 23, 42, 0.08),
        0 28px 72px rgba(15, 23, 42, 0.16);
}

/* ---- 3. Reset & Basis ------------------------------------------------------ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--kw-scroll-offset);
    font-size: 16px;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    hyphenate-limit-chars: 6 3 3;
    hyphenate-limit-lines: 2;
}

body {
    margin: 0;
    min-height: 100%;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    font-family: var(--kw-font);
    font-size: var(--kw-fs-base);
    line-height: 1.6;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    color: var(--kw-text);
    background: var(--kw-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ---- 4. Typografie & Barrierefreiheit -------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    color: var(--kw-text);
    font-family: var(--kw-font);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.035em;
    text-wrap: pretty;
    overflow-wrap: break-word;
    hyphenate-limit-chars: 8 4 4;
    margin: 0 0 0.6em;
}

/* Keine Silbentrennung in Navigation, Buttons und Code. */
button,
input,
select,
textarea,
.btn,
.site-header,
.site-nav,
.nav-toggle,
code,
pre,
kbd,
samp {
    hyphens: none;
    -webkit-hyphens: none;
}

h1 {
    font-size: var(--kw-fs-h1);
    line-height: 1.15;
}

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

h3 {
    font-size: var(--kw-fs-h3);
    line-height: 1.25;
}

/* Farbige Hervorhebungen in Überschriften */
h1 span, h2 span, h3 span, .text-highlight {
    color: var(--kw-primary);
}

p {
    margin: 0 0 1.2em;
    font-size: var(--kw-fs-base);
    line-height: 1.55;
    letter-spacing: -0.008em;
    color: var(--kw-text);
}

p:last-child {
    margin-bottom: 0;
}

strong {
    font-weight: 700;
}

a {
    color: var(--kw-text);
    text-decoration: none;
    text-underline-offset: 0.2em;
    text-decoration-thickness: 0.08em;
    transition: color 150ms ease;
}

a:hover, a:focus {
    color: var(--kw-primary);
}

/* Links im Fließtext brauchen mehr als die Farbe als Merkmal (WCAG 1.4.1). */
.prose a {
    text-decoration: underline;
}

:focus-visible {
    outline: 3px solid var(--kw-text);
    outline-offset: 4px;
    border-radius: 6px;
    box-shadow: 0 0 0 6px var(--kw-primary-soft);
}

.skip-link {
    position: absolute;
    left: var(--kw-space-2);
    top: var(--kw-space-2);
    background: var(--kw-primary);
    color: var(--kw-btn-text);
    padding: 0.75rem 1rem;
    font-weight: 700;
    text-decoration: none;
    z-index: 1000;
    border-radius: 12px;
    transform: translateY(-200%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

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

/* ---- 5. Buttons ------------------------------------------------------------ */

.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--kw-radius-sm);
    font-family: var(--kw-font);
    font-weight: 700;
    font-size: var(--kw-fs-base);
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.btn--primary,
.button {
    background: var(--kw-primary);
    border-color: var(--kw-primary);
    color: var(--kw-btn-text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.btn--primary:hover,
.btn--primary:focus,
.button:hover,
.button:focus {
    background: var(--kw-primary);
    border-color: var(--kw-primary);
    color: var(--kw-btn-text);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--kw-primary) 22%, transparent);
}

.btn--secondary {
    background: var(--kw-surface);
    color: var(--kw-primary);
    border-color: var(--kw-primary);
}

.btn--secondary:hover,
.btn--secondary:focus {
    background: var(--kw-primary);
    color: var(--kw-btn-text);
}

.btn--ghost {
    min-height: 2.75rem;
    padding-inline: 0.5rem;
    background: transparent;
    border-color: transparent;
    color: var(--kw-text);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn--ghost:hover,
.btn--ghost:focus {
    color: var(--kw-primary);
}

.btn--large {
    min-height: 3.5rem;
    padding: 0.9rem 1.5rem;
    font-size: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
}

@media (hover: hover) {
    .button:hover,
    .btn:hover {
        transform: translateY(-1px);
    }
}

/* ---- 6. Header & Navigation ------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--kw-surface);
    box-shadow: var(--kw-shadow-header);
    transition: background 150ms ease;
}

.site-header__inner {
    position: relative;
    width: 100%;
    max-width: var(--kw-max-width);
    min-height: var(--kw-header-height);
    margin: 0 auto;
    padding: 0.75rem var(--kw-space);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-header__brand {
    text-decoration: none;
    color: var(--kw-text);
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.site-header__logo {
    height: 2.5rem;
    width: auto;
    max-width: 11rem;
    object-fit: contain;
}

.site-header__logo--mark {
    height: auto;
    width: min(16.5rem, calc(100vw - 6.5rem));
    max-height: 2.4rem;
}

.site-header__name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.site-header__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-header__cta {
    flex-shrink: 0;
}

.site-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1.5vw, 1.25rem);
    margin: 0;
    padding: 0;
}

.site-nav__item {
    position: relative;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--kw-text);
    font-size: var(--kw-fs-sm);
    font-weight: 600;
    letter-spacing: -0.02rem;
    position: relative;
    transition: color 150ms ease;
}

/* Der charakteristische Unterstrich-Indikator */
.site-nav__link::after {
    position: absolute;
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background: var(--kw-primary);
    left: 0.75rem;
    bottom: 0.3rem;
    border-radius: 2px;
    transition: width 150ms ease-in;
}

.site-nav__link:hover,
.site-nav__link:focus,
.site-nav__link--active,
.site-nav__item.is-active > .site-nav__link {
    color: var(--kw-primary);
}

.site-nav__link:hover::after,
.site-nav__link:focus::after,
.site-nav__link--active::after,
.site-nav__item.is-active > .site-nav__link::after {
    width: calc(100% - 1.5rem);
}

/* Menüpunkt, der eine fremde Adresse in neuem Tab öffnet */
.site-nav__link--external {
    gap: 0.3rem;
}

.site-nav__external {
    font-size: 1em;
    opacity: 0.7;
}

/* Mobile Navigation (ohne JavaScript, Checkbox-Muster) */
.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Auf dem Desktop ist das Menü immer offen. Die Checkbox gehört dort nicht in den Tab-Lauf. */
@media (min-width: 48.0625em) {
    .nav-toggle {
        display: none;
    }
}

.nav-toggle__button {
    display: none;
    width: 3rem;
    height: 3rem;
    place-content: center;
    cursor: pointer;
    padding: 0.65rem;
    border: 1px solid var(--kw-line);
    border-radius: 14px;
    background: var(--kw-surface);
}

.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--kw-text);
    border-radius: 2px;
    margin: 5px 0;
}

@media (max-width: 48em) {
    .nav-toggle {
        z-index: 2;
        top: 0.75rem;
        right: var(--kw-space);
        width: 3rem;
        height: 3rem;
        margin: 0;
        pointer-events: auto;
        cursor: pointer;
    }

    .nav-toggle:focus-visible + .nav-toggle__button {
        outline: 3px solid var(--kw-text);
        outline-offset: 3px;
        box-shadow: 0 0 0 6px var(--kw-primary-soft);
    }

    .nav-toggle__button {
        display: grid;
    }

    .site-header__inner {
        flex-wrap: wrap;
    }

    .site-header__menu,
    .site-nav {
        width: 100%;
    }

    .site-header__menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding-top: var(--kw-space-2);
        padding-bottom: 0.5rem;
        border-top: 1px solid var(--kw-line);
    }

    .nav-toggle:checked ~ .site-header__menu {
        display: flex;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .site-nav__link {
        width: 100%;
        padding: 0.65rem var(--kw-space-2);
        font-size: 1.15rem;
        background: color-mix(in srgb, var(--kw-surface) 75%, transparent);
    }

    .site-header__cta {
        width: 100%;
        justify-content: center;
    }
}

/* ---- 7. Layout & Sektionen -------------------------------------------------- */

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

.container--wide {
    max-width: var(--kw-max-width-wide);
}

.container--prose {
    max-width: var(--kw-max-width-prose);
}

.site-main {
    margin: 0;
    padding: 0;
    flex: 1 0 auto;
}

.section {
    padding-block: var(--kw-block-gap);
    position: relative;
}

.section--alt {
    background: var(--kw-surface);
}

/* Sponsor: eine Zeile zwischen den Abschnitten, kleiner als ein Inhaltsblock. */
.sponsor {
    padding-block: var(--kw-space-8);
    background: #ffffff;
}

.sponsor__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin: 0;
    color: var(--kw-text-muted);
    font-size: var(--kw-fs-sm);
    text-align: center;
}

.sponsor__text {
    white-space: pre-line;
}

.sponsor__logo {
    display: block;
    height: auto;
    width: auto;
    max-height: var(--kw-space-10);
    max-width: min(16rem, 100%);
    object-fit: contain;
}

.section__eyebrow,
.block-hero__eyebrow,
.closing-cta__eyebrow {
    margin: 0 0 var(--kw-space-2);
    color: var(--kw-text);
    font-size: var(--kw-fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.section__title {
    max-width: 18ch;
    margin: 0 0 var(--kw-space-2);
    font-size: var(--kw-fs-h2);
}

.section__intro {
    max-width: var(--kw-max-width-prose);
    margin: 0 0 var(--kw-space-2);
    font-size: var(--kw-fs-lead);
    color: var(--kw-ink-soft);
    line-height: 1.6;
    text-wrap: pretty;
}

.feature-cards__cta {
    margin: 0 0 var(--kw-space-5);
}

/* ---- 8. Karten & Raster (vereinheitlicht) ----------------------------------- */

.content-grid,
.feature-grid,
.story-grid,
.block-tiles__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kw-space-3);
    margin-top: var(--kw-space-4);
}

.section__intro + .content-grid,
.section__intro + .feature-grid,
.section__intro + .story-grid,
.section__intro + .block-tiles__grid,
.section__intro + .stats-grid,
.section__intro + .steps,
.section__intro + .link-list,
.section__intro + .ref-finder,
.section__intro + .feature-cards__cta {
    margin-top: 0;
}

@media (min-width: 48em) {
    .content-grid,
    .feature-grid,
    .story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 70em) {
    .feature-grid,
    .story-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .story-grid--count-1 {
        grid-template-columns: minmax(0, 1fr);
    }

    .story-grid--count-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* 4er-Abläufe in einer Desktop-Zeile; Übersichten mit 4 Karten als 2x2 */
    .story-grid--process.story-grid--count-4,
    .story-grid--count-4:not(.story-grid--grid),
    .feature-grid.feature-grid--count-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .story-grid--grid.story-grid--count-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-grid--count-4 .feature-card {
        padding: var(--kw-space-3);
    }
}

.content-card,
.feature-card,
.story-card,
.block-tiles__tile {
    min-width: 0;
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background: var(--kw-surface);
    box-shadow: var(--kw-shadow-card);
    overflow: hidden;
}

.content-card:not(.block-tiles__tile),
.feature-card,
.story-card {
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

@media (hover: hover) {
    .content-card:not(.block-tiles__tile):hover,
    .feature-card:hover,
    .story-card:hover {
        transform: translateY(-3px);
        border-color: var(--kw-line-strong);
        box-shadow: var(--kw-shadow-card-hover);
    }
}

/* ---- 9a. Hero ---------------------------------------------------------------- */

.block-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(4rem, 9vw, 8rem);
    background: var(--kw-surface);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kw-space-5);
    align-items: center;
}

.block-hero__copy {
    max-width: 48rem;
    display: flex;
    flex-direction: column;
    gap: var(--kw-space-2);
}

.breadcrumb {
    font-size: var(--kw-fs-sm);
    color: var(--kw-text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--kw-primary);
}

.block-hero__heading {
    max-width: 22ch;
    min-width: 0;
    margin: 0;
    font-size: var(--kw-fs-h1);
    line-height: 1.12;
}

.block-hero__sub {
    max-width: 40rem;
    margin: 0;
    font-size: var(--kw-fs-lead);
    color: var(--kw-ink-soft);
    font-weight: 400;
    line-height: 1.55;
    text-wrap: pretty;
}

.block-hero__eyebrow {
    margin: 0;
}

.block-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: var(--kw-space-2);
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-self: start;
    min-width: 0;
    max-width: 100%;
}

.hero__image-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--kw-radius-lg);
}

.hero__image,
.block-hero__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid color-mix(in srgb, var(--kw-surface) 65%, transparent);
    border-radius: var(--kw-radius-lg);
    box-shadow: var(--kw-shadow-hero);
    object-fit: contain;
}

.hero__image {
    max-height: min(28rem, 56vh);
}

.block-hero__img {
    margin-top: var(--kw-space-5);
}

/* Kurzanleitung im Hero */
.how-card {
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-lg);
    background: color-mix(in srgb, var(--kw-surface) 94%, transparent);
    box-shadow: var(--kw-shadow-card-hover);
    backdrop-filter: blur(14px);
}

.how-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--kw-line);
}

/* Hero mit Hintergrundbild */
.block-hero--background {
    min-height: min(52rem, calc(100svh - 4.75rem));
    display: grid;
    align-items: center;
    color: #ffffff;
    background: #101614;
}

.block-hero--background::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(8, 14, 12, 0.92) 0%, rgba(8, 14, 12, 0.70) 58%, rgba(8, 14, 12, 0.48) 100%),
        linear-gradient(0deg, rgba(8, 14, 12, 0.25), transparent 45%);
}

.hero__background-media {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.block-hero--background h1,
.block-hero--background .block-hero__heading,
.block-hero--background .breadcrumb,
.block-hero--background .breadcrumb a {
    color: #ffffff;
}

.block-hero--background .block-hero__sub,
.block-hero--background .block-hero__eyebrow {
    color: rgba(255, 255, 255, 0.86);
}

.block-hero--background .btn--secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.08);
}

.block-hero--background .btn--secondary:hover,
.block-hero--background .btn--secondary:focus {
    color: #111714;
    border-color: #ffffff;
    background: #ffffff;
}

.block-hero--background .how-card {
    color: var(--kw-text);
}

@media (min-width: 48em) {
    .block-hero--split .hero__grid,
    .hero__grid--with-how {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.8fr);
        gap: clamp(2.5rem, 5vw, 5rem);
        align-items: center;
    }

    .block-hero--split .block-hero__copy {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Split-Hero: Produktbild füllt rechts die Sektionshöhe. */
    .block-hero--split:has(.hero__visual) {
        padding-block: 0;
    }

    .block-hero--split:has(.hero__visual) .hero__grid {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 1.05fr);
        align-items: stretch;
        gap: 0;
        width: auto;
        max-width: none;
        min-height: min(44rem, calc(100svh - 5rem));
        margin-left: max(
            var(--kw-space),
            calc((100% - var(--kw-max-width)) / 2 + var(--kw-space))
        );
        margin-right: 0;
        padding-inline: 0;
    }

    .block-hero--split:has(.hero__visual) .block-hero__copy {
        padding-block: clamp(5rem, 11vw, 9rem);
        padding-right: clamp(1.75rem, 3.5vw, 3.5rem);
        max-width: none;
    }

    .block-hero--split .hero__visual {
        position: relative;
        align-self: stretch;
        display: block;
        min-width: 0;
        max-width: none;
    }

    .block-hero--split .hero__image-wrapper {
        position: absolute;
        inset: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
    }

    .block-hero--split .hero__image {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        object-fit: cover;
        object-position: center;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

/* ---- 9b. Vorteils-Karten ------------------------------------------------------ */

.feature-card,
.block-tiles__tile {
    padding: var(--kw-space-4);
    display: flex;
    flex-direction: column;
}

.feature-card__index {
    width: 3rem;
    height: 3rem;
    margin-bottom: var(--kw-space-3);
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.15rem;
    flex-shrink: 0;
    background: var(--kw-primary-soft);
    color: var(--kw-text);
}

.feature-card__index--icon .ms {
    font-size: 1.7rem;
    font-variation-settings: 'wght' 300, 'FILL' 0, 'GRAD' 0, 'opsz' 24;
}

.feature-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--kw-text);
}

.feature-card__text {
    margin: 0;
    flex: 1;
    font-size: 1rem;
    color: var(--kw-ink-soft);
    line-height: 1.6;
}

/* ---- 9c. Ablauf-Karten (Story) -------------------------------------------------- */

.story-grid {
    list-style: none;
    margin: var(--kw-space-4) 0 0;
    padding: 0;
}

.story-card {
    display: flex;
    flex-direction: column;
    padding-block: var(--kw-space-4);
}

.story-card__figure {
    position: relative;
    margin: 0 var(--kw-space-3);
    overflow: hidden;
    background: var(--kw-surface-soft);
    aspect-ratio: 16 / 10;
    width: auto;
    border-radius: var(--kw-radius-sm);
}

.story-card__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* In Ablauf-Schritten (z. B. Rechner-Mockups) Motiv unbeschnitten im einheitlichen Rahmen halten */
.story-grid--process .story-card__image {
    object-fit: contain;
}

@media (min-width: 70em) {
    .story-grid--process.story-grid--count-4 .story-card__figure,
    .story-grid--count-4:not(.story-grid--grid) .story-card__figure {
        max-height: 9.5rem;
        margin-inline: var(--kw-space-2);
    }

    .story-grid--process.story-grid--count-4 .story-card__title,
    .story-grid--count-4:not(.story-grid--grid) .story-card__title {
        font-size: 1.125rem;
        margin: var(--kw-space-2) var(--kw-space-2) 0.4rem;
    }

    .story-grid--process.story-grid--count-4 .story-card__text,
    .story-grid--count-4:not(.story-grid--grid) .story-card__text {
        margin: 0 var(--kw-space-2);
    }

    .story-grid--process.story-grid--count-4 .story-card__actions,
    .story-grid--count-4:not(.story-grid--grid) .story-card__actions {
        margin: auto var(--kw-space-2) 0;
    }
}

.story-card__index {
    position: absolute;
    z-index: 1;
    left: 0.75rem;
    bottom: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--kw-primary);
    color: var(--kw-btn-text);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.story-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: var(--kw-space-3) var(--kw-space-3) 0.5rem;
}

.story-card__text {
    margin: 0 var(--kw-space-3);
    font-size: 0.95rem;
    color: var(--kw-ink-soft);
    line-height: 1.6;
}

.story-card__actions {
    margin: auto var(--kw-space-3) 0;
    padding-top: var(--kw-space-1);
}

/* ---- 9d. Modul-Kacheln ----------------------------------------------------------- */

.block-tiles--count-1 .block-tiles__grid {
    max-width: 36rem;
}

@media (min-width: 48em) {
    .block-tiles--count-2 .block-tiles__grid,
    .block-tiles--count-n .block-tiles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 70em) {
    .block-tiles--count-n .block-tiles__grid {
        grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    }
}

.block-tiles__tile {
    gap: var(--kw-space-2);
    border-radius: var(--kw-radius-sm);
}

.block-tiles__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.block-tiles__desc {
    margin: 0;
    flex: 1;
    font-size: 0.95rem;
    color: var(--kw-ink-soft);
    line-height: 1.6;
}

.block-tiles__tile .btn {
    align-self: flex-start;
    margin-top: 0.85rem;
}

/* ---- 9e. Schritte (Zeitleiste) ----------------------------------------------------- */

.steps {
    list-style: none;
    margin: var(--kw-space-5) 0 0;
    padding: 0;
    counter-reset: step;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.steps::before {
    content: "";
    position: absolute;
    top: 1.75rem;
    bottom: 1.75rem;
    left: 1.5rem;
    width: 2px;
    background: color-mix(in srgb, var(--kw-primary) 28%, var(--kw-line));
}

.steps > li {
    counter-increment: step;
    position: relative;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: var(--kw-space-2);
    align-items: start;
    padding: 0 0 var(--kw-space-4);
}

.steps > li:last-child {
    padding-bottom: 0;
}

.steps > li::before {
    content: counter(step);
    position: relative;
    z-index: 1;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--kw-primary);
    color: var(--kw-btn-text);
    border: 6px solid var(--kw-page);
    box-shadow: 0 0 0 1px var(--kw-line);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.section--alt .steps > li::before {
    border-color: var(--kw-surface);
}

.steps__content {
    padding: 0.65rem 0 var(--kw-space-2);
}

.steps__title {
    display: block;
    margin: 0;
    font-size: clamp(1.1rem, 1.03rem + 0.3vw, 1.3rem);
    font-weight: 700;
    color: var(--kw-text);
}

.steps__text {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    color: var(--kw-text-lead);
    line-height: 1.5;
}

.step-details {
    margin: 0.6rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    color: var(--kw-text-muted);
}

/* Kompakte Variante (Kurzanleitung im Hero) */
.steps--compact {
    margin-top: 0;
    gap: 0.75rem;
}

.steps--compact::before {
    left: 1rem;
}

.steps--compact > li {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0 0 0.75rem;
}

.steps--compact > li::before {
    width: 2rem;
    height: 2rem;
    border-width: 4px;
    border-color: var(--kw-surface);
    font-size: 0.85rem;
}

/* ---- 9f. FAQ (natives details, ohne JavaScript) -------------------------------------- */

.faq-list {
    max-width: 54rem;
    display: grid;
    gap: 0.75rem;
    margin-top: var(--kw-space-4);
}

.faq-item {
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background: var(--kw-surface);
    box-shadow: var(--kw-shadow-card);
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    min-height: 4.5rem;
    padding: 1.25rem clamp(1.25rem, 3vw, 1.75rem);
    background: var(--kw-surface);
    font-weight: 700;
    font-size: clamp(1.05rem, 1rem + 0.18vw, 1.18rem);
    letter-spacing: -0.02rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
    transition: color 180ms ease, background-color 180ms ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "";
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--kw-primary-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 1rem;
    transition: transform 200ms ease, background-color 200ms ease;
}

.faq-item summary:hover {
    background: var(--kw-surface-soft);
}

.faq-item summary:focus-visible {
    outline-offset: -4px;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-item[open] summary {
    color: var(--kw-primary);
    background: var(--kw-primary-soft);
    border-bottom: 1px solid var(--kw-line);
}

.faq-item__body {
    padding: var(--kw-space-3) clamp(1.25rem, 3vw, 1.75rem) var(--kw-space-4);
    color: var(--kw-text-lead);
    font-size: 1rem;
    line-height: 1.6;
}

@supports (interpolate-size: allow-keywords) {
    :root {
        interpolate-size: allow-keywords;
    }

    .faq-item::details-content {
        height: 0;
        overflow: clip;
        opacity: 0;
        transition:
            height 220ms ease,
            opacity 180ms ease,
            content-visibility 220ms allow-discrete;
    }

    .faq-item[open]::details-content {
        height: auto;
        opacity: 1;
    }
}

.meta-note {
    font-size: var(--kw-fs-sm);
    color: var(--kw-text-muted);
    margin-top: 0.85rem;
    font-style: italic;
}

/* ---- 9g. Kennzahlen -------------------------------------------------------------------- */

.stats-grid {
    list-style: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--kw-space-2);
    margin: var(--kw-space-4) 0 0;
    padding: 0;
}

.stats-card {
    position: relative;
    min-width: 0;
    padding: var(--kw-space-3);
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background:
        linear-gradient(145deg, var(--kw-surface), var(--kw-surface-soft));
    box-shadow: var(--kw-shadow-card);
}

.stats-card::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 3px;
    margin-bottom: var(--kw-space-3);
    border-radius: 999px;
    background: var(--kw-primary);
}

.stats-card__value {
    display: block;
    margin: 0 0 0.35rem;
    color: var(--kw-text);
    font-size: clamp(2rem, 1.45rem + 2vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
}

.stats-card__label {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

.stats-card__description {
    margin-top: 0.75rem;
    color: var(--kw-ink-soft);
    font-size: var(--kw-fs-sm);
    line-height: 1.55;
}

@media (min-width: 36em) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    }
}

/* ---- 9h. Handlungsaufrufe, Kontakt & unterstützende Blöcke ------------------------------- */

.contact-card,
.block-cta,
.closing-cta__panel,
.link-list__item,
.landing__card {
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background: var(--kw-surface);
    box-shadow: var(--kw-shadow-card);
}

.block-cta {
    padding: clamp(2rem, 6vw, 4.5rem);
    text-align: center;
}

.block-cta .block-cta__heading {
    font-size: var(--kw-fs-h2);
    margin: 0 0 0.75em;
}

.block-cta .prose {
    max-width: 42rem;
    margin-inline: auto;
    font-size: var(--kw-fs-lead);
    color: var(--kw-text-lead);
}

.block-cta .btn {
    margin-top: 2rem;
}

.block-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.block-cta__actions .btn {
    margin-top: 0;
}

.closing-cta__panel {
    display: grid;
    gap: 0;
    overflow: hidden;
}

@media (min-width: 48em) {
    .closing-cta__panel--with-aside {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: stretch;
    }
}

.closing-cta__copy {
    padding: clamp(2rem, 5vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.closing-cta__title {
    font-size: var(--kw-fs-h2);
    margin: 0 0 0.85rem;
}

.closing-cta__text {
    font-size: var(--kw-fs-lead);
    margin: 0 0 1.75rem;
    text-wrap: pretty;
}

.closing-cta__text,
.closing-cta__text p {
    color: var(--kw-ink-soft);
}

.closing-cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.closing-cta__facts {
    list-style: none;
    margin: 0;
    padding: clamp(2rem, 5vw, 3.5rem);
    background: var(--kw-page);
    border-top: 1px solid var(--kw-line);
}

@media (min-width: 48em) {
    .closing-cta__facts {
        border-top: 0;
        border-left: 1px solid var(--kw-line);
    }
}

.closing-cta__fact + .closing-cta__fact {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--kw-line);
}

.closing-cta__fact-title {
    margin: 0 0 0.35rem;
    font-weight: 700;
}

.closing-cta__fact-text {
    margin: 0;
    color: var(--kw-ink-soft);
    font-size: 0.95rem;
    line-height: 1.55;
}

.closing-cta__visual {
    margin: 0;
}

.closing-cta__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 20rem;
}

/* Ansprechperson */
.contact-card {
    display: grid;
    grid-template-areas:
        "intro"
        "profile"
        "details";
    max-width: 68rem;
    margin-inline: auto;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
}

.contact-card__intro {
    grid-area: intro;
    padding: clamp(1.5rem, 5vw, 2rem);
}

.contact-card__profile {
    grid-area: profile;
    display: grid;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--kw-surface-soft);
    border-block: 1px solid var(--kw-line);
}

.contact-card--with-photo .contact-card__profile {
    grid-template-columns: 6rem minmax(0, 1fr);
}

.block-contact__photo {
    width: 6rem;
    aspect-ratio: 4 / 5;
    border-radius: var(--kw-radius-sm);
    object-fit: cover;
    border: 1px solid var(--kw-line);
}

.contact-card__title {
    max-width: 28ch;
    margin: 0;
    color: var(--kw-text);
    font-size: clamp(1.65rem, 1.42rem + 0.9vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.contact-card__name {
    margin: 0 0 0.3rem;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.25;
}

.contact-card__role {
    margin: 0;
    color: var(--kw-ink-soft);
    font-size: var(--kw-fs-sm);
    line-height: 1.5;
}

.contact-card__note {
    max-width: 58ch;
    margin: 0.75rem 0 0;
    color: var(--kw-text-lead);
    font-size: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
    line-height: 1.65;
}

.contact-card__details {
    grid-area: details;
    padding: 1.5rem;
}

.contact-card__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.contact-card__facts {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.contact-card__actions + .contact-card__facts {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--kw-line);
}

.contact-card__fact dt {
    margin: 0 0 0.25rem;
    font-weight: 600;
    font-size: var(--kw-fs-sm);
}

.contact-card__fact dd {
    margin: 0;
    color: var(--kw-ink-soft);
    font-size: var(--kw-fs-sm);
    line-height: 1.55;
}

@media (min-width: 36em) {
    .contact-card__actions {
        flex-flow: row wrap;
        align-items: center;
    }
}

@media (min-width: 48em) {
    .contact-card {
        grid-template-areas:
            "profile intro"
            "profile details";
        grid-template-columns: 17rem minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .contact-card__intro {
        padding: 2rem 2rem 1rem;
    }

    .contact-card__profile,
    .contact-card--with-photo .contact-card__profile {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 2rem;
        border-block: 0;
        border-right: 1px solid var(--kw-line);
    }

    .block-contact__photo {
        width: 8.5rem;
    }

    .contact-card__details {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        align-items: start;
        gap: 2rem;
        padding: 0 2rem 2rem;
    }

    .contact-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-card__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 2rem;
    }

    .contact-card__actions + .contact-card__facts {
        margin-top: 0;
        padding-top: 0;
        padding-left: 2rem;
        border-top: 0;
        border-left: 1px solid var(--kw-line);
    }

    .contact-card__facts:only-child {
        grid-column: 1 / -1;
    }
}

/* Bild & Text */
.block-image-text {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}

@media (min-width: 48em) {
    .block-image-text {
        grid-template-columns: 1fr 1fr;
    }
    .block-image-text--right .block-image-text__img,
    .block-image-text--right .block-image-text__avatar {
        order: 2;
    }
}

.block-image-text__img {
    justify-self: center;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 34rem;
    min-width: 0;
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-lg);
    object-fit: contain;
    box-shadow: var(--kw-shadow-hero);
}

.block-image-text__avatar {
    justify-self: center;
    display: grid;
    place-items: center;
    width: clamp(8.5rem, 22vw, 15rem);
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 50% 42%,
            color-mix(in srgb, var(--kw-primary) 20%, var(--kw-surface)),
            var(--kw-primary-soft) 68%
        );
    color: var(--kw-primary-dark);
}

.block-image-text__avatar .ms {
    font-size: clamp(4.4rem, 11vw, 8rem);
    font-variation-settings: 'wght' 400, 'FILL' 1, 'GRAD' 0, 'opsz' 48;
}

/* Link-Liste */
.link-list {
    list-style: none;
    margin: var(--kw-space-4) 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.link-list__item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: var(--kw-space-3);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.link-list a.link-list__item:hover {
    border-color: color-mix(in srgb, var(--kw-primary) 45%, var(--kw-line));
    box-shadow: var(--kw-shadow-card-hover);
}

.link-list__title {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--kw-primary);
}

.link-list__text {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: var(--kw-text-lead);
}

/* Referenzen */
.ref-finder__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: var(--kw-space-4);
}

.ref-finder__search {
    flex: 1 1 16rem;
    min-width: min(100%, 16rem);
}

.ref-finder__input {
    width: 100%;
    height: 3rem;
    padding: 0 0.9rem;
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background: var(--kw-surface);
    color: var(--kw-text);
    font: inherit;
    line-height: calc(3rem - 2px);
}

.ref-finder__input:focus-visible {
    outline: none;
    box-shadow: none;
}

.ref-suggest {
    position: relative;
    max-height: 22rem;
    margin: 0.75rem 0 0;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    list-style: none;
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background: #fff;
    box-shadow: var(--kw-shadow-card);
}

.ref-suggest[hidden] {
    display: none !important;
}

.ref-suggest__option {
    display: grid;
    align-content: center;
    gap: 0.1rem;
    min-height: 2.75rem;
    padding: 0.4rem 0.9rem;
    background: #fff;
    cursor: pointer;
}

.ref-suggest__option + .ref-suggest__option,
.ref-suggest__more {
    border-top: 1px solid var(--kw-line);
}

.ref-suggest__name {
    font-weight: 600;
}

.ref-suggest__hit {
    font-weight: 700;
}

.ref-suggest__meta,
.ref-suggest__more {
    color: var(--kw-ink-soft);
    font-size: 0.85rem;
}

.ref-suggest__more {
    padding: 0.55rem 0.9rem;
    background: #fff;
}

.ref-finder__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ref-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 3rem;
    padding: 0 0.9rem 0 0.4rem;
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background: var(--kw-surface);
    color: var(--kw-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ref-filter:hover {
    background: var(--kw-surface-soft);
}

.ref-filter[aria-pressed="true"] {
    background: var(--kw-primary);
    border-color: var(--kw-primary);
    color: var(--kw-btn-text);
}

.ref-finder__empty {
    margin: var(--kw-space-4) 0 0;
    color: var(--kw-ink-soft);
}

.ref-finder__states {
    display: grid;
    gap: 0.75rem;
    margin-top: var(--kw-space-4);
}

.ref-state {
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background: var(--kw-surface);
    box-shadow: var(--kw-shadow-card);
    overflow: hidden;
}

.ref-state summary {
    cursor: pointer;
    padding: 0.7rem 1rem;
    background: var(--kw-surface);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ref-state summary::-webkit-details-marker {
    display: none;
}

.ref-state summary::after {
    content: "";
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--kw-primary-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222222' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0.85rem;
}

.ref-state summary:hover {
    background: var(--kw-surface-soft);
}

.ref-state[open] summary::after {
    transform: rotate(180deg);
}

.ref-state[open] summary {
    color: var(--kw-primary);
    background: var(--kw-primary-soft);
    border-bottom: 1px solid var(--kw-line);
}

.ref-state__list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0.75rem;
}

.ref-item[hidden],
.ref-state[hidden] {
    display: none !important;
}

.ref-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    background: var(--kw-surface);
    box-shadow: var(--kw-shadow-card);
}

.ref-item__body {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
}

.ref-item__name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ref-item__kind {
    color: var(--kw-ink-soft);
    font-size: 0.9rem;
}

.ref-item__modules {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.25rem;
}

.ref-module {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.ref-module .ms {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    font-size: 1.125rem;
    line-height: 1;
    text-align: center;
    /* Die Glyphen sitzen im Geviert etwas unter der Mitte. */
    transform: translateY(-0.5px);
}

.ref-module--gruendach .ms {
    transform: translateY(-1px);
}

.ref-module--solar { background: #fff6d8; color: #8f4e08; }
.ref-module--energie { background: #fdeeeb; color: #b4432f; }
.ref-module--gruendach { background: #e8f7f6; color: #1a6562; }

.ref-item--linked {
    padding: 0;
}

.ref-item--linked:hover,
.ref-item--linked:focus-within {
    border-color: var(--kw-primary);
}

a.ref-item__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
    border-radius: inherit;
}

a.ref-item__link:hover,
a.ref-item__link:focus,
a.ref-item__link:focus-visible {
    color: inherit;
}

/* Produkt-Einbettung (iFrame) */
.block-embed {
    padding-inline: var(--kw-space);
    padding-block: calc(var(--kw-block-gap) / 2);
}

.block-embed__anchor {
    scroll-margin-top: 0;
}

.block-embed__frame {
    display: block;
    width: 100%;
    max-width: var(--kw-max-width-wide);
    margin-inline: auto;
    border: 1px solid var(--kw-line);
    border-radius: var(--kw-radius-sm);
    overflow: hidden;
    background: var(--kw-surface);
    box-shadow: var(--kw-shadow-card);
}

.block-embed--placeholder {
    max-width: var(--kw-max-width);
    margin-inline: auto;
    padding-block: var(--kw-space-8);
    text-align: center;
}

/* ---- 10a. Prose / Fließtext ---------------------------------------------------- */

.prose {
    font-size: var(--kw-fs-base);
    line-height: 1.65;
    color: var(--kw-text);
}

.prose p {
    margin: 0 0 1.25em;
}

.prose :is(ul, ol) {
    margin: 0 0 1.25em;
    padding-left: 1.5em;
}

.prose li {
    margin-bottom: 0.4em;
}

.prose h2 {
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.prose h3 {
    margin-top: 1.75em;
    margin-bottom: 0.5em;
}

.block-richtext,
.legal-content {
    max-width: var(--kw-max-width-prose);
}

/* ---- 10b. Footer: app/static/public/site-footer.css ---------------------------- */

/* ---- 10c. Landing- & Fehlerseiten --------------------------------------------------- */

.landing {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--kw-space-8) var(--kw-space);
    background: var(--kw-page);
}

.landing__card {
    padding: clamp(2rem, 7vw, 4rem);
    max-width: 40rem;
}

.landing__title {
    margin-top: 0;
    margin-bottom: 1rem;
}

.landing__text {
    font-size: 1.1rem;
    color: var(--kw-text-lead);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.landing__text:last-child {
    margin-bottom: 0;
}

.preview-gate__form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.preview-gate__label {
    font-weight: 600;
}

.preview-gate__input-group {
    position: relative;
    width: min(100%, 22rem);
    display: flex;
    align-items: center;
}

.preview-gate__input {
    width: 100%;
    padding: 0.65rem 2.75rem 0.65rem 0.85rem;
    border: 1px solid var(--kw-border, #c5c5c5);
    border-radius: 0.4rem;
    font: inherit;
    background: var(--kw-surface, #fff);
    color: inherit;
}

.preview-gate__toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.25rem;
    color: var(--kw-text-muted, #666);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    line-height: 1;
}

.preview-gate__toggle:hover {
    color: var(--kw-text, #222);
}

.preview-gate__toggle:focus-visible {
    outline: 2px solid var(--kw-primary);
    outline-offset: 1px;
}

.preview-gate__input:focus {
    outline: 2px solid var(--kw-primary);
    outline-offset: 2px;
}

.preview-gate__error {
    margin: 0;
    color: #9b1c1c;
}

/* ---- 11. Responsive Feinheiten & Reduced Motion ------------------------------------- */

@media (max-width: 35.99em) {
    .block-hero__actions,
    .closing-cta__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .block-hero__actions .btn,
    .closing-cta__actions .btn {
        width: 100%;
    }
}

.site-header__identity,
.site-footer__sponsor-mark,
.sponsor__mark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 0;
}

.image-frame {
    position: relative;
}

.image-credit--overlay {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.image-credit--overlay > * {
    pointer-events: auto;
}

.image-credit--below {
    display: flex;
    justify-content: flex-end;
    margin: 0.35rem var(--kw-space, 1rem) 0.75rem;
}

.image-credit--beside {
    position: relative;
    max-width: 16rem;
}

.image-credit__line {
    margin: 0;
    max-width: 100%;
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.35;
    text-align: right;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 2px 0 0 0;
}

.image-credit__more,
.image-credit__toggle {
    border: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
}

.image-credit__more {
    display: inline-flex;
    align-items: center;
    min-width: 24px;
    min-height: 24px;
    margin-left: 0.35rem;
    padding: 0 0.3rem;
    font: inherit;
    font-size: 0.75rem;
    line-height: 1.2;
    text-decoration: underline;
    background: transparent;
    color: #fff;
}

.image-credit__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
}

.image-credit__toggle:focus-visible,
.image-credit__more:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.image-credit__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.25rem);
    z-index: 3;
    width: max-content;
    max-width: min(18rem, 80vw);
    padding: 0.55rem 0.7rem;
    text-align: left;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #1a1a1a;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.image-credit__panel p {
    margin: 0 0 0.35rem;
}

.image-credit__panel p:last-child {
    margin-bottom: 0;
}

.image-credit__panel a {
    color: inherit;
}

.image-credit--below .image-credit__panel,
.image-credit--beside .image-credit__panel {
    bottom: auto;
    top: calc(100% + 0.25rem);
}

/* Reichweitenmessung: Leiste am unteren Bildschirmrand, beide Entscheidungen gleichwertig. */
body.has-measurement-banner {
    padding-bottom: 7.5rem;
}

.measurement-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    background: var(--kw-primary-soft);
    border-top: 3px solid var(--kw-primary);
    box-shadow: 0 -12px 28px rgb(34 34 34 / 16%);
    padding: 1rem var(--kw-space) calc(1rem + env(safe-area-inset-bottom));
}

.measurement-banner__inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.measurement-banner__text {
    flex: 1 1 18rem;
    margin: 0;
    max-width: 46rem;
}

.measurement-banner__text a {
    color: var(--kw-primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--kw-primary);
}

.measurement-banner__text a:hover,
.measurement-banner__text a:focus {
    color: var(--kw-primary-dark);
    text-decoration-color: var(--kw-primary-dark);
}

.measurement-banner__form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.measurement-banner__form .btn {
    min-height: 2.75rem;
}

@media (max-width: 40rem) {
    body.has-measurement-banner {
        padding-bottom: 14rem;
    }

    .measurement-banner__form {
        width: 100%;
    }

    .measurement-banner__form .btn {
        flex: 1 1 8rem;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
