/* ============================================================
   SYZYGY Architects — gallery
   One screen that never scrolls: the photographs fill it, the
   header floats above, and a single quiet line says how to move.
   ============================================================ */

html.gl, html.gl body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.gl-stage { position: fixed; inset: 0; background: var(--paper); }
.gl-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.gl-stage canvas.is-held { cursor: grabbing; }

/* how to move: stays until the visitor has moved, then steps back */
.gl-hint {
  position: fixed; left: 50%; bottom: clamp(24px, 4vh, 38px); z-index: 5; margin: 0; transform: translateX(-50%);
  white-space: nowrap; pointer-events: none; color: rgb(48 38 32 / 0.28);
  font-family: var(--font-display); font-size: max(16.5px, 1.1458vw); font-weight: 560; line-height: 1.07; letter-spacing: -0.028em;
  transition: opacity var(--slow) var(--ease-out);
}
.gl-hint.is-gone { opacity: 0; }

/* a hairline that fills while the photographs arrive */
.gl-loader {
  position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
}
.gl-loader.is-done { opacity: 0; }
.gl-track { width: min(180px, 40vw); height: 1px; background: var(--sand); overflow: hidden; }
.gl-bar { display: block; width: 100%; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.3s linear; }

/* without the 3D layer: every photograph on a plain page */
html.gl-plain, html.gl-plain body { height: auto; overflow: auto; }
html.gl-plain .gl-stage { position: static; columns: 3 280px; column-gap: 20px; padding: clamp(120px, 16vh, 180px) var(--edge) 80px; }
html.gl-plain .gl-stage img { display: block; width: 100%; height: auto; margin: 0 0 20px; border-radius: var(--radius); background: var(--linen); }

@media (prefers-reduced-motion: reduce) {
  .gl-hint, .gl-loader, .gl-bar { transition: none; }
}

/* a soft band of paper under the header, so its marks stay readable over a passing photograph */
.gl-stage::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: clamp(88px, 13vh, 128px); pointer-events: none;
  background: linear-gradient(to bottom, rgb(246 242 235 / 0.92), rgb(246 242 235 / 0.6) 55%, rgb(246 242 235 / 0));
}
html.gl-plain .gl-stage::after { content: none; }
