@view-transition {
    navigation: none;
}

@font-face {
    font-family: 'HelveticaNowDisplay';
    src: url('fonts/HelveticaNowDisplay-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FreigeistNeue';
    src: url('fonts/RBFreigeistNeue-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FreigeistNeue';
    src: url('fonts/RBFreigeistNeue-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

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

html,
body {
    height: 100%;
    font-family: 'HelveticaNowDisplay', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    background-color: #f0f0ee;
}




.page--index #nav .sidebar__inner,
.page--index .informationen {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.index-entry {
    display: block;
    text-decoration: none;
    color: #1a1a1a;
    /* border-top: 1px solid #1a1a1a; */
    padding-bottom: clamp(0.45em, 2.5vw, 0.65em);
    transition: opacity 0.15s;
}

.index-entry:first-child {
    padding-top: 24px;
}

.index-entry__title {
    font-family: 'HelveticaNowDisplay', sans-serif;
    font-weight: normal;
    font-size: clamp(0.85rem, 1.15vw, 1.2rem);
    line-height: clamp(1em, 1.1vw, 1.15em);
}

.index-entry__thumb {
    display: inline-block;
    height: 0.75em;
    max-width: 0;
    overflow: hidden;
    vertical-align: middle;
    object-fit: cover;
    border-radius: 2px;
    opacity: 0;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}




.site-header {
display: flex;
    align-items: center;
    gap: 48px;
    padding: 8px 48px;
    position: sticky;
    top: 0;
    z-index: 100; 
    background: #f0f0ee;
    margin-bottom: 2px;
    box-shadow: 0 60px 0 0 #f0f0ee;
}

.site-header__toggle-space {
    display: none;
}

.site-header__nav {
    flex: 1 0 0;
    min-width: 0;
}

.site-header__content {
    flex: 2 0 0;
    min-width: 0;
    position: relative;
}

.site-header__aside {
    flex: 1 0 0;
    min-width: 0;
}


.header__back,
.header__next {
    text-decoration: none;
    color: rgba(26, 26, 26, 0.35);
    font-size: 0.6rem;
    font-family: 'FreigeistNeue', sans-serif;
    transition: color 0.15s;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer__back,
.footer__next {
    text-decoration: none;
    color: rgba(26, 26, 26, 0.35);
    font-family: 'FreigeistNeue', sans-serif;
    transition: color 0.15s;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer__next{
    display: block;
    text-align: right;
}

.header__next {
    display: block;
    text-align: right;
}

.header__back:hover,
.header__back[aria-current="page"],
.header__breadcrumb[aria-current="page"] {
    color: #1a1a1a;
}

.header__breadcrumb {
    font-size: 0.6rem;
    font-family: 'FreigeistNeue', sans-serif;
    color: rgba(26, 26, 26, 0.35);
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.15s, opacity 0.15s;
    text-align: left;
    text-decoration: none;
    display: inline-block;
}

.header__breadcrumb:hover {
    color: #1a1a1a;
}

@supports (view-transition-name: none) {
    .header__breadcrumb {
        view-transition-name: chapter-title;
    }

    /* Hintergrund-Crossfade sehr schnell, damit Fokus auf dem Titel liegt */
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.15s;
    }

    /* Gruppe bewegt sich von der Indexposition zur Header-Position */
    ::view-transition-group(chapter-title) {
        animation-duration: 0.45s;
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Alter Titel blendet schnell aus während er nach oben fliegt */
    ::view-transition-old(chapter-title) {
        animation-duration: 0.2s;
        animation-timing-function: ease-out;
    }

    /* Neuer Breadcrumb blendet etwas verzögert ein */
    ::view-transition-new(chapter-title) {
        animation-duration: 0.3s;
        animation-delay: 0.15s;
        animation-timing-function: ease-in;
    }
}

.header__dropdown {
    position: absolute;
    top: 0;
    left: 0;
    right: -25vw;
    list-style: none;
    z-index: 200;
    padding: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    visibility: visible;
}

.header__dropdown li {
    opacity: 1;
}

.site-header__content:has(.header__dropdown) .header__breadcrumb {
    display: none;
}

.header__dropdown a {
    display: block;
    padding: 0;
    text-decoration: none;
    color: rgba(26, 26, 26, 0.35);
    font-size: 0.6rem;
    font-family: 'FreigeistNeue', sans-serif;
    transition: color 0.15s;
}

.header__dropdown a:hover {
    color: #1a1a1a;
}

.header__dropdown a[aria-current="page"] {
    color: #1a1a1a;
}

.scroll-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: #000000;
    z-index: 10000;
    pointer-events: none;
    transition: width 0.08s linear;
}

.site-footer {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 8px 48px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #f0f0ee;
    padding-bottom: 48px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.site-footer.is-visible {
    opacity: 1;
    pointer-events: auto;
}





.page-content {
    height: calc(100vh - var(--header-h, 0px) - var(--footer-h, 0px) - 72px);
    overflow-y: auto;

    padding: 0 48px 0;

    /* Hier steuerst du, wie tief die Box anfängt und wo alles stoppt.
       Spiel mit diesem Wert (z.B. 60px, 72px, 80px), bis der Titel perfekt sitzt! */
    margin-top: 72px;

    scroll-behavior: smooth;
    scrollbar-width: none;
}

.page-content::-webkit-scrollbar {
    display: none;
}

.layout {
    display: flex;
    min-height: 100%;
    gap: 48px;
    margin-top: -96px; /* <-- NEU: Zieht den gesamten Inhalt wieder perfekt in Position */
    padding-bottom: 96px;
}

.sidebar {
    flex: 1 0 0;
    min-width: 0;
    font-size: 0.6rem;
    font-family: 'FreigeistNeue', sans-serif;
    padding-top: 33.33vh;
}

.sidebar__inner {
    max-width: 250px;
    padding: 0 0 32px 0;
    position: sticky;
    top: 0;
    max-height: calc(100vh - var(--header-h, 0px));
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar__inner::-webkit-scrollbar {
    display: none;
}

.sidebar--right .sidebar__inner {
    margin-left: auto;
}

.sidebar__arrow {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f0f0ee;
    padding: 36.5px 0 12px;
    border: none;
    font-family: inherit;
    font-size: 0.6rem;
    color: inherit;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.15s;
    white-space: nowrap;
    text-align: left;
    width: 100%;
}

.sidebar__arrow--right {
    text-align: right;
}

.sidebar__arrow:hover {
    opacity: 1;
}

.sidebar__nav {
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.sidebar.is-collapsed .sidebar__nav {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}



.cite,
.vgl-link,
.abb,
.footnote-ref {
    color: #7ab8f5;
    cursor: pointer;
}

.abb {
    white-space: nowrap;
}

.cite:hover,
.vgl-link:hover,
.footnote-ref:hover {
    opacity: 0.65;
}

.vgl-link {
    text-decoration: none;
}

.footnote-ref {
    vertical-align: super;
}

.src--active {
    color: #7ab8f5 !important;
}

.sidebar__nav {
    list-style: none;
}

.sidebar__nav a {
    text-decoration: none;
    color: rgba(26, 26, 26, 0.35);
    transition: color 0.15s;
    letter-spacing: 0.03em;
    line-height: clamp(1.35em, 2.5vw, 1.45em);
}

.sidebar__nav a:hover {
    color: #1a1a1a;
}

.sidebar__nav a.is-active {
    color: #1a1a1a;
}

.sidebar__nav li {
    line-height: clamp(1.35em, 2.5vw, 1.45em);
    margin-bottom: 1em;
}

.sidebar__nav ul {
    list-style: none;
    padding-left: 1em;
    margin-top: 0.3em;
}

.sidebar__nav ul li {
    margin-bottom: 0.2em;
}

.sidebar__nav--dark li {
    margin-bottom: 1em;
}

.sidebar__nav .impressum-copyright {
    opacity: 0.7;
}

.sidebar__nav--dark a {
    color: #1a1a1a;
}


.content {
    flex: 2;
    min-width: 0;
    padding: 33.33vh 0 32px;
}


.content h1 {
    position: sticky;
    top: 0px;
    background: #f0f0ee; /* Verdeckt den Text, der direkt dahinter verschwindet */
    z-index: 11;
    padding: 10px 0 0;
    margin: 0 0 0.4em;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    font-family: 'FreigeistNeue', sans-serif;
    font-weight: bold;
    line-height: clamp(1.35em, 2.5vw, 1.65em);
}

.contenttitle{
    background: #f0f0ee; /* Verdeckt den Text, der direkt dahinter verschwindet */
    z-index: 11;
    padding: 10px 0 0;
    margin: 0 0 0.4em;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    font-family: 'FreigeistNeue', sans-serif;
    font-weight: bold;
    line-height: clamp(1.35em, 2.5vw, 1.65em);
}

.sidebar__inner {
    position: sticky;
    top: -18px;
}

.page-content::before {
    content: '';
    position: sticky;
    top: 0;
    display: block;
    width: 100%;
    height: 20px;
    background-color: #f0f0ee;
    z-index: 10;
    pointer-events: none;
}



.section{
    margin-top: clamp(4em, 6vw, 8em);
}


.content h2 {
    position: sticky;
    top: var(--h1-h, 0px);
    background: #f0f0ee;
    z-index: 1;
    font-size: 1em;
    font-family: 'FreigeistNeue', sans-serif;
    font-weight: bold;
    padding: 1.8em 0 0.4em;
    margin: 0;
    color: rgba(26, 26, 26, 0.65);
}

.content h2:first-child {
    padding-top: 0;
}

.download-btn {
    display: inline-block;
    margin: 0.5em 0 1.2em;
    color: inherit;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
}

.download-btn:hover {
    opacity: 0.75;
}

.footnote {
    color: rgba(26, 26, 26, 0.5);
    margin-bottom: 0.8em;
}

p.footnote {
    display: none;
}

p.footnote.is-visible {
    display: block;
}


.content p {
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
    -webkit-hyphenate-limit-after: 3;
    -webkit-hyphenate-limit-before: 3;
    hyphenate-limit-chars: 6 3 3;
    -webkit-hyphenate-limit-lines: 3;
    hyphenate-limit-lines: 3;
    line-height: clamp(1.35em, 2.5vw, 1.45em);
    margin-bottom: 1.5em;
    word-spacing: -0.01em;
    overflow-wrap: break-word;
}



.abb-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: white;
    display: none;
}

.abb-tooltip.is-visible {
    display: block;
}

.abb-tooltip img {
    display: block;
    max-height: 160px;
    width: auto;
}

.grid-hover-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: white;
    display: none;
}

.grid-hover-tooltip.is-visible {
    display: block;
}

.grid-hover-tooltip img {
    display: block;
    max-height: 280px;
    width: auto;
}

.abb-image-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: clamp(1.5em, 2.5vw, 2.5em) 0;
    align-items: flex-end;
}

.abb-image {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    position: relative;
}

.abb-image-group--full .abb-image {
    flex: 1 1 100%;
}

.abb-image-group--2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: end;
}


.abb-image-group--equal .abb-image {
    background: white;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abb-image-group--equal .abb-image img,
.abb-image-group--equal .abb-image video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.abb-image-col {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.abb-image-col .abb-image {
    flex: 1 1 0;
}

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

.abb-image img,
.abb-image video {
    display: block;
    width: 100%;
    height: auto;
}

.abb-image--half {
    flex: 0 0 calc(50% - 4px);
    max-width: calc(50% - 4px);
}

.abb-image--zoom {
    overflow: hidden;
}

.abb-image--zoom img,
.abb-image--zoom video {
    transform: scale(1.12);
    transform-origin: center;
    display: block;
    width: 100%;
}

.abb-image--fill {
    align-self: stretch;
}

.abb-image--fill img,
.abb-image--fill video {
    height: 100%;
    object-fit: cover;
}

.abb-caption {
    display: block;
    color: grey;
    font-size: 0.6rem;
    padding-top: 0.3em;
    line-height: clamp(1.2em, 1.6vw, 1.45em);
}


.abb-caption em {
    font-style: italic;
}


.drawing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 4px;
    margin: clamp(1.5em, 2.5vw, 2.5em) 0;
}

.drawing-grid img {
    display: block;
    width: 100%;
    height: auto;
}

.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(137, 137, 137, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.lightbox__arrow {
    position: absolute;
    top: 50%;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 1rem 1.5rem;
    opacity: 1;
    transition: opacity 0.15s;
    z-index: 1;
}

.lightbox__arrow:hover {
    opacity: 1;
}

.lightbox__arrow--prev { left: 0; }
.lightbox__arrow--next { right: 0; }

.lightbox__media img,
.lightbox__media video {
    display: block;
    max-width: 80vw;
    max-height: 80vh;
    width: auto;
    height: auto;
}

img:not(.abb-tooltip img):not(.lightbox__media img),
.abb-image video {
    cursor: pointer;
}

@media (max-width: 1000px) {
    body::before {
        content: 'Diese Webseite ist nur für die Desktop-Ansicht verfügbar.';
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: #f0f0ee;
        z-index: 99999;
        display: -ms-grid;
        display: grid;
        -ms-grid-columns: 1fr;
        -ms-grid-rows: 1fr;
        place-items: center;
        text-align: center;
        padding: 2rem;
        font-family: 'FreigeistNeue', sans-serif;
        font-size: 1.5rem;
    }
}
