/* --------------------------------------------------------------------------------
   Value Creation Model
   Board layout: Inputs | Processes | Outputs | SDG
   The column header and the process wheel stay pinned while the capital rows scroll.
-------------------------------------------------------------------------------- */

.vcmBoard {
    /* column track widths, taken from the printed board proportions */
    --vcmColIn: 35.9%;
    --vcmColProc: 26.8%;
    --vcmColOut: 29.4%;
    --vcmColSdg: 7.9%;

    --vcmStickyTop: 78px;
    --vcmRowGap: 10px;
    /* the vw term keeps the disc's spill over the white columns proportional,
       so the clearance reserved on .vcmCellInner below always covers it */
    --vcmWheelSize: min(620px, 64vh, 38.7vw);

    --vcmHeadBlue: #1a5fa8;
    --vcmTeal: #56c1c6;
    --vcmBandGray: #e9e9e9;
    --vcmLabel: #0b5fa5;
    --vcmValue: #4cbcd2;
    --vcmNote: #33556e;

    position: relative;
    /* no overflow clipping here - it would scope the sticky header and wheel
       to this box instead of the viewport, and they would stop pinning */
    background: linear-gradient(to top, #0075b8 0%, #56b6c5 100%);
}

/* common.css sizes h2 with !important at each breakpoint, so this is pinned */
.vcmBoardTitle {
    font-size: 34px !important;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--white);
    font-family: 'Helvetica Neue';
}

/* === pinned column header === */
.vcmHeadRow {
    top: 50px;
    z-index: 6;
    display: grid;
    position: sticky;
    align-items: end;
    grid-template-columns: var(--vcmColIn) var(--vcmColProc) var(--vcmColOut) var(--vcmColSdg);
}

.vcmHeadCell {
    display: block;
    padding: 10px 24px;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--white);
    background-color: var(--vcmHeadBlue);
    font-family: "Montserrat", sans-serif;

    /* the processes header is a touch taller and rounded, as on the board */
    &.vcmHeadCell_proc {
        margin-top: -8px;
        padding-top: 22px;
        border-radius: 14px 14px 0 0;
        background-color: var(--vcmTeal);
    }

    &.vcmHeadCell_sdg {
        margin-left: 1px;
    }
}

/* === board body === */
.vcmBody {
    position: relative;
}

/* the grey processes column runs the full height behind the rows */
.vcmProcBand {
    top: 0;
    bottom: 0;
    z-index: 4;
    position: absolute;
    left: var(--vcmColIn);
    width: var(--vcmColProc);
    background-color: var(--vcmBandGray);
    pointer-events: none;
}

.vcmProcSticky {
    position: sticky;
    top: calc(var(--vcmStickyTop) + 72px);
    padding: 24px 0;
}

/* === capital row === */
.vcmRow {
    --vcmTab: var(--vcmHeadBlue);

    display: grid;
    align-items: stretch;
    scroll-margin-top: 160px;
    grid-template-columns: var(--vcmColIn) var(--vcmColProc) var(--vcmColOut) var(--vcmColSdg);

    &:not(:last-child) {
        margin-bottom: var(--vcmRowGap);
    }
}

.vcmCell {
    z-index: 1;
    position: relative;
    background-color: var(--white);

    &.vcmCell_in {
        grid-column: 1;
    }

    &.vcmCell_out {
        grid-column: 3;
    }

    &.vcmCell_sdg {
        grid-column: 4;
        margin-left: 1px;
    }
}

.vcmCellInner {
    padding: 22px 24px;
}


.bg_e64d68 {
    background-color: #e64d68 !important;
}

.bg_442b74 {
    background-color: #442b74 !important;
}

.bg_7d93af {
    background-color: #7d93af !important;
}

.bg_2db34a {
    background-color: #2db34a !important;
}

.bg_f7942a {
    background-color: #f7942a !important;
}

/* keep copy clear of the disc, which spills out of the grey band on both sides */
@media (min-width: 992px) {
    .vcmCell_in .vcmCellInner {
        padding-right: 19%;
    }

    .vcmCell_out .vcmCellInner {
        padding-left: 23%;
    }
}

/* ribbon tab naming the capital */
.vcmTab {
    display: inline-block;
    position: relative;
    padding: 9px 46px 9px 24px;
    font-size: 20px;
    line-height: 1.2;
    font-weight: bold;
    color: var(--white);
    background-color: #1e95d3;
    font-family: 'Helvetica Neue LT Pro';
    clip-path: polygon(0 0%, 93% 0, 100% 100%, 0% 100%);

}

.eachIconH {
    .numMain {
        font-family: "Montserrat", sans-serif !important;
        font-weight: 700 !important;

        .counterText {
            font-weight: 600 !important;
        }
    }
}

/* === copy and figures === */


.vcmStats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 22px;
    margin-bottom: 0 !important;

    li {
        margin-bottom: 0 !important;
    }
}

.vcmStat {
    max-width: 100%;

    &.vcmStat_wide {
        flex-basis: 100%;
    }

    .vcmStatLabel {
        display: block;
        font-size: 13px;
        line-height: 1.35;
        font-weight: 700;
        margin-bottom: 3px;
        color: var(--vcmLabel);
        font-family: 'Helvetica Neue';
    }

    .vcmStatVal {
        display: block;
        font-size: 23px;
        line-height: 1.25;
        font-weight: 600;
        color: var(--vcmValue);
        font-family: 'Helvetica Neue';

        .ff_Rupee {
            font-weight: 400;
        }
    }

    /* a short note rides beside the figure; a long one is flagged to its own line */
    .vcmStatNote {
        font-size: 12px;
        line-height: 1.4;
        font-weight: 400;
        margin-left: 6px;
        color: var(--vcmNote);
        font-family: 'Helvetica 55 Roman';

        &.vcmStatNote_block {
            display: block;
            margin-left: 0;
            margin-top: 2px;
        }
    }

    /* worded figures sit at reading size instead of headline size */
    &.vcmStat_text .vcmStatVal {
        font-size: 14px;
        font-weight: 400;
        line-height: 1.45;
        color: var(--vcmNote);
    }
}

.vcmStatPlain {
    font-size: 13px;
    font-weight: 400;
    font-style: normal;
    color: var(--vcmNote);
    font-family: 'Helvetica 55 Roman';
}

.vcmSubLine {
    font-size: 13px !important;
    line-height: 1.45;
    color: var(--vcmNote) !important;
    margin-bottom: 16px !important;
}

/* === SDG tiles === */
.vcmSdgList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 22px 12px;
    justify-content: center;
    margin-bottom: 0 !important;

    li {
        margin-bottom: 0 !important;
    }
}

.vcmSdg {
    width: 44px;
    height: 44px;
    display: flex;
    font-size: 20px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-family: 'Helvetica Neue';
}

/* === process wheel === */
.vcmWheel {
    position: relative;
    margin-left: 50%;
    width: var(--vcmWheelSize);
    transform: translateX(-50%);
}

.vcmWheelArt {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.vcmProcNode {
    top: 50%;
    left: 50%;
    z-index: 2;
    position: absolute;
    text-align: center;
    transform: translate(-50%, -50%);
    width: calc(var(--vcmWheelSize) * 0.215);

    display: flex;
    flex-direction: column;
    align-items: center;

    .vcmProcIc {
        position: relative;
        display: block;
        margin-bottom: calc(var(--vcmWheelSize) * 0.012);
        width: calc(var(--vcmWheelSize) * 0.088);
        height: calc(var(--vcmWheelSize) * 0.088);
        transition: transform 400ms ease-in-out;

        svg {
            width: 100%;
            height: 100%;
            display: block;
        }

        i {
            top: 50%;
            left: 50%;
            position: absolute;
            color: #1a8fc9;
            transform: translate(-50%, -50%);
            font-size: calc(var(--vcmWheelSize) * 0.031);
            transition: color 400ms ease-in-out;
        }
    }

    .vcmProcName {
        display: block;
        font-weight: 700;
        line-height: 1.2;
        color: #0b6cb5;
        font-family: 'Helvetica Neue';
        font-size: max(11px, calc(var(--vcmWheelSize) * 0.026));
        transition: color 400ms ease-in-out;
    }

    /* lit while its capital is the one in view */
    &.is-lit {
        .vcmProcIc {
            transform: scale(1.14);

            i {
                color: #ee3d5c;
            }
        }

        .vcmProcName {
            color: #0b4f8c;
        }
    }
}

/* the row currently in view lifts very slightly */
.vcmRow {
    transition: box-shadow 400ms ease-in-out;

}

/* === responsive === */
@media (max-width: 1599px) {
    .vcmBoard {
        --vcmColIn: 34.5%;
        --vcmColProc: 27.5%;
        --vcmColOut: 29.6%;
        --vcmColSdg: 8.4%;
    }

    .vcmHeadCell {
        font-size: 23px;
        padding: 12px 20px;
    }

    .vcmCellInner {
        padding: 20px;
    }
}

@media (max-width: 1199px) {
    .vcmBoard {
        --vcmColIn: 33%;
        --vcmColProc: 28%;
        --vcmColOut: 29.4%;
        --vcmColSdg: 9.6%;
        --vcmStickyTop: 70px;
        --vcmWheelSize: min(520px, 60vh, 36.5vw);
    }

    .vcmBoardTitle {
        font-size: 28px !important;
    }

    .vcmHeadCell {
        font-size: 20px;
        padding: 11px 16px;
    }

    .vcmCellInner {
        padding: 16px;
    }

    .vcmTab {
        font-size: 15px;
        padding: 8px 42px 8px 16px;
    }

    .vcmStats {
        flex-direction: column;
        row-gap: 15px;
    }

    .vcmStat {
        flex-basis: unset;
        min-width: 100%;

        .vcmStatVal {
            font-size: 20px;
        }
    }

    .vcmSdg {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .vcmSdgList {
        padding: 16px 8px;
    }
}

/* below 992px the board unrolls into stacked capital cards */
@media (max-width: 991px) {
    .vcmBoard {
        --vcmStickyTop: 64px;
        --vcmWheelSize: min(460px, 82vw);
    }

    .vcmHeadRow {
        display: none;
    }

    .vcmProcBand {
        position: static;
        width: auto;
        background-color: transparent;
        margin-bottom: 30px;
    }

    .vcmProcSticky {
        position: static;
        padding: 0;
        border-radius: 20px;
        background-color: var(--vcmBandGray);
        padding: 20px 0;
    }

    .vcmRow {
        display: block;
        overflow: hidden;
        border-radius: 14px;
        scroll-margin-top: 90px;

        &:not(:last-child) {
            margin-bottom: 20px;
        }
    }

    .vcmCell {
        background-color: var(--white);

        &.vcmCell_sdg {
            margin-left: 0;
        }

        /* the column headings come back as labels inside each card */
        &.vcmCell_out,
        &.vcmCell_sdg {
            &::before {
                content: attr(data-label);
                display: block;
                padding: 9px 16px;
                font-size: 14px;
                font-weight: 700;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                color: var(--white);
                background-color: var(--vcmHeadBlue);
                font-family: 'Helvetica Neue';
            }
        }
    }

    .vcmSdgList {
        justify-content: flex-start;
        padding: 16px;
    }


    .vcmStats {
        gap: 0;

        .vcmStat {
            flex-basis: unset;
            min-width: unset;
            width: calc(33.33% - 10px) !important;
            padding: 0 10px;
            margin-bottom: 20px;
        }
    }

    .fz_32 {
        font-size: 28px !important;
    }
}

@media (max-width: 767px) {
    .vcmBoardTitle {
        font-size: 24px !important;
    }

    .vcmCellInner {
        padding: 16px;
    }

    .vcmStat {
        flex-basis: 100%;
        min-width: 0;
    }

    .vcmStats {
        .vcmStat {
            width: calc(50% - 10px) !important;
        }
    }
}

@media (max-width: 575px) {
    .vcmBoard {
        --vcmWheelSize: min(360px, 88vw);
    }

    /* wider nodes so the labels still fit once the type stops shrinking */
    .vcmProcNode {
        width: calc(var(--vcmWheelSize) * 0.27);

        .vcmProcName {
            font-size: max(11px, calc(var(--vcmWheelSize) * 0.032));
        }
    }

    .vcmStats {
        .vcmStat {
            width: 100% !important;
        }
    }

    .fz_32 {
        font-size: 26px !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    .vcmProcNode .vcmProcIc,
    .vcmProcNode .vcmProcIc i,
    .vcmProcNode .vcmProcName,
    .vcmRow {
        transition: none;
    }
}