/* ============================================================
   5. Steps — numbered stepper + CTA
   ============================================================ */

.steps { background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 55%, #ffffff 100%); }
.steps__head { text-align: center; }

.stepper {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: clamp(2.6rem, 5vw, 4rem) 0 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.stepper::before {
    /* single continuous rail behind the indicators */
    content: "";
    position: absolute;
    top: 28px;
    inset-inline: 16.66%;
    height: 2px;
    background: linear-gradient(90deg, rgba(31, 122, 224, 0.12), rgba(31, 122, 224, 0.4), rgba(31, 122, 224, 0.12));
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.6s var(--ease-spring);
}

.step__num {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #d4e3f5;              /* opaque so the rail doesn't show through */
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    transition: transform 0.5s var(--ease-spring), background 0.4s ease, color 0.4s ease;
}
.step:hover .step__num {
    transform: scale(1.15);
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: #ffffff;
}

/* siblings drift away from the hovered step (physical X flipped per dir) */
:root { --drift: -8px; }
[dir="ltr"] { --drift: 8px; }
.stepper:has(.step:nth-child(1):hover) .step:nth-child(2) { transform: translateX(var(--drift)); }
.stepper:has(.step:nth-child(1):hover) .step:nth-child(3) { transform: translateX(calc(var(--drift) * 2)); }
.stepper:has(.step:nth-child(2):hover) .step:nth-child(1) { transform: translateX(calc(var(--drift) * -1)); }
.stepper:has(.step:nth-child(2):hover) .step:nth-child(3) { transform: translateX(var(--drift)); }
.stepper:has(.step:nth-child(3):hover) .step:nth-child(1) { transform: translateX(calc(var(--drift) * -2)); }
.stepper:has(.step:nth-child(3):hover) .step:nth-child(2) { transform: translateX(calc(var(--drift) * -1)); }

.step__title {
    margin: 1.1rem 0 0.4rem;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--ink);
}
.step__desc {
    margin: 0;
    max-width: 20rem;
    color: var(--muted-2);
    font-size: 0.96rem;
    line-height: 1.65;
}

.steps__cta {
    display: flex;
    justify-content: center;
    margin-top: clamp(2.2rem, 4vw, 3.2rem);
}

@media (max-width: 760px) {
    .stepper { grid-template-columns: 1fr; gap: 0; }
    /* no full-height rail on mobile — it would run through the text.
       Instead, each step draws a short faded connector down to the next circle. */
    .stepper::before { display: none; }
    .step:not(:last-child)::after {
        content: "";
        width: 2px;
        height: 3.4rem;
        margin: 1.4rem auto;
        border-radius: 2px;
        background: linear-gradient(180deg,
            transparent 0%,
            rgba(31, 122, 224, 0.4) 32%,
            rgba(31, 122, 224, 0.4) 68%,
            transparent 100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .step, .step__num { transition: none; }
}
