/* Students — Journey: путь участника и экосистема обучения. */

/* Каркас секции */
#how-we-work {
    width: 100%;
    padding-block: clamp(6.5rem, 10vw, 8rem);
    background: transparent;
}

#how-we-work .process-timeline-container {
    position: relative;
    width: 100%;
    margin-bottom: 5rem;
}

/* Таймлайн */
#how-we-work .process-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

#how-we-work .timeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#how-we-work .timeline-step:not(:last-child) .step-meta::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: calc(100% + 2.5rem);
    height: 1px;
    background: var(--border);
    transition: background-color 0.2s ease;
}

#how-we-work .step-meta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
}

#how-we-work .step-badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#how-we-work .step-index {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
}

#how-we-work .step-status {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#how-we-work .step-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#how-we-work .step-body h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

#how-we-work .step-body p {
    max-width: 28ch;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
    text-wrap: pretty;
}

#how-we-work .timeline-step:hover .step-badge {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Экосистема */
#how-we-work .ecosystem-title-block {
    width: 100%;
    margin-top: 6.5rem;
    margin-bottom: 1.5rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border);
}

#how-we-work .workspace-eyebrow {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#how-we-work .ecosystem-title-block h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    letter-spacing: -0.03em;
}

#how-we-work .ecosystem-bento {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: transparent;
}

#how-we-work .bento-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(2.5rem, 4vw, 3.5rem);
    overflow: hidden;
    background: transparent;
}

#how-we-work .bento-cell:not(:last-child) {
    border-right: 1px solid var(--border);
}

#how-we-work .bento-content {
    position: relative;
    z-index: 2;
}

#how-we-work .bento-bg-char {
    position: absolute;
    right: 2rem;
    bottom: -1.5rem;
    z-index: 1;
    color: var(--border);
    font-family: monospace, sans-serif;
    font-size: clamp(8rem, 12vw, 11rem);
    font-weight: 900;
    line-height: 1;
    opacity: 0.12;
    user-select: none;
    pointer-events: none;
    transform-origin: bottom right;
    transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#how-we-work .eco-tag-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
}

#how-we-work .eco-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

#how-we-work .bento-cell h4 {
    margin: 0 0 0.75rem;
    color: var(--text-primary);
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

#how-we-work .bento-cell p {
    max-width: 42ch;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    text-wrap: pretty;
}

/* Hover и mobile-focus */
#how-we-work .bento-cell:hover .bento-bg-char,
#how-we-work .bento-cell.mobile-focus .bento-bg-char {
    color: var(--accent);
    opacity: 0.25;
    transform: scale(1.05) translateY(-5px);
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

#how-we-work .bento-cell:hover .eco-tag,
#how-we-work .bento-cell.mobile-focus .eco-tag {
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Анимация появления */
#how-we-work .timeline-step,
#how-we-work .ecosystem-title-block,
#how-we-work .ecosystem-bento,
#how-we-work .bento-cell {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Адаптивная компоновка */
@media (max-width: 1024px) {
    #how-we-work .process-timeline {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

    #how-we-work .process-timeline::before {
        display: none !important;
    }

    #how-we-work .timeline-step:not(:last-child) .step-meta::after {
        display: none !important;
    }

    #how-we-work .timeline-step {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    #how-we-work .step-meta {
        width: auto;
        justify-content: flex-start;
        margin-bottom: 1.25rem;
    }

    #how-we-work .timeline-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 16px;
        left: 16px;
        z-index: 1;
        width: 1px;
        height: calc(100% + 3.5rem);
        background: var(--border);
    }

    #how-we-work .step-badge {
        padding-left: 1.25rem;
        background: var(--bg-primary);
    }

    #how-we-work .step-body {
        align-items: flex-start;
        padding-bottom: 0;
        padding-left: 2.5rem;
    }

    #how-we-work .step-body h3 {
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    #how-we-work .step-body p {
        max-width: 100%;
    }

    #how-we-work .ecosystem-title-block {
        margin-top: 4rem;
        margin-bottom: 1.5rem;
        padding-top: 3rem;
        text-align: center;
    }

    #how-we-work .ecosystem-bento {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    #how-we-work .bento-cell {
        padding: 2.5rem 1.5rem;
    }

    #how-we-work .bento-cell:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    #how-we-work .bento-bg-char {
        right: 1rem;
        bottom: -1rem;
        font-size: 7rem;
    }
}
