/* =========================================================
   VALYX — HOW IT WORKS
   Minimal unified dark panel
   ========================================================= */

.valyx-how-it-works {
    --vhi-container: 1200px;
    --vhi-brand: #0f172a;
    --vhi-brand-deep: #0b1324;
    --vhi-text: #101828;
    --vhi-muted: #667085;
    --vhi-blue: #2563eb;
    --vhi-white: #ffffff;
    --vhi-card-muted: rgba(255, 255, 255, 0.66);
    --vhi-divider: rgba(255, 255, 255, 0.12);
    --vhi-light-divider: #e6eaf0;

    width: 100%;

    background: #ffffff;
    color: var(--vhi-text);

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.valyx-how-it-works,
.valyx-how-it-works *,
.valyx-how-it-works *::before,
.valyx-how-it-works *::after {
    box-sizing: border-box;
}

.valyx-how-it-works__inner {
    width: min(calc(100% - 48px), var(--vhi-container));

    margin-inline: auto;
    padding: 72px 0 86px;
}

/* Header mirrors Featured Products */

.valyx-how-it-works__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 32px;

    margin-bottom: 25px;
}

.valyx-how-it-works__eyebrow {
    margin: 0 0 8px;

    color: var(--vhi-blue);

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.valyx-how-it-works__title {
    margin: 0;

    color: var(--vhi-brand);

    font-size: clamp(28px, 2.5vw, 36px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.045em;
}

.valyx-how-it-works__description {
    max-width: 540px;

    margin: 11px 0 0;

    color: var(--vhi-muted);

    font-size: 14px;
    line-height: 1.55;
}

.valyx-how-it-works__header-link {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    padding-bottom: 3px;

    color: var(--vhi-brand);

    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;

    text-decoration: none;

    transition:
        transform 0.18s ease,
        color 0.18s ease;
}

.valyx-how-it-works__header-link:hover {
    transform: translateX(2px);

    color: var(--vhi-blue);
}

.valyx-how-it-works__header-link svg {
    width: 14px;
    height: 14px;

    stroke: currentColor;
}

/* Unified process panel */

.valyx-how-it-works__panel {
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;

    background:
        radial-gradient(
            circle at 86% 0%,
            rgba(37, 99, 235, 0.17) 0%,
            rgba(37, 99, 235, 0) 32%
        ),
        linear-gradient(
            145deg,
            #111c31 0%,
            var(--vhi-brand) 58%,
            var(--vhi-brand-deep) 100%
        );

    box-shadow:
        0 18px 46px
        rgba(15, 23, 42, 0.13);
}

.valyx-how-it-works__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.valyx-how-it-works__step {
    position: relative;

    min-width: 0;
    min-height: 300px;

    display: flex;
    flex-direction: column;

    padding: 32px 30px 30px;
}

.valyx-how-it-works__step:not(:last-child)::after {
    content: "";

    position: absolute;
    top: 32px;
    right: 0;
    bottom: 32px;

    width: 1px;

    background: var(--vhi-divider);
}

.valyx-how-it-works__step-head {
    min-height: 48px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;
}

/*
 * No icon container.
 * The icon itself carries the visual weight of the removed 44px box.
 */

.valyx-how-it-works__icon {
    width: 46px;
    height: 46px;

    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: flex-start;

    border: 0;
    border-radius: 0;

    background: transparent;
    color: rgba(255, 255, 255, 0.94);

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.valyx-how-it-works__icon svg {
    width: 44px;
    height: 44px;

    display: block;

    overflow: visible;

    stroke: currentColor;
}

.valyx-how-it-works__number {
    padding-top: 5px;

    color: #60a5fa;

    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.valyx-how-it-works__step-copy {
    margin-top: 34px;
}

.valyx-how-it-works__step-title {
    max-width: 270px;

    margin: 0;

    color: #ffffff;

    font-size: 20px;
    line-height: 1.18;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.valyx-how-it-works__step-text {
    max-width: 290px;

    margin: 12px 0 0;

    color: var(--vhi-card-muted);

    font-size: 12px;
    line-height: 1.62;
}

.valyx-how-it-works__step-link {
    margin-top: auto;
    padding-top: 30px;

    display: inline-flex;
    align-items: center;
    align-self: flex-start;

    gap: 8px;

    color: #ffffff;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;

    text-decoration: none;

    transition:
        gap 0.18s ease,
        color 0.18s ease;
}

.valyx-how-it-works__step-link:hover {
    gap: 11px;

    color: #bfdbfe;
}

.valyx-how-it-works__step-link svg {
    width: 14px;
    height: 14px;

    stroke: currentColor;
}

/* CTA rendered beneath the dark panel */

.valyx-how-it-works__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 28px;

    margin-top: 22px;
    padding: 0 2px 18px;

    border-bottom: 1px solid var(--vhi-light-divider);
}

.valyx-how-it-works__cta p {
    max-width: 760px;

    margin: 0;

    color: var(--vhi-muted);

    font-size: 11px;
    line-height: 1.55;
}

.valyx-how-it-works__cta a {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: var(--vhi-brand);

    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;

    text-decoration: none;

    transition:
        gap 0.18s ease,
        color 0.18s ease;
}

.valyx-how-it-works__cta a:hover {
    gap: 10px;

    color: var(--vhi-blue);
}

.valyx-how-it-works__cta a svg {
    width: 14px;
    height: 14px;

    stroke: currentColor;
}

/* Tablet */

@media (max-width: 980px) {
    .valyx-how-it-works__step {
        padding-inline: 24px;
    }

    .valyx-how-it-works__step-title {
        font-size: 18px;
    }

    .valyx-how-it-works__icon,
    .valyx-how-it-works__icon svg {
        width: 40px;
        height: 40px;
    }
}

/* Mobile */

@media (max-width: 720px) {
    .valyx-how-it-works__inner {
        width: 100%;

        padding: 54px 18px 66px;
    }

    .valyx-how-it-works__header {
        align-items: flex-start;

        margin-bottom: 20px;
    }

    .valyx-how-it-works__eyebrow {
        font-size: 9px;
    }

    .valyx-how-it-works__title {
        font-size: 27px;
    }

    .valyx-how-it-works__description {
        max-width: 330px;

        margin-top: 8px;

        font-size: 12px;
        line-height: 1.5;
    }

    .valyx-how-it-works__header-link {
        padding-top: 24px;

        font-size: 10px;
    }

    .valyx-how-it-works__header-link span {
        display: none;
    }

    .valyx-how-it-works__header-link svg {
        width: 18px;
        height: 18px;
    }

    /*
     * Desktop remains one unified panel.
     * Mobile removes the shared panel surface and turns each step
     * into its own premium navy card.
     */

    .valyx-how-it-works__panel {
        overflow: visible;

        border: 0;
        border-radius: 0;

        background: transparent;

        box-shadow: none;
    }

    .valyx-how-it-works__steps {
        display: grid;
        grid-template-columns: minmax(0, 1fr);

        gap: 12px;
    }

    .valyx-how-it-works__step {
        min-height: 0;

        overflow: hidden;

        padding: 21px 20px 20px;

        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;

        background:
            radial-gradient(
                circle at 92% 6%,
                rgba(37, 99, 235, 0.17) 0%,
                rgba(37, 99, 235, 0) 31%
            ),
            linear-gradient(
                145deg,
                #111c31 0%,
                var(--vhi-brand) 60%,
                var(--vhi-brand-deep) 100%
            );

        box-shadow:
            0 12px 30px
            rgba(15, 23, 42, 0.12);
    }

    .valyx-how-it-works__step:not(:last-child)::after {
        content: none;

        display: none;
    }

    .valyx-how-it-works__step-head {
        min-height: 40px;

        align-items: center;
    }

    .valyx-how-it-works__icon {
        width: 40px;
        height: 40px;
    }

    .valyx-how-it-works__icon svg {
        width: 38px;
        height: 38px;
    }

    .valyx-how-it-works__number {
        order: -1;

        padding-top: 0;

        font-size: 9px;
        letter-spacing: 0.13em;
    }

    .valyx-how-it-works__step-copy {
        margin-top: 20px;
    }

    .valyx-how-it-works__step-title {
        max-width: 100%;

        font-size: 18px;
        line-height: 1.22;
    }

    .valyx-how-it-works__step-text {
        max-width: 100%;

        margin-top: 9px;

        font-size: 10.5px;
        line-height: 1.58;
    }

    .valyx-how-it-works__step-link {
        margin-top: 19px;
        padding-top: 0;

        font-size: 9.5px;
    }

    .valyx-how-it-works__cta {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            auto;

        align-items: center;

        gap: 14px;

        margin-top: 17px;
        padding: 0 2px 14px;
    }

    .valyx-how-it-works__cta p {
        max-width: 100%;

        font-size: 9px;
        line-height: 1.5;
    }

    .valyx-how-it-works__cta a {
        font-size: 9px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .valyx-how-it-works__cta {
        grid-template-columns: minmax(0, 1fr);
    }

    .valyx-how-it-works__cta a {
        margin-top: 1px;
    }
}

@media (max-width: 390px) {
    .valyx-how-it-works__inner {
        padding-inline: 15px;
    }

    .valyx-how-it-works__step {
        padding: 19px 18px 18px;

        border-radius: 15px;
    }

    .valyx-how-it-works__step-title {
        font-size: 17px;
    }

    .valyx-how-it-works__step-text {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .valyx-how-it-works__header-link,
    .valyx-how-it-works__step-link,
    .valyx-how-it-works__cta a {
        transition-duration: 0.01ms;
    }
}
