@charset "UTF-8";
@import url("fonts/ebert/stylesheet.css");

:root {
    --farbe-dunkel: #222221;
    --farbe-detailtext: #373533;
    --farbe-hintergrund: #ffffff;
    --farbe-detailfenster: #fce5df;
    --farbe-lila: #833b83;
    --farbe-lila-dunkel: #571654;
    --farbe-magenta: #a4366d;
    --farbe-orange: #fca55e;
    --farbe-rot: #e84f52;
    --farbe-fokus: #005a9c;
    --schrift-fliesstext: "Ebert", Arial, sans-serif;
    --schrift-ueberschrift: "Ebert Headline", "Ebert", Arial, sans-serif;
    --schriftgrad-detail-kategorie: clamp(0.56rem, min(1.35vw, 2.025dvh), 1.35rem);
    --schriftgrad-detail-titel: clamp(1rem, min(2.6vw, 3.9dvh), 3rem);
    --schriftgrad-detailtext: clamp(0.58rem, min(1.35vw, 2.025dvh), 1.35rem);
    --schriftgrad-aktionslink: clamp(0.55rem, min(1.25vw, 1.875dvh), 1.3rem);
    --breite-detailfenster: min(72rem, 80vw, 120dvh);
    --maximale-breite-detailfenster: min(80vw, 120dvh);
    --breite-aktionslink: min(100%, 30rem, 29.333vw, 44dvh);
    --schatten-weich: 0 1.2rem 3rem rgba(87, 22, 84, 0.12);
}

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

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    background: var(--farbe-hintergrund);
    color: var(--farbe-dunkel);
    font-family: var(--schrift-fliesstext);
    font-weight: 500;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: grid;
    place-items: center;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

button:focus-visible,
a:focus-visible {
    outline: 0.25rem solid var(--farbe-fokus);
    outline-offset: 0.2rem;
}

.automatischer-fokus:focus {
    outline: none;
}

.infografik {
    --schriftgrad-titel: clamp(1.15rem, 3.15cqw, 4.7rem);
    --schriftgrad-thema: clamp(0.48rem, 1.35cqw, 1.78rem);
    --hoehe-themen-grafik: clamp(3.8rem, 11.5cqw, 12.5rem);
    position: relative;
    width: min(100vw, 150vh);
    width: min(100vw, 150dvh);
    aspect-ratio: 3 / 2;
    overflow: hidden;
    isolation: isolate;
    container-name: infografik;
    container-type: inline-size;
    background:
        radial-gradient(circle at 50% 50%, rgba(131, 59, 131, 0.055) 0, rgba(131, 59, 131, 0.025) 28%, transparent 58%),
        #fff;
}

.infografik__titel {
    position: absolute;
    z-index: 20;
    top: 4.5%;
    left: 4.8%;
    max-width: 34%;
    margin: 0;
    color: var(--farbe-lila-dunkel);
    font-family: var(--schrift-ueberschrift);
    font-size: var(--schriftgrad-titel);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.hauptansicht,
.themen {
    position: absolute;
    inset: 0;
}

.hauptansicht::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 53%;
    width: 48%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(252, 165, 94, 0.2) 0%, rgba(252, 217, 217, 0.18) 34%, rgba(131, 59, 131, 0.05) 55%, transparent 73%);
    filter: blur(1.4rem);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.68);
    transition: opacity 0.9s ease 0.1s, transform 1.1s cubic-bezier(0.2, 0.9, 0.25, 1.1) 0.1s;
}

.hauptansicht__netz {
    position: absolute;
    z-index: 1;
    left: 24.5%;
    top: 14.4%;
    width: 51%;
    height: 68%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.72) rotate(-4deg);
    transition: opacity 0.7s ease, transform 1.05s cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

.schrank {
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 50%;
    width: 25.1%;
    aspect-ratio: 504.22 / 457.3;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.schrank::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 50%;
    width: 82%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(252, 165, 94, 0.4) 0%, rgba(252, 217, 217, 0.32) 32%, rgba(131, 59, 131, 0.12) 54%, transparent 72%);
    filter: blur(1rem);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    pointer-events: none;
}

.schrank__anzeige {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.schrank__geschlossen,
.schrank__geoeffnet {
    position: absolute;
    display: block;
    pointer-events: none;
    transition: opacity 0.48s ease;
}

.schrank__geschlossen {
    left: 50%;
    top: 50%;
    width: 60.17%;
    height: auto;
    transform: translate(-50%, -50%);
}

.schrank__geoeffnet {
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.schrank__geoeffnet > img,
.schrank__geoeffnet > svg {
    display: block;
    width: 100%;
    height: 100%;
}

.infografik:not(.ist-geoeffnet) .schrank__geschlossen {
    animation: schrank-schweben 4.4s ease-in-out infinite;
}

.infografik:not(.ist-geoeffnet) .schrank::before {
    animation: schrank-schein 4.4s ease-in-out infinite;
}

.infografik:not(.ist-geoeffnet) .schrank:hover .schrank__anzeige,
.infografik:not(.ist-geoeffnet) .schrank:focus-visible .schrank__anzeige {
    filter: drop-shadow(0 0.85rem 1.05rem rgba(227, 77, 77, 0.32));
    transform: scale(1.035);
}

.infografik.ist-geoeffnet .hauptansicht__netz {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.infografik.ist-geoeffnet .hauptansicht::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.infografik.ist-geoeffnet .schrank__geschlossen {
    opacity: 0;
}

.infografik.ist-geoeffnet .schrank__geoeffnet {
    opacity: 1;
}

.themen {
    z-index: 6;
    pointer-events: none;
}

.thema {
    --verzoegerung: 0s;
    position: absolute;
    display: flex;
    width: 17%;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.15rem, 0.45cqw, 0.45rem);
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
    transform: translate(var(--start-x, 0), var(--start-y, 0)) scale(0.56);
    transition:
        opacity 0.42s ease var(--verzoegerung),
        transform 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.2) var(--verzoegerung),
        filter 0.2s ease;
}

.infografik.ist-geoeffnet .thema {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
}

.thema:hover,
.thema:focus-visible {
    filter: drop-shadow(0 0.55rem 0.55rem rgba(87, 22, 84, 0.18));
}

.thema__grafik {
    position: relative;
    display: block;
    width: 100%;
    height: var(--hoehe-themen-grafik);
}

.thema__plattform {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 0;
    width: 64%;
    transform: translateX(-50%);
}

.thema__objekt {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 19%;
    width: 49%;
    max-height: 88%;
    object-fit: contain;
    transform: translateX(-50%);
    animation: objekt-schweben 5.2s ease-in-out infinite;
}

.thema:nth-child(even) .thema__objekt {
    animation-delay: -2.4s;
    animation-duration: 5.8s;
}

.thema__grafik--breit .thema__objekt {
    width: 78%;
    bottom: 12%;
}

.thema__grafik--schmal .thema__objekt {
    width: 38%;
}

.thema__beschriftung {
    display: flex;
    width: max-content;
    max-width: 100%;
    min-height: 1.65em;
    align-items: center;
    justify-content: center;
    padding: 0.25em 0.94em 0.3em;
    border-radius: 999px;
    background: var(--farbe-lila);
    color: #fff;
    font-size: var(--schriftgrad-thema);
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    overflow-wrap: anywhere;
    hyphens: auto;
    white-space: normal;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.thema:hover .thema__beschriftung,
.thema:focus-visible .thema__beschriftung {
    background: var(--farbe-lila-dunkel);
    transform: scale(1.035);
}

.thema--zusammenhalt {
    --verzoegerung: 0.15s;
    --start-y: 8rem;
    top: 3.1%;
    left: 41.5%;
}

.thema--zuhoeren {
    --verzoegerung: 0.26s;
    --start-x: -9rem;
    --start-y: 4rem;
    top: 26.7%;
    right: 16%;
}

.thema--resilienz {
    --verzoegerung: 0.36s;
    --start-x: -9rem;
    --start-y: -5rem;
    right: 24.5%;
    bottom: 10%;
}

.thema--kompetenz {
    --verzoegerung: 0.46s;
    --start-y: -8rem;
    bottom: 14%;
    left: 23.5%;
}

.thema--praevention {
    --verzoegerung: 0.56s;
    --start-x: 9rem;
    top: 30.5%;
    left: 13.5%;
}

.fes-logo {
    position: absolute;
    z-index: 30;
    right: 2.4%;
    bottom: 3.6%;
    width: 5.2%;
    height: auto;
}

.themenfenster {
    width: var(--breite-detailfenster);
    max-width: var(--maximale-breite-detailfenster);
    max-height: min(82vh, 58rem);
    padding: 0;
    border: 0.16rem solid var(--farbe-dunkel);
    border-radius: 0;
    overflow: hidden;
    background: var(--farbe-detailfenster);
    color: var(--farbe-detailtext);
    box-shadow: var(--schatten-weich);
}

.themenfenster[open] {
    animation: fenster-einblenden 0.34s cubic-bezier(0.2, 0.9, 0.25, 1.12) both;
}

.themenfenster::backdrop {
    background: rgba(34, 34, 33, 0.47);
    animation: hintergrund-einblenden 0.25s ease both;
}

.detailansicht {
    position: relative;
    min-height: unset;
    max-height: calc(min(82dvh, 58rem) - 0.32rem);
    padding: clamp(2.2rem, min(5vw, 7vh), 3.7rem) clamp(1.7rem, min(5vw, 7vh), 5rem) clamp(1.8rem, min(4vw, 6vh), 4rem);
    overflow: auto;
}

.detailansicht__inhalt {
    position: relative;
    z-index: 2;
    width: 80%;
}

#themenfenster-resilienz .detailansicht__inhalt {
    width: 100%;
}

#themenfenster-resilienz h2 {
    max-width: 70%;
}

.detailansicht__kategorie {
    display: inline-block;
    margin-bottom: clamp(0.45rem, min(1.55vw, 2.4dvh), 1.15rem);
    padding: 0.3em 0.85em 0.29em;
    border-radius: 999px;
    background: var(--farbe-lila);
    color: #fff;
    font-size: var(--schriftgrad-detail-kategorie);
    font-weight: 600;
    line-height: 1;
}

.detailansicht h2 {
    max-width: 82%;
    margin: 0 0 clamp(0.9rem, min(2vw, 3vh), 2rem);
    color: var(--farbe-detailtext);
    font-family: var(--schrift-ueberschrift);
    font-size: var(--schriftgrad-detail-titel);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.012em;
}

.detailansicht p {
    margin: 0 0 clamp(0.8rem, min(1.55vw, 2.4vh), 1.55rem);
    font-size: var(--schriftgrad-detailtext);
    line-height: 1.22;
}

.detailansicht p a {
    color: var(--farbe-lila-dunkel);
    font-weight: 600;
    text-decoration: none;
}

.detailansicht p a:hover,
.detailansicht p a:focus-visible {
    text-decoration: underline;
}

.detailansicht__grafik {
    position: absolute;
    z-index: 1;
    top: 8.5%;
    right: 6.5%;
    width: 24%;
    max-height: 30%;
    object-fit: contain;
}

.detailansicht__grafik--zuhoeren {
    width: 13.5%;
    right: 8%;
}

.detailansicht__grafik--resilienz {
    width: 24%;
}

.detailansicht__grafik--praevention {
    width: 17%;
}

.detailansicht__grafik--kompetenz {
    width: 16%;
    right: 13%;
}

.detailansicht__schliessen {
    position: absolute;
    z-index: 5;
    top: clamp(0.8rem, min(2vw, 3vh), 1.8rem);
    right: clamp(0.8rem, min(2vw, 3vh), 1.8rem);
    width: clamp(2.1rem, min(3.2vw, 5vh), 3.4rem);
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.detailansicht__schliessen::before,
.detailansicht__schliessen::after {
    content: "";
    position: absolute;
    left: 10%;
    top: 48%;
    width: 80%;
    height: 0.16rem;
    border-radius: 0;
    background: var(--farbe-lila-dunkel);
    transition: transform 0.18s ease;
}

.detailansicht__schliessen::before {
    transform: rotate(45deg);
}

.detailansicht__schliessen::after {
    transform: rotate(-45deg);
}

.detailansicht__schliessen:hover::before {
    transform: rotate(135deg);
}

.detailansicht__schliessen:hover::after {
    transform: rotate(45deg);
}

.detailansicht__aktionslink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    width: var(--breite-aktionslink);
    min-width: 0;
    max-width: 100%;
    margin-top: 0.7rem;
    padding: 0.72em 1.45em 0.76em;
    border: 0.15rem solid var(--farbe-dunkel);
    border-radius: 0;
    color: #fff;
    font-size: var(--schriftgrad-aktionslink);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 0.15rem 0 rgba(34, 34, 33, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.detailansicht__aktionslink:hover,
.detailansicht__aktionslink:focus-visible {
    filter: brightness(1.07) saturate(1.04);
    transform: translateY(-0.15rem);
    box-shadow: 0 0.42rem 0.85rem rgba(87, 22, 84, 0.19);
}

.detailansicht__aktionslink--magenta {
    background: var(--farbe-magenta);
}

.detailansicht__aktionslink--orange {
    background: var(--farbe-orange);
    color: var(--farbe-detailtext);
}

.detailansicht__aktionslink--rot {
    background: var(--farbe-rot);
}

@keyframes objekt-schweben {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -0.28rem); }
}

@keyframes schrank-schweben {
    0%, 100% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, calc(-50% - 0.72rem)) scale(1.025); }
}

@keyframes schrank-schein {
    0%, 100% {
        opacity: 0.38;
        transform: translate(-50%, -50%) scale(0.82);
    }
    50% {
        opacity: 0.78;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

@keyframes fenster-einblenden {
    from { opacity: 0; transform: translateY(1rem) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hintergrund-einblenden {
    from { background: rgba(34, 34, 33, 0); }
    to { background: rgba(34, 34, 33, 0.47); }
}

.mobil-umbruch {
    display: none;
}

@media (max-width: 48rem) {
    .mobil-umbruch {
        display: inline;
    }

    body {
        overflow: auto;
        align-items: start;
    }

    .infografik {
        --schriftgrad-titel: clamp(1.7rem, 6.8cqw, 3.8rem);
        --schriftgrad-thema: clamp(0.46rem, 2.75cqw, 1.1rem);
        --hoehe-themen-grafik: clamp(4.1rem, 17cqw, 9rem);
        width: 100vw;
        min-height: 100dvh;
        aspect-ratio: auto;
    }

    .infografik__titel {
        top: 2.8%;
        max-width: 70%;
    }

    .schrank {
        top: 50%;
        width: 44%;
    }

    .hauptansicht__netz {
        left: 7%;
        top: 21%;
        width: 86%;
        height: 56%;
    }

    .thema {
        width: 29%;
    }

    .thema--zusammenhalt { top: 22%; left: 16.5%; right: auto; bottom: auto; }
    .thema--zuhoeren { top: 26%; right: 5%; }
    .thema--resilienz { top: auto; left: auto; right: 4%; bottom: 22%; }
    .thema--kompetenz { left: 14.5%; bottom: 23%; }
    .thema--praevention { left: -1.5%; top: 47%; }

    .thema--kompetenz .thema__beschriftung {
        max-width: 125%;
    }

    .fes-logo {
        width: 22%;
    }

    .themenfenster {
        --schriftgrad-detail-titel: 140%;
        --schriftgrad-detailtext: 1rem;
        --schriftgrad-aktionslink: 90%;
        --breite-aktionslink: min(100%, 22rem);
        --schriftgrad-detail-kategorie: 80%;
        width: calc(100vw - 1.5rem);
        max-width: calc(100vw - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
    }

    .detailansicht {
        min-height: 0;
        max-height: calc(100dvh - 1.8rem);
        padding: 1.2rem 1.4rem 2rem;
    }

    .detailansicht__inhalt {
        width: 100%;
    }

    .detailansicht h2 {
        max-width: 100%;
        padding-right: 0;
    }

    .detailansicht p {
        font-size: var(--schriftgrad-detailtext);
        line-height: 1.45;
    }

    .detailansicht__aktionslink {
        min-height: 2.75rem;
    }

    #themenfenster-resilienz h2 {
        max-width: 100%;
    }

    .detailansicht__grafik {
        display: none;
    }
    .detailansicht__aktionslink {
        padding: 0.55em 1.45em 0.55em;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
