/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* Lenis Scroll Support */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
    overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] {
    overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

.lenis.lenis-autoToggle {
    transition-property: overflow;
    transition-duration: 1ms;
    transition-behavior: allow-discrete;
}

/* Layout */
img {
    -webkit-user-drag: none;
}

/* Components */

/* Animation Settings */
body.bricks-is-frontend {
    #hero svg,
    #hero h1,
    .inview-stagger > *,
    .section-title > * {
        opacity: 0;
        will-change: opacity;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.bricks-is-frontend {
        #hero svg,
        #hero h1,
        .inview-stagger-item > *,
        .section-title > * {
            opacity: 1 !important;
            will-change: unset !important;
        }
    }
}

body.bricks-is-frontend #project-gallery {
    @media (prefers-reduced-motion: no-preference) {
        .project-header {
            position: sticky;
            top: 75%;
            height: 0;
            z-index: 0;
        }

        .project-logo-wrapper {
            transform: translateY(-100%);
        }
    }

    .project-feature-images {
        margin-top: 100svh
    }
}


/* Components Settings*/
.split-wrapper {
    text-indent: 8ch;
}

section#rooms {
    ul.brxe-list {
        li a {
            padding: 0 .5rem;
            border-radius: var(--radius-xl);
            transition: color .15s ease-out, background-color .15s ease-out;

            &:hover {
                color: var(--color-primary);
            }
        }

        li a.active {
            background-color: var(--color-white);
            color: var(--color-primary);
        }
    }

    .card-room:not(:last-of-type) {
        padding-bottom: var(--space-2)
    }

    article {
        scroll-margin-top: var(--space-1);
    }

    @media (min-width: 479px) {
        article {
            scroll-margin-top: var(--space-4);
        }
    }

    @media (min-width: 992px) {
        article {
            scroll-margin-top: var(--space-5);
        }
    }

    @media (min-width: 1281px) {
        article {
            scroll-margin-top: var(--space-4);
        }
    }

    @media (max-width: 991px) {
        ul.brxe-list {
            flex-wrap: wrap;
            backdrop-filter: blur(4px);
            background-color: oklch(0.97 0.005 95.1 / .8);
        }
    }
}

#initiativen {
    .card {
        box-shadow: 0 2px 4px #2222220d;
        transition: transform .3s ease-in-out, box-shadow .3s ease-out;

        &:hover {
            box-shadow: 0 4px 6px #2222220d;
        }
    }
}

body.bricks-is-frontend #initiativen {
    @media (hover: hover) {
        ul.brx-grid {
            li img {
                transition: scale .3s ease-out;
            }

            li:not(:last-child) .brxe-icon {
                opacity: 0;
                transition: opacity .3s ease-in-out;
            }

            li figure {
                overflow: clip;
            }

            li:not(:last-child) {
                &:hover > figure img {
                    scale: 1.03;
                }

                &:hover > .brxe-icon {
                    opacity: 1;
                }
            }
        }
    }
}

#struktur .team-member-list {
    .team-member-card img {
        filter: saturate(0%);
        transition: filter .15s ease-out;
    }
}

body.bricks-is-frontend #struktur .team-member-list {
    .team-member-card {
        z-index: 0;

        img {
            filter: saturate(0%);
            transition: filter .15s ease-out;
        }

        .team-member-info {
            transform: translateY(-50%);
            clip-path: inset(0 0 100% 0);
            transition: transform .25s ease-out, clip-path .25s ease-out;
        }

        &:hover {
            z-index: 10;
        }

        &:hover > div img {
            filter: saturate(100%);
        }

        &:hover > .team-member-info {
            transform: translateY(0);
            clip-path: inset(0);
        }
    }
}


header#brx-header {
    position: fixed;
    top: 0;
    z-index: 1000;
    pointer-events: none;

    .brxe-nav-nested {
        pointer-events: all;

        ul.brx-nav-nested-items {
            box-shadow: 0 4px 6px #2222220d;
        }

        /* Nav Menu Toggle  */

        button.brxe-toggle {
            box-shadow: 0 2px 4px #2222220d;
            transition: color .15s ease-out, background-color .15s ease-out, box-shadow .15s ease-out;

            svg path {
                transition: d 0.15s ease-out;
            }

            &.is-active {
                box-shadow: none;

                svg {
                    path:first-child {
                        d: path("M 6 6 L 18 18");
                    }

                    path:last-child {
                        d: path("M 6 18 L 18 6");
                    }

                }
            }

            &:hover {
                background-color: var(--color-accent-3);
                box-shadow: 0 2px 4px #2222220d;
            }
        }

        /*  Main Nav Body */

        .nav-menu-body ul {
            flex-wrap: wrap;

            li a {
                padding: .375rem .75rem;
                background-color: var(--bricks-color-grey-300);
                border-radius: 2rem;
                transition: color .15s ease-out, background-color .15s ease-out;

                &:hover {
                    background-color: var(--color-accent-3);
                }
            }
        }

        /*  Main Nav Body */

        .nav-menu-footer {
            ul {
                display: grid;
                gap: .75rem 1.5rem;

                li a {
                    span {
                        text-decoration: underline;
                        text-decoration-color: oklch(from var(--color-black) l c h / 0);
                        -webkit-text-decoration-color: oklch(from var(--color-black) l c h / 0);

                        text-decoration-thickness: .07em;
                        text-underline-offset: .175em;
                        transition: color .15s ease-out, text-decoration-color .15s ease-out;
                    }

                    &:hover > span {
                        text-decoration-color: oklch(from var(--color-black) l c h / 1);
                        -webkit-text-decoration-color: oklch(from var(--color-black) l c h / 1);
                    }

                    &:hover > svg {
                        text-decoration-color: oklch(from var(--color-black) l c h / 1);
                    }
                }
            }

            @media (min-width: 478px) {
                ul {
                    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

                }
            }
        }

    }
}

/* Link Styles */

main .brxe-text a,
footer aside a {
    text-decoration-thickness: .07em;
    text-underline-offset: .175em;
    transition: color .15s ease-out, text-decoration-color .15s ease-out;
}

main .brxe-text a {
    text-decoration: underline oklch(from var(--color-black) l c h / 1);
    -webkit-text-decoration: underline oklch(from var(--color-black) l c h / 1);

    &:hover {
        color: oklch(from var(--color-black) l c h / .8);
        text-decoration: underline oklch(from var(--color-black) l c h / 0.2);
        -webkit-text-decoration: underline oklch(from var(--color-black) l c h / 0);
    }
}

main a.bricks-background-primary {
    transition: color .15s ease-out, background-color .15s ease-out;

    &:hover {
        background-color: var(--color-accent-3) !important;
        color: var(--color-black) !important;
    }
}

footer {
    aside a {
        text-decoration: underline oklch(from var(--color-black) l c h / 0);
        -webkit-text-decoration: underline oklch(from var(--color-black) l c h / 0);

        &:hover {
            text-decoration: underline oklch(from var(--color-black) l c h / .8);
            -webkit-text-decoration: underline oklch(from var(--color-black) l c h / 1);
        }
    }

    nav a {
        /*&:hover {
            color: oklch(from var(--color-primary) l c h / 1);
            text-decoration-color: oklch(from var(--color-black) l c h / .35);
            -webkit-text-decoration-color: oklch(from var(--color-black) l c h / .35);
        }*/
    }
}

/* Page Templates */

body.page-standard main {
    p {
        margin-bottom: 1em;
    }

    h2 {
        margin-top: 1.25em;
        margin-bottom: .5em;
    }

    h3, h4, h5, h6 {
        margin-top: .875em;
        margin-bottom: .375em;
    }

    a {
        text-decoration-thickness: .07em;
        text-underline-offset: .175em;
        transition: color .15s ease-out, text-decoration-color .15s ease-out;
        text-decoration: underline oklch(from var(--color-black) l c h / 1);
        -webkit-text-decoration: underline oklch(from var(--color-black) l c h / 1);

        &:hover {
            color: oklch(from var(--color-black) l c h / .8);
            text-decoration: underline oklch(from var(--color-black) l c h / 0.2);
            -webkit-text-decoration: underline oklch(from var(--color-black) l c h / 0);
        }
    }
}

/* Utility Classes */
.card-rotate-z-0-75n {
    transform: rotateZ(359.25deg);

    &:hover {
        transform: rotateZ(360deg);
    }
}

.card-rotate-z-1n {
    transform: rotateZ(359deg);

    &:hover {
        transform: rotateZ(360deg);
    }
}

.card-rotate-z-1-5n {
    transform: rotateZ(358.5deg);

    &:hover {
        transform: rotateZ(360deg);
    }
}

.card-rotate-z-0-75 {
    transform: rotateZ(0.75deg);

    &:hover {
        transform: rotateZ(0deg);
    }
}

.card-rotate-z-1 {
    transform: rotateZ(1deg);

    &:hover {
        transform: rotateZ(0deg);
    }
}

.card-rotate-z-1-5 {
    transform: rotateZ(1.5deg);

    &:hover {
        transform: rotateZ(0deg);
    }
}


/* Accessibility */

a, button {
    &:focus-visible {
        outline-offset: 1px;
        outline: 2px solid var(--color-black);
    }
}
