@import url('fonts/barlow.css');

.bst-deck {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: min(1600px, 100%);
    height: calc(100vh - var(--header-h, 68px) - var(--tb, 0px) - 120px);
    min-height: 460px;
    margin: 0 auto;
    padding: 28px 28px 34px;
}

body.ui-game .bst-deck { padding-top: 76px; height: calc(100vh - 70px); }

.bst-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
    padding: 26px 24px;
    overflow: hidden;
    isolation: isolate;
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    background: #17110f;
    color: inherit;
    text-decoration: none;
    animation: bstIn .5s ease backwards;
    transition: transform .4s cubic-bezier(.2, .85, .25, 1), filter .35s, z-index 0s .4s;
}
.bst-card:nth-child(2) { animation-delay: .06s; }
.bst-card:nth-child(3) { animation-delay: .12s; }
.bst-card:nth-child(4) { animation-delay: .18s; }
@keyframes bstIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.bst-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 1px solid rgba(176, 146, 92, .3);
    clip-path: inherit;
    pointer-events: none;
    transition: border-color .3s;
}
.bst-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--pos, 50% 50%);
    transform-origin: var(--pos, 50% 50%);
    filter: saturate(.85) brightness(.62);
    transform: scale(1.02);
    transition: transform .8s cubic-bezier(.2, .85, .25, 1), filter .4s;
}
.bst-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(10, 7, 6, .97) 6%, rgba(10, 7, 6, .55) 36%, rgba(10, 7, 6, 0) 66%);
}

.bst-num { position: absolute; top: 22px; left: 24px; font: 700 13px 'Barlow Condensed', sans-serif; letter-spacing: .2em; color: rgba(241, 232, 219, .45); }
.bst-card b { display: block; font: 800 46px/.95 'Barlow Condensed', 'Arial Narrow', sans-serif; letter-spacing: .03em; text-transform: uppercase; color: #f1e8db; }
.bst-sub { display: block; margin-top: 8px; font: 600 14px 'Barlow Condensed', sans-serif; letter-spacing: .22em; text-transform: uppercase; color: var(--c, #cf5a3e); }
.bst-more {
    display: block;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    color: #d6cabb;
    font-size: 15px;
    line-height: 1.45;
    transition: max-height .45s, opacity .35s, margin .35s;
}
.bst-line { display: block; width: 46px; height: 3px; margin-top: 12px; background: var(--c, #cf5a3e); transition: width .4s; }
.bst-go {
    display: inline-flex;
    width: max-content;
    margin-top: 14px;
    padding: 9px 14px;
    background: var(--c, #cf5a3e);
    color: #fff;
    font: 800 15px 'Barlow Condensed', sans-serif;
    letter-spacing: .14em;
    text-transform: uppercase;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s, transform .35s;
}

@media (hover: hover) {
    .bst-deck:hover .bst-card { filter: grayscale(.5) brightness(.55); }
}
.bst-deck .bst-card:hover,
.bst-deck .bst-card:focus-visible {
    z-index: 5;
    transform: scale(1.09);
    filter: none;
    outline: none;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .7);
    transition: transform .4s cubic-bezier(.2, .85, .25, 1), filter .35s, z-index 0s;
}
.bst-card:hover::before, .bst-card:focus-visible::before { border-color: var(--c, #cf5a3e); }
.bst-card:hover img, .bst-card:focus-visible img { transform: scale(1.12); filter: saturate(1.05) brightness(.8); }
.bst-card:hover .bst-more, .bst-card:focus-visible .bst-more { max-height: 120px; margin-top: 10px; opacity: 1; }
.bst-card:hover .bst-go, .bst-card:focus-visible .bst-go { opacity: 1; transform: none; }
.bst-card:hover .bst-line, .bst-card:focus-visible .bst-line { width: 100%; }
.bst-deck .bst-card:active { transform: scale(1.06); }

@media (max-width: 1000px) {
    .bst-deck, body.ui-game .bst-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 300px; height: auto; min-height: 0; padding: 20px 16px 28px; }
    body.ui-game .bst-deck { padding-top: 72px; }
    .bst-card b { font-size: 36px; }
    .bst-deck .bst-card:hover { transform: scale(1.04); }
}

@media (max-width: 560px) {
    .bst-deck, body.ui-game .bst-deck { grid-template-columns: 1fr; grid-auto-rows: 190px; gap: 10px; padding-left: 12px; padding-right: 12px; }
    .bst-card { padding: 18px; }
    .bst-card b { font-size: 32px; }
    .bst-line { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .bst-card, .bst-card img, .bst-more, .bst-go, .bst-line { animation: none; transition: none; }
}
