/* Round17 — Customization — section-choose
   Figma: desktop 1023:13520 | mobile 1246:11549 (tablet shares the mobile frame)
   Layout: centered heading + 2 cards (500px outlined | flex 1 gradient-bordered with team photo).
   Rule: single breakpoint, @media (max-width: 1024px) covers tablet + mobile; default = desktop. */

.r17-choose {
    display: flex;
    justify-content: center;
    padding: var(--var-140, 140px) var(--section-horizontal-padding, 32px);
    background: var(--color-1st-bg);
    font-family: var(--font-body, 'DM Sans', sans-serif);
}

.r17-choose * {
    box-sizing: border-box;
}

.r17-choose__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);
}

/* ---------- Headings (1023:13522) ---------- */
.r17-choose__headings {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--var-16, 16px);
    width: 100%;
    text-align: center;
}

.r17-choose__title {
    width: 100%;
    max-width: 800px;
    margin: 0;
    font-weight: 600;
    font-size: var(--fs-h2, 48px);
    line-height: var(--lh-heading, 1.15);
    color: var(--color-1st-fg);
}

.r17-choose__desc {
    width: 100%;
    max-width: 600px;
    margin: 0;
    font-weight: 400;
    font-size: var(--fs-body, 16px);
    line-height: var(--lh-body, 1.4);
    color: var(--color-2nd-fg);
}

/* ---------- Cards (1106:7076) ---------- */
.r17-choose__cards {
    display: flex;
    align-items: stretch;
    gap: var(--var-24, 24px);
    width: 100%;
    max-width: var(--container-max, 1400px);
}

.r17-choose__card {
    position: relative;
    isolation: isolate;
    flex: 0 0 var(--r17-choose-own-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-stroke);
    background: var(--color-1st-bg);
    overflow: hidden;
}

/* Right card: 2px gradient border (purple top -> red bottom, Figma "Graphic stroke"), fills remaining width */
.r17-choose__card--featured {
    flex: 1 0 0;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--color-1st-bg), var(--color-1st-bg)) padding-box,
        linear-gradient(180deg, var(--color-2nd-brd) 0%, var(--color-1st-brd) 100%) border-box;
}

.r17-choose__body {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--var-32, 32px);
    /* Figma strokes are drawn inside the padding: subtract the card border (1px) so content keeps its Figma width/height */
    padding: calc(var(--var-40, 40px) - var(--var-1)) calc(var(--var-24, 24px) - var(--var-1));
}

.r17-choose__card--featured .r17-choose__body {
    /* featured card border is 2px */
    padding: calc(var(--var-40, 40px) - var(--var-2)) calc(var(--var-24, 24px) - var(--var-2));
}

.r17-choose__card-head {
    display: flex;
    flex-direction: column;
    gap: var(--var-16, 16px);
    width: 100%;
}

.r17-choose__card-title {
    margin: 0;
    font-weight: 600;
    font-size: var(--fs-h5, 25px);
    line-height: var(--lh-heading, 1.15);
    letter-spacing: 0;
    color: var(--color-1st-fg);
}

.r17-choose__card-desc {
    margin: 0;
    max-width: 600px;
    font-weight: 400;
    font-size: var(--fs-body, 16px);
    line-height: var(--lh-body, 1.4);
    color: var(--color-2nd-fg);
}

/* ---------- List ---------- */
.r17-choose__list {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--var-12, 12px);
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.r17-choose__item {
    display: flex;
    align-items: center;
    gap: var(--var-6, 6px);
    width: 100%;
}

.r17-choose__point {
    flex: 0 0 auto;
    width: var(--var-4);
    height: var(--var-4);
    background: var(--color-stroke);
}

.r17-choose__point--featured {
    background: linear-gradient(90deg, var(--color-1st-brd) 0%, var(--color-2nd-brd) 100%);
}

.r17-choose__item-text {
    flex: 1 0 0;
    min-width: 0;
    max-width: 600px;
    font-weight: 400;
    font-size: var(--fs-body, 16px);
    line-height: var(--lh-body, 1.4);
    color: var(--color-2nd-fg);
}

.r17-choose__item--featured .r17-choose__item-text {
    color: var(--color-1st-fg);
}

/* ---------- Buttons (Figma: button/text) ---------- */
.r17-choose__btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: var(--var-6, 6px);
    /* stroke inside the padding (Figma button/text = 42px high): subtract the 1px border */
    padding: calc(var(--var-14, 14px) - var(--var-1)) calc(var(--var-28, 28px) - var(--var-1));
    border: 1px solid var(--color-stroke);
    border-radius: var(--radius-pill, 999px);
    background: var(--color-2nd-btn-bg);
    color: var(--color-2nd-btn-fg);
    font-family: inherit;
    font-weight: 500;
    font-size: var(--fs-label-md, 14px);
    line-height: var(--lh-label, 1);
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

/* Featured CTA: white fill + 2px brand-gradient border (red -> purple) */
.r17-choose__btn--featured {
    /* 2px border: subtract it from the padding as well */
    padding: calc(var(--var-14, 14px) - var(--var-2)) calc(var(--var-28, 28px) - var(--var-2));
    border: 2px solid transparent;
    background:
        linear-gradient(var(--color-1st-btn-bg), var(--color-1st-btn-bg)) padding-box,
        var(--color-gradient-brand, linear-gradient(90deg, var(--color-1st-brd) 0%, var(--color-2nd-brd) 100%)) border-box;
    color: var(--color-1st-btn-fg);
}

.r17-choose__btn:hover {
    opacity: 0.85;
}

.r17-choose__btn:focus-visible {
    outline: 2px solid var(--color-2nd-brd);
    outline-offset: 2px;
}

/* ---------- Team photo (1246:11986): pinned to the card's right edge, full card height ---------- */
.r17-choose__media {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    max-width: 100%;
    aspect-ratio: var(--r17-choose-photo-ratio);
    overflow: hidden;
    pointer-events: none;
}

.r17-choose__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

/* ---------- Responsive (<=1024 = tablet + mobile, single breakpoint) ---------- */
@media (max-width: 1024px) {
    .r17-choose__headings {
        align-items: flex-start;
        text-align: left;
    }

    .r17-choose__cards {
        flex-direction: column;
        align-items: stretch;
    }

    .r17-choose__card,
    .r17-choose__card--featured {
        flex: none;
        width: 100%;
    }

    /* Figma mobile 1246:12278: featured card has no bottom padding, photo sits right below the CTA */
    .r17-choose__card--featured .r17-choose__body {
        padding-bottom: 0;
    }

    .r17-choose__media {
        position: relative;
        z-index: 0;
        top: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        max-width: none;
    }
}
