/* ==========================================================
   Invitación · Esmeralda & Oro
   sobre con lacre → carta → foil dorado para rascar → invitación
   ========================================================== */

@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pinyon-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pinyon-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/cinzel-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/cinzel-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/cormorant-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/cormorant-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --esm-950: #061512;
  --esm-900: #0a211c;
  --esm-800: #0e2d26;
  --esm-700: #143c32;
  --esm-600: #1d5144;
  --oro: #c9a45c;
  --oro-claro: #ecd89b;
  --oro-oscuro: #8a6a2c;
  --marfil: #f8f2e7;
  --marfil-2: #efe5d3;
  --tinta: #1f312b;
  --tinta-suave: #66766e;

  --foil: linear-gradient(115deg, #8a6a2c 0%, #d6b56a 20%, #f7e8b6 34%, #c9a45c 50%, #8f6f30 66%, #e6cc86 84%, #a5823c 100%);

  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --caps: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;

  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibras: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .05' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .97 0 0 0 0 .9 0 0 0 .4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --forro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 1.5 22.5 12 12 22.5 1.5 12Z' fill='none' stroke='%23c9a45c' stroke-opacity='.5' stroke-width='.7'/%3E%3Cpath d='M12 7.5 16.5 12 12 16.5 7.5 12Z' fill='%23c9a45c' fill-opacity='.18'/%3E%3Ccircle cx='12' cy='12' r='1.1' fill='%23ecd89b' fill-opacity='.8'/%3E%3C/svg%3E");
  --terciopelo:
    radial-gradient(120% 70% at 50% 0%, rgba(43, 104, 88, .55) 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(3, 12, 10, .9) 0%, transparent 70%),
    radial-gradient(60% 50% at 10% 50%, rgba(3, 12, 10, .5) 0%, transparent 70%),
    radial-gradient(60% 50% at 90% 50%, rgba(3, 12, 10, .5) 0%, transparent 70%);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  background-color: var(--esm-800);
  background-image: var(--grano), var(--terciopelo);
  background-attachment: fixed;
  color: var(--tinta);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.bloqueado { overflow: hidden; height: 100vh; height: 100dvh; }

[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ==========================================================
   1. INTRO
   ========================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 6vh, 54px);
  padding: 24px 16px;
  background-color: var(--esm-800);
  background-image: var(--grano), var(--terciopelo);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(.3, .1, .2, 1);
}
.intro.saliendo { opacity: 0; transform: scale(1.08); pointer-events: none; }

.intro__titulo,
.intro__hint {
  margin: 0;
  font-family: var(--caps);
  font-size: clamp(.62rem, 2.6vw, .74rem);
  letter-spacing: .38em;
  text-transform: uppercase;
  text-align: center;
  color: var(--oro-claro);
  transition: opacity .6s ease;
}
.intro__titulo {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: .9;
  animation: subir 1.4s .2s cubic-bezier(.2, .7, .2, 1) both;
}
.intro__titulo::before,
.intro__titulo::after {
  content: "";
  width: clamp(18px, 7vw, 44px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro));
}
.intro__titulo::after { transform: scaleX(-1); }
.intro__hint { opacity: .7; animation: latido 2.6s 1.6s ease-in-out infinite both; }
.intro.abriendo .intro__titulo,
.intro.abriendo .intro__hint { opacity: 0; animation: none; }

@keyframes subir { from { opacity: 0; transform: translateY(14px); } }
@keyframes latido { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }

/* ---------- Sobre ---------- */
.sobre {
  position: relative;
  width: min(84vw, 400px);
  animation: aparecerSobre 1.3s cubic-bezier(.2, .8, .2, 1) both, flotar 6s 1.3s ease-in-out infinite;
}
.sobre::after {                       /* sombra suave sobre el terciopelo */
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -9%;
  height: 14%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
  filter: blur(6px);
  z-index: -1;
  animation: sombra 6s 1.3s ease-in-out infinite;
}
.intro.abriendo .sobre,
.intro.abriendo .sobre::after { animation-play-state: paused; }

@keyframes aparecerSobre { from { opacity: 0; transform: translateY(30px) rotate(-3deg) scale(.94); } }
@keyframes flotar { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-8px) rotate(.6deg); } }
@keyframes sombra { 0%, 100% { opacity: 1; transform: scaleX(1); } 50% { opacity: .7; transform: scaleX(.92); } }

.sobre__cuerpo {
  position: relative;
  aspect-ratio: 1.42;
  perspective: 1100px;
}

.sobre__forro {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 4px;
  background-color: var(--esm-700);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 45%), var(--forro);
  background-size: auto, 18px 18px;
}

.sobre__carta {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 5%;
  height: 90%;
  z-index: 2;
  border-radius: 3px;
  background-color: #fbf7ef;
  background-image: var(--grano), var(--fibras);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 20px -6px rgba(0, 0, 0, .35);
  transition: transform 1.25s cubic-bezier(.3, .85, .25, 1);
}
.carta__marco {
  position: absolute;
  inset: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 9%;
  gap: 4px;
  border: 1px solid rgba(201, 164, 92, .75);
  outline: 1px solid rgba(201, 164, 92, .35);
  outline-offset: -5px;
  text-align: center;
}
.carta__para {
  font-family: var(--caps);
  font-size: .58rem;
  letter-spacing: .45em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}
.carta__nombre {
  font-family: var(--script);
  font-size: clamp(1.6rem, 7.5vw, 2.2rem);
  line-height: 1.15;
  color: var(--tinta);
  padding: 0 8px;
}
.carta__linea { width: 42px; height: 1px; background: var(--oro); margin: 4px 0; }
.carta__sorpresa { font-style: italic; font-size: clamp(.8rem, 3.3vw, .95rem); color: var(--tinta-suave); }

.sobre__bolsillo {
  position: absolute;
  inset: 0;
  z-index: 3;
  filter: drop-shadow(0 -2px 3px rgba(40, 28, 8, .22));
}
.bolsillo__papel {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  background-color: var(--marfil);
  background-image: var(--grano), var(--fibras);
}
.bolsillo__pliegues { position: absolute; inset: 0; width: 100%; height: 100%; }

.sobre__solapa {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 57%;
  z-index: 4;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  transition: transform 1.05s cubic-bezier(.5, .05, .3, 1);
}
.solapa__cara {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.solapa__cara i {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 53% 96.5%, 50% 99.5%, 47% 96.5%);
}
.solapa__frente { filter: drop-shadow(0 4px 4px rgba(40, 28, 8, .25)); }
.solapa__frente i {
  background-color: #faf5ec;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 50%, rgba(90, 67, 32, .06)),
    var(--grano), var(--fibras);
}
/* Cara interior: su propio giro la voltea sobre su centro y el giro de la solapa la
   voltea otra vez, así que el triángulo se dibuja con la punta ARRIBA para que, ya
   abierta, quede apuntando hacia arriba y unida al borde del sobre. */
.solapa__dorso { transform: rotateX(180deg); }
.solapa__dorso::before {                 /* papel marfil del reverso */
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 100%, 100% 100%, 53% 3.5%, 50% .5%, 47% 3.5%);
  background-color: #f3ecdf;
  background-image: linear-gradient(0deg, rgba(90, 67, 32, .12), rgba(90, 67, 32, 0) 50%), var(--grano), var(--fibras);
}
.solapa__dorso i {                       /* forro esmeralda con patrón dorado */
  clip-path: polygon(5% 100%, 95% 100%, 52.2% 10%, 50% 7.5%, 47.8% 10%);
  background-color: var(--esm-700);
  background-image: linear-gradient(0deg, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0) 55%), var(--forro);
  background-size: auto, 18px 18px;
}

.sobre.abierto .sobre__solapa { transform: rotateX(180deg); }
.sobre.solapa-atras .sobre__solapa { z-index: 1; }
.sobre.carta-fuera .sobre__carta { transform: translateY(-58%); }

/* ---------- Sello de lacre ---------- */
.sello {
  all: unset;
  position: absolute;
  left: 50%;
  top: 56.5%;                             /* punta de la solapa (57% de alto) */
  width: 23%;
  aspect-ratio: 1;
  z-index: 5;
  transform: translate(-50%, -50%);
  cursor: pointer;
  border-radius: 50%;
}
.sello:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 6px; }
.sello__mitad {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 3px 3px rgba(30, 5, 10, .45)) drop-shadow(0 8px 12px rgba(0, 0, 0, .25));
  transition: transform 1.1s cubic-bezier(.45, 0, .7, 1), opacity .7s .45s ease;
}
.sello__mitad svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sello__mitad--izq { clip-path: polygon(-20% -20%, 52% -20%, 47% 22%, 56% 40%, 45% 58%, 54% 78%, 48% 120%, -20% 120%); }
.sello__mitad--der { clip-path: polygon(52% -20%, 120% -20%, 120% 120%, 48% 120%, 54% 78%, 45% 58%, 56% 40%, 47% 22%); }
.sello:hover .sello__mitad { transform: scale(1.04); transition-duration: .3s; }

.sello__pulso {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  border: 1px solid var(--oro-claro);
  opacity: 0;
  animation: pulso 2.4s 1.5s ease-out infinite;
}
@keyframes pulso {
  0%   { opacity: .8; transform: scale(.85); }
  100% { opacity: 0;  transform: scale(1.45); }
}

.sobre.roto .sello { pointer-events: none; outline: none; visibility: hidden; transition: visibility 0s 1.2s; }
.sobre.roto .sello__pulso { display: none; }
.sobre.roto .sello__mitad--izq { transform: translate(-55%, 190%) rotate(-48deg); opacity: 0; }
.sobre.roto .sello__mitad--der { transform: translate(60%, 175%) rotate(52deg); opacity: 0; }

/* ==========================================================
   2. INVITACIÓN
   ========================================================== */

.inv {
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
  background-color: var(--marfil);
  background-image: var(--grano), var(--fibras);
  box-shadow: 0 0 80px rgba(0, 0, 0, .45);
  overflow: hidden;
  animation: entrarInv 1.2s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes entrarInv { from { opacity: 0; transform: scale(.96); } }

/* Títulos comunes */
.titulo {
  margin: 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.3rem, 10vw, 3rem);
  line-height: 1.1;
  color: var(--tinta);
}
.ornamento { width: min(220px, 62%); height: auto; color: var(--oro); }
.ornamento path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ornamento.dibujado path,
.ornamento--mini.visible path { animation: trazar 1.8s cubic-bezier(.4, 0, .2, 1) forwards; }
.ornamento--mini { width: 130px; margin: 6px 0 4px; }
@keyframes trazar { to { stroke-dashoffset: 0; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.2svh, 22px);
  padding: calc(env(safe-area-inset-top) + 44px) 20px calc(env(safe-area-inset-bottom) + 56px);
  text-align: center;
}
.hero::before {                         /* marco fino dorado de la hoja */
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(201, 164, 92, .55);
  outline: 1px solid rgba(201, 164, 92, .25);
  outline-offset: -6px;
  pointer-events: none;
}

.idiomas {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 18px);
  right: 22px;
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--caps);
  font-size: .66rem;
  letter-spacing: .12em;
  color: var(--oro);
  z-index: 2;
}
.idioma {
  all: unset;
  cursor: pointer;
  min-width: 30px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b9ab8c;
  transition: color .3s;
}
.idioma.is-activo { color: var(--tinta); }
.idioma:focus-visible { outline: 1px solid var(--oro); outline-offset: 2px; }

.hero__rotulo { display: grid; place-items: center; }
.hero__pre,
.hero__post {
  grid-area: 1 / 1;
  margin: 0;
  transition: opacity .8s ease, transform .8s ease;
}
.hero__pre {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 4.2vw, 1.2rem);
  color: var(--tinta-suave);
}
.hero__post {
  font-family: var(--caps);
  font-size: clamp(.7rem, 3vw, .82rem);
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--oro-oscuro);
  opacity: 0;
  transform: translateY(6px);
}
.revelado .hero__pre  { opacity: 0; transform: translateY(-6px); }
.revelado .hero__post { opacity: 1; transform: none; transition-delay: .3s; }

/* Arco con foto + foil */
.arco {
  position: relative;
  height: min(44svh, 420px);
  aspect-ratio: 3 / 4;
  max-width: 72vw;
  flex: none;
  margin: 10px 0 6px;
}
.arco::before,
.arco::after {
  content: "";
  position: absolute;
  border-radius: 999px 999px 8px 8px;
  pointer-events: none;
}
.arco::before { inset: -9px; border: 1px solid var(--oro); }
.arco::after  { inset: -15px; border: 1px solid rgba(201, 164, 92, .4); }
.arco__ventana {
  position: absolute;
  inset: 0;
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  background: var(--esm-800);
  box-shadow: 0 22px 40px -20px rgba(10, 33, 28, .7);
  isolation: isolate;
}
.arco__foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  transform: scale(1.08);
  transition: transform 6s cubic-bezier(.2, .6, .2, 1);
}
.revelado .arco__foto { transform: scale(1); }
.arco__rasca {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  transition: opacity 1.1s ease;
}
.arco__rasca:active { cursor: grabbing; }
.arco__rasca:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: -6px; }
.arco__rasca.desvanecido { opacity: 0; pointer-events: none; }

.arco__dedo {
  position: absolute;
  width: 38px;
  left: 50%;
  bottom: 16%;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35));
  animation: dedo 2.6s ease-in-out infinite;
  transition: opacity .4s;
}
.arco__dedo.oculto { opacity: 0; animation-play-state: paused; }
@keyframes dedo {
  0%   { transform: translate(-130%, 0) rotate(-12deg); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: translate(40%, -18px) rotate(8deg); }
  85%  { opacity: 1; }
  100% { transform: translate(-130%, 0) rotate(-12deg); opacity: 0; }
}

.hero__pie {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.6svh, 14px);
}
.hero__rasca {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  white-space: nowrap;
  font-family: var(--caps);
  font-size: .68rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--oro-oscuro);
  animation: latido 2.4s ease-in-out infinite;
  transition: opacity .5s;
}
.revelado .hero__rasca { opacity: 0; animation: none; }

/* Nombres: dorado foil + efecto de "escritura" */
.nombres {
  margin: 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.7rem, 12.5vw, 3.6rem);
  line-height: 1.15;
  padding: 0 .2em;
}
.nombres__txt {
  display: inline-block;
  padding: .05em .15em .15em;
  background: var(--foil);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
  mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
  -webkit-mask-size: 260% 100%;
  mask-size: 260% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.amp { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: .7em; padding: 0 .06em; }
.revelado .nombres__txt {
  animation: escribir 2.4s .5s cubic-bezier(.45, .05, .35, 1) forwards, brillar 6s 3s linear infinite;
}
@keyframes escribir { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes brillar { to { background-position: -200% 0; } }

.fecha-bloque {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  width: min(300px, 82vw);
  font-family: var(--caps);
  color: var(--tinta);
  opacity: 0;
  transform: translateY(10px);
}
.revelado .fecha-bloque { animation: aparecer 1s 2.2s cubic-bezier(.2, .7, .2, 1) forwards; }
.fb__lado {
  padding: 7px 0;
  border-top: 1px solid var(--oro);
  border-bottom: 1px solid var(--oro);
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.fb__dia { font-size: 2.6rem; line-height: 1; font-weight: 500; }
.fb__anio { grid-column: 1 / -1; margin-top: 8px; font-size: .74rem; letter-spacing: .6em; padding-left: .6em; color: var(--tinta-suave); }

.desliza {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 24px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--caps);
  font-size: .58rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--oro-oscuro);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s 3.2s;
}
.desliza i {
  width: 1px;
  height: 30px;
  background: linear-gradient(var(--oro), transparent);
  animation: caer 2s ease-in-out infinite;
  transform-origin: top;
}
.revelado .desliza { opacity: 1; pointer-events: auto; }
@keyframes caer { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes aparecer { to { opacity: 1; transform: none; } }

/* ---------- Secciones ---------- */
.sec {
  position: relative;
  padding: 84px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.frase { padding-top: 96px; }
.frase__comillas { width: 34px; color: var(--oro); opacity: .8; margin-bottom: 18px; }
.frase__texto {
  margin: 0;
  max-width: 24em;
  font-style: italic;
  font-size: clamp(1.15rem, 4.8vw, 1.35rem);
  line-height: 1.65;
  color: var(--tinta);
}
.frase__firma { margin: 22px 0 0; font-family: var(--script); font-size: 1.9rem; color: var(--oro-oscuro); }

/* Bandas esmeralda */
.banda {
  position: relative;
  padding: 84px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--marfil);
  background-color: var(--esm-800);
  background-image: var(--grano), var(--terciopelo);
  overflow: hidden;
}
.banda::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(201, 164, 92, .45);
  pointer-events: none;
}
.banda__rotulo {
  margin: 0 0 26px;
  font-family: var(--caps);
  font-size: .72rem;
  letter-spacing: .55em;
  text-transform: uppercase;
  color: var(--oro-claro);
}

.cuenta { display: flex; gap: clamp(8px, 3vw, 14px); }
.cuenta__caja {
  width: clamp(62px, 18vw, 76px);
  padding: 14px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(201, 164, 92, .55);
  border-radius: 999px 999px 4px 4px;
  background: rgba(255, 255, 255, .03);
}
.cuenta__num {
  font-family: var(--caps);
  font-size: clamp(1.5rem, 6.6vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums lining-nums;
}
.cuenta__num.tic { animation: tic .45s ease; }
@keyframes tic { 0% { transform: translateY(-6px); opacity: .2; } 100% { transform: none; opacity: 1; } }
.cuenta__lbl {
  margin-top: 4px;
  font-family: var(--caps);
  font-size: .52rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(248, 242, 231, .7);
}
.cuenta-hoy { margin: 0; font-family: var(--script); font-size: 2.4rem; color: var(--oro-claro); }
.banda__fecha { margin: 26px 0 22px; font-style: italic; font-size: 1.15rem; color: rgba(248, 242, 231, .85); }

/* Botones */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 30px;
  border-radius: 999px;
  font-family: var(--caps);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s ease, background-color .3s, color .3s;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }
.btn--linea { border: 1px solid var(--oro); color: var(--oro-claro); }
.btn--linea:hover { background: rgba(201, 164, 92, .12); }
.btn--mini { min-height: 44px; padding: 0 22px; margin-top: 14px; border: 1px solid var(--oro); color: var(--oro-oscuro); font-size: .62rem; }
.btn--mini:hover { background: rgba(201, 164, 92, .1); }
.btn--oro {
  min-height: 54px;
  padding: 0 36px;
  background: var(--foil);
  background-size: 160% 100%;
  color: #2b1f08;
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn--oro::after {                       /* destello que recorre el botón */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: destello 3.6s 1s ease-in-out infinite;
}
@keyframes destello { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Itinerario */
.linea-tiempo {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  width: 100%;
}
.evento {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 96px;
}
.evento:last-child { padding-bottom: 0; }
.evento:not(:last-child)::after {        /* conector dorado entre eventos */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 1px;
  height: 58px;
  background: linear-gradient(transparent, var(--oro) 30%, var(--oro) 70%, transparent);
}
.evento:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 43px;
  width: 7px;
  height: 7px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--marfil);
  border: 1px solid var(--oro);
  z-index: 1;
}
.evento__icono {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--oro-oscuro);
  background: var(--marfil);
  border: 1px solid var(--oro);
  box-shadow: 0 0 0 6px var(--marfil), 0 0 0 7px rgba(201, 164, 92, .35);
  margin-bottom: 14px;
}
.evento__titulo {
  margin: 0;
  font-family: var(--caps);
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--tinta);
}
.evento__hora { margin: 6px 0 4px; font-family: var(--script); font-size: 2rem; line-height: 1.1; color: var(--oro-oscuro); }
.evento__lugar { margin: 0; font-weight: 600; font-size: 1.12rem; }
.evento__dir { margin: 2px 0 0; max-width: 18em; font-size: .98rem; color: var(--tinta-suave); }

/* Galería tipo collage de polaroids */
.galeria { padding-bottom: 96px; }
.collage {
  position: relative;
  width: min(100%, 400px);
  height: clamp(420px, 120vw, 520px);
  margin-top: 30px;
}
.polaroid {
  position: absolute;
  margin: 0;
  padding: 9px 9px 34px;
  background: #fffdf8;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .12), 0 18px 34px -16px rgba(20, 30, 25, .55);
  cursor: pointer;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .9s ease, box-shadow .4s;
}
.polaroid img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid::after {                      /* cinta adhesiva */
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 70px;
  height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(236, 216, 155, .55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.polaroid--1 { left: 0;   top: 0;     width: 56%; --r: -6deg; z-index: 1; }
.polaroid--2 { right: 0;  top: 12%;   width: 52%; --r: 5deg;  z-index: 2; }
.polaroid--3 { left: 20%; top: 46%;   width: 56%; --r: -2deg; z-index: 3; }
.polaroid--4 { right: 4%; top: 58%;   width: 44%; --r: 7deg;  z-index: 2; }
.polaroid.aparece { opacity: 0; transform: translateY(-40px) rotate(calc(var(--r) * 3)) scale(1.1); }
.polaroid.aparece.visible { opacity: 1; transform: rotate(var(--r)); }
.polaroid.al-frente { z-index: 10; transform: rotate(0) scale(1.06) !important; box-shadow: 0 4px 6px rgba(0, 0, 0, .15), 0 30px 50px -18px rgba(20, 30, 25, .7); }
.polaroid:focus-visible { outline: 2px solid var(--oro); outline-offset: 4px; }

/* Vestimenta */
.vestimenta__tipo { margin: 16px 0 6px; font-family: var(--caps); font-size: 1.25rem; letter-spacing: .4em; padding-left: .4em; color: var(--oro-oscuro); }
.paleta { list-style: none; display: flex; gap: 12px; margin: 18px 0; padding: 0; }
.paleta svg { display: block; width: 40px; height: 40px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2)); }
.paleta li { padding: 3px; border-radius: 50%; border: 1px solid rgba(201, 164, 92, .6); }
.vestimenta__nota { margin: 4px 0 0; max-width: 20em; font-style: italic; font-size: 1.05rem; color: var(--tinta-suave); }

/* RSVP sobre foto */
.banda--rsvp { padding: 110px 24px; min-height: 560px; justify-content: center; }
.banda__fondo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.7);
}
.banda--rsvp::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 33, 28, .55), rgba(6, 21, 18, .88)),
    radial-gradient(80% 60% at 50% 50%, transparent, rgba(6, 21, 18, .6));
}
.banda--rsvp::before { z-index: 2; }
.banda__contenido { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.rsvp__titulo {
  margin: 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(2.8rem, 12vw, 3.6rem);
  line-height: 1.15;
  padding: 0 .1em .1em;
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rsvp__texto { margin: 8px 0 30px; font-style: italic; font-size: 1.2rem; color: rgba(248, 242, 231, .9); }
.rsvp__antes { margin: 22px 0 0; font-size: .95rem; color: rgba(248, 242, 231, .75); }

/* Pie */
.pie {
  padding: 70px 24px calc(env(safe-area-inset-bottom) + 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pie__sello { width: 84px; height: 84px; overflow: visible; filter: drop-shadow(0 6px 8px rgba(40, 5, 12, .35)); }
.pie__gracias { margin: 18px 0 0; font-family: var(--caps); font-size: .7rem; letter-spacing: .5em; text-transform: uppercase; color: var(--tinta-suave); }
.pie__nombres { margin: 4px 0 0; font-family: var(--script); font-size: 2.4rem; color: var(--tinta); }
.pie__credito { margin: 28px 0 0; font-style: italic; font-size: .85rem; color: var(--tinta-suave); }
.pie__marca { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--oro); }

/* Aparición al hacer scroll */
.aparece { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.aparece.visible { opacity: 1; transform: none; }
.aparece.d1 { transition-delay: .15s; }
.aparece.d2 { transition-delay: .3s; }
.aparece.d3 { transition-delay: .45s; }

/* Botón de música */
.btn-musica {
  all: unset;
  position: fixed;
  right: max(16px, calc(50% - 260px + 16px));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 15;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 33, 28, .88);
  border: 1px solid var(--oro);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .6);
  cursor: pointer;
  animation: aparecer .6s ease both;
}
.btn-musica:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 3px; }
.ecualizador { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.ecualizador i { width: 3px; height: 30%; background: var(--oro-claro); border-radius: 2px; }
.btn-musica.sonando .ecualizador i { animation: barra .9s ease-in-out infinite alternate; }
.btn-musica.sonando .ecualizador i:nth-child(2) { animation-delay: -.3s; }
.btn-musica.sonando .ecualizador i:nth-child(3) { animation-delay: -.6s; }
.btn-musica.sonando .ecualizador i:nth-child(4) { animation-delay: -.15s; }
@keyframes barra { from { height: 20%; } to { height: 100%; } }

/* Partículas (polvo dorado, cera, confeti, pétalos) */
.particulas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  pointer-events: none;
}

/* Pantallas bajas */
@media (max-height: 640px) {
  .hero { gap: 6px; padding-top: 40px; }
  .arco { height: 38svh; }
  .nombres { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sobre, .sobre::after, .intro__hint, .sello__pulso, .arco__dedo, .hero__rasca, .btn--oro::after, .desliza i { animation: none !important; }
  .sobre__solapa, .sobre__carta, .sello__mitad { transition-duration: .4s; }
  .revelado .nombres__txt { animation: escribir .6s forwards; }
  .aparece { transition-duration: .3s; transform: none; }
}
