/* Round15 — Motivate — section-rewards
   Figma: desktop 4451:12450 | tablet 4492:11803
   Rule: single breakpoint @media (max-width: 1024px) covers tablet + mobile.
   Font sizes (--fs-h2, --fs-h5, --fs-label-md) and spacing (--section-gap,
   --section-horizontal-padding, --var-*) already flip to their tablet values via the
   global :root media query in assets/css/global.css — no local override needed for those. */

.r15-rewards {
    display: flex;
    justify-content: center;
    background: var(--color-2nd-bg, #ffffff);
    padding: 0 var(--section-horizontal-padding, 32px) var(--var-140, 140px);
    font-family: var(--font-body, 'DM Sans', sans-serif);
}

.r15-rewards * {
    box-sizing: border-box;
}

.r15-rewards__content {
    flex: 1 0 0;
    min-width: 0;
    max-width: var(--container-max, 1400px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--section-gap, 80px);
}

/* ---------- Section heading ---------- */
.r15-rewards__heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--var-40, 40px);
    width: 100%;
}

.r15-rewards__title {
    margin: 0;
    width: 100%;
    max-width: 800px;
    font-weight: 600;
    font-size: var(--fs-h2, 48px);
    line-height: 1.15;
    text-align: center;
    color: var(--color-1st-fg, #050505);
    font-variation-settings: 'opsz' 14;
}

.r15-rewards__desc {
    margin: 0;
    width: 100%;
    max-width: 600px;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    color: var(--color-2nd-fg, rgba(5, 5, 5, 0.8));
    font-variation-settings: 'opsz' 14;
}

/* ---------- Reward item (zig-zag row on desktop) ---------- */
.r15-rewards__item {
    display: flex;
    align-items: center;
    gap: var(--var-40, 40px);
    width: 100%;
}

/* Reverse item: media is always first in the DOM (so screen readers/no-CSS fallback
   always see the image before its caption), so the zig-zag swap on desktop is done
   visually via row-reverse instead of reordering the markup.
   (See tablet override below, which restacks the image on top via `order`.) */
.r15-rewards__item--reverse {
    flex-direction: row-reverse;
}

.r15-rewards__media {
    position: relative;
    flex: 1 0 0;
    min-width: 0;
    aspect-ratio: 680 / 450;
    overflow: hidden;
}

.r15-rewards__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.r15-rewards__img--desktop {
    display: block;
}

.r15-rewards__img--tablet {
    display: none;
}

.r15-rewards__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--var-16, 16px);
    flex: 1 0 0;
    min-width: 0;
}

.r15-rewards__item-title {
    margin: 0;
    width: 100%;
    max-width: 800px;
    font-weight: 600;
    font-size: var(--fs-h5, 25px);
    line-height: 1.15;
    color: var(--color-1st-fg, #050505);
    font-variation-settings: 'opsz' 14;
}

.r15-rewards__item-desc {
    margin: 0;
    width: 100%;
    max-width: 600px;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    color: var(--color-1st-fg, #050505);
    font-variation-settings: 'opsz' 14;
}

/* ---------- CTA button-group ---------- */
.r15-rewards__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--var-12, 12px);
    width: 100%;
}

.r15-rewards__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--var-6, 6px);
    padding: var(--var-14, 14px) var(--var-28, 28px);
    border-radius: var(--radius-pill, 100px);
    border: 1px solid var(--color-stroke, #d3d3d3);
    background: var(--color-2nd-btn-bg, #ffffff);
    text-decoration: none;
    transition: background 0.2s ease;
}

.r15-rewards__btn:hover,
.r15-rewards__btn:focus-visible {
    background: var(--color-1st-bg, #f6f5f4);
}

.r15-rewards__btn-text {
    font-weight: 500;
    font-size: var(--fs-label-md, 14px);
    line-height: 1;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    color: var(--color-2nd-btn-fg, #050505);
    font-variation-settings: 'opsz' 14;
}

.r15-rewards__btn-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    overflow: hidden;
}

.r15-rewards__btn-icon img {
    display: block;
    width: 7px;
    height: 7px;
}

/* ---------- Responsive (tablet + mobile, <=1024px) ---------- */
@media (max-width: 1024px) {
    .r15-rewards {
        padding-bottom: var(--var-72, 72px);
    }

    .r15-rewards__item {
        flex-direction: column;
        justify-content: center;
    }

    .r15-rewards__media,
    .r15-rewards__info {
        flex: none;
        width: 100%;
    }

    /* Figma tablet frame always shows the image on top, text below — even for the
       "reverse" item whose DOM keeps text first (for desktop left/right ordering). */
    .r15-rewards__item--reverse .r15-rewards__media {
        order: -1;
    }

    .r15-rewards__img--desktop {
        display: none;
    }

    .r15-rewards__img--tablet {
        display: block;
    }
}
