/* ══════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — Western Cowgirl
   Paleta: crema vintage + rosa hot pink + burgundy + dorado craft
   Tipografía: Rye (western display) + Oswald (labels) + Source Sans 3 (body)
   ══════════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: only light;

  /* ── Paleta western ──────────────────────────────────────────────── */
  --cream:     #f5e6c8;          /* Crema vintage — fondo de tarjetas    */
  --cream-d:   #e8d5aa;          /* Crema oscuro — bordes, sombras       */
  --cream-dd:  #d4b87a;          /* Crema aún más oscuro                 */
  --pink:      #d4447a;          /* Rosa pink cowgirl — acento principal  */
  --pink-l:    #e8699a;          /* Rosa claro                            */
  --pink-g:    rgba(212,68,122,0.25);
  --burgundy:  #6b1a3a;          /* Burgundy oscuro — tipografía         */
  --gold:      #b5862a;          /* Dorado artesanal                     */
  --gold-l:    #d4a84b;
  --dark:      #2a0f1a;          /* Casi negro con tono vino             */
  --wa:        #25D366;

  /* ── Tipografías ──────────────────────────────────────────────────── */
  --font-d: 'Rye', 'Georgia', serif;            /* Display western      */
  --font-h: 'Abril Fatface', 'Georgia', serif;  /* Headlines            */
  --font-o: 'Oswald', sans-serif;               /* Labels / eyebrows    */
  --font-b: 'Source Sans 3', 'Segoe UI', sans-serif; /* Body            */

  /* ── Radios ───────────────────────────────────────────────────────── */
  --r:    6px;     /* Esquinas levemente redondeadas — estilo cartel    */
  --r-lg: 10px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--dark);
  color: var(--burgundy);
  font-family: var(--font-b);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  -webkit-appearance: none;
}

a {
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ── Scroll lock ────────────────────────────────────────────────────── */
body.scroll-locked {
  overflow: hidden;
  touch-action: none;
}

/* ── Fondo único global fijo para toda la invitación ────────────────── */
.global-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)), url('fondo.jpeg');
  background-size: cover;
  background-position: center;
  z-index: 0;
  pointer-events: none;
}

/* ── Noise overlay — textura de papel envejecido ────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: multiply;
}

/* ── Animate-in ─────────────────────────────────────────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.delay-100 { transition-delay: 0.10s; }
.delay-200 { transition-delay: 0.20s; }
.delay-300 { transition-delay: 0.30s; }
.delay-400 { transition-delay: 0.40s; }

/* ══════════════════════════════════════════════════════════════════════
   INDICADOR DE SCROLL ("DESLIZAR")
   ══════════════════════════════════════════════════════════════════════ */
.scroll-hint {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease, transform 0.4s ease;
}

.scroll-hint.is-visible {
  opacity: 1;
  visibility: visible;
}

.scroll-hint-label {
  font-family: var(--font-o);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--burgundy);
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(245, 230, 200, 0.9), 0 0 8px rgba(245, 230, 200, 0.6);
}

.scroll-hint-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -2px;
  height: 22px;
  position: relative;
  width: 20px;
}

.scroll-arrow {
  position: absolute;
  width: 18px;
  height: 14px;
  color: var(--pink);
  filter: drop-shadow(0 1px 2px rgba(245, 230, 200, 0.8));
  animation: scrollHeartbeat 1.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.scroll-arrow:nth-child(1) {
  top: 0;
  animation-delay: 0s;
}

.scroll-arrow:nth-child(2) {
  top: 8px;
  color: var(--gold);
  opacity: 0.85;
  animation-delay: 0.2s;
}

/* Animación latido / pulse sincrónico hacia abajo */
@keyframes scrollHeartbeat {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }
  14% {
    transform: translateY(3px) scale(1.18);
    opacity: 1;
  }
  28% {
    transform: translateY(1px) scale(1.04);
    opacity: 0.8;
  }
  42% {
    transform: translateY(5px) scale(1.22);
    opacity: 1;
  }
  70% {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   BURBUJA FLOTANTE REPRODUCTOR DE MÚSICA BGM
   ══════════════════════════════════════════════════════════════════════ */
.music-bubble {
  position: fixed;
  bottom: calc(clamp(16px, 3vh, 24px) + env(safe-area-inset-bottom, 0px));
  right: clamp(16px, 3vw, 24px);
  z-index: 99;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(42, 15, 26, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(212, 168, 75, 0.5);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: var(--gold-l);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  cursor: pointer;
  outline: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.5s ease,
              transform 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}

.music-bubble.is-active {
  opacity: 1;
  visibility: visible;
}

.music-bubble:hover {
  transform: scale(1.08);
  border-color: var(--pink-l);
  box-shadow: 0 6px 22px rgba(212, 68, 122, 0.45);
  color: var(--pink-l);
}

.music-bubble:active {
  transform: scale(0.95);
}

.music-vinyl-disc {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.music-bubble.is-playing .music-vinyl-disc {
  animation: vinylSpin 3.5s linear infinite;
  color: var(--pink-l);
}

@keyframes vinylSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.music-bar {
  width: 2.5px;
  height: 3px;
  background: var(--pink-l);
  border-radius: 1px;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.music-bubble.is-playing .music-bar {
  opacity: 1;
  animation: musicEqu 1.1s ease-in-out infinite alternate;
}

.music-bubble.is-playing .music-bar:nth-child(1) { animation-delay: 0.1s; }
.music-bubble.is-playing .music-bar:nth-child(2) { animation-delay: 0.35s; }
.music-bubble.is-playing .music-bar:nth-child(3) { animation-delay: 0.6s; }

@keyframes musicEqu {
  0%   { height: 3px; }
  50%  { height: 12px; }
  100% { height: 5px; }
}

/* ── Wave separators ── color crema que fluye entre secciones ───────── */
.wave {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════
   OPENING SCREEN
   ══════════════════════════════════════════════════════════════════════ */
.opening {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: var(--dark);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
              filter 0.8s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, filter, transform;
}

.opening.dissolve-out {
  opacity: 0;
  filter: blur(10px);
  transform: scale(1.03);
  pointer-events: none;
}

.opening-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Velo oscuro-cálido sobre el video */
.opening::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%,
      rgba(42, 15, 26, 0) 0%,
      rgba(42, 15, 26, 0.25) 50%,
      rgba(42, 15, 26, 0.75) 100%);
}

.opening-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(50px, 14vh, 120px);
  z-index: 2;
}

.opening-content {
  position: relative;
  text-align: center;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  animation: oc-fadein 1.2s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes oc-fadein {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════════════
   BOTÓN NEON — estilo letrero de neón artesanal idéntico al fondo
   ══════════════════════════════════════════════════════════════════════ */
.neon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 56px;
  border-radius: 12px;
  border: 2.5px solid #ff2e93;
  background: rgba(22, 6, 16, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  overflow: visible;
  animation:
    oc-fadein 0.8s ease 0.3s both,
    neon-flicker 4.5s linear 1.2s infinite;
  min-height: 62px;
  min-width: 220px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              background 0.2s ease,
              border-color 0.2s ease;
  box-shadow:
    0 0 4px #ffffff,
    0 0 10px #ff2e93,
    0 0 25px #ff2e93,
    0 0 50px #ff007f,
    inset 0 0 14px rgba(255, 46, 147, 0.35),
    inset 0 0 3px #ffffff;
  outline: 2px solid rgba(255, 46, 147, 0.4);
  outline-offset: 4px;
}

.neon-btn-text {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 6vw, 2.5rem);
  letter-spacing: 10px;
  margin-right: -10px; /* compensar spacing */
  color: #fff6fa;
  text-shadow:
    0 0 2px #ffffff,
    0 0 6px #ffffff,
    0 0 14px #ff3b98,
    0 0 28px #ff2e93,
    0 0 50px #ff007f,
    0 0 75px #ff007f;
  position: relative;
  z-index: 1;
}

.neon-btn-glow {
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 46, 147, 0.18) 0%, transparent 80%);
  pointer-events: none;
}

@keyframes neon-flicker {
  0%, 100% {
    opacity: 1;
    box-shadow:
      0 0 4px #ffffff,
      0 0 10px #ff2e93,
      0 0 25px #ff2e93,
      0 0 50px #ff007f,
      inset 0 0 14px rgba(255, 46, 147, 0.35),
      inset 0 0 3px #ffffff;
  }
  2% {
    opacity: 0.9;
    box-shadow:
      0 0 2px #ffffff,
      0 0 6px #ff2e93,
      0 0 15px #ff2e93,
      0 0 32px #ff007f,
      inset 0 0 8px rgba(255, 46, 147, 0.2),
      inset 0 0 2px #ffffff;
  }
  4% {
    opacity: 1;
    box-shadow:
      0 0 4px #ffffff,
      0 0 10px #ff2e93,
      0 0 25px #ff2e93,
      0 0 50px #ff007f,
      inset 0 0 14px rgba(255, 46, 147, 0.35),
      inset 0 0 3px #ffffff;
  }
  46% {
    opacity: 0.72;
    box-shadow:
      0 0 2px #ffffff,
      0 0 5px #ff2e93,
      0 0 10px #ff2e93,
      0 0 20px #ff007f,
      inset 0 0 5px rgba(255, 46, 147, 0.15);
  }
  48% {
    opacity: 1;
    box-shadow:
      0 0 4px #ffffff,
      0 0 10px #ff2e93,
      0 0 25px #ff2e93,
      0 0 50px #ff007f,
      inset 0 0 14px rgba(255, 46, 147, 0.35),
      inset 0 0 3px #ffffff;
  }
}

@media (hover: hover) {
  .neon-btn:hover {
    transform: scale(1.06);
    background: rgba(45, 8, 30, 0.75);
    border-color: #ff5eb4;
    outline-color: rgba(255, 94, 180, 0.7);
    box-shadow:
      0 0 6px #ffffff,
      0 0 18px #ff3b98,
      0 0 38px #ff2e93,
      0 0 75px #ff007f,
      0 0 110px #ff007f,
      inset 0 0 20px rgba(255, 77, 166, 0.5),
      inset 0 0 5px #ffffff;
  }
  .neon-btn:hover .neon-btn-text {
    text-shadow:
      0 0 3px #ffffff,
      0 0 8px #ffffff,
      0 0 18px #ff5eb4,
      0 0 36px #ff2e93,
      0 0 65px #ff007f,
      0 0 95px #ff007f;
  }
}

.neon-btn:active {
  transform: scale(0.96);
}

.neon-btn.exit {
  animation: neon-exit 0.5s cubic-bezier(0.55, 0, 1, 0.45) forwards !important;
}
@keyframes neon-exit {
  0%   { opacity: 1; transform: scale(1);    filter: brightness(1); }
  40%  { opacity: 1; transform: scale(1.06); filter: brightness(2.2); }
  100% { opacity: 0; transform: scale(0.55); filter: brightness(3); }
}

/* Hint ─────────────────────── */
.opening-hint {
  font-family: var(--font-o);
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(245, 230, 200, 0.35);
  animation: blink 2.4s ease-in-out infinite, oc-fadein 0.8s ease 1.1s both;
}

@keyframes blink {
  0%, 100% { opacity: .2; }
  50%       { opacity: .7; }
}

/* ══════════════════════════════════════════════════════════════════════
/* ══════════════════════════════════════════════════════════════════════
   MAIN CONTENT & TRANSICIÓN FADE CINEMATOGRÁFICO
   ══════════════════════════════════════════════════════════════════════ */
.main-content {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}
.main-content.visible {
  opacity: 1;
  transform: scale(1);
}

/* ── Fondo único: fondo.jpeg con overlay crema ───────────────────────── */
.sec-bg {
  position: relative;
  min-height: 100dvh;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0;
  background: transparent;
}

.sec-bg::before,
.sec-bg::after {
  display: none;
}

.sec-overlay {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 4vh, 60px) 20px;
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  min-height: 100dvh;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

/* ── Encabezados de sección con imagen ────────────────────────────── */
.section-header-img-wrap {
  text-align: center;
  margin-bottom: clamp(14px, 2.5vh, 24px);
  width: 100%;
  max-width: clamp(320px, 92vw, 540px);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.section-header-img {
  width: 100%;
  height: auto;
  max-height: clamp(140px, 26vh, 250px);
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 4px 14px rgba(107, 26, 58, 0.28));
}

.rsvp-header-img-wrap {
  text-align: center;
  width: 100%;
  max-width: clamp(280px, 86vw, 440px);
  margin: 0 auto clamp(8px, 1.8vh, 14px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.rsvp-header-img {
  width: 100%;
  height: auto;
  max-height: clamp(110px, 20vh, 200px);
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 4px 14px rgba(107, 26, 58, 0.28));
}

.section-header {
  text-align: center;
  margin-bottom: clamp(20px, 4vh, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 520px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow {
  font-family: var(--font-o);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--pink);
  margin-bottom: 6px;
  text-transform: uppercase;
  text-shadow: none;
}

.section-title {
  font-family: var(--font-d);
  font-size: clamp(1.5rem, 5vw, 2.8rem);
  letter-spacing: 2px;
  color: var(--burgundy);
  line-height: 1.15;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* ══════════════════════════════════════════════════════════════════════
   § 1 · INVITACIÓN — cartel central a pantalla completa
   ══════════════════════════════════════════════════════════════════════ */
.invite-overlay {
  text-align: center;
  padding: clamp(16px, 3vh, 40px) 16px;
}

.invite-block {
  max-width: 600px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Imagen del cartel — ocupa la pantalla completa de la sección de inicio */
.invite-cartel {
  width: 100%;
  max-width: 540px;
  height: auto;
  max-height: clamp(520px, 86vh, 880px);
  object-fit: contain;
  margin: 0 auto;
  filter:
    drop-shadow(0 12px 36px rgba(0,0,0,0.65))
    drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

/* ══════════════════════════════════════════════════════════════════════
   § MENSAJE "Querida vida" — open premium layout sin recuadro
   ══════════════════════════════════════════════════════════════════════ */

/* La sección tiene un fondo transparente sobre el fondo global fijo */
.mensaje-bg {
  background: transparent;
}

.mensaje-bg::after {
  display: none;
}

.mensaje-overlay {
  padding: clamp(48px, 8vh, 80px) clamp(20px, 6vw, 48px);
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}

.mensaje-inner {
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0 16px;
}

.message-title {
  font-family: 'Great Vibes', 'Dancing Script', cursive, serif;
  font-size: clamp(3.6rem, 11vw, 5.5rem);
  font-weight: 400;
  color: var(--burgundy);
  line-height: 1.0;
  text-shadow: 0 1px 2px rgba(245, 230, 200, 0.9);
}

.message-text {
  font-family: var(--font-b);
  font-size: clamp(1.04rem, 2.8vw, 1.18rem);
  color: #3d1222;
  line-height: 1.72;
  font-weight: 600;
  max-width: 460px;
  text-align: center;
  letter-spacing: 0.01em;
  text-shadow: none;
}

/* Separadores con corazón */
.heart-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 240px;
  margin: 2px 0;
}

.heart-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--pink), transparent);
  opacity: 0.8;
}

.heart-icon {
  color: var(--pink);
  font-size: 13px;
  line-height: 1;
  text-shadow: none;
}

.gratitude-text {
  font-family: 'Great Vibes', 'Dancing Script', cursive, serif;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 700;
  color: #a81d4f;
  line-height: 1.55;
  max-width: 480px;
  text-align: center;
  text-shadow: none;
}

/* ── Estado inicial de los spans (CSS-first, no depende de GSAP) ─────── */

/* Palabras generadas por prepareSplit() — invisibles desde el principio */
.reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(8px);
  will-change: opacity, transform, filter;
}

/* Caracteres del título — invisibles, con inclinación 3D */
.reveal-char {
  display: inline-block;
  white-space: pre;       /* preserva espacios entre caracteres */
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  will-change: opacity, transform, filter;
}

/* Perspectiva 3D para el efecto rotateX del título */
.message-title {
  perspective: 600px;
  transform-style: preserve-3d;
}

/* Fallback accesible: si JS/GSAP falla, la clase .msg-revealed
   que se añade a la sección muestra todo de golpe */
#mensaje.msg-revealed .reveal-word,
#mensaje.msg-revealed .reveal-char {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}



.invite-divider::after {
  background: linear-gradient(to left, transparent, var(--cream-d));
}

/* Decoración central del divider — estrella pequeña */
.invite-divider-star {
  color: var(--gold-l);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(212, 168, 75, 0.5);
}

.invite-text-card {
  background: var(--cream);
  border: 1.5px solid var(--cream-dd);
  border-top: 3px solid var(--pink);
  border-bottom: 3px solid var(--pink);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  max-width: 440px;
  width: 100%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 4px 0 rgba(107, 26, 58, 0.15),
    0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.invite-text-card::before {
  content: '★';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--pink);
  background: var(--cream);
  padding: 0 6px;
  line-height: 1;
}

.invite-msg {
  font-family: var(--font-b);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: #3a1825;
  line-height: 1.6;
  font-weight: 600;
  text-shadow: none;
}

.invite-msg--highlight {
  font-family: var(--font-d);
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  letter-spacing: 2px;
  color: var(--pink);
  text-shadow: none;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════════
   § 2 · CUENTA REGRESIVA — tarjeta estilo tablero de saloon
   ══════════════════════════════════════════════════════════════════════ */
.scoreboard {
  background:
    /* textura de grano sutil */
    linear-gradient(135deg, rgba(255,255,255,0.04) 25%, transparent 25%) -10px 0,
    linear-gradient(225deg, rgba(255,255,255,0.04) 25%, transparent 25%) -10px 0,
    linear-gradient(315deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(45deg,  rgba(255,255,255,0.04) 25%, transparent 25%),
    rgba(42, 15, 26, 0.72);
  border: 2px solid var(--cream-d);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  box-shadow:
    inset 0 1px 0 rgba(245, 230, 200, 0.15),
    0 0 0 4px rgba(181, 134, 42, 0.25),
    0 12px 40px rgba(0,0,0,0.6);
  position: relative;
}

/* Marco decorativo dorado */
.scoreboard::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(212, 168, 75, 0.3);
  border-radius: calc(var(--r-lg) - 2px);
  pointer-events: none;
  z-index: 1;
}

@supports (backdrop-filter: blur(8px)) {
  .scoreboard { backdrop-filter: blur(8px); }
}

.sb-top {
  background: linear-gradient(180deg, rgba(181, 134, 42, 0.2) 0%, rgba(181, 134, 42, 0.04) 100%);
  border-bottom: 1px solid var(--cream-dd);
  padding: 16px 24px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.sb-league {
  font-family: var(--font-o);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 5px;
  color: var(--gold-l);
}

.sb-match {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}

.sb-team {
  font-family: var(--font-d);
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: 4px;
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.sb-body {
  padding: 24px 16px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.cu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

/* Dígitos — estilo madera oscura con borde dorado */
.cd {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 6.5vw, 3.4rem);
  letter-spacing: 2px;
  color: var(--cream);
  background: rgba(42, 15, 26, 0.5);
  border: 1px solid var(--cream-dd);
  border-radius: var(--r);
  padding: 8px 4px;
  width: 100%;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  transition: color 0.25s;
  box-shadow: inset 0 1px 0 rgba(245, 230, 200, 0.12);
}

.cl {
  font-family: var(--font-o);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(245, 230, 200, 0.5);
}

.cc {
  font-family: var(--font-d);
  font-size: clamp(1.4rem, 5vw, 3rem);
  color: var(--gold-l);
  opacity: .6;
  animation: cblink 1s step-end infinite;
  padding-bottom: 22px;
  flex-shrink: 0;
}

@keyframes cblink {
  0%, 100% { opacity: .55; }
  50%       { opacity: .12; }
}

.countdown-msg {
  font-family: var(--font-d);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  letter-spacing: 4px;
  color: var(--pink-l);
  text-shadow: 0 0 20px rgba(212, 68, 122, 0.5);
  animation: mpulse 1.5s ease-in-out infinite;
}

@keyframes mpulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}

/* ══════════════════════════════════════════════════════════════════════
   § 3 · DETALLES — tarjetas estilo tablón de anuncios del saloon
   ══════════════════════════════════════════════════════════════════════ */
.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .details-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tarjeta con aspecto de papel envejecido clavado en madera */
.detail-card {
  background: var(--cream);
  border: 1.5px solid var(--cream-dd);
  border-top: 4px solid var(--pink);
  border-radius: var(--r);
  padding: 22px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 4px 0 rgba(107, 26, 58, 0.2),
    0 8px 24px rgba(0,0,0,0.45);
  position: relative;
  /* Efecto de clavito en la esquina superior */
}

.detail-card::before {
  content: '★';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  font-size: 10px;
  color: var(--pink);
  background: var(--cream);
  padding: 0 4px;
  line-height: 1;
}

@media (hover: hover) {
  .detail-card:hover {
    transform: translateY(-3px) rotate(0.3deg);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.6),
      0 4px 0 rgba(107, 26, 58, 0.2),
      0 12px 30px rgba(0,0,0,0.5);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
}

.dc-label {
  font-family: var(--font-o);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--pink);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.dc-value {
  font-family: var(--font-d);
  font-size: clamp(1.1rem, 4.2vw, 1.55rem);
  letter-spacing: 1px;
  color: var(--burgundy);
  white-space: nowrap;
}

.dc-sub {
  font-family: var(--font-o);
  font-size: 12px;
  color: rgba(107, 26, 58, 0.55);
  margin-top: 4px;
}

/* Mapa ── tarjeta madera/papel ───────────────────── */
.map-card {
  max-width: 480px;
  width: 100%;
  margin: 28px auto 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--cream);
  border: 1.5px solid var(--cream-dd);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 4px 0 rgba(107, 26, 58, 0.2),
    0 10px 30px rgba(0,0,0,0.5);
}

.map-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(181,134,42,0.15) 0%, rgba(181,134,42,0.05) 100%);
  border-bottom: 1px solid var(--cream-dd);
}

.map-card-pin {
  display: flex;
  align-items: center;
  color: var(--pink);
  flex-shrink: 0;
}

.map-card-label {
  font-family: var(--font-o);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--burgundy);
  flex: 1;
  text-transform: uppercase;
}

.map-card-badge {
  font-family: var(--font-o);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cream);
  background: var(--pink);
  padding: 3px 10px;
  border-radius: 100px;
  animation: badge-pulse 2.2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

.map-iframe-wrap {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.map-iframe-wrap iframe {
  display: block;
  width: 100%;
  filter: saturate(0.55) sepia(0.3) contrast(1.05);
}

.map-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(232, 213, 170, 0.4);
  border-top: 1px solid var(--cream-dd);
  flex-wrap: wrap;
}

.map-card-address {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(107, 26, 58, 0.65);
  font-family: var(--font-o);
  font-size: 12px;
  letter-spacing: 0.5px;
  flex: 1;
  min-width: 0;
}

.map-card-address svg { flex-shrink: 0; color: var(--pink); }

.maps-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--pink);
  color: var(--cream);
  font-family: var(--font-o);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 10px 16px;
  border-radius: var(--r);
  border: none;
  box-shadow: 0 2px 0 var(--burgundy), 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
}

@media (hover: hover) {
  .maps-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 0 var(--burgundy), 0 8px 18px rgba(0,0,0,0.35);
  }
}
.maps-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 var(--burgundy), 0 2px 8px rgba(0,0,0,0.25);
}

/* Nota de acceso entre comillas debajo del mapa */
.map-card-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(245, 230, 200, 0.95) 0%, rgba(232, 213, 170, 0.9) 100%);
  border-top: 1.5px dashed var(--gold);
}

.map-card-note-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.map-card-note-text {
  font-family: var(--font-b);
  font-size: 0.95rem;
  font-style: italic;
  color: #4a1c2d;
  line-height: 1.5;
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════════
   § 4 · AVISOS IMPORTANTES
   ══════════════════════════════════════════════════════════════════════ */
.notices-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.notice-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--cream);
  border: 1.5px solid var(--cream-dd);
  border-left: 4px solid var(--pink);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    0 4px 0 rgba(107, 26, 58, 0.15),
    0 8px 24px rgba(0,0,0,0.4);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .notice-card:hover {
    transform: translateY(-2px);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.7),
      0 6px 0 rgba(107, 26, 58, 0.18),
      0 12px 28px rgba(0,0,0,0.45);
  }
}

.notice-card-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(212, 68, 122, 0.12);
  border: 1px solid var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notice-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.notice-card-content {
  flex: 1;
  min-width: 0;
}

.notice-card-title {
  font-family: var(--font-o);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--pink);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.notice-card-text {
  font-family: var(--font-b);
  font-size: 1.02rem;
  color: var(--burgundy);
  line-height: 1.5;
  font-weight: 600;
}

.notice-card-text strong {
  color: var(--pink);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════════
   § 5 · RSVP
   ══════════════════════════════════════════════════════════════════════ */
.rsvp-sec-overlay {
  text-align: center;
  padding: clamp(16px, 3vh, 40px) clamp(12px, 4vw, 24px);
  padding-bottom: calc(clamp(24px, 4vh, 60px) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}

.rsvp-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.5vh, 18px);
  padding: clamp(24px, 4vh, 40px) clamp(16px, 5vw, 28px);
  margin: 0 auto;
  width: min(92vw, 480px);    /* never wider than viewport */
  max-width: 480px;
  /* Papel viejo con borde decorativo */
  background: var(--cream);
  border-radius: var(--r-lg);
  border: 2px solid var(--cream-dd);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    0 0 0 5px rgba(181, 134, 42, 0.2),
    0 12px 40px rgba(0,0,0,0.55);
  position: relative;
}

/* Marco interior decorativo */
.rsvp-content::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(181, 134, 42, 0.4);
  border-radius: calc(var(--r-lg) - 2px);
  pointer-events: none;
}

.rsvp-eyebrow {
  font-family: var(--font-o);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 5px;
  color: var(--pink);
  border: 1.5px solid var(--pink);
  padding: 5px 20px;
  border-radius: 2px;
  position: relative;
  z-index: 1;
}

.rsvp-title {
  font-family: var(--font-d);
  font-size: clamp(2rem, 7vw, 3.8rem);
  letter-spacing: 3px;
  color: var(--burgundy);
  line-height: 1.1;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.rsvp-sub {
  font-size: 0.97rem;
  color: rgba(107, 26, 58, 0.75);
  max-width: 360px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ── Aviso de cupo máximo ── */
.rsvp-capacity-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(107, 26, 58, 0.07);
  border: 1.5px solid rgba(107, 26, 58, 0.18);
  border-radius: 100px;
  padding: 8px 20px;
  position: relative;
  z-index: 1;
}

.rsvp-capacity-icon { font-size: 18px; line-height: 1; }

.rsvp-capacity-text {
  font-family: var(--font-o);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--burgundy);
}

.rsvp-capacity-text strong {
  font-weight: 700;
  color: var(--burgundy);
}

/* ── Selector de asistentes ── */
/* Fieldset: solo contenedor semántico, sin estilos visuales */
.rsvp-choices-group {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  position: relative;
  z-index: 1;
}

.rsvp-choices-legend {
  font-family: var(--font-o);
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(107, 26, 58, 0.55);
  text-align: center;
  width: 100%;
  display: block;
  margin-bottom: 12px;
}

/* Fila flex con las dos tarjetas — separada del legend */
.rsvp-choices {
  display: flex;
  gap: 12px;
  width: 100%;
}


/* Ocultar el radio nativo visualmente (accesible via teclado) */
.rsvp-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Tarjeta de opción */
.rsvp-choice {
  flex: 1;
  cursor: pointer;
  display: block;
  min-width: 0;  /* allow flex to shrink */
}

.rsvp-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: clamp(12px, 3vw, 18px) clamp(8px, 2.5vw, 16px) clamp(10px, 2.5vw, 16px);
  border: 2px solid rgba(107, 26, 58, 0.18);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.55);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  user-select: none;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Checkmark decorativo (oculto por defecto) */
.rsvp-choice-card::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pink);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rsvp-choice-icon {
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1;
  transition: transform 0.2s ease;
}

.rsvp-choice-label {
  font-family: var(--font-d);
  font-size: clamp(0.7rem, 3vw, 0.88rem);
  letter-spacing: clamp(1px, 0.5vw, 2px);
  color: var(--burgundy);
  text-align: center;
  line-height: 1.2;
}

.rsvp-choice-desc {
  font-family: var(--font-o);
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(107, 26, 58, 0.5);
  text-transform: uppercase;
}

/* Estado: seleccionado */
.rsvp-radio:checked + .rsvp-choice-card {
  border-color: var(--pink);
  background: rgba(212, 68, 122, 0.07);
  box-shadow:
    0 0 0 3px rgba(212, 68, 122, 0.12),
    0 4px 14px rgba(0, 0, 0, 0.1);
}

.rsvp-radio:checked + .rsvp-choice-card::after {
  opacity: 1;
  transform: scale(1);
}

.rsvp-radio:checked + .rsvp-choice-card .rsvp-choice-icon {
  transform: scale(1.15);
}

.rsvp-radio:checked + .rsvp-choice-card .rsvp-choice-label {
  color: var(--pink);
}

/* Hover (dispositivos con cursor) */
@media (hover: hover) {
  .rsvp-choice:hover .rsvp-choice-card {
    border-color: rgba(212, 68, 122, 0.45);
    background: rgba(212, 68, 122, 0.04);
    transform: translateY(-2px);
  }
}

/* Focus visible para teclado */
.rsvp-radio:focus-visible + .rsvp-choice-card {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}



/* Botón WhatsApp — estilo sello/stamp */
.rsvp-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
  color: #fff;
  font-family: var(--font-d);
  font-size: 1.2rem;
  letter-spacing: 2px;
  padding: 17px 38px;
  border-radius: var(--r);
  border: none;
  box-shadow:
    0 3px 0 #1a7a3c,
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 8px 24px rgba(0,0,0,0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  min-height: 56px;
  cursor: pointer;
  z-index: 1;
}

.rsvp-btn::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: calc(var(--r) + 3px);
  border: 2px solid var(--wa);
  opacity: 0;
  animation: pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0%   { transform: scale(0.92); opacity: 0.75; }
  100% { transform: scale(1.12); opacity: 0; }
}

@media (hover: hover) {
  .rsvp-btn:hover {
    transform: translateY(-2px);
    box-shadow:
      0 5px 0 #1a7a3c,
      inset 0 1px 0 rgba(255,255,255,0.25),
      0 12px 28px rgba(0,0,0,0.35);
  }
}
.rsvp-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 #1a7a3c,
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 4px 12px rgba(0,0,0,0.25);
}

.wa-svg { width: 24px; height: 24px; flex-shrink: 0; }

.rsvp-hint {
  font-family: var(--font-o);
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(107, 26, 58, 0.5);
  position: relative;
  z-index: 1;
}

.confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* ══════════════════════════════════════════════════════════════════════
   ACCESIBILIDAD
   ══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-in {
    opacity: 1;
    transform: none;
  }
  .invite-cartel { animation: none; }
}
