/* ============================================
   GALLERY — Faded Photographs
   Sepia frames, flash effects, Victorian warmth
   ============================================ */

.gallery-page {
  min-height: 100vh;
  padding: 60px 20px 80px;
}

.gallery-container {
  max-width: 720px;
  margin: 0 auto;
}

/* --- Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0 auto;
}

/* --- Gallery Reveals --- */
.gallery-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.gallery-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Photo Frame Overrides --- */
.gallery-page .photo-frame {
  display: block;
  transition: border-color 0.5s, transform 0.3s;
}

.gallery-page .photo-frame:hover {
  transform: scale(1.01);
}

/* --- Photo Link --- */
.photo-link {
  cursor: pointer;
}

.photo-link:hover .photo-title {
  color: var(--gold-bright);
}

/* --- Photo Title --- */
.photo-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--sepia);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  transition: color 0.4s;
}

/* --- Photo Description --- */
.photo-desc {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.7rem;
  color: var(--vic-dim);
  line-height: 1.6;
}

/* --- Flash Effect --- */
.photo-frame .photo-image {
  transition: filter 0.15s ease;
}

.photo-frame:hover .photo-image {
  filter: sepia(0.1) brightness(1.2) contrast(1.3);
  transition: filter 0.05s ease;
}

.photo-frame .photo-image.flash {
  filter: sepia(0) brightness(2.5) contrast(0.5) !important;
  transition: filter 0s !important;
}

/* --- Void Photo (absolute darkness) --- */
.photo-image--void {
  background: #000000 !important;
  filter: none !important;
}

.photo-frame:hover .photo-image--void {
  filter: brightness(1.02) !important;
}

/* --- Corrupted Photo --- */
.photo-image--corrupted {
  background: linear-gradient(
    135deg,
    #0a0806 0%,
    #1a1410 20%,
    #0e0a08 40%,
    #1e1612 55%,
    #0a0806 70%,
    #161210 85%,
    #0c0a08 100%
  ) !important;
  position: relative;
}

.photo-image--corrupted::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(74, 26, 42, 0.08) 3px,
    rgba(74, 26, 42, 0.08) 4px
  );
  z-index: 1;
}

/* --- Glitch Effect for Photo 8 --- */
.photo-glitch {
  position: relative;
}

.photo-glitch.glitching {
  animation: photo-glitch-shift 0.3s ease;
}

@keyframes photo-glitch-shift {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, 1px); }
}

.corrupted-text {
  color: var(--burgundy-bright);
  font-style: normal;
  opacity: 0.7;
}

/* --- Flicker Animation --- */
.photo-flickering {
  animation: photo-flicker 0.15s ease;
}

@keyframes photo-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Footer --- */
.gallery-footer {
  text-align: center;
  margin-top: 40px;
  padding-bottom: 40px;
}

.gallery-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.7rem;
  color: var(--vic-faint);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto;
  opacity: 0.5;
}

.depth-marker {
  font-family: var(--font-mono);
  font-size: 0.45rem;
  color: var(--vic-faint);
  letter-spacing: 0.4em;
  margin-top: 32px;
  opacity: 0.15;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .gallery-page {
    padding: 40px 16px 60px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
