/* 
Version 3.0
Autor: Jan Zeller 
*/

/* ------------ RESET ------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --------- VARIABLES -------------- */
:root {
    font-size: 18px;

    /* colors */
    --orange: #FF9527;
    --blue: #375470;
    --gray: #60615B;
    --white: #FFFFFF;
    --black: #000000;

    /* typography */
    --font-primary: 'Syne';
    --font-text: 'helvetica-lt-pro';

    /* spacing */
    --xs-space: 8px;
    --s-space: 16px;
    --m-space: 24px;
    --l-space: 32px;
    --xl-space: 64px;
    --xxl-space: 128px;
}

html {
    scroll-behavior: smooth;
}

:focus-visible {
    outline: 2px solid var(--orange);
}

::selection {
    background-color: var(--orange);
    color: var(--black);
}

/* -------- TYPOGRAPHY ----------  */
body {
    font-family: var(--font-text), sans-serif;
}

a.top {
    position: sticky;
    z-index: 100;
    left: calc(100vw - 100px);
    top: calc(100vh - 100px);
    font-size: 1.5rem;
    border: 1px solid var(--orange);
    color: var(--orange);
    display: inline-flex;
    padding: var(--xs-space);

    &:hover {
        color: var(--white);
        border: 1px solid var(--white);
        background-color: var(--orange);
    }
}

h1,
h2,
h3 {
    font-family: var(--font-primary), sans-serif;
}

h1 {
    font-weight: normal;
    font-size: 60px;
    line-height: .83;
    color: var(--white);
}

h2 {
    font-weight: bold;
    font-size: 56px;
    line-height: 1;
    letter-spacing: -5%;

    &.title {
        font-weight: bold;
        font-size: 96px;
        line-height: .83;
        color: var(--white);
        letter-spacing: -7%;

        & span {
            color: var(--orange);
        }
    }
}

h3 {
    font-weight: 500;
    font-size: 28px;
}

h4 {
    font-family: var(--font-text);
    font-size: 24px;
    font-weight: lighter;

    &.quote {
        font-size: 36px;
        color: var(--orange);
        line-height: unset;


        & .bold {
            font-weight: bold;
        }
    }
}

p {
    font-weight: lighter;
}

a {
    text-decoration: none;
    color: var(--black);

    &:hover {
        text-decoration: underline;
    }
}

/* buttons with hover */
.button-light,
.button-dark:hover {
    display: inline-block;
    padding: 12px var(--s-space);
    background-color: var(--orange);
    color: var(--black);
    font-family: var(--font-primary);
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid transparent;
    text-decoration: none;
    width: fit-content;
    font-size: 16px;

    &::before {
        content: "\276F" "\2000";
    }

    &:focus {
        border: 2px solid var(--white);
        outline: 2px solid var(--black);
    }
}

.button-dark,
.button-light:hover {
    display: inline-block;
    padding: 12px var(--s-space);
    background-color: transparent;
    color: var(--orange);
    border: 1px solid var(--orange);
    font-family: var(--font-primary);
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    width: fit-content;
    font-size: 16px;

    &::before {
        content: "\276F" "\2000";
    }

    &:focus {
        border: 2px solid var(--orange);
        outline: 2px solid var(--white);
    }
}

[class^="iconoir-"],
[class*=" iconoir-"] {
    z-index: -1;
}


/* ------------- HEADER ---------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--l-space) var(--xl-space);
    background-color: var(--black);
    position: sticky;
    top: 0;
    height: 90px;
    z-index: 1;

    & a {
        z-index: 1;

        & img {
            max-height: 20px;
        }
    }

    & nav ul {
        display: flex;
        gap: var(--l-space);

        & li {
            list-style-type: none;

            & a {
                color: var(--orange);
                font-weight: normal;

                &::before {
                    content: "\276F" " ";
                    opacity: 0;
                    transition: opacity .1s ease-in-out;
                }
            }

            &:hover a {
                color: var(--white);
                text-decoration: none;

                &::before {
                    opacity: 1;
                }
            }
        }
    }

    & .nav-burger {
        display: none;
    }
}

/* ------------- MAIN ---------------- */
main>section {
    padding: var(--xxl-space) var(--m-space);


    &:nth-of-type(odd) {
        background-color: var(--black);

        &>*,
        h2+h4 {
            color: var(--white);
            margin-bottom: var(--m-space);
        }
    }

    & .wrapper {
        max-width: 1000px;
        margin: var(--l-space) auto;
        display: flex;
        flex-direction: column;


        & .section-content {
            margin: var(--l-space) 0;
            display: flex;
            gap: var(--s-space);
        }

        & .button-light,
        .button-dark {
            align-self: flex-end;
        }
    }

    & h2+h4 {
        color: var(--gray);
        margin-bottom: var(--m-space);

    }
}

/* ----- HERO SECTION */
section.hero {
    background-image: url('../img/isometric-picture.png');
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 60%;
    height: calc(100vh - 90px);

    padding: var(--xxl-space) var(--xl-space);
    display: grid;
    grid-template-columns: 8fr 4fr;
    column-gap: var(--s-space);

    transition: background-size 1.5s cubic-bezier(0.23, 1, 0.32, 1),
        background-position 1.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: background-position, background-size;

    & div {
        justify-content: flex-end;
        color: var(--white);
        display: flex;
        flex-direction: column;
        gap: var(--s-space);
    }

}

/* -------- QUOTE SECTION  */
section.quote {
    position: relative;

    & line {
        transition: stroke-width ease-in-out 300ms;
        border: 5px solid transparent;
    }

    & figure.svg-stripes svg line:hover {
        stroke-width: 2px;
    }


    & .wrapper {
        display: flex;
        flex-direction: column;
        gap: var(--l-space);
    }

    & h4 {
        max-width: 60%;
    }

    & a.button-light {
        align-self: auto;
    }

    & .svg-stripes {
        position: absolute;
        right: 0;
        bottom: 0;
    }
}

/* ---------- LOGO SECTION */
section.logos {

    & div.wrapper {
        gap: var(--m-space);
    }

    & .splide__track ul {
        display: flex;
        align-items: center;

        & img {
            width: 100px;
            height: auto;
            object-fit: cover;

            &:hover {
                scale: 1.1;
                transition: all .2s ease;
            }
        }
    }

    button.splide__toggle {
        background: none;
        outline: none;
        border: none;
        margin-top: var(--m-space);

        & i {
            color: var(--gray);
            font-size: 1.5rem;
        }
    }
}

/* ------------- FEATURE SECTION  */
section.features {

    & .section-content {
        flex-wrap: wrap;
    }

    & article {
        width: calc(50% - var(--xs-space));
        border: 1px solid var(--orange);
        padding: var(--l-space) var(--s-space);
        display: flex;
        gap: var(--s-space);

        & i::before {
            font-size: 40px;
            color: var(--orange);
        }

        & div.text {
            display: flex;
            flex-direction: column;
            gap: 4px;


            & p.feature-title {
                font-size: 20px;
                font-weight: normal;
                font-style: italic;
                color: var(--orange);
            }

            & hr {
                border: 1px solid var(--orange);
                max-width: 75px;
            }
        }

    }

    & div.gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(6, 200px);
        gap: var(--s-space);
        padding: var(--xl-space);

        & figure img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        & .pic-track {
            grid-row: 1 / span 2;
            grid-column: 1 / span 2;
        }

        & .pic-controls {
            grid-row: 2 / span 3;
            grid-column: 3;
        }

        & .pic-coupling {
            grid-row: 4 / span 2;
            grid-column: 1;
        }

        & .pic-wheels {
            grid-row: 3 / span 2;
            grid-column: 2;
        }

        & .pic-motor {
            grid-row: 5 / span 2;
            grid-column: 2 / span 2;
        }
    }
}

/* ---------- USE CASES SECTION  */
section.useCases {

    & div.section-content {
        flex-direction: column;
        gap: var(--m-space);
    }

    & article.useCase {
        max-width: 50%;
        display: flex;
        flex-direction: column;

        &:nth-of-type(even) {
            align-self: flex-end;
        }

        & h4.quote {
            font-weight: bold;
        }

        & i {
            margin-top: var(--s-space);
            font-weight: lighter;
            font-size: 0.88rem;
            align-self: flex-end;
        }

    }
}

/* ----------- LEGACY SECTION */
section.legacy {

    & div.section-content {
        gap: var(--xl-space);

        & img {
            max-width: 200px;
            height: 100%;
        }

        & article.about-text {
            display: flex;
            flex-direction: column;
            gap: var(--m-space);
        }
    }
}

/* ------------- CONTACT SECTION  */
section.contact {
    form {
        margin: var(--m-space) 0;
        display: flex;
        flex-direction: column;
        gap: var(--m-space);

        & div.first-row {
            display: flex;
            gap: var(--m-space);

            & div {
                width: 100%;
                display: flex;
                flex-direction: column;
                gap: var(--xs-space);
            }
        }

        & div.message {
            display: flex;
            flex-direction: column;
            gap: var(--xs-space);
        }

        & input:not([type=submit]),
        textarea {
            background-color: transparent;
            border: 1px solid var(--orange);
            min-height: 32px;
            color: var(--white);
            padding: var(--xs-space);
            font-family: var(--font-text);
            font-size: 1rem;

            &:hover {
                border: 1px solid var(--white);
            }

            &:focus {
                border: 1px solid var(--white);
                outline: 1px solid var(--white);
            }
        }

        & label {
            color: var(--orange);
            font-weight: lighter;
        }

        & div:not(.first-row):has(input:not([type=submit]):focus,
            textarea:focus) label {
            color: var(--white);
        }
    }
}

/* ------------- FOOTER -------------- */
footer {
    background-color: var(--black);
    display: flex;
    justify-content: space-between;
    ;
    padding: var(--xl-space);
    color: var(--white);
    font-size: 0.8rem;

    & .footer-nav {
        display: flex;
        flex-direction: column;
        gap: var(--m-space);
        font-weight: lighter;

        & p {
            color: var(--orange);

        }

        & ul {
            display: flex;
            gap: var(--m-space);

            & li {
                list-style-type: none;

                & a {
                    color: var(--white);
                }
            }
        }
    }

    & .socials {
        display: flex;
        gap: var(--m-space);

        & i::before {
            color: var(--white);
            width: 1.3rem;
            height: 1.3rem;
        }

        & a:hover i::before {
            color: var(--orange);
        }
    }

    & .copyright {
        color: var(--gray);
        display: flex;
        flex-direction: column;
        gap: var(--s-space);

        & a {
            text-decoration: underline;
            color: var(--gray);
        }

        & address {
            font-style: normal;
        }

    }
}


/* ######## LANDSCAPE TABLET MEDIA QUERY ############ */
@media screen and (max-width: 1030px) {
    section.hero {
        grid-template-columns: 4fr 4fr;
    }

    main>section {
        & .wrapper {
            max-width: 700px;
        }
    }
}

/* ######## TABLET MEDIA QUERY ############ */
@media screen and (max-width: 750px) {

    /* TYPO STYLES FOR MOBILE */
    h1 {
        font-size: 44px;
    }

    h2 {
        font-size: 40px;
        line-height: .83;

        &.title {
            font-size: 48px;
        }
    }

    h3 {
        font-size: 24px;
    }

    h4 {
        font-size: 20px;
        line-height: 1.5;

        &.quote {
            font-size: 30px;
            line-height: unset;
        }
    }

    /* BURGER MENU  */
    header {

        /* Navigation */
        & .nav-burger {
            display: block;
            color: var(--white);
            font-size: 1.4rem;
            cursor: pointer;
        }

        & .nav-burger .close {
            display: none;
        }

        & nav {
            display: none;
            position: fixed;
            top: 0;
            left: 100vw;
            background: var(--black);
            height: 100vh;
            width: 100%;
            align-items: center;
            padding: 0 var(--xl-space);
        }

        & nav ul {
            flex-direction: column;

            & li a {
                font-weight: 500;
                font-size: 28px;
                font-family: var(--font-primary), sans-serif;
            }
        }

        /* Open responsive navigation */
        &.expanded .nav-burger .open {
            display: none;
        }

        &.expanded .nav-burger .close {
            display: block;
        }


        &.expanded nav {
            display: flex;
            animation: .5s burger-menu-in ease-in;
            animation-fill-mode: forwards;
        }
    }

    a.top {
        left: calc(100vw - 66px);
        top: calc(100vh - 66px);
        background-color: var(--black);
    }

    body:has(header.expanded) {
        overflow: hidden;

        & #splide01,
        div.socials {
            visibility: hidden;
            transition: all .3s linear;
        }

        & footer {
            & .copyright {

                & p {
                    position: fixed;
                    width: 225px;
                    top: 90vh;
                    left: 100vw;
                    z-index: 1;
                    animation: .5s burger-menu-footer ease-in;
                    animation-fill-mode: forwards;
                }
            }
        }
    }

    header {
        padding: var(--m-space);
    }

    main>section {
        padding: var(--xl-space) var(--m-space);

        & .wrapper {
            max-width: 100%;

            & .section-content {
                flex-direction: column;
                gap: var(--m-space);
            }
        }
    }

    section.hero {
        background-position: 50% 30%;
        grid-template-columns: 1fr;
        padding: var(--m-space);
        background-size: 100%;
    }

    section.quote {
        & h4 {
            max-width: 100%;
        }

        & .svg-stripes {
            bottom: -80px;

            & svg {
                width: 100vw;
                height: 253px;
            }
        }
    }

    section.features {
        & article {
            width: 100%;
            display: flex;
        }

        & div.gallery {
            grid-template-columns: 1fr;
            grid-template-rows: auto;
            padding: unset;
            margin-top: var(--xl-space);


            & .pic-track,
            .pic-controls,
            .pic-coupling,
            .pic-motor,
            .pic-wheels {
                grid-row: unset;
                grid-column: unset;
            }
        }
    }

    section.useCases {
        & div.section-content {
            & article.useCase {
                max-width: 100%;
                align-self: flex-start;
            }
        }
    }

    section.legacy {
        & div.section-content {
            & img {
                width: 150px;
            }
        }
    }

    section.contact {
        & form {
            & div.first-row {
                display: flex;
                flex-direction: column;
            }
        }
    }

    footer {
        background-color: var(--black);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: var(--xl-space) var(--m-space);
        gap: var(--l-space);

        & .socials {
            order: -1;
        }
    }

    /* remove effect on mobile */
    figure.imageContainer {
        filter: saturate(100%);
    }
}

/* ######## MOBILE MEDIA QUERY ############ */
@media screen and (max-width: 480px) {
    :root {
        font-size: 16px;
    }
}

/* ######## FOR WIDER SCREENS ######### */
@media screen and (min-width: 1500px) {
    section.hero {
        background-size: 45%;
    }
}

/* ####### ULTRA WIDE SCREENS ########## */
@media screen and (min-width: 2000px) {
    section.features {
        max-width: 2200px;
        margin: 0 auto;

        & div.gallery {
            grid-template-rows: repeat(6, 300px);
        }
    }
}


/* ------------------- ANIMATIONS --------------------- */
div.scroll-watcher {
    position: fixed;
    top: 90;
    height: 3px;
    background-color: var(--orange);
    width: 100%;
    z-index: 10;
    scale: 0 1;
    transform-origin: left;
    animation: scroll-watcher linear;
    animation-timeline: scroll();
}


@keyframes scroll-watcher {
    to {
        scale: 1 1;
    }
}

@keyframes burger-menu-in {
    to {
        left: 0;
    }
}

@keyframes burger-menu-footer {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
        left: calc(50vw - 110px);

    }

}


/* Styles for Gallery Mosaik */
.imageContainer {
    position: relative;
    overflow: hidden;
    display: block;
    filter: saturate(90%);
    transition: filter ease 0.5s;
    line-height: 0;
    width: 100%;
}

.imageContainer:hover {
    filter: saturate(120%);
}

.imageContainer .image {
    width: 100%;
    height: auto;
    display: block;
}

.imageContainer canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
}