/* NFT gallery embedded in lore site — scoped under .nft-showcase */

.nft-showcase {
    --nft-bg-card: rgba(16, 24, 42, 0.9);
    --nft-border: rgba(0, 240, 255, 0.18);
    --nft-border-bright: rgba(0, 240, 255, 0.45);
    --nft-text: #e8edf7;
    --nft-text-dim: #8b9cb8;
    --nft-cyan: #00f0ff;
    --nft-gold: #f0c040;
    --r-white: #b8c0cc;
    --r-green: #3ddc84;
    --r-blue: #4db8ff;
    --r-purple: #b06aff;
    --r-gold: #f0c040;
}

.nft-showcase--embed {
    position: relative;
    z-index: 1;
}

.nft-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr minmax(240px, 42%);
    gap: 28px;
    align-items: center;
    min-height: 0;
    margin-bottom: 24px;
    padding: 28px 24px;
    border: 1px solid var(--nft-border);
    background: rgba(12, 18, 32, 0.82);
    overflow: hidden;
    animation: nft-hero-enter 0.85s ease-out both;
}

.nft-hero__glow {
    position: absolute;
    top: -40%;
    right: -10%;
    width: 70%;
    height: 180%;
    background: radial-gradient(ellipse, rgba(0, 240, 255, 0.14), transparent 70%);
    pointer-events: none;
    animation: nft-glow-drift 8s ease-in-out infinite alternate;
}

.nft-hero__eyebrow {
    margin: 0 0 10px;
    font-size: 0.72rem;
    color: #ff2d95;
    letter-spacing: 0.14em;
}

.nft-hero__brand {
    margin: 0 0 8px;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--nft-cyan);
    text-shadow: 0 0 28px rgba(0, 240, 255, 0.35);
    line-height: 1.1;
}

.nft-hero__title {
    margin: 0 0 14px;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--nft-text);
}

.nft-hero__lead {
    margin: 0 0 20px;
    max-width: 34rem;
    color: var(--nft-text-dim);
}

.nft-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nft-hero__art {
    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.nft-hero__frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    line-height: normal;
    animation: nft-art-float 5.5s ease-in-out infinite;
}

.nft-hero__frame img {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(52vh, 420px);
    margin-inline: auto;
    object-fit: contain;
    object-position: center;
    --nft-glow: rgba(200, 212, 224, 0.55);
    filter: drop-shadow(0 0 10px var(--nft-glow)) drop-shadow(0 0 28px var(--nft-glow));
}

.nft-hero__frame--white img { --nft-glow: rgba(200, 212, 224, 0.55); }
.nft-hero__frame--green img { --nft-glow: rgba(62, 207, 110, 0.55); }
.nft-hero__frame--blue img { --nft-glow: rgba(77, 184, 255, 0.55); }
.nft-hero__frame--purple img { --nft-glow: rgba(192, 123, 255, 0.55); }
.nft-hero__frame--gold img,
.nft-hero__frame--golden img { --nft-glow: rgba(255, 213, 74, 0.6); }

.nft-hero__frame--empty {
    display: grid;
    place-items: center;
    color: var(--nft-text-dim);
    min-height: 220px;
    aspect-ratio: 3 / 4;
    border: 1px dashed var(--nft-border);
    background: rgba(6, 8, 15, 0.45);
    line-height: normal;
}

.nft-hero__caption {
    /* Keep caption from expanding fit-content frame past the image width */
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: 0;
    min-width: 100%;
    margin-top: 10px;
    padding: 0 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.3;
    text-align: center;
}

.nft-hero__caption span { font-weight: 700; }
.nft-hero__caption small { color: var(--nft-text-dim); }

.nft-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.nft-jump a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--nft-text-dim);
    border: 1px solid var(--nft-border);
    background: rgba(12, 18, 32, 0.6);
    transition: color 0.2s, border-color 0.2s;
}

.nft-jump a:hover,
.nft-jump a.is-active {
    color: var(--nft-cyan);
    border-color: var(--nft-border-bright);
}

.nft-jump span {
    color: var(--nft-cyan);
    font-variant-numeric: tabular-nums;
}

.nft-showcase .panel--error,
.nft-showcase .nft-panel--error {
    border-color: rgba(255, 77, 109, 0.45);
    color: #ff8aa0;
    margin-bottom: 24px;
}

.nft-showcase .load-error-detail {
    margin: 10px 0 0;
    font-size: 0.8rem;
    word-break: break-word;
    opacity: 0.85;
}

.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.nft-card {
    display: flex;
    flex-direction: column;
    background: var(--nft-bg-card);
    border: 1px solid var(--nft-border);
    border-top-width: 3px;
    overflow: visible;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: nft-card-rise 0.55s ease both;
}

.nft-card:nth-child(1) { animation-delay: 0.05s; }
.nft-card:nth-child(2) { animation-delay: 0.1s; }
.nft-card:nth-child(3) { animation-delay: 0.15s; }
.nft-card:nth-child(4) { animation-delay: 0.2s; }
.nft-card:nth-child(5) { animation-delay: 0.25s; }
.nft-card:nth-child(6) { animation-delay: 0.3s; }

.nft-card:hover {
    transform: translateY(-4px);
    border-color: var(--nft-border-bright);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 240, 255, 0.08);
}

.nft-card--white { border-top-color: var(--r-white); }
.nft-card--green { border-top-color: var(--r-green); }
.nft-card--blue { border-top-color: var(--r-blue); }
.nft-card--purple { border-top-color: var(--r-purple); }
.nft-card--gold { border-top-color: var(--r-gold); }
.nft-card--hold { opacity: 0.82; }

.nft-card--claimed .nft-card__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 55%, rgba(240, 192, 64, 0.18));
    pointer-events: none;
}

.nft-card__art {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: rgba(6, 8, 15, 0.85);
    overflow: hidden;
}

.nft-card__art img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center;
}

.nft-card__placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--nft-text-dim);
    font-size: 0.85rem;
}

.nft-card__badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    max-width: calc(100% - 52px);
    box-sizing: border-box;
    padding: 3px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    background: rgba(6, 8, 15, 0.82);
    border: 1px solid var(--nft-border);
    color: var(--nft-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.nft-card--claimed .nft-card__badge {
    color: var(--nft-gold);
    border-color: rgba(240, 192, 64, 0.45);
}

.nft-card--hold .nft-card__badge { color: var(--nft-text-dim); }

.nft-card__quality {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 2;
    min-width: 28px;
    padding: 3px 6px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(6, 8, 15, 0.82);
    border: 1px solid currentColor;
    pointer-events: none;
}

.nft-card__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nft-card__name {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.35;
}

.nft-card__meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--nft-text-dim);
}

.nft-card__stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
}

.nft-card__stats li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.82rem;
    padding: 4px 6px;
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.08);
}

.nft-card__stats span { color: var(--nft-text-dim); }
.nft-card__stats strong { color: var(--nft-text); font-variant-numeric: tabular-nums; }

.nft-card__stat--element {
    grid-column: 1 / -1;
}

.nft-card__stats strong.nft-el--metal { color: #ffd700; }
.nft-card__stats strong.nft-el--wood { color: #5dff9a; }
.nft-card__stats strong.nft-el--water { color: #5db8ff; }
.nft-card__stats strong.nft-el--fire { color: #ff7040; }
.nft-card__stats strong.nft-el--earth { color: #d4a24e; }

.nft-card__facts {
    margin: auto 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    display: grid;
    gap: 4px;
}

.nft-card__facts div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78rem;
}

.nft-card__facts dt {
    margin: 0;
    color: var(--nft-text-dim);
}

.nft-card__facts dd {
    margin: 0;
    text-align: right;
    color: var(--nft-text);
}

.nft-token-link {
    color: var(--nft-cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nft-token-link:hover { color: #fff; }

.nft-showcase .rarity-white { color: var(--r-white); }
.nft-showcase .rarity-green { color: var(--r-green); }
.nft-showcase .rarity-blue { color: var(--r-blue); }
.nft-showcase .rarity-purple { color: var(--r-purple); }
.nft-showcase .rarity-gold { color: var(--r-gold); }

.nft-footer {
    margin-top: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--nft-border);
    text-align: center;
    color: var(--nft-text-dim);
    font-size: 0.88rem;
}

.nft-footer a {
    color: var(--nft-cyan);
    text-decoration: none;
}

.nft-footer a:hover { text-decoration: underline; }

.nft-footer__credit {
    margin: 14px 0 0;
    font-size: 0.72rem;
    color: var(--nft-text-dim, var(--text-dim));
    letter-spacing: 0.04em;
}

.nft-footer__logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 22px;
}

.nft-footer__logo-link {
    display: inline-flex;
    line-height: 0;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
}

.nft-footer__logo-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.nft-footer__logo {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

@keyframes nft-hero-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes nft-art-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes nft-glow-drift {
    from { opacity: 0.7; transform: translateX(0); }
    to { opacity: 1; transform: translateX(-4%); }
}

@keyframes nft-card-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Match site.css mobile breakpoint (≤900px) — prior 860px left a 2-col hero gap */
@media (max-width: 900px) {
    .nft-showcase {
        padding-bottom: 24px;
    }

    .nft-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 22px;
        padding: 22px 16px;
        overflow: visible;
    }

    .nft-hero__glow {
        top: -20%;
        left: 50%;
        right: auto;
        width: 120%;
        height: 110%;
        transform: translateX(-50%);
        animation: none;
    }

    .nft-hero__content {
        width: 100%;
        max-width: 100%;
        text-align: left;
    }

    .nft-hero__art {
        order: -1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        padding-inline: 0;
        align-self: center;
    }

    .nft-hero__frame {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: fit-content;
        max-width: min(300px, 100%);
        margin-inline: auto;
    }

    .nft-hero__frame img {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: min(46vh, 340px);
        margin-inline: auto;
        /* Softer glow so drop-shadow doesn't throw visual weight / overflow clip */
        filter: drop-shadow(0 0 8px var(--nft-glow)) drop-shadow(0 0 18px var(--nft-glow));
    }

    .nft-hero__caption {
        width: 0;
        min-width: 100%;
        align-self: stretch;
    }

    .nft-grid {
        justify-items: center;
    }

    .nft-card {
        width: 100%;
        max-width: min(360px, 100%);
        margin-inline: auto;
    }

    .nft-card__art {
        width: 100%;
    }

    .nft-card__body {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 520px) {
    .nft-grid {
        grid-template-columns: 1fr;
        justify-items: stretch;
        width: 100%;
    }

    .nft-card {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
    }

    .nft-hero__frame {
        max-width: min(280px, 100%);
    }

    .nft-hero {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nft-hero,
    .nft-hero__glow,
    .nft-hero__frame,
    .nft-card {
        animation: none;
    }

    .nft-card:hover {
        transform: none;
    }
}
