/* =====================================================================
   Gallery page: stage, slides, photo frames, captions, transition FX.
   Geometry (boxes, image sizes) is set inline by js/gx-layout.js, which
   also guarantees no photo is drawn above its native pixels.
   Bar, strip, cover and mobile rules: gallery-parts.css.
   ===================================================================== */
:root {
  --gx-bar: 104px;
  --gx-gold: #d3c181;
  --gx-gold-hi: #efe2b0;
  --gx-gold-lo: #a88c45;
  --gx-ink: #2b211a;
  --gx-wine: #580e11;
  --gx-cream: #fbf6ec;
  --gx-dark: #140a08;
}

.gx-page {
  background: var(--night);
}

.gx {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: #3e0a0c var(--gx-velvet) 0 0 / 512px 512px repeat;
}

.gx-stage {
  position: absolute;
  inset: 0;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.gx-slides {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: var(--gx-bar);
  overflow: hidden;
}

.gx-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  contain: layout paint;
}

/* the slide being revealed gets its own layer: the mask changes every
   frame, the photo and velvet underneath are not re-rastered */
.gx-slide.is-entering {
  will-change: transform;
}

/* velvet panes: every slide is opaque, so a mask reveal hides the old one */
.gx-pane {
  position: absolute;
  overflow: hidden;
  background:
    radial-gradient(110% 90% at 50% 45%, rgba(20, 4, 4, 0) 40%, rgba(12, 3, 3, 0.62) 100%),
    #3e0a0c var(--gx-velvet) 0 0 / 512px 512px repeat;
}

.gx-pane--full {
  inset: 0;
}

/* the moving velvet sheen (ambient, transform only) */
.gx-sheen {
  position: absolute;
  left: -60%;
  top: -10%;
  width: 220%;
  height: 120%;
  pointer-events: none;
  background: linear-gradient(112deg, rgba(255, 190, 180, 0) 34%, rgba(255, 196, 184, 0.11) 46%,
      rgba(255, 220, 200, 0.05) 52%, rgba(255, 190, 180, 0) 64%);
  will-change: transform;
}

.gx-photo {
  position: absolute;
  box-shadow: 0 28px 70px rgba(8, 2, 2, 0.55), 0 4px 14px rgba(8, 2, 2, 0.4);
}

.gx-ph {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--gx-dark);
}

.gx-ph img {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  max-width: none;
  will-change: transform;
}

/* readable foot for the caption laid over a photo (frame layout) */
.gx-slide--frame .gx-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(22, 10, 8, 0.7) 0%, rgba(22, 10, 8, 0.18) 34%, rgba(22, 10, 8, 0) 55%),
    radial-gradient(120% 95% at 50% 45%, rgba(22, 10, 8, 0) 60%, rgba(22, 10, 8, 0.38) 100%);
}

/* double gold hairline frame; the glint is a bright streak masked to it */
.gx-hair {
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(211, 193, 129, 0.72);
  pointer-events: none;
}

.gx-hair::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(239, 226, 176, 0.32);
}

.gx-glint {
  position: absolute;
  inset: -9px;
  padding: 1px;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.gx-glint i {
  position: absolute;
  left: 0;
  top: -60%;
  width: 22%;
  height: 220%;
  background: linear-gradient(90deg, rgba(255, 246, 214, 0), rgba(255, 249, 228, 1) 50%, rgba(255, 246, 214, 0));
  opacity: 0;
  will-change: transform, opacity;
}

/* captions: Jost label, gold rule, Pinyon script (r8 recipe) */
.gx-cap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gx-head {
  position: absolute;
  display: block;
}

.gx-label {
  display: block;
  font: 500 12px/1.3 var(--ff-sans);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gx-gold-hi);
  text-shadow: 0 0 10px rgba(20, 8, 6, 0.6);
}

.gx-rule {
  display: block;
  width: 96px;
  height: 1px;
  margin: 12px 0 2px;
  background: linear-gradient(to right, var(--gx-gold), rgba(211, 193, 129, 0));
  transform-origin: 0 50%;
}

.gx-script {
  display: block;
  font: 400 60px/1.25 var(--ff-script);
  color: var(--gx-cream);
  white-space: nowrap;
  padding: 0 0.3em 0 0.1em;
  text-shadow: 0 3px 18px rgba(20, 8, 6, 0.55);
}

/* the short text card: cream paper, gold hairline inset */
.gx-card {
  position: absolute;
  display: block;
  padding: 26px 30px 22px;
  color: var(--gx-ink);
  background:
    radial-gradient(130% 100% at 28% 18%, rgba(255, 251, 242, 0.4) 0%, rgba(255, 251, 242, 0) 55%, rgba(120, 92, 52, 0.14) 100%),
    #ece4d3 var(--gx-paper) 0 0 / 768px 768px repeat;
  box-shadow: 0 18px 40px rgba(10, 3, 3, 0.45), inset 0 0 0 1px rgba(168, 140, 69, 0.25);
}

.gx-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(168, 140, 69, 0.45);
  pointer-events: none;
}

.gx-text {
  display: block;
  font: italic 400 21px/1.4 var(--ff-serif);
}

.gx-num {
  display: block;
  margin-top: 12px;
  font: 500 11px/1 var(--ff-sans);
  letter-spacing: 0.32em;
  color: var(--gx-gold-lo);
}

/* pair layout: photo pane + cream paper panel, a gold gutter between */
.gx-paper {
  position: absolute;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(10, 3, 3, 0.5), inset 0 0 0 1px rgba(168, 140, 69, 0.3);
  background:
    radial-gradient(ellipse 80% 75% at 50% 50%, rgba(255, 250, 238, 0.35) 0%, rgba(120, 90, 50, 0) 55%, rgba(110, 80, 40, 0.16) 100%),
    #ece4d3 var(--gx-paper) 0 0 / 768px 768px repeat;
}

.gx-paper::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(168, 140, 69, 0.42);
  pointer-events: none;
}

.gx-orn {
  position: absolute;
  overflow: visible;
}

.gx-orn path {
  fill: none;
  stroke: rgba(168, 140, 69, 0.7);
  stroke-width: 1.2;
}

.gx-orn .gx-orn__in {
  stroke: rgba(168, 140, 69, 0.35);
  stroke-width: 0.8;
}

.gx-slide--pair .gx-card {
  background: none;
  box-shadow: none;
  padding: 0;
  text-align: center;
}

.gx-slide--pair .gx-rule {
  margin-left: auto;
  margin-right: auto;
  transform-origin: 50% 50%;
}

.gx-slide--pair .gx-card::before {
  display: none;
}

.gx-slide--pair .gx-label {
  color: var(--gx-gold-lo);
  text-shadow: none;
}

.gx-slide--pair .gx-rule {
  background: linear-gradient(to right, rgba(168, 140, 69, 0), var(--gx-gold-lo), rgba(168, 140, 69, 0));
}

.gx-slide--pair .gx-script {
  color: var(--gx-wine);
  text-shadow: none;
  font-size: 72px;
  margin-bottom: 10px;
}

.gx-slide--pair .gx-text {
  max-width: 20em;
  margin: 0 auto;
  font-size: 23px;
}

.gx-gutter {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(239, 226, 176, 0), #fff6d6 15%, #d3c181 50%, #fff6d6 85%, rgba(239, 226, 176, 0));
  box-shadow: 0 0 14px rgba(239, 226, 176, 0.55);
}

.gx-gutter--h {
  background: linear-gradient(to right, rgba(239, 226, 176, 0), #fff6d6 15%, #d3c181 50%, #fff6d6 85%, rgba(239, 226, 176, 0));
}

.gx-gutter i {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 22%;
  background: radial-gradient(closest-side, rgba(255, 255, 245, 1), rgba(255, 246, 214, 0));
  opacity: 0;
  will-change: transform, opacity;
}

.gx-gutter--h i {
  width: 22%;
  height: 100%;
}

/* "Photo coming soon": an intentional empty frame for the client's photos */
.gx-soon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  background:
    radial-gradient(90% 70% at 50% 42%, rgba(120, 28, 32, 0.55), rgba(30, 6, 7, 0.9)),
    #2e0709 var(--gx-velvet) 0 0 / 512px 512px repeat;
}

.gx-soon svg {
  width: 34%;
  max-width: 150px;
  height: auto;
  overflow: visible;
}

.gx-soon__script {
  font: 400 44px/1.2 var(--ff-script);
  color: var(--gx-gold-hi);
  padding: 0 0.3em;
}


/* transition FX above the slides: arch outline, iris ring, diagonal seam */
.gx-fxl {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: var(--gx-bar);
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.gx-fxsvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gx-archfx,
.gx-ringfx {
  visibility: hidden;
}

.gx-fxsvg path,
.gx-fxsvg circle {
  fill: none;
}

.gx-archfx__glow,
.gx-ringfx__glow {
  stroke: rgba(239, 226, 176, 0.32);
  stroke-width: 10;
}

.gx-archfx__line {
  stroke: #e6d398;
  stroke-width: 2.4;
}

.gx-ringfx__line {
  stroke: var(--gx-gold-hi);
  stroke-width: 2.6;
}

.gx-seam {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  visibility: hidden;
  background: linear-gradient(to bottom, rgba(239, 226, 176, 0), #fff6d6 12%, #d3c181 50%, #fff6d6 88%, rgba(239, 226, 176, 0));
  box-shadow: 0 0 18px rgba(239, 226, 176, 0.85), 0 0 5px rgba(255, 246, 214, 0.9);
  transform-origin: 50% 0;
  will-change: transform, opacity;
}

.gx-dust {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: calc(100% - var(--gx-bar));
  pointer-events: none;
  z-index: 3;
}

.gx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.gx-card .gx-head {
  position: static;
}
