/* ==========================================
   DUPLIC — Showroom (catalog continuing the Hero1 film)
   Base = premium linear catalog (no JS, reduced motion, mobile).
   .xp-motion + desktop = one pinned stage, one protagonist at a time (showroom.js).
   ========================================== */

.xp-showroom__track {
    position: relative;
    background: var(--xp-bg);
    color: var(--xp-ink);
}

/* ---------- Rail (sequence navigation) ---------- */
.xp-rail ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0 var(--xp-pad) 8vh;
    list-style: none;
}

.xp-rail a {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    color: var(--xp-mute);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.3s;
}

.xp-rail .n {
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
}

.xp-rail a:hover,
.xp-rail a.is-active {
    color: var(--xp-ink);
}

.xp-rail a.is-soon {
    opacity: 0.45;
}

.xp-rail a:focus-visible,
.xp-scene .xp-link:focus-visible {
    outline: 2px solid #00A8E1;
    outline-offset: 4px;
}

/* ---------- Scene ---------- */
.xp-scene {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 34%) 1fr;
    align-items: center;
    gap: 4vw;
    min-height: 92vh;
    padding: 10vh calc(var(--xp-pad) + 110px) 10vh var(--xp-pad);
    overflow: hidden;
    isolation: isolate;
}

/* Oversized outlined name — the "room" the product stands in */
.xp-scene__ghost {
    position: absolute;
    left: calc(var(--xp-pad) - 0.06em);
    bottom: -0.2em;
    z-index: -1;
    margin: 0;
    font-size: clamp(5rem, 17vw, 20rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px rgba(244, 242, 238, 0.07);
    pointer-events: none;
    user-select: none;
}

.xp-scene__visual {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: min(74vh, 52vw);
    aspect-ratio: 1;
}

.xp-scene__info {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    z-index: 2;
}

/* Films/photos are lit from a spot: feathered into the dark, never shown as rectangles */
.xp-scene__main {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}

.xp-scene__aux {
    position: absolute;
    z-index: 2;
    width: 44%;
    height: auto;
    -webkit-mask-image: radial-gradient(closest-side, #000 50%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 50%, transparent 100%);
    filter: brightness(0.82);
}

.xp-scene__index {
    margin: 0 0 18px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    font-variant-numeric: tabular-nums;
    color: var(--xp-ink);
}

.xp-scene__index span {
    color: var(--xp-mute);
}

.xp-scene__title {
    margin: 0 0 20px;
    font-size: clamp(2.6rem, 5vw, 5.5rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: var(--xp-ink);
}

.xp-scene__line {
    max-width: 22ch;
    margin: 0 0 28px;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    line-height: 1.35;
    color: rgba(244, 242, 238, 0.86);
}

.xp-scene__attrs {
    max-width: 340px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.xp-scene__attrs li {
    padding: 11px 0;
    border-top: 1px solid var(--xp-line);
    font-size: 0.92rem;
    color: var(--xp-mute);
}

.xp-scene__attrs li:last-child {
    border-bottom: 1px solid var(--xp-line);
}

.xp-scene .xp-link {
    min-height: 44px;
}

/* ---------- Per-room secondary pieces ---------- */
.xp-scene--canecas .xp-scene__aux {
    right: -12%;
    bottom: -8%;
}

.xp-scene--camisetas .xp-scene__aux {
    z-index: 0;
    left: -22%;
    bottom: 4%;
    filter: brightness(0.6);
}

/* ---------- 07 Impressão 3D: special chapter, technical language ---------- */
.xp-scene--special::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(0, 168, 225, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 225, 0.09) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 60% 70% at 62% 50%, #000, transparent);
    mask-image: radial-gradient(ellipse 60% 70% at 62% 50%, #000, transparent);
}

/* ---------- Pinned showroom (desktop, motion allowed, GSAP running) ---------- */
@media (min-width: 901px) {
    .xp-motion .xp-showroom__track {
        height: calc(var(--scenes, 8) * 150vh);
    }

    .xp-motion .xp-showroom__stage {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
    }

    .xp-motion .xp-scene__visual,
    .xp-motion .xp-scene__ghost {
        will-change: transform, opacity;
    }

    .xp-motion .xp-scene {
        position: absolute;
        inset: 0;
        min-height: 0;
        opacity: 0;
    }

    /* Rooms further than the next one aren't rendered, so their lazy images don't load yet */
    .xp-motion .xp-scene:not(.is-near) {
        display: none;
    }

    .xp-motion .xp-rail {
        position: absolute;
        top: 50%;
        right: calc(var(--xp-pad) * 0.5);
        z-index: 5;
        transform: translateY(-50%);
    }

    .xp-motion .xp-rail ol {
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
        padding: 0;
    }

    .xp-motion .xp-rail a {
        flex-direction: row-reverse;
    }

    /* Only the active room names itself; the rest stay as quiet numbers */
    .xp-motion .xp-rail .t {
        max-width: 0;
        overflow: hidden;
        white-space: nowrap;
        opacity: 0;
        transition: max-width 0.5s var(--xp-ease), opacity 0.3s;
    }

    .xp-motion .xp-rail a.is-active .t,
    .xp-motion .xp-rail a:hover .t,
    .xp-motion .xp-rail a:focus-visible .t {
        max-width: 14em;
        opacity: 1;
    }

    .xp-motion .xp-rail a.is-active .n {
        color: var(--xp-ink);
    }

    .xp-motion .xp-rail a.is-active::after {
        content: '';
        align-self: center;
        width: 18px;
        height: 1px;
        background: var(--xp-ink);
    }
}

/* ---------- Mobile-native showroom ---------- */
@media (max-width: 900px) {
    .xp-rail ol {
        gap: 4px 16px;
        padding: 0 24px 6vh;
    }

    .xp-scene {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: 0;
        padding: 8vh 24px 10vh;
    }

    .xp-scene__visual,
    .xp-scene__info {
        grid-column: 1;
        grid-row: auto;
    }

    .xp-scene__visual {
        width: 100%;
    }

    .xp-scene__ghost {
        top: 4vh;
        bottom: auto;
        left: 16px;
        font-size: 26vw;
    }

    .xp-scene__aux {
        width: 40%;
    }

    .xp-scene--canecas .xp-scene__aux {
        right: -4%;
    }

    .xp-scene--camisetas .xp-scene__aux {
        left: -6%;
    }

    .xp-scene__attrs {
        max-width: none;
    }

}
