/* ===============================================
    Home page: Our Working Process (Mission, Vision, Core Values)
    Markup: views/index.hbs (#working-process)
    The .mp-reveal / data-mp-reveal fade-in comes from home-about.css + home-about.js.
------------------------*/

.mp-process {
    --mp-ink: var(--brand-ink);
    --mp-navy: var(--brand-navy);
    --mp-green: var(--brand-green);
    --mp-accent: var(--brand-orange);
    --mp-accent-dark: var(--brand-orange-text);
    --mp-line: var(--brand-line);
    --mp-muted: var(--brand-muted);
    --mp-bg: var(--brand-green-deep);

    position: relative;
    padding: var(--sec-y) 0;
    overflow: hidden;
    background:
        radial-gradient(560px 280px at 94% -8%, rgba(70, 190, 105, .4), transparent 70%),
        radial-gradient(620px 320px at 0% 112%, rgba(70, 190, 105, .24), transparent 70%),
        var(--mp-bg);
}

/* faint dot grid that fades out towards the edges */
.mp-process:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(rgba(255, 255, 255, .16) 1.3px, transparent 1.7px) 0 0 / 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 18%, transparent 72%);
    mask-image: radial-gradient(ellipse at 50% 45%, #000 18%, transparent 72%);
    pointer-events: none;
}

.mp-process .container {
    position: relative;
    z-index: 1;
}


/* Heading
------------------------*/

.mp-process__head {
    max-width: 660px;
    margin: 0 auto 44px;
    text-align: center;
}

.mp-process .mp-eyebrow {
    margin: 0 0 14px;
    color: var(--brand-yellow);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.mp-process__title {
    margin: 0 0 18px;
    color: #fff;
    font-family: Poppins, sans-serif;
    font-size: 42px;
    font-weight: 600;
    line-height: 1.15;
}

.mp-process__lead {
    margin: 0;
    color: rgba(255, 255, 255, .92);
    font-size: 17px;
    line-height: 1.75;
}


/* Stepper (desktop): numbered nodes on a rail, a card hanging under each
------------------------*/

.mp-steps {
    position: relative;
}

.mp-steps__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* the rail runs from the centre of the first column to the centre of the last */
.mp-steps__rail {
    position: absolute;
    top: 26px;
    right: calc((100% - 64px) / 6);
    left: calc((100% - 64px) / 6);
    height: 4px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, .3);
}

.mp-steps__fill {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--brand-orange), var(--brand-yellow));
    transform-origin: 0 50%;
}

.mp-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.mp-step__node {
    position: relative;
    z-index: 1;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 4px solid var(--mp-accent);
    border-radius: 50%;
    background: #fff;
    color: var(--mp-ink);
    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-weight: 600;
    /* a halo in the section colour keeps the rail from touching the node */
    box-shadow: 0 0 0 8px var(--mp-bg);
    transition: border-color .3s ease, background-color .3s ease, color .3s ease;
}

.mp-step:hover .mp-step__node {
    border-color: var(--brand-yellow);
    background: var(--brand-orange);
    color: var(--brand-navy);
}

.mp-step__card {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    margin-top: 30px;
    padding: 38px 32px 36px;
    border: 1px solid var(--mp-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 34px 56px -40px rgba(var(--brand-navy-rgb), .5);
}

/* short stem joining the node to its card */
.mp-step__card:before {
    content: "";
    position: absolute;
    top: -30px;
    left: 50%;
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, .45);
    transform: translateX(-1px);
}

.mp-step__card:hover {
    border-color: rgba(var(--brand-green-rgb), .35);
    box-shadow: 0 40px 60px -38px rgba(var(--brand-navy-rgb), .6);
    transform: translateY(-6px);
}

.mp-step__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 22px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--mp-green), var(--mp-navy));
    color: #fff;
    box-shadow: 0 18px 30px -18px rgba(var(--brand-green-rgb), .9);
}

.mp-step__icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mp-step__title {
    margin: 0 0 12px;
    color: var(--mp-ink);
    font-family: Poppins, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
}

.mp-step__text {
    margin: 0;
    color: var(--mp-muted);
    font-size: 16px;
    line-height: 1.8;
}


/* Scroll reveal (hidden states only apply under html.mp-js, set by the About section)
------------------------*/

.mp-js .mp-steps__fill {
    transform: scaleX(0);
    transition: transform 1.5s cubic-bezier(.2, .7, .2, 1) .25s;
}

/* the trigger sits on the rail, not the fill: a zero-width box never intersects the viewport */
.mp-js .mp-steps__rail.is-in .mp-steps__fill {
    transform: none;
}

/* the hover lift must not fight the reveal transition, and needs the extra
   specificity to beat the revealed state's transform:none */
.mp-js .mp-step__card.is-in {
    transition: opacity .7s ease var(--d, 0ms), transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.mp-js .mp-step__card.is-in:hover {
    transform: translateY(-6px);
}


/* Responsive: below 992px the stepper turns vertical
------------------------*/

@media (max-width: 991.98px) {

    .mp-process {
        padding: var(--sec-y) 0;
    }

    .mp-process__head {
        margin-bottom: 36px;
    }

    .mp-process__title {
        font-size: 34px;
    }

    .mp-steps__rail {
        display: none;
    }

    .mp-steps__list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .mp-step {
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr);
        column-gap: 20px;
        align-items: start;
        padding-bottom: 30px;
    }

    .mp-step:last-child {
        padding-bottom: 0;
    }

    /* the line from each node down to the next */
    .mp-step:not(:last-child):after {
        content: "";
        position: absolute;
        top: 56px;
        bottom: 0;
        left: 26px;
        width: 4px;
        border-radius: 4px;
        background: linear-gradient(var(--brand-orange), var(--brand-yellow));
        opacity: .8;
    }

    .mp-step__node {
        box-shadow: 0 0 0 6px var(--mp-bg);
    }

    .mp-step__card {
        margin-top: 0;
        padding: 30px 28px 30px;
    }

    .mp-step__card:before {
        display: none;
    }
}

@media (max-width: 575.98px) {

    .mp-process {
        padding: var(--sec-y) 0;
    }

    .mp-process__head {
        margin-bottom: 28px;
    }

    .mp-process__title {
        font-size: 30px;
    }

    .mp-process__lead {
        font-size: 16px;
    }

    .mp-step {
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 14px;
    }

    .mp-step__node {
        width: 44px;
        height: 44px;
        border-width: 3px;
        font-size: 14px;
    }

    .mp-step:not(:last-child):after {
        top: 44px;
        left: 20px;
        width: 3px;
    }

    .mp-step__card {
        padding: 24px 20px 26px;
        border-radius: 20px;
    }

    .mp-step__icon {
        width: 54px;
        height: 54px;
        margin-bottom: 18px;
        border-radius: 16px;
    }

    .mp-step__title {
        font-size: 21px;
    }

    .mp-step__text {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .mp-js .mp-steps__fill,
    .mp-js .mp-step__card.is-in,
    .mp-step__node {
        transition: none;
    }

    .mp-step__card:hover,
    .mp-js .mp-step__card.is-in:hover {
        transform: none;
    }

    .mp-js .mp-steps__fill {
        transform: none;
    }
}
