@font-face {
    font-family: 'Open Sans';
    src: url('https://cdn.taurusnetwork.uk/static/fonts/OpenSans/OpenSans-Regular.ttf') format('truetype');
    font-weight: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('https://cdn.taurusnetwork.uk/static/fonts/OpenSans/OpenSans-Bold.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'Open Sans';
    src: url('https://cdn.taurusnetwork.uk/static/fonts/OpenSans/OpenSans-Italic.ttf') format('truetype');
    font-style: italic;
}

html {
    font-size: 16px;

    --colour-background: #EFEFEF;
    --colour-black: #161616;
    --colour-brand-primary: #A27236;
    --colour-brand-secondary: #D9C7B1;
    --colour-brand-tertiary: #D7D5D2;

    --layout-max-width: 1400px;
    --layout-gutter: 14px;
    --layout-section-gap: 56px;

    --box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--colour-background);

    main {
        display: flex;
        flex-direction: column;
        gap: var(--layout-section-gap);
    }

    &:has(dialog[open]) {
        overflow: hidden;
    }
}

button, .button {
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: bold;
    border: none;
    cursor: pointer;

    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    --text-colour: black;
    --bg-colour: lime;
    --bg-hover-colour: color-mix(in srgb, var(--bg-colour) 80%, black);
    --bg-active-colour: color-mix(in srgb, var(--bg-colour) 50%, black);

    &.primary {
        --text-colour: white;
        --bg-colour: var(--colour-brand-primary);
    }

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

    &.tertiary, &.plain {
        --bg-colour: var(--colour-brand-tertiary);
    }

    &.plainest {
        --bg-colour: transparent;
    }

    color: var(--text-colour);
    background-color: var(--bg-colour);

    &:hover {
        background-color: var(--bg-hover-colour);
    }

    &:active {
        background-color: var(--bg-active-colour);
    }
}

label.input {
    display: flex;
    flex-direction: column;
    gap: 4px;

    span {
        font-weight: bold;
        text-transform: uppercase;
    }

    input, textarea {
        border-radius: 0;
        border: solid 1px var(--colour-brand-primary);
        padding: 4px;
        height: 50px;
        resize: vertical;
    }

    &:has(input[type="checkbox"]) {
        flex-direction: row;
        align-items: center;

        input[type="checkbox"] {
            margin-right: var(--layout-gutter);
            width: 30px;
            height: 30px;
            border-radius: 0;
            border: solid 1px var(--colour-brand-primary);
            padding: 0;
        }
    }
}

div.input-row {
    display: flex;
    gap: var(--layout-gutter);
    align-items: center;

    > * {
        flex: 1;
    }
}

form {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gutter);
}

div.break {
    background-color: var(--colour-brand-primary);
    height: 22px;
    width: 100%;
}

section {
    > div.content-strip {
        background-color: white;
        padding: var(--layout-gutter);
        box-shadow: var(--box-shadow);
        margin-top: 7px;
        width: 100%;
    }
}

.container, .contained {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0 var(--layout-gutter);
}

header {
    background-color: var(--colour-black);
    color: white;
    box-shadow: var(--box-shadow);
    transition: max-height 0.5s ease-in-out;
    max-height: 136px;
    height: 100%;
    overflow: hidden;
    width: 100%;
    z-index: 1000;
    position: fixed;

    div.container {
        padding: calc(var(--layout-gutter) * 2);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--layout-gutter);

        a.brand {
            img {
                height: 80px;
            }
        }
    }
}

body:has(section.hero) {
    header {
        max-height: 0;
    }

    &.scrolled {
        header {
            max-height: 136px;
        }
    }
}

footer {
    margin-top: var(--layout-section-gap);
    background-color: var(--colour-black);
    color: white;

    div.container {
        padding: var(--layout-gutter);
        padding-top: 28px;

        div.top {
            display: flex;
            justify-content: space-between;
            gap: var(--layout-gutter);
            margin-bottom: 28px;

            p.headline {
                font-size: 1.8rem;
            }

            p.subtitle {
                font-size: 1.2rem;
                font-style: italic;
            }

            div.cta {
                text-align: right;
                display: flex;
                flex-direction: column;
                gap: 7px;
                align-items: flex-end;
            }
        }

        div.middle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: var(--layout-gutter);

            nav {
                display: flex;
                flex-direction: column;
                margin-bottom: 28px;

                a {
                    color: white;
                    text-decoration: none;
                    font-size: 1.2rem;
                    font-weight: bold;

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

            div.legal {
                margin-top: var(--layout-gutter);
                max-width: 850px;
                font-size: 0.9rem;

                p {
                    margin-bottom: var(--layout-gutter);

                    &.important {
                        font-weight: bold;
                        font-size: 1.1rem;
                    }
                }
            }

            div.opening-times {
                flex-shrink: 0;
                text-align: right;

                p.title {
                    font-weight: bold;
                }

                div.day {
                    display: flex;
                    gap: 7px;
                    align-items: center;
                    justify-content: flex-end;

                    p.day-name {
                        font-weight: bold;
                    }
                }
            }
        }

        div.bottom {
            text-align: center;
            width: 100%;
            font-size: 0.8rem;

            img {
                width: 500px;
                margin: 0 auto;
            }

            a {
                color: white;
                font-weight: bold;
            }
        }

        @media (max-width: 900px) {
            div.top {
                flex-direction: column;
                justify-content: center;
                text-align: center;

                div.cta {
                    align-items: center;

                    p.free-consultation-text {
                        font-size: 0.8rem;
                    }
                }
            }

            div.middle {
                flex-direction: column-reverse;

                nav {
                    margin-top: var(--layout-gutter);
                    * {
                        text-align: center;
                    }
                }
            }
        }
    }
}

dialog.enquiry-flow {
    margin: auto;
    max-width: 800px;
    width: 100%;
    border: none;
    border-radius: 8px;
    position: fixed;

    div.loader {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(0, 0, 0, 0.5);
    
        svg {
            width: 125px;
            height: 125px;
            fill: white;
            animation: loading 2s infinite linear;
            transform-origin: center center;
        }
    }

    &:not(.loading) {
        div.loader {
            display: none !important;
        }
    }

    &::backdrop {
        background-color: rgba(0, 0, 0, 0.7);
    }
    
    div.top {
        display: flex;
        gap: var(--layout-gutter);
        align-items: center;
        justify-content: space-between;

        p.title {
            font-size: 1.4rem;
            font-weight: bold;
        }
    }

    form {
        div.cf-turnstile {
            display: block;
            width: fit-content;
            margin: 0 auto;
        }
    }

    div.stage {
        &:not(.active) {
            display: none !important;
        }

        margin-top: var(--layout-gutter);

        &.success, &.error {
            padding: var(--layout-gutter);
            display: flex;
            gap: var(--layout-gutter);
            align-items: center;
            justify-content: space-between;

            svg {
                width: 40px;
                height: 40px;
                margin: 0;
                fill: white;
            }
            
            &.success {
                background-color: var(--colour-brand-primary);
                color: white;
            }

            &.error {
                background-color: rgb(128, 28, 28);
                color: white;
            }

            div {
                p.title {
                    font-size: 1.4rem;
                    font-weight: bold;
                }
                
                > *:not(:first-child) {
                    margin-top: 7px;
                }
            }
        }
    }
    
}

@keyframes loading {
    0% {
        transform: rotate(0)
    }

    to {
        transform: rotate(360deg)
    }
}