/* ============================================
   SECTION: Our Approach — How It Works
   "Your family's journey" — cream panel (background
   image with swirls baked in) holding a centered
   header and three slightly-rotated value cards.
   ============================================ */

.approach-how {
    padding: 20px var(--section-side-padding) 0;
    background: var(--color-white);
}

.approach-how__panel {
    max-width: var(--container-max);
    margin-inline: auto;
    padding: 80px 32px 72px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fffbf1;     /* cream fallback under the image */
    background-image: url("../../../images/approach/family-journey-bg.9405dbe7796f.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* ----- Header (centered) ----- */
.approach-how__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin-bottom: 56px;
}

.approach-how__eyebrow {
    color: var(--color-accent-yellow-label);   /* gold */
    margin-bottom: 18px;
}

.approach-how__heading {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: var(--font-weight-normal);
    line-height: 50px;
    color: #484336;
    margin: 0;
}

.approach-how__heading .accent-script {
    color: var(--color-primary);
}

.approach-how__lede {
    max-width: 486px;
    font-size: 16px;
    line-height: 26px;
    color: var(--color-text-faint);
    margin: 0;
}

/* ----- Cards row ----- */
.approach-how__cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.approach-how__card {
    flex: 0 1 320px;
    min-height: 284px;
    padding: 32px;
    background: var(--color-white);
    border: 2px solid var(--color-surface-line-soft);
    border-radius: 12px;
    box-shadow: 0 15px 32px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Playful scatter — alternating slight tilt */
.approach-how__card:nth-child(1) { transform: rotate(-3deg); }
.approach-how__card:nth-child(2) { transform: rotate(2deg); }
.approach-how__card:nth-child(3) { transform: rotate(-3deg); }

.approach-how__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--color-primary-light);
    border-radius: var(--radius-full);
    margin-bottom: 40px;
}

.approach-how__card-title {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: var(--font-weight-medium);
    line-height: 32px;
    color: var(--color-text-heading);
    margin: 0 0 8px;
}

.approach-how__card-desc {
    font-size: 16px;
    line-height: 26px;
    color: var(--color-text-body);
    margin: 0;
}

/* Scroll-position bars — phones only */
.approach-how__bars {
    display: none;
    gap: 7px;
    margin-top: 24px;
}

.approach-how__bar {
    flex: 1 1 0;
    height: 4px;
    border-radius: 100px;
    background: var(--color-primary-light);
    transition: background-color var(--transition-fast);
}

.approach-how__bar.is-active {
    background: var(--color-primary);
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .approach-how__panel {
        padding: 56px 20px 48px;
    }
    .approach-how__heading {
        font-size: 32px;
        line-height: 38px;
    }
    .approach-how__cards {
        gap: 20px;
    }
    /* straighten the cards when stacked so they read cleanly */
    .approach-how__card:nth-child(1),
    .approach-how__card:nth-child(2),
    .approach-how__card:nth-child(3) {
        transform: none;
        flex-basis: 100%;
        max-width: 360px;
        min-height: 0;
    }
}

/* ----- Phones -----
   Cards become a snapping horizontal scroller with position bars, and the
   panel swaps its baked-in background for the two corner brush marks. */
@media (max-width: 600px) {
    .approach-how__header {
        margin-bottom: 40px;
    }

    .approach-how__panel {
        background-image: url("../../../images/decorative/vector-271-howitworks.c6d1119c3594.svg"),
                          url("../../../images/decorative/vector-270-how-it-works.412691d8ab29.svg");
        background-position: left top, right bottom;
        background-size: 217px 101px, 360px 102px;
        background-repeat: no-repeat, no-repeat;
    }

    .approach-how__cards {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: stretch;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        /* bleed to the panel edges so the next card peeks in */
        margin-inline: -20px;
        padding-inline: 20px;
        scroll-padding-inline: 20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .approach-how__cards::-webkit-scrollbar {
        display: none;
    }

    .approach-how__card:nth-child(1),
    .approach-how__card:nth-child(2),
    .approach-how__card:nth-child(3) {
        flex: 0 0 272px;
        max-width: none;
        scroll-snap-align: start;
    }

    .approach-how__bars {
        display: flex;
    }
}
