/* =========================================
   1. SCHRIFTEN UND VARIABLEN
   ========================================= */

@font-face {
    font-family: "Monument Grotesk Mono";
    src: url("../typefaces/ABCMonumentGroteskMonoTrial-Regular.woff2")
        format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Monument Grotesk";
    src: url("../typefaces/ABCMonumentGroteskTrial-Regular.woff2")
        format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Schriftfamilien */
    --font-family-mono: "Monument Grotesk Mono", monospace;
    --font-family: "Monument Grotesk", sans-serif;

    /* Schriftgrößen */
    --font-size-mono: 0.6rem;
    --font-size: 1rem;

    /* Laufweiten */
    --letter-spacing-mono: 0;
    --letter-spacing: 0;

    /* Layout */
    --bar-height: 36px;
    --header-height: var(--bar-height);
    --footer-height: var(--bar-height);
    --space: 11px;
    --home-big: 22px;
    --menu-height: 300px;
    --academy-height: 220px;

    /* Farben */
    --background: #fff;
    --background-gray: #ccc;
    --text-color: #000;
    --hue: 0deg;
}


/* =========================================
   2. GRUNDEINSTELLUNGEN
   ========================================= */

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

html {
    font-size: clamp(23px, calc(25px + 1.5vw), 30px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100svh;
    background: var(--background);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: var(--font-size);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);
}

a {
    color: inherit;
    text-decoration: none;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.12em;
    text-decoration-skip-ink: auto;
}

button,
input {
    font: inherit;
    letter-spacing: inherit;
}

button {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

::selection {
    background: #000;
    color: #fff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex="0"]:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
}


/* =========================================
   3. TYPOGRAFIE
   ========================================= */

.header,
.footer,
.bar,
.director-label,
.department-label,
.editorial-label,
.image-credit {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-mono);
    font-weight: 400;
    letter-spacing: var(--letter-spacing-mono);
}

.director-name,
.director-department,
.director-profile-text,
.director-contact,
.department-name,
.department-text {
    font-family: var(--font-family);
    font-size: var(--font-size);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.director-label,
.department-label,
.editorial-label {
    display: block;
    margin-bottom: 4px;
    line-height: 1.1;
}

.editorial-title {
    margin: 0;
    font: inherit;
}

.editorial-text p,
.department-text p,
.director-profile-text p {
    margin: 0 0 1em;
}

.editorial-text ul,
.editorial-text ol,
.department-text ul,
.department-text ol,
.director-profile-text ul,
.director-profile-text ol {
    margin: 0 0 1em;
    padding-left: 1.25em;
}

.editorial-text > :last-child,
.department-text > :last-child,
.director-profile-text > :last-child {
    margin-bottom: 0;
}


/* =========================================
   4. LEISTEN UND FARBFLÄCHEN
   ========================================= */

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    height: var(--bar-height);
    padding: 0 var(--space);
    white-space: nowrap;
}

.color-surface {
    position: relative;
    isolation: isolate;
}

.color-surface::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--surface);
    filter: hue-rotate(var(--hue));
    pointer-events: none;
}


/* =========================================
   5. HEADER
   ========================================= */

.header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
}

.home {
    min-width: 0;
    justify-content: flex-start;
    background: #d8d8d8;
    text-transform: uppercase;
    white-space: normal;
    overflow-wrap: anywhere;
}

.menu-panel {
    min-width: 0;
}

.toggle {
    text-align: left;
}

.symbol {
    flex-shrink: 0;
}


/* =========================================
   6. MENÜ
   ========================================= */

.menu-panel > .drawer {
    display: grid;
    grid-template-rows: 0fr;
    height: auto;
    overflow: hidden;
    visibility: hidden;
    transition:
        grid-template-rows 350ms ease,
        visibility 350ms;
}

.menu-panel.is-open > .drawer {
    grid-template-rows: 1fr;
    visibility: visible;
}

.menu-reveal {
    min-height: 0;
    overflow: hidden;
}

.menu-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1.3fr)
        minmax(0, 1fr)
        max-content;
    grid-template-rows: minmax(min-content, 1fr) auto;
    align-items: start;

    height: min(
        var(--menu-height),
        calc(100svh - var(--header-height) - var(--footer-height))
    );

    min-height: 0;
    margin: 0;
    padding: 16px 24px 20px;
    column-gap: 30px;
    row-gap: 40px;

    font-family: var(--font-family);
    font-size: var(--font-size);
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    letter-spacing: var(--letter-spacing);
    text-transform: none;
    overflow: auto;
}

.menu-grid > div {
    min-width: 0;
}

.menu-column {
    grid-row: 1;
    justify-self: start;
}

.menu-column:nth-child(1) {
    grid-column: 1;
}

.menu-column:nth-child(2) {
    grid-column: 2;
}

.menu-column:nth-child(3) {
    grid-column: 3;
}

.menu-column:nth-child(4) {
    grid-column: 4;
    justify-self: end;
}

.menu-group-label {
    display: block;
}

.sub-menu {
    padding-left: 1em;
}

.menu-grid .menu-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    font: inherit;
    font-style: normal;
    letter-spacing: inherit;
    text-transform: none;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

/* Alte Pfeile hinter dem Text entfernen */

.menu-grid .menu-link::after {
    content: none;
}

/* Rechtliche Links */

.menu-legal {
    align-self: end;
    justify-self: start;
    margin: 0;
}

.menu-legal-notice {
    grid-column: 1 / 3;
    grid-row: 2;
}

.menu-legal-privacy {
    grid-column: 3 / 5;
    grid-row: 2;
}


/* =========================================
   7. ANIMIERTER MENÜGRADIENT
   ========================================= */

@property --gradient-stop-1 {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 12%;
}

@property --gradient-stop-2 {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 25%;
}

@property --gradient-stop-3 {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 51%;
}

@property --gradient-stop-4 {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 60%;
}

@property --gradient-stop-5 {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 75%;
}

@property --gradient-stop-6 {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 87%;
}

@property --gradient-stop-7 {
    syntax: "<percentage>";
    inherits: false;
    initial-value: 91%;
}

.menu-panel::before {
    background: linear-gradient(
        90deg,
        #ffbbe3 0%,
        #8600ff var(--gradient-stop-1),
        #ff3500 var(--gradient-stop-2),
        #b29c00 var(--gradient-stop-3),
        #c60000 var(--gradient-stop-4),
        #fff564 var(--gradient-stop-5),
        #ff3500 var(--gradient-stop-6),
        #ffbbe3 var(--gradient-stop-7),
        #b29c00 100%
    );
    animation: menu-gradient-flow 4s ease-in-out infinite;
}

@keyframes menu-gradient-flow {
    0%,
    100% {
        --gradient-stop-1: 12%;
        --gradient-stop-2: 25%;
        --gradient-stop-3: 51%;
        --gradient-stop-4: 60%;
        --gradient-stop-5: 75%;
        --gradient-stop-6: 87%;
        --gradient-stop-7: 91%;
    }

    33% {
        --gradient-stop-1: 19%;
        --gradient-stop-2: 32%;
        --gradient-stop-3: 45%;
        --gradient-stop-4: 64%;
        --gradient-stop-5: 80%;
        --gradient-stop-6: 85%;
        --gradient-stop-7: 95%;
    }

    66% {
        --gradient-stop-1: 8%;
        --gradient-stop-2: 22%;
        --gradient-stop-3: 48%;
        --gradient-stop-4: 56%;
        --gradient-stop-5: 69%;
        --gradient-stop-6: 82%;
        --gradient-stop-7: 90%;
    }
}

.menu-panel:has(:focus-visible)::before {
    animation-play-state: paused;
}

/* =========================================
   8. FOOTER
   ========================================= */

.footer {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;

    display: grid;
    grid-template-columns:
        minmax(0, 4fr)
        minmax(0, 1fr)
        minmax(0, 1fr);
    align-items: end;
}

/* Bezugspunkte für die ausfahrenden Karten */

.academy-panel,
.version-panel {
    position: relative;
    isolation: isolate;
    min-width: 0;
}

/* Leisten bleiben vor den bewegten Karten */

.academy-panel > .toggle,
.version-panel > .toggle {
    position: relative;
    z-index: 2;
}

/* Gemeinsame Kartenanimation */

.academy-drawer,
.version-drawer {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    z-index: 1;

    display: block;
    height: auto;

    visibility: hidden;
    pointer-events: none;

    transform: translateY(100%);

    /*
       Die untere Schnittkante bleibt während
       der Bewegung an der Footerleiste.
    */
    clip-path: inset(0 0 100% 0);

    transition:
        transform 450ms cubic-bezier(0.22, 1, 0.36, 1),
        clip-path 450ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 450ms;
}

.academy-panel.is-open .academy-drawer,
.version-panel.is-open > .version-drawer {
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
    clip-path: inset(0);
}


/* =========================================
   9. EMAT ACADEMY
   ========================================= */

.academy-panel {
    color: #fff;
}

.academy {
    min-width: 0;
    color: #fff;
    --surface: #000;
}

.academy-reveal {
    display: block;
    min-height: 0;
    overflow: hidden;
}

.academy-content {
    height: min(
        var(--academy-height),
        calc(100svh - var(--header-height) - var(--footer-height))
    );

    padding: 8px var(--space);

    overflow-y: auto;
    overscroll-behavior: contain;

    background: #000;
    color: #fff;
}

.academy-content p {
    margin: 0;

    font-family: var(--font-family);
    font-size: calc(var(--font-size) * 1.8);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);
}


/* =========================================
   10. VERSIONSAUSWAHL
   ========================================= */

.version-panel {
    --surface: #b3b3b3;
}

.version-drawer > nav {
    display: block;
    min-height: 0;

    max-height: calc(
        100svh - var(--header-height) - var(--footer-height)
    );

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.version-choice {
    position: relative;
    display: block;

    padding: 20px 18px 20px calc(18px + 1.15em);

    font-family: var(--font-family);
    font-size: calc(var(--font-size) * 1.1);
    font-weight: 400;
    font-style: normal;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);

    white-space: nowrap;
}

/* Hintergrund Version 2.0 */

.version-current {
    --surface: linear-gradient(
        90deg,
        #ffbbe3 0%,
        #8600ff 12%,
        #ff3500 25%,
        #b29c00 51%,
        #c60000 60%,
        #fff564 75%,
        #ff3500 87%,
        #ffbbe3 91%,
        #b29c00 100%
    );
}

.version-current::before {
    content: "";
}

/* Hintergrund Version 1.0 */

.version-previous {
    background: #70ff35;
}

/* Pfeil vor dem Text */

.version-choice::after {
    content: "";

    position: absolute;
    top: 20px;
    left: 18px;

    display: inline-block;
    text-decoration: none;
    pointer-events: none;
}

/* Hover und aktuelle Version */

.version-choice:hover,
.version-choice:focus-visible,
.version-choice[aria-current]:not([aria-current="false"]) {
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.12em;
}

/* Version 1.0: keinen zusätzlichen ::before-Pfeil erzeugen */
.footer .version-choice.version-previous::before {
    content: none;
}

/* Beide Versionen: genau ein Pfeil */
.footer .version-choice::after {
    content: "↗";
    position: absolute;
    top: 20px;
    left: 18px;
    display: inline-block;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .footer .version-choice::after {
        top: 16px;
        left: var(--space);
    }
}

/* =========================================
   11. FARBSLIDER
   ========================================= */

.color-control {
    min-width: 0;
    gap: 10px;
    --surface: #808080;
}

.color-control label {
    flex-shrink: 0;
}

input[type="range"] {
    appearance: none;
    -webkit-appearance: none;

    width: 100%;
    min-width: 0;
    height: 24px;
    margin: 0;

    background: transparent;
    cursor: pointer;
}

/* Chrome und Safari */

input[type="range"]::-webkit-slider-runnable-track {
    height: 2px;
    background: #333;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;

    width: 16px;
    height: 16px;
    margin-top: -7px;

    border: 0;
    border-radius: 50%;
    background: #000;
}

/* Firefox */

input[type="range"]::-moz-range-track {
    height: 2px;
    background: #333;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;

    border: 0;
    border-radius: 50%;
    background: #000;
}

/* =========================================
   12. ALLGEMEINE SEITEN UND BILDER
   ========================================= */

.content {
    min-height: 100svh;
    padding:
        calc(var(--header-height) + 24px)
        var(--space)
        calc(var(--footer-height) + 24px);
}

.departments-content,
.activities-content {
    min-height: 100svh;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
}

.editorial-figure {
    position: relative;
    margin: 0;
}

.editorial-figure > img {
    display: block;
    width: 100%;
    height: auto;
}

.image-credit {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 6px var(--space);
    background: rgb(255 255 255 / 60%);
    color: #000;
    line-height: 1.1;
}


/* =========================================
   13. STARTSEITE
   ========================================= */

.home-page {
    --home-news-height: 0px;
}

.home-page.has-home-news {
    --home-news-height: calc(var(--bar-height) + 10px);
}

.home-page .home-content {
    display: block;
    height: 100svh;
    padding-top: calc(
        var(--header-height) + var(--home-news-height)
    );
    padding-bottom: var(--footer-height);
    overflow: hidden;
}

.home-page .home-overview {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.home-page .home-copy,
.home-page .home-media {
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: var(--home-big);
}

.home-page .home-copy {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.home-page .home-media {
    display: flex;
    flex-direction: column;
    gap: 32px;
    overflow: hidden;
}

.home-page .home-media > .editorial-figure {
    flex-shrink: 0;
}

.home-page .home-project-title {
    width: 100%;
    max-width: none;
    margin: 0;
    font: inherit;
}

.home-page .home-project-title img {
    display: block;
    width: 100%;
    height: auto;
}

.home-page .home-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-page .home-field + .home-field {
    margin-top: 32px;
}

.home-page .home-field > .editorial-label,
.home-page .home-field > p,
.home-page .home-field > h1,
.home-page .home-field > .editorial-text {
    margin: 0;
}

.home-page .editorial-text > :first-child {
    margin-top: 0;
}

.home-page .home-partners {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 32px;
    margin-top: auto;
    padding: 0;
}

.home-page .home-partner {
    flex: 0 0 auto;
    width: min(100%, 200px);
}

.home-page .home-partner img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 120px;
    height: auto;
}


/* =========================================
   14. STARTSEITE: NEWS
   ========================================= */

.home-news-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    z-index: 15;
}

.home-news-toggle {
    background: #808080;
    color: #000;
    text-align: left;
}

.home-news-symbol {
    flex-shrink: 0;
}

.home-news-swatches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 10px;
    pointer-events: none;
}

.home-news-swatches > span {
    display: block;
}

.home-news-dropdown {
    position: absolute;
    top: var(--bar-height);
    right: 0;
    left: 0;

    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    pointer-events: none;

    transition:
        grid-template-rows 350ms ease,
        visibility 350ms;
}

.home-news-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    min-height: 0;

    max-height: calc(
        100svh
        - var(--header-height)
        - var(--bar-height)
        - var(--footer-height)
    );

    overflow: hidden;
}

.home-news-panel.is-open .home-news-dropdown {
    grid-template-rows: 1fr;
    visibility: visible;
    pointer-events: auto;
}

.home-news-panel.is-open .home-news-items {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.home-news-item {
    display: block;
    min-width: 0;
    align-self: start;
    overflow: hidden;
}

.home-news-caption {
    padding: var(--home-big);
}

.home-news-caption h2 {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);
}

.home-news-picture {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    margin-top: -66.666667%;
    transition: margin-top 450ms ease;
}

.home-news-picture-inner {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.home-news-picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-news-item:focus-visible .home-news-picture {
    margin-top: 0;
}


/* =========================================
   15. ACTIVITIES: ÜBERSICHT
   ========================================= */

.activities-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.activity-card {
    min-width: 0;
}

.activity-card > a {
    display: block;
}

.activity-cover {
    display: block;
    width: 100%;
    height: auto;
}

.activity-card-info {
    padding: 8px var(--space);
}


/* =========================================
   16. ACTIVITIES: BEITRAG
   ========================================= */

.activity-page .header .home {
    display: block;
    min-width: 0;
    height: var(--bar-height);
    line-height: var(--bar-height);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--bar-height) minmax(0, 1fr);
    width: 100%;
    height: 100svh;
    min-width: 0;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
    overflow: hidden;
    background: #fff;
}

.activity-back {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-width: 0;
    height: var(--bar-height);
    text-transform: uppercase;
}

.activity-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.activity-copy,
.activity-gallery {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: var(--home-big);
    padding-bottom: calc(var(--home-big) + 90px);
    overflow-y: auto;
    overscroll-behavior: contain;

    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0,
        #000 calc(100% - 90px),
        transparent 100%
    );

    mask-image: linear-gradient(
        to bottom,
        #000 0,
        #000 calc(100% - 90px),
        transparent 100%
    );
}

.activity-title {
    margin: 0 0 28px;
    font-family: var(--font-family);
    font-size: calc(var(--font-size) * 1.8);
    font-weight: 400;
    line-height: 1;
    letter-spacing: var(--letter-spacing);
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.activity-text {
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);
    hyphens: auto;
}

.activity-text p {
    margin: 0;
}

.activity-text p + p {
    text-indent: 1.8em;
}

.activity-copy > .activity-more {
    display: inline-block;
    margin-top: 28px;
}

.activity-gallery-image {
    width: 100%;
    margin: 0 0 24px;
}

.activity-gallery-image.is-half {
    width: 50%;
}

.activity-gallery-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}


/* =========================================
   17. DIRECTORS UND MEMBERS
   ========================================= */

.directors-content {
    height: 100svh;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
    overflow: hidden;
}

.directors-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    height: 100%;
}

.director {
    --card-lift: 0px;

    min-width: 0;
    margin: 0;
    isolation: auto;
    z-index: auto;
}

.director-trigger {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    text-align: left;
    transform: translateY(calc(-1 * var(--card-lift)));
    transition: transform 450ms ease;
}

.director-portrait {
    display: block;
    width: 100%;
    height: 21vw;
    overflow: hidden;
    background: #fff;
}

.director-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.director-info {
    display: block;
    padding: 8px var(--space) 6px;
}

.director-field,
.director-name,
.director-department {
    display: block;
}

.director-name,
.director-department {
    margin: 0;
}

.director-name {
    min-height: 2.1em;
}

.director-department {
    hyphens: auto;
    overflow-wrap: break-word;
}

.director-field + .director-field {
    margin-top: 32px;
}

.members-page .director-name {
    min-height: 0;
}


/* =========================================
   18. PERSONENPROFILE
   ========================================= */

.director-profile {
    position: fixed;
    right: 0;
    bottom: var(--footer-height);
    left: 0;
    z-index: 0;

    max-height: calc(
        (100svh - var(--header-height) - var(--footer-height)) * 0.65
    );

    overflow: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    pointer-events: none;
    clip-path: inset(0);

    transform: translateY(100%);

    transition:
        transform 450ms ease,
        visibility 450ms;
}

.director-profile::before {
    position: fixed;
    inset: 0;
}

.director-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 32px;
    padding: 28px var(--space) 12px;
}

.director-contact {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.director-contact a {
    display: block;
}

.director.is-preview .director-trigger {
    z-index: 2;
}

.director.is-preview .director-profile {
    z-index: 3;
    visibility: visible;
    transform: translateY(calc(100% - var(--card-lift)));
}

.director.is-closing .director-profile {
    z-index: 4;
}

.director.is-active .director-profile {
    z-index: 5;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.director.is-active .director-trigger {
    z-index: 6;
}


/* =========================================
   19. DEPARTMENTS
   ========================================= */

.departments-list {
    display: flex;
    flex-direction: column;
    width: 50%;
    height: calc(
        100svh - var(--header-height) - var(--footer-height)
    );
}

.department {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    margin: 0;
}

.department-heading {
    height: 100%;
    margin: 0;
    font: inherit;
}

.department-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 8px var(--space);
    text-align: left;
    overflow: auto;
}

.department-name {
    display: block;
    white-space: normal;
    font-size: calc(var(--font-size) * 1.4);
}

.department-description {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: var(--footer-height);
    width: 50%;
    padding: 8px var(--space) 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.department-description[hidden] {
    display: none;
}

.department-description::before {
    position: fixed;
    inset:
        var(--header-height)
        0
        var(--footer-height)
        50%;
}


/* =========================================
   20. DESCRIPTION
   ========================================= */

.description-page {
    background: var(--background);
}

.description-content {
    min-height: 100svh;
    padding:
        calc(var(--header-height) + var(--home-big))
        var(--home-big)
        calc(var(--footer-height) + 60px);
}

.description-heading {
    margin: 0 0 28px;
    font-family: var(--font-family);
    font-size: calc(var(--font-size) * 1.8);
    font-weight: 400;
    line-height: 1;
    letter-spacing: var(--letter-spacing);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
}

.description-text,
.description-intro-media figcaption,
.description-question p {
    font-family: var(--font-family);
    font-size: var(--font-size);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
}

.description-text p {
    margin: 0;
}

.description-text p + p {
    text-indent: 1.8em;
}

.description-text ul,
.description-text ol {
    margin: 1em 0;
    padding-left: 1.25em;
}

.description-intro {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 32px;
}

.description-intro-copy,
.description-intro-media {
    min-width: 0;
}

.description-intro-media {
    margin: 0;
}

.description-intro-media img {
    display: block;
    width: 100%;
    height: auto;
}

.description-intro-media figcaption {
    margin-top: 18px;
}

.description-research {
    margin-top: 120px;
}

.description-research-text {
    max-width: 84%;
}

.description-diagram {
    width: 52%;
    margin: 32px auto 48px;
}

.description-diagram img {
    display: block;
    width: 100%;
    height: auto;
}

.description-questions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
}

.description-question-column {
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-width: 0;
}

.description-question {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.description-question-icon {
    width: 100%;
    aspect-ratio: 1;
}

.description-question-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.description-question p {
    margin: 0;
}

.description-diagram img,
.description-question-icon img {
    filter: hue-rotate(var(--hue));
}


/* =========================================
   21. CONTACT
   ========================================= */

.contact-content {
    display: grid;
    grid-template-columns:
        minmax(0, 3fr)
        minmax(0, 2fr)
        minmax(0, 1fr);
    align-items: stretch;
    gap: 32px;
    min-height: 100svh;

    padding:
        calc(var(--header-height) + var(--home-big))
        var(--home-big)
        calc(var(--footer-height) + var(--home-big));
}

.contact-project,
.contact-details,
.contact-funding {
    min-width: 0;
}

.contact-project > .contact-field {
    max-width: 460px;
}

.contact-project > .contact-field + .contact-field {
    margin-top: 36px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
}

.contact-funding {
    justify-self: end;
}

.contact-value {
    display: block;
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size);
    font-weight: 400;
    font-style: normal;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.contact-email {
    overflow-wrap: anywhere;
}

.contact-logos {
    display: flex;
    align-items: flex-end;
    gap: 32px;
}

.contact-logo {
    flex: 1 1 0;
    min-width: 0;
}

.contact-logo a {
    display: block;
}

.contact-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 120px;
    height: auto;
}


/* =========================================
   22. LEGAL NOTICE UND PRIVACY POLICY
   ========================================= */

.legal-content {
    min-height: 100svh;
    padding:
        calc(var(--header-height) + var(--home-big))
        var(--home-big)
        calc(var(--footer-height) + 60px);
}

.legal-document {
    width: 100%;
    max-width: var(--legal-width, 920px);
    margin: 0 auto;
}

.legal-page-title,
.legal-block {
    font-family: var(--legal-family, var(--font-family));
    font-size: var(--legal-size, 1rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: var(--letter-spacing);
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

.legal-page-title {
    margin: 0 0 28px;
    line-height: 1;
}

.legal-block {
    margin-top: var(--legal-gap, 28px);
}

.legal-block h2,
.legal-block p {
    margin: 0;
    font: inherit;
    letter-spacing: inherit;
}

.legal-block-heading {
    line-height: 1;
}

.legal-block p + p {
    margin-top: 1em;
}

.legal-block ul,
.legal-block ol {
    margin: 1em 0;
    padding-left: 1.25em;
}

.legal-block > :first-child {
    margin-top: 0;
}

.legal-block > :last-child {
    margin-bottom: 0;
}

.legal-label {
    text-transform: uppercase;
}


/* =========================================
   23. PFAD UND MARQUEE
   ========================================= */

.directors-page .header .home,
.departments-page .header .home {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: var(--bar-height);
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    scrollbar-width: none;
}

.directors-page .header .home::-webkit-scrollbar,
.departments-page .header .home::-webkit-scrollbar {
    display: none;
}

.breadcrumb-track,
.breadcrumb-copy {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-mono);
    font-weight: 400;
    letter-spacing: var(--letter-spacing-mono);
}

.breadcrumb-track {
    display: flex;
    flex: 0 0 auto;
    width: max-content;
}

.breadcrumb-copy {
    display: block;
    flex-shrink: 0;
    white-space: nowrap;
}

.home.is-marquee .breadcrumb-copy {
    padding-right: 60px;
}

.home.is-marquee .breadcrumb-track {
    animation:
        breadcrumb-marquee
        var(--marquee-duration, 20s)
        linear
        infinite;
}

@keyframes breadcrumb-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.home:hover .breadcrumb-track,
.home:focus-visible .breadcrumb-track {
    animation-play-state: paused;
}


/* =========================================
   24. LINKS: PFEILE UND UNTERSTREICHUNG
   ========================================= */

/*
   Textlinks bekommen einen Pfeil vor dem Text.

   Ausnahmen:
   - Leisten mit eigenen Symbolen
   - Farbflächen mit eigener Hintergrundebene
   - Bildlinks
   - News-Karten, deren Pfeil am Titel sitzt
*/

/* Allgemeine Textlinks – Versionslinks haben einen eigenen Pfeil */
a:not(.bar):not(.color-surface):not(.home-news-item):not(.version-choice):not(:has(img))::before {
    content: "↗\00a0";
    display: inline-block;
    text-decoration: none;
}

/* Menülinks einschließlich Legal Notice und Privacy Policy */

.menu-grid .menu-link::before {
    content: "↗\00a0";
    display: inline-block;
    text-decoration: none;
}

.menu-grid .menu-link::after {
    content: none;
}

/* Verlinkte Karten: Pfeil vor dem eigentlichen Titel */

.home-news-item .home-news-caption h2::before,
.activity-card > a .editorial-title::before {
    content: "↗\00a0";
    display: inline-block;
    text-decoration: none;
}

/*
   Bei Versionslinks wird ::after verwendet,
   weil ::before den Farbverlauf enthält.
*/

.version-choice::after {
    content: "↗";
}

/* Hover und Tastaturfokus: auf allen Links unterstreichen */

a:hover,
a:focus-visible {
    text-decoration-line: underline;
}

/* Unterstreichung auch bei verschachtelten Kartentiteln */

.home-news-item:hover .home-news-caption h2,
.home-news-item:focus-visible .home-news-caption h2,
.activity-card > a:hover .editorial-title,
.activity-card > a:focus-visible .editorial-title,
.activity-back:hover span,
.activity-back:focus-visible span,
.home:hover .breadcrumb-copy,
.home:focus-visible .breadcrumb-copy {
    text-decoration-line: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.12em;
    text-decoration-skip-ink: auto;
}

/* Aktuelle Seite */

.menu-grid .menu-link[aria-current]:not([aria-current="false"]),
.version-choice[aria-current]:not([aria-current="false"]) {
    text-decoration-line: underline;
}

/* Optionale Ausnahme für einzelne Links */

a.no-arrow::before,
a.no-arrow::after {
    content: none;
}


/* =========================================
   25. GERÄTE MIT HOVER
   ========================================= */

@media (hover: hover) {
    .menu-panel:hover::before {
        animation-play-state: paused;
    }

    .home-news-item:hover .home-news-picture {
        margin-top: 0;
    }
}


/* =========================================
   26. TABLET UND MOBILE
   ========================================= */

@media (max-width: 1100px) {
    :root {
        --footer-height: calc(2 * var(--bar-height));
    }

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

    .color-control {
        grid-column: 1 / -1;
    }

    .version-choice {
        padding:
            16px
            var(--space)
            16px
            calc(var(--space) + 1.15em);
        font-size: var(--font-size);
        white-space: normal;
    }

    .version-choice::after {
        top: 16px;
        left: var(--space);
    }
}


/* =========================================
   27. TABLET
   ========================================= */

@media (min-width: 601px) and (max-width: 1100px) {
    /* Menü */

    .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto auto auto;
        gap: 30px;
    }

    .menu-column:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .menu-column:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    .menu-column:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }

    .menu-column:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }

    .menu-legal-notice {
        grid-column: 1;
        grid-row: 3;
    }

    .menu-legal-privacy {
        grid-column: 2;
        grid-row: 3;
    }

    /* Contact */

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

    .contact-funding {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .contact-details {
        grid-column: 2;
        grid-row: 1 / 3;
    }
}


/* =========================================
   28. MOBILE
   ========================================= */

@media (max-width: 600px) {
    :root {
        --bar-height: 44px;
        --header-height: calc(2 * var(--bar-height));
        --footer-height: calc(2 * var(--bar-height));
        --academy-height: 300px;
    }

    /* Header und Menü */

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

    .menu-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        height: auto;

        max-height: calc(
            100svh - var(--header-height) - var(--footer-height)
        );

        padding: 20px var(--space);
        gap: 24px;
        font-size: var(--font-size);
    }

    .menu-column:nth-child(n),
    .menu-legal-notice,
    .menu-legal-privacy {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .menu-legal-notice {
        margin-top: 24px;
    }

    /* Footer */

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

    .academy,
    .version-panel .bar {
        gap: 6px;
    }

    .color-control {
        grid-column: 1 / -1;
    }

    .academy-content p {
        font-size: var(--font-size);
    }

    /* Startseite */

    .home-page .home-overview {
        display: block;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .home-page .home-copy,
    .home-page .home-media {
        height: auto;
        overflow: visible;
    }

    .home-page .home-media {
        padding-top: 0;
    }

    .home-page .home-partners {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        margin-top: 0;
    }

    .home-page .home-partner {
        flex: 1 1 140px;
        width: auto;
    }

    /* News */

    .home-news-items {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-news-picture {
        display: none;
    }

    /* Activities */

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

    .activity-columns {
        display: block;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .activity-copy,
    .activity-gallery {
        height: auto;
        padding: var(--home-big);
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .activity-gallery {
        padding-top: 0;
    }

    .activity-title {
        font-size: calc(var(--font-size) * 1.4);
    }

    .activity-back {
        white-space: normal;
    }

    /* Directors und Members */

    .directors-page,
    .members-page {
        overflow-anchor: none;
    }

    .directors-content {
        height: auto;
        min-height: 100svh;
        overflow: visible;

        padding-bottom: calc(
            var(--footer-height) + 100svh - var(--header-height)
        );
    }

    .directors-grid {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        height: auto;
    }

    .director-trigger,
    .director.is-preview .director-trigger,
    .director.is-active .director-trigger {
        z-index: auto;
        transform: none;
        transition: none;
    }

    .director-portrait {
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .director-info {
        padding: 12px var(--space) 16px;
        scroll-margin-top: var(--header-height);
    }

    .director-name {
        min-height: 0;
    }

    .director-field + .director-field {
        margin-top: 16px;
    }

    .director-profile {
        position: relative;
        inset: auto;
        display: none;
        width: 100%;
        max-height: none;
        overflow: visible;
        overscroll-behavior: auto;
        transform: none;
        transition: none;
        clip-path: none;
    }

    .director-profile::before {
        position: absolute;
        inset: 0;
    }

    .director.is-preview .director-profile {
        display: none;
        transform: none;
    }

    .director.is-active .director-profile {
        display: block;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .director-profile-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        padding: 16px var(--space) 24px;
    }

    /* Departments */

    .departments-list {
        display: block;
        width: 100%;
        height: auto;
    }

    .department-heading {
        height: auto;
    }

    .department-toggle {
        height: auto;
        min-height: 0;
        padding: 10px var(--space);
        overflow: visible;
    }

    .department-description {
        position: relative;
        inset: auto;
        width: 100%;
        padding: 8px var(--space) 24px;
        overflow: visible;
    }

    .department-description::before {
        position: absolute;
        inset: 0;
    }

    .department-text {
        padding-top: 2px;
    }

    /* Description */

    .description-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .description-heading {
        margin-bottom: 24px;
        font-size: calc(var(--font-size) * 1.4);
    }

    .description-research {
        margin-top: 64px;
    }

    .description-research-text {
        max-width: none;
    }

    .description-diagram {
        width: 100%;
        margin: 32px 0;
    }

    .description-questions {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .description-question-column {
        gap: 28px;
    }

    .description-question {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 16px;
    }

    /* Contact */

    .contact-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .contact-project > .contact-field {
        max-width: none;
    }

    .contact-project > .contact-field + .contact-field {
        margin-top: 28px;
    }

    .contact-details {
        gap: 32px;
    }

    .contact-funding {
        justify-self: start;
    }

    .contact-logos {
        gap: 24px;
    }

    /* Legal Notice und Privacy Policy */

    .legal-content {
        padding-right: var(--space);
        padding-left: var(--space);
    }
}


/* =========================================
   29. REDUZIERTE BEWEGUNG
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .menu-panel > .drawer,
    .academy-drawer,
    .version-drawer,
    .director-trigger,
    .director-profile,
    .home-news-dropdown,
    .home-news-picture {
        transition: none;
    }

    .menu-panel::before,
    .home.is-marquee .breadcrumb-track {
        animation: none;
    }

    .directors-page .header .home,
    .departments-page .header .home {
        overflow-x: auto;
    }

    .home.is-marquee .breadcrumb-copy[aria-hidden="true"] {
        display: none;
    }
}