/* ==========================================================================
   NEXORA DIGITAL — showroom.css
   The portfolio exhibition: category selectors, one exhibit at a time with
   its own spatial composition, and the full project detail experience.
   ========================================================================== */

.showroom { overflow: hidden; background: linear-gradient(180deg, var(--obsidian), #0C0C0F 30%, #0C0C0F 70%, var(--obsidian)); }
.showroom__note { margin-top: .4rem; font-size: .85rem; color: var(--ivory-3); max-width: 60ch; }

/* ---------- Category selectors ---------- */
.cats { display: grid; grid-template-columns: repeat(var(--cats, 3), minmax(0, 1fr)); border-block: 1px solid var(--line); margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.cat {
  position: relative; display: grid; gap: .35rem; text-align: left;
  padding: 1.5rem 1.6rem 1.4rem; color: var(--ivory-3);
  transition: color .4s var(--ease), background-color .5s var(--ease);
}
.cat + .cat { border-left: 1px solid var(--line); }
.cat__name { font-family: var(--display); font-weight: 300; text-transform: uppercase; font-size: clamp(1rem, .8rem + .6vw, 1.35rem); line-height: 1.2; letter-spacing: .02em; }
.cat__meta { font-size: .85rem; }
.cat::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0); transition: transform .8s var(--ease);
}
.cat:hover { color: var(--ivory-2); }
.cat[aria-selected="true"] { color: var(--ivory); background: radial-gradient(80% 120% at 50% 0%, rgba(198, 161, 91, .08), transparent 70%); }
.cat[aria-selected="true"]::before { transform: scaleX(1); }
.cat[aria-selected="true"] .cat__meta { color: var(--gold); }

/* ---------- Room ---------- */
.room { position: relative; }
.room__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.room__projects { display: flex; gap: .4rem; flex-wrap: wrap; }
.room__project {
  padding: .55rem 1.05rem; border-radius: var(--r-pill); border: 1px solid var(--line-2);
  font-size: .88rem; color: var(--ivory-2); transition: all .4s var(--ease);
}
.room__project:hover { border-color: rgba(244, 240, 232, .35); color: var(--ivory); }
.room__project[aria-pressed="true"] { background: var(--ivory); color: var(--obsidian); border-color: var(--ivory); }
.room__project .soon { font-size: .74rem; opacity: .7; margin-left: .35rem; }
.room__arrows { display: flex; gap: .4rem; }
.room__arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: border-color .3s, color .3s; }
.room__arrow:hover { border-color: var(--gold); color: var(--gold); }
.room__arrow svg { width: 18px; height: 18px; }

.room__stage { position: relative; min-height: clamp(520px, 46vw, 720px); perspective: 2000px; }
.room__stage::after { /* floor glow under every exhibit */
  content: ""; position: absolute; left: 5%; right: 5%; bottom: -2%; height: 22%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, var(--ex-glow, rgba(198, 161, 91, .14)), transparent 70%);
  filter: blur(10px); pointer-events: none; transition: background 1s;
}

.exhibit {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  visibility: hidden; opacity: 0;
  transform: translateZ(-160px) translateX(4%);
  transition: opacity .7s var(--ease), transform 1s var(--ease), visibility 0s linear 1s;
}
.exhibit.is-active { visibility: visible; opacity: 1; transform: none; transition: opacity .9s var(--ease) .15s, transform 1.2s var(--ease) .1s, visibility 0s; }
.exhibit.is-leaving-back { transform: translateZ(-160px) translateX(-4%); }
.exhibit__scene { position: relative; height: 100%; min-height: inherit; transform-style: preserve-3d; }
.exhibit__info { display: grid; gap: 1.1rem; align-content: center; }
.exhibit__industry { font-size: .85rem; color: var(--gold); }
.exhibit__name { font-family: var(--display); font-weight: 300; text-transform: uppercase; font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem); line-height: 1.04; }
.exhibit__intro { color: var(--ivory-2); max-width: 40ch; }
.exhibit__swatches { display: flex; gap: 6px; }
.exhibit__swatches i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.exhibit__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .4rem; }

/* pieces inside a scene */
.piece { position: absolute; transform-style: preserve-3d; }

/* live-preview cover on the main desktop piece */
.live-cover {
  position: absolute; inset: 30px 0 0; z-index: 4;
  display: grid; place-items: center;
  background: linear-gradient(180deg, transparent 50%, rgba(9, 9, 11, .55));
  transition: opacity .4s var(--ease);
}
.live-cover .btn { transform: translateY(8px); opacity: 0; transition: opacity .4s, transform .5s var(--ease); }
.piece:hover .live-cover .btn, .live-cover .btn:focus-visible, .live-cover.is-sticky .btn { opacity: 1; transform: none; }
.is-interactive .live-cover { opacity: 0; pointer-events: none; }
.vp__canvas { pointer-events: none; }
.is-interactive .vp__canvas { pointer-events: auto; }
.live-exit {
  position: absolute; z-index: 6; top: 40px; right: 10px; display: none;
}
.is-interactive .live-exit { display: inline-flex; }
.is-interactive .frame { box-shadow: var(--shadow-float), 0 0 0 1.5px var(--gold); }

/* --- Layout: cinema (Aurelle) — one grand window under a spotlight --- */
.exhibit[data-layout="cinema"] .exhibit__scene::before {
  content: ""; position: absolute; left: 50%; top: -18%; width: 80%; height: 130%; transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 0%, transparent 160deg, rgba(227, 198, 142, .09) 180deg, transparent 200deg);
  pointer-events: none;
}
.exhibit[data-layout="cinema"] .piece--main { left: 2%; right: 2%; top: 50%; transform: translateY(-50%) rotateX(4deg); }

/* --- Layout: layered (The Indian Table) — desktop behind, phone in front --- */
.exhibit[data-layout="layered"] .piece--main { left: 0; width: 84%; top: 50%; transform: translateY(-52%) rotateY(12deg) translateZ(-40px); }
.exhibit[data-layout="layered"] .piece--phone { right: 2%; width: 21%; top: 50%; transform: translateY(-38%) rotateY(-8deg) translateZ(90px); }

/* --- Layout: gallery (Mellow & Muse) — tilted window with identity cards --- */
.exhibit[data-layout="gallery"] .piece--main { left: 4%; width: 82%; top: 50%; transform: translateY(-50%) rotateY(-14deg) rotateX(4deg); }
.exhibit[data-layout="gallery"] .piece--card { width: 30%; padding: 1rem 1.1rem; border-radius: var(--r-m); background: rgba(20, 18, 16, .78); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-float); font-size: .8rem; color: var(--ivory-2); }
.exhibit[data-layout="gallery"] .piece--card b { display: block; color: var(--ivory); font-weight: 500; margin-bottom: .5rem; }
.exhibit[data-layout="gallery"] .piece--card-a { left: 0; bottom: 4%; transform: translateZ(80px) rotateY(-6deg); }
.exhibit[data-layout="gallery"] .piece--card-b { right: 0; top: 6%; transform: translateZ(60px) rotateY(-10deg); }
.type-specimen { font-size: 1.35rem; line-height: 1.1; color: var(--ivory); margin-bottom: .5rem; }
.chip-row { display: flex; gap: 5px; flex-wrap: wrap; }
.chip-row i { width: 26px; height: 26px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }

/* --- Layout: editorial (Élora) — info left, phone + window right --- */
.exhibit[data-layout="editorial"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }
.exhibit[data-layout="editorial"] .exhibit__info { order: -1; }
.exhibit[data-layout="editorial"] .exhibit__scene::before {
  content: ""; position: absolute; inset: 8% 10% 8% 14%; border-radius: 300px 300px 0 0;
  background: linear-gradient(180deg, rgba(217, 201, 184, .09), rgba(217, 201, 184, 0));
  border: 1px solid rgba(217, 201, 184, .12);
}
.exhibit[data-layout="editorial"] .piece--main { right: 0; width: 80%; top: 50%; transform: translateY(-50%) rotateY(-10deg); }
.exhibit[data-layout="editorial"] .piece--phone { left: 0; width: 22%; top: 50%; transform: translateY(-44%) rotateY(10deg) translateZ(110px); }

/* --- Layout: industrial (Forge) — hard angle, lime edge light --- */
.exhibit[data-layout="industrial"] .piece--main { left: 3%; width: 90%; top: 50%; transform: translateY(-50%) rotateY(22deg) rotateX(2deg); }
.exhibit[data-layout="industrial"] .piece--main .frame { border-radius: 4px; box-shadow: var(--shadow-float), -14px 0 40px -20px rgba(198, 242, 58, .45), 0 0 0 1px rgba(198, 242, 58, .2); }
.exhibit[data-layout="industrial"] .exhibit__scene::before {
  content: ""; position: absolute; left: -4%; top: 12%; width: 6px; height: 76%;
  background: #C6F23A; transform: skewY(-12deg); opacity: .7; box-shadow: 0 0 30px rgba(198, 242, 58, .6);
}

/* --- Layout: clinic (Om Dental) — calm, straight-on window with a phone in front --- */
.exhibit[data-layout="clinic"] .exhibit__scene::before {
  content: ""; position: absolute; left: 10%; right: 4%; top: 10%; bottom: 10%; border-radius: 28px;
  background: linear-gradient(160deg, rgba(221, 242, 236, .07), rgba(20, 124, 128, .02));
  border: 1px solid rgba(221, 242, 236, .08);
}
.exhibit[data-layout="clinic"] .piece--main { left: 10%; width: 86%; top: 50%; transform: translateY(-52%) rotateX(5deg) rotateY(-6deg); }
.exhibit[data-layout="clinic"] .piece--phone { left: 0; width: 20%; top: 50%; transform: translateY(-34%) rotateY(8deg) translateZ(120px); }

.exhibit__kind {
  display: inline-block; margin-left: .7rem; padding: .15rem .6rem; border-radius: var(--r-pill);
  border: 1px solid var(--line-gold); font-size: .72rem; color: var(--ivory-2); vertical-align: 1px;
}

/* --- Layout: pending --- */
.exhibit[data-layout="pending"] .piece--main { left: 6%; right: 6%; top: 50%; transform: translateY(-50%) rotateX(3deg); }
.exhibit[data-layout="pending"] .frame { box-shadow: 0 0 0 1px rgba(198, 161, 91, .25); background: transparent; }

/* ---------- Project detail (full-screen dialog) ---------- */
.detail {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; color: var(--ivory);
  background: radial-gradient(60% 50% at 30% 0%, var(--d-glow, rgba(198, 161, 91, .1)), transparent 70%), #0A0A0C;
  overflow: hidden;
}
.detail::backdrop { background: rgba(5, 5, 6, .8); }
.detail[open] { animation: detailIn .7s var(--ease); }
@keyframes detailIn { from { opacity: 0; transform: scale(.985); } }
.detail__wrap { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.detail__head {
  display: flex; align-items: center; gap: 1rem; padding: .9rem var(--gutter);
  border-bottom: 1px solid var(--line);
}
.detail__crumb { margin-right: auto; display: flex; align-items: baseline; gap: .9rem; min-width: 0; }
.detail__crumb strong { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail__crumb span { font-size: .85rem; color: var(--gold); white-space: nowrap; }
.detail__close { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; flex: none; transition: border-color .3s, color .3s; }
.detail__close:hover { border-color: var(--gold); color: var(--gold); }
.detail__close svg { width: 18px; height: 18px; }
.detail__body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); min-height: 0; }
.detail__preview { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1rem; padding: 1.2rem var(--gutter) 1.4rem; min-height: 0; border-right: 1px solid var(--line); }
.devices { display: inline-flex; gap: .3rem; padding: .3rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); justify-self: start; }
.devices button { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: var(--r-pill); font-size: .82rem; color: var(--ivory-2); transition: all .35s var(--ease); }
.devices button svg { width: 15px; height: 15px; }
.devices button[aria-pressed="true"] { background: var(--ivory); color: var(--obsidian); }
.detail__screen { position: relative; display: grid; place-items: center; min-height: 0; }
.detail__device { margin: 0 auto 26px; transition: width .6s var(--ease); }
.detail__hint { position: absolute; left: 50%; bottom: .2rem; transform: translateX(-50%); font-size: .78rem; color: var(--ivory-3); white-space: nowrap; }

.detail__info { overflow-y: auto; padding: 2rem clamp(1.4rem, 2.5vw, 2.6rem) 3rem; display: grid; gap: 2.2rem; align-content: start; overscroll-behavior: contain; }
.detail__title { font-family: var(--display); font-weight: 300; text-transform: uppercase; font-size: clamp(2rem, 1.4rem + 1.6vw, 3rem); line-height: 1.02; }
.detail__intro { color: var(--ivory-2); }
.detail__block h3 { font-size: .8rem; font-weight: 500; letter-spacing: .08em; color: var(--gold); margin-bottom: .9rem; }
.detail__block .check-list { display: grid; gap: .55rem; }
.detail__palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.swatch { display: grid; gap: .45rem; font-size: .75rem; color: var(--ivory-3); }
.swatch i { height: 54px; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.swatch b { color: var(--ivory-2); font-weight: 500; }
.detail__type { display: grid; gap: .8rem; }
.detail__type div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.detail__type span:first-child { font-size: 1.9rem; line-height: 1.1; color: var(--ivory); }
.detail__type small { font-size: .78rem; color: var(--ivory-3); text-align: right; }
.detail__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.detail__nav { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .88rem; }
.detail__nav button { display: inline-flex; align-items: center; gap: .5rem; color: var(--ivory-2); }
.detail__nav button:hover { color: var(--gold); }
.detail__nav svg { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .cats { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 auto; min-width: 220px; }
}
@media (max-width: 1020px) {
  .exhibit, .exhibit[data-layout="editorial"] { position: relative; grid-template-columns: minmax(0, 1fr); align-items: start; display: none; transform: none; }
  .exhibit.is-active { display: grid; }
  .exhibit[data-layout="editorial"] .exhibit__info { order: 0; }
  .exhibit__scene { height: 62vw; min-height: 260px; }
  .room__stage { min-height: 0; }
  .detail__body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .detail__preview { border-right: 0; border-bottom: 1px solid var(--line); height: 70vh; }
  .detail__info { overflow: visible; }
}
@media (max-width: 640px) {
  .cats { display: grid; grid-template-columns: minmax(0, 1fr); margin-inline: 0; padding-inline: 0; }
  .cat { min-width: 0; }
  .cat + .cat { border-left: 0; border-top: 1px solid var(--line); }
  .cat { grid-template-columns: 1fr auto; align-items: baseline; padding: 1rem .2rem; }
  .exhibit__scene { height: 78vw; }
  .exhibit[data-layout="gallery"] .piece--card { display: none; }
  .exhibit[data-layout="layered"] .piece--phone { width: 26%; }
  .exhibit[data-layout="editorial"] .piece--phone { width: 27%; }
  .exhibit[data-layout="clinic"] .piece--phone { width: 26%; }
  .room__arrows { display: none; }
  .detail__preview { height: 64vh; }
  .devices button span { display: none; }
}

/* single-file build: the separate preview page is not available */
.is-embedded [data-d="fullscreen"] { display: none; }
