/* ============================================
   CALE & NICO — Invitación Digital
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Great+Vibes&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #f0ebe0;
  --cream-dark: #e8e1d4;
  --olive: #7a8c4a;
  --olive-dark: #6b7b40;
  --olive-light: #8fa05a;
  --gold: #c9b79a;
  --gold-dark: #b8a589;
  --dark: #1c1c1c;
  --mid: #5a5a5a;
  --white: #ffffff;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", cursive;
  --card-width: 520px;
}

html {
  scroll-behavior: smooth;
}

/* ============================================
   BODY — fondo continuo desktop
   ============================================ */
body {
  font-family: var(--font-serif);
  color: var(--dark);
  overflow-x: hidden;
  background: #e4ddd1;
}

/* ============================================
   CARD WRAPPER
   ============================================ */
.invitation-card {
  background: var(--cream);
  max-width: var(--card-width);
  margin: 0 auto;
  min-height: 100vh;
  box-shadow:
    0 0 80px rgba(0, 0, 0, 0.22),
    0 0 200px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

/* ============================================
   ANIMACIONES DE REVEAL — snappy / arrastrado
   easing: aceleración fuerte + frenado con ligero rebote
   ============================================ */
:root {
  --snap: cubic-bezier(0.16, 1, 0.3, 1); /* rápido al entrar, frena suave */
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.32s var(--snap),
    transform 0.32s var(--snap);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity 0.32s var(--snap),
    transform 0.32s var(--snap);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition:
    opacity 0.32s var(--snap),
    transform 0.32s var(--snap);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 0.3s var(--snap),
    transform 0.3s var(--snap);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Delays mínimos para cascada */
.delay-1 {
  transition-delay: 0.04s !important;
}
.delay-2 {
  transition-delay: 0.08s !important;
}
.delay-3 {
  transition-delay: 0.12s !important;
}
.delay-4 {
  transition-delay: 0.18s !important;
}

/* ============================================
   HERO / PORTADA
   ============================================ */
.hero {
  position: relative;
  overflow: hidden; /* contiene el parallax */
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--cream);
}

.hero-img {
  width: 100%;
  display: block;
  animation: slideUp 3.65s var(--snap) forwards;
  opacity: 0;
}

/* ── Countdown flip ── */
.countdown-number {
  display: inline-block;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.countdown-number.cd-flip {
  animation: cdFlip 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cdFlip {
  0% {
    transform: translateY(-18px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── Ripple en botones ── */
.btn-img-link {
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
  background: rgba(255, 255, 255, 0.35);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleAnim {
  from {
    transform: scale(0);
    opacity: 1;
  }
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Animación de entrada desde abajo — usada en hero y ubicación */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(80px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-btn-wrap {
  width: 100%;
  padding: 32px 40px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: heroFadeIn 1s 0.8s ease forwards;
  opacity: 0;
}

/* ============================================
   SECTION BASE
   ============================================ */
.section {
  padding: 64px 40px;
  position: relative;
}

.section--cream {
  background: var(--cream);
  background-image: url("../img/fondo 1-02.png");
  background-size: cover;
}

.section--white {
  background: #f8f5ef;
}

.section--olive {
  background: var(--olive);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   UBICACIÓN / EVENTO — sección 2
   ============================================ */
.section-ubicacion {
  margin-top: -2px;
  background-image: url("../img/fondo 1-02.png");
  background-size: cover;
  background-position: center;
  padding: 0;
  position: relative;
  /* misma animación que el hero, arranca después */
  animation: slideUp 2.65s var(--snap) 1.3s forwards;
  opacity: 0;
}

.ubicacion-img-wrap {
  position: relative;
  width: 100%;
}

.ubicacion-img {
  width: 82%;
  margin-left: 8%;
  margin-top: -6%;
}

/* Área transparente clickeable sobre el botón "Ver ubicación" en la imagen.
   El botón ocupa aprox. el 29–71% horizontal y el 87–95% vertical de la imagen. */
.ubicacion-btn-overlay {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 86%;
  bottom: 5%;
  border-radius: 60px;
  cursor: pointer;
  /* descomentá para depurar la posición: */
  /* background: rgba(255,0,0,.2); */
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 15px 48px;
  border-radius: 60px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  border: none;
  letter-spacing: 0.05em;
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

.btn-olive {
  background: var(--olive);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
.btn-olive:hover {
  background: var(--olive-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--dark);
}
.btn-outline:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ============================================
   COUNTDOWN — sección 3
   ============================================ */
.section-countdown {
  text-align: center;
  padding: 64px 28px;
  background-image: url("../img/fondo 1-03.png");
  background-size: cover;
}

.countdown-title {
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 32px;
  color: var(--dark);
  line-height: 1.4;
}

.countdown-title em {
  font-family: var(--font-script);
  font-size: 1.8rem;
  font-style: normal;
  line-height: 1;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.countdown-item {
  text-align: center;
  min-width: 72px;
}

.countdown-number {
  font-size: 4rem;
  font-weight: 300;
  line-height: 1;
  display: block;
}

.countdown-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 8px;
  display: block;
}

.countdown-dot {
  font-size: 2.8rem;
  font-weight: 300;
  padding: 0 6px;
  line-height: 1;
  align-self: flex-start;
  padding-top: 8px;
  color: var(--mid);
}

/* ============================================
   DRESS CODE — sección 4
   ============================================ */
.section-dresscode {
  padding: 0;
  background-image: url("../img/fondo 1-02.png");
  background-size: cover;
}

.dresscode-img {
  width: 100%;
  display: block;
}

/* ============================================
   CONFIRMAR + CANCIONES — sección 5
   ============================================ */
.section-confirmar-canciones {
  background-image: url("../img/fondo 1-03.png");
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 56px;
}

/* Wrapper relativo para superponer botón sobre imagen */
.confirmar-wrap {
  position: relative;
  width: 100%;
}

.confirmar-img {
  width: 100%;
  display: block;
}

/* Botón superpuesto sobre la parte baja de la imagen */
.confirmar-btn-overlay {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 52%;
  display: block;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.confirmar-btn-overlay:hover {
  opacity: 0.88;
  transform: translateX(-50%) translateY(-2px);
}

/* Sello lacre beige imagen */
.sello-img {
  width: 120px;
  display: block;
  margin-top: -60px; /* px fijos, funciona igual en mobile y desktop */
  position: relative;
  z-index: 2;
}

/* Imagen texto canciones */
.canciones-img {
  width: 90%;
  display: block;
  margin: 0 auto 16px;
}

/* Botón canciones */
.canciones-btn-wrap {
  padding: 0 48px;
  width: 100%;
}

/* Botones con imagen */
.btn-img-link {
  display: block;
  width: 100%;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.btn-img-link:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.btn-img {
  width: 50%;
  display: block;
  margin-left: 24%;
  margin-top: 0%;
}

.btn-img-con {
  width: 80%;
  display: block;
  margin: 8px auto 0;
  margin-left: 10%;
  margin-bottom: 9%;
}
/* ============================================
   FOTOS — sección 6
   ============================================ */
.section-fotos {
  padding: 40px 28px;
  background-image: url("../img/fondo 1-04.png");
  background-size: cover;
}

.fotos-img-wrap {
  position: relative;
  width: 100%;
}

.fotos-img {
  width: 58%;
  display: block;
  margin-left: 19%;
  margin-top: -13%;
}

/* Link sobre toda la imagen */
.fotos-link-overlay {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  cursor: pointer;
  margin-right: 8%;
}

/* ============================================
   FINAL — regalo + footer (versionfinal.jpg)
   ============================================ */
.section-final {
  padding: 0;
}

.final-img-wrap {
  position: relative;
  width: 100%;
}

.final-img {
  width: 100%;
  display: block;
  margin-top: -8%;
}

/* Áreas transparentes clickeables para copiar */
.final-copy-area {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* CBU: abarca el número sobre el card verde — aprox 33–90% horizontal, 26–41% vertical */
.final-copy-cbu {
  left: 14%;
  right: 14%;
  top: 27%;
  bottom: 59%;
}

/* ALIAS: abarca CALENICO — aprox 33–90% horizontal, 41–55% vertical */
.final-copy-alias {
  left: 14%;
  right: 14%;
  top: 41%;
  bottom: 44%;
}

/* ============================================
   MODALES
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--cream);
  border-radius: 24px 24px 0 0;
  padding: 32px 32px 52px;
  width: 100%;
  max-width: var(--card-width);
  max-height: 90svh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 44px;
  height: 4px;
  background: var(--gold);
  border-radius: 4px;
  margin: 0 auto 30px;
}

.modal-titulo {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 6px;
}

.modal-titulo em {
  font-family: var(--font-script);
  font-size: 2.6rem;
  font-style: normal;
  display: block;
  color: var(--olive);
}

.modal-subtitulo {
  font-size: 1rem;
  font-weight: 300;
  color: var(--mid);
  margin-bottom: 30px;
  line-height: 1.55;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--mid);
  line-height: 1;
  padding: 4px 8px;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  background: white;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--dark);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--olive);
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

/* Radio buttons */
.radio-group {
  display: flex;
  gap: 12px;
}

.radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.radio-option input {
  display: none;
}

.radio-option:has(input:checked) {
  border-color: var(--olive);
  background: var(--olive);
  color: white;
}

/* Guests counter */
.counter-group {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1.5px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  padding: 10px 18px;
}

.counter-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--olive);
  background: none;
  font-size: 1.3rem;
  color: var(--olive);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.counter-btn:hover {
  background: var(--olive);
  color: white;
}

.counter-val {
  font-size: 1.35rem;
  font-weight: 400;
  min-width: 28px;
  text-align: center;
  flex: 1;
}

/* Submit */
.btn-submit {
  width: 100%;
  padding: 17px;
  background: var(--olive);
  color: white;
  border: none;
  border-radius: 60px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

.btn-submit:hover {
  background: var(--olive-dark);
  transform: translateY(-1px);
}
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Alert */
.form-alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  margin-top: 16px;
  display: none;
  text-align: center;
}
.form-alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.form-alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--dark);
  color: white;
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 0.9rem;
  z-index: 2000;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s;
  opacity: 0;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================
   RESPONSIVE — Desktop
   ============================================ */
@media (min-width: 521px) {
  body {
    padding: 48px 0 80px;
    min-height: 100vh;
  }

  .invitation-card {
    
    border-radius: 20px;
    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.16),
      0 40px 80px rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(180, 160, 120, 0.12);
  }

  .evento-fecha {
    font-size: 3.4rem;
  }
  .countdown-number {
    font-size: 4.4rem;
  }
  .sello-img {
    width: 120px;
    margin-top: -32px;
  }
}
@media (max-width: 520px) {
  .sello-img {
    margin-top: -26px;
  }
  

  .reveal,
  .reveal-left,
  .reveal-right {
    transition:
      opacity 1.75s var(--snap),
      transform 1.75s var(--snap);
  }

  .reveal-scale {
    transition:
      opacity 1.75s var(--snap),
      transform 1.75s var(--snap);
  }

  /* También los delays un poco más espaciados */
  .delay-1 { transition-delay: 0.08s !important; }
  .delay-2 { transition-delay: 0.16s !important; }
  .delay-3 { transition-delay: 0.24s !important; }
  .delay-4 { transition-delay: 0.34s !important; }
}
}
