:root {
  --fondo-calido: #F5F1EB;
  --tierra-suave: #8B7355;
  --filtro-coleccion: sepia(15%) contrast(105%) brightness(98%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--fondo-calido);
  font-family: "Playfair Display", serif;
}

.galeria {
  width: 100dvw;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: var(--fondo-calido);
}

.slide {
  position: relative;
  width: 100dvw;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: transform, opacity;
  background: var(--fondo-calido);
}

.slide.visible {
  opacity: 1;
  transform: scale(1);
}

.foto-marco {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100dvw - clamp(24px, 8dvw, 120px));
  height: calc(100dvh - clamp(56px, 12dvh, 150px));
  transform: translate(-50%, -50%);
  padding: clamp(8px, 1.4dvw, 14px);
  border: 1px solid rgba(139, 115, 85, 0.3);
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(255, 251, 245, 0.88),
    rgba(245, 241, 235, 0.82)
  );
  box-shadow:
    0 10px 30px rgba(139, 115, 85, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.foto-marco img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: var(--filtro-coleccion);
  transition: filter 0.6s ease;
  will-change: filter;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 10px;
  background: #efe8dd;
}

/* En desktop: quitar filtro al pasar el raton */
.slide:hover .foto-marco img {
  filter: none;
}

/* En touch: quitar filtro al tocar */
.slide:active .foto-marco img,
.slide.touch-reveal .foto-marco img {
  filter: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--fondo-calido);
  color: var(--tierra-suave);
  font-family: "Playfair Display", serif;
  letter-spacing: 0.03em;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loader.oculto {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader p {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.footer-fijo {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 50;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--tierra-suave);
  background: rgba(245, 241, 235, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  text-align: center;
  white-space: nowrap;
}

.footer-fijo a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 115, 85, 0.35);
  transition: border-color 0.25s ease, opacity 0.25s ease;
}

.footer-fijo a:hover,
.footer-fijo a:focus-visible {
  opacity: 0.9;
  border-color: rgba(139, 115, 85, 0.85);
}

@media (min-width: 768px) {
  .footer-fijo {
    font-size: 14px;
    bottom: 14px;
  }
}
