/* =========================================================
   Section 6 — How We Work / Process
   Scoped under .nx-process. Reuses --nx-* tokens.
   Does not modify Sections 1–5.
   ========================================================= */

.nx-process {
    position: relative;
    background: var(--nx-bg);
    color: var(--nx-text);
    padding: clamp(5rem, 12vh, 9rem) 0;
    overflow: hidden;
    border-top: 1px solid var(--nx-border);
}

.nx-process__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 50% 35% at 70% 18%, rgba(79, 124, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 35% 30% at 15% 80%, rgba(79, 124, 255, 0.035) 0%, transparent 55%);
}

.nx-process__inner {
    position: relative;
    z-index: 1;
}

/* Header */
.nx-process__header {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    grid-template-areas:
        "eyebrow eyebrow"
        "title description";
    column-gap: clamp(2rem, 5vw, 4.5rem);
    row-gap: 1.15rem;
    align-items: end;
    margin-bottom: clamp(3.5rem, 7vh, 5rem);
}

.nx-process__eyebrow {
    grid-area: eyebrow;
}

.nx-process__title {
    grid-area: title;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 4.4vw, 3.75rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--nx-text);
    max-width: 12em;
}

.nx-process__description {
    grid-area: description;
    margin: 0;
    max-width: 32rem;
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    line-height: 1.65;
    color: var(--nx-text-muted);
    padding-bottom: 0.25rem;
}

/* Timeline — desktop horizontal */
.nx-process__timeline {
    list-style: none;
    margin: 0 0 clamp(3.5rem, 7vh, 5.5rem);
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 1.25rem;
    position: relative;
    counter-reset: none;
}

/* Connecting line behind nodes */
.nx-process__timeline::before {
    content: '';
    position: absolute;
    left: 12.5%;
    right: 12.5%;
    top: 2.85rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
    transform-origin: left center;
}

.nx-process__timeline.is-visible::before {
    animation: nxProcessLine 0.9s ease 0.15s both;
}

@keyframes nxProcessLine {
    from { transform: scaleX(0); opacity: 0.4; }
    to { transform: scaleX(1); opacity: 1; }
}

.nx-process__step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0;
    transition: background-color 0.3s ease;
}

.nx-process__number {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--nx-text-muted);
    margin-bottom: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.nx-process__node {
    display: block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    background: var(--nx-bg);
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 2;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        background-color 0.3s ease;
}

.nx-process__step-title {
    margin: 0 0 0.7rem;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--nx-text);
    transition: transform 0.3s ease, color 0.3s ease;
}

.nx-process__step-description {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--nx-text-muted);
    max-width: 18rem;
}

.nx-process__keywords {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(146, 153, 165, 0.7);
    transition: color 0.3s ease;
}

.nx-process__keywords span {
    white-space: nowrap;
}

.nx-process__keywords span:not(:last-child)::after {
    content: '·';
    margin: 0 0.45rem;
    color: rgba(146, 153, 165, 0.35);
}

.nx-process__step:hover .nx-process__node {
    border-color: var(--nx-accent);
    background: rgba(79, 124, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.nx-process__step:hover .nx-process__step-title {
    transform: translateX(3px);
    color: #fff;
}

.nx-process__step:hover .nx-process__keywords {
    color: var(--nx-text-muted);
}

/* Expectations */
.nx-process__expectations {
    padding: clamp(2rem, 4vh, 2.75rem) 0;
    border-top: 1px solid var(--nx-border);
    border-bottom: 1px solid var(--nx-border);
    margin-bottom: clamp(2.5rem, 5vh, 3.5rem);
    max-width: 52rem;
}

.nx-process__expect-eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
}

.nx-process__expect-title {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--nx-text);
    line-height: 1.25;
}

.nx-process__expect-copy {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--nx-text-muted);
    max-width: 36rem;
}

.nx-process__expect-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0;
}

.nx-process__expect-list li {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--nx-text);
    letter-spacing: -0.01em;
}

.nx-process__expect-list li:not(:last-child)::after {
    content: '·';
    margin: 0 0.85rem;
    color: rgba(146, 153, 165, 0.45);
    font-weight: 400;
}

/* Closing */
.nx-process__closing {
    max-width: 36rem;
}

.nx-process__closing-lead {
    margin: 0 0 0.55rem;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 650;
    letter-spacing: -0.025em;
    color: var(--nx-text);
    line-height: 1.3;
}

.nx-process__closing-copy {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--nx-text-muted);
}

/* Reveals */
.nx-process .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.65s ease,
        transform 0.65s ease;
}

.nx-process .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .nx-process .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .nx-process__timeline::before,
    .nx-process__timeline.is-visible::before {
        animation: none !important;
        transform: none;
        opacity: 1;
    }

    .nx-process__node,
    .nx-process__step-title,
    .nx-process__keywords {
        transition: none !important;
    }

    .nx-process__step:hover .nx-process__step-title {
        transform: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .nx-process__step-description {
        max-width: none;
        font-size: 0.88rem;
    }

    .nx-process__step-title {
        font-size: clamp(1.25rem, 2vw, 1.55rem);
    }
}

@media (max-width: 900px) {
    .nx-process__header {
        grid-template-columns: 1fr;
        grid-template-areas:
            "eyebrow"
            "title"
            "description";
        row-gap: 1rem;
        margin-bottom: 3rem;
    }

    .nx-process__title {
        max-width: none;
    }

    /* Vertical journey */
    .nx-process__timeline {
        grid-template-columns: 1fr;
        gap: 0;
        padding-left: 1.35rem;
        margin-bottom: 3rem;
    }

    .nx-process__timeline::before {
        left: 0.3rem;
        right: auto;
        top: 2.4rem;
        bottom: 1.5rem;
        width: 1px;
        height: auto;
        transform-origin: top center;
    }

    .nx-process__timeline.is-visible::before {
        animation-name: nxProcessLineV;
    }

    @keyframes nxProcessLineV {
        from { transform: scaleY(0); opacity: 0.4; }
        to { transform: scaleY(1); opacity: 1; }
    }

    .nx-process__step {
        padding: 0 0 2rem 1.15rem;
        position: relative;
    }

    .nx-process__step:last-child {
        padding-bottom: 0.25rem;
    }

    .nx-process__number {
        margin-bottom: 0.55rem;
    }

    .nx-process__node {
        position: absolute;
        left: -1.35rem;
        top: 1.85rem;
        margin: 0;
        transform: translateX(-1px);
    }

    .nx-process__step:hover .nx-process__step-title {
        transform: none;
    }

    .nx-process__expect-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nx-process__expect-list li {
        width: 100%;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--nx-border);
    }

    .nx-process__expect-list li:first-child {
        border-top: 1px solid var(--nx-border);
    }

    .nx-process__expect-list li:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .nx-process {
        padding: clamp(4.5rem, 10vh, 6rem) 0;
    }
}

@media (max-width: 430px) {
    .nx-process__title {
        font-size: clamp(2rem, 8.5vw, 2.35rem);
    }

    .nx-process__step-title {
        font-size: 1.4rem;
    }
}
