/* ============================================================
   INVITATION.CSS — La invitacion que sale de la carta
   ============================================================ */

/* ── MARCO DECORATIVO FIJO ──────────────────────────────────── */
#inv-frame {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100dvh;
  margin-bottom: -100dvh;
  pointer-events: none;
  z-index: 200;
}

.inv-frame-corner {
  position: absolute;
  width: 200px;
  height: 200px;
  object-fit: contain;
  background: transparent;
}

/* Cada esquina va exactamente a su rincon */
.inv-frame-tl { top: 0;    left: 0;  transform: none;            }
.inv-frame-tr { top: 0;    right: 0; transform: scaleX(-1);      }
.inv-frame-bl { bottom: 0; left: 0;  transform: scaleY(-1);      }
.inv-frame-br { bottom: 0; right: 0; transform: scale(-1);       }

/* ── OVERLAY DE LA INVITACION ────────────────────────────────── */
#invitation {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 430px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background: #0f0c1a;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
  scroll-behavior: smooth;
}

/* Estado visible */
#invitation.open {
  transform: translateX(-50%) translateY(0);
}

/* ── HERO DE LA INVITACION ───────────────────────────────── */
.inv-hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;      /* todo al fondo */
  padding: 0 20px 32px;
  position: relative;
  text-align: center;
}

/* ── CARD DE VIDRIO (glassmorphism) ─────────────────────── */
.inv-hero-glass {
  width: 100%;
  padding: 28px 24px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* Estado inicial: oculto a la izquierda */
  opacity: 0;
  transform: translateX(-70px);
  transition:
    opacity  0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* JS agrega esta clase cuando la invitacion termina de abrir */
.inv-hero-glass.slide-in {
  opacity: 1;
  transform: translateX(0);
}

/* Patron decorativo de fondo */
.inv-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 40% at 50% 30%,
      rgba(201,169,110,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.inv-hero-label {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #c9a96e;
  margin-bottom: 4px;
}

.inv-hero-name {
  font-family: 'Georgia', serif;
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-style: italic;
  color: #f5f0e8;
  line-height: 1.15;
  margin-bottom: 4px;
}

.inv-gold-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px auto;
}

.inv-gold-divider span {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c9a96e);
}

.inv-gold-divider span:last-child {
  background: linear-gradient(90deg, #c9a96e, transparent);
}

.inv-gold-divider i {
  font-style: normal;
  color: #c9a96e;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
}

.inv-hero-date {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.65);
}

.inv-hero-place {
  font-size: 0.75rem;
  color: #c9a96e;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: invFadeUp 0.7s ease 1.1s forwards;
}

.inv-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0;
  animation: invFadeUp 0.7s ease 1.5s forwards;
}

.inv-scroll-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #c9a96e;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.inv-scroll-dot:nth-child(2) { animation-delay: 0.15s; opacity: 0.6; }
.inv-scroll-dot:nth-child(3) { animation-delay: 0.30s; opacity: 0.3; }

/* ── SECCION GENERICA ──────────────────────────────────────────────── */
.inv-section {
  padding: 72px 24px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.inv-carousel-section {
  position: relative;
  isolation: isolate;
  /* sin overflow:hidden — el carrusel 3D necesita desbordarse */
}

.inv-section--dark {
  background: rgba(255,255,255,0.025);
}

/* Cuando una seccion tiene imagen de fondo, quitamos el tinte plano */
.inv-section--dark:has(.inv-section-bg-layer) {
  background: transparent;
}

/* Capa de fondo de seccion (inyectada por JS) */
.inv-section-bg-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  /* La imagen viene por inline style; el overlay es una segunda capa */
  background-blend-mode: normal;
}

.inv-section-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* El color y la opacidad se definen por inline style desde JS */
}

.inv-section-label {
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #c9a96e;
  display: block;
  margin-bottom: 10px;
  text-align: center;
}

.inv-section-title {
  font-family: 'Georgia', serif;
  font-size: 1.6rem;
  font-style: italic;
  color: #f5f0e8;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.3;
}

/* ── MENSAJE PERSONAL ──────────────────────────────────────── */
.inv-message-text {
  font-size: 0.9rem;
  color: rgba(245,240,232,0.7);
  line-height: 1.9;
  text-align: center;
  font-style: italic;
  max-width: 320px;
  margin: 0 auto;
}

/* ── DETALLES DEL EVENTO ───────────────────────────────────── */
.inv-detail-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.inv-detail-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.inv-detail-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c9a96e;
  margin-bottom: 4px;
}

.inv-detail-value {
  font-size: 0.9rem;
  color: #f5f0e8;
  line-height: 1.5;
}

/* ── COUNTDOWN ─────────────────────────────────────────────── */
.inv-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.inv-cd-item {
  text-align: center;
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 12px;
  padding: 16px 8px;
}

.inv-cd-num {
  font-family: 'Georgia', serif;
  font-size: 1.8rem;
  color: #c9a96e;
  line-height: 1;
  display: block;
}

.inv-cd-label {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.45);
  margin-top: 4px;
  display: block;
}

/* ── BOTON ─────────────────────────────────────────────────── */
.inv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b6914, #c9a96e, #e8d5a3);
  color: #1a1000;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  margin-top: 24px;
  box-shadow: 0 4px 20px rgba(201,169,110,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.inv-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(201,169,110,0.2);
}

/* ── CONTACTOS ─────────────────────────────────────────────── */
.inv-contacts-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.inv-contact-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 18px;
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.inv-contact-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(201,169,110,0.25), rgba(201,169,110,0.08));
  border: 1.5px solid rgba(201,169,110,0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
}

/* Foto real — llena el circulo */
.inv-contact-photo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Fallback: inicial con color dorado */
.inv-contact-initial {
  font-family: 'Georgia', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: #c9a96e;
  line-height: 1;
}

.inv-contact-info {
  flex: 1;
  min-width: 0;
}

.inv-contact-role {
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #c9a96e;
  margin-bottom: 3px;
}

.inv-contact-name {
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  color: #f5f0e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b6914, #c9a96e);
  color: #1a1000;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 12px rgba(201,169,110,0.3);
  -webkit-tap-highlight-color: transparent;
}

.inv-contact-btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 6px rgba(201,169,110,0.15);
}

/* ── RSVP (texto strong) ──────────────────────────────────── */
#inv-rsvp-section strong {
  color: #c9a96e;
  font-style: normal;
  font-weight: 600;
}

.inv-rsvp-pending {
  font-size: 0.82rem;
  color: rgba(245,240,232,0.5);
  line-height: 1.8;
  text-align: center;
  font-style: italic;
  max-width: 300px;
  margin: 24px auto 0;
  padding: 16px 20px;
  border: 1px dashed rgba(201,169,110,0.25);
  border-radius: 14px;
}

/* ── FOOTER ────────────────────────────────────────────────── */
.inv-footer {
  padding: 48px 24px 64px;
  text-align: center;
  border-top: 1px solid rgba(201,169,110,0.15);
}

.inv-footer-name {
  font-family: 'Georgia', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: #c9a96e;
  margin-bottom: 8px;
}

.inv-footer-hashtag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(201,169,110,0.5);
  text-transform: uppercase;
}

.inv-hero-fullname {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(245,240,232,0.6);
  margin-bottom: 20px;
  opacity: 0;
  animation: invFadeUp 0.7s ease 0.7s forwards;
  text-align: center;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ── FONDO HERO ───────────────────────────────────────── */
.inv-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
  background-color: #0f0c1a;
}

.inv-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(10,8,20,0.25) 0%,
    rgba(10,8,20,0.5)  60%,
    rgba(10,8,20,0.92) 100%
  );
}

/* ── VENUE CARDS (templo + salon) ──────────────────────── */
.inv-venue-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 8px;
}

.inv-venue-img-wrap {
  width: 100%;
  height: 443px;
  overflow: hidden;
  background: rgba(201,169,110,0.06);
  border-bottom: 1px solid rgba(201,169,110,0.1);
}

.inv-venue-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}

.inv-venue-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inv-venue-address {
  font-size: 0.78rem;
  color: rgba(245,240,232,0.45);
  line-height: 1.5;
  margin-top: 2px;
}

.inv-venue-time-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 6px;
}

.inv-venue-time-badge {
  background: linear-gradient(135deg, #8b6914, #c9a96e);
  color: #1a1000;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: 999px;
}

.inv-venue-note {
  font-size: 0.78rem;
  color: rgba(245,240,232,0.5);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Boton pequeño para mapa */
.inv-btn--sm {
  min-height: 44px;
  font-size: 0.65rem;
  padding: 10px 24px;
  align-self: flex-start;
}

/* ── TIMELINE / ITINERARIO ────────────────────────────── */
.inv-timeline {
  position: relative;
  padding-left: 20px;
  margin-top: 24px;
}

.inv-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent, #c9a96e 15%, #c9a96e 85%, transparent);
}

.inv-tl-item {
  position: relative;
  padding-bottom: 28px;
  padding-left: 20px;
}

.inv-tl-dot {
  position: absolute;
  left: -14px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0f0c1a;
  border: 2px solid #c9a96e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  color: #c9a96e;
}

.inv-tl-time {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: #c9a96e;
  font-weight: 700;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.inv-tl-title {
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  color: #f5f0e8;
  margin-bottom: 3px;
}

.inv-tl-desc {
  font-size: 0.75rem;
  color: rgba(245,240,232,0.45);
  line-height: 1.5;
}

/* ── MESA DE REGALOS ───────────────────────────────────── */
.inv-registry-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(201,169,110,0.2);
  background: rgba(255,255,255,0.03);
}

.inv-registry-logo-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}

.inv-registry-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}

.inv-registry-body {
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.inv-registry-msg {
  font-size: 0.82rem;
  color: rgba(245,240,232,0.6);
  line-height: 1.8;
  text-align: center;
  font-style: italic;
}

/* ── ANIMACIONES DE SCROLL ───────────────────────────────── */
[data-animate] {
  opacity: 0;
  will-change: opacity, transform;
}

[data-animate="fade-up"]    { transform: translateY(28px); }
[data-animate="fade-left"]  { transform: translateX(28px); }
[data-animate="fade-right"] { transform: translateX(-28px); }
[data-animate="scale-in"]   { transform: scale(0.88); }

[data-animate].visible {
  opacity: 1;
  transform: none;
  transition:
    opacity  0.65s cubic-bezier(0.22,1,0.36,1),
    transform 0.65s cubic-bezier(0.22,1,0.36,1);
}

[data-delay="100"].visible { transition-delay: 100ms; }
[data-delay="200"].visible { transition-delay: 200ms; }
[data-delay="300"].visible { transition-delay: 300ms; }
[data-delay="400"].visible { transition-delay: 400ms; }
@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-70px); }
  to   { opacity: 1; transform: translateX(0);     }
}

@keyframes invFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes dotBounce {
  0%, 100% { transform: translateY(0);  opacity: 1;   }
  50%       { transform: translateY(5px); opacity: 0.3; }
}
