/* =========================================================
   TEMA PUBLICO DE BODA
   Variables, tipografias locales y base visual compartida por
   portada, invitacion y confirmacion RSVP.
========================================================= */
:root {
  --jj-ivory: #F7F3EA;
  --jj-cream: #F1E3D7;
  --jj-blush: #E3B7AC;
  --jj-soft-pink: #EFB2B1;
  --jj-sage: #8E9C81;
  --jj-eucalyptus: #687242;
  --jj-champagne: #C3BBA4;
  --jj-text: #5B5148;
  --color-petroleo: var(--jj-eucalyptus);
  --color-petroleo-oscuro: #4d5734;
  --color-hueso: var(--jj-ivory);
  --color-dorado: var(--jj-champagne);
  --color-beige: var(--jj-cream);
  --color-texto: var(--jj-text);
  --color-blanco-suave: #fffdf8;
  --color-tinta: #414833;
  --shadow-soft: 0 24px 70px rgba(104, 114, 66, 0.16);
  --shadow-deep: 0 32px 90px rgba(77, 87, 52, 0.24);
  --radius: 25px;
  --content-width: 1120px;
}

@font-face {
  font-family: "Cinzel";
  src: url("/fonts/Cinzel-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("/fonts/Cinzel-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Great Vibes";
  src: url("/fonts/GreatVibes-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bodoni Promise Italic";
  src: url("/fonts/BodoniSvtyTwoITCTTBookIta.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Mrs Eaves Small Caps";
  src: url("/fonts/MrsEavesSmallCapsRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.wedding-body {
  margin: 0;
  overflow-x: hidden;
  color: var(--color-texto);
  background:
    radial-gradient(circle at 12% 8%, rgba(227, 183, 172, 0.24), transparent 24rem),
    radial-gradient(circle at 88% 16%, rgba(142, 156, 129, 0.18), transparent 26rem),
    linear-gradient(180deg, var(--color-blanco-suave), var(--jj-ivory) 46%, var(--jj-cream));
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0;
}

.wedding-body.intro-active {
  overflow: hidden;
}

.wedding-body img {
  max-width: 100%;
}

.wedding-body a,
.wedding-body button,
.wedding-body input,
.wedding-body textarea {
  font: inherit;
}

.wedding-body :focus-visible {
  outline: 3px solid rgba(104, 114, 66, 0.72);
  outline-offset: 4px;
}

/* =========================================================
   PORTADA INICIAL - JERARQUIA VISUAL DE LOS NOVIOS
   La identidad de Jazmin y Jesus precede al nombre dinamico
   del invitado sin alterar la validacion por token.
   La logica de token permanece en servidor y JavaScript publico.
========================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(rgba(8, 39, 45, 0.42), rgba(8, 39, 45, 0.38)),
    url("/images/wedding/portada_er.png") center bottom / cover no-repeat,
    var(--color-hueso);
}

/* Cuando la portada termina su transicion debe salir realmente del flujo
   interactivo; evita que una capa invisible bloquee botones y enlaces. */
.intro[hidden] {
  display: none !important;
  pointer-events: none;
}

.intro::before,
.intro::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.intro::before {
  inset: 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 250, 243, 0.88), rgba(255, 250, 243, 0.28) 26rem, rgba(8, 39, 45, 0.12)),
    linear-gradient(90deg, rgba(8, 39, 45, 0.2), transparent 28%, transparent 72%, rgba(8, 39, 45, 0.18));
}

.intro::after {
  inset: clamp(16px, 4vw, 54px);
  border: 1px solid rgba(15, 63, 70, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(255, 250, 243, 0.46),
    inset 0 0 70px rgba(255, 250, 243, 0.32);
}

#smoke {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.46;
}

.intro-content {
  position: relative;
  z-index: 2;
  width: min(100%, 900px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2.2vw, 16px);
  text-align: center;
  color: var(--color-petroleo-oscuro);
  animation: weddingFadeUp 900ms ease both;
}

.intro-guest-block {
  display: contents;
}

.intro-escudo {
  width: clamp(112px, 22vw, 176px);
  filter: drop-shadow(0 20px 26px rgba(8, 39, 45, 0.32));
  animation: sealPulse 4.8s ease-in-out infinite;
}

.linea {
  margin: 0;
  color: var(--color-petroleo);
  font-size: clamp(0.88rem, 2vw, 1.08rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.8vw, 12px);
}

.intro-couple-name-img {
  width: clamp(280px, 68vw, 680px);
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 28px rgba(255, 250, 243, 0.58));
}

/* La promesa reemplaza visualmente a la fecha; conserva tamano, color
   y espaciado, pero comparte familia tipografica con el invitado. */
.intro-promise-text {
  max-width: min(88vw, 680px);
  margin: 0;
  color: var(--color-petroleo);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1rem, 2.6vw, 1.55rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.intro-label {
  margin: 8px 0 0;
  color: #856e48;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-nombre {
  max-width: 100%;
  margin: 0;
  color: var(--color-petroleo-oscuro);
  font-size: clamp(1.5rem, 4.5vw, 1.6rem);
  font-weight: 600;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-shadow: 0 12px 36px rgba(255, 250, 243, 0.64);
}

.guest-display-name {
  display: grid;
  justify-items: center;
  gap: 0.16em;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.guest-display-name__and {
  font-size: 0.72em;
  font-weight: inherit;
  line-height: 1;
}

.section-kicker.guest-display-name {
  text-transform: none;
}

/* Los tamanos usan clamp() para sostener tactilidad en movil sin
   sobredimensionar el CTA ni competir con el nombre de los novios. */
.intro-btn {
  min-height: 42px;
  max-width: min(82vw, 260px);
  margin-top: 8px;
  padding: clamp(0.55rem, 1.8vw, 0.85rem) clamp(1rem, 4vw, 1.8rem);
  color: var(--color-blanco-suave);
  background:
    linear-gradient(135deg, rgba(15, 63, 70, 0.98), rgba(8, 39, 45, 0.98));
  border: 1px solid rgba(201, 168, 106, 0.76);
  border-radius: var(--radius);
  box-shadow: 0 18px 36px rgba(8, 39, 45, 0.28);
  cursor: pointer;
  font-size: clamp(0.78rem, 2.8vw, 1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.intro-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(8, 39, 45, 0.34);
}

.intro-btn.disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

/* =========================================================
   PORTADA VERTICAL TIPO MOVIL
   Estructura publica de dos secciones: foto y acceso.
========================================================= */
.intro {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  background: var(--color-hueso);
}

.intro::before,
.intro::after {
  display: none;
}

.intro-content {
  width: min(100%, 430px);
  min-height: 100svh;
  margin-inline: auto;
  display: block;
  color: var(--color-petroleo-oscuro);
  background: var(--color-hueso);
  box-shadow: 0 0 44px rgba(77, 87, 52, 0.16);
  animation: none;
}

.intro-photo-section {
  width: 100%;
  min-height: 62svh;
  overflow: hidden;
  background: var(--jj-eucalyptus);
}

.intro-cover-photo {
  width: 100%;
  height: 100%;
  min-height: 62svh;
  display: block;
  object-fit: cover;
  object-position: 50% 52%;
}

.intro-details-section {
  min-height: 48svh;
  display: grid;
  align-content: start;
  gap: clamp(0.45rem, 2.5vw, 0.8rem);
  padding: clamp(2rem, 9vw, 3rem) 1.5rem max(2rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 12% 14%, rgba(227, 183, 172, 0.24), transparent 12rem),
    radial-gradient(circle at 88% 78%, rgba(142, 156, 129, 0.18), transparent 13rem),
    linear-gradient(180deg, #fffdf8, var(--jj-ivory) 58%, var(--jj-cream));
}

.intro-logo-block {
  display: grid;
  place-items: center;
}

.intro-er-logo {
  width: clamp(110px, 46vw, 220px);
  height: auto;
  display: block;
  opacity: 0;
  transform: scale(0.86);
  animation: erLogoReveal 900ms ease-out forwards;
  filter: drop-shadow(0 14px 22px rgba(91, 81, 72, 0.16));
}

.intro-floral-divider {
  width: clamp(132px, 40vw, 168px);
  height: clamp(60px, 18vw, 74px);
  display: block;
  margin: -0.25rem auto 0;
  object-fit: cover;
  object-position: center 74%;
  opacity: 0.92;
  pointer-events: none;
}

.intro-guest-block {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.intro-guest-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-btn {
  margin-bottom: 3rem;
  color: var(--jj-ivory);
  background: linear-gradient(135deg, #748052, var(--jj-eucalyptus));
  border-color: rgba(195, 187, 164, 0.9);
  box-shadow:
    0 18px 36px rgba(77, 87, 52, 0.26),
    0 0 12px rgba(241, 227, 215, 0.52),
    inset 0 0 7px rgba(255, 255, 255, 0.22);
}

.intro-btn:hover {
  background: linear-gradient(135deg, var(--jj-eucalyptus), #566036);
}

/* =========================================================
   ESTRUCTURA GENERAL DE LA INVITACION
   Secciones fluidas y responsive con aparicion suave por scroll.
========================================================= */
#app {
  min-height: 100vh;
}

.wedding-page {
  position: relative;
  overflow: hidden;
}

.section-inner {
  width: min(var(--content-width), calc(100% - 32px));
  margin-inline: auto;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--jj-eucalyptus);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wedding-page h1,
.wedding-page h2,
.wedding-confirmation h2 {
  margin: 0;
  color: var(--color-petroleo-oscuro);
  font-weight: 600;
  line-height: 1.1;
}

.wedding-page h2,
.wedding-confirmation h2 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.wedding-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 24px;
  color: var(--color-petroleo-oscuro);
  background: var(--color-blanco-suave);
  border: 1px solid rgba(15, 63, 70, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(8, 39, 45, 0.13);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.wedding-button:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 168, 106, 0.72);
  box-shadow: 0 20px 44px rgba(8, 39, 45, 0.18);
}

.wedding-button--light {
  color: var(--color-blanco-suave);
  background: linear-gradient(135deg, var(--color-petroleo), var(--color-petroleo-oscuro));
  border-color: rgba(201, 168, 106, 0.72);
}

.reveal-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-section.is-exiting {
  opacity: 0;
  transform: translateY(18px);
}

#promesa,
#boda {
  overflow-x: hidden;
}

#promesa [data-reveal],
#boda [data-reveal] {
  opacity: 0;
  transition:
    opacity 700ms ease,
    transform 700ms ease;
  will-change: opacity, transform;
}

#promesa [data-reveal="left"],
#boda [data-reveal="left"] {
  transform: translateX(-28px);
}

#promesa [data-reveal="right"],
#boda [data-reveal="right"] {
  transform: translateX(28px);
}

#promesa [data-reveal].is-visible,
#boda [data-reveal].is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* =========================================================
   HERO / FOTO DE INTRO
========================================================= */
.wedding-hero {
  position: relative;
  min-height: 96vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.wedding-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/images/wedding/wedding-bg-rings.png") center bottom / cover no-repeat;
  transform: scale(1.02);
}

.wedding-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 250, 243, 0.68), rgba(255, 250, 243, 0.26) 25rem, rgba(8, 39, 45, 0.14)),
    linear-gradient(180deg, rgba(255, 250, 243, 0.52), rgba(247, 241, 232, 0.76));
}

.wedding-hero__content {
  width: min(760px, calc(100% - 32px));
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 92px 0 120px;
  text-align: center;
}

.wedding-logo {
  width: clamp(130px, 18vw, 190px);
  filter: drop-shadow(0 22px 28px rgba(8, 39, 45, 0.3));
}

.wedding-eyebrow,
.wedding-date,
.wedding-guest {
  margin: 0;
}

.wedding-eyebrow {
  color: #8a744f;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wedding-hero h1 {
  font-size: clamp(3.3rem, 11vw, 8rem);
  letter-spacing: 0;
}

.wedding-date {
  color: var(--color-petroleo);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wedding-guest {
  color: var(--color-texto);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
}

.wedding-scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 4vh, 42px);
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--color-petroleo-oscuro);
  opacity: 0.58;
  transform: translateX(-50%);
  transition: opacity 220ms ease;
}

.wedding-scroll-indicator:hover {
  opacity: 0.86;
}

.wedding-scroll-indicator[type="button"] {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.wedding-scroll-indicator__icon {
  width: clamp(24px, 5vw, 38px);
  height: clamp(24px, 5vw, 38px);
  display: block;
  animation: weddingScrollFloat 1.8s ease-in-out infinite;
}

.wedding-scroll-indicator__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   CONTADOR Y FOTO SECUNDARIA
========================================================= */
.photo-countdown,
.promise-section,
.reserved-section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.photo-countdown,
.promise-section,
.event-section {
  position: relative;
}

.promise-section {
  background:
    radial-gradient(circle at 0 18%, rgba(227, 183, 172, 0.2), transparent 15rem),
    linear-gradient(180deg, var(--jj-ivory), var(--jj-cream));
}

.gifts-section {
  position: relative;
}

.split-layout {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.photo-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep);
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  display: block;
}

.countdown-panel {
  padding: clamp(28px, 5vw, 54px);
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.82), rgba(247, 241, 232, 0.96));
  border: 1px solid rgba(201, 168, 106, 0.32);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 12px);
  margin-top: 28px;
}

.countdown-item {
  min-width: 0;
  min-height: clamp(72px, 15vw, 112px);
  display: grid;
  place-items: center;
  padding: clamp(10px, 2.8vw, 16px) clamp(5px, 1.6vw, 10px);
  color: var(--color-blanco-suave);
  background:
    linear-gradient(145deg, var(--color-petroleo), var(--color-petroleo-oscuro));
  border: 1px solid rgba(201, 168, 106, 0.46);
  border-radius: var(--radius);
}

.countdown-item span {
  font-size: clamp(1.35rem, 6vw, 3.6rem);
  line-height: 1;
}

.countdown-item small {
  color: var(--color-beige);
  font-size: clamp(0.52rem, 2.1vw, 0.82rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================================
   HISTORIA / INTRO CON CUENTA REGRESIVA
========================================================= */
.historia-section {
  position: relative;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(
      180deg,
      rgba(30, 35, 28, 0.08),
      rgba(30, 35, 28, 0.16) 48%,
      rgba(30, 35, 28, 0.46)
    ),
    url("/images/wedding/jj_countdown.png") center center / cover no-repeat;
}

.historia-countdown-block {
  position: absolute;
  left: 50%;
  bottom: max(5.4rem, calc(env(safe-area-inset-bottom) + 5rem));
  z-index: 2;
  width: min(88%, 360px);
  color: var(--jj-ivory);
  text-align: center;
  transform: translateX(-50%);
}

.historia-countdown-title {
  margin: 0 0 0.68rem;
  color: var(--jj-ivory);
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.4rem, 3.5cqw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgba(30, 35, 28, 0.38);
}

.historia-countdown {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.24rem, 1.8cqw, 0.48rem);
  margin: 0;
  padding: 0.68rem 0;
  color: var(--jj-ivory);
  border-top: 1px solid rgba(247, 243, 234, 0.82);
  border-bottom: 1px solid rgba(247, 243, 234, 0.82);
  filter: drop-shadow(0 3px 12px rgba(30, 35, 28, 0.3));
}

.historia-countdown .countdown-item {
  min-width: 0;
  min-height: auto;
  display: grid;
  justify-items: center;
  gap: 0.18rem;
  padding: 0;
  color: var(--jj-ivory);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.historia-countdown .countdown-item span {
  color: var(--jj-ivory);
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.15rem, 7.4cqw, 2rem);
  line-height: 1;
}

.historia-countdown .countdown-item small {
  color: var(--jj-ivory);
  font-size: clamp(0.54rem, 2.5cqw, 0.78rem);
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.historia-countdown .countdown-separator {
  color: var(--jj-ivory);
  font-size: clamp(1rem, 5cqw, 1.55rem);
  line-height: 1;
  opacity: 0.9;
  transform: translateY(-0.34em);
}

.historia-section .wedding-scroll-indicator {
  color: var(--jj-ivory);
  bottom: max(1.2rem, calc(env(safe-area-inset-bottom) + 1rem));
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.36);
}

/* =========================================================
   FRASE Y PROMESA RELIGIOSA
========================================================= */
.quote-section {
  position: relative;
  padding: clamp(76px, 10vw, 132px) 0;
  text-align: center;
  background:
    linear-gradient(rgba(8, 39, 45, 0.86), rgba(8, 39, 45, 0.86)),
    url("/images/wedding/ornament-leaves-wide.png") center / cover no-repeat;
}

.quote-section blockquote {
  margin: 0;
  color: var(--color-blanco-suave);
  font-size: clamp(1.6rem, 5vw, 4.2rem);
  line-height: 1.35;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.quote-photo-frame {
  position: relative;
  width: min(420px, 80vw);
  margin: 0 auto 20px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 106, 0.48);
  border-radius: var(--radius);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.3),
    0 0 34px rgba(201, 168, 106, 0.12);
}

.quote-photo-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(247, 241, 232, 0.28);
  border-radius: calc(var(--radius) - 2px);
  pointer-events: none;
}

.quote-photo-frame .quote-photo {
  width: 100%;
  display: block;
  margin: 0;
  opacity: 0.72;
  filter: brightness(1.08) contrast(1.05) saturate(1.04);
}

.ornament {
  width: min(420px, 80vw);
  margin-bottom: 20px;
  opacity: 0.34;
}

.promise-card,
.dress-card,
.reserved-card,
.confirm-card,
.confirmation-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(247, 243, 234, 0.98));
  border: 1px solid rgba(195, 187, 164, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.promise-card::before,
.confirmation-shell::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(142, 156, 129, 0.42);
  pointer-events: none;
}

.promise-logo {
  width: 126px;
  filter: drop-shadow(0 12px 18px rgba(77, 87, 52, 0.18));
}

.promise-card {
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 6%, rgba(227, 183, 172, 0.2), transparent 13rem),
    radial-gradient(circle at 92% 30%, rgba(142, 156, 129, 0.14), transparent 15rem),
    linear-gradient(180deg, #fffdf8, var(--jj-ivory) 58%, var(--jj-cream));
}

.promise-card::before {
  z-index: 1;
}

.promise-card > :not(.promise-floral-frame) {
  position: relative;
  z-index: 2;
}

.promise-floral-frame {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.24;
  pointer-events: none;
  user-select: none;
}

.promise-quote {
  max-width: 30ch;
  margin: 14px auto 18px;
  color: var(--color-petroleo);
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.45rem, 7cqw, 2rem);
  line-height: 1.2;
}

.promise-main-copy,
.promise-card .parents-grid p {
  color: var(--color-petroleo-oscuro);
  font-family: "Bodoni Promise Italic", Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
}

.parents-grid,
.gift-grid,
.event-grid {
  display: grid;
  gap: 10px;
}

.parents-grid {
  margin: 0px auto;
}

.parents-title {
  color: var(--jj-eucalyptus);
  font-family: "Mrs Eaves Small Caps", "Cinzel", serif;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

.parents-grid--family {
  width: min(100%, 330px);
  grid-template-columns: 1fr;
  gap: 0;
}

.family-role {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.8rem 0.4rem;
}

.family-role + .family-role {
  margin-top: 0.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(195, 187, 164, 0.56);
}

#promesa .family-role__title {
  margin: 0;
  color: var(--jj-eucalyptus);
  font-family: "Mrs Eaves Small Caps", "Cinzel", serif;
  font-size: clamp(0.9rem, 3.8cqw, 1.05rem);
  font-style: normal;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

#promesa .family-role__names {
  margin: 0;
  font-size: clamp(1.05rem, 4.8cqw, 1.2rem);
  line-height: 1.5;
}

.names-lockup {
  display: grid;
  gap: 0;
  margin: 20px 0 18px;
  color: var(--color-petroleo);
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.5rem, 18cqw, 5.4rem);
  font-weight: 400;
  line-height: 0.82;
}

.names-lockup span:nth-child(2) {
  color: var(--jj-champagne);
  font-size: 0.56em;
  line-height: 0.95;
}

.invitation-copy {
  color: var(--jj-text);
  font-family: "Mrs Eaves Small Caps", "Cinzel", serif;
  letter-spacing: 0.08em;
}

.promise-date-time {
  width: min(100%, 330px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.9rem, 5cqw, 1.45rem);
  margin: 20px auto 0;
  color: var(--color-petroleo);
}

.promise-date-column,
.promise-time-column {
  display: grid;
  justify-items: center;
  text-align: center;
}

.promise-date-month,
.promise-date-year,
.promise-time-period {
  font-family: "Mrs Eaves Small Caps", "Cinzel", serif;
  letter-spacing: 0.12em;
  line-height: 1;
}

.promise-date-month {
  font-size: clamp(0.82rem, 3.6cqw, 1rem);
}

.promise-date-day,
.promise-time-main {
  font-family: "Bodoni Promise Italic", Georgia, serif;
  font-style: italic;
  line-height: 0.9;
}

.promise-date-day {
  font-size: clamp(4.3rem, 24cqw, 6.1rem);
}

.promise-date-year {
  font-size: clamp(1rem, 5cqw, 1.45rem);
}

.promise-date-divider {
  width: 1px;
  min-height: clamp(112px, 33cqw, 148px);
  display: block;
  background: currentColor;
  opacity: 0.76;
}

.promise-time-main {
  font-size: clamp(2.45rem, 15cqw, 4rem);
}

.promise-time-period {
  margin-top: 0.22rem;
  font-size: clamp(1rem, 5.2cqw, 1.5rem);
}

.promise-location-block {
  display: grid;
  justify-items: center;
  gap: 0.72rem;
  margin-top: clamp(1.7rem, 7cqw, 2.4rem);
  text-align: center;
}

.promise-location-icon {
  width: clamp(108px, 34cqw, 156px);
  height: auto;
  display: block;
  margin-top: 0.35rem;
  filter: drop-shadow(0 12px 18px rgba(8, 39, 45, 0.14));
}

.promise-location-title {
  margin: 0;
  color: var(--jj-eucalyptus);
  font-family: "Mrs Eaves Small Caps", "Cinzel", serif;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
}

.promise-location-address,
.promise-celebration-text {
  max-width: 31ch;
  margin: 0;
  color: var(--color-petroleo-oscuro);
  font-family: "Bodoni Promise Italic", Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.42;
}

.promise-celebration-text {
  margin-top: clamp(0.85rem, 4cqw, 1.25rem);
  font-size: clamp(1.05rem, 4.8cqw, 1.35rem);
}

.promise-map-button {
  min-height: 42px;
  max-width: min(82%, 260px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.16rem auto 0;
  padding: clamp(0.55rem, 1.8cqw, 0.85rem) clamp(1rem, 4cqw, 1.8rem);
  color: var(--color-blanco-suave);
  background:
    linear-gradient(135deg, #748052, var(--jj-eucalyptus));
  border: 1px solid rgba(195, 187, 164, 0.9);
  border-radius: var(--radius);
  box-shadow:
    0 18px 36px rgba(77, 87, 52, 0.26),
    0 0 12px rgba(241, 227, 215, 0.52),
    inset 0 0 7px rgba(255, 255, 255, 0.22);
  font-size: clamp(0.78rem, 2.8cqw, 1rem);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.promise-map-button:hover {
  background: linear-gradient(135deg, var(--jj-eucalyptus), #566036);
  transform: translateY(-2px);
  box-shadow:
    0 22px 44px rgba(77, 87, 52, 0.32),
    0 0 14px rgba(241, 227, 215, 0.52),
    inset 0 0 7px rgba(255, 255, 255, 0.22);
}

.promise-reception-time {
  display: grid;
  justify-items: center;
  margin: 0;
  color: var(--color-petroleo);
}

/* =========================================================
   BODA / VESTIMENTA EDITORIAL
========================================================= */
.boda-section {
  position: relative;
  padding: clamp(64px, 9vw, 110px) 0;
  background:
    radial-gradient(circle at 100% 8%, rgba(239, 178, 177, 0.2), transparent 13rem),
    linear-gradient(180deg, var(--jj-cream), var(--jj-ivory) 34%, #fffdf8);
}

.boda-card {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: clamp(1rem, 5cqw, 1.6rem);
  padding: clamp(32px, 8cqw, 52px) clamp(20px, 6cqw, 32px);
  background:
    radial-gradient(circle at 4% 4%, rgba(227, 183, 172, 0.2), transparent 12rem),
    radial-gradient(circle at 96% 38%, rgba(142, 156, 129, 0.13), transparent 14rem),
    linear-gradient(180deg, #fffdf8, var(--jj-ivory));
  border: 1px solid rgba(195, 187, 164, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.boda-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(142, 156, 129, 0.42);
  pointer-events: none;
}

.boda-title {
  max-width: 28ch;
  margin: 0 auto;
  color: var(--color-petroleo);
  font-family: "Great Vibes", cursive;
  /*font-size: clamp(1.7rem, 8cqw, 2.5rem);*/
  font-size: clamp(1.5rem, 10cqw, 2.6rem);
  line-height: 1.08;
}

.boda-subtitle {
  margin: -0.3rem 0 0;
  color: var(--color-petroleo-oscuro);
  font-family: "Bodoni Promise Italic", Georgia, serif;
  font-size: clamp(1.05rem, 4.8cqw, 1.35rem);
  font-style: italic;
  line-height: 1.42;
  text-shadow: 0 2px 10px rgba(77, 87, 52, 0.14);
}

.boda-dress-card {
  width: min(100%, 310px);
  display: grid;
  justify-items: center;
  gap: 0.72rem;
  margin-top: 0.2rem;
  padding: clamp(4.4rem, 18cqw, 5.8rem) clamp(1.25rem, 6cqw, 1.8rem) clamp(1.5rem, 7cqw, 2rem);
  color: var(--color-blanco-suave);
  background:
    linear-gradient(180deg, #758259, var(--jj-eucalyptus) 58%, #566036);
  border: 1px solid rgba(195, 187, 164, 0.64);
  border-radius: 999px 999px 12px 12px;
  box-shadow:
    0 24px 54px rgba(77, 87, 52, 0.24),
    inset 0 0 0 1px rgba(247, 243, 234, 0.12);
}

.boda-dress-icon {
  width: clamp(54px, 17cqw, 78px);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.18));
}

.boda-dress-line {
  display: block;
  max-width: 100%;
  margin: 0;
  color: var(--color-blanco-suave);
  font-size: clamp(0.8rem, 3.4cqw, 1rem);
  text-align: center;
  white-space: normal;
}

.boda-dress-line strong {
  font-weight: 700;
  font-size: clamp(1.05rem, 4.3cqw, 1.35rem);
}

.boda-dress-line span {
  display: block;
  color: var(--color-blanco-suave);
  font-family: "Bodoni Promise Italic", Georgia, serif;
  font-style: italic;
  line-height: 1.42;
  font-size: clamp(1.05rem, 4.8cqw, 1.35rem);
}

.boda-note {
  max-width: 24ch;
  margin: 0.4rem 0 0;
  color: var(--color-blanco-suave);
  font-family: "Mrs Eaves Small Caps", "Cinzel", serif;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  line-height: 1.28;
}

#boda .boda-gifts {
  width: 100%;
  max-width: 100%;
  display: grid;
  justify-items: center;
  gap: clamp(0.72rem, 3.6cqw, 1.1rem);
  margin-top: clamp(1.25rem, 6cqw, 2rem);
  text-align: center;
}

#boda .boda-gifts-title {
  max-width: 28ch;
  margin: 0 auto;
  color: var(--color-petroleo);
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.5rem, 10cqw, 2.6rem);
  line-height: 1.08;
}

#boda .boda-gifts-intro,
#boda .boda-gift-event {
  max-width: 31ch;
  margin: 0;
  /*color: #8a744f;*/
   color: var(--color-texto);
  /*font-family: "Mrs Eaves Small Caps", "Cinzel", serif;*/
  font-family: "Bodoni Promise Italic", Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: 0em;
  line-height: 1.34;
}

#boda .boda-gift-logo {
  width: min(72%, 220px);
  height: auto;
  display: block;
  margin-top: clamp(0.35rem, 2cqw, 0.7rem);
}

#boda .boda-gift-button {
  min-height: 42px;
  max-width: min(82%, 260px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.12rem auto clamp(0.55rem, 3cqw, 0.95rem);
  padding: clamp(0.55rem, 1.8cqw, 0.85rem) clamp(1rem, 4cqw, 1.8rem);
  color: var(--color-blanco-suave);
  background:
    linear-gradient(135deg, #748052, var(--jj-eucalyptus));
  border: 1px solid rgba(195, 187, 164, 0.9);
  border-radius: var(--radius);
  box-shadow:
    0 18px 36px rgba(77, 87, 52, 0.26),
    0 0 12px rgba(241, 227, 215, 0.52),
    inset 0 0 7px rgba(255, 255, 255, 0.22);
  font-size: clamp(0.78rem, 2.8cqw, 1rem);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

#boda .boda-gift-button:hover {
  background: linear-gradient(135deg, var(--jj-eucalyptus), #566036);
  transform: translateY(-2px);
  box-shadow:
    0 22px 44px rgba(77, 87, 52, 0.32),
    0 0 14px rgba(241, 227, 215, 0.52),
    inset 0 0 7px rgba(255, 255, 255, 0.22);
}

#boda .boda-reserved-card {
  width: min(100%, 310px);
  display: grid;
  justify-items: center;
  gap: clamp(0.25rem, 1.8cqw, 0.5rem);
  margin-top: clamp(1.15rem, 5cqw, 1.8rem);
  padding: clamp(4rem, 16cqw, 5.4rem) clamp(1.25rem, 6cqw, 1.8rem) clamp(1.6rem, 7cqw, 2.1rem);
  color: var(--color-hueso);
  background:
    linear-gradient(180deg, #758259, var(--jj-eucalyptus) 58%, #566036);
  border: 1px solid rgba(195, 187, 164, 0.64);
  border-radius: 999px 999px 12px 12px;
  box-shadow:
    0 24px 54px rgba(77, 87, 52, 0.24),
    inset 0 0 0 1px rgba(247, 243, 234, 0.12);
  text-align: center;
}

#boda .boda-reserved-text,
#boda .boda-reserved-number {
  margin: 0;
  color: var(--color-hueso);
  font-family: "Great Vibes", cursive;
  font-weight: 400;
}

#boda .boda-reserved-text {
  /*font-size: clamp(1.65rem, 8cqw, 2.35rem);*/
  font-size: clamp(1.5rem, 10cqw, 2.6rem);
  line-height: 1.08;
}

#boda .boda-reserved-number {
  font-size: clamp(5rem, 25cqw, 7.2rem);
  line-height: 0.82;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

#boda .boda-reserved-note {
  max-width: 24ch;
  margin: 0.4rem 0 0;
  color: var(--color-blanco-suave);
  font-family: "Mrs Eaves Small Caps", "Cinzel", serif;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  line-height: 1.28;
}

#boda .boda-confirm-block {
  width: 100%;
  max-width: 100%;
  display: grid;
  justify-items: center;
  gap: clamp(0.72rem, 3.6cqw, 1.1rem);
  margin-top: clamp(1.25rem, 6cqw, 2rem);
  text-align: center;
}

#boda .boda-confirm-logo {
  width: clamp(118px, 34cqw, 154px);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(77, 87, 52, 0.16));
}

#boda .boda-confirm-title {
  max-width: 28ch;
  margin: 0 auto;
  color: var(--color-petroleo);
  font-family: "Great Vibes", cursive;
  /*font-size: clamp(1.7rem, 8cqw, 2.5rem);*/
  font-size: clamp(1.7rem, 12cqw, 3.2rem);
  line-height: 1.08;
}

#boda .boda-confirm-text {
  max-width: 30ch;
  margin: 0;
  color: var(--color-texto);
  font-family: "Bodoni Promise Italic", Georgia, serif;
  font-size: clamp(1.05rem, 4.8cqw, 1.35rem);
  font-style: italic;
  line-height: 1.42;
  text-shadow: 0 2px 10px rgba(77, 87, 52, 0.14);
}

#boda .boda-confirm-button {
  margin-bottom: 0;
}

.wedding-time,
.event-time {
  color: var(--color-petroleo);
  font-weight: 600;
}

/* =========================================================
   EVENTOS, TRANSICION E ITINERARIO
========================================================= */
.event-section,
.timeline-section,
.dress-section,
.gifts-section,
.confirm-cta {
  padding: clamp(64px, 9vw, 110px) 0;
}

.reserved-confirm-section {
  display: grid;
  gap: clamp(28px, 5vw, 52px);
  padding: clamp(64px, 9vw, 110px) 0;
}

.reserved-confirm-section .reserved-section,
.reserved-confirm-section .confirm-cta {
  padding: 0;
}

.itinerario-vestimenta-section {
  position: relative;
  display: grid;
  gap: clamp(20px, 5vw, 58px);
  padding: clamp(64px, 9vw, 110px) 0 clamp(86px, 11vw, 132px);
}

.itinerario-vestimenta-section .timeline-section,
.itinerario-vestimenta-section .dress-section {
  padding: 0;
}

.event-card,
.gift-card {
  padding: clamp(28px, 5vw, 46px);
  background: var(--color-blanco-suave);
  border: 1px solid rgba(15, 63, 70, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.event-card--dark {
  color: var(--color-blanco-suave);
  background:
    linear-gradient(145deg, var(--color-petroleo), var(--color-petroleo-oscuro));
}

.event-card--dark h2,
.event-card--dark .section-kicker,
.event-card--dark .event-time {
  color: var(--color-blanco-suave);
}

.visual-break {
  position: relative;
  min-height: auto;
  display: block;
  padding: 0;
  color: var(--jj-text);
  text-align: center;
  background:
    linear-gradient(180deg, #fffdf8, var(--jj-ivory) 54%, var(--jj-cream));
}

.visual-break__photo-wrap {
  width: 100%;
  overflow: hidden;
  background: var(--jj-cream);
}

.visual-break__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.visual-break__copy {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  padding: clamp(2.6rem, 12cqw, 4rem) 1.5rem max(5.8rem, calc(env(safe-area-inset-bottom) + 5rem));
  background:
    radial-gradient(circle at 12% 18%, rgba(227, 183, 172, 0.24), transparent 10rem),
    radial-gradient(circle at 90% 82%, rgba(142, 156, 129, 0.16), transparent 11rem);
}

.visual-break p {
  width: min(32ch, 100%);
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 4.3rem);
  line-height: 1.15;
}

.visual-break .detalle-frase-principal {
  color: var(--jj-eucalyptus);
  font-family: "Great Vibes", cursive;
  text-transform: none;
}

.visual-break__divider {
  width: 154px;
  height: 68px;
  display: block;
  object-fit: cover;
  object-position: center 74%;
  opacity: 0.88;
  pointer-events: none;
}

.visual-break .wedding-scroll-indicator {
  bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + 1rem));
  color: var(--jj-eucalyptus);
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: rgba(255, 250, 243, 0.82);
  border: 1px solid rgba(201, 168, 106, 0.28);
  border-radius: var(--radius);
}

.timeline-list time {
  color: var(--color-petroleo);
  font-weight: 600;
}

#itinerario {
  position: relative;
}

#itinerario .timeline-list {
  gap: clamp(16px, 3vw, 24px);
}

#itinerario .itinerary-item {
  width: min(640px, 100%);
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(14px, 3vw, 24px);
}

#itinerario .itinerary-item--right {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr) auto;
  text-align: right;
}

#itinerario .itinerary-item--left {
  justify-self: start;
  text-align: left;
}

#itinerario .itinerary-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#itinerario .itinerary-copy > span {
  min-width: 0;
}

#itinerario .itinerary-icon-wrapper {
  width: clamp(58px, 14vw, 92px);
  height: clamp(58px, 14vw, 92px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 168, 106, 0.38);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 250, 243, 0.22), transparent 52%),
    rgba(247, 241, 232, 0.12);
  box-shadow:
    0 12px 28px rgba(8, 39, 45, 0.18),
    0 0 20px rgba(201, 168, 106, 0.12);
  flex: 0 0 auto;
}

#itinerario .itinerary-icon {
  width: 62%;
  height: 62%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(8, 39, 45, 0.18));
}

@media (prefers-reduced-motion: no-preference) {
  #itinerario .itinerary-item {
    opacity: 0;
    transition: opacity 700ms ease, transform 700ms ease;
  }

  #itinerario .itinerary-item--left {
    transform: translateX(-18px);
  }

  #itinerario .itinerary-item--right {
    transform: translateX(18px);
  }

  #itinerario.is-visible .itinerary-item {
    opacity: 1;
    transform: translateX(0);
  }

  #itinerario.is-visible .itinerary-item:nth-child(2) {
    transition-delay: 90ms;
  }

  #itinerario.is-visible .itinerary-item:nth-child(3) {
    transition-delay: 180ms;
  }

  #itinerario.is-visible .itinerary-item:nth-child(4) {
    transition-delay: 270ms;
  }

  #itinerario.is-exiting .itinerary-item {
    transition-delay: 0ms;
  }
}

.dress-grid {
  display: grid;
  gap: 5px;
  margin: 2px 0;
}

.dress-note {
  display: inline-block;
  margin: 8px 0 0;
  padding: 14px 18px;
  color: var(--color-petroleo-oscuro);
  background: rgba(201, 168, 106, 0.18);
  border: 1px solid rgba(201, 168, 106, 0.44);
  border-radius: var(--radius);
}

/* =========================================================
   REGALOS Y CIERRE
========================================================= */

.gift-card h3 {
  margin: 0 0 10px;
  color: var(--color-petroleo);
  font-size: 1.5rem;
}

.section-copy {
  max-width: 720px;
}

.reserved-card p {
  margin: 0;
  color: var(--color-petroleo-oscuro);
  font-size: clamp(1.4rem, 4vw, 3rem);
}

.reserved-card .reserved-note {
  margin-top: 0.75rem;
  color: var(--color-texto);
  font-size: clamp(0.78rem, 2.4vw, 0.95rem);
  letter-spacing: 0.02em;
  opacity: 0.72;
}

.reserved-card strong {
  color: var(--color-dorado);
}

.confirm-card img {
  width: min(520px, 92%);
  margin-bottom: 18px;
}

/* =========================================================
   CONTROL DE AUDIO DE FONDO
========================================================= */
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--color-blanco-suave);
  background: linear-gradient(145deg, #748052, var(--jj-eucalyptus));
  border: 1px solid rgba(195, 187, 164, 0.82);
  border-radius: 50%;
  box-shadow: 0 18px 34px rgba(77, 87, 52, 0.25);
  cursor: pointer;
}

.music-toggle.is-playing .music-toggle__icon {
  animation: musicPulse 1.6s ease-in-out infinite;
}

/* =========================================================
   CONFIRMACION RSVP
   Estilos exclusivos de confirmar.hbs. El panel administrativo no
   comparte estas clases, por lo que no hereda la linea grafica de boda.
========================================================= */
.wedding-confirmation {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 72px) 16px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.86), rgba(247, 243, 234, 0.94)),
    url("/images/wedding/jj_floral_frame.png") center / cover no-repeat,
    var(--jj-cream);
}

.confirmation-shell {
  width: min(430px, 100%);
}

.confirmation-logo {
  width: 146px;
  filter: drop-shadow(0 14px 20px rgba(77, 87, 52, 0.2));
}

.mensaje,
.confirmado,
.confirmation-thanks {
  color: var(--color-texto);
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.acciones button {
  min-height: 48px;
  padding: 13px 24px;
  color: var(--color-blanco-suave);
  background: linear-gradient(135deg, #748052, var(--jj-eucalyptus));
  border: 1px solid rgba(195, 187, 164, 0.84);
  border-radius: var(--radius);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 220ms ease, opacity 220ms ease;
}

.acciones button:hover {
  transform: translateY(-2px);
}

.acciones button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.acciones .btn-no {
  color: var(--color-petroleo-oscuro);
  background: rgba(255, 253, 248, 0.86);
  border-color: rgba(104, 114, 66, 0.34);
}

#formulario {
  margin-top: 30px;
}

.input-group {
  margin: 0 auto 18px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-petroleo);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nombre-invitado {
  margin: 0;
  padding: 14px 16px;
  color: var(--color-petroleo-oscuro);
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(195, 187, 164, 0.5);
  border-radius: var(--radius);
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--color-texto);
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(104, 114, 66, 0.28);
  border-radius: var(--radius);
  resize: vertical;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: rgba(104, 114, 66, 0.74);
  box-shadow: 0 0 0 4px rgba(142, 156, 129, 0.18);
  outline: none;
}

.allergy-options {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.input-group .allergy-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 10px 14px;
  color: var(--color-petroleo);
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(104, 114, 66, 0.26);
  border-radius: var(--radius);
  cursor: pointer;
}

.allergy-option input {
  width: auto;
  margin: 0;
  accent-color: var(--color-petroleo);
}

.allergy-option span {
  line-height: 1;
}

.allergy-detail {
  margin-top: 14px;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: #786b5a;
  font-size: 0.78rem;
}

.button-loader {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255, 250, 243, 0.42);
  border-top-color: var(--color-blanco-suave);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

button.is-loading .button-loader {
  display: inline-block;
}

/* =========================================================
   ANIMACIONES Y RESPONSIVE
========================================================= */
@keyframes weddingFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sealPulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes erLogoReveal {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes weddingScrollFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

@keyframes musicPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.14);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 760px) {
  .split-layout,
  .event-grid,
  .gift-grid,
  .parents-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

@media (min-width: 768px) {
  .intro {
    background:
      linear-gradient(rgba(8, 39, 45, 0.42), rgba(8, 39, 45, 0.38)),
      url("/images/wedding/fondo_completo.png") center bottom / cover no-repeat,
      var(--color-hueso);
  }
}

@media (max-width: 767px) {
  .intro {
    align-items: stretch;
    padding: 18px;
    background:
      linear-gradient(rgba(8, 39, 45, 0.01), rgba(8, 39, 45, 0.08)),
      url("/images/wedding/portada_er_2.png") center bottom / cover no-repeat,
      var(--color-hueso);
  }

  .intro::before {
    background:
      radial-gradient(circle at 50% 76%, rgba(255, 250, 243, 0.1), rgba(255, 250, 243, 0.03) 22rem, rgba(8, 39, 45, 0.02)),
      linear-gradient(180deg, rgba(255, 250, 243, 0.01), rgba(255, 250, 243, 0.08));
  }

  .intro-content {
    min-height: calc(100svh - 36px);
    justify-content: flex-start;
  }

  .intro-escudo,
  .intro-text {
    display: none;
  }

  .intro-guest-block {
    position: absolute;
    left: 0;
    right: 0;
    top: min(78%, calc(100% - 11rem));
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
    padding-bottom: max(1.6rem, env(safe-area-inset-bottom));
  }

  .intro-label {
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .intro {
    padding: 18px;
  }

  .intro::after {
    inset: 12px;
  }

  .wedding-hero {
    min-height: 94vh;
  }

  .photo-card {
    min-height: 320px;
  }

  .timeline-list li:not(.itinerary-item) {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #itinerario .itinerary-item {
    gap: 10px;
    padding: 14px 10px;
  }

  #itinerario .itinerary-icon-wrapper {
    width: clamp(50px, 16vw, 64px);
    height: clamp(50px, 16vw, 64px);
  }

  .acciones {
    flex-direction: column;
  }

  .acciones button,
  .wedding-button {
    width: 100%;
  }

  .music-toggle {
    right: 12px;
    bottom: 12px;
  }
}

/* =========================================================
   SHELL MOVIL CENTRADO PARA EXPERIENCIA PUBLICA
========================================================= */
.wedding-page {
  width: min(100%, 430px);
  min-height: 100svh;
  margin-inline: auto;
  container-type: inline-size;
  background: var(--color-hueso);
}

@media (min-width: 768px) {
  .wedding-page {
    box-shadow: 0 0 44px rgba(77, 87, 52, 0.16);
  }

  .wedding-page .split-layout,
  .wedding-page .event-grid,
  .wedding-page .gift-grid,
  .wedding-page .parents-grid {
    grid-template-columns: 1fr;
  }
}

.intro {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  background: var(--color-hueso);
}

.intro-content {
  width: min(100%, 430px);
  min-height: 100svh;
  margin-inline: auto;
  display: block;
  background: var(--color-hueso);
}

.intro-guest-block {
  position: static;
  margin-top: 0;
}

/* =========================================================
   PROPORCIONES MOVILES DENTRO DE LA INVITACION PRINCIPAL
   Mantiene el layout tipo telefono aunque el navegador sea ancho.
========================================================= */
.wedding-page,
.wedding-page *,
.wedding-page *::before,
.wedding-page *::after {
  box-sizing: border-box;
}

.wedding-page {
  max-width: 430px;
  overflow-x: hidden;
}

.wedding-page > section,
.wedding-page .reserved-confirm-section {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.wedding-page img {
  max-width: 100%;
}

.wedding-page .section-inner {
  width: min(100% - 32px, var(--content-width));
  max-width: 100%;
}

.wedding-page .wedding-hero {
  min-height: 94svh;
}

.wedding-page .wedding-hero__content {
  width: calc(100% - 32px);
  max-width: 100%;
  gap: 12px;
  padding: 86px 0 116px;
}

.wedding-page .wedding-logo {
  width: clamp(118px, 35cqw, 160px);
}

.wedding-page h2,
.wedding-confirmation h2 {
  font-size: clamp(1.9rem, 10cqw, 2.85rem);

}

.wedding-page .wedding-hero h1 {
  max-width: 100%;
  font-size: clamp(3rem, 18cqw, 4.65rem);
  line-height: 0.98;
  text-wrap: balance;
}

.wedding-page .wedding-date {
  font-size: clamp(0.92rem, 4.2cqw, 1.1rem);
}

.wedding-page .wedding-guest {
  font-size: clamp(0.9rem, 3.8cqw, 1rem);
}

.wedding-page .countdown-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 2.8cqw, 12px);
}

.wedding-page .countdown-item {
  min-width: 0;
  min-height: clamp(68px, 20cqw, 88px);
  padding: clamp(12px, 3cqw, 18px) 6px;
}

.wedding-page .countdown-item span {
  font-size: clamp(1.25rem, 9cqw, 2.25rem);
}

.wedding-page .countdown-item small {
  font-size: clamp(0.5rem, 2.4cqw, 0.68rem);
}

.wedding-page .historia-section {
  min-height: 100svh;
  padding: 0;
}

.wedding-page .historia-countdown {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(0.24rem, 1.8cqw, 0.48rem);
}

.wedding-page .historia-countdown .countdown-item {
  min-height: auto;
  padding: 0;
}

.wedding-page .historia-countdown .countdown-item span {
  font-size: clamp(1.15rem, 7.4cqw, 2rem);
}

.wedding-page .historia-countdown .countdown-item small {
  font-size: clamp(0.54rem, 2.5cqw, 0.78rem);
}

.wedding-page .quote-section blockquote {
  font-size: clamp(1.45rem, 9cqw, 2.6rem);
}

.wedding-page .names-lockup {
  font-size: clamp(3.5rem, 18cqw, 5.4rem);
}

.wedding-page .visual-break {
  background-attachment: scroll;
}

.wedding-page .visual-break p {
  font-size: clamp(1.5rem, 9cqw, 2.6rem);
}

.wedding-page .photo-card {
  min-height: 320px;
}

.wedding-page .promise-card,
.wedding-page .dress-card,
.wedding-page .reserved-card,
.wedding-page .confirm-card {
  padding: clamp(28px, 8cqw, 44px) clamp(20px, 6cqw, 32px);
}

.wedding-page .reserved-card p {
  font-size: clamp(1.35rem, 8cqw, 2.25rem);
}

.wedding-page .reserved-card .reserved-note {
  font-size: clamp(0.78rem, 3.4cqw, 0.95rem);
}

.wedding-page .event-card,
.wedding-page .gift-card {
  padding: clamp(24px, 7cqw, 34px) clamp(18px, 5cqw, 28px);
}

.wedding-page .parents-grid,
.wedding-page .split-layout,
.wedding-page .event-grid,
.wedding-page .gift-grid {
  grid-template-columns: 1fr;
}

.wedding-page .acciones {
  flex-direction: column;
}

.wedding-page .acciones button,
.wedding-page .wedding-button {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .visual-break {
    background-attachment: scroll;
  }

  .intro-er-logo,
  .intro-guest-block {
    animation: none;
    opacity: 1;
    transform: none;
  }

  #promesa [data-reveal],
  #boda [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
