
/* ==========================================
   TERRAIFA - WORKFLOW FOUNDATION
   ========================================== */

.workflow-foundation {
    position: relative;
    width: 100%;
}

/* ==========================================
   THREE WORKFLOW LINES MERGE
   ========================================== */

.workflow-foundation__merge {
    position: relative;
    width: 100%;
    height: 90px;
}

.workflow-foundation__merge svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.workflow-foundation__path {
    stroke: #65d5b4;
    stroke-width: 1.5;
    stroke-opacity: .65;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
}

.workflow-foundation__merge.is-visible
.workflow-foundation__path {
    animation: workflow-path-draw 1.3s ease forwards;
}

.workflow-foundation__merge.is-visible
.workflow-foundation__path:nth-of-type(2) {
    animation-delay: .1s;
}

.workflow-foundation__merge.is-visible
.workflow-foundation__path:nth-of-type(3) {
    animation-delay: .2s;
}

.workflow-foundation__merge circle {
    opacity: .8;
    filter: drop-shadow(
        0 0 5px rgba(98, 231, 191, .8)
    );
}

@keyframes workflow-path-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* ==========================================
   FOUNDATION CONTAINER
   ========================================== */

.workflow-foundation__body {
    position: relative;
    padding: clamp(24px, 3vw, 39px);
    border: 1px solid rgba(124, 205, 185, .22);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(48, 166, 144, .09),
            transparent 55%
        ),
        rgba(255, 255, 255, .045);
    box-shadow: 0 18px 45px rgba(0, 10, 24, .12);
}

/* ==========================================
   COMPACT INTRODUCTION
   ========================================== */

.workflow-foundation__heading {
    max-width: 800px;
    margin: 0 auto 27px;
    text-align: center;
}

.workflow-foundation__eyebrow {
    margin: 0 0 10px;
    color: #7ee1be;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

.workflow-foundation__heading h3 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(23px, 2.5vw, 32px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.03em;
}

.workflow-foundation__heading h3 span {
    background: linear-gradient(
        95deg,
        #64d79f,
        #56c7d5
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.workflow-foundation__heading > p:last-child {
    max-width: 650px;
    margin: 11px auto 0;
    color: #b7ced3;
    font-size: 13px;
    line-height: 1.7;
}

/* ==========================================
   TWO COMPLEMENTARY STRENGTHS
   ========================================== */

.workflow-foundation__sources {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        44px
        minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
}

.workflow-foundation__source {
    min-width: 0;
    padding: 19px 0;
}

.workflow-foundation__source-top {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 15px;
}

.workflow-foundation__source-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    border: 1px solid rgba(111, 219, 188, .22);
    border-radius: 11px;
    background: rgba(87, 211, 171, .10);
    color: #82dfc4;
}

.workflow-foundation__source-icon svg {
    width: 25px;
    height: 25px;
}

.workflow-foundation__source-label {
    color: #84dac3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
}

.workflow-foundation__source h4 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(17px, 1.6vw, 21px);
    line-height: 1.35;
}

.workflow-foundation__source > p {
    max-width: 470px;
    margin: 0 0 15px;
    color: #b7cbd3;
    font-size: 13px;
    line-height: 1.7;
}

/* Engineering stack */

.workflow-foundation__stack {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.workflow-foundation__stack span {
    padding: 7px 10px;
    border: 1px solid rgba(128, 215, 193, .17);
    border-radius: 7px;
    background: rgba(97, 195, 170, .09);
    color: #b1ddd2;
    font-size: 11px;
    line-height: 1.4;
}

/* Central connection */

.workflow-foundation__plus {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #7de2c2;
    font-size: 25px;
    font-weight: 300;
}

.workflow-foundation__plus::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 8%;
    bottom: 8%;
    left: 50%;
    width: 1px;
    background: rgba(128, 215, 193, .18);
}

.workflow-foundation__plus::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 39px;
    height: 39px;
    border: 1px solid rgba(128, 215, 193, .3);
    border-radius: 50%;
    background: #173545;
}

/* ==========================================
   SHARED OUTCOME
   ========================================== */

.workflow-foundation__outcome {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    margin-top: 14px;
    padding: 20px 10px 0;
    border-top: 1px solid rgba(135, 215, 191, .16);
}

.workflow-foundation__outcome-icon {
    flex-shrink: 0;
    color: #75d7b6;
    font-size: 20px;
}

.workflow-foundation__outcome p {
    max-width: 900px;
    margin: 0;
    color: #b7cbd3;
    font-size: 13px;
    line-height: 1.6;
}

.workflow-foundation__outcome strong {
    color: #ffffff;
}

/* ==========================================
   TABLET / STACKED WORKFLOW
   ========================================== */

@media (max-width: 930px) {

    .workflow-foundation__merge {
        display: flex;
        justify-content: center;
        height: 55px;
    }

    .workflow-foundation__merge svg {
        display: none;
    }

    .workflow-foundation__merge::before {
        content: "";
        display: block;
        width: 2px;
        height: 100%;
        background: linear-gradient(
            180deg,
            rgba(80, 199, 166, .35),
            #65d5b4
        );
    }

    .workflow-foundation__sources {
        grid-template-columns:
            minmax(0, 1fr)
            38px
            minmax(0, 1fr);
        gap: 12px;
    }
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 700px) {

    .workflow-foundation__body {
        padding: 22px;
    }

    .workflow-foundation__heading {
        margin-bottom: 18px;
    }

    .workflow-foundation__sources {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .workflow-foundation__source {
        padding: 15px 0;
    }

    .workflow-foundation__plus {
        min-height: 44px;
    }

    .workflow-foundation__plus::before {
        top: 0;
        bottom: 0;
    }

    .workflow-foundation__outcome {
        align-items: flex-start;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    .workflow-foundation__path,
    .workflow-foundation__merge.is-visible
    .workflow-foundation__path {
        stroke-dashoffset: 0;
        animation: none;
    }
}
