/**
 * Info Grafik
 */
.container {
    overflow-x: hidden;
}

@property --visibility {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

.info-graph {
    --size: 100cqw;
    --element-width: 42cqw;
    --space-above: 5cqw;
    --bottom-offset: 15cqw;
    --font-size-base: 1.8cqw;
    --card-height: calc(
        50cqw + (var(--element-width) / 2) - var(--space-above) -
            var(--bottom-offset)
    );

    container: graph / size;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

@media (max-width: 767px) {
    .info-graph {
        --element-width: 44cqw;
        --space-above: 1cqw;
        --font-size-base: 2.4cqw;

        margin-right: -5vw;
        margin-left: -5vw;
    }
}

@media (max-width: 480px) {
    .info-graph {
        margin-right: -8vw;
        margin-left: -8vw;
    }
}

.cards {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: center;
    transition: rotate 800ms ease-in-out;
}

.card {
    position: absolute;
    top: var(--space-above);
    left: calc(50% - var(--element-width) / 2);
    width: var(--element-width);
    height: var(--card-height);
    padding: 4cqw 5cqw;
    background-color: #fff;
    border-radius: 6cqw;
    transform: translateY(calc(-30% * (1 - var(--visibility))));
    opacity: var(--visibility);
    transform-origin: center
        calc(
            var(--card-height) - var(--element-width) / 2 + var(--bottom-offset)
        );
    box-shadow: 0 0 2cqw #0003;
    font-size: var(--font-size-base);
    text-align: center;
    cursor: pointer;
}

@media (max-width: 767px) {
    .card {
        padding: 2cqw 1cqw;
    }
}

.card-headline {
    margin-bottom: 0.25em;
    font-family: DaxWeb, sans-serif;
    font-size: 1.8em;
    line-height: 1;
    font-weight: bold;
    color: var(--bs-red);
}

.card-subline {
    margin-bottom: 1.2em;
    font-family: "DaxWeb";
    font-size: 1em;
    font-weight: 600;
    line-height: 1;
}

@media (max-width: 480px) {
    .card-subline {
        margin-bottom: 0.8em;
    }
}

.card-1 {
    z-index: 10;
}

.card-2 {
    position: relative;
    rotate: 120deg;
    z-index: 9;
}

.cards:not(.user-interacted) .card-2::before,
.cards:not(.user-interacted) .card-2::after {
    box-sizing: border-box;
    content: "";
    position: absolute;
    top: 3cqw;
    left: 3cqw;
    width: 4cqw;
    height: 4cqw;
    border-radius: 3cqw;
}

.card-2::before {
    background-color: var(--bs-red);
    scale: 0.7;
    animation: click 1500ms ease-out infinite;
}

.card-2::after {
    scale: 1;
    animation: pulse 500ms ease-out infinite alternate;
}

@keyframes click {
    0% {
        scale: 0.7;
        opacity: 0;
    }
    10% {
        scale: 0.7;
        opacity: 0.7;
    }
    15% {
        scale: 0.6;
        opacity: 0.7;
    }
    90% {
        opacity: 0;
    }
    100% {
        scale: 2.5;
        opacity: 0;
    }
}

@keyframes pulse {
    from {
        scale: 1;
    }
    to {
        scale: 0.92;
    }
}

.card-3 {
    rotate: -120deg;
    z-index: 8;
}

.center {
    position: absolute;
    z-index: 15;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1cqw;
    padding: 1cqw;
    width: var(--element-width);
    height: var(--element-width);
    border-radius: var(--element-width);
    transform: translate(-50%, -50%) scale(var(--visibility));
    background-color: var(--bs-red);
    color: #fff;
    font-size: 2.5cqw;
    text-align: center;
}

.center-headline {
    margin: 0.25em;
    font-family: DaxWeb, sans-serif;
    font-size: 1.3em;
    font-weight: bold;
}

.center p {
    margin: 0;
    font-family: DaxWeb-Light, sans-serif;
    line-height: 1;
}

@media (max-width: 539px) {
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    .row > * {
        padding-left: 0;
        padding-right: 0;
    }
}
