/* =========================================================
   Invitación de Boda — Sofía & Mateo
   "Barro y Flores" · Valle de Guadalupe
   ========================================================= */

:root {
  /* palette (overridden per-theme via JS on .invite) */
  --bg:      #e9e0d2;
  --surface: #f7f1e6;
  --surface-2:#f1e8d8;
  --ink:     #3a3528;
  --ink-soft:#6b6149;
  --gold:    #c2a878;
  --clay:    #b0714a;
  --sage:    #8a9277;
  --line:    color-mix(in oklab, var(--ink) 18%, transparent);

  --serif:  "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon Script", "Cormorant Garamond", cursive;
  --label:  "Jost", system-ui, sans-serif;

  --maxw: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- App shell : centered column on a warm field ---- */
.stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in oklab, var(--bg) 70%, #fff 0%) 0%, var(--bg) 60%),
    var(--bg);
}

.invite {
  width: 100%;
  max-width: var(--maxw);
  background: var(--surface);
  color: var(--ink);
  position: relative;
  overflow: clip;
  box-shadow: 0 0 60px -20px rgba(0,0,0,.35);
  /* subtle paper grain */
  background-image:
    radial-gradient(rgba(0,0,0,.018) 1px, transparent 1px);
  background-size: 4px 4px;
}

/* ---------- typography helpers ---------- */
.eyebrow {
  font-family: var(--label);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--clay);
}
.script {
  font-family: var(--script);
  font-weight: 400;
  line-height: .95;
  color: var(--ink);
}
.serif-italic { font-style: italic; }

h2.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 9vw, 40px);
  line-height: 1.05;
  letter-spacing: .005em;
}

p.lead {
  font-size: clamp(17px, 4.6vw, 19px);
  line-height: 1.7;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---------- section frame ---------- */
.section {
  padding: clamp(56px, 14vw, 84px) clamp(26px, 7vw, 40px);
  position: relative;
  text-align: center;
}
.section--alt { background: var(--surface-2); }

/* hairline divider with a clay dot */
.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 0 auto;
  width: min(220px, 70%);
}
.divider::before, .divider::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--line));
}
.divider::after { background: linear-gradient(90deg, var(--line), transparent); }
.divider .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--clay); transform: rotate(45deg); }

/* ---------- the arch motif (clay / hacienda) ---------- */
.arch {
  position: relative;
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
  overflow: hidden;
  background: var(--surface-2);
}
.arch--framed {
  padding: 9px;
  background: linear-gradient(160deg, color-mix(in oklab, var(--gold) 35%, var(--surface)), var(--surface));
  border: 1px solid var(--line);
}
.arch--framed > .arch-inner {
  border-radius: 50% 50% 0 0 / 38% 38% 0 0;
  overflow: hidden;
  height: 100%;
}
.arch image-slot { width: 100%; height: 100%; display: block; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--label);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  transition: background .35s ease, color .35s ease, transform .2s ease;
}
.btn:hover { background: var(--ink); color: var(--surface); }
.btn--solid { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn--solid:hover { background: color-mix(in oklab, var(--clay) 82%, #000); transform: translateY(-1px); }
.btn--wa { background: #1f7a52; border-color: #1f7a52; color: #fff; }
.btn--wa:hover { background: #18613f; }

/* ============================================================
   HERO / PORTADA
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 30px 90px;
  position: relative;
  isolation: isolate;
}
.hero__eyebrow { margin-bottom: 26px; }
.hero__names {
  font-family: var(--script);
  font-size: clamp(64px, 23vw, 116px);
  line-height: .82;
  color: var(--ink);
}
.hero__amp { display: block; font-size: .42em; color: var(--clay); margin: 6px 0; }
.hero__names--serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(46px, 15vw, 78px);
  line-height: .98;
  letter-spacing: .01em;
}
.hero__names--serif .hero__amp { font-style: normal; font-size: .5em; }
.hero__sub {
  font-family: var(--label);
  font-size: 12px; letter-spacing: .35em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 28px;
}
.hero__date {
  font-size: clamp(19px, 5.4vw, 22px);
  letter-spacing: .04em;
  margin-top: 8px;
  color: var(--ink);
}

/* full-photo cover variant */
.hero--photo { color: #f7f1e6; }
.hero--photo .hero__names,
.hero--photo .hero__date { color: #fff; }
.hero--photo .eyebrow { color: color-mix(in oklab, var(--gold) 80%, #fff); }
.hero--photo .hero__sub { color: rgba(255,255,255,.85); }
.hero__photo-bg {
  position: absolute; inset: 0; z-index: -1;
}
.hero__photo-bg image-slot { width: 100%; height: 100%; display: block; }
.hero__photo-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,24,16,.35), rgba(30,24,16,.62));
  pointer-events: none;
}

/* arch cover variant */
.hero__arch {
  width: min(74%, 300px);
  aspect-ratio: 3/4.2;
  margin: 4px auto 30px;
}

/* scroll cue */
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: var(--label); font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero--photo .scroll-cue { color: rgba(255,255,255,.8); }
.scroll-cue .line { width: 1px; height: 34px; background: currentColor; animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(.4); opacity:.4 } 50% { transform: scaleY(1); opacity:1 } }

/* ============================================================
   VERSE / FRASE
   ============================================================ */
.verse { background: var(--ink); color: var(--surface); }
.verse .eyebrow { color: var(--gold); }
.verse__quote {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(23px, 6.6vw, 30px);
  line-height: 1.45; text-wrap: balance;
  margin: 22px auto; max-width: 22ch;
}
.verse__cite { font-family: var(--label); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: color-mix(in oklab, var(--surface) 65%, transparent); }

/* ============================================================
   COUNTDOWN
   ============================================================ */
.count {
  display: flex; justify-content: center; gap: clamp(10px, 4vw, 22px);
  margin-top: 30px;
}
.count__cell { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 58px; }
.count__num {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 13vw, 56px); line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.count__lbl { font-family: var(--label); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); }
.count__sep { font-family: var(--serif); font-size: clamp(30px,10vw,46px); color: var(--gold); align-self: flex-start; margin-top: 4px; }

/* ============================================================
   FAMILY / PADRES Y PADRINOS
   ============================================================ */
.family__parents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 6vw, 34px);
  margin-top: 44px;
}
.family__block { text-align: center; }
.family__role {
  font-family: var(--label); font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--clay); margin-bottom: 14px;
}
.family__names {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(18px, 5vw, 21px); line-height: 1.45; color: var(--ink);
}
.family__godparents { margin-top: 38px; display: flex; flex-direction: column; gap: 20px; }
.family__sub {
  font-family: var(--label); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 4px;
}
.family__god { display: flex; flex-direction: column; gap: 3px; }
.family__god-role {
  font-family: var(--label); font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--clay);
}
.family__god-names {
  font-family: var(--serif); font-size: clamp(18px, 4.8vw, 20px); color: var(--ink); font-weight: 500;
}

/* ============================================================
   VENUES / CEREMONIA & RECEPCIÓN
   ============================================================ */
.venues { display: flex; flex-direction: column; gap: 34px; margin-top: 40px; }
.venue {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 34px 26px 30px;
  position: relative;
}
.section--alt .venue { background: var(--surface); }
.venue__icon {
  width: 46px; height: 56px; margin: 0 auto 16px;
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  border: 1.5px solid var(--clay);
  position: relative;
}
.venue__icon::after { content:""; position:absolute; width:6px; height:6px; border-radius:50%; background:var(--clay); left:50%; top:46%; transform:translate(-50%,-50%); }
.venue__type { font-family: var(--label); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--clay); }
.venue__name { font-family: var(--serif); font-weight: 600; font-size: clamp(24px,6.5vw,28px); margin: 8px 0 4px; }
.venue__time { font-size: 17px; color: var(--ink-soft); margin-bottom: 4px; }
.venue__addr { font-size: 15px; color: var(--ink-soft); margin-bottom: 20px; line-height: 1.5; }

/* ============================================================
   GALLERY (Arreglo definitivo de proporciones)
   ============================================================ */
.gallery {
  margin-top: 40px;
  display: grid;
  /* Creamos 2 columnas iguales */
  grid-template-columns: 1fr 1fr;
  /* Creamos 3 filas: las dos primeras miden lo mismo (para las fotos de la derecha) 
     y la tercera se adapta a la foto horizontal de abajo */
  grid-template-rows: 1fr 1fr auto;
  gap: 12px;
}

.gallery image-slot { 
  width: 100%; 
  height: 100%; 
  display: block; 
}

.gallery .g-cell { 
  position: relative; 
  overflow: hidden; 
}

/* La foto alta de la izquierda abarca 2 filas de alto */
.gallery .g-tall { 
  grid-row: span 2; 
  aspect-ratio: 3/4; /* Controla la proporción de todo el bloque superior */
}

/* Las fotos de la derecha ya no llevan alturas raras en CSS, 
   automáticamente toman el tamaño cuadrado perfecto de la fila del Grid */
.gallery .g-wide { 
  aspect-ratio: auto; 
} 

/* La última foto horizontal se salta las columnas y se ubica en la tercera fila */
.gallery .g-full { 
  grid-column: 1 / -1; 
  aspect-ratio: 16/11; 
}

/* Ajuste manual de encuadre para la primera foto de la derecha (g2) */
.gallery .g-cell:nth-child(2) image-slot::part(img), 
.gallery .g-cell:nth-child(2) img {
  top: -5% !important;
}

/* ---- Tetris drop-in: cada pieza cae desde una dirección diferente y encaja al hacer scroll ---- */
.gallery .tetris {
  opacity: 0;
  /* Curva cubic-bezier modificada para un freno sutil y elegante al encajar */
  transition:
    opacity .5s ease,
    transform .9s cubic-bezier(.19, 1, .22, 1);
  will-change: transform, opacity;
}

/* --- ESTADOS INICIALES (Direcciones de las piezas antes del scroll) --- */

/* Pieza 1 (g-tall): Cae desde arriba con una ligera inclinación hacia la izquierda */
.gallery .tetris:nth-child(1) {
  transform: translateY(-160px) rotate(-8deg) scale(0.95);
}

/* Pieza 2 (g-wide): Entra desde el costado derecho con rotación horaria */
.gallery .tetris:nth-child(2) {
  transform: translateX(140px) rotate(12deg) scale(0.95);
}

/* Pieza 3 (g-wide): Entra desde el costado izquierdo con rotación antihoraria */
.gallery .tetris:nth-child(3) {
  transform: translateX(-140px) rotate(-12deg) scale(0.95);
}

/* Pieza 4 (g-full): Cae recta y pesada desde arriba para cerrar el bloque inferior */
.gallery .tetris:nth-child(4) {
  transform: translateY(-200px) scale(0.98);
}

/* --- ESTADO FINAL (Cuando entra en pantalla gracias al JS) --- */
.gallery .tetris.in {
  opacity: 1;
  transform: translateY(0) translateX(0) rotate(0deg) scale(1);
}

/* --- EFECTO CASCADA (Delays controlados al activarse) --- */
.gallery .tetris:nth-child(1).in { transition-delay: 0s; }
.gallery .tetris:nth-child(2).in { transition-delay: .18s; }
.gallery .tetris:nth-child(3).in { transition-delay: .36s; }
.gallery .tetris:nth-child(4).in { transition-delay: .54s; }

/* Eliminamos las reglas duplicadas anteriores que sobreescribían los costados */

/* ============================================================
   RSVP
   ============================================================ */
.rsvp { background: var(--ink); color: var(--surface); }
.rsvp .eyebrow { color: var(--gold); }
.rsvp .section-title { color: var(--surface); }
.rsvp p.lead { color: color-mix(in oklab, var(--surface) 78%, transparent); }
.form { max-width: 360px; margin: 34px auto 0; text-align: left; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-family: var(--label); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.field input, .field textarea, .field select {
  font-family: var(--serif); font-size: 17px;
  background: transparent; color: var(--surface);
  border: none; border-bottom: 1px solid color-mix(in oklab, var(--surface) 40%, transparent);
  padding: 8px 2px; outline: none;
  transition: border-color .3s ease;
}
.field textarea { resize: vertical; min-height: 64px; border: 1px solid color-mix(in oklab, var(--surface) 35%, transparent); border-radius: 3px; padding: 12px; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in oklab, var(--surface) 45%, transparent); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); }
.field select option { color: #222; }

.choice { display: flex; gap: 12px; }
.choice button {
  flex: 1; font-family: var(--label); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  padding: 14px 10px; cursor: pointer; border-radius: 3px;
  background: transparent; color: var(--surface);
  border: 1px solid color-mix(in oklab, var(--surface) 38%, transparent);
  transition: all .25s ease;
}
.choice button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.choice button.no[aria-pressed="true"] { background: var(--clay); border-color: var(--clay); color: #fff; }

.rsvp .btn--wa { width: 100%; justify-content: center; margin-top: 4px; }
.form__hint { font-family: var(--label); font-size: 10.5px; letter-spacing: .06em; color: color-mix(in oklab, var(--surface) 55%, transparent); text-align: center; line-height: 1.5; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { text-align: center; padding: clamp(60px,16vw,90px) 30px clamp(40px,10vw,56px); background: var(--surface-2); }
.foot__names { font-family: var(--script); font-size: clamp(52px,18vw,76px); color: var(--ink); line-height: .85; }
.foot__amp { color: var(--clay); }
.foot__date { font-family: var(--label); font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--ink-soft); margin-top: 22px; }
.foot__credit { font-family: var(--label); font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: color-mix(in oklab, var(--ink) 35%, transparent); margin-top: 40px; }

/* ============================================================
   MUSIC BUTTON
   ============================================================ */
.music-btn {
  position: fixed; z-index: 50;
  right: max(18px, calc(50vw - var(--maxw)/2 + 18px));
  bottom: 20px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.5);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .25s ease;
}
.music-btn:hover { transform: scale(1.06); }
.music-btn .ring { position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--clay); opacity: 0; }
.music-btn.playing .ring { animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity:.6 } 100% { transform: scale(1.5); opacity:0 } }
.eq { display: flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.eq span { width: 2.5px; background: var(--clay); height: 40%; border-radius: 1px; }
.music-btn.playing .eq span { animation: eq .9s ease-in-out infinite; }
.music-btn.playing .eq span:nth-child(2){ animation-delay:.25s } .music-btn.playing .eq span:nth-child(3){ animation-delay:.5s } .music-btn.playing .eq span:nth-child(4){ animation-delay:.15s }
@keyframes eq { 0%,100%{height:30%} 50%{height:100%} }
.music-btn .tri { width:0;height:0;border-style:solid;border-width:6px 0 6px 10px;border-color:transparent transparent transparent var(--ink); margin-left:2px; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1s cubic-bezier(.22,1,.36,1), transform 1s cubic-bezier(.22,1,.36,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .12s; }
[data-reveal-delay="2"] { transition-delay: .24s; }
[data-reveal-delay="3"] { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .scroll-cue .line, .music-btn .eq span { animation: none !important; }
}

/* placeholder caption styling for image-slot empty state is handled by component;
   give slots a warm empty bg via the inner frame */
image-slot { background: var(--surface-2); }

/* El truco maestro: movemos la imagen usando transformaciones físicas */
.gallery .g-cell:nth-child(2) image-slot {
  display: block;
}

/* Apuntamos a lo que sea que esté renderizando la imagen adentro */
.gallery .g-cell:nth-child(2) image-slot::part(image),
.gallery .g-cell:nth-child(2) image-slot::part(img),
.gallery .g-cell:nth-child(2) * {
  /* Mueve la imagen un 5% de su propio tamaño hacia arriba, 
     ganándole al "top: 50%" que le mete el componente */
  top: -5% !important;
}

/* Desactivar eventos de arrastre que bloquean el scroll en móviles */
image-slot {
  pointer-events: none !important;
  user-select: none !important;
}

/* ============================================================
   SECCIÓN DE BRANDING (GNZ INVITACIONES)
   ============================================================ */
.brand-section {
  background-color: #3a3528; /* Tono oscuro de fondo de tu imagen */
  margin: 50px -30px -56px -30px; /* Expande el fondo hasta los bordes del footer */
  padding: 40px 20px 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Línea delgada superior */
.brand-divider {
  width: 60px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  margin-bottom: 30px;
}

/* Logotipo circular */
.brand-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
}

/* Texto de llamado a la acción */
.brand-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 5.5vw, 24px);
  color: #e2e5ec;
  font-weight: 400;
  margin-bottom: 30px;
  letter-spacing: 0.02em;
}

/* Contenedor de botones alineados horizontalmente */
.brand-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
  max-width: 380px;
}

/* Botones con estilo de borde redondeado (píldora) */
.btn-brand {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px; /* Bordes completamente redondeados */
  color: #e2e5ec;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  pointer-events: auto !important; /* Asegura que el bloqueo táctil general no afecte los botones */
  transition: background 0.3s ease, border-color 0.3s ease;
}

.btn-brand:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-brand svg {
  opacity: 0.85;
}

/* ============================================================
   EFECTO DE APERTURA DE SOBRE (ENVELOPE SPLASH)
   ============================================================ */
.envelope-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}

/* Estilos comunes para ambas mitades del sobre */
.envelope-flap-top, 
.envelope-body-bottom {
  height: 50vh;
  width: 100vw;
  background-color: var(--surface); /* Se adapta a tu paleta (barro, crema, noche) */
  background-image: radial-gradient(rgba(0,0,0,.018) 1px, transparent 1px);
  background-size: 4px 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* --- MITAD SUPERIOR (Solapa triangular apuntando hacia abajo) --- */
.envelope-flap-top {
  align-items: flex-end;
  padding-bottom: 4vh;
  transform: translateY(0);
  /* Corta el fondo en forma de triángulo clásico de sobre */
  clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 50% 100%, 0% 85%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* --- MITAD INFERIOR (Cuerpo del sobre apuntando hacia arriba) --- */
.envelope-body-bottom {
  align-items: flex-start;
  padding-top: 6vh;
  transform: translateY(0);
  /* Corta el fondo para encajar simétricamente con la solapa */
  clip-path: polygon(0% 15%, 50% 0%, 100% 15%, 100% 100%, 0% 100%);
}

/* Contenido de textos dentro del sobre */
.flap-content-top,
.flap-content-bottom {
  text-align: center;
  width: 100%;
  max-width: var(--maxw);
}

.envelope-eyebrow {
  margin-bottom: 8px;
  color: var(--clay);
}

.envelope-names {
  font-family: var(--script);
  font-size: clamp(65px, 18vw, 90px);
  color: var(--ink);
  line-height: 0.9;
}

.envelope-date {
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
}

/* --- EL SELLO CENTRAL (Botón circular de cera) --- */
.envelope-seal-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--clay); /* Color acento de la invitación */
  border: 2px solid var(--surface);
  color: #fff;
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.envelope-seal-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

/* --- ANIMACIÓN DE APERTURA (Cuando dan clic) --- */
.envelope-open .envelope-flap-top {
  transform: translateY(-100svh); /* La solapa sube y sale de la pantalla */
}

.envelope-open .envelope-body-bottom {
  transform: translateY(100svh); /* El cuerpo baja y sale de la pantalla */
}

.envelope-open .envelope-seal-btn {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

.envelope-open {
  pointer-events: none; /* Permite clickear la invitación una vez abierto */
}

/* Bloqueo del scroll del contenido de fondo */
.invite.locked {
  height: 100vh;
  overflow: hidden !important;
}