/* ========================================
   RASTI - ¿Cómo lo hacemos? Page
   ======================================== */

.how-hero-section {
    padding-top: calc(var(--navbar-height, 72px) + 2.5rem);
    padding-bottom: 1rem;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.how-hero-section::before,
.how-hero-section::after {
    content: none;
}

.how-hero-section::before {
    top: -140px;
    right: -80px;
}

.how-hero-section::after {
    bottom: -180px;
    left: -120px;
}

.how-hero {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.how-title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.how-subtitle {
    font-size: 1.05rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.how-steps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    max-width: 980px;
    margin: 0 auto;
}

/* ── Animación de entrada ── */
.how-step-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.8rem;
    border: 1px solid var(--gray-200);
    box-shadow: 0 10px 30px rgba(20, 23, 38, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    /* Estado inicial: invisible, desplazada y rotada */
    opacity: 0;
    transform: translateY(40px) rotateX(12deg);
    transform-origin: top center;
    transition:
        opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.how-step-card.is-visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

/* Delays escalonados por card */
.how-step-card:nth-child(1) { transition-delay: 0ms; }
.how-step-card:nth-child(2) { transition-delay: 120ms; }
.how-step-card:nth-child(3) { transition-delay: 240ms; }
.how-step-card:nth-child(4) { transition-delay: 360ms; }

/* Sin animación para quienes lo prefieren */
@media (prefers-reduced-motion: reduce) {
    .how-step-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.how-step-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 15%, var(--white));
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.how-step-number {
    font-family: var(--font-display);
}

.how-step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.how-step-text {
    color: var(--gray-700);
    line-height: 1.6;
    margin: 0;
}

.how-step-note {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    padding-left: 0.75rem;
    border-left: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
}

.how-cta-section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.how-cta {
    display: flex;
    justify-content: center;
}

@media (max-width: 900px) {
    .how-steps-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .how-hero-section {
        padding-top: calc(var(--navbar-height, 72px) + env(safe-area-inset-top));
    }
}

@media (max-width: 640px) {

    .how-step-card {
        padding: 1.4rem;
    }

    .how-hero {
    margin-top: 3rem;
    }
}
