/* ══════════════════════════════════════════════════════════════════
   /gallery — Version B home: curved gallery corridor
   ══════════════════════════════════════════════════════════════════ */

.gx {
  --gx-ink: #1a1a1a;
  --gx-muted: #8a8884;
  --gx-room: #f1f1ef;
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--gx-room);
  color: var(--gx-ink);
  font-family: 'Inter', -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

:where(.gx) button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: url('cursor-hand-tilt.png?v=4') 4 3, pointer;
}

/* ── top bar ─────────────────────────────────────────────────────── */
.gx-top {
  position: absolute;
  z-index: 5;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  pointer-events: none;
}
.gx-top > * { pointer-events: auto; }
.gx-top__brand img { display: block; height: 14px; width: auto; }

.gx-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.06);
}
.gx-toggle button {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--gx-muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.gx-toggle button.is-on { background: var(--gx-ink); color: #fff; }

/* ── 3D stage ────────────────────────────────────────────────────── */
.gx-stage {
  position: absolute;
  inset: 0;
  perspective-origin: 50% 46%;
  touch-action: none;
  cursor: grab;
  /* ceiling (top) and floor (bottom): the curved wall covers the middle, so
     its top/bottom edges draw the ceiling and floor lines */
  background: linear-gradient(180deg,
    #ececea 0%, #f4f4f2 22%, #f4f4f2 42%,
    #e3e3e0 56%, #dfdfdc 75%, #d8d8d5 100%);
  transition: transform 0.55s cubic-bezier(0.6, 0, 0.3, 1), opacity 0.5s ease;
}
.gx-stage:active { cursor: grabbing; }

.gx-scene,
.gx-wall,
.gx-ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.gx-wall,
.gx-ring { left: 0; top: 0; }

.gx-wall__seg {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  backface-visibility: hidden;
}
/* ── hung pieces ─────────────────────────────────────────────────── */
.gx-piece {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.gx-card {
  display: block;
  position: relative;
  width: 100%;
  background: var(--gx-paper, #eddbbf);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 14px 28px -14px rgba(0, 0, 0, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease;
  overflow: hidden;
}
.gx-card:hover,
.gx-piece.is-active .gx-card:hover {
  transform: translateZ(18px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 26px 44px -18px rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.06);
}

.gx-card__num {
  position: absolute;
  top: 7%;
  left: 8%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.5);
}

.gx-card__fig {
  position: absolute;
  left: 0; right: 0;
  bottom: 9%;
  top: 16%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.gx-card__fig svg {
  display: block;
  height: 100%;
  width: auto;
  pointer-events: none;
}

.gx-label {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  opacity: 0.85;
  pointer-events: none;
}
.gx-label__name {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  line-height: 1.1;
}
.gx-label__role {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 14px;
  color: #555;
}

/* intro / title card: a wall text, not a print */
.gx-card--title {
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  text-align: left;
}
.gx-card--title:hover { transform: none; box-shadow: none; }
.gx-title-eyebrow,
.gx-title-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gx-muted);
  line-height: 1.7;
}
.gx-title-logo { width: 100%; height: auto; display: block; }

/* ── bottom caption ──────────────────────────────────────────────── */
.gx-caption {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 5.5vh;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  text-align: center;
  pointer-events: none;
}
.gx-caption__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: gx-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.gx-caption__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gx-muted);
}
.gx-caption__title {
  margin: 0;
  font-family: 'Erotique Alternate', 'DM Serif Display', serif;
  font-weight: 500;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.gx-caption__cta {
  pointer-events: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
}
@keyframes gx-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── nav (bottom right) ──────────────────────────────────────────── */
.gx-nav {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.gx-nav__btns { display: flex; gap: 6px; order: -1; }
.gx-nav__btns button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(26, 26, 26, 0.18);
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease;
}
.gx-nav__btns button:hover { background: #fff; }
.gx-nav__hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.7;
  text-transform: uppercase;
  text-align: right;
  color: var(--gx-muted);
}

/* ── entering a profile: walk into the wall ──────────────────────── */
.gx.is-entering .gx-stage { transform: scale(1.9); opacity: 0; }
.gx.is-entering .gx-caption,
.gx.is-entering .gx-nav { opacity: 0; transition: opacity 0.3s ease; }

/* ── list view ───────────────────────────────────────────────────── */
.gx-list {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 96px 24px 64px;
  background: #fff;
  user-select: text;
}
.gx-list__items {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 920px;
  border-top: 1px solid rgba(26, 26, 26, 0.12);
}
.gx-list__row {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr 1fr 24px;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.12);
  text-align: left;
  transition: padding 0.25s ease, color 0.2s ease;
}
.gx-list__row:hover { padding-left: 8px; }
.gx-list__no,
.gx-list__arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gx-muted);
}
.gx-list__name { font-family: 'DM Serif Display', serif; font-size: 22px; }
.gx-list__role { font-family: 'DM Serif Display', serif; font-style: italic; font-size: 16px; color: #555; }
.gx-list__arrow { opacity: 0; transition: opacity 0.2s ease; }
.gx-list__row:hover .gx-list__arrow { opacity: 1; }

/* Reserved "(vaga)" row: no hover lift, no arrow, muted italic. */
.gx-list__row--tba {
  cursor: default;
  color: var(--gx-muted);
}
.gx-list__row--tba:hover { padding-left: 0; }
.gx-list__name--tba {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 20px;
  color: #9a9792;
  grid-column: 2 / span 3;
}

/* Reserved "(vaga)" piece in the ring: muted, no CTA, cursor default. */
.gx-piece--tba .gx-card { cursor: default; filter: saturate(0.3) brightness(1.05); opacity: 0.55; }
.gx-piece--tba .gx-card:hover { transform: none; box-shadow: none; }
.gx-label__name--tba {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  color: #9a9792;
}

@media (max-width: 640px) {
  .gx-top { padding: 14px 16px; }
  .gx-nav { right: 16px; bottom: 16px; }
  .gx-nav__hint { display: none; }
  .gx-caption { bottom: 72px; }
  .gx-list { padding: 80px 16px 48px; }
  .gx-list__row { grid-template-columns: 32px 1fr 16px; }
  .gx-list__role { display: none; }
  .gx-label__name { font-size: 15px; }
  .gx-label__role { font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════════════
   Corridor (walkable, WebGL) — /gallery
   ══════════════════════════════════════════════════════════════════ */

.cx-stage {
  position: absolute;
  inset: 0;
  touch-action: none;
  background: #f2f2f0;
  transition: transform 0.6s cubic-bezier(0.6, 0, 0.3, 1), opacity 0.55s ease;
}

.cx-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* the figure SVGs, rendered off-screen only to be baked into textures */
.cx-figsrc {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.cx-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(60, 58, 52, 0.10) 100%);
}

.cx.is-entering .cx-stage { opacity: 0; }
.cx.is-entering .gx-caption,
.cx.is-entering .gx-nav { opacity: 0; transition: opacity 0.3s ease; }
