/* =========================================================
   MIS QUINCE AÑOS - VALERIA MARTINEZ
   INVITACIÓN DE UNA SOLA PÁGINA (FORMATO 3:4)
   ========================================================= */

:root {
  --navy-deep: #050a14;
  --navy-base: #070e1c;
  --navy-card: rgba(10, 20, 38, 0.88);
  --navy-card-border: rgba(212, 175, 55, 0.35);

  --gold-primary: #d4af37;
  --gold-light: #f5e2a2;
  --gold-bright: #fff3c9;
  --gold-dark: #8c6716;
  --gold-text: #785315;
  --gold-foil: linear-gradient(135deg, #fff3c9 0%, #e5c158 35%, #d4af37 60%, #997217 100%);
  --gold-glow: 0 0 16px rgba(212, 175, 55, 0.45);

  --parchment-ink: #101c30;
  --parchment-sub: #344865;

  --font-script: 'Alex Brush', cursive;
  --font-display: 'Cinzel', serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background-color: var(--navy-deep);
  background-image: 
    radial-gradient(circle at 50% 20%, #13274c 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, #0b1830 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, #0b1830 0%, transparent 50%),
    linear-gradient(180deg, #050a14 0%, #070e1c 100%);
  color: var(--parchment-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

/* LIENZO DE PARTÍCULAS DORADAS */
.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* ESCENARIO DE PRESENTACIÓN */
.card-stage {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

/* =========================================================
   TARJETA REAL 3:4 CON CONTAINER QUERIES
   ========================================================= */
.invitation-card-3-4 {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 3 / 4;
  width: min(92vw, calc(95vh * 0.75));
  max-width: 640px;
  height: auto;
  margin: auto;
  border-radius: 14px;
  box-shadow: 
    0 25px 60px -10px rgba(0, 0, 0, 0.9),
    0 0 35px rgba(212, 175, 55, 0.25),
    inset 0 0 0 1px rgba(212, 175, 55, 0.4);
  overflow: hidden;
  background: #060d1a;
  animation: cardFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.card-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

/* BOTÓN DE MÚSICA FLOTANTE */
.music-toggle-btn {
  position: absolute;
  top: 3.2cqw;
  right: 3.2cqw;
  z-index: 20;
  background: rgba(10, 20, 38, 0.85);
  border: 1.5px solid var(--gold-primary);
  border-radius: 30px;
  padding: 1cqw 2cqw;
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), var(--gold-glow);
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, background 0.3s ease;
}

.music-toggle-btn:hover {
  transform: scale(1.06);
  background: rgba(14, 28, 54, 0.95);
}

.music-icon-wrap {
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-icon-wrap svg {
  width: 3.5cqw;
  height: 3.5cqw;
  animation: spinDisc 6s linear infinite;
  animation-play-state: paused;
}

.music-toggle-btn.playing .music-icon-wrap svg {
  animation-play-state: running;
}

@keyframes spinDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sound-wave {
  display: flex;
  align-items: flex-end;
  gap: 0.5cqw;
  height: 2.5cqw;
}

.sound-wave span {
  width: 0.5cqw;
  background: var(--gold-primary);
  border-radius: 1px;
  height: 0.8cqw;
  transition: height 0.2s;
}

.music-toggle-btn.playing .sound-wave span:nth-child(1) { animation: wave 0.8s infinite ease-in-out; }
.music-toggle-btn.playing .sound-wave span:nth-child(2) { animation: wave 0.6s 0.2s infinite ease-in-out; }
.music-toggle-btn.playing .sound-wave span:nth-child(3) { animation: wave 0.9s 0.4s infinite ease-in-out; }

@keyframes wave {
  0%, 100% { height: 0.6cqw; }
  50% { height: 2.5cqw; background: var(--gold-bright); }
}

/* =========================================================
   ÁREA DE CONTENIDO DENTRO DEL ARCO DORADO
   ========================================================= */
.arch-content-area {
  position: absolute;
  top: 24.5%;
  left: 43.5%;
  width: 28%;
  height: 52.8%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  color: var(--parchment-ink);
  padding: 0.2cqw;
}

/* 1. Pretitle */
.card-pretitle {
  font-family: var(--font-display);
  font-size: 1.25cqw;
  letter-spacing: 0.1cqw;
  line-height: 1.28;
  color: #1e3352;
  font-weight: 700;
  text-transform: uppercase;
}

/* 2. Name: Valeria Martinez */
.card-celebrant-name {
  font-family: var(--font-script);
  font-size: 5.2cqw;
  line-height: 0.95;
  color: #0c1c34;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9), 0 0 10px rgba(212, 175, 55, 0.4);
  font-weight: 400;
  margin: -0.2cqw 0 0.1cqw;
}

/* 3. Event Badge: Quinceañera */
.card-event-badge {
  font-family: var(--font-display);
  font-size: 1.95cqw;
  letter-spacing: 0.38cqw;
  font-weight: 800;
  color: #091526;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

/* Ornaments */
.card-ornament {
  color: var(--gold-primary);
  font-size: 1.4cqw;
  line-height: 1;
}

.sparkle-diamond {
  display: inline-block;
  animation: shimmerStar 2.5s infinite ease-in-out;
}

@keyframes shimmerStar {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; color: #ffd700; }
}

.card-sub-ornament {
  color: var(--gold-primary);
  line-height: 0;
  opacity: 0.9;
}

.card-sub-ornament svg {
  width: 6.5cqw;
  height: 0.75cqw;
}

/* 4. Date & Time */
.card-date {
  font-family: var(--font-display);
  font-size: 1.65cqw;
  letter-spacing: 0.1cqw;
  font-weight: 800;
  color: #06101e;
}

.card-time {
  font-family: var(--font-display);
  font-size: 1.8cqw;
  letter-spacing: 0.08cqw;
  font-weight: 800;
  color: #8c6414;
}

/* 5. Venue */
.card-venue-name {
  font-family: var(--font-display);
  font-size: 1.55cqw;
  letter-spacing: 0.1cqw;
  font-weight: 800;
  color: #091629;
}

.card-venue-address {
  font-family: var(--font-sans);
  font-size: 1.18cqw;
  letter-spacing: 0.04cqw;
  line-height: 1.3;
  color: #1e3350;
  font-weight: 600;
}

/* 6. Contador Regresivo Vivo */
.card-countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6cqw;
  background: rgba(13, 27, 50, 0.09);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 20px;
  padding: 0.35cqw 1.1cqw;
  font-family: var(--font-sans);
  font-size: 1.2cqw;
  font-weight: 700;
  color: #081528;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cd-icon {
  font-size: 1.3cqw;
}

/* 7. Botones de Acción Rápida (4 Pills) */
.card-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5cqw;
  width: 98%;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5cqw;
  padding: 0.55cqw 0.7cqw;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 1.15cqw;
  font-weight: 700;
  letter-spacing: 0.03cqw;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.card-btn svg {
  width: 1.45cqw;
  height: 1.45cqw;
}

/* Estilos de botones */
.btn-map {
  background: #112445;
  color: #fff;
  border-color: rgba(212, 175, 55, 0.6);
}
.btn-map:hover {
  background: #183360;
  transform: translateY(-1px);
}

.btn-calendar {
  background: #fdfaf4;
  color: #0b1a30;
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.btn-calendar:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn-rsvp {
  background: var(--gold-foil);
  color: #070e1c;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}
.btn-rsvp:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.btn-gifts {
  background: #0b1830;
  color: var(--gold-light);
  border-color: var(--gold-primary);
}
.btn-gifts:hover {
  background: #122445;
  color: #fff;
  transform: translateY(-1px);
}

/* 8. RSVP Contacto Inferior */
.card-rsvp-text {
  font-family: var(--font-sans);
  font-size: 1.15cqw;
  color: #0b1a30;
  letter-spacing: 0.04cqw;
}

.card-rsvp-text strong {
  color: #8c6716;
}

/* =========================================================
   MODALES (RSVP Y LLUVIA DE SOBRES)
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 14, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: #09152b;
  border: 1.5px solid var(--gold-primary);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 20px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), var(--gold-glow);
  color: #fcf9f2;
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-window {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: var(--gold-primary);
  color: #070e1c;
}

.modal-header {
  text-align: center;
  margin-bottom: 18px;
}

.modal-crest-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.4));
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold-bright);
  letter-spacing: 1px;
}

.modal-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gold-light);
}

/* FORMULARIO RSVP */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--gold-light);
  text-transform: uppercase;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  background: rgba(5, 11, 22, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

.field-error {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: #ff6b6b;
  display: none;
}

.field-error.visible {
  display: block;
}

.radio-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 26, 50, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: #f0ede6;
}

.radio-item input {
  display: none;
}

.radio-box {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-item input:checked + .radio-box {
  background: var(--gold-primary);
  box-shadow: inset 0 0 0 2.5px #09152b;
}

.form-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.btn-confirm-direct {
  background: var(--gold-foil);
  color: #070e1c;
  border: none;
  padding: 12px;
  border-radius: 25px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.btn-confirm-direct:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.55);
}

.btn-confirm-wa {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 25px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn-confirm-wa:hover {
  background: #20ba5a;
  transform: translateY(-2px);
}

.modal-success {
  text-align: center;
  padding: 20px 10px;
}

.success-seal-img {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-bright);
  margin-bottom: 8px;
}

.success-text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.6;
  color: #e5dfd3;
}

/* MODAL LLUVIA DE SOBRES */
.gifts-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.gifts-note {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  color: #ddd4c2;
  text-align: center;
}

.bank-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bank-item-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
}

.bank-item-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #fff;
}

.copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 11, 22, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
}

.bank-number.mono {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-bright);
}

.btn-copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-chip:hover {
  background: var(--gold-primary);
  color: #070e1c;
}

/* TOAST */
.toast-bubble {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(8, 17, 34, 0.96);
  border: 1.5px solid var(--gold-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), var(--gold-glow);
  backdrop-filter: blur(10px);
  color: var(--gold-bright);
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 999999;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-bubble.active {
  transform: translateX(-50%) translateY(0);
}

.toast-chk {
  background: var(--gold-primary);
  color: #070e1c;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* ACCESIBILIDAD PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ambient-canvas {
    display: none !important;
  }
}
