/* ═══════════════════════════════════════════════
   GNZ Invitaciones — Plan Premium (extras)
   ═══════════════════════════════════════════════ */

/* ── Botón de música flotante ── */
.music-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(13,10,18,.85);
  border: 1px solid rgba(201,164,92,.35);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .3s, transform .3s;
}
.music-btn:hover {
  border-color: rgba(201,164,92,.7);
  transform: scale(1.08);
}
.music-icon {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}
.music-icon span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--gold, #c9a45c);
  transform-origin: bottom;
}
.music-icon span:nth-child(1) { height: 8px;  animation: eq1 .8s ease-in-out infinite alternate; }
.music-icon span:nth-child(2) { height: 14px; animation: eq1 .7s ease-in-out infinite alternate .1s; }
.music-icon span:nth-child(3) { height: 18px; animation: eq1 .9s ease-in-out infinite alternate .2s; }
.music-icon span:nth-child(4) { height: 12px; animation: eq1 .75s ease-in-out infinite alternate .05s; }
.music-icon span:nth-child(5) { height: 7px;  animation: eq1 .85s ease-in-out infinite alternate .15s; }
.music-icon.paused span { animation-play-state: paused; opacity: .4; }
@keyframes eq1 { to { height: 4px; } }

/* ════ TIMELINE — Historia ════ */
.timeline-section {
  background: var(--plum-900, #170f1f);
  padding: 100px 0 110px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.timeline-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(201,164,92,.07) 0%, transparent 65%);
  pointer-events: none;
}
.tl-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 860px;
  margin: 56px auto 0;
  padding: 0 28px;
  position: relative;
}
.tl-track::before {
  content: '';
  position: absolute;
  top: 27px;
  left: calc(50% / 3 + 28px);
  right: calc(50% / 3 + 28px);
  height: 1.5px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 50%, var(--gold-deep));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.6s cubic-bezier(.4,0,.2,1);
}
.timeline-section.tl-on .tl-track::before { transform: scaleX(1); }
.tl-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
}
.tl-dot {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d4aa55 0%, #a07830 70%);
  border: 2px solid rgba(255,255,255,.2);
  box-shadow: 0 4px 20px rgba(0,0,0,.5), 0 0 0 6px rgba(201,164,92,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.9);
  position: relative;
  z-index: 2;
  transform: scale(0);
  transition: transform .65s cubic-bezier(.34,1.56,.64,1);
  margin-bottom: 24px;
  flex-shrink: 0;
}
.tl-dot-final {
  background: radial-gradient(circle at 35% 35%, #e8cf9b 0%, #c9a45c 70%);
  box-shadow: 0 4px 20px rgba(0,0,0,.5), 0 0 0 10px rgba(201,164,92,.14), 0 0 24px rgba(201,164,92,.2);
}
.timeline-section.tl-on .tl-item:nth-child(1) .tl-dot { transform:scale(1); transition-delay:.25s; }
.timeline-section.tl-on .tl-item:nth-child(2) .tl-dot { transform:scale(1); transition-delay:.85s; }
.timeline-section.tl-on .tl-item:nth-child(3) .tl-dot { transform:scale(1); transition-delay:1.45s; }
.tl-body { opacity:0; transform:translateY(20px); transition:opacity .8s ease,transform .8s ease; }
.timeline-section.tl-on .tl-item:nth-child(1) .tl-body { opacity:1;transform:translateY(0);transition-delay:.55s; }
.timeline-section.tl-on .tl-item:nth-child(2) .tl-body { opacity:1;transform:translateY(0);transition-delay:1.1s; }
.timeline-section.tl-on .tl-item:nth-child(3) .tl-body { opacity:1;transform:translateY(0);transition-delay:1.7s; }
.tl-date {
  display: block;
  font-family: var(--font-b);
  font-size: .65rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.tl-title {
  font-family: var(--font-d);
  font-size: 1.4rem; font-weight: 600; font-style: italic;
  color: var(--text-light); margin-bottom: 10px; line-height: 1.2;
}
.tl-desc {
  font-size: .82rem; color: var(--text-dim);
  line-height: 1.65; max-width: 200px; margin: 0 auto;
}
@media (max-width: 620px) {
  .tl-track {
    flex-direction: column; align-items: flex-start;
    gap: 0; padding: 0 36px;
  }
  .tl-track::before {
    top: 28px; left: 55px; right: auto;
    width: 1.5px; height: calc(100% - 56px);
    background: linear-gradient(to bottom, var(--gold-deep), var(--gold) 50%, var(--gold-deep));
    transform: scaleY(0); transform-origin: top center;
  }
  .timeline-section.tl-on .tl-track::before { transform: scaleY(1); }
  .tl-item { flex-direction: row; align-items: flex-start; text-align: left; gap: 20px; padding: 0 0 36px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-dot { margin-bottom: 0; flex-shrink: 0; }
  .tl-desc { max-width: 100%; margin: 0; }
}

/* ════ GALERÍA — Protagonista ════ */
.gallery {
  background: var(--bg-deep, #0d0a12);
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Glow ambiental dorado */
.gallery::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 40% at 50% 22%, rgba(201,164,92,.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Línea dorada que barre la sección (efecto cine) */
.gallery::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -4px;
  width: 3px;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(201,164,92,.6) 30%,
    rgba(201,164,92,.8) 50%,
    rgba(201,164,92,.6) 70%, transparent 100%);
  animation-name: gallerySweep;
  animation-duration: 1.1s;
  animation-timing-function: cubic-bezier(.4,0,.2,1);
  animation-fill-mode: forwards;
  animation-play-state: paused;
  z-index: 1;
}
.gallery.gallery-on::after { animation-play-state: running; }
@keyframes gallerySweep {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(calc(1200px + 100px)); opacity: 0; }
}

/* Título de galería: más grande y cinematográfico */
.gallery .inv-container { position: relative; z-index: 2; }
.gallery .section-heading {
  font-size: clamp(3.2rem, 9vw, 6rem) !important;
  letter-spacing: -.02em;
  margin-bottom: 52px;
}
.gallery .section-label { letter-spacing: .48em; }

/* Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 8px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* Fotos: inician tapadas con clip-path */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  clip-path: inset(0 100% 0 0);          /* tapa desde la derecha */
  transition: clip-path 1.1s cubic-bezier(.77,0,.175,1),
              box-shadow .45s ease,
              transform .45s cubic-bezier(.22,.7,.2,1);
}
.gallery-item.tall {
  clip-path: inset(100% 0 0 0);           /* tapa desde abajo */
}

/* Revelar al activar la sección */
.gallery.gallery-on .gallery-item { clip-path: inset(0 0% 0 0); }

/* Stagger escalonado — cada foto tiene su momento */
.gallery.gallery-on .gallery-item:nth-child(1) { transition-delay: .28s; }
.gallery.gallery-on .gallery-item:nth-child(2) { transition-delay: .08s; }
.gallery.gallery-on .gallery-item:nth-child(3) { transition-delay: .44s; }
.gallery.gallery-on .gallery-item:nth-child(4) { transition-delay: .18s; }
.gallery.gallery-on .gallery-item:nth-child(5) { transition-delay: .60s; }
.gallery.gallery-on .gallery-item:nth-child(6) { transition-delay: .36s; }
.gallery.gallery-on .gallery-item:nth-child(7) { transition-delay: .52s; }

/* Hover premium: borde dorado + leve zoom del contenedor */
.gallery-item:hover {
  box-shadow: 0 0 0 2px rgba(201,164,92,.5), 0 28px 56px rgba(0,0,0,.6);
  transform: scale(1.025);
  z-index: 4;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .6s cubic-bezier(.22,.7,.2,1);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,10,18,.15);
  transition: background .35s;
}
.gallery-item:hover .gallery-overlay {
  background: linear-gradient(135deg, rgba(201,164,92,.1) 0%, rgba(13,10,18,.3) 100%);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}
.lightbox-close:hover { color: #fff; }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.16); }

/* ── Mesa de regalos ── */
.gifts {
  background: var(--paper, #f5f1e8);
  padding: 84px 0;
  text-align: center;
}
.gifts-sub {
  font-size: .92rem;
  color: var(--text-mid, #6c6173);
  max-width: 440px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.gifts-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.gift-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--cream, #faf8f4);
  border: 1px solid rgba(201,164,92,.2);
  border-radius: 18px;
  padding: 28px 24px;
  min-width: 150px;
  text-decoration: none;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.gift-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(201,164,92,.12);
  border-color: rgba(201,164,92,.4);
}
.gift-logo {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(201,164,92,.1);
  border: 1px solid rgba(201,164,92,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-deep, #a7822f);
}
.gift-card-wa .gift-logo { background: rgba(37,211,102,.1); border-color: rgba(37,211,102,.2); color: #25D366; }

/* Tarjeta bancaria */
.gift-card-bank {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  max-width: 400px;
  gap: 16px;
  cursor: default;
}
.gift-card-bank:hover { transform: none; box-shadow: none; }
.bank-header {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.gift-logo-bank { background: rgba(201,164,92,.1); border-color: rgba(201,164,92,.2); color: var(--gold-deep); }
.bank-rows {
  width: 100%;
  border: 1px solid rgba(201,164,92,.18);
  border-radius: 12px;
  overflow: hidden;
}
.bank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(201,164,92,.1);
}
.bank-row:last-child { border-bottom: none; }
.bank-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mid);
  white-space: nowrap;
  flex-shrink: 0;
}
.bank-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  font-family: var(--font-b);
  font-size: .85rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 8px;
  transition: background .2s, color .2s;
  text-align: right;
}
.bank-copy:hover {
  background: rgba(201,164,92,.12);
  color: var(--gold-deep);
}
.bank-copy svg { opacity: .45; flex-shrink: 0; transition: opacity .2s; }
.bank-copy:hover svg { opacity: 1; }
.bank-copy.copied { color: #22c55e; }
.bank-copy.copied svg { opacity: 1; stroke: #22c55e; }

/* Toast */
.copy-toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--gold);
  color: #fff;
  padding: 10px 26px;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s, transform .28s;
  z-index: 600;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(201,164,92,.4);
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.gift-store {
  font-family: var(--font-d, 'Cormorant Garamond', serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark, #1d1426);
}
.gift-desc {
  font-size: .75rem;
  color: var(--text-mid, #6c6173);
}

/* ── RSVP avanzado ── */
.rsvp-advanced { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.rsvp-guests { text-align: center; }
.rsvp-guests-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim, #ab9fb6);
  margin-bottom: 14px;
}
.rsvp-counter {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 100px;
  overflow: hidden;
  width: fit-content;
  margin: 0 auto;
}
.rsvp-minus, .rsvp-plus {
  background: none;
  border: none;
  color: var(--gold, #c9a45c);
  font-size: 1.4rem;
  width: 48px; height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  line-height: 1;
}
.rsvp-minus:hover, .rsvp-plus:hover { background: rgba(201,164,92,.12); }
.rsvp-count {
  font-family: var(--font-d, 'Cormorant Garamond', serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  min-width: 48px;
  text-align: center;
  line-height: 1;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
    padding: 0 16px;
  }
  .gallery-item.tall { grid-row: span 1; }
  .gifts-grid { flex-direction: column; align-items: center; }
  .gift-card { width: 100%; max-width: 280px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
