/* =========================================================
CONTRALORÍA DISTRITAL DE MEDELLÍN
MAPA DE PROCESOS · IMMERSIVE PROCESS SYSTEM V2
Power Pages · HTML/CSS/SVG/Vanilla JS
========================================================= */

.process-page {
    --process-deep: #001812;
    --process-deep-2: #002d22;
    --process-green: #07583f;
    --process-green-2: #0b6a4c;
    --process-lime: #8bd936;
    --process-lime-bright: #c5f05a;
    --process-cream: #efe9df;
    --process-paper: #f7f4ee;
    --process-ink: #06251b;
    --process-text: #53645d;
    --process-line: rgba(0, 63, 47, 0.14);
    --process-max: 1560px;
    --process-gutter: clamp(16px, 4vw, 64px);
    --process-ease: cubic-bezier(0.2, 0.75, 0.2, 1);

    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
    background: var(--process-paper);
    color: var(--process-ink);
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.process-page,
.process-page *,
.process-page *::before,
.process-page *::after,
.process-modal,
.process-modal *,
.process-modal *::before,
.process-modal *::after {
    box-sizing: border-box;
}

.process-page a,
.process-modal a {
    text-decoration: none !important;
}

.process-page button,
.process-modal button {
    font: inherit;
}

.process-page svg,
.process-modal svg {
    display: block;
    max-width: 100%;
}

.process-page h1,
.process-page h2,
.process-page h3,
.process-page h4,
.process-page p,
.process-modal h2,
.process-modal h3,
.process-modal p {
    margin-top: 0;
}

.process-shell {
    width: min(calc(100% - (var(--process-gutter) * 2)), var(--process-max));
    margin-inline: auto;
}

/* =========================================================
SCROLL PROGRESS
========================================================= */

.process-progress {
    position: fixed;
    z-index: 2147480000;
    inset: 0 0 auto;
    height: 3px;
    pointer-events: none;
}

.process-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--process-lime);
    box-shadow: 0 0 18px rgba(139, 217, 54, 0.5);
}

/* =========================================================
HERO · SYSTEM CONSTELLATION
========================================================= */

.process-hero {
    position: relative;
    min-height: 800px;
    height: min(800px, 100svh);
    overflow: hidden;
    background: var(--process-deep);
    color: #fff;
    isolation: isolate;
}

@supports not (height: 100svh) {
    .process-hero {
        height: min(800px, 100vh);
    }
}

.process-hero__mesh {
    position: absolute;
    inset: 0;
    z-index: -8;
    overflow: hidden;
    background: linear-gradient(135deg, #00120e 0%, #003b2c 47%, #00100c 100%);
}

.process-hero__mesh-layer {
    position: absolute;
    border-radius: 50%;
    filter: blur(88px);
    mix-blend-mode: screen;
    opacity: 0.76;
    will-change: transform;
}

.process-hero__mesh-layer--one {
    width: 58vw;
    height: 58vw;
    left: -22vw;
    top: -28vw;
    background: radial-gradient(circle, rgba(139, 217, 54, 0.94), rgba(11, 106, 76, 0.25) 42%, transparent 72%);
    animation: processMeshOne 17s ease-in-out infinite alternate;
}

.process-hero__mesh-layer--two {
    width: 52vw;
    height: 52vw;
    right: -19vw;
    top: -11vw;
    background: radial-gradient(circle, rgba(58, 112, 255, 0.28), rgba(27, 177, 154, 0.16) 44%, transparent 72%);
    animation: processMeshTwo 22s ease-in-out infinite alternate;
}

.process-hero__mesh-layer--three {
    width: 46vw;
    height: 46vw;
    left: 39%;
    bottom: -22vw;
    background: radial-gradient(circle, rgba(197, 240, 90, 0.35), rgba(0, 104, 74, 0.2) 45%, transparent 74%);
    animation: processMeshThree 26s ease-in-out infinite alternate;
}

@keyframes processMeshOne {
    to { transform: translate3d(10%, 9%, 0) scale(1.08); }
}

@keyframes processMeshTwo {
    to { transform: translate3d(-9%, 8%, 0) scale(0.92); }
}

@keyframes processMeshThree {
    to { transform: translate3d(8%, -8%, 0) scale(1.05); }
}

.process-hero__noise {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1.1px),
        radial-gradient(circle at 72% 65%, rgba(139, 217, 54, 0.17) 0 1px, transparent 1.1px);
    background-size: 43px 43px, 71px 71px;
}

.process-hero__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 48%, transparent 0 23%, rgba(0, 18, 13, 0.08) 53%, rgba(0, 18, 13, 0.62) 100%);
}

.process-hero__network {
    position: absolute;
    z-index: -3;
    right: -5vw;
    top: 0;
    width: min(82vw, 1320px);
    height: 100%;
    pointer-events: none;
    will-change: transform;
}

.process-hero__network svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.process-hero__orbits ellipse {
    fill: none;
    stroke: rgba(139, 217, 54, 0.17);
    stroke-width: 1.2;
    transform-origin: 1090px 420px;
}

.process-hero__orbits ellipse:nth-child(1) { animation: processOrbit 18s linear infinite; }
.process-hero__orbits ellipse:nth-child(2) { animation: processOrbitReverse 28s linear infinite; }
.process-hero__orbits ellipse:nth-child(3) { animation: processOrbit 40s linear infinite; }

@keyframes processOrbit { to { transform: rotate(360deg); } }
@keyframes processOrbitReverse { to { transform: rotate(-360deg); } }

.process-hero__routes path {
    stroke-width: 1.15;
    stroke-dasharray: 13 17;
    animation: processRouteDash 12s linear infinite;
}

@keyframes processRouteDash { to { stroke-dashoffset: -280; } }

.process-hero__nodes circle {
    transform-box: fill-box;
    transform-origin: center;
    filter: drop-shadow(0 0 7px rgba(139, 217, 54, 0.72));
    animation: processNodePulse 3.2s ease-in-out infinite;
}

@keyframes processNodePulse {
    50% { transform: scale(1.42); opacity: 0.38; }
}

.process-hero__labels text {
    fill: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.process-hero__core circle {
    fill: rgba(0, 31, 24, 0.44);
    stroke: rgba(139, 217, 54, 0.3);
    stroke-width: 1.2;
}

.process-hero__core path {
    fill: none;
    stroke: var(--process-lime);
    stroke-width: 5;
    stroke-linecap: round;
}

.process-particles {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.process-particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--process-lime);
    box-shadow: 0 0 13px rgba(139, 217, 54, 0.8);
    opacity: 0.34;
    will-change: transform;
}

.process-hero__content {
    position: relative;
    z-index: 3;
    min-height: 800px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 58px;
    padding-bottom: 82px;
}

.process-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--process-lime);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.process-hero__eyebrow::before {
    content: "";
    width: 64px;
    height: 1px;
    background: rgba(255, 255, 255, 0.24);
}

.process-hero h1 {
    max-width: 1050px;
    margin: 0;
    color: #fff;
    font-size: clamp(66px, 7.4vw, 130px);
    line-height: 0.84;
    letter-spacing: clamp(-2.2px, -0.12vw, -0.7px);
    font-weight: 760;
}

.process-hero__line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
}

.process-hero__line b { display: block; }

.process-hero__accent {
    color: var(--process-lime);
    font-weight: 330 !important;
    font-style: italic;
}

.process-hero__content > p {
    max-width: 690px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.7;
}

.process-hero__actions {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
}

.process-hero__button {
    min-height: 64px;
    display: inline-flex;
    align-items: center;
    gap: 26px;
    padding: 0 14px 0 24px;
    border: 1px solid rgba(139, 217, 54, 0.38);
    border-radius: 999px;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    font-size: 12px;
    font-weight: 760;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.process-hero__button:hover {
    border-color: var(--process-lime);
    background: rgba(255, 255, 255, 0.1);
}

.process-hero__button b {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--process-deep);
    background: var(--process-lime);
}

.process-hero__metric {
    display: flex;
    align-items: center;
    gap: 10px;
}

.process-hero__metric strong {
    color: var(--process-lime);
    font-size: 32px;
    line-height: 1;
    letter-spacing: -0.03em;
}

.process-hero__metric span {
    max-width: 150px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 8px;
    font-weight: 750;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.process-hero__footer {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.process-hero__footer span {
    position: relative;
    padding-left: 10px;
    color: rgba(255, 255, 255, 0.32);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.055em;
}

.process-hero__footer span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--process-lime);
}

/* =========================================================
CHAPTER NAVIGATION · ENTERPRISE RESPONSIVE
========================================================= */

.process-navigation {
    position: sticky;
    z-index: 100;
    top: 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 63, 47, 0.12);
    background: rgba(247, 244, 238, 0.96);
    box-shadow: 0 10px 28px rgba(0, 24, 18, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.process-navigation__inner {
    position: relative;
    padding-inline: 0;
}

.process-chapter-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    overflow: visible;
}

.process-chapter-nav__link {
    position: relative;
    min-width: 0;
    min-height: 92px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 15px 14px;
    border-right: 1px solid var(--process-line);
    color: var(--process-ink) !important;
    background: transparent;
    transition: color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.process-chapter-nav__link:first-child {
    border-left: 1px solid var(--process-line);
}

.process-chapter-nav__link::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--process-lime);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.22s ease;
}

.process-chapter-nav__number {
    color: var(--process-green);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
}

.process-chapter-nav__name {
    min-width: 0;
    color: inherit;
    font-size: clamp(15px, 0.82vw, 13px);
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.process-chapter-nav__link:hover {
    color: var(--process-deep) !important;
    background: rgba(0, 63, 47, 0.055);
}

.process-chapter-nav__link:hover::after {
    transform: scaleX(0.34);
}

.process-chapter-nav__link[aria-current="true"] {
    color: #fff !important;
    background: linear-gradient(135deg, #001812 0%, #003728 100%);
    box-shadow: inset 0 -3px 0 var(--process-lime);
}

.process-chapter-nav__link[aria-current="true"]::after {
    transform: scaleX(1);
}

.process-chapter-nav__link[aria-current="true"] .process-chapter-nav__number {
    color: var(--process-lime-bright);
}

.process-nav-toggle {
    display: none;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .process-chapter-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .process-chapter-nav__link {
        min-height: 72px;
        padding: 12px 18px;
    }

    .process-chapter-nav__link:nth-child(3n) {
        border-right: 1px solid var(--process-line);
    }

    .process-chapter-nav__name {
        font-size: 12.5px;
    }
}

@media (max-width: 991.98px) {
    .process-navigation {
        padding: 8px 0;
        background: rgba(247, 244, 238, 0.985);
    }

    .process-navigation__inner {
        padding-inline: var(--bs-gutter-x, 0.75rem);
    }

    .process-nav-toggle {
        width: 100%;
        min-height: 58px;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 24px;
        gap: 12px;
        align-items: center;
        padding: 8px 12px;
        border: 1px solid rgba(0, 63, 47, 0.14);
        border-radius: 12px;
        color: var(--process-ink);
        background: #fff;
        box-shadow: 0 6px 18px rgba(0, 24, 18, 0.07);
        cursor: pointer;
        text-align: left;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }

    .process-nav-toggle:hover {
        border-color: rgba(0, 63, 47, 0.3);
        background: #fbfcfb;
    }

    .process-nav-toggle__icon {
        width: 34px;
        height: 34px;
        display: grid;
        place-content: center;
        gap: 4px;
        border-radius: 9px;
        background: var(--process-deep);
    }

    .process-nav-toggle__icon i {
        width: 16px;
        height: 2px;
        display: block;
        border-radius: 2px;
        background: var(--process-lime);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .process-nav-toggle__copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .process-nav-toggle__label {
        color: var(--process-text);
        font-size: 9px;
        font-weight: 800;
        line-height: 1.2;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .process-nav-toggle__copy strong {
        overflow: hidden;
        color: var(--process-ink);
        font-size: 13px;
        font-weight: 700;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .process-nav-toggle__chevron {
        color: var(--process-green);
        font-size: 22px;
        line-height: 1;
        transform: translateY(-2px);
        transition: transform 0.2s ease;
    }

    .process-chapter-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: var(--bs-gutter-x, 0.75rem);
        right: var(--bs-gutter-x, 0.75rem);
        z-index: 5;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: min(68vh, 560px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        border: 1px solid rgba(0, 63, 47, 0.14);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 24px 60px rgba(0, 24, 18, 0.2);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    }

    .process-navigation.is-open .process-chapter-nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .process-navigation.is-open .process-nav-toggle__chevron {
        transform: rotate(180deg) translateY(1px);
    }

    .process-navigation.is-open .process-nav-toggle__icon i:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .process-navigation.is-open .process-nav-toggle__icon i:nth-child(2) {
        opacity: 0;
    }

    .process-navigation.is-open .process-nav-toggle__icon i:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .process-chapter-nav__link,
    .process-chapter-nav__link:first-child {
        min-height: 68px;
        grid-template-columns: 30px minmax(0, 1fr);
        padding: 11px 14px;
        border: 0;
        border-bottom: 1px solid var(--process-line);
        border-radius: 0;
    }

    .process-chapter-nav__link:nth-child(odd) {
        border-right: 1px solid var(--process-line);
    }

    .process-chapter-nav__link::after {
        left: 0;
        right: auto;
        top: 0;
        bottom: 0;
        width: 4px;
        height: auto;
        border-radius: 0 4px 4px 0;
        transform: scaleY(0);
        transform-origin: center top;
    }

    .process-chapter-nav__link:hover::after,
    .process-chapter-nav__link[aria-current="true"]::after {
        transform: scaleY(1);
    }

    .process-chapter-nav__link[aria-current="true"] {
        box-shadow: none;
    }

    .process-chapter-nav__name {
        font-size: 12.5px;
        overflow-wrap: normal;
        hyphens: none;
    }
}

@media (max-width: 575.98px) {
    .process-chapter-nav {
        grid-template-columns: 1fr;
    }

    .process-chapter-nav__link:nth-child(odd) {
        border-right: 0;
    }

    .process-nav-toggle__copy strong {
        font-size: 12.5px;
    }
}

/* =========================================================
MACROPROCESS CHAPTERS
========================================================= */

.process-chapter {
    --chapter-bg: #f3eee5;
    --chapter-ink: var(--process-ink);
    --chapter-accent: #0b6a4c;

    position: relative;
    min-height: 920px;
    padding: 100px 0;
    overflow: hidden;
    background: var(--chapter-bg);
    color: var(--chapter-ink);
    isolation: isolate;
    scroll-margin-top: 78px;
}

.process-chapter--02 { --chapter-bg: #071f19; --chapter-ink: #fff; --chapter-accent: #8bd936; }
.process-chapter--03 { --chapter-bg: #e6ddd1; --chapter-ink: #16221e; --chapter-accent: #bb641f; }
.process-chapter--04 { --chapter-bg: #dce8e3; --chapter-ink: #082f2c; --chapter-accent: #237b75; }
.process-chapter--05 { --chapter-bg: #eee5c9; --chapter-ink: #2b2917; --chapter-accent: #b59200; }
.process-chapter--06 { --chapter-bg: #e0ebd8; --chapter-ink: #18301f; --chapter-accent: #688c26; }

.process-chapter__ambient {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.process-chapter__giant {
    position: absolute;
    right: -3vw;
    top: -5vh;
    color: color-mix(in srgb, var(--chapter-ink) 4%, transparent);
    font-size: clamp(220px, 31vw, 520px);
    font-weight: 860;
    line-height: 0.8;
    letter-spacing: -0.06em;
}

.process-chapter__path {
    position: absolute;
    left: -4vw;
    bottom: 4vh;
    width: min(52vw, 800px);
    fill: none;
    stroke: var(--chapter-accent);
    stroke-width: 1.4;
    opacity: 0.18;
}

.process-chapter__path path {
    stroke-dasharray: 10 13;
    animation: processChapterDash 13s linear infinite;
}

.process-chapter__path circle {
    fill: var(--chapter-accent);
    stroke: none;
}

@keyframes processChapterDash { to { stroke-dashoffset: -220; } }

.process-chapter__layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(54px, 7vw, 120px);
    align-items: start;
}

.process-chapter__intro {
    position: sticky;
    top: 118px;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.process-chapter__eyebrow {
    color: var(--chapter-accent);
    font-size: 9px;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.process-chapter__intro h2 {
    max-width: 650px;
    margin: 16px 0 0;
    color: currentColor;
    font-size: clamp(48px, 5.2vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.035em;
    font-weight: 680;
    text-wrap: balance;
}

.process-chapter__intro > p {
    max-width: 590px;
    margin: 25px 0 0;
    color: color-mix(in srgb, currentColor 70%, transparent);
    font-size: 15px;
    line-height: 1.72;
    text-wrap: pretty;
}

.process-chapter__count {
    width: max-content;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 34px;
    padding-top: 16px;
    border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.process-chapter__count strong {
    color: var(--chapter-accent);
    font-size: 36px;
    line-height: 0.92;
    letter-spacing: -0.03em;
}

.process-chapter__count span {
    font-size: 8px;
    font-weight: 740;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

/* Keep original macro visual content, but transform it into an ambient device. */
.macro-illustration {
    margin-top: 36px;
}

.macro-visual {
    position: relative;
    width: 190px;
    height: 190px;
    border: 1px solid color-mix(in srgb, var(--chapter-accent) 28%, transparent);
    border-radius: 50%;
}

.macro-visual__orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid color-mix(in srgb, var(--chapter-accent) 25%, transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.macro-visual__orbit--one { width: 118px; height: 118px; animation: processOrbit 18s linear infinite; }
.macro-visual__orbit--two { width: 160px; height: 160px; animation: processOrbitReverse 25s linear infinite; }

.macro-visual__core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    color: var(--chapter-bg);
    background: var(--chapter-accent);
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
}

.macro-visual__node {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--chapter-accent);
}

.macro-visual__node--one { left: 24px; top: 50px; }
.macro-visual__node--two { right: 20px; top: 86px; }
.macro-visual__node--three { left: 82px; bottom: 20px; }

.process-chapter__stream {
    min-width: 0;
    padding: 20px 0;
}

.process-stream-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: color-mix(in srgb, currentColor 58%, transparent);
}

.process-stream-title > span {
    width: 34px;
    height: 1px;
    background: var(--chapter-accent);
}

.process-stream-title h3 {
    margin: 0;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.process-card-grid {
    display: block;
}

/* =========================================================
PROCESS EXPERIENCES · BORDERLESS EDITORIAL LANES
========================================================= */

.process-detail-card {
    --pointer-x: 50%;
    --pointer-y: 50%;

    position: relative;
    min-height: 215px;
    display: grid;
    grid-template-columns: 58px 74px minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 32px 0;
    overflow: hidden;
    border-top: 1px solid color-mix(in srgb, currentColor 17%, transparent);
    isolation: isolate;
}

.process-detail-card:last-child {
    border-bottom: 1px solid color-mix(in srgb, currentColor 17%, transparent);
}

.process-detail-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: radial-gradient(260px circle at var(--pointer-x) var(--pointer-y), color-mix(in srgb, var(--chapter-accent) 12%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.process-detail-card:hover::before { opacity: 1; }

.process-number {
    color: var(--chapter-accent);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.07em;
}

.process-card-image {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--chapter-accent) 30%, transparent);
    border-radius: 50%;
    color: var(--chapter-accent);
    background: color-mix(in srgb, var(--chapter-accent) 7%, transparent);
    transition: transform 0.35s var(--process-ease), color 0.35s ease, background 0.35s ease;
}

.process-detail-card:hover .process-card-image {
    transform: rotate(-7deg) scale(1.05);
    color: var(--chapter-bg);
    background: var(--chapter-accent);
}

.process-illustration {
    width: 30px;
    height: 30px;
    color: currentColor;
}

.process-illustration g {
    fill: none;
    stroke: currentColor;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.process-card-content {
    min-width: 0;
}

.process-card-content h4 {
    max-width: 760px;
    margin: 0;
    color: currentColor;
    font-size: clamp(26px, 2.3vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 680;
    text-wrap: balance;
}

.process-card-content p {
    max-width: 720px;
    margin: 12px 0 0;
    color: color-mix(in srgb, currentColor 66%, transparent);
    font-size: 13.5px;
    line-height: 1.62;
    text-wrap: pretty;
}

.process-details-link {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 0 13px 0 18px;
    border: 1px solid color-mix(in srgb, var(--chapter-accent) 32%, transparent);
    border-radius: 999px;
    color: currentColor;
    background: transparent;
    cursor: pointer;
    font-size: 10px;
    font-weight: 760;
    white-space: nowrap;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.process-details-link > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--chapter-bg);
    background: var(--chapter-accent);
}

.process-details-link:hover {
    color: var(--chapter-bg);
    border-color: var(--chapter-accent);
    background: var(--chapter-accent);
}

.process-details-link:hover > span {
    color: var(--chapter-accent);
    background: var(--chapter-bg);
}

/* =========================================================
MODAL · PROCESS STORY
Corrección de contraste WCAG / Power Pages
========================================================= */

/*
    IMPORTANTE:
    El modal está fuera de .process-page y JavaScript puede moverlo a <body>.
    Por ello define aquí sus propias variables y no depende de las variables
    heredadas desde .process-page.
*/
.process-modal {
    --modal-deep: #001812;
    --modal-deep-soft: #063e30;
    --modal-green: #07583f;
    --modal-lime: #8bd936;
    --modal-lime-bright: #c5f05a;
    --modal-surface: #ffffff;
    --modal-surface-soft: #f7f9f7;
    --modal-surface-muted: #eef3f0;
    --modal-ink: #10261f;
    --modal-text: #33483f;
    --modal-muted: #5d7068;
    --modal-line: #cbd8d2;
    --modal-shadow: 0 38px 110px rgba(0, 0, 0, 0.34);

    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: none !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 20px;
    align-items: center;
    justify-content: center;
    color: var(--modal-ink);
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

.process-modal.open {
    display: flex !important;
}

.process-modal__overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 18, 13, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.process-modal__window {
    position: relative;
    z-index: 2;
    width: min(1320px, 96vw);
    max-height: 94vh;
    overflow-y: auto;
    overflow-x: hidden;
    color: var(--modal-ink) !important;
    background: var(--modal-surface) !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    box-shadow: var(--modal-shadow);
    isolation: isolate;
    opacity: 1 !important;
    visibility: visible !important;
    color-scheme: light;
}

.process-modal__window::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(139, 217, 54, 0.035),
            transparent 28%
        );
}

.process-modal__header {
    position: relative;
    overflow: hidden;
    padding: 58px 70px 44px;
    color: #ffffff !important;
    background:
        radial-gradient(
            circle at 91% 8%,
            rgba(139, 217, 54, 0.22),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            var(--modal-deep-soft) 0%,
            var(--modal-deep) 100%
        ) !important;
}

.process-modal__header::before {
    content: "";
    position: absolute;
    right: -90px;
    top: -115px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(197, 240, 90, 0.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 54px rgba(255, 255, 255, 0.025),
        0 0 0 108px rgba(255, 255, 255, 0.016);
    pointer-events: none;
}

.process-modal__header::after {
    content: "";
    position: absolute;
    left: 70px;
    bottom: 0;
    width: 90px;
    height: 4px;
    background: var(--modal-lime);
}

.process-modal__eyebrow {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 11px;
    color: var(--modal-lime-bright) !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.process-modal__header h2,
#modalProcessTitle {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 0 15px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: clamp(34px, 4vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    font-weight: 680;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.16);
}

.process-modal__header p,
#modalProcessDescription {
    position: relative;
    z-index: 1;
    max-width: 930px;
    margin: 0;
    color: #e9f0ed !important;
    -webkit-text-fill-color: #e9f0ed !important;
    font-size: 15px;
    line-height: 1.72;
    opacity: 1 !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.10);
}

.process-modal__close {
    position: absolute;
    z-index: 6;
    right: 22px;
    top: 20px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 29px;
    line-height: 1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
    transition:
        transform 0.25s ease,
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}

.process-modal__close:hover,
.process-modal__close:focus-visible {
    transform: rotate(90deg);
    color: var(--modal-deep) !important;
    background: var(--modal-lime);
    border-color: var(--modal-lime);
}

.flow-intro {
    max-width: 1120px;
    margin: 34px auto 0;
    padding: 0 30px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--modal-ink);
}

.flow-intro p {
    flex: 0 0 auto;
    margin: 0;
    color: var(--modal-green) !important;
    -webkit-text-fill-color: var(--modal-green) !important;
    font-size: 10px;
    font-weight: 820;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 1 !important;
}

.flow-intro__line {
    width: 100%;
    height: 1px;
    background: var(--modal-line);
}

.process-flow {
    max-width: 1180px;
    margin: 0 auto;
    padding: 46px 38px 54px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    color: var(--modal-ink);
    background: var(--modal-surface);
}

.flow-step {
    position: relative;
    min-height: 290px;
    padding: 42px 24px 24px;
    color: var(--modal-ink);
    background: var(--modal-surface);
    border-top: 1px solid var(--modal-line);
    border-bottom: 1px solid var(--modal-line);
}

.flow-step + .flow-step {
    border-left: 1px solid var(--modal-line);
}

.flow-step__number {
    position: absolute;
    left: 22px;
    top: -15px;
    z-index: 2;
    min-width: 39px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0 8px;
    color: var(--modal-deep) !important;
    -webkit-text-fill-color: var(--modal-deep) !important;
    background: var(--modal-lime) !important;
    border: 2px solid var(--modal-surface);
    box-shadow: 0 5px 15px rgba(0, 47, 35, 0.14);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
}

.flow-step__icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(139, 217, 54, 0.38);
    border-radius: 50%;
    color: var(--modal-lime-bright) !important;
    -webkit-text-fill-color: var(--modal-lime-bright) !important;
    background: var(--modal-deep) !important;
    box-shadow: 0 10px 24px rgba(0, 24, 18, 0.16);
    font-size: 22px;
    font-weight: 700;
}

.flow-step h3 {
    margin: 20px 0 10px;
    color: var(--modal-ink) !important;
    -webkit-text-fill-color: var(--modal-ink) !important;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    opacity: 1 !important;
}

.flow-step p {
    margin: 0;
    color: var(--modal-text) !important;
    -webkit-text-fill-color: var(--modal-text) !important;
    font-size: 13.5px;
    line-height: 1.66;
    opacity: 1 !important;
}

.process-modal__footer {
    padding: 25px 42px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    color: var(--modal-ink);
    background: var(--modal-surface-soft) !important;
    border-top: 1px solid var(--modal-line);
}

.modal-result {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-result__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--modal-deep) !important;
    -webkit-text-fill-color: var(--modal-deep) !important;
    background: var(--modal-lime) !important;
    box-shadow: 0 8px 20px rgba(0, 47, 35, 0.12);
    font-weight: 900;
}

.modal-result small,
.modal-result strong {
    display: block;
}

.modal-result small {
    margin-bottom: 3px;
    color: var(--modal-muted) !important;
    -webkit-text-fill-color: var(--modal-muted) !important;
    font-size: 10px;
    font-weight: 820;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 1 !important;
}

.modal-result strong,
#modalResult {
    max-width: 760px;
    color: var(--modal-ink) !important;
    -webkit-text-fill-color: var(--modal-ink) !important;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
    opacity: 1 !important;
}

.modal-close-button {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 11px 26px;
    border: 1px solid var(--modal-deep);
    border-radius: 999px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: var(--modal-deep) !important;
    cursor: pointer;
    font-weight: 780;
    transition:
        transform 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.modal-close-button:hover,
.modal-close-button:focus-visible {
    color: var(--modal-deep) !important;
    -webkit-text-fill-color: var(--modal-deep) !important;
    background: var(--modal-lime) !important;
    transform: translateY(-1px);
}

body.process-modal-open {
    overflow: hidden !important;
}

/* Refuerzo contra estilos globales de Power Pages / Bootstrap */
.process-modal.open .process-modal__window,
.process-modal.open .process-modal__window * {
    opacity: 1;
}

.process-modal.open .process-flow,
.process-modal.open .flow-step,
.process-modal.open .process-modal__footer {
    filter: none !important;
    mix-blend-mode: normal !important;
}

/* Modal responsive */
@media (max-width: 992px) {
    .process-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .flow-step,
    .flow-step + .flow-step {
        border: 1px solid var(--modal-line);
        border-radius: 14px;
        background: var(--modal-surface);
    }
}

@media (max-width: 768px) {
    .process-modal {
        padding: 10px;
    }

    .process-modal__window {
        width: min(100%, 720px);
        max-height: 96vh;
        border-radius: 18px;
    }

    .process-modal__header {
        padding: 54px 25px 32px;
    }

    .process-modal__header::after {
        left: 25px;
    }

    .process-modal__header h2,
    #modalProcessTitle {
        padding-right: 26px;
        font-size: clamp(30px, 8vw, 43px);
        line-height: 1.08;
    }

    .process-modal__header p,
    #modalProcessDescription {
        font-size: 14px;
    }

    .flow-intro {
        margin-top: 28px;
        padding-inline: 22px;
    }

    .process-flow {
        padding: 40px 22px 44px;
    }

    .process-modal__footer {
        padding: 22px;
        flex-direction: column;
        align-items: stretch;
    }

    .modal-close-button {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .process-flow {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .flow-intro__line {
        display: none;
    }

    .flow-intro p {
        white-space: normal;
        line-height: 1.4;
    }

    .flow-step {
        min-height: 0;
        padding: 38px 20px 22px;
    }

    .flow-step h3 {
        font-size: 19px;
    }

    .flow-step p {
        font-size: 13px;
    }
}

/* =========================================================
REVEALS
========================================================= */

.process-page.process-motion [data-process-reveal] {
    opacity: 0;
    transform: translateY(34px);
    filter: blur(5px);
    transition: opacity 0.72s var(--process-ease), transform 0.72s var(--process-ease), filter 0.72s var(--process-ease);
}

.process-page.process-motion [data-process-reveal].is-visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

[data-hero-line],
[data-hero-reveal] { opacity: 1; transform: none; }

/* =========================================================
RESPONSIVE
========================================================= */

@media (max-width: 1200px) {
    .process-chapter__layout {
        grid-template-columns: minmax(290px, 0.68fr) minmax(0, 1.32fr);
        gap: 50px;
    }

    .process-detail-card {
        grid-template-columns: 50px 62px minmax(0, 1fr);
    }

    .process-details-link {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 992px) {
    .process-hero__network {
        right: -35vw;
        width: 125vw;
        opacity: 0.56;
    }

    .process-chapter {
        min-height: auto;
        padding: 78px 0;
    }

    .process-chapter__layout {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .process-chapter__intro {
        position: relative;
        top: auto;
        min-height: auto;
        padding-bottom: 10px;
    }

    .macro-illustration { display: none; }

}

@media (max-width: 768px) {
    .process-hero {
        min-height: 760px;
        height: auto;
    }

    .process-hero__content {
        min-height: 760px;
        height: auto;
        padding-top: 60px;
        padding-bottom: 84px;
    }

    .process-hero h1 {
        font-size: clamp(50px, 11.8vw, 68px);
        line-height: 0.88;
        letter-spacing: -0.025em;
    }

    .process-hero__network {
        right: -72vw;
        top: 20%;
        width: 180vw;
        opacity: 0.38;
    }

    .process-hero__actions { display: block; }
    .process-hero__metric { margin-top: 18px; }

    .process-chapter__intro h2 {
        font-size: 50px;
        line-height: 1;
        letter-spacing: -0.025em;
    }

    .process-detail-card {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 14px;
        min-height: 0;
        padding: 28px 0;
    }

    .process-number { align-self: end; }

    .process-card-image {
        grid-column: 1;
        grid-row: 2;
        width: 42px;
        height: 42px;
    }

    .process-illustration { width: 23px; height: 23px; }

    .process-card-content {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .process-details-link { grid-column: 2; width: max-content; }
    .process-card-content h4 { font-size: 31px; }

}

@media (max-width: 576px) {
    .process-page { --process-gutter: 15px; }
    .process-hero { min-height: 720px; }
    .process-hero__content { min-height: 720px; padding-top: 50px; padding-bottom: 76px; }
    .process-hero h1 { font-size: clamp(44px, 11vw, 56px); }
    .process-hero__network { right: -86vw; width: 205vw; opacity: 0.3; }
    .process-hero__button { width: 100%; justify-content: space-between; }
    .process-chapter { padding: 66px 0; }
    .process-chapter__giant { font-size: 200px; }
    .process-chapter__intro h2 { font-size: 44px; }
    .process-card-content h4 { font-size: 28px; line-height: 1.08; }
}

@media (max-width: 414px) {
    .process-page { --process-gutter: 14px; }
    .process-hero { min-height: 700px; }
    .process-hero__content { min-height: 700px; }
    .process-hero h1 { font-size: clamp(40px, 10.8vw, 47px); line-height: 0.92; letter-spacing: -0.016em; }
    .process-chapter__intro h2 { font-size: 41px; }
    .process-detail-card { grid-template-columns: 36px minmax(0, 1fr); gap: 11px; }
    .process-card-image { width: 36px; height: 36px; }
    .process-illustration { width: 20px; height: 20px; }
    .process-card-content h4 { font-size: 26px; }
    .process-details-link { width: 100%; justify-content: space-between; }
}

@media (max-width: 390px) {
    .process-hero h1 { font-size: 42px; }
    .process-chapter__intro h2 { font-size: 39px; }
}

@media (max-width: 360px) {
    .process-page { --process-gutter: 13px; }
    .process-hero { min-height: 680px; }
    .process-hero__content { min-height: 680px; }
    .process-hero h1 { font-size: 39px; }
    .process-card-content h4 { font-size: 25px; }
}

@media (max-width: 320px) {
    .process-page { --process-gutter: 12px; }
    .process-hero { min-height: 660px; }
    .process-hero__content { min-height: 660px; padding-top: 42px; padding-bottom: 66px; }
    .process-hero h1 { font-size: 36px; line-height: 0.95; }
    .process-chapter__intro h2 { font-size: 36px; }
    .process-detail-card { grid-template-columns: 30px minmax(0, 1fr); gap: 9px; }
    .process-card-content h4 { font-size: 23px; }
    .process-card-content p { font-size: 12.5px; }
}

/* =========================================================
LAYOUT SAFETY · STICKY NAV OFFSETS
========================================================= */

.process-page,
.process-navigation,
.process-navigation__inner,
.process-chapter-nav,
.process-chapter-nav__link {
    max-width: 100%;
}

.process-chapter {
    scroll-margin-top: 100px;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .process-chapter {
        scroll-margin-top: 158px;
    }
}

@media (max-width: 991.98px) {
    .process-chapter {
        scroll-margin-top: 82px;
    }
}

/* =========================================================
ACCESSIBILITY
========================================================= */

.process-page :focus-visible,
.process-modal :focus-visible {
    outline: 3px solid var(--process-lime) !important;
    outline-offset: 4px !important;
}

@media (prefers-reduced-motion: reduce) {
    .process-page *,
    .process-page *::before,
    .process-page *::after,
    .process-modal *,
    .process-modal *::before,
    .process-modal *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .process-page.process-motion [data-process-reveal],
    [data-hero-line],
    [data-hero-reveal] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}