/* Landing-only pieces showcase — approachability card add + fly-zoom extract */

.showcase-pieces {
    --sp-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --sp-ink: #15282f;
    --sp-ink-soft: rgba(21, 40, 47, 0.62);
    --sp-line: rgba(21, 40, 47, 0.12);
    --sp-surface: #fffdf8;
    position: relative;
    overflow: hidden;
    border-radius: 1.35rem;
    border: 1px solid color-mix(in srgb, var(--cl-ink, #1c1814) 12%, transparent);
    background:
        radial-gradient(90% 70% at 8% 0%, rgba(196, 137, 90, 0.16), transparent 55%),
        radial-gradient(70% 60% at 100% 8%, rgba(79, 135, 148, 0.12), transparent 50%),
        linear-gradient(165deg, #f7f3ec 0%, #f3eee6 52%, #efe8dc 100%);
    box-shadow: 0 18px 40px rgba(28, 24, 20, 0.1);
    color: var(--sp-ink);
    aspect-ratio: 16 / 11;
    min-height: 22rem;
    max-height: 36rem;
}

.showcase-pieces__stage {
    position: absolute;
    inset: 0;
    padding: 3rem 1rem 1.25rem;
    display: grid;
    place-items: center;
}

.showcase-pieces__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 0.75rem;
    width: min(100%, 28rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.showcase-pieces__cell {
    margin: 0;
    padding: 0.35rem 0.2rem 0.55rem;
    position: relative;
}

.showcase-pieces__card {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--sp-line);
    border-radius: 1.1rem;
    background: var(--sp-surface);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 10px 24px rgba(21, 40, 47, 0.06);
    transform: rotate(var(--tilt, 0deg)) translateY(var(--shift, 8px));
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    text-align: left;
    padding: 0;
}

.showcase-pieces__card.is-in {
    animation: showcasePiecesIn 0.65s var(--sp-ease) forwards;
    pointer-events: auto;
}

.showcase-pieces__card.is-in:hover,
.showcase-pieces__card.is-in:focus-visible {
    z-index: 2;
    outline: none;
    transform: rotate(0deg) translateY(-4px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 14px 30px rgba(21, 40, 47, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.showcase-pieces.is-playing .showcase-pieces__card.is-in:hover,
.showcase-pieces.is-playing .showcase-pieces__card.is-in:focus-visible {
    transform: rotate(var(--tilt, 0deg)) translateY(0);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 10px 24px rgba(21, 40, 47, 0.06);
}

.showcase-pieces__card.is-lifted {
    visibility: hidden;
    pointer-events: none;
}

.showcase-pieces__media {
    position: relative;
    aspect-ratio: 1 / 1.08;
    overflow: hidden;
    background: var(--sp-badge, #5b8fd4);
}

.showcase-pieces__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showcase-pieces__card--group .showcase-pieces__media {
    aspect-ratio: 1 / 1;
    border-radius: 0.85rem 0.85rem 0 0;
}

.showcase-pieces__fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.showcase-pieces__card--group .showcase-pieces__fallback {
    font-size: 1.15rem;
    letter-spacing: 0.04em;
}

.showcase-pieces__name {
    margin: 0;
    padding: 0.55rem 0.7rem 0.7rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.showcase-pieces__foot {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.showcase-pieces__facets {
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.4rem 0.55rem;
    padding: 0 0.85rem 0.85rem;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    max-height: 0;
    transform: translateX(-10px);
    will-change: opacity, max-height, transform;
}

.showcase-pieces__facet {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
    width: calc(50% - 0.3rem);
}

.showcase-pieces__facet-mark {
    flex: 0 0 auto;
    width: 1.55rem;
    height: 1.55rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 10px rgba(21, 40, 47, 0.16);
}

.showcase-pieces__facet-mark i {
    font-family: bootstrap-icons;
    font-style: normal;
    font-weight: 400;
    font-size: 0.78rem;
    line-height: 1;
}

.showcase-pieces__facet--notes {
    width: max-content;
    max-width: 100%;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.48rem 0.75rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(214, 174, 54, 0.4);
    background:
        radial-gradient(120% 140% at 50% 0%, rgba(255, 232, 154, 0.65), transparent 58%),
        linear-gradient(180deg, #fff8d6, #ffe89a);
    color: #3b2f10;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 8px 18px rgba(184, 140, 40, 0.14);
}

.showcase-pieces__facet-break {
    flex: 0 0 100%;
    width: 100%;
    height: 0.55rem;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}

.showcase-pieces__facet--notes .showcase-pieces__facet-mark {
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0;
    border-radius: 0.45rem;
    background: transparent;
    border-color: transparent;
    color: #3b2f10;
    box-shadow: none;
}

.showcase-pieces__facet--notes .showcase-pieces__facet-mark i {
    font-size: 0.95rem;
}

.showcase-pieces__facet--notes .showcase-pieces__facet-copy {
    padding-top: 0;
}

.showcase-pieces__facet--notes .showcase-pieces__facet-label {
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: #3b2f10;
}

.showcase-pieces__facet--traits .showcase-pieces__facet-mark {
    background: linear-gradient(165deg, #2ec4a7 0%, #0f9f8a 100%);
    border-color: rgba(232, 255, 248, 0.9);
    box-shadow: 0 0 0 2px rgba(15, 159, 138, 0.22), 0 4px 10px rgba(15, 159, 138, 0.28);
}

.showcase-pieces__facet--motivation .showcase-pieces__facet-mark {
    background: linear-gradient(165deg, #ff7aa8 0%, #ff4d86 52%, #e83e75 100%);
    border-color: rgba(255, 236, 244, 0.92);
    box-shadow: 0 0 0 2px rgba(255, 95, 135, 0.24), 0 4px 10px rgba(255, 77, 134, 0.34);
}

.showcase-pieces__facet--priorities .showcase-pieces__facet-mark {
    background: linear-gradient(165deg, #5a6f8a 0%, #3e5168 100%);
    border-color: rgba(236, 242, 248, 0.92);
    color: #f4f1ea;
    box-shadow: 0 0 0 2px rgba(90, 111, 138, 0.22), 0 4px 10px rgba(62, 81, 104, 0.32);
}

.showcase-pieces__facet--nuggets .showcase-pieces__facet-mark {
    background: linear-gradient(165deg, #ffe566 0%, #ffc107 100%);
    border-color: rgba(255, 236, 170, 0.92);
    color: #8a5a00;
    box-shadow: 0 0 0 2px rgba(255, 200, 60, 0.35), 0 4px 10px rgba(255, 170, 30, 0.36);
}

.showcase-pieces__facet--things .showcase-pieces__facet-mark {
    background: linear-gradient(165deg, #f3d7b8 0%, #c9894a 100%);
    border-color: rgba(255, 244, 230, 0.95);
    color: #6b3d12;
    box-shadow: 0 0 0 2px rgba(201, 137, 74, 0.22), 0 4px 10px rgba(167, 98, 36, 0.28);
}

.showcase-pieces__facet--contributions .showcase-pieces__facet-mark {
    background: linear-gradient(135deg, #6f9e8f 0%, #3f6b5e 100%);
    border-color: rgba(236, 248, 244, 0.92);
    box-shadow: 0 0 0 2px rgba(111, 158, 143, 0.24), 0 4px 10px rgba(63, 107, 94, 0.32);
}

.showcase-pieces__facet-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.22rem;
    min-width: 0;
    padding-top: 0.12rem;
}

.showcase-pieces__facet-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--sp-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.showcase-pieces__facet-bars {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.showcase-pieces__facet-bar {
    display: block;
    height: 0.28rem;
    width: var(--sp-bar-w, 80%);
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 18%, transparent);
}

.showcase-pieces__facet--traits {
    color: #0f9f8a;
}

.showcase-pieces__facet--notes {
    color: #3b2f10;
}

.showcase-pieces__facet--motivation {
    color: #e83e75;
}

.showcase-pieces__facet--priorities {
    color: #3e5168;
}

.showcase-pieces__facet--nuggets {
    color: #c98900;
}

.showcase-pieces__facet--things {
    color: #c9894a;
}

.showcase-pieces__facet--contributions {
    color: #3f6b5e;
}

.showcase-pieces__facet-bar.is-short {
    opacity: 0.72;
}

.showcase-pieces__fly {
    position: absolute;
    z-index: 5;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    border-radius: 1.1rem;
    background: var(--sp-surface);
    box-shadow: 0 22px 48px rgba(21, 40, 47, 0.22);
    /* Block hits to cards underneath so a mid-open click cannot restart the zoom. */
    pointer-events: auto;
    transform-origin: center center;
    will-change: left, top, width, height, transform;
}

.showcase-pieces__fly.is-open {
    cursor: pointer;
}

.showcase-pieces__fly .showcase-pieces__card {
    flex: 0 0 var(--sp-card-w, 100%);
    width: var(--sp-card-w, 100%);
    max-width: 100%;
    height: 100%;
    opacity: 1;
    transform: none;
    animation: none;
    box-shadow: none;
    border: 0;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    cursor: inherit;
}

.showcase-pieces__fly .showcase-pieces__media {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    aspect-ratio: auto;
    height: auto;
    border-radius: 0;
}

.showcase-pieces__fly .showcase-pieces__card--group .showcase-pieces__media {
    border-radius: 0;
}

.showcase-pieces__fly .showcase-pieces__foot {
    flex: 0 0 auto;
}

.showcase-pieces__fly .showcase-pieces__name {
    padding: 0.55rem 0.7rem 0.65rem;
    font-size: 0.92rem;
    white-space: nowrap;
}

.showcase-pieces__fly .showcase-pieces__side {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    border-left: 1px solid rgba(21, 40, 47, 0.08);
}

.showcase-pieces__fly .showcase-pieces__facets {
    display: flex;
    flex: 0 0 auto;
    align-content: flex-start;
    opacity: 0;
    max-height: none;
    max-width: 100%;
    padding: 0.55rem 0.85rem 0.85rem;
    margin: 0;
    transform: translateX(-10px);
    will-change: opacity, transform;
}

.showcase-pieces__hint {
    position: absolute;
    z-index: 3;
    left: 0.85rem;
    top: 0.85rem;
    transform: none;
    margin: 0;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.82);
    border: 1px solid rgba(21, 40, 47, 0.1);
    color: var(--sp-ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s var(--sp-ease);
}

.showcase-pieces.is-active .showcase-pieces__hint {
    opacity: 1;
}

.showcase-pieces.is-playing .showcase-pieces__hint {
    opacity: 0;
}

.showcase-pieces__replay {
    position: absolute;
    z-index: 4;
    right: 0.85rem;
    top: 0.85rem;
    bottom: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(21, 40, 47, 0.14);
    background: rgba(255, 253, 248, 0.92);
    color: var(--sp-ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    cursor: pointer;
    appearance: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.15rem);
    transition:
        opacity 0.35s var(--sp-ease),
        transform 0.35s var(--sp-ease),
        background 0.2s var(--sp-ease),
        border-color 0.2s var(--sp-ease);
}

.showcase-pieces__replay i {
    font-size: 0.95rem;
    line-height: 1;
}

.showcase-pieces.is-active:not(.is-playing) .showcase-pieces__replay {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.showcase-pieces__replay:hover,
.showcase-pieces__replay:focus-visible {
    background: #fff;
    border-color: rgba(61, 142, 196, 0.45);
    outline: none;
}

.showcase-pieces__replay:focus-visible {
    box-shadow: 0 0 0 3px rgba(61, 142, 196, 0.28);
}

@keyframes showcasePiecesIn {
    to {
        opacity: 1;
        transform: rotate(var(--tilt, 0deg)) translateY(0);
    }
}

@media (max-width: 575.98px) {
    .showcase-pieces {
        aspect-ratio: 1 / 1.05;
        min-height: 20rem;
    }

    .showcase-pieces__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(100%, 18rem);
    }

    .showcase-pieces__cell:nth-child(n + 5) {
        display: none;
    }

    .showcase-pieces__replay span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .showcase-pieces__card.is-in {
        animation: none;
        opacity: 1;
        transform: rotate(var(--tilt, 0deg));
    }
}
