/*<--------------------------------------------------->
<!-- SiguientePaso (section component)               -->
<!----------------------------------------------------->
* Description:
    Closing conversion section for #siguiente-paso with
    approved copy, institutional next-step bullets, and a
    Formspree-ready contact form.
* Parameters:
    - None
* Dependencies:
    - style.css (custom properties, sectionHeader, .content)
    - Formspree endpoint for production submissions
* Returns/results:
    Styles the responsive final CTA section for mobile,
    tablet, and desktop viewports.
<!--------------------------------------------------->*/

/*###################################################*/
/*...................................................*/
/* section shell                                     */
/*...................................................*/
/*###################################################*/

.siguientePaso {
    --siguientePasoBorder: hsla(0, 0%, 100%, 0.09);
    --siguientePasoBorderSoft: hsla(0, 0%, 100%, 0.06);
    --siguientePasoPanel: hsla(0, 0%, 100%, 0.025);
    --siguientePasoField: hsla(0, 0%, 100%, 0.04);
    --siguientePasoMuted: hsla(0, 30%, 96%, 0.52);

    display: flex;
    align-items: center;
    justify-content: center;
}

.siguientePaso > .content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: clamp(4rem, 9vh, 7rem);
}

.siguientePasoLayout {
    width: min(100%, 76rem);
    display: grid;
    gap: clamp(3.25rem, 7vw, 8rem);
    padding: clamp(2.4rem, 7vh, 6rem) 0.5rem 0;

    @media (min-width: 768px) {
        padding-inline: 2rem;
    }

    @media (min-width: 991px) {
        grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.75fr);
        align-items: center;
    }
}

/*###################################################*/
/*...................................................*/
/* end section shell                                 */
/*...................................................*/
/*###################################################*/

/*###################################################*/
/*...................................................*/
/* copy column                                       */
/*...................................................*/
/*###################################################*/

.siguientePasoCopy {
    min-width: 0;
}

.siguientePasoHeader {
    max-width: 38.5rem;
}

.siguientePasoHeader .sectionHeaderMeta {
    margin-bottom: 1.35rem;
}

.siguientePasoTitle {
    max-width: 40rem;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: 0;
    color: hsla(0, 0%, 100%, 1);
}

.siguientePasoIntro {
    max-width: 34rem;
    margin: 1.65rem 0 0;
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1vw, 1rem);
    line-height: 1.78;
    color: var(--siguientePasoMuted);
}

.siguientePasoNotice {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    max-width: 34rem;
    margin: 2rem 0 0;
    padding: 0.85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--primary) 48%, transparent);
    background: hsla(25, 96%, 50%, 0.035);
    font-family: var(--font-body);
    font-size: 0.76rem;
    line-height: 1.6;
    color: var(--primary-mono);
}

.siguientePasoNoticeDot {
    width: 0.35rem;
    height: 0.35rem;
    flex: 0 0 auto;
    margin-top: 0.42rem;
    border-radius: 999px;
    background: var(--primary);
}

.siguientePasoList {
    display: grid;
    gap: 1.8rem;
    max-width: 42rem;
    margin: clamp(3rem, 7vw, 4rem) 0 0;
    padding: 0;
    list-style: none;
}

.siguientePasoItem {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr);
    gap: 1.05rem;
}

.siguientePasoArrow {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--primary);
}

.siguientePasoItemBody {
    display: grid;
    gap: 0.45rem;
}

.siguientePasoItemBody strong {
    font-family: var(--font-display);
    font-size: clamp(0.94rem, 1vw, 1.05rem);
    font-weight: 600;
    line-height: 1.35;
    color: hsla(0, 0%, 100%, 0.92);
}

.siguientePasoItemBody span {
    font-family: var(--font-body);
    font-size: clamp(0.78rem, 0.85vw, 0.9rem);
    line-height: 1.65;
    color: hsla(0, 30%, 96%, 0.42);
}

/*###################################################*/
/*...................................................*/
/* end copy column                                   */
/*...................................................*/
/*###################################################*/

/*###################################################*/
/*...................................................*/
/* form panel                                        */
/*...................................................*/
/*###################################################*/

.siguientePasoFormPanel {
    width: 100%;
    max-width: 38rem;
    justify-self: center;
    padding: clamp(1.75rem, 4vw, 2.45rem);
    border: 1px solid var(--siguientePasoBorder);
    border-radius: 8px;
    background: var(--siguientePasoPanel);

    @media (min-width: 991px) {
        max-width: 26rem;
        justify-self: end;
    }
}

.siguientePasoFormTitle {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1.35vw, 1.45rem);
    font-weight: 700;
    line-height: 1.25;
    color: hsla(0, 0%, 100%, 0.94);
}

.siguientePasoFormIntro {
    margin: 0.6rem 0 1.8rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.6;
    color: hsla(0, 30%, 96%, 0.36);
}

.siguientePasoForm {
    display: grid;
    gap: 1rem;
}

.siguientePasoStatus {
    margin: 0 0 1rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    line-height: 1.55;
    color: hsla(0, 30%, 96%, 0.68);

    &.success {
        margin-top: 1rem;
        margin-bottom: 0;
        padding: 0.8rem 0.95rem;
        border: 1px solid color-mix(in srgb, var(--contrast) 58%, transparent);
        border-radius: 4px;
        color: var(--contrast-mono);
        background: hsla(0, 0%, 100%, 0.035);
    }

    &.error {
        margin-top: 1rem;
        margin-bottom: 0;
        padding: 0.8rem 0.95rem;
        border: 1px solid hsla(0, 30%, 96%, 0.18);
        border-radius: 4px;
        color: hsla(0, 30%, 96%, 0.78);
        background: hsla(0, 0%, 100%, 0.05);
    }
}

.siguientePasoField {
    position: relative;
    display: grid;
    gap: 0.45rem;
}

.siguientePasoField label {
    font-family: var(--font-display);
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsla(0, 30%, 96%, 0.54);
}

.siguientePasoField input,
.siguientePasoField select {
    width: 100%;
    min-height: 3rem;
    padding: 0 0.9rem;
    border: 1px solid hsla(0, 0%, 100%, 0.12);
    border-radius: 4px;
    background: var(--siguientePasoField);
    color: hsla(0, 30%, 96%, 0.82);
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.2;
    transition: border-color 0.2s ease, background-color 0.2s ease;

    &::placeholder {
        color: hsla(0, 30%, 96%, 0.26);
    }

    &:focus-visible {
        outline: 2px solid color-mix(in srgb, var(--primary) 42%, transparent);
        outline-offset: 2px;
        border-color: var(--primary);
        background: hsla(0, 0%, 100%, 0.055);
    }

    &[aria-invalid="true"] {
        border-color: var(--primary-mono);
    }

    &:user-invalid {
        border-color: var(--primary-mono);
    }
}

.siguientePasoField select {
    padding-right: 2.1rem;
}

@supports selector(:has(select)) {
    .siguientePasoField:has(select) {
        &::after {
            content: "";
            position: absolute;
            right: 1rem;
            bottom: 1.1rem;
            width: 0.45rem;
            height: 0.45rem;
            border-right: 1px solid hsla(0, 30%, 96%, 0.34);
            border-bottom: 1px solid hsla(0, 30%, 96%, 0.34);
            transform: rotate(45deg);
            pointer-events: none;
        }

        & select {
            appearance: none;
        }
    }
}

.siguientePasoSubmit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    min-height: 3.35rem;
    margin-top: 0.7rem;
    padding: 0.9rem 1.25rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: var(--primary);
    color: hsla(0, 0%, 100%, 1);
    font-family: var(--font-display);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;

    &:hover {
        opacity: 0.9;
    }

    &:active {
        transform: translateY(1px);
    }

    &:focus-visible {
        outline: 2px solid hsla(0, 0%, 100%, 0.8);
        outline-offset: 3px;
    }

    &:disabled {
        cursor: wait;
        opacity: 0.68;
        transform: none;
    }
}

.siguientePasoSubmit span {
    align-items: center;
    justify-content: center;
    gap: 0.8rem;

    &:not([hidden]) {
        display: inline-flex;
    }
}

.siguientePasoConsent {
    max-width: 24rem;
    margin: 1rem auto 0;
    font-family: var(--font-body);
    font-size: 0.72rem;
    line-height: 1.55;
    text-align: center;
    color: hsla(0, 30%, 96%, 0.34);
}

.siguientePasoConsent.success,
.siguientePasoConsent.error {
    max-width: none;
    text-align: left;
}

.siguientePasoTrap {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/*###################################################*/
/*...................................................*/
/* end form panel                                    */
/*...................................................*/
/*###################################################*/

/*<!--------------------------------------------------->
<!--  end SiguientePaso                              -->
<!--------------------------------------------------->*/
