/* Prizes: a black 1390 panel (its glow artwork as the background image) 44px under the steps, the centred head
   59px in, the cards 44px under it on a 1154 grid (436 + 343 + 343, gap 16), 103px of panel under them */
.ltb-prizes {
    padding-top: 44px;
}

.ltb-prizes__panel {
    position: relative;
    width: min(1390px, 100% - 48px);
    margin: 0 auto;
    padding: 59px 24px 103px;
    box-sizing: border-box;
    overflow: hidden;
    isolation: isolate;
    border-radius: 24px;
    background: #000;
}

.ltb-prizes__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.ltb-prizes__bg img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: 0 0;
}

.ltb-page .ltb-prizes__head .ltb-overline,
.ltb-page .ltb-prizes__title {
    color: #fff;
}

.ltb-page .ltb-prizes__title .green {
    color: var(--ltb-green);
}

.ltb-page .ltb-prizes__desc {
    color: #FAFAFA;
}

.ltb-page .ltb-prizes__grid {
    display: grid;
    grid-template-columns: minmax(0, 436fr) minmax(0, 343fr) minmax(0, 343fr);
    grid-template-rows: repeat(2, minmax(272px, auto));
    grid-auto-flow: column;
    gap: 16px;
    max-width: 1154px;
    margin: 44px auto 0;
    padding: 0;
    list-style: none;
}

/* glass card: the copy on its bottom line, the badge in the top-left corner, the artwork behind both */
.ltb-page .ltb-prize {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 272px;
    margin: 0;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(250, 250, 247, .1);
    -webkit-backdrop-filter: blur(50px);
    backdrop-filter: blur(50px);
}

.ltb-prize::before,
.ltb-prize::marker {
    content: none;
}

.ltb-prize--main {
    grid-row: span 2;
}

.ltb-page .ltb-prize__art {
    position: absolute;
    top: var(--d-top, auto);
    right: var(--d-right, auto);
    left: var(--d-left, auto);
    display: block;
    width: var(--d-width);
    max-width: none;
    height: auto;
    pointer-events: none;
}

/* 26px pill (4 + 16 + 4 inside the 1px white ring); the main one white */
.ltb-page .ltb-prize__place {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 1;
    padding: 4px 11px;
    border: 1px solid #fff;
    border-radius: 64px;
    color: var(--ltb-light-beige);
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    letter-spacing: .36px;
    text-transform: uppercase;
    white-space: nowrap;
}

.ltb-page .ltb-prize--main .ltb-prize__place {
    top: 28px;
    padding: 5px 12px;
    border: 0;
    background: #fff;
    color: #000;
}

.ltb-prize__copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 295px;
}

.ltb-prize--main .ltb-prize__copy {
    max-width: 388px;
}

.ltb-prize--narrow .ltb-prize__copy {
    max-width: 227px;
}

.ltb-page .ltb-prize__logo {
    display: block;
    width: 90px;
    max-width: 100%;
    height: auto;
}

.ltb-page .ltb-prize__title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 24px;
}

.ltb-page .ltb-prize--main .ltb-prize__title {
    font-size: 40px;
    line-height: 40px;
}

.ltb-page .ltb-prize__title .green {
    color: var(--ltb-green);
}

.ltb-page .ltb-prize__value {
    color: var(--ltb-light-grey);
    font-size: 14px;
    font-weight: 500;
    line-height: 16px;
}

/* tablets: two columns - the main card (its phone layout) over two rows beside the 2nd and 3rd place, then the
   4th and 5-250 */
@media (min-width: 768px) and (max-width: 1023px) {
    .ltb-prizes {
        padding-top: 32px;
    }

    .ltb-prizes__panel {
        padding: 48px 32px 48px;
    }

    .ltb-page .ltb-prizes__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-flow: row dense;
        max-width: none;
        margin-top: 40px;
    }

    .ltb-page .ltb-prize--main {
        padding: 24px 19px 30px 23px;
    }

    .ltb-page .ltb-prize--main .ltb-prize__place {
        top: 24px;
        left: 23px;
    }

    .ltb-prize--main .ltb-prize__copy {
        max-width: 301px;
    }

    .ltb-page .ltb-prize--main .ltb-prize__art {
        top: var(--m-top, var(--d-top, auto));
        left: var(--m-left, var(--d-left, auto));
        width: var(--m-width, var(--d-width));
    }
}

/* phones (440 frame): the 408 panel 10px under the steps, the head 32px in and left-aligned, the 343 cards
   stacked 24 apart, 32px under the head */
@media (max-width: 767px) {
    .ltb-prizes {
        padding-top: 10px;
    }

    .ltb-prizes__panel {
        width: auto;
        margin: 0 16px;
        padding: 37px 0 32px;
    }

    .ltb-prizes__head {
        align-items: flex-start;
        padding: 0 32px;
        text-align: left;
    }

    .ltb-page .ltb-prizes__grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-auto-flow: row;
        gap: 24px;
        max-width: 343px;
        margin: 32px auto 0;
        padding: 0 16px;
        box-sizing: content-box;
    }

    .ltb-page .ltb-prize--main {
        grid-row: auto;
        min-height: 560px;
        padding: 24px 19px 30px 23px;
    }

    .ltb-page .ltb-prize--main .ltb-prize__place {
        top: 24px;
        left: 23px;
    }

    .ltb-prize--main .ltb-prize__copy {
        max-width: 301px;
    }

    .ltb-page .ltb-prize__art {
        top: var(--m-top, var(--d-top, auto));
        right: var(--m-right, var(--d-right, auto));
        left: var(--m-left, var(--d-left, auto));
        width: var(--m-width, var(--d-width));
    }

    /* the backdrop at the panel's width from its top, centred (black under it on a longer panel) */
    .ltb-prizes__bg img {
        height: auto;
    }

    /* cards narrower than the design's 343 (295 inside the 24px padding, the cq width): the artwork narrows as much
       as the card, so its left edge stays clear of the place badge */
    .ltb-page .ltb-prize {
        container-type: inline-size;
    }

    .ltb-page .ltb-prize:not(.ltb-prize--main) .ltb-prize__art {
        width: min(var(--m-width, var(--d-width)), var(--m-width, var(--d-width)) - 295px + 100cqw);
    }

    /* Żabka's main card: its artwork (337.93 wide, 4.12 left of the card, 301 inside the padding) scales with
       the card below the design's */
    .ltb-page--zabka .ltb-prize--main .ltb-prize__art {
        left: max(-4.12px, -1.3688cqw);
        width: min(337.93px, 112.269cqw);
    }
}

/* the artwork pops in after its card and lifts on hover (as the pay band's renders) */
.ltb-page .ltb-prize__art {
    transition: translate .6s cubic-bezier(.34, 1.4, .64, 1);
}

.ltb-anim .ltb-prize__art {
    opacity: 0;
    transform: scale(.82) rotate(-4deg);
}

.ltb-page.ltb-anim .ltb-prize__art {
    transition:
        opacity .7s ease calc(var(--ltb-delay, 0ms) + .15s),
        transform 1.1s cubic-bezier(.34, 1.4, .64, 1) calc(var(--ltb-delay, 0ms) + .15s),
        translate .6s cubic-bezier(.34, 1.4, .64, 1);
}

.ltb-anim .is-inview .ltb-prize__art {
    opacity: 1;
    transform: none;
}

@media (hover: hover) and (pointer: fine) {
    .ltb-prize:hover .ltb-prize__art {
        translate: 0 -8px;
    }
}

/* narrower desktops: the small cards' artworks at 70%, clear of the place badge */
@media (min-width: 1024px) and (max-width: 1199px) {
    .ltb-page .ltb-prize:not(.ltb-prize--main) .ltb-prize__art {
        width: calc(var(--d-width) * .7);
    }
}

/* a word longer than the card (translations) breaks instead of running out of it; the narrowest phones get a
   smaller main title */
.ltb-page .ltb-prize__title {
    overflow-wrap: anywhere;
}

@media (max-width: 374px) {
    .ltb-page .ltb-prize--main .ltb-prize__title {
        font-size: 32px;
        line-height: 34px;
    }
}
