.cta-section {
    position: relative;
    overflow: hidden;
}

/* Section backgrounds */
.cta-section.bg-transparent { background: transparent; }
.cta-section.bg-white  { background: var(--color-white); }
.cta-section.bg-pink   { background: var(--color-pink); }
.cta-section.bg-cyan   { background: var(--color-cyan); }
.cta-section.bg-azure  { background: var(--color-azure); }
/* top half white, bottom half pink - box straddles the two */

.cta-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(50% - (var(--vert-spacing-5) * 0.5) );
    display: block;
    background: var(--color-white);
    z-index: 1;
}

section.bg-pink + .cta-section:before {
    background: var(--color-pink) !important;
}

section.bg-cyan + .cta-section:before {
    background: var(--color-cyan) !important;
}

section.bg-azure + .cta-section:before {
    background: var(--color-azure) !important;
}

section.bg-blue + .cta-section:before {
    background: var(--color-blue) !important;
}

.cta-section > div {
    position: relative;
    z-index: 9;
}

/* Box */
.cta-section .cta-box {
    --cta-bg: var(--color-purple);
    --cta-text: var(--color-white);
    --cta-slant: 8%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: var(--border-radius, 8px);
    background: var(--cta-bg);
    color: var(--cta-text);
}
.cta-section.split-60-40 .cta-box { grid-template-columns: 3fr 2fr; }
.cta-section.split-40-60 .cta-box { grid-template-columns: 2fr 3fr; }
.cta-section.no-image .cta-box    { grid-template-columns: 1fr; }

/* Box colours */
.cta-section.box-purple .cta-box { --cta-bg: var(--color-purple); --cta-text: var(--color-white); }
.cta-section.box-navy .cta-box   { --cta-bg: var(--color-navy);   --cta-text: var(--color-white); }
.cta-section.box-blue .cta-box   { --cta-bg: var(--color-blue);   --cta-text: var(--color-white); }
.cta-section.box-green .cta-box  { --cta-bg: var(--color-green);  --cta-text: var(--color-white); }
.cta-section.box-pink .cta-box   { --cta-bg: var(--color-pink);   --cta-text: var(--color-navy); }
.cta-section.box-cyan .cta-box   { --cta-bg: var(--color-cyan);   --cta-text: var(--color-navy); }
.cta-section.box-azure .cta-box  { --cta-bg: var(--color-azure);  --cta-text: var(--color-navy); }
.cta-section.box-white .cta-box  { --cta-bg: var(--color-white);  --cta-text: var(--color-navy); }

/* Vertical alignment of content */
.cta-section.align-top .cta-content    { justify-content: flex-start; }
.cta-section.align-middle .cta-content { justify-content: center; }
.cta-section.align-bottom .cta-content { justify-content: flex-end; }

/* Content */
.cta-section .cta-content {
    display: flex;
    flex-direction: column;
    padding: var(--vert-spacing-4) var(--hori-spacing-4);
    min-width: 0;
}
.cta-section .cta-eyebrow {
    margin: 0 0 1rem;
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .15em;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--color-blue);
}
.cta-section .cta-title {
    color: var(--cta-text);
    margin-bottom: 1.25rem;
}
.cta-section .cta-content .content,
.cta-section .cta-eyebrow,
.cta-section .cta-content .content * {
    color: var(--cta-text);
}
.cta-section .cta-content .content > *:last-child { margin-bottom: 0; }
.cta-section .cta-content .buttons {
    margin-top: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Media */
.cta-section .cta-media {
    position: relative;
    min-height: 100%;
}
.cta-section .cta-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* diagonal edge - slants on the side facing the content */
.cta-section.edge-slant.content-left .cta-media {
    /* clip-path: polygon(var(--cta-slant) 0, 100% 0, 100% 100%, 0 100%); */
    clip-path: ellipse(54% 200% at 55% 100%);
}
.cta-section.edge-slant.content-right .cta-media {
    /* clip-path: polygon(0 0, calc(100% - var(--cta-slant)) 0, 100% 100%, 0 100%); */
    clip-path: ellipse(54% 200% at 45% 100%);
}
.cta-section.edge-straight .cta-media { clip-path: none; }

/* Swap sides */
.cta-section.content-right .cta-content { order: 2; }
.cta-section.content-right .cta-media   { order: 1; }
.cta-section.content-right.split-60-40 .cta-box { grid-template-columns: 2fr 3fr; }
.cta-section.content-right.split-40-60 .cta-box { grid-template-columns: 3fr 2fr; }

.cta-section img.contain {
    object-fit: contain;
    padding: 10%;
    background: rgba(0,0,0,0.2);
}

/* Mobile */
@media (max-width: 767.98px) {
    .cta-section .cta-box,
    .cta-section.split-60-40 .cta-box,
    .cta-section.split-40-60 .cta-box,
    .cta-section.content-right.split-60-40 .cta-box,
    .cta-section.content-right.split-40-60 .cta-box {
        grid-template-columns: 1fr;
    }
    .cta-section .cta-content { padding: var(--vert-spacing-3) var(--hori-spacing-5); }

    .cta-section.content-right .cta-content,
    .cta-section.content-right .cta-media { order: 0; }

    .cta-section.mobile-image-first .cta-media   { order: 1; }
    .cta-section.mobile-image-first .cta-content { order: 2; }
    .cta-section.mobile-content-first .cta-content { order: 1; }
    .cta-section.mobile-content-first .cta-media   { order: 2; }

    .cta-section .cta-media {
        min-height: 0;
        aspect-ratio: 16 / 9;
        clip-path: none !important;
    }
}
