/* ==========================================================================
   textSectionWithAngledPhotograph  (homepage: "Een moment", green block)
   ========================================================================== */
#main > section.textSectionWithAngledPhotograph {
    display: block;
    @media (max-width: 1023px) {
        /* --bp-green */
        --fs-heading: var(--fs-heading-m);
        --fs-body: var(--fs-body-m);
        --lh-heading: var(--lh-heading-m);
    }
    box-sizing: border-box;
    min-height: calc(var(--d) * 896);
    padding: calc(var(--d) * 115) 0 calc(var(--d) * 60) calc(var(--d) * 416);
    margin-bottom: calc(var(--d) * 337);
    @media (max-width: 1023px) {
        /* --bp-green */
        min-height: 0;
        padding: calc(var(--m) * 30) calc(var(--m) * 30) calc(var(--m) * 40) calc(var(--m) * 37);
        margin-bottom: calc(var(--m) * 120);
    }
}

.textSectionWithAngledPhotograph > .split-box {
    position: relative;
    display: block;
    .text-container {
        width: calc(var(--d) * 525);
    }
    .title {
        font-size: var(--fs-heading);
        line-height: var(--lh-heading);
        text-wrap: balance;
        margin: 0 0 0.26em;
    }
    span {
        display: block;
        font-size: var(--fs-body);
        line-height: var(--lh-body);
    }
    
    .photo-container {
        position: absolute;
        left: calc(var(--d) * 584);
        top: calc(var(--d) * 83);
        > img {
            display: block;
            box-sizing: border-box;
            width: calc(var(--d) * 494);
            height: calc(var(--d) * 741);
            object-fit: cover;
            border: calc(var(--d) * 10) solid;
            transform: rotate(3deg);
        }
    }
    @media (max-width: 1023px) {
        /* --bp-green */
        /* The photo sits at the bottom right and the last lines of text flow
           around it, whatever the length of the text ("float to bottom"):
           - the split-box is a flex row, so the text-container (a stretched
             flex item) has a definite height that % heights can resolve to;
           - a zero-width spacer float takes "100% - blocker" of that height;
           - the blocker float (clear: right) lands below it, at the bottom,
             and reserves the space for the absolutely positioned photo. */
        display: flex;
        .text-container {
            flex: 1;
            width: auto;
            /* never shorter than the part of the photo inside the green block */
            min-height: calc(var(--m) * 200);
            &::before {
                content: "";
                float: right;
                width: 0;
                height: calc(100% - var(--m) * 193);
            }
        }
        .title {
            margin-bottom: 0.33em;
        }
        span::before {
            content: "";
            float: right;
            clear: right;
            width: calc(var(--m) * 172);
            height: calc(var(--m) * 193);
        }
        .photo-container {
            left: calc(var(--m) * 180);
            top: auto;
            bottom: calc(var(--m) * -70); /* hangs over the bottom edge */
            > img {
                width: calc(var(--m) * 166);
                height: calc(var(--m) * 249);
                border-width: calc(var(--m) * 5);
            }
        }
    }
}

/* ==========================================================================
   textSectionWithMultipleAngledPhotographs  (over mij: "Creativiteit zit in mijn natuur")
   Desktop: text left, two tilted photos on the right that hang over the
            bottom of the coloured block.
   Mobile:  text on top, the photos underneath it, again hanging over
            the bottom edge.
   Photo positions come from the XD design, rotated around their centre.
   Desktop anchors them to the bottom of the block, so they keep sticking
   out of it when the text makes the block taller.
   ========================================================================== */
#main > section.textSectionWithMultipleAngledPhotographs {
    position: relative;
    display: block;
    @media (max-width: 767px) {
        /* --bp-about-creative */
        --fs-heading: var(--fs-heading-m);
        --fs-body: var(--fs-body-m);
        --lh-heading: var(--lh-heading-m);
    }
    box-sizing: border-box;
    min-height: calc(var(--d) * 736);
    padding: calc(var(--d) * 141) 0 calc(var(--d) * 110) calc(var(--d) * 353);
    margin-bottom: calc(var(--d) * 658);
    @media (max-width: 767px) {
        /* --bp-about-creative */
        min-height: 0;
        padding: calc(var(--m) * 72) calc(var(--m) * 35) 0 calc(var(--m) * 36);
        margin-bottom: calc(var(--m) * 200);
    }
}

.textSectionWithMultipleAngledPhotographs > .split-box {
    display: block;
    .text-container {
        width: calc(var(--d) * 740);
    }
    .title {
        font-size: var(--fs-heading);
        line-height: var(--lh-heading);
        margin: 0 0 0.3em;
    }
    span {
        display: block;
        font-size: var(--fs-body);
        line-height: var(--lh-body);
    }
    .photo-container {
        position: absolute;
        inset: 0;
        pointer-events: none;
        > img {
            position: absolute;
            box-sizing: border-box;
            object-fit: cover;
            border: calc(var(--d) * 10) solid;
        }
        > .photo-2 {
            left: calc(var(--d) * 1360);
            bottom: calc(var(--d) * -66);
            width: calc(var(--d) * 427);
            height: calc(var(--d) * 641);
            transform: rotate(5deg);
        }
        > .photo-1 {
            z-index: 1;
            left: calc(var(--d) * 1128);
            bottom: calc(var(--d) * -210);
            width: calc(var(--d) * 306);
            height: calc(var(--d) * 459);
            transform: rotate(-7deg);
        }
    }
    @media (max-width: 767px) {
        /* --bp-about-creative */
        .text-container {
            width: auto;
        }
        .title {
            margin-bottom: 0.45em;
        }
        /* the strip between the text and the bottom of the coloured block */
        .photo-container {
            position: relative;
            inset: auto;
            height: calc(var(--m) * 225);
            margin: 0 calc(var(--m) * -35) 0 calc(var(--m) * -36);
            > img {
                border-width: calc(var(--m) * 5);
            }
            > .photo-2 {
                left: calc(var(--m) * 167);
                top: calc(var(--m) * 10);
                bottom: auto;
                width: calc(var(--m) * 187.5);
                height: calc(var(--m) * 281.3);
            }
            > .photo-1 {
                left: calc(var(--m) * 52.5);
                top: calc(var(--m) * 79.7);
                bottom: auto;
                width: calc(var(--m) * 153.8);
                height: calc(var(--m) * 230.75);
            }
        }
    }
}

/* ==========================================================================
   doubleTextSectionWithThreeImages  (homepage: "Jouw moment" + "Ontdek mijn werk")
   ========================================================================== */
#main > section.doubleTextSectionWithThreeImages {
    position: relative;
    @media (max-width: 899px) {
        /* --bp-intro */
        --fs-heading: var(--fs-heading-m);
        --fs-body: var(--fs-body-m);
        --fs-link-large: var(--fs-link-large-m);
        --lh-heading: var(--lh-heading-m);
    }
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: calc(var(--d) * 177);
    @media (max-width: 899px) { 
        /* --bp-intro */
        margin-bottom: calc(var(--m) * 68);
    }
}

.doubleTextSectionWithThreeImages {
    .title {
        font-size: var(--fs-heading);
        line-height: var(--lh-heading);
        text-wrap: balance;
        margin: 0 0 0.26em;
    }
    span {
        font-size: var(--fs-body);
        line-height: var(--lh-body);
    }
    .photo-container .photo {
        display: block;
        object-fit: cover;
    }

    /* ---- row 1 ---- */
    .row.align-right {
        display: flex;
        flex-direction: row-reverse;
        justify-content: flex-end;
        align-items: flex-start;
        gap: calc(var(--d) * 38);
        margin-left: calc(var(--d) * 690);
        > .text-container {
            width: calc(var(--d) * 660);
            /* lines the cap height of the heading up with the top of the photo */
            margin-top: calc(var(--fs-heading) * -0.16);
            > span {
                display: block;
                max-width: calc(var(--d) * 575);
            }
        }
    }
    .photo-container.top-right {
        flex: none;
        z-index: 10;
        box-sizing: border-box;
        width: calc(var(--d) * 400);
        height: calc(var(--d) * 600);
        padding: calc(var(--d) * 10);
        > .photo {
            width: 100%;
            height: 100%;
        }
    }

    /* ---- row 2 ---- */
    .row.shift-up {
        position: absolute;
        top: calc(var(--d) * 388);
        left: calc(var(--d) * 435);
    }
    .photo-container.bottom-left {
        width: calc(var(--d) * 400);
        height: calc(var(--d) * 600);
        > .photo {
            width: 100%;
            height: 100%;
            transform: translate(calc(var(--d) * -21), calc(var(--d) * 17));
        }
    }

    /* ---- row 3 ---- */
    .row.centered-split-container {
        justify-content: flex-start;
        margin-top: calc(var(--d) * 238);
        > .split-box {
            align-items: center;
            gap: calc(var(--d) * 65);
            > * {
                flex: none;
            }
        }
        .text-container {
            width: calc(var(--d) * 600);
            margin-left: calc(var(--d) * 328);
            margin-top: calc(var(--d) * 44);
            text-align: end;
            .textLocation {
                display: flex;
                flex-direction: column;
                align-items: flex-end;
            }
            .textLocation > span:not(.larger) {
                max-width: calc(var(--d) * 440);
            }
            .larger {
                margin-top: 0.3em;
                font-family: "Fraunces", serif;
                font-size: var(--fs-link-large);
                line-height: 1.2;
                > a {
                    font-weight: 500;
                }
            }
        }
    }
    .photo-container.top-left {
        width: calc(var(--d) * 532);
        height: calc(var(--d) * 803);
        > .photo {
            width: calc(var(--d) * 536);
            height: 100%;
            transform: translate(calc(var(--d) * -25), calc(var(--d) * -27));
        }
    }

    @media (max-width: 899px) {
        /* --bp-intro */
        .title {
            margin-bottom: 0.17em;
        }

        .row.align-right {
            gap: calc(var(--m) * 10);
            margin-left: calc(var(--m) * 43);
            min-height: calc(var(--m) * 378);
            > .text-container {
                width: calc(var(--m) * 210);
                > span {
                    max-width: none;
                }
            }
        }
        .photo-container.top-right {
            width: calc(var(--m) * 139);
            height: calc(var(--m) * 209);
            padding: calc(var(--m) * 5);
        }

        .row.shift-up {
            top: calc(var(--m) * 200);
            left: calc(var(--m) * 41);
        }
        .photo-container.bottom-left {
            width: calc(var(--m) * 118);
            height: calc(var(--m) * 178);
            > .photo {
                transform: translate(calc(var(--m) * -6), calc(var(--m) * 5));
            }
        }

        .row.centered-split-container {
            /* shrinks on wider screens because the text above doesn't grow along
                so the photos would drift apart. */
            margin-top: calc(var(--m) * 54 - (100vw - 412px) * 0.25);
            > .split-box {
                gap: calc(var(--m) * 19);
            }
            .text-container {
                width: calc(var(--m) * 212);
                margin-left: calc(var(--m) * 6);
                margin-top: 0;
                .title {
                    white-space: nowrap;
                }
                .textLocation > span:not(.larger) {
                    max-width: none;
                }
                .larger {
                    margin-top: 0.2em;
                }
            }
        }
        .photo-container.top-left {
            width: calc(var(--m) * 149);
            height: calc(var(--m) * 226);
            > .photo {
                width: calc(var(--m) * 151);
                transform: translate(calc(var(--m) * -7), calc(var(--m) * -7));
            }
        }
    }
}
