@import url("font.css");

:root {
    /* font */
    --font-main: "Trispace Variable";
    --text-size: 1rem;
    --line-height: 1.4;
    --text-color: black;
    --bg-color: white;

    --grid-gap: 1.25rem; /* raster 12 spalten */
    --page-padding: 2rem;
    --max-width: 1440px;

    --transition-speed: 0.3s;

    @media (max-width: 768px) {
        --grid-gap: 1rem; /* Handy */
        --page-padding: 1rem;
    }
}
html {
    scroll-behavior: smooth;

    /*breite nicht zu breit*/
    &,
    body {
        width: 100%;
        overflow-x: clip;
        position: relative;
    }
    body {
        font-family: var(--font-main);
        font-size: var(--text-size);
        margin: 0;
        padding: 0;
        background-color: var(--bg-color);
        color: var(--text-color);

        /* Verhindert horizontales Scrollen(handy!) */
        overflow-x: hidden;
    }
}
/*links-insgesamt*/
a {
    text-decoration: none;
    color: var(--text-color);
    transition: opacity var(--transition-speed) ease;

    /*hover*/
    &:hover {
        opacity: 0.5;
    }
    &.img-link {
        display: block;
        width: 100%;
        border: none;
        text-decoration: none;

        &:hover {
            opacity: 1 !important;

            img {
                opacity: 0.7;
            }
        }

        img {
            width: 100%;
            height: auto;
            display: block;
            transition: opacity var(--transition-speed) ease;
        }
    }
}

#work {
    scroll-margin-top: 4rem; /* Abstand nach oben beim scrollen zur ersten arbeit */
}
.container-menu {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gap);
    width: 100%;
    padding: var(--page-padding);
    padding-bottom: 0;
    padding-top: 1rem;
    box-sizing: border-box;
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: center;
    position: relative;
    z-index: 100;

    > svg,
    > .logo-link {
        grid-column: 1 / 3;
        width: 100%;
        height: auto;
        max-width: 100px;
        display: block; /* link zu block */
        text-decoration: none; /* kein Unterstrich */
        border: none;
    }
    > .logo-link svg {
        width: 100%;
        height: auto;
        display: block;
    }
    @media (max-width: 768px) {
        grid-template-columns: repeat(4, 1fr); /* handy 4 Spalten Raster */
        > svg,
        > .logo-link {
            grid-column: 1 / 2;
            width: 80px;
        }
    }
}

header nav {
    grid-column: 6 / 12;
    display: flex;
    justify-content: flex-end;

    ul.desktop-nav {
        display: flex;
        gap: 3rem;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .mobile-menu-btn {
        display: none;
        align-items: center;
        cursor: pointer;

        a {
            font-family: var(--font-main);
            font-size: var(--text-size);
            text-transform: uppercase;
            font-weight: bold;
            color: var(--text-color);
        }
        svg {
            height: 0.7em;
            width: auto;
            margin-left: 0.5rem;
        }
    }
    @media (max-width: 768px) {
        grid-column: 3 / 5;

        /* Desktop menü ausblenden */
        ul.desktop-nav {
            display: none;
        }
        /* Mobile einblenden */
        .mobile-menu-btn {
            display: flex;
            justify-content: flex-end;
        }
    }
    li {
        font-family: var(--font-main);
        font-size: var(--text-size);
        text-transform: uppercase;
        font-weight: bold;
        cursor: pointer;

        /* Pfeil und text bleieben in einer Zeile */
        display: flex;
        align-items: center;

        /*pfeile nach text*/
        svg {
            height: 0.7em;
            width: auto;
            margin-left: 0.5rem;
            transition: opacity var(--transition-speed) ease;
        }

        /* weicher Übergang für den Text */
        a {
            transition: opacity var(--transition-speed) ease;
        }

        &:hover svg,
        &:hover a {
            opacity: 0.5;
        }
    }
}
.intro-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gap);
    width: 100%;
    padding: 0 var(--page-padding);
    max-width: var(--max-width);
    margin: -3rem auto 0 auto;
    align-items: center;
    box-sizing: border-box;
    min-height: 85vh;
    position: relative;

    .sonne-mobile {
        display: none;
    }
    .sonne {
        grid-column: 8 / 12;
        grid-row: 1;
        width: 100%;
        height: auto;
        transform: translateX(-2rem);
        align-self: center;
        display: block;
    }
    .schmetterling {
        grid-column: 1 / 4;
        grid-row: 1;
        width: 120%;
        height: auto;
        align-self: center;
        transform: translateX(4rem);
    }
    .intro-text {
        grid-column: 5 / 9;
        grid-row: 1;
        align-self: center;
        text-align: center;
    }
    .Hi-text {
        font-family: var(--font-main);
        font-size: 12.5rem;
        font-weight: bold;
        grid-column: 6 / 9;
        text-align: center;
        margin: 0;
        line-height: 1;
    }
    .portfolio-text,
    .name-text {
        grid-column: 2 / 5;
        grid-row: 1;
        align-self: end;
        font-family: var(--font-main);
        font-weight: bold;
        font-size: var(--text-size);
        text-transform: uppercase;
        margin-bottom: 2rem;
    }
    .name-text {
        grid-column: 8 / 12;
        text-align: right;
    }
    @media (max-width: 768px) {
        /*  MOBILE REGELN  */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        margin-top: 0;
        min-height: auto;
        padding-top: 15vh;
        overflow: hidden;

        /* hbsdhfbsb!!!!!!!! */
        .sonne {
            display: none !important;
        }
        .schmetterling {
            display: none !important;
        }

        /* 2 sonne*/
        .sonne-mobile {
            display: block !important;
            position: absolute;
            z-index: 0; /* Hinter dem Text */
            margin: 0;
            padding: 0;
            width: 85vw;
            height: auto;
            top: 1vh;
            right: -10vw;
            transform: none;
        }

        .sonne-mobile img {
            width: 100%;
            height: auto;
            display: block;
        }

        /* Texte anpassen */
        .intro-text {
            width: 100%;
            text-align: left;
            margin-bottom: 1rem;
            position: relative;
            z-index: 2; /* Über der Sonne */
        }

        .Hi-text {
            font-size: 45vw;
            line-height: 0.8;
            margin: 0;
            margin-left: -1em;
            margin-bottom: 3rem;
        }

        .portfolio-text,
        .name-text {
            width: 100%;
            text-align: left;
            font-size: 1rem;
            margin: 0;
            position: relative;
            z-index: 2;
        }
        .portfolio-text {
            margin-bottom: 0.5rem;
        }
    }
}
.projects {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-bottom: 10rem;
    padding-top: 5rem;

    @media (max-width: 768px) {
        padding-top: 2rem;
        padding-bottom: 5rem;
    }
}

.work {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gap);
    width: 100%;
    margin: 0;
    margin-bottom: 15rem;
    align-items: start; /*damit text bündig zum bild steht*/

    /* Mobile Work */
    @media (max-width: 768px) {
        display: flex;
        flex-direction: column;
        margin-bottom: 5rem;

        width: 100%;
        box-sizing: border-box;
        padding: 0 var(--page-padding);
    }

    img {
        width: 100%;
        height: auto;
        display: block;
    }
    figcaption {
        font-family: var(--font-main);
        font-size: var(--text-size);
        line-height: var(--line-height);
        margin-top: 0;
        display: flex;
        flex-direction: column;

        @media (max-width: 768px) {
            margin-top: 0.5rem;
            width: 100%;
            text-align: left !important;
            flex-direction: row; /* mobile- Text nebeneinander */
            justify-content: space-between;
        }
    }
    /*Ungerade Projekte (1, 3, 5...) -> Bild links*/
    &:nth-child(odd) {
        a {
            grid-column: 2 / 9;
        }
        figcaption {
            grid-column: 9 / 12;
            text-align: left;
            align-items: flex-start; /*Links bündig */
        }
    }
    /*gerade Projekte (2,4,6...) -> Bild rechts*/
    &:nth-child(even) {
        a {
            grid-column: 4 / 11;
        }
        figcaption {
            grid-column: 2 / 4;
            text-align: right;
            grid-row: 1;
            align-items: flex-end; /* rechts bündig */
        }
    }
    &:nth-child(odd) a,
    &:nth-child(even) a {
        @media (max-width: 768px) {
            grid-column: unset;
            width: 100%;
        }
    }
    &:nth-child(odd) figcaption,
    &:nth-child(even) figcaption {
        @media (max-width: 768px) {
            grid-column: unset;
            text-align: left;
            align-items: center;
        }
    }
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gap);
    width: 100%;

    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    @media (max-width: 768px) {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 var(--page-padding);
        padding-bottom: 5rem;
    }
    .contact-stack {
        grid-column: 2 / 12;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-bottom: 4rem;
        z-index: 10;

        @media (max-width: 768px) {
            margin-bottom: 0;
            width: 100%;
            justify-content: flex-start;
            padding-top: 10vh;
        }
    }
    .star-icon {
        grid-column: 2 / 3;
        width: 0.9em !important;
        height: auto !important;
        vertical-align: middle;
        margin-left: 0.6ch; /*charakter unit(wie der buchstabe)*/
        margin-right: 0.2ch; /* Abstand zum Wort "Touch" */
        margin-bottom: 0.25em;
    }
    .big-headline {
        grid-column: 4 / 9;
        font-family: var(--font-main);
        font-weight: 900;
        font-size: 12.5rem;
        line-height: 0.9;
        text-transform: uppercase;
        margin: 0;
        color: var(--text-color);
        word-spacing: -5rem;

        @media (max-width: 768px) {
            font-size: 19vw;
            line-height: 1;
            margin-bottom: 2rem;
            word-spacing: -4vw;
        }
    }
    .contact-info-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-top: 2rem;
        width: 63%;

        @media (max-width: 768px) {
            flex-direction: row;
            width: 100%;
            gap: 2%;
        }
    }
    .contact-text {
        font-family: var(--font-main);
        font-size: var(--text-size);
        line-height: var(--line-height);
        max-width: 33rem; /* zeilenlänge*/
        margin: 0;

        @media (max-width: 768px) {
            /* kontakt text breite */
            width: 70%;
            font-size: 1rem;
        }
    }
    .contact-links-group {
        display: flex;
        flex-direction: column; /* untereinander */
        text-align: right; /* text rechtsbündig */
        gap: 1.5rem; /* Abstand zwischen Insta und Email */

        @media (max-width: 768px) {
            text-align: left;
            width: 25%;
        }
        a {
            font-family: var(--font-main);
            font-weight: bold;
            text-transform: uppercase;
            text-decoration: none;
            color: var(--text-color);
        }
    }
    .no-break {
        /* touch und stern bleiben in einer zeile */
        white-space: nowrap;

        @media (max-width: 768px) {
            /* touch u. stern ein bissl nach rechts */
            margin-left: 0.2em;
        }
    }
    .katze {
        position: absolute;
        bottom: 0;
        right: -3vw; /*rechts angeschnitten*/

        width: auto;
        z-index: 1;
        pointer-events: none;
        transform: none !important;
        margin: 0 !important;

        img {
            width: auto;
            height: 130vh;
            display: block;
        }

        @media (max-width: 768px) {
            display: none;
        }
    }
}
footer {
    position: absolute;
    bottom: 0.6rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding: 0 5vw;
    box-sizing: border-box;
    z-index: 10;
    font-family: var(--font-main);
    font-size: var(--text-size);
    margin: 0;

    @media (max-width: 768px) {
        /* Footer auf handy nebeneinander */
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        padding: 0 var(--page-padding);
        bottom: 0.5rem;
        gap: 0;
    }
    a {
        text-decoration: none;
        color: var(--text-color);
        margin-right: 3rem;

        @media (max-width: 768px) {
            margin-right: 0.8rem;
            font-size: 0.65rem;
        }
    }
    .copyright {
        margin-left: auto;

        @media (max-width: 768px) {
            margin-left: 0;
            margin-top: 0;
            font-size: 0.65rem;
            white-space: nowrap;
        }
    }
}
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: black;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--page-padding);
    padding-top: 1rem;
    padding-bottom: 4rem;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}
/* Header im Menü (Pfeil rechts oben) */
.overlay-header {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}
.close-btn {
    cursor: pointer;
    padding: 1rem;
    margin-right: -1rem;
    margin-top: 0.5rem;
}
/* Links Mitte, Zentriert */
.overlay-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    align-items: center;
    width: 100%;
}
.overlay-links li a {
    font-family: var(--font-main);
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.overlay-links li a svg {
    height: 0.6em;
    width: auto;
}
/* Footer :stern unten- zentriert*/
.overlay-footer {
    display: flex;
    justify-content: center;
    width: 100%;
}
.overlay-footer svg {
    width: 80px;
    height: auto;
}
@media (min-width: 769px) and (max-width: 1300px) {
    /*breakpoint2*/
    .contact-grid .big-headline {
        font-size: 7rem;
        word-spacing: -1.5rem;
        line-height: 1;
        margin-left: -3rem;
    }
}
@media (min-width: 769px) and (max-width: 1300px) {
    .contact-grid .big-headline {
        font-size: 7rem;
        word-spacing: -1.5rem;
        line-height: 1;
        margin-left: -3rem;
    }
    .intro-grid .sonne {
        grid-column: 6 / 12;
        justify-self: center;
        transform: translateX(-5vw);
        width: 90%;
    }
}
