/* Reset */

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

/* Fonts */

@font-face {
    font-family: "ABCDiatype";
    src: url(/assets/fonts/ABCDiatype-Regular.otf) format("opentype");
}


:root {
    --bg-clr: white;
    --clr-dark: rgba(81, 81, 81, 1);
    --clr-highlight: rgba(192, 192, 192,1);
    --width: 70px;
    --gap: 3rem;
    --padding: 1rem;
    --font-size: 1rem;
    --line-height: 1.3rem;
}

@media only screen and (max-width: 800px) {
    :root {
        --width: 70px;
        --gap: 1rem;
        --font-size: 0.85rem;
        --line-height: 1.2rem;
    }
}

img,
picture,
svg {
    max-width: 100%;
    display: block;
}

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    color: white;
    mix-blend-mode: difference;
    font-size: 15vw;
}


/* Structure */

body {
    text-rendering: optimizeLegibility; 
    -moz-osx-font-smoothing: grayscale;
    font-family: "ABCDiatype", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body.noscroll {
    overflow-y: hidden;
}

.main {
    position: relative;
    overflow-x: hidden;
}

.project-preview {
    width: calc(100% - var(--width));
    display: grid;
    grid-template-columns: 1fr 1fr;
    transition: width 0.5s;
}

.project-preview img {
    max-height: 100vh;
    width: 100%;
    object-fit: cover;
    aspect-ratio: 2 / 3;
}

.project-wrapper {
    width: calc(100% - var(--width));
    display: grid;
    grid-template-columns: 150px 1fr 150px;
    transition: width 0.5s;
}

.project-wrapper img {
    max-height: 80vh;
    width: auto;
    object-fit: cover;
    /* max-width: 50%; */
    justify-self: center;
    margin-bottom: var(--gap);
}

/* @media only screen and (min-width: 600px) {
    .project-wrapper img {
        width: 100%;
    }
} */

.slim {
    width: calc(50% + var(--width));
}

.wrapper {
    position: fixed;
    top:0;
    min-width: calc(50% - var(--width));
    /* height: 100%; */
    height: 100dvh;
    left: calc(100% - var(--width));
    display: flex;
    transform: translateX(0);
    transition: left 0.5s;
    z-index: 25;
}

.wrapper.active {
    left: calc(50% + var(--width));
}

@media only screen and (min-width: 800px) {

/* .wrapper:not(.active):hover {
    left: calc(calc(100% - var(--width)) - 30px);
} */

.wiggle {
    left: calc(calc(100% - var(--width)) - 30px);
}

}

@media only screen and (max-width: 800px) {
    .wrapper {
        background-color: var(--bg-clr);
        width: 100%;
    }
    .wrapper.active {
        left: 0;
    }
}

.logo {
    width: var(--width);
    height: 100lvh;
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    border-left: 1px solid black;
    border-right: 1px solid black;
    background-color: var(--bg-clr);
}

.logo p {
    rotate: -90deg;
    font-size: 1.5rem;
    align-self: center;
    text-align: center;
    margin-inline: -100%;
}

.about {
    position: relative;
    width: calc(100% - var(--width));
    overflow-y: scroll;
    background-color: var(--bg-clr);
}

/* ICON */

.plus {
    width: 100%;
    margin-top: 1rem;
    transition: rotate 0.5s;
}

.plus.rotate {
    rotate: 45deg;
}

.plus:hover {
    cursor: pointer;
}

@media only screen and (max-width: 800px) {
    .plus:hover {
        cursor: none;
    }
}

.button:active,
.button:focus { 
    border:none;
    background-color:transparent;
    outline:none;
}

.logo svg:active,
.logo svg:focus { 
    border:none;
    background-color:transparent;
    outline:none;
}

/* Image Preview */

figure {
    position: relative;
}

figcaption {
    position: absolute;
    width: 100%;
    height: 100%;
    top:0;
    left: 0;
    background: rgba(160, 160, 160, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    /* background: radial-gradient(#e66465, rgba(255, 255, 255, 0.2)); */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: lightgray;
    opacity: 0;
    transition: opacity 0.5s;
}

figcaption p {
    transform: translateY(50px);
    transition: transform 0.5s;
    font-size: 1.5rem;
}

figcaption:hover {
    opacity: 1;
}

figcaption:hover p {
    transform: translateY(0);
}

@media only screen and (max-width: 800px) {
    figcaption {
        height: fit-content;
        width: fit-content;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;
        top: auto;
        opacity: 1;
        padding: 0.5rem 0.8rem;
        margin: 1.5rem 0;
        border-radius: 1rem;
    }
    figcaption p {
        transform: translateY(0);
        font-size: 1.2rem;
        text-align: center;
        color: rgb(231, 231, 231);
    }
}

.about img {
    width: 100%;
}

.about-text {
    /* background-color: lightcoral; */
    font-size: var(--font-size);
    line-height: var(--line-height);
    margin: var(--padding);
    margin-bottom: 2rem;
}

/* Projekt Seite */

.project-info {
    position: fixed;
    bottom: 0;
    left: 0;
    margin: var(--padding);
    /* mix-blend-mode: difference;
    color: var(--clr-dark); */
    color: black;
    line-height: 1.2rem;
}

.project-images {
    grid-column: 2;
    display: grid;
    z-index: 10;
}

.next-prev {
    position: relative;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: calc(100% - 100px);
    align-items: end;
    padding: var(--padding);
}

@media only screen and (max-width: 800px) {

    .project-preview,
    .project-wrapper {
        grid-template-columns: 1fr;
    }

    .project-wrapper img {
        width: 100%;
        height: auto;
    }

    .project-info {
        position: relative;
        width: calc(100% - var(--width));
        margin: 0;
        padding-inline: 1rem;
        bottom: 0;
        left: 0;
    }

    .next-prev {
        position: relative;
        width: calc(100% - var(--width));
        bottom: 0;
        right: 0;
        display: flex;
        flex-direction: row;
        justify-content: end;
        gap: 1rem;
        margin: 0;
        padding: 1rem;
    }
}

.bottom-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: var(--padding);
    font-size: var(--font-size);
    line-height: var(--line-height);
}

.bottom-info > div p {
    margin-bottom: 1rem;
}

.footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: var(--padding);
    font-size: var(--font-size);
    line-height: var(--line-height);
}

.footer > div a,
.about a,
.overview-button a,
.back-button a {
    text-decoration: none;
    color: black;
}

.about a:hover {
    color: var(--clr-highlight);
}

.imprint-button:hover {
    color: var(--clr-highlight);
    cursor: pointer;
}

.imprint {
    margin: var(--padding);
    display: none;
    border-top: 1px solid black;
    padding-top: 1rem;
}

.imprint p {
    margin-bottom: 1rem;
    font-size: var(--font-size);
    line-height: var(--line-height);
}

.imprint.visible {
    display: block;
}

.overview-button,
.back-button {
    position: fixed;
    z-index: 15;
    top:0;
    left: 0;
    padding: var(--padding);
}

.overview-button a:hover,
.back-button a:hover {
    color: var(--clr-highlight);
}

@media only screen and (max-width: 800px) {
    .overview-button,
    .back-button {
        mix-blend-mode: difference;
    }
    .overview-button a,
    .back-button a {
        color: white;
    }
}

.arrow:hover path  {
    stroke: var(--clr-highlight);
}

.error {
    width: 100vw;
    height: 100vh;
    background-repeat: no-repeat;
    background-size: cover;
}