body {
    --header-height: 80px;

    background-color: var(--colour-background);
    
    &:not(.has-hero) {
        margin-top: calc(var(--header-height) + var(--global-banner-height, 0px));
    }

    &:has(div.gallery > div.browser.active) {
        overflow: hidden;
    }
    
    &:has(#__goio-preview-bar) {
        #__goio-preview-bar p {
            margin-top: 0 !important;
        }

        header {
            margin-top: 45px;
        }
    }
}

a[href="#"] {
    text-decoration: line-through !important;
}

img:not(.plain) {
    border: solid white 9px;
    box-shadow: var(--default-shadow);
}

p {
    margin-top: 22px;
}

button,.button {
    color: white;
    display: block;
    text-decoration: none;

    --button-colour: lime;

    &.primary {
        --button-colour: var(--colour-primary);
    }

    &.secondary {
        --button-colour: var(--colour-secondary);
    }

    background-color: var(--button-colour);
    
    &:hover {
        background-color: color-mix(in srgb, var(--button-colour) 100%, white 20%) !important;
    }

    &:active {
        background-color: color-mix(in srgb, var(--button-colour) 100%, black 20%) !important;
    }
}

div.sticker, a.sticker {
    width: var(--sticker-size);
    height: var(--sticker-size);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Domine', sans-serif;
    font-size: 1.1rem;
    margin-left: auto;
    margin-right: auto;
    color: white;
    text-align: center;

    &.primary {
        background-color: var(--colour-primary);
    }

    &.secondary {
        background-color: var(--colour-secondary);
    }

    &::after {
        content: '';
        position: relative;
        width: 50%;
        height: 1px;
        margin-top: 8px;
        border-top: solid white 2px;
    }

    span {
        display: block;
    }
}

div.wrapper {
    max-width: 1200px;
    padding-left: 22px;
    padding-right: 22px;
    margin: 0 auto;

    &.page {
        max-width: 850px;
    }
}

div.section {
    &.brand-secondary {
        background-color: var(--colour-secondary-compliment);
        box-shadow: var(--default-shadow);
    }

    &.header {
        --headerHeight: 500px;
        padding-left: 22px;
        padding-right: 22px;

        height: var(--headerHeight);
        max-width: 1500px;
        margin: 0 auto;
        margin-top: -22px;
        margin-bottom: 66px;
        box-shadow: var(--default-shadow);
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 22px;
        position: relative;
    
        h1 {
            font-size: 2.8rem;
        }
    
        hr {
            width: 100px;
            background-color: black;
        }
    
        p {
            margin-top: 44px;
        }

        img {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: var(--headerHeight);
            width: 100%;
            object-fit: cover;
            z-index: -1;
            opacity: 0.3;
        }
    }
}

body.has-hero {
    header {
        display: none;
    }
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--colour-primary);
    color: white;
    box-shadow: var(--default-shadow);
    z-index: 999;

    > div.wrapper {
        display: flex;
        height: var(--header-height);
        align-items: center;

        justify-content: space-between;

        a.brand {
            color: white;
            text-decoration: none;

            div.title {
                font-size: 1.1rem;
                text-align: center;
                span {
                    display: block;
                }
            }
        }

        nav {
            display: flex;
            gap: 44px;

            a {
                color: white;
                text-decoration: none;
                font-family: 'Domine';
            }
        }
    }

    &.over-hero {
        box-shadow: none;

        @media (min-width: 768px) {
            > div.wrapper {
                justify-content: center;
            }
        }

        &:not(:has(.menu-active)) {
            @media (max-width: 768px) {
                background-color: transparent !important;
            }
        
            a.brand {
                display: none;
            }
        }
    }

    div.menu {
        display: none;
        position: relative;

        &::before {
            content: '';
            position: absolute;
            top: -20px;
            left: -20px;
            right: -20px;
            bottom: -10px;
            background-color: var(--colour-primary);
            z-index: -1;
        }

        svg {
            fill: white;
            width: 30px;
            height: auto;
            display: block;
            margin: 0 auto;

            &.open {
                display: none;
            }
        }
    }

    div.wrapper.menu-active {
        div.menu {
            svg {
                &.open {
                    display: block;
                }

                &.closed {
                    display: none;
                }
            }
        }

        nav {
            display: flex !important;
            position: absolute;
            top: var(--header-height);
            left: 0;
            right: 0;
            padding: 22px;
            background-color: white;
            flex-direction: column;
            gap: 22px;
            align-items: center;
            box-shadow: var(--layout-shadow);

            a.nav-item {
                color: black;
            }
        }
    }

    @media (max-width: 768px) {
        div.wrapper {
            justify-content: space-between;
            flex-direction: row-reverse;
        }

        nav {
            display: none !important;
        }

        div.menu {
            display: block;
        }

        div.global-banner {
            svg {
                display: none;
            }
        }
    }

    
    div.global-banner {
        background-color: var(--colour-secondary);

        > div.wrapper {
            display: flex;
            gap: 22px;
            align-items: center;
            padding-top: 18px;
            padding-bottom: 18px;
            justify-content: center;

            svg {
                max-height: 30px;
                fill: white;
            }

            p {
                margin-top: 0;
                text-align: center;
                font-weight: bold;
            }
        }
    }

}
footer {
    background-color: var(--colour-primary);
    color: white;
    padding: 66px;

    div.cols {
        display: flex;
        flex-wrap: wrap;

        div.left {
            max-width: 500px;
            width: 100%;
            text-align: center;

            p.title {
                font-size: 2.6rem;
            }

            hr {
                width: 200px;
                margin: 11px auto;
            }

            p.subtitle {
                font-size: 1.4rem;
            }
        }

        div.right {
            max-width: 500px;
            width: 100%;
            margin-top: 44px;

            hr {
                background-color: transparent;
                border: none;
                height: 22px;
            }

            nav {
                text-align: right;

                @media (max-width: 768px) {
                    text-align: center;
                }

                a {
                    display: block;
                    color: white;
                    text-decoration: none;
                }
            }
        }
    }

    p.made-with-love {
        margin-top: 44px;
        text-align: center;
        a {
            color: white;
        }
    }

    @media (max-width: 768px) {
        padding: 11px;
    }
}