header {
    height: 100px;

    div.container {
        display: flex;
        justify-content: space-between;
        align-items: center;

        a.brand {
            flex-shrink: 0;

            img {
                height: 100px;

                &.mobile {
                    display: none;
                }
            }

            @media (max-width: 1100px) {
                img.mobile {
                    display: block;
                }

                img:not(.mobile) {
                    display: none;
                }
            }
        }

        div.actions {
            display: flex;
            gap: var(--layout-spacing);
            align-items: center;

            nav {
                font-weight: bold;
                
                display: flex;
                gap: var(--layout-spacing);
                align-items: center;

                a {
                    position: relative;
                    text-decoration: none;
                    color: black;

                    &.current {
                        &::after {
                            content: ' ';
                            position: absolute;
                            bottom: -2px;
                            left: 0;
                            right: 0;
                            height: 2px;
                            background-color: var(--primary-colour);
                        }
                    }
                }
            }

            @media (max-width: 930px) {
                a.button.secondary {
                    display: none;
                }
            }

            @media (max-width: 800px) {
                a.button.primary {
                    display: none;
                }
            }
        }

        button.menu-toggle {
            --bg-colour: var(--background-colour);
            --bg-hover-colour: var(--primary-accent-colour);
            --bg-active-colour: color-mix(in srgb, var(--primary-colour) 20%, var(--background-colour));
            --text-colour: #506642;

            width: 48px;
            height: 48px;
            padding: 0;
            border-radius: 12px;
            flex-shrink: 0;

            &:focus-visible {
                outline: solid 2px #506642;
                outline-offset: 4px;
            }

            span.menu-icon {
                position: relative;
                display: block;
                width: 22px;
                height: 18px;

                > span {
                    position: absolute;
                    left: 0;
                    right: 0;
                    top: 8px;
                    height: 2px;
                    border-radius: 2px;
                    background-color: currentColor;

                    &:first-child {
                        top: 0;
                    }

                    &:last-child {
                        top: 16px;
                    }

                    @media (prefers-reduced-motion: no-preference) {
                        transition: transform 180ms ease, opacity 180ms ease;
                    }
                }
            }
        }

        @media (max-width: 700px) {
            background-color: var(--background-offset-colour);

            div.actions {
                display: none;
            }

            button.menu-toggle {
                display: flex !important;
            }
        }

        div.backdrop, button.menu-toggle {
            display: none;
        }
    }

    &.expanded {
        button.menu-toggle span.menu-icon > span {
            &:first-child {
                transform: translateY(8px) rotate(45deg);
            }

            &:nth-child(2) {
                opacity: 0;
                transform: scaleX(0);
            }

            &:last-child {
                transform: translateY(-8px) rotate(-45deg);
            }
        }

        div.actions {
            padding: var(--layout-spacing);
            background-color: var(--background-colour);

            display: flex !important;
            flex-direction: column;
            gap: var(--layout-spacing);
            align-items: center;

            nav {
                display: flex;
                flex-direction: column;
                gap: var(--layout-spacing);
                align-items: center;
            }

            a.button {
                display: block !important;
            }

            position: absolute;
            top: 100px;
            left: 0;
            right: 0;
            z-index: 101;
        }

        div.backdrop {
            display: block !important;
            position: absolute;
            top: 100px;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 100;
        }
    }
}

footer {
    background-color: var(--background-offset-colour);
    border-top: solid 1px var(--primary-accent-colour);
    padding-top: var(--layout-gutter);
    color: #2A2A2A;

    a:not(.button) {
        color: inherit;
        text-decoration: underline;
        text-decoration-color: transparent;
        text-underline-offset: 4px;

        &:hover, &:focus-visible {
            color: #506642;
            text-decoration-color: currentColor;
        }
    }

    a:focus-visible {
        outline: solid 2px var(--primary-colour);
        outline-offset: 4px;
    }

    div.container {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr) 300px;
        align-items: start;
        gap: var(--layout-section-gap);
        padding-bottom: var(--layout-section-gap);

        div.brand {
            img {
                width: 180px;
                margin-bottom: var(--layout-spacing);
            }

            p {
                font-size: 0.95rem;
                line-height: 1.7;
            }
        }

        div.links {
            display: flex;
            gap: var(--layout-section-gap);
            padding-top: var(--layout-spacing);

            div.col {
                flex: 1;
                min-width: 0;

                &:first-child {
                    flex: 2;
                }

                p.title {
                    font-weight: bold;
                    font-size: 0.85rem;
                    letter-spacing: 0.08em;
                    text-transform: uppercase;
                    margin-bottom: var(--layout-spacing);
                }

                ul {
                    list-style: none;
                    padding-left: 0;
                    display: flex;
                    flex-direction: column;
                    gap: 12px;

                    a {
                        overflow-wrap: anywhere;
                        line-height: 1.6;
                    }
                }
            }
        }

        div.actions {
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding: var(--layout-spacing);
            border-radius: 14px;
            border: solid 1px color-mix(in srgb, var(--primary-colour) 25%, transparent);
            background-color: var(--primary-accent-colour);

            div.content {
                p.title {
                    font-weight: bold;
                    font-size: 1.15rem;
                    margin-bottom: 7px;
                }

                p:not(.title) {
                    font-size: 0.9rem;
                    line-height: 1.6;
                }
            }

            a.button {
                width: 100%;
            }
        }
    }

    div.legal {
        max-width: var(--layout-header-footer-width);
        margin: 0 auto;
        padding: var(--layout-spacing) var(--layout-gutter);
        border-top: solid 1px color-mix(in srgb, var(--primary-colour) 25%, transparent);
        display: flex;
        justify-content: space-between;
        gap: var(--layout-spacing);
        font-size: 0.8rem;
        line-height: 1.7;

        p.tn {
            flex-shrink: 0;
        }
    }

    @media (prefers-reduced-motion: no-preference) {
        a:not(.button) {
            transition: color 180ms ease, text-decoration-color 180ms ease;
        }
    }

    @media (max-width: 1100px) {
        div.container {
            grid-template-columns: 200px minmax(0, 1fr);

            div.actions {
                grid-column: 1 / -1;
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto auto;
                align-items: center;
            }
        }

        div.legal {
            flex-direction: column;
            gap: 7px;
        }
    }

    @media (max-width: 768px) {
        div.container {
            grid-template-columns: minmax(0, 1fr);
            gap: var(--layout-spacing);

            div.brand {
                max-width: 350px;
            }

            div.links {
                padding-top: 0;
                gap: var(--layout-spacing);
                flex-direction: column;
            }

            div.actions {
                display: flex;
            }
        }

        div.legal p.tn {
            flex-shrink: 1;
        }
    }
}

figure.captioned-image {
    border-radius: 14px;
    overflow: hidden;
    background-color: var(--primary-accent-colour);

    img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    figcaption {
        padding: 16px var(--layout-spacing);
        font-size: 0.9rem;
        color: #506642;
    }
}

p.check {
    display: flex;
    align-items: center;
    gap: 4px;

    &::before {
        content: ' ';
        display: inline-block;
        width: 24px;
        height: 24px;

        background-image: url("../images/check-2ge92le.svg");
        background-size: contain;
    }
}



section.social-proof {
    background-color: var(--background-offset-colour);
    padding-top: var(--layout-spacing);
    padding-bottom: var(--layout-spacing);
    
    border-radius: 14px;

    display: flex;
    gap: var(--layout-spacing);
    align-items: flex-start;

    div.summary {
        text-align: center;

        p:first-of-type {
            font-weight: bold;
            margin-bottom: 7px;
            font-size: 1.4rem;
        }

        div.stars {
            margin: 0 auto;
            width: fit-content;

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

            svg {
                width: 30px;
                height: 30px;
            }
        }
    }

    div.reviews {
        flex: 1;

        article.review {
            display: flex;
            gap: var(--layout-spacing);

            div.content {
                min-width: 0;
            }

            div.author {
                text-align: center;
                flex-shrink: 0;

                img {
                    border-radius: 50%;
                    width: 100px;
                    height: 100px;
                    object-fit: cover;
                    object-position: center;
                    margin: 0 auto;
                }

                p:first-of-type {
                    font-weight: bold;
                }
            }

            &:not(.headline) {
                flex-direction: column-reverse;
                justify-content: flex-end;

                div.author {
                    text-align: right;

                    img {
                        display: none;
                    }
                }
            }
        }

        div.supporting {
            margin-top: var(--layout-spacing);
            display: flex;
            gap: var(--layout-spacing);
        }
    }

    @media (max-width: 960px) {
        flex-direction: column;
        align-items: center;

        div.reviews {
            div.supporting {
                display: none;
            }
        }
    }

    @media (max-width: 768px) {
        article.review.headline {
            flex-direction: column;
            align-items: center;
        }
    }
}

article.card.service {
    display: flex;
    gap: var(--layout-spacing);
    align-items: flex-start;

    div.icon {
        width: 70px;
        height: 70px;
        background-color: var(--primary-accent-colour);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;

        svg {
            width: 50%;
            height: 50%;
            fill: var(--primary-colour);
        }
    }

    a {
        display: block;
        width: fit-content;
        margin-left: auto;
        margin-right: 0;
        margin-top: var(--layout-spacing);
    }
}

section.packages {
    h2 {
        text-align: center;
    }

    div.packages {
        margin-top: var(--layout-spacing);
        display: flex;
        gap: var(--layout-spacing);
        justify-content: center;
        flex-wrap: wrap;

        article.card.package {
            max-width: 400px;
            width: 100%;
        }
    }

    p.check {
        width: fit-content;
        margin-top: var(--layout-spacing);
        margin-left: auto;
        margin-right: auto;
    }
}



article.card.package {
    display: flex;
    flex-direction: column;
    gap: var(--layout-spacing);

    div.top {
        display: flex;
        gap: var(--layout-spacing);
        align-items: flex-start;

        div.icon {
            width: 70px;
            height: 70px;
            background-color: var(--primary-accent-colour);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;

            svg {
                width: 50%;
                height: 50%;
                fill: var(--primary-colour);
            }
        }

        div.title {
            p:first-of-type {
                font-weight: bold;
                font-size: 1.2rem;
            }

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

                span {
                    font-size: 0.8rem;
                }
            }
        }
    }

    ul.features {
        list-style: none;
        padding-left: 0;
        height: 100%;

        li {
            &:not(:first-of-type) {
                margin-top: calc(var(--layout-spacing) / 2);
            }

            display: flex;
            gap: 4px;
            align-items: flex-start;

            &::before {
                flex-shrink: 0;
                content: ' ';
                display: block;
                width: 25px;
                height: 25px;
                background-image: url("../images/check-full-3l2g2PO.svg");
                background-size: contain;
                background-repeat: no-repeat;
            }
        }
    }

    a.button {
        width: 100%;
    }
}
