:root {
    --abstand-seite: 2.5vw;
    --hoehe-navigation: 10vh;
    --hoehe-inhalt: 80vh;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* Der Seiteninhalt bleibt scrollbar; nur der sichtbare Balken verschwindet. */
html:has(.bilder) {
    scrollbar-width: none;
}

html:has(.bilder)::-webkit-scrollbar {
    display: none;
}

.seite--fix {
    overflow: hidden;
}

.container {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--hoehe-navigation) var(--hoehe-inhalt);
    height: 100vh;
    min-height: 100vh;
    padding: 0 var(--abstand-seite) 10vh;
}

/* Auf Galerieseiten darf der Inhalt auf schmalen Bildschirmen nach unten wachsen. */
.container:has(.bilder) {
    grid-template-rows: var(--hoehe-navigation) auto;
    height: auto;
    padding-bottom: var(--abstand-seite);
}

.nav {
    justify-content: space-between;
    display: flex;
    align-items: center;
    height: var(--hoehe-navigation);
    width: 100%;
}

.nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-family: Arial, sans-serif; 
    font-size: 1.2rem;              /* rem = bezieht sich auf die Basis-Schriftgrösse */
    color: #222222;                  
    text-decoration: none;         
}

.fade {
    opacity: 0;
    /* Dauer: 2 Sekunden; Verzögerung: 1 Sekunde. Hier kannst du die Sekunden ändern. */
    animation: fadeIn ease 2s;
    animation-fill-mode: forwards;
    animation-delay: 1s;
}

.fade-sofort {
    opacity: 0;
    /* Dauer: 2 Sekunden. Hier kannst du die Sekunden ändern. */
    animation: fadeIn ease 2s;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fadespaet{
    animation-delay: 2s; /* Verzögerung der Animation um 2 Sekunden */
}

.title {
    font-size: 1em;
    font-weight: normal;
    margin: 0;
    display: inline;
}

.absatz {
    font-size: 1em;
    margin: 0;
    display: inline;
}

.text a[href^="mailto:"] {
    color: inherit;
    text-decoration: none;
    transition: opacity 350ms ease;
}

.text a[href^="mailto:"]:hover,
.text a[href^="mailto:"]:focus-visible {
    opacity: 0.4;
}

@media (prefers-reduced-motion: reduce) {
    .text a[href^="mailto:"] {
        transition: none;
    }
}

.tur_box{
    display: flex;
    height: 100vh;
    overflow-x: auto; 
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.scroll-hinweis {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: clamp(4.5rem, 21.6vw, 21.6rem);
    line-height: 1;
    color: #fff;
    pointer-events: none;
    transition: opacity 700ms ease;
}

.startseite--scroll .scroll-hinweis {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-hinweis {
        transition-duration: 0.01ms;
    }
}

.tur{
    height: 100%;
    flex:0 0 auto;
    margin-right: -1px;
}

.tur video {
    display: block;
    height: 100%;
}

/* Beim Wechsel legt sich Schwarz über die Startseite, bevor die Projektseite öffnet. */
.startseite::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 10;
    background-color: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease-in-out;
}

.startseite--wechsel::before {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .startseite::before {
        transition-duration: 0.01ms;
    }
}

/* Safari zeigt nach einem Mausklick teils einen Rahmen um den ausgewählten Link. */
.tur:focus:not(:focus-visible) {
    outline: none;
}

.tur video::-webkit-media-controls-start-playback-button {
    display: none;
}

.bilder {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--abstand-seite);
    height: auto;
    min-width: 0;
    overflow: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 calc(var(--abstand-seite) * -1);
    padding: 0 var(--abstand-seite);
    animation: galerieEinblenden 0.5s ease both;
}

@keyframes galerieEinblenden {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bilder {
        animation-duration: 0.01ms;
    }
}

/* Die Galerie bleibt scrollbar, zeigt aber keinen Positionsbalken. */
.bilder::-webkit-scrollbar {
    display: none;
}

.bilder__bild {
    display: block;
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    object-fit: contain;
}

.bilder__bild--randlos {
    clip-path: inset(1px);
}

@media (min-width: 40rem) {
    .container:has(.bilder) {
        grid-template-rows: var(--hoehe-navigation) var(--hoehe-inhalt);
        height: 100vh;
        padding-bottom: 10vh;
    }

    .bilder {
        flex-direction: row;
        align-items: center;
        height: 100%;
        overflow-x: auto;
    }

    .bilder__bild {
        width: auto;
        height: 100%;
    }
}

