:root {
    --colourBackground: #7EB0AD;
    --colourPrimary: #3A7E57;
    --colourSecondary: #E5C423;
    --colourTertiary: #4c317d;

    --layoutWidth: 1400px;
}

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

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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    > main {
        flex-grow: 1;
    }

    background-color: var(--colourBackground);
    font-family: 'Fredoka', serif;
    font-size: 16px;

    div.wrapper {
        max-width: var(--layoutWidth);
        padding-left: 22px;
        padding-right: 22px;
        margin: 0 auto;
    }
    
    header {
        div.image {
            height: 70vh;
            background-image: var(--imageUrl);
            background-repeat: no-repeat;
            background-size: cover;
            background-position: var(--imagePosition, bottom);

            &.slim {
                height: 40vh;
            }
        }

        div.wrapper { 
            display: flex;
            justify-content: flex-end;

            a.brand {
                --brandWidth: 350px;

                display: block;
                width: var(--brandWidth);
                margin-top: -22px;
                position: absolute;

                background-image: url("../images/components/logo-blob-a8DKhBe.png");
                background-repeat: no-repeat;
                background-position: center;
                background-size: contain;

                display: flex;
                place-content: center;

                img {
                    width: calc(var(--brandWidth) * 0.8);
                }
            }
        }
    }

    section {
        position: relative;

        &.break {
            background-color: var(--colourTertiary);
            --topHeight: 100px;
            --bottomHeight: 100px;
            padding-top: 22px;
            padding-bottom: 22px;
            margin-bottom: var(--bottomHeight);

            &::before, &::after {
                content: ' ';
                position: absolute;
                left: 0;
                right: 0;
                background-repeat: no-repeat;
                background-size: cover;
                background-position: center;
            }

            &::before {
                top: calc(0px - var(--topHeight));
                height: var(--topHeight);
                background-image: url("../images/components/section-top-As4JhgM.svg");
            }

            &::after {
                bottom: calc(0 - var(--bottomHeight));
                height: var(--bottomHeight);
                background-image: url("../images/components/section-bottom-Uugr6w-.svg");
            }

            > div {
                position: relative;
                z-index: 100;
            }
        }
    }

    button,.button {
        --buttonColour: red;

        &.primary {
            --buttonColour: var(--colourPrimary);
        }

        &.secondary {
            --buttonColour: var(--colourSecondary);
        }
    
        background-color: var(--buttonColour);
        display: flex;
        place-content: center;
        text-decoration: none;
        color: white;
        padding-left: 44px;
        padding-right: 44px;
        padding-top: 9px;
        padding-bottom: 9px;
        border-radius: 18px;
        border: none;
        cursor: pointer;

        --hoverColour: color-mix(in srgb, var(--buttonColour) 80%, black);
        &:hover {
            background-color: var(--hoverColour);
        }

        --activeColour: color-mix(in srgb, var(--buttonColour) 50%, black);
        &:active {
            background-color: var(--activeColour);
        }
    }

    .card {
        padding: 44px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1297 428' preserveAspectRatio='none'%3E%3Cpath d='M52.6948 48.7839C97.3272 -0.648357 1176.19 -30.2152 1252.69 48.7839C1329.19 127.783 1290.48 283.784 1252.69 363.784C1214.91 443.784 144.695 453.783 52.6948 363.784C-39.3052 273.784 8.06236 98.2162 52.6948 48.7839Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: 100% 100%;
        background-position: center;
        object-fit: fill;
    }

    footer {
        div.cityscape {
            height: 350px;
            background-image: url("../images/components/footer-cityscape-6gli2Dt.png");
            background-repeat: no-repeat;
            background-position: center bottom;

        }

        div.roadway {
            --roadHeight: 146px;

            background-image: url("../images/components/footer-road-yMOieW0.png");
            background-repeat: repeat-x;
            height: 146px;

            overflow-x: hidden;
            position: relative;

            img.car {
                position: absolute;

                &.drive-left {
                    bottom: 0;
                    z-index: 20;
                }

                &.drive-right {
                    bottom: 50px;
                    z-index: 10;
                }

                &:not(.ready) {
                    display: none;
                }
            }
        }

        div.content {
            padding-top: 22px;
            padding-bottom: 22px;
            background-color: var(--colourTertiary);
            color: white;

            div.wrapper:has(.main) {
                display: flex;
                align-items: center;

                img {
                    width: 100%;
                    max-width: 300px;
                }

                div.main {
                    div.links {
                        display: flex;
                        flex-direction: column;
                        gap: 22px;

                        div.row {
                            display: flex;
                            gap: 22px;
                            justify-content: center;

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

                                span {
                                    font-weight: normal;
                                }
                            }
                        }
                    }

                    p.text {
                        font-size: 1rem;
                        margin-top: 44px;
                    }

                    p.tn {
                        margin-top: 44px;
                        text-align: center;

                        a {
                            color: white;
                        }
                    }
                }
            }
        }

        @media (max-width: 768px) {
            div.content > div.wrapper {
                flex-direction: column;

                div.links > div.row {
                    flex-direction: column;
                    align-items: center;
                }
            }
        }
    }
}

section.how-why {
    margin-top: 44px;

    > div.wrapper {
        display: flex;
        gap: 22px;
        max-width: 1000px;

        @media (max-width: 768px) {
            flex-direction: column-reverse;

            div.why li {
                flex-direction: row !important;
                text-align: left !important;
            }

            div.how {
                padding-left: 44px;
                padding-right: 44px;
            }
        }

        ul {
            list-style-type: none;
            padding-left: 0;

            li {
                display: flex;
                align-items: center;
                gap: 22px;
                margin-top: 22px;

                div.badge {
                    flex-shrink: 0;
                    border-radius: 50%;
                    background-color: white;
                    width: 60px;
                    height: 60px;
                    display: flex;
                    justify-content: center;   
                    align-items: center;
                    font-weight: bold;
                    font-size: 1.6rem;
                }

                > div {
                    p.title {
                        font-weight: bold;
                    }
                }
            }
        }

        h3 {
            
            text-align: center;
            font-size: 1.4rem;
        }

        div.how {
            padding-top: 44px;
        }

        div.why {
            ul {
                li {
                    flex-direction: row-reverse;
                    text-align: right;

                    div.badge {
                        background-color: var(--colourPrimary);
                        svg {
                            width: 60%;
                        }
                    }
                }
            }
        }
    }
}

div.places {
    display: flex;
    flex-direction: column;
    gap: 22px;

    article {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 22px;

        .read-more {
            color: black;
            text-decoration: none;
            display: flex;
            gap: 8px;
            justify-content: center;
            align-items: center;

            svg {
                fill: black;
            }
        }

        .read-more.thin {
            display: none;
        }

        > img {
            width: 250px;
            padding: 25px;
            transform: rotate(-4deg);
            aspect-ratio: 1/1;
            object-fit: cover;
        }

        > div {
            flex-grow: 1;
            div.top {
                display: flex;
                gap: 22px;
                justify-content: space-between;

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

                    div.badges {
                        display: flex;
                        flex-wrap: wrap;
                        gap: 8px;

                        span.badge {
                            background-color: var(--colourPrimary);
                            color: white;
                            border-radius: 11px;
                            padding-left: 11px;
                            padding-right: 11px;
                            padding-top: 5px;
                            padding-bottom: 5px;
                            text-align: center;
                        }
                    }
                }
            }

            p.description {
                margin-top: 22px;
            }
        }

        @media (max-width: 768px) {
            img {
                display: none;
            }

            .read-more {
                &.thin {
                    margin-top: 22px;
                    display: flex;
                    text-align: center;
                }

                &.wide {
                    display: none;
                }
            }
        }
    }
}

form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 9px;

    div.input {
        &:not(.checkbox) {
            label {
                font-weight: bold;
                display: block;
            }

            input, textarea {
                width: 100%;
                border: none;
                background-color: rgb(233, 233, 233);
                border-bottom: solid black 1px;
                font-size: 1rem;
                padding: 9px;
            }
        }

        &.checkbox {
            display: flex;
            align-items: center;
            gap: 18px;
        }
    }

    > button {
        width: fit-content;
        margin-left: auto;
        margin-right: 0;
    }

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

@keyframes rotation-anim {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: rotation-anim 1s infinite linear;
}

body:has(div.buy-the-card.open) {
    overflow: hidden;
}

div.buy-the-card {
    &:not(.open) {
        display: none;
    }

    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;

    div.card {
        height: fit-content;
        max-width: 1000px;
        width: 100%;
        padding: 66px;
        position: relative;

        display: flex;
        align-items: center;
        gap: 44px;

        div.decorator {
            max-width: 300px;
            width: 100%;

            img {
                border-radius: 18px;
                transform: rotate(-4deg);
            }
        }

        div.content {    
            max-height: calc(90vh - 88px);
            overflow-y: auto;
            
            p.title {
                font-size: 1.6rem;
                font-weight: bold;
            }

            p.subtitle {
                font-weight: bold;
                text-align: left;
                margin-bottom: 0;
            }

            p:not(:first-of-type) {
                margin-top: 22px;
            }

            p.price {
                text-align: center;
                font-size: 1.4rem;
                font-weight: bold;
            }

            div.buttons {
                display: flex;
                gap: 22px;
                justify-content: center;
                flex-wrap: wrap;

                a.button {
                    min-width: fit-content;
                    text-align: center;
                }
            }
        }

        svg.close {
            position: absolute;
            top: 66px;
            right: 66px;
            width: 30px;
            cursor: pointer;

            &:hover {
                opacity: 0.8;
            }
        }

        @media (max-width: 768px) {
            padding-top: 88px;
            padding-bottom: 88px;

            div.decorator {
                display: none;
            }

            div.buttons {
                flex-direction: column-reverse;
            }
        }
    }
}

div.brand {
    width: 150px;
    height: 150px;
    flex-shrink: 0;

    background-color: var(--brandLogoBackgroundColour, silver);
    background-image: var(--brandLogoUrl);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}