/* ============================================================
   СЕКЦИЯ "Как я работаю" id="process" — шаги процесса (.proc-step, .pnum, .pbody, .ptitle, .pdesc, .process-line), а также эффект конфетти (.confetti-*), который запускается по завершении анимации шагов.
   ============================================================ */

.process-wrapper {
    position: relative;
    max-width: var(--container-narrow, 600px);
    margin: 0 auto;
    padding: 10px 0;
}

.process-line {
    position: absolute;
    left: 24px;
    top: 30px;
    bottom: 30px;
    width: 3px;
    background: rgba(255, 184, 48, 0.06);
    z-index: 0;
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.process-line.visible {
    opacity: 1;
}

.process-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, #FFB830, rgba(255, 184, 48, 0.15));
    border-radius: 2px;
    transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 20px rgba(255, 184, 48, 0.05);
}

.process-line.filled::after {
    height: 100%;
}

@media (min-width: 1024px) {
    .process-line {
        position: absolute;
        left: 5%;
        right: 5%;
        top: 28px;
        bottom: auto;
        width: auto;
        height: 3px;
        background: rgba(255, 184, 48, 0.06);
    }

    .process-line::after {
        width: 0%;
        height: 100%;
        background: linear-gradient(90deg, #FFB830, rgba(255, 184, 48, 0.15));
        transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .process-line.filled::after {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 1023px) {
    .process-line {
        left: 20px;
        top: 24px;
        bottom: 24px;
    }
}

.process-list {
    position: relative;
    display: flex;
    flex-direction: column;
    *gap: 26px;
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.process-list::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), rgba(255, 184, 48, 0.06));
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top center;
    transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    border-radius: 2px;
}

.process-list.animated::before {
    opacity: 1;
    transform: scaleY(1);
}

@media (min-width: 1024px) {
    .process-list {
        flex-direction: row;
        justify-content: space-between;
        *gap: 18px;
        align-items: flex-start;
        max-width: none;
        padding-top: 10px;
    }

    .process-list::before {
        left: 5%;
        right: 5%;
        top: 72px;
        bottom: auto;
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, var(--gold), rgba(255, 184, 48, 0.06));
        transform: scaleX(0);
        transform-origin: left center;
    }

    .process-list.animated::before {
        transform: scaleX(1);
    }
}

.proc-step {
    position: relative;
    z-index: 1;
    padding-left: 60px;
    padding-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.proc-step:last-child {
    padding-bottom: 0;
}

.proc-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.proc-step .pnum {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-display, "Oswald", sans-serif);
    font-size: 18px;
    font-weight: 700;
    background: var(--dark);
    border: 2px solid var(--gold);
    color: var(--gold);
    box-shadow: 0 0 0 6px rgba(255, 184, 48, 0.05), 0 0 22px rgba(255, 184, 48, 0.1);
    z-index: 5;
    transform: scale(0.6);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.6s ease,
                border-color 0.6s ease;
}

.proc-step.visible .pnum {
    transform: scale(1);
}

.proc-step:last-child.visible .pnum {
    box-shadow: 0 0 0 8px rgba(255, 184, 48, 0.08), 0 0 40px rgba(255, 184, 48, 0.2);
    animation: finalPulse 2s ease-in-out infinite 1s;
}

.proc-step .pbody {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s,
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
}

.proc-step.visible .pbody {
    opacity: 1;
    transform: translateX(0);
}

.proc-step .pbody .ptitle {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.proc-step .pbody .pdesc {
    font-size: 13px;
    color: var(--text-dim, rgba(212, 200, 232, 0.6));
    line-height: 1.6;
}

.proc-step:last-child .pbody.pfinal {
    border: 1px solid rgba(0, 230, 138, 0.2);
    background: rgba(0, 230, 138, 0.04);
    border-radius: 12px;
    padding: 14px 18px;
}

.proc-step:last-child .pbody .ptitle.pfinal {
    color: var(--green, #00E68A);
}

@media (min-width: 1024px) {
    .process-wrapper {
        max-width: none;
        padding-top: 10px;
    }

    .process-list {
        display: flex;
        justify-content: space-between;
        *gap: 18px;
        position: relative;
        padding-top: 50px;
    }

    /* ── Единая линия — горизонтальная ── */
    .process-line {
        position: absolute;
        left: 5%;
        right: 5%;
        top: 82px;
        bottom: auto;
        width: auto;
        height: 3px;
        background: rgba(255, 184, 48, 0.06);
        display: none;
    }

    .process-line-fill {
        width: 0%;
        height: 100%;
        background: linear-gradient(90deg, var(--gold), rgba(255, 184, 48, 0.15));
        transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .process-line-head {
        top: 50% !important;
        left: 0;
        transform: translate(-50%, -50%);
        transition: left 1.2s cubic-bezier(0.22, 1, 0.36, 1);
        width: 18px;
        height: 18px;
        display: none;
    }

    .process-line-head.show {
        left: 100% !important;
    }

    .process-line-head.final {
        left: 100% !important;
        animation: headFinalPulseDesktop 2s ease-in-out infinite;
    }

    @keyframes headFinalPulseDesktop {
        0%, 100% {
            box-shadow: 0 0 30px rgba(255, 184, 48, 0.5), 0 0 80px rgba(255, 184, 48, 0.15);
            transform: translate(-50%, -50%) scale(1);
        }
        50% {
            box-shadow: 0 0 50px rgba(255, 184, 48, 0.8), 0 0 120px rgba(255, 184, 48, 0.2);
            transform: translate(-50%, -50%) scale(1.2);
        }
    }

    .process-line-fade {
        right: -2px;
        left: auto;
        top: 0;
        bottom: auto;
        width: 40px;
        height: 100%;
        background: linear-gradient(to right, rgba(255, 184, 48, 0.2), transparent);
    }

    /* ── Шаги на десктопе ── */
    .proc-step {
        flex: 1;
        padding-left: 0;
        padding-bottom: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .proc-step .pnum {
        position: relative;
        margin-bottom: 16px;
        flex-shrink: 0;
        top: auto;
        left: auto;
    }

    .proc-step .pbody {
        text-align: center;
        transform: translateY(-10px);
        opacity: 0;
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s,
                    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
    }

    .proc-step.visible .pbody {
        opacity: 1;
        transform: translateY(0);
    }

    .proc-step .pbody .pdesc {
        font-size: 12px;
    }

    .proc-step:last-child .pbody.pfinal {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .proc-step {
        padding-left: 56px;
        padding-bottom: 24px;
    }

    .proc-step .pnum {
        width: 40px;
        height: 40px;
        font-size: 15px;
        top: 2px;
    }

    .proc-step .pbody .ptitle {
        font-size: 14px;
    }

    .proc-step .pbody .pdesc {
        font-size: 12px;
    }

    .process-line {
        left: 20px;
        top: 24px;
        bottom: 24px;
    }

    .process-line-head {
        width: 14px;
        height: 14px;
    }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confettiFall linear forwards;
}

.confetti-piece .confetti-inner {
    width: 100%;
    height: 100%;
    border-radius: 2px;
    animation: confettiRotate linear infinite;
}

.confetti-piece.circle .confetti-inner {
    border-radius: 50%;
}

.confetti-piece.rectangle .confetti-inner {
    border-radius: 2px;
    width: 8px;
    height: 14px;
}

.confetti-piece.triangle .confetti-inner {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid currentColor;
    background: transparent !important;
}

.confetti-piece.star .confetti-inner {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    border-radius: 0;
    background: currentColor !important;
}

@media (max-width: 600px) {
    .confetti-piece {
        width: 6px;
        height: 6px;
    }
    .confetti-piece.rectangle .confetti-inner {
        width: 5px;
        height: 10px;
    }
    .confetti-piece.triangle .confetti-inner {
        border-left-width: 5px;
        border-right-width: 5px;
        border-bottom-width: 10px;
    }
}

.process-list::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), rgba(255, 184, 48, 0.06));
}

.proc-step {
  display: flex;
  gap: 18px;
  position: relative;
}

.pnum {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  font-family: var(--f-display);
  background: var(--dark);
  border: 2px solid var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 6px rgba(255, 184, 48, 0.05), 0 0 22px rgba(255, 184, 48, 0.22);
}

.pnum.pn5 {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #08040C;
  box-shadow: 0 0 0 6px rgba(255, 184, 48, 0.08), 0 0 30px rgba(255, 184, 48, 0.4);
}

.pbody {
  flex: 1;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}

.pbody.pfinal {
  border: 1px solid rgba(0, 230, 138, 0.35);
  background: rgba(0, 230, 138, 0.04);
}

.ptitle {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.ptitle.pfinal {
  color: var(--green);
}

.pdesc {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.6;
}

@media (min-width: 1024px) {
  .process-list {
    max-width: none;
    flex-direction: row;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
  }
  .process-list::before {
    left: 5%;
    right: 5%;
    top: 72px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), rgba(255, 184, 48, 0.06));
  }
  .proc-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    gap: 16px;
  }
  .pbody {
    padding: 18px 16px;
    width: 100%;
  }
  .pdesc {
    font-size: 12px;
  }
}

