/* v11 · portada con su foto y el sobre animado encima; video 01 después del menú; orden nuevo 1-17.
   (base v10) · las imágenes de Valeria y Paul tal cual, una debajo de otra.
   Se agrega: sobre verde que se abre, menú fijo debajo de la primera imagen, botón de Google Maps,
   galería del photoshoot. Un solo verde (#30320e, el fondo de "Valeria y Paul") y un solo vino (#510823). */
:root {
  --verde: #30320e;
  --vino: #510823;
  --marfil: #f3ead8;
  --ancho: min(100vw, 540px);
  --menu-h: 46px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--verde);
  color: var(--marfil);
  font-family: 'Cormorant Garamond', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.cerrada { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }

/* ---------- 1 · portada: su foto con el sobre ---------- */
.portada {
  position: fixed; inset: 0; z-index: 40;
  background: #1d1a14; overflow: hidden;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.portada[hidden] { display: none; }
.portada-fondo {
  position: absolute; inset: -6%; width: 112%; height: 112%; max-width: none;
  object-fit: cover; filter: blur(22px) brightness(.62) saturate(.9);
  pointer-events: none;
}
/* la foto completa: en celular se recorta apenas a los lados, nunca arriba ni abajo */
.escena {
  position: absolute; left: 50%; top: 50%;
  width: min(130vw, 66.82svh); aspect-ratio: 1025 / 1534;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 80px rgba(0, 0, 0, .35);
}
.escena-foto { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
/* el sobre animado va justo encima del sobre de la foto (medido en la imagen 1) */
.sobre { position: absolute; left: 14.622%; top: 44.014%; width: 70.439%; height: 50.130%; }
.sobre .capa { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; user-select: none; }
/* las solapas giran sobre la bisagra (borde de arriba del sobre: 36.18 % del lienzo) */
.solapa-cerrada, .solapa-abierta { transform-origin: 50% 36.18%; backface-visibility: hidden; }
.solapa-abierta { opacity: 0; }
/* la tarjeta vive dentro del sobre: se recorta en el fondo del sobre, nunca arriba */
.tarjeta-clip { position: absolute; inset: 0; clip-path: inset(-400% -60% 6.7% -60%); pointer-events: none; }
.tarjeta {
  position: absolute; left: 22.1%; top: 37.38%; width: 55.8%; height: auto;
  box-shadow: 0 0 0 2px #fbf7ef, 0 10px 26px rgba(0, 0, 0, .38);
  will-change: transform;
}
.tarjeta.libre { position: fixed; left: 0; top: 0; z-index: 45; transform-origin: 0 0; }
.portada:focus-visible { outline: none; }
.portada.abriendo { cursor: default; }

/* ---------- hojas ---------- */
.hojas {
  width: var(--ancho); margin: 0 auto;
  box-shadow: 0 0 60px rgba(0,0,0,.35);
}
.hoja, .galeria { scroll-margin-top: var(--menu-h); }
.hoja { position: relative; container-type: inline-size; overflow: hidden; }
.hoja > img, .lamina > img { width: 100%; }
.lamina { position: relative; }

/* aparecen al llegar (la primera no: tiene que estar quieta bajo el sobre) */
.js .hoja:not(.nombres):not(.primera) > img:first-child,
.js .hoja .lamina > img:first-child { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
/* ojo: este selector debe pesar igual o más que el de arriba; en la v10 pesaba menos y todas las láminas se quedaban invisibles */
.js .hoja.in:not(.nombres):not(.primera) > img:first-child, .js .hoja.in .lamina > img:first-child { opacity: 1; transform: none; }

/* ---------- menú fijo ---------- */
.menu {
  position: sticky; top: 0; z-index: 15;
  background: var(--verde);
  border-top: 1px solid rgba(243, 234, 216, .22);
  border-bottom: 1px solid rgba(243, 234, 216, .22);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.menu ul {
  list-style: none; margin: 0; padding: 0 14px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  scroll-behavior: smooth; overscroll-behavior-x: contain;
}
.menu ul::-webkit-scrollbar { display: none; }
.menu li { flex: none; }
.menu a {
  display: block; padding: 15px 10px 14px;
  font-weight: 500; font-size: 12px; line-height: 1; letter-spacing: .24em; text-transform: uppercase;
  color: var(--marfil); opacity: .62; text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: opacity .3s ease, border-color .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.menu a.activa { opacity: 1; border-bottom-color: var(--marfil); }
@media (hover: hover) { .menu a:hover { opacity: 1; } }
.menu a:focus-visible { outline: 1px solid var(--marfil); outline-offset: -4px; }

/* ---------- la orquídea sale cuando "Valeria y Paul" aparece ---------- */
.nombres .flor {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0;
  transform: translate(16%, 3%) rotate(6deg) scale(.94);
  transform-origin: 100% 45%;
  transition: opacity 1.6s ease .35s, transform 2.2s cubic-bezier(.16,.8,.2,1) .35s;
}
body.abierta .nombres.in .flor { opacity: 1; transform: none; }

/* ---------- cuenta regresiva viva sobre la foto ---------- */
.cuenta { position: absolute; inset: 0; pointer-events: none; }
.cuenta .num {
  position: absolute; left: var(--x); top: 71.3%;
  transform: translate(-50%, -50%);
  font-weight: 400; font-size: 9cqw; letter-spacing: .1em; text-indent: .1em; line-height: 1;
  color: #f4ead6; font-variant-numeric: lining-nums tabular-nums;
  text-shadow: 0 1px 6px rgba(0,0,0,.18);
  white-space: nowrap;
}

/* ---------- video 01 (más chico que las láminas) ---------- */
.video-sec { background: var(--verde); padding: 40px 0 44px; scroll-margin-top: var(--menu-h); }
.video-marco {
  position: relative; width: 74%; margin: 0 auto; aspect-ratio: 9 / 16;
  outline: 1px solid rgba(243, 234, 216, .45); outline-offset: 7px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}
.video-marco video { display: block; width: 100%; height: 100%; object-fit: cover; background: #1d1a14; }

/* ---------- botón de Google Maps ---------- */
.maps { background: var(--verde); padding: 22px 16px 26px; display: flex; justify-content: center; }
.boton {
  display: inline-block;
  background: var(--vino); color: var(--marfil);
  border: 1px solid rgba(243, 234, 216, .55); outline: 1px solid var(--vino); outline-offset: 3px;
  padding: 14px 22px 14px calc(22px + .26em);
  font-weight: 500; font-size: 13px; line-height: 1.2; letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none; text-align: center;
  transition: filter .25s ease;
}
@media (hover: hover) { .boton:hover { filter: brightness(1.18); } }
.boton:focus-visible { outline: 2px solid var(--marfil); }

/* ---------- zonas tocables ---------- */
.hot {
  position: absolute;
  left: var(--l); top: var(--t); width: var(--w); height: var(--h);
  display: block; padding: 0; border: 0; background: transparent; border-radius: 2px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .25s ease;
}
.hot:active { background-color: rgba(255, 248, 235, .16); }
@media (hover: hover) { .hot:hover { background-color: rgba(255, 248, 235, .08); } }
.hot:focus-visible { outline: 2px solid var(--marfil); outline-offset: 2px; }

/* QA: ?zonas pinta las zonas tocables */
.ver-zonas .hot { background: rgba(255, 0, 90, .28); outline: 1px solid #ff0060; }

/* ---------- galería del photoshoot ---------- */
.galeria { background: var(--verde); padding: 44px 0 30px; }
.galeria-titulo {
  margin: 0; text-align: center;
  font-weight: 400; font-size: 27px; line-height: 1.2; letter-spacing: .3em; text-transform: uppercase; padding-left: .3em;
  color: var(--marfil);
}
.galeria-etq {
  margin: 8px 0 22px; text-align: center;
  font-weight: 500; font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; padding-left: .24em;
  color: var(--marfil); opacity: .75;
}
.carrusel { position: relative; --slide-w: min(calc(var(--ancho) * .86), calc(78svh * 2 / 3)); }
.pista {
  display: flex; gap: 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  padding: 4px 0 10px;
}
.pista::-webkit-scrollbar { display: none; }
.pista:focus-visible { outline: none; }
.slide {
  flex: 0 0 var(--slide-w); aspect-ratio: 2 / 3; margin: 0;
  scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-in;
  background: rgba(0, 0, 0, .18); box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.slide:first-child { margin-left: calc((var(--ancho) - var(--slide-w)) / 2); }
.slide:last-child { margin-right: calc((var(--ancho) - var(--slide-w)) / 2); }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.flecha {
  position: absolute; top: calc(50% - 23px); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0 0 4px;
  background: var(--marfil); color: var(--vino);
  font-family: inherit; font-size: 30px; line-height: 1; display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.carrusel .flecha.ant { left: calc((var(--ancho) - var(--slide-w)) / 2 + 8px); }
.carrusel .flecha.sig { right: calc((var(--ancho) - var(--slide-w)) / 2 + 8px); }
.contador {
  margin: 12px 0 0; text-align: center;
  font-weight: 500; font-size: 12px; letter-spacing: .24em; padding-left: .24em;
  color: var(--marfil); font-variant-numeric: lining-nums;
}

/* pantalla completa */
.visor { position: fixed; inset: 0; z-index: 60; background: var(--verde); }
.visor[hidden] { display: none; }
.visor-pista { height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.visor-pista::-webkit-scrollbar { display: none; }
.visor-pista figure { flex: 0 0 100%; height: 100%; margin: 0; padding: 64px 0; display: grid; place-items: center; scroll-snap-align: center; scroll-snap-stop: always; }
.visor-pista img { max-width: 100%; max-height: 100%; object-fit: contain; }
.visor .flecha.ant { left: 10px; }
.visor .flecha.sig { right: 10px; }
.visor .contador { position: absolute; left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom)); margin: 0; }
.visor-cerrar {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--marfil); color: var(--vino); font-family: inherit; font-size: 30px; line-height: 1; cursor: pointer;
}

/* ---------- aviso de "copiado" ---------- */
.aviso {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; margin: 0;
  background: var(--vino); color: var(--marfil);
  font-weight: 500; font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  padding: 12px 20px 12px calc(20px + .28em); white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  transition: opacity .3s ease, transform .3s ease; pointer-events: none;
}
.aviso.ver { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html, .menu ul { scroll-behavior: auto; }
  .nombres .flor, .hoja > img:first-child, .lamina > img:first-child { transition: none !important; }
}
