/* ==========================================================================
   Invitación de boda · styles.css
   Paleta: Azul noche #14243D · Champagne #D6B77A · Marfil #F7F2E8
   Mobile-first · Breakpoints: 768px, 1024px
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --navy: #14243D;
  --navy-2: #1B2F4E;          /* variación para profundidad */
  --navy-ink: #0E1A2D;
  --champagne: #D6B77A;
  --champagne-soft: rgba(214, 183, 122, .35);
  --champagne-deep: #8A6A33;  /* champagne oscurecido: texto pequeño sobre marfil (contraste AA) */
  --ivory: #F7F2E8;
  --ivory-2: #FBF8F1;
  --ivory-muted: rgba(247, 242, 232, .78);
  --text: #14243D;
  --text-soft: #3E4B60;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(5rem, 11vw, 8.5rem);
  --tear-h: clamp(16px, 2.6vw, 34px);
  --radius: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --player-h: 88px;

  /* Textura de papel sutil (SVG en línea, funciona también al abrir con doble clic) */
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .45 0 0 0 0 .3 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE y Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.intro::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
html.is-locked, html.is-locked body { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 1rem + .4vw, 1.3rem);
  line-height: 1.6;
  color: var(--text);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, blockquote, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
main:focus { outline: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 1rem; left: 1rem; z-index: 200;
  padding: .75rem 1.25rem; background: var(--champagne); color: var(--navy);
  font-family: var(--font-sans); font-size: .9rem; text-decoration: none; border-radius: 999px;
  transform: translateY(-200%); transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: none; }

:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; }
.section--ivory :focus-visible { outline-color: var(--navy); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- 3. Superficies y bordes rasgados ---------- */
section { position: relative; }
.section--navy {
  background-color: var(--navy);
  color: var(--ivory);
}
.section--ivory {
  background-color: var(--ivory);
  background-image: var(--paper);
  color: var(--text);
}

/* El borde rasgado sube desde la sección y "muerde" a la anterior con perfecta continuidad de color */
.tear {
  position: absolute; left: 0; bottom: calc(100% - 1px);
  width: 100%; height: var(--tear-h);
  z-index: 3; pointer-events: none;
}
.tear--flip { transform: scaleX(-1); }
.tear--down { top: -1px; bottom: auto; transform: scaleY(-1); }
.tear--down.tear--flip { transform: scale(-1, -1); }
.section--ivory .tear { fill: var(--ivory); }
.section--navy .tear { fill: var(--navy); }
.photo-band .tear--down { fill: var(--ivory); }
.closing .tear--down { fill: var(--ivory); }

/* ---------- 4. Tipografía compartida ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: .78rem; font-weight: 400;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--champagne);
}
.eyebrow--deep { color: var(--champagne-deep); }

.title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem);
  line-height: 1.1; letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy);
}
.title--light { color: var(--ivory); }

.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.8rem, 2rem + 3.4vw, 4.6rem);
  line-height: 1.15;
  color: var(--navy);
  text-transform: none;
}
.script-title--light { color: var(--champagne); }

.num-script {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 1.28em;
  line-height: 1;
  display: inline-block;
  vertical-align: baseline;
  text-transform: none;
}

.label {
  font-family: var(--font-sans);
  font-size: .8rem; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--champagne-deep);
  margin-bottom: .5rem;
}
.label--light { color: var(--champagne); }

.ornament {
  display: block;
  width: min(190px, 55vw);
  height: auto;
  margin: 1.25rem auto;
  pointer-events: none;
}

.section-head { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head .eyebrow { margin-bottom: .9rem; }
.section-head .ornament { margin-bottom: 0; }

/* ---------- 5. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.6rem;
  font-family: var(--font-sans); font-size: .82rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  box-shadow: none;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: none; }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn img { width: 18px; height: 18px; }

.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; box-shadow: none; }
.btn--outline:hover { background: var(--navy); color: var(--ivory); box-shadow: none; }

.btn--solid { background: var(--navy); color: var(--ivory); box-shadow: none; }
.btn--solid svg { color: var(--champagne); }
.btn--solid:hover { background: var(--navy-ink); box-shadow: none; }

/* ---------- 6. Sello de cera y monograma ---------- */
.seal {
  position: relative; display: grid; place-items: center;
  width: 108px; height: 108px; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #F1DDB0 0%, var(--champagne) 38%, #B8955A 72%, #9C7A42 100%);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .08), inset 0 -6px 14px rgba(0, 0, 0, .25), 0 12px 26px -10px rgba(0, 0, 0, .55);
  /* contorno irregular de cera */
  clip-path: polygon(50% 0%, 61% 3%, 71% 2%, 79% 9%, 89% 13%, 93% 23%, 99% 33%, 98% 45%, 100% 55%, 96% 66%, 94% 77%, 85% 85%, 78% 94%, 66% 96%, 55% 100%, 44% 97%, 33% 99%, 24% 92%, 13% 88%, 8% 77%, 2% 67%, 3% 55%, 0% 44%, 4% 33%, 7% 22%, 15% 14%, 22% 6%, 33% 4%, 42% 1%);
}
.seal::before {
  content: ""; position: absolute; inset: 14%;
  border-radius: 50%; border: 1.5px solid rgba(90, 64, 25, .45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
.seal span {
  position: relative;
  font-family: var(--font-script); font-size: 1.9rem; line-height: 1;
  color: #6E5121; text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}
.seal--small { width: 74px; height: 74px; }
.seal--small span { font-size: 1.3rem; }

.monogram {
  display: flex; align-items: center; justify-content: center; gap: 1.1rem;
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem); line-height: 1;
  color: var(--champagne);
}
.monogram i { width: 1px; height: 1.1em; background: var(--champagne-soft); }

/* ---------- 7. Pantalla de bienvenida (Sobre de invitación realista) ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 1.5rem var(--gutter);
  background-color: var(--navy);
  background-image: var(--grain), radial-gradient(90% 70% at 50% 40%, var(--navy-2) 0%, var(--navy) 70%);
  color: var(--ivory); text-align: center;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition: opacity .9s var(--ease), visibility .9s var(--ease);
}
.intro::before {
  content: ""; position: absolute; inset: clamp(.9rem, 3vw, 1.75rem);
  border: 1px solid var(--champagne-soft); border-radius: 4px; pointer-events: none;
}
.intro.is-hidden { opacity: 0; visibility: hidden; }
.intro__inner {
  position: relative; display: grid; justify-items: center; gap: .75rem;
  width: 100%; max-width: min(540px, 94vw); margin: auto;
  text-align: center;
}
.intro__title {
  font-family: var(--font-script); font-weight: 400;
  font-size: clamp(2.8rem, 2rem + 3vw, 4.4rem); letter-spacing: .02em; text-transform: none;
  color: var(--ivory); line-height: 1.1;
  white-space: nowrap;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.intro__title em {
  font-family: var(--font-script); font-style: normal; text-transform: none;
  color: var(--champagne); letter-spacing: 0; padding-inline: .08em; font-weight: 400;
}
.intro__date { font-family: var(--font-sans); font-size: .85rem; letter-spacing: .35em; color: var(--ivory-muted); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.intro__note { font-family: var(--font-sans); font-size: .75rem; letter-spacing: .08em; color: var(--ivory-muted); margin-top: .4rem; }

/* Transición suave del texto al abrir el sobre */
.intro.is-opening .intro__title,
.intro.is-opening .eyebrow,
.intro.is-opening .intro__date,
.intro.is-opening .envelope__prompt--open-seal {
  opacity: 0;
  transform: translateY(-8px);
}

/* Escena y tarjeta de sobre en 3D (amplio y majestuoso) */
.envelope-scene {
  perspective: 1400px;
  width: min(440px, 92vw);
  height: clamp(250px, 52vw, 280px);
  margin: 1.8rem auto .6rem;
  position: relative;
}
.envelope {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform .4s var(--ease);
}
.envelope:hover {
  transform: translateY(-4px);
}

/* Fondo interior del sobre */
.envelope__back {
  position: absolute; inset: 0;
  background: #111F35;
  border-radius: 8px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .75), 0 0 0 1px rgba(214, 183, 122, .3);
  overflow: hidden;
  pointer-events: none;
}

/* Tarjeta interior (totalmente oculta dentro del sobre cuando está cerrado) */
.envelope__letter {
  position: absolute;
  left: 14px; right: 14px; bottom: 8px;
  height: clamp(235px, 49vw, 258px);
  background: #FCFAF5;
  background-image: var(--paper);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  padding: 10px;
  text-align: center;
  color: var(--navy);
  z-index: 2;
  transform: translate3d(0, 0, 0);
  transition: transform .85s cubic-bezier(.16, 1, .3, 1) .45s, z-index 0s .45s, box-shadow .85s var(--ease) .45s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  pointer-events: none;
}
.envelope__letter-border {
  border: 1px solid rgba(138, 106, 51, .5);
  outline: 1px solid rgba(138, 106, 51, .25);
  outline-offset: -5px;
  border-radius: 4px;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 14px; gap: 7px;
}
.envelope__letter-monogram {
  display: none;
}
.envelope__letter-script {
  font-family: var(--font-serif);
  font-size: .84rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--champagne-deep);
  margin: 0;
  font-weight: 600;
}
.envelope__letter-names {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.9rem, 2.3rem + 2vw, 3.8rem); /* Mantiene el tamaño actual solicitado */
  letter-spacing: 0;
  text-transform: none; /* No mayúscula sostenida, tipografía script */
  color: var(--navy);
  margin: 0;
  white-space: nowrap;
  line-height: 1.1;
}
.envelope__letter-names em {
  font-family: var(--font-script);
  font-style: normal;
  text-transform: none;
  color: var(--navy);
  letter-spacing: 0;
  padding-inline: .15em;
  font-weight: 400;
}
.envelope__letter-line {
  width: 44px; height: 1px;
  background: var(--champagne-deep); opacity: .5;
  margin: 3px 0;
}
.envelope__letter-sub {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--navy);
  max-width: 100%;
  line-height: 1.45;
  margin: 3px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.envelope__letter-sub span {
  display: block;
  white-space: nowrap;
}
.envelope__letter-date {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--navy);
  margin-top: 2px;
}
.envelope__letter-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 6px;
  padding: .35rem .95rem;
  background: var(--navy);
  color: var(--ivory);
  border: 1px solid var(--champagne);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.envelope__letter-cta svg {
  color: var(--champagne);
  transition: transform .2s var(--ease);
}
.envelope__letter-cta:hover {
  background: var(--navy-ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 36, 61, .35);
}
.envelope__letter-cta:hover svg {
  transform: translateX(2px);
}

/* Bolsillo frontal */
.envelope__front {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 -4px 10px rgba(0, 0, 0, .25));
}
.envelope__pocket-svg {
  width: 100%; height: 100%; display: block;
}

/* Solapa triangular superior (se abre 180° hacia arriba sin solaparse con la carta) */
.envelope__flap {
  position: absolute; top: 0; left: 0; width: 100%; height: 165px;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.4, 0, .2, 1), z-index 0s .3s;
  z-index: 5;
  pointer-events: none;
}
.envelope__flap-svg {
  width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .4));
}

/* Botón y sello de cera PNG (original sin letras) */
.envelope__seal-btn {
  position: absolute;
  top: 136px; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.seal-image {
  width: 76px; height: 76px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .58));
  transition: transform .3s var(--ease), filter .3s var(--ease);
  animation: seal-pulse 3s ease-in-out infinite;
}
.envelope:hover .seal-image,
.envelope__seal-btn:hover .seal-image {
  transform: scale(1.06);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .68));
}
@keyframes seal-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

/* Ramas botánicas doradas a los lados del sello (con respiro natural, elevadas armónicamente) */
.envelope__foliage {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 235px; height: 80px;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: -1;
}
.branch {
  width: 66px; height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45));
  opacity: .95;
  transition: transform .3s var(--ease);
}
.branch--left {
  transform: rotate(-10deg) translateY(-2px);
}
.branch--right {
  transform: rotate(10deg) translateY(-2px);
}
.envelope:hover .branch--left {
  transform: rotate(-15deg) translate(-3px, -2px);
}
.envelope:hover .branch--right {
  transform: rotate(15deg) translate(3px, -2px);
}

/* Estado ABIERTO tras el clic */
.envelope.is-open .envelope__flap {
  transform: rotateX(180deg);
  z-index: 1; /* Pasa detrás del sobre al abrirse hacia arriba */
  transition: transform .65s cubic-bezier(.4, 0, .2, 1), z-index 0s .25s;
}
.envelope.is-open .envelope__letter {
  transform: translate3d(0, -180px, 0);
  z-index: 10; /* La carta sale majestuosa después de que la solapa se abre */
  box-shadow: 0 28px 56px rgba(0, 0, 0, .68), 0 0 0 1px rgba(214, 183, 122, .55);
  pointer-events: auto;
  cursor: pointer;
}
.envelope.is-open .envelope__seal-btn {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.65);
  pointer-events: none;
}

/* Adaptación responsive del sobre y la tarjeta en mobile (20-30px de respiro sobre la margen dorada) */
@media (max-width: 600px) {
  .envelope-scene {
    width: min(312px, calc(100vw - 78px));
    height: 200px;
    margin: 1.2rem auto .4rem;
  }
  .envelope__flap {
    height: 126px;
  }
  .envelope__seal-btn {
    top: 104px;
  }
  .seal-image {
    width: 66px;
    height: 66px;
  }
  .envelope__foliage {
    width: 195px;
    height: 68px;
  }
  .branch {
    width: 54px;
    height: 66px;
  }
  .envelope__letter {
    left: 10px;
    right: 10px;
    bottom: 6px;
    height: 194px;
    padding: 7px;
  }
  .envelope__letter-border {
    padding: 9px 8px;
    gap: 4px;
  }
  .envelope__letter-script {
    font-size: .74rem;
    letter-spacing: .2em;
    font-weight: 600;
  }
  .envelope__letter-names {
    font-size: 2.45rem;
    line-height: 1.08;
  }
  .envelope__letter-line {
    width: 34px;
    margin: 2px 0;
  }
  .envelope__letter-sub {
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.38;
    letter-spacing: .04em;
    color: var(--navy);
    margin: 2px 0;
  }
  .envelope__letter-date {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .05em;
    color: var(--navy);
    margin-top: 2px;
  }
  .envelope.is-open .envelope__letter {
    transform: translate3d(0, -170px, 0);
  }
}

/* Indicación para tocar el sobre y acciones de avance */
.envelope__prompts {
  position: relative;
  min-height: 44px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: .4rem;
  text-align: center;
}
.envelope__prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-family: var(--font-sans);
  font-size: clamp(.7rem, .64rem + .2vw, .78rem);
  font-weight: 500;
  letter-spacing: clamp(.12em, .08em + .25vw, .2em);
  text-transform: uppercase;
  color: var(--champagne);
  animation: prompt-float 2.5s ease-in-out infinite;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  text-align: center;
  width: 100%;
  margin: 0 auto;
}
.envelope__prompt-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--champagne);
  box-shadow: 0 0 8px var(--champagne);
  margin: 0 auto 2px auto;
  display: block;
}
.envelope__prompt-text {
  display: block;
  white-space: nowrap;
  text-align: center;
  width: 100%;
}

.envelope__prompt-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  background: rgba(214, 183, 122, .12);
  color: var(--champagne);
  border: 1px solid var(--champagne);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), background .25s var(--ease);
}
.envelope__prompt-cta svg {
  color: var(--champagne);
  transition: transform .25s var(--ease);
}
.envelope__prompt-cta:hover {
  background: rgba(214, 183, 122, .24);
  transform: translateY(-1px);
}
.envelope__prompt-cta:hover svg {
  transform: translateX(3px);
}

/* Cuando se abre el sobre, ocultar el aviso del sello y mostrar el botón para ingresar */
.intro.is-opening .envelope__prompt--open-seal,
.is-opening .envelope__prompt--open-seal {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.intro.is-opening .envelope__prompt-cta {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: prompt-float 2.5s ease-in-out infinite;
}
@keyframes prompt-float {
  0%, 100% { transform: translateY(0); opacity: .9; }
  50% { transform: translateY(-3px); opacity: 1; }
}

@keyframes seal-breathe {
  0%, 100% { box-shadow: inset 0 0 0 6px rgba(255,255,255,.08), inset 0 -6px 14px rgba(0,0,0,.25), 0 12px 26px -10px rgba(0,0,0,.55), 0 0 0 0 rgba(214,183,122,.0); }
  50% { box-shadow: inset 0 0 0 6px rgba(255,255,255,.08), inset 0 -6px 14px rgba(0,0,0,.25), 0 12px 26px -10px rgba(0,0,0,.55), 0 0 0 14px rgba(214,183,122,.12); }
}

/* ---------- 8. Portada ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 6rem var(--gutter) 8rem;
  overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,36,61,.78) 0%, rgba(20,36,61,.45) 38%, rgba(20,36,61,.55) 62%, rgba(20,36,61,.95) 100%);
}
.hero__content { display: grid; justify-items: center; gap: 1rem; width: 100%; }
.hero__date { font-family: var(--font-sans); font-size: .8rem; letter-spacing: .38em; text-transform: uppercase; color: var(--ivory); }
.hero__title {
  display: block;
  text-align: center;
  margin: 0;
  line-height: 1.1;
  font-weight: 400;
  max-width: 100%;
}
.hero__names {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(0.35rem, 1.2vw, 0.8rem);
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.6rem, 2.4rem + 4.8vw, 6.8rem);
  letter-spacing: .02em;
  text-transform: none; /* No mayúscula sostenida, tipografía script como la referencia */
  color: var(--champagne);
  white-space: nowrap;
}
.hero__and {
  font-family: var(--font-script);
  font-size: .9em;
  text-transform: none;
  color: var(--ivory);
  letter-spacing: 0;
  margin: 0 .08em;
}
.hero__lead { font-family: var(--font-sans); font-size: .9rem; letter-spacing: .5em; text-transform: uppercase; color: var(--ivory); padding-left: .5em; }
.hero .ornament { margin: .25rem auto; }

.hero__scroll {
  position: absolute; left: 50%; bottom: calc(var(--player-h) + 1.25rem); transform: translateX(-50%);
  display: grid; justify-items: center; gap: .6rem;
  min-width: 44px; padding: .5rem;
  font-family: var(--font-sans); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ivory-muted); text-decoration: none;
  transition: color .25s var(--ease);
}
.hero__scroll:hover { color: var(--champagne); }
.hero__scroll-line { width: 1px; height: 44px; background: linear-gradient(var(--champagne), transparent); animation: scroll-line 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes scroll-line { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Entrada de la portada tras abrir la invitación */
.js [data-enter] { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js:not(.is-locked) [data-enter] { opacity: 1; transform: none; }
.js:not(.is-locked) [data-enter]:nth-child(2) { transition-delay: .15s; }
.js:not(.is-locked) [data-enter]:nth-child(3) { transition-delay: .35s; }
.js:not(.is-locked) [data-enter]:nth-child(4) { transition-delay: .5s; }

/* ---------- 9. Mensaje + padres ---------- */
.story { padding-block: var(--section-y); }
.story__grid { display: grid; gap: clamp(3rem, 7vw, 5rem); align-items: center; }
.story__text { text-align: center; }
.story__text .eyebrow { margin-bottom: .6rem; }

/* Composición de Polaroids intercaladas (álbum de bodas) */
.polaroid-stack {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 480px;
  height: 730px;
}

.polaroid {
  position: absolute;
  margin: 0;
  padding: 14px 14px 52px;
  background: var(--ivory-2);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(20, 36, 61, .08), 0 20px 36px -16px rgba(20, 36, 61, .38);
  border: 1px solid rgba(214, 183, 122, .25);
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 4.8;
  object-fit: cover;
  filter: grayscale(.85) contrast(1.04);
  transition: filter .35s var(--ease);
  display: block;
}
.polaroid:hover img {
  filter: grayscale(0) contrast(1);
}

.polaroid--1 {
  top: -30px;
  left: 0;
  width: 73%;
  transform: rotate(-5deg);
  z-index: 2;
}
.polaroid--1:hover {
  transform: rotate(-1.5deg) scale(1.03);
  z-index: 10;
  box-shadow: 0 24px 50px -12px rgba(20, 36, 61, .48);
}

.polaroid--2 {
  top: 165px;
  right: 0;
  width: 75%;
  transform: rotate(4.5deg);
  z-index: 3;
}
.polaroid--2:hover {
  transform: rotate(1deg) scale(1.03);
  z-index: 10;
  box-shadow: 0 24px 50px -12px rgba(20, 36, 61, .48);
}

.polaroid--3 {
  top: 360px;
  left: 20px;
  width: 73%;
  transform: rotate(-2.5deg);
  z-index: 4;
}
.polaroid--3:hover {
  transform: rotate(0deg) scale(1.03);
  z-index: 10;
  box-shadow: 0 24px 50px -12px rgba(20, 36, 61, .48);
}

@media (max-width: 1023px) {
  .story__text {
    order: 1;
  }
  .polaroid-stack {
    order: 2;
    margin-top: 40px;
    margin-bottom: 60px;
  }
}

@media (max-width: 767px) {
  .story__text {
    order: 1;
  }
  .polaroid-stack {
    order: 2;
    max-width: 340px;
    height: 540px;
    margin-inline: auto;
    margin-top: 40px;
    margin-bottom: 60px;
  }
  .polaroid {
    padding: 10px 10px 42px;
  }
  .polaroid--1 {
    width: 74%;
    top: 0;
    left: 0;
  }
  .polaroid--2 {
    width: 76%;
    top: 105px;
    right: 0;
  }
  .polaroid--3 {
    width: 74%;
    top: 225px;
    left: 16px;
  }
}

.verse p {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); line-height: 1.5;
  color: var(--text); max-width: 32rem; margin: 1.25rem auto 0;
}
.story__intro, .story__outro { color: var(--text-soft); max-width: 30rem; margin-inline: auto; }

.parents {
  display: grid; gap: 1.75rem; margin: 2.25rem auto; max-width: 34rem;
  padding: 2rem 1.5rem; border-block: 1px solid rgba(138,106,51,.28);
}
.parents__col p { font-size: 1.25rem; color: var(--navy); line-height: 1.45; }
.parents__divider { width: 40px; height: 1px; margin-inline: auto; background: rgba(138,106,51,.5); }

.children {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: .75rem;
}
.children__divider {
  display: block;
  width: 50px;
  height: 1px;
  margin: 0 auto 1.25rem;
  background: rgba(138, 106, 51, .35);
}
.children p {
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.45;
}

/* ---------- 10. Fecha + cuenta regresiva ---------- */
.date { padding-block: var(--section-y); text-align: center; }
.date__row { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 4vw, 2.5rem); }
.date__side {
  font-family: var(--font-sans); font-size: clamp(.85rem, .75rem + .4vw, 1.05rem);
  letter-spacing: .35em; text-transform: uppercase; color: var(--ivory);
  padding-block: .55rem; border-block: 1px solid var(--champagne-soft); min-width: 6.5rem;
}
.date__day {
  font-family: var(--font-script); font-weight: 400;
  font-size: clamp(6.5rem, 4.5rem + 9vw, 10.5rem); line-height: .9; color: var(--champagne);
  text-transform: none;
}
.date__weekday { margin-top: 1rem; color: var(--ivory-muted); font-style: italic; }

.countdown__title { margin-top: clamp(2.5rem, 6vw, 3.5rem); }
.countdown {
  display: flex; align-items: flex-start; justify-content: center;
  gap: clamp(.4rem, 2vw, 1.5rem); margin-top: 1.25rem;
}
.countdown__item { display: grid; justify-items: center; min-width: clamp(3.6rem, 14vw, 7rem); }
.countdown__num {
  font-family: var(--font-serif); font-weight: 400; font-variant-numeric: tabular-nums;
  font-size: clamp(2.4rem, 1.6rem + 3.5vw, 4.4rem); line-height: 1; color: var(--ivory);
}
.countdown__unit { margin-top: .5rem; font-family: var(--font-sans); font-size: clamp(.62rem, .55rem + .3vw, .78rem); letter-spacing: .22em; text-transform: uppercase; color: var(--champagne); }
.countdown__sep { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.4rem); line-height: 1; color: var(--champagne-soft); }

/* ---------- 11. Ceremonia y recepción (línea de tiempo) ---------- */
.events { padding-block: var(--section-y); }
.timeline { position: relative; display: grid; gap: 3rem; max-width: 34rem; margin-inline: auto; }
.timeline::before {
  content: ""; position: absolute; left: 31px; top: 32px; bottom: 32px; width: 1px;
  background: linear-gradient(var(--champagne-deep), rgba(138,106,51,.15));
}
.event { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 1.25rem; }
.event__icon {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--navy); box-shadow: 0 0 0 6px var(--ivory), 0 0 0 7px rgba(138,106,51,.35);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.event:hover .event__icon {
  transform: scale(1.05);
  box-shadow: 0 0 0 6px var(--ivory), 0 0 0 8px var(--champagne);
}
.event__icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform .3s var(--ease);
}
.event__title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.4rem, 1.9rem + 1.8vw, 3.4rem);
  letter-spacing: .01em;
  text-transform: none; /* Sin mayúsculas sostenidas */
  color: var(--navy);
  line-height: 1.15;
  margin: .2rem 0 .25rem;
}
.event__time {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, .95rem + .3vw, 1.25rem); /* Tamaño aprobado por el usuario */
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: none; /* Prohibido mayúsculas sostenidas */
  color: var(--champagne-deep);
  margin: 0 0 .75rem;
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
}
.event__time-label {
  font-size: .8em;
  font-weight: 500;
  text-transform: none;
  opacity: .92;
  letter-spacing: .04em;
}
.event__time-val {
  font-weight: 600;
}
.event__time small {
  font-size: .82em;
  letter-spacing: .04em;
  text-transform: lowercase;
}
.event__place {
  font-family: var(--font-serif); /* Restaurada tipografía original Playfair Display */
  font-size: 1.3rem; /* Más resaltada */
  font-weight: 600; /* Más resaltada */
  color: var(--navy); /* Alto contraste */
  line-height: 1.4;
}
.event__address {
  font-family: var(--font-serif); /* Restaurada tipografía original Playfair Display */
  font-size: 1.18rem; /* Más resaltada */
  font-weight: 500; /* Más resaltada */
  color: var(--navy); /* Alto contraste y nitidez en lugar de opaco */
  line-height: 1.45;
  margin: .35rem 0 1.35rem;
}

/* ---------- 12. Banda de foto / Sección Música ---------- */
.photo-band {
  position: relative;
  overflow: hidden;
  background: var(--navy);
}
.photo-band--music {
  min-height: clamp(520px, 68vw, 660px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5.5rem, 12vw, 7.5rem) var(--gutter);
}
.photo-band__media {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.photo-band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(.9) brightness(.85);
}
.photo-band__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(14, 25, 43, .45);
  pointer-events: none;
}
.photo-band .tear--down {
  top: -1px;
  bottom: auto;
  transform: scaleY(-1);
  fill: var(--ivory);
  z-index: 4;
}

/* Tarjeta flotante de música en la banda fotográfica */
.photo-band__wrap {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 580px;
  margin-inline: auto;
}
.music-card {
  background: rgba(20, 36, 61, .84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(214, 183, 122, .38);
  border-radius: 16px;
  padding: clamp(2.2rem, 5vw, 3.2rem) clamp(1.4rem, 4vw, 2.8rem);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, .58), 0 0 0 1px rgba(255, 255, 255, .04);
  text-align: center;
  color: var(--ivory);
}
.music-card .eyebrow {
  margin-bottom: 1.25rem;
}
.eyebrow--gold {
  color: var(--champagne);
}
.script-title--music {
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 2.6rem + 3vw, 4.6rem);
  line-height: 1.05;
  color: var(--champagne);
  margin: .4rem 0 0;
  text-transform: none;
}
.music-card__subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, .95rem + .3vw, 1.25rem);
  font-style: italic;
  color: var(--ivory);
  margin: .8rem auto 1.3rem;
  max-width: 24rem;
  line-height: 1.45;
}
.music-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: .4rem auto 1.4rem;
  filter: drop-shadow(0 6px 16px rgba(214, 183, 122, .35));
  transition: transform .35s var(--ease);
}
.music-card:hover .music-card__icon {
  transform: scale(1.05);
}
.music-card__prompt {
  font-family: var(--font-sans);
  font-size: clamp(.88rem, .82rem + .2vw, 1rem);
  color: var(--ivory-muted);
  line-height: 1.5;
  margin: 0 auto 1.6rem;
  max-width: 22rem;
}
.music-card__btn {
  background: var(--navy-ink);
  color: var(--ivory);
  border: 1px solid var(--champagne);
  padding: .85rem 2.2rem;
  box-shadow: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
}
.music-card__btn:hover {
  background: var(--navy-2);
  border-color: var(--champagne-deep);
  transform: translateY(-2px);
  box-shadow: none;
}

/* ---------- 13. Vestuario ---------- */
.dress { padding-block: var(--section-y); }
.dress__grid { display: grid; gap: 1.25rem; max-width: 46rem; margin-inline: auto; }
.dress__card {
  display: grid; justify-items: center; text-align: center; gap: .35rem;
  padding: 2.5rem 1.75rem;
  border: 1px solid var(--champagne-soft); border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.dress__card:hover { border-color: var(--champagne); transform: translateY(-3px); }
.dress__icon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid var(--champagne-soft);
  background: rgba(214, 183, 122, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.25rem;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.dress__card:hover .dress__icon {
  transform: scale(1.05);
  border-color: var(--champagne);
  background: rgba(214, 183, 122, 0.1);
}
.dress__icon img {
  width: auto;
  height: 60px;
  max-width: 66px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}
.dress__card p { font-size: 1.3rem; color: var(--ivory); }

.reserved { display: grid; justify-items: center; gap: 1.25rem; margin-top: 3rem; text-align: center; }
.reserved__text { color: var(--ivory-muted); max-width: 26rem; }
.reserved__text strong { color: var(--champagne); font-weight: 500; }
.swatches { display: flex; gap: 1rem; }
.swatch {
  position: relative; width: 52px; height: 52px; border-radius: 50%;
  box-shadow: 0 0 0 4px var(--navy), 0 0 0 5px var(--champagne-soft);
  overflow: hidden;
}
.swatch::after { /* línea diagonal: color no permitido */
  content: ""; position: absolute; left: 50%; top: -10%; width: 1.5px; height: 120%;
  background: var(--champagne); transform: translateX(-50%) rotate(45deg);
}
.swatch--blue { background: #183B82; }
.swatch--green { background: #4F7B57; }
.swatch--white { background: #FFFFFF; }

/* ---------- 14. Confirmación + lluvia de sobres ---------- */
.rsvp { padding-block: var(--section-y); }
.rsvp__grid { display: grid; gap: clamp(3rem, 7vw, 5rem); align-items: center; }
.rsvp__text { text-align: center; display: grid; justify-items: center; }
.rsvp__text .eyebrow { margin-bottom: .4rem; }
.rsvp__lead { color: var(--text-soft); max-width: 28rem; margin: .75rem 0 1.75rem; }
.rsvp__hint { margin-top: .9rem; font-family: var(--font-sans); font-size: .82rem; color: var(--text-soft); letter-spacing: .02em; }

.arch {
  justify-self: center; width: min(100%, 360px);
  padding: 10px; border: 1px solid rgba(138,106,51,.4);
  border-radius: 999px 999px 18px 18px;
}
.arch img { width: 100%; aspect-ratio: 3 / 4.2; object-fit: cover; border-radius: 999px 999px 10px 10px; }

.gift {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; text-align: left;
  margin-top: 3rem; padding: 1.75rem; max-width: 30rem;
  border: 1px solid rgba(138,106,51,.35); border-radius: var(--radius);
  background: rgba(255,255,255,.35);
}
.gift__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--navy); }
.gift__icon img { width: 30px; height: 30px; }
.gift__title { font-family: var(--font-serif); font-weight: 500; font-size: 1.6rem; color: var(--navy); line-height: 1.2; margin-bottom: .35rem; }
.gift p { color: var(--text-soft); font-size: 1.08rem; line-height: 1.5; }

/* ---------- 15. Cierre + pie ---------- */
.closing {
  position: relative;
  padding-top: var(--section-y);
  isolation: isolate;
  text-align: center;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.closing__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.closing__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.closing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20,36,61,.85) 0%, rgba(20,36,61,.65) 50%, rgba(20,36,61,.94) 100%);
}
.closing__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.closing__title { font-family: var(--font-script); font-weight: 400; font-size: clamp(2.4rem, 1.8rem + 3vw, 4rem); line-height: 1.2; text-transform: none; color: var(--ivory); max-width: 18ch; }
.closing__names { font-family: var(--font-script); font-size: clamp(2.4rem, 1.8rem + 2.2vw, 3.8rem); letter-spacing: .02em; text-transform: none; color: var(--champagne); }
.closing__names em { font-family: var(--font-script); font-style: normal; text-transform: none; padding-inline: .15em; }
.closing__date { font-family: var(--font-sans); font-size: .85rem; letter-spacing: .4em; color: var(--ivory-muted); }
.footer {
  padding: 1.5rem var(--gutter) calc(1.5rem + var(--player-h) + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(214,183,122,.18);
  background: transparent;
  position: relative;
  z-index: 2;
}
.footer p { font-family: var(--font-sans); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-muted); }

/* ---------- 16. Reproductor fijo ---------- */
.player {
  position: fixed; z-index: 90;
  left: 50%; bottom: calc(.75rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 1.5rem), 560px);
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .85rem;
  padding: .7rem .8rem .7rem .7rem;
  background: rgba(20, 36, 61, .9);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--champagne-soft); border-radius: 18px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6);
  color: var(--ivory);
}
.player__disc {
  position: relative; width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 2px var(--champagne-soft);
}
.player__disc img { width: 100%; height: 100%; object-fit: cover; }
.player__disc::after { content: ""; position: absolute; inset: 40%; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 2px var(--champagne-soft); }
.player.is-playing .player__disc { animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.player__info { min-width: 0; }
.player__title { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 500; line-height: 1.2; color: var(--champagne); }
.player__hint { font-family: var(--font-sans); font-size: .72rem; letter-spacing: .04em; color: var(--ivory-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__progress { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; margin-top: .3rem; }
.player__time { font-family: var(--font-sans); font-size: .68rem; font-variant-numeric: tabular-nums; color: var(--ivory-muted); }

.player__range {
  --progress: 0%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0;
  background: transparent; cursor: pointer;
}
.player__range::-webkit-slider-runnable-track {
  height: 3px; border-radius: 3px;
  background: linear-gradient(to right, var(--champagne) var(--progress), rgba(247,242,232,.22) var(--progress));
}
.player__range::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(247,242,232,.22); }
.player__range::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--champagne); }
.player__range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: var(--champagne); border: 0; }
.player__range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--champagne); border: 0; }

.player__play, .player__mute {
  display: grid; place-items: center; border: 0; cursor: pointer; border-radius: 50%;
  transition: transform .2s var(--ease), background-color .2s var(--ease), opacity .2s;
}
.player__play { width: 48px; height: 48px; background: var(--champagne); color: var(--navy); }
.player__play:hover { transform: scale(1.06); }
.player__play:active { transform: scale(.95); }
.player__play:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.player__play svg { width: 22px; height: 22px; }
.player__mute { width: 44px; height: 44px; background: transparent; color: var(--ivory); }
.player__mute:hover { background: rgba(247,242,232,.08); }
.player__mute svg { width: 22px; height: 22px; }

.player .i-pause, .player .i-muted { display: none; }
.player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: block; }
.player.is-muted .i-vol { display: none; }
.player.is-muted .i-muted { display: block; }

/* Animación del "sonando" en el botón */
.player.is-playing .player__play { box-shadow: 0 0 0 0 rgba(214,183,122,.5); animation: pulse 2.6s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(214,183,122,.45); } 70% { box-shadow: 0 0 0 12px rgba(214,183,122,0); } 100% { box-shadow: 0 0 0 0 rgba(214,183,122,0); } }

/* ---------- 16b. Modal de Sugerencias Musicales ---------- */
.music-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.music-modal::-webkit-scrollbar {
  display: none;
  width: 0;
}
.music-modal.is-active {
  opacity: 1;
  visibility: visible;
}
.music-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 30, .78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
}
.music-modal__container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
  margin: auto;
}
.music-modal__box {
  position: relative;
  background: var(--ivory);
  background-image: var(--paper);
  color: var(--text);
  border-radius: 16px;
  border: 1px solid rgba(214, 183, 122, .45);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .3);
  padding: clamp(1.8rem, 4vw, 2.8rem) clamp(1.2rem, 4vw, 2.2rem);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--champagne) transparent;
  transform: translateY(20px) scale(.98);
  transition: transform .35s var(--ease);
}
.music-modal.is-active .music-modal__box {
  transform: translateY(0) scale(1);
}
.music-modal__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ivory-2);
  border: 1px solid rgba(138, 106, 51, .25);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.music-modal__close:hover {
  background: var(--navy);
  color: var(--ivory);
  transform: scale(1.08);
}
.music-modal__header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding-right: 1.5rem;
}
.script-title--modal {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 1.8rem + 2vw, 3.2rem);
  color: var(--navy);
  line-height: 1.1;
  margin: .2rem 0;
  text-transform: none;
}
.music-modal__intro {
  font-family: var(--font-sans);
  font-size: .88rem;
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 28rem;
  margin: .4rem auto 0;
}

/* Formularios y campos */
.music-form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  text-align: left;
}
.form-label {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
}
.form-required {
  color: #B91C1C;
}
.form-optional {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-soft);
  text-transform: none;
  letter-spacing: 0;
}
.form-input {
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--text);
  background: #FFF;
  border: 1px solid rgba(138, 106, 51, .32);
  border-radius: 8px;
  padding: .7rem .95rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--champagne-deep);
  box-shadow: 0 0 0 3px rgba(214, 183, 122, .25);
}
.form-input.is-invalid {
  border-color: #B91C1C;
  background-color: #FEF2F2;
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A6A33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  background-size: 16px;
  padding-right: 2.2rem;
  cursor: pointer;
}
.form-error {
  font-family: var(--font-sans);
  font-size: .75rem;
  color: #B91C1C;
  min-height: 16px;
}

/* Tarjeta individual de canción */
.music-songs {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.song-card {
  background: var(--ivory-2);
  border: 1px solid rgba(138, 106, 51, .25);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  position: relative;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.song-card:hover {
  border-color: rgba(138, 106, 51, .45);
}
.song-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(138, 106, 51, .15);
  padding-bottom: .6rem;
}
.song-card__num {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--champagne-deep);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.song-card__remove {
  background: transparent;
  border: none;
  color: #991B1B;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  cursor: pointer;
  padding: .25rem .55rem;
  border-radius: 4px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.song-card__remove:hover {
  background: #FEE2E2;
}
.song-card__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
}
@media (min-width: 580px) {
  .song-card__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Barra de herramientas (agregar otra y contador) */
.music-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding-top: .4rem;
}
.music-add-btn {
  font-size: .78rem;
  padding: .55rem 1.1rem;
  border-color: var(--champagne-deep);
  color: var(--navy);
  cursor: pointer;
}
.music-add-btn:hover:not(:disabled) {
  background: var(--navy);
  color: var(--ivory);
}
.music-add-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.music-count-badge {
  font-family: var(--font-sans);
  font-size: .78rem;
  color: var(--text-soft);
  font-weight: 500;
}

/* Alertas de confirmación o error */
.form-alert {
  padding: .9rem 1.1rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: .88rem;
  line-height: 1.45;
  text-align: center;
}
.form-alert--success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.form-alert--error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* Botón de envío */
.music-submit-row {
  margin-top: .5rem;
  display: flex;
  justify-content: center;
}
.music-submit-btn {
  width: 100%;
  max-width: 320px;
  position: relative;
  padding: .9rem 1.8rem;
}
.music-submit-btn:disabled {
  opacity: .7;
  cursor: wait;
}
.music-submit-btn.is-loading .music-submit-btn__text {
  visibility: hidden;
}
.music-submit-btn__loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: var(--ivory);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.music-submit-btn.is-loading .music-submit-btn__loader {
  display: block;
}

/* ---------- 17. Aparición al hacer scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js .polaroid-stack[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .polaroid-stack[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 18. Tablet (≥ 768px) ---------- */
@media (min-width: 768px) {
  .parents { grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: 0; }
  .parents__divider { width: 1px; height: 64px; }

  .dress__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  /* Línea de tiempo horizontal: dos tarjetas lado a lado */
  .timeline { grid-template-columns: 1fr 1fr; max-width: none; gap: 2rem; }
  .timeline::before { left: 25%; right: 25%; top: 32px; bottom: auto; width: auto; height: 1px; background: rgba(138,106,51,.35); }
  .event { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1.5rem; }
}

/* ---------- 19. Escritorio (≥ 1024px) ---------- */
@media (min-width: 1024px) {
  .story__grid { grid-template-columns: 5fr 7fr; }
  .polaroid-stack { justify-self: start; order: 1; margin-top: 0; margin-bottom: 0; }
  .story__text { order: 2; }

  .rsvp__grid { grid-template-columns: 5fr 7fr; }
  .arch { justify-self: start; width: min(100%, 400px); }
}

/* ---------- 20. Móvil pequeño ---------- */
@media (max-width: 420px) {
  .player { gap: .6rem; padding: .6rem; }
  .player__disc { width: 44px; height: 44px; }
  .player__mute { width: 44px; }
  .date__side { min-width: 0; letter-spacing: .25em; }
}

/* ---------- 21. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-enter] { opacity: 1; transform: none; }
  .js .polaroid-stack[data-reveal] { transform: none; }
}
