/* ---- tilt-viewer.css ----
   Full-screen white "new window" viewer: a flat horizontal row of photos you
   scroll through. The centered photo is shown large; the others shrink and
   fade on the sides (scale/opacity set in tilt-viewer.js). */

.tilt-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;                 /* above the top-nav (100) and the lightbox (200) */
  background: #ffffff;          /* "new window" — clean white backdrop */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.tilt-viewer.open { opacity: 1; visibility: visible; }

/* the stage: photos are absolutely centered and moved/scaled by tilt-viewer.js */
.tv-stage {
  position: absolute;
  inset: 0;
  z-index: 1;                   /* keeps the photos below the caption and the close button */
  overflow: hidden;
  touch-action: pan-y;          /* horizontal swipes are handled in JS */
  user-select: none;
  -webkit-user-select: none;
}

/* one photo — its width/height are set in JS to fit the screen */
.tv-media {
  position: absolute;
  left: 50%;
  top: 50%;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  backface-visibility: hidden;
  cursor: pointer;
}

.tv-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
}

/* series label + position counter, bottom-center */
.tv-caption {
  position: absolute;
  left: 0; right: 0;
  bottom: 1.5rem;
  z-index: 4;
  text-align: center;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1a1a1a;
  pointer-events: none;
}

.tv-close {
  position: absolute;
  top: 1.4rem;
  right: 1.7rem;
  z-index: 5;
  background: none;
  border: 0;
  color: #000000;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.tv-close:hover { opacity: 1; }

@media (max-width: 560px) {
  .tv-close { top: 1rem; right: 1.1rem; font-size: 2.2rem; }
}

/* Reduced motion: skip the curve, show a plain horizontal row of cards */
@media (prefers-reduced-motion: reduce) {
  .tv-media { box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.3); }
}
