/* Mobile-first. Las fotos mandan; el form aparece en un popover al pulsar el CTA. */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Times New Roman", Times, Georgia, serif; /* una sola tipo en toda la web */
  color: #fff;
  background: #111;
  overflow: hidden;
}

/* --- MÓVIL: polaroid a pantalla completa --- */
.stage {
  position: relative; z-index: 1;
  height: 100svh;
  display: flex; flex-direction: column;
  background: #f7f4ee;                 /* marco polaroid (blanco hueso) */
  padding: 14px 14px 0;                /* franjas: lados y arriba */
}
.card-photo {
  position: relative; flex: 1;         /* la foto ocupa casi toda la pantalla */
  overflow: hidden; background: #222;
}
.bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity .3s linear;
  filter: grayscale(1); /* B/N por defecto */
}
.bg-img.color { filter: none; } /* excepciones: fotos con "color" en el nombre */
.bg-img.show { opacity: 1; }
/* Banda blanca inferior: texto en negro (tachado) */
.polaroid-caption {
  flex: 0 0 auto; margin: 0;
  padding: 18px 14px 22px; text-align: center;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 1.05rem; letter-spacing: .02em; color: #111;
}
.polaroid-caption s { opacity: .5; }

/* --- CTA: botón redondo "+" sobre la foto, abajo centrado --- */
.cta {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%;
  font-size: 0; /* ocultamos el "+" del HTML; lo dibujamos con pseudo-elementos */
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  animation: cta-pulse 2.6s ease-in-out infinite;
  transition: transform .15s ease, background .2s ease;
}
.cta::before, .cta::after { /* el "+" centrado, dos trazos */
  content: ""; position: absolute; top: 50%; left: 50%;
  background: #fff; border-radius: 1px;
}
.cta::before { width: 18px; height: 1.6px; transform: translate(-50%, -50%); }
.cta::after  { width: 1.6px; height: 18px; transform: translate(-50%, -50%); }
.cta:hover { background: rgba(255,255,255,.28); transform: translateX(-50%) scale(1.08); }
.cta:active { transform: translateX(-50%) scale(.95); }
@keyframes cta-pulse { /* anillo sutil que invita a pulsar */
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,.3), 0 0 0 0 rgba(255,255,255,.4); }
  50%      { box-shadow: 0 4px 20px rgba(0,0,0,.3), 0 0 0 13px rgba(255,255,255,0); }
}
@media (prefers-reduced-motion: reduce) { .cta { animation: none; } }

/* --- DESKTOP/TABLET: oculto por defecto (mobile-first); el footer global solo en desktop --- */
.collage, .scrim, .reshuffle, .hero, .site-footer { display: none; }

@media (min-width: 768px) {
  .stage { display: none; }                 /* en escritorio mandan el collage + la marca */
  .collage, .scrim, .reshuffle, .site-footer { display: block; }
  .hero { display: flex; }
}

/* --- Collage de fondo (desktop) --- */
.collage { position: fixed; inset: 0; z-index: 0; }
.collage img {
  position: absolute; object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  box-shadow: 0 12px 34px rgba(0,0,0,.55);
  border: 5px solid #f7f4ee; border-bottom-width: 16px;  /* marco polaroid */
  will-change: transform;
}
.collage img.color { filter: none; }
.scrim {
  position: fixed; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.28) 0%, rgba(0,0,0,.62) 100%);
}

/* --- Hero desktop: marca centrada sobre el collage --- */
.hero {
  position: relative; z-index: 2;
  height: 100svh; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.4rem; text-align: center;
}
/* halo oscuro difuminado detrás del texto -> legibilidad sin caja dura */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 55% 42% at 50% 48%, rgba(0,0,0,.62) 0%, rgba(0,0,0,0) 72%);
}
.brand {
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; margin: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,.7);
}
.tagline {
  font-size: 1.25rem; max-width: 32ch; margin: 0; color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,.6);
}
.cta-pill {
  margin-top: .4rem; cursor: pointer;
  font-family: "Times New Roman", Times, Georgia, serif; font-size: 1.05rem;
  color: #fff; font-weight: 700; border-radius: 999px; padding: .85rem 2.4rem;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  animation: cta-pulse 2.6s ease-in-out infinite;
  transition: transform .15s ease, background .2s ease;
}
.cta-pill:hover { background: rgba(255,255,255,.28); transform: scale(1.05); }
.cta-pill:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .cta-pill { animation: none; } }

/* --- Reordenar (desktop, arriba izquierda): posición; el estilo pill es común con .meet --- */
.reshuffle { left: 1.4rem; }

/* --- Pills: "Conoce a Carla", "Reordenar", "Atrás" (mismo formato) --- */
.meet, .reshuffle, .video-back {
  position: fixed; top: 1.4rem; z-index: 4; cursor: pointer;
  font-family: inherit; font-size: .82rem; letter-spacing: .02em; color: #fff;
  padding: .55rem 1.1rem; border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.65);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0,0,0,.3);
  transition: background .2s ease, transform .15s ease;
}
.meet { right: 1.4rem; }
.meet:hover, .reshuffle:hover, .video-back:hover { background: rgba(255,255,255,.28); }
.meet:active, .reshuffle:active, .video-back:active { transform: scale(.95); }

/* --- Vídeo: panel lateral derecho deslizante --- */
.video-backdrop {
  position: fixed; inset: 0; z-index: 8;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.video-backdrop[hidden] { display: none; }
.video-panel {
  position: fixed; top: 0; right: 0; z-index: 9; height: 100svh;
  width: 100vw;                                /* móvil: cubre todo el ancho */
  background: #f7f4ee;                         /* marco blanco hueso */
  padding: 6px;                                /* marco fino alrededor del vídeo */
  border-top-left-radius: 18px; border-bottom-left-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  transform: translateX(100%);                 /* fuera de pantalla por defecto */
  transition: transform .42s cubic-bezier(.4,0,.2,1);
  box-shadow: -22px 0 70px rgba(0,0,0,.55);
}
.video-panel.open { transform: translateX(0); } /* entra/sale deslizando lateralmente */
.video-el { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; } /* cover: sin franjas negras */
.video-panel .video-back { position: absolute; top: 1.2rem; left: 1.2rem; z-index: 2; }
@media (min-width: 768px) {
  .video-panel { width: min(440px, 60vw); }   /* desktop: panel lateral */
  .video-back { display: none; }              /* en desktop se cierra clicando fuera */
}

/* --- Footer (desktop) --- */
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  text-align: center; padding: 1.1rem 1rem 1.4rem;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 1.4rem; letter-spacing: .01em;
  color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.85);
  pointer-events: none;
}
.site-footer s { opacity: .55; }

/* --- Popover del formulario --- */
.pop {
  border: 1px solid rgba(255,255,255,.12); border-radius: 18px;
  padding: clamp(1.75rem, 6vw, 2.5rem);
  width: min(92vw, 400px);
  font-family: "Times New Roman", Times, Georgia, serif; /* lo hereda el form, como en el email */
  background: rgba(17,15,13,.95);              /* casi sólido: el texto se lee limpio */
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.6);
  /* animación "pop" con rebote al abrir */
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .2s ease, overlay .28s allow-discrete, display .28s allow-discrete;
  transform: scale(.85); opacity: 0;
}
.pop:popover-open { transform: scale(1); opacity: 1; }
@starting-style { .pop:popover-open { transform: scale(.85); opacity: 0; } }
.pop::backdrop { background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.pop-close {
  position: absolute; top: .5rem; right: .65rem;
  width: 2rem; height: 2rem; line-height: 1;
  font-size: 1.4rem; color: #fff;
  background: transparent; border: none; cursor: pointer; opacity: .7;
}
.pop-close:hover { opacity: 1; }
.pop h1 { margin: 0 0 .6rem; font-size: 1.7rem; line-height: 1.15; }
.pop .lede { margin: 0 0 1.4rem; font-size: 1rem; line-height: 1.5; color: #ece7e1; }
.pop a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

form { display: grid; gap: .7rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* honeypot */
input, button[type=submit] {
  font: inherit; padding: .8rem 1rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.25);
}
input { background: rgba(255,255,255,.1); color: #fff; }
input::placeholder { color: rgba(255,255,255,.55); }
input:focus { outline: 2px solid #fff; border-color: #fff; }
button[type=submit] {
  cursor: pointer; border: none; background: #fff; color: #111; font-weight: 700;
  transition: opacity .15s;
}
button[type=submit]:hover { opacity: .9; }
button[type=submit]:disabled { opacity: .55; cursor: progress; }
.msg { margin: .25rem 0 0; min-height: 1.3em; font-size: .88rem; }
.msg.ok { color: #7ee08a; }
.msg.err { color: #ff9b9b; }

/* --- Vista de agradecimiento tras suscribirse (sustituye al form, mismo popover) --- */
.thanks { display: grid; justify-items: center; text-align: center; gap: .9rem; padding: .5rem 0 .25rem; }
.thanks[hidden] { display: none; }
.thanks h1, .thanks .lede { margin: 0; }
.thanks .check {
  width: 56px; height: 56px; line-height: 56px; border-radius: 50%;
  background: rgba(126,224,138,.15); border: 2px solid #7ee08a; color: #7ee08a;
  font-size: 1.7rem; font-weight: 700;
  animation: check-pop .4s cubic-bezier(.34,1.56,.64,1);
}
/* "Ya estabas suscrito": mismo círculo, tono neutro y una "i" serif en vez del check verde */
.thanks .check.info {
  background: rgba(236,231,225,.12); border-color: #ece7e1; color: #ece7e1;
  font-style: italic; font-family: "Times New Roman", Times, Georgia, serif;
}
@keyframes check-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fine { margin: 1.1rem 0 0; font-size: .76rem; color: rgba(255,255,255,.6); }
