/* 1. Paleta y tipografías: cambia aquí los colores de toda la página */
:root {
  --papel: #f6f1e6;      /* crema de la hoja */
  --fondo: #a9b09a;      /* verde grisáceo que rodea la hoja en pantallas anchas */
  --champan: #f3e3c3;    /* color de la pantalla del pasaporte */
  --dorado: #b8935a;
  --verde: #5f6f52;
  --oliva: #4a5240;      /* texto principal, como en la referencia */
  --texto: #3a3a3a;
  color-scheme: only light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; font-weight: 300; color: var(--oliva); background: var(--fondo); line-height: 1.7; }
h2, h3 { font-family: 'Cormorant Garamond', serif; font-weight: 500; }
.script { font-family: 'Great Vibes', cursive; color: var(--dorado); }

/* 2. La hoja: una columna angosta y centrada (en celular ocupa todo el ancho) */
.invitacion { max-width: 520px; margin: 0 auto; background: var(--papel); overflow: hidden; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
.invitacion section { position: relative; padding: 56px 28px; text-align: center; }
.invitacion h2 { font-size: 1.9rem; color: var(--oliva); margin-bottom: 20px; }

/* 3. Hojas decorativas (el dibujo está en el <symbol id="rama"> del index.html) */
.rama { position: absolute; width: 190px; height: 190px; pointer-events: none; }
.esq-sup-izq { top: -52px; left: -74px; width: 140px; height: 140px; }
.esq-der { right: -78px; top: 52%; transform: scaleX(-1) rotate(35deg); width: 130px; height: 130px; }
.esq-inf-izq { left: -80px; bottom: -30px; transform: scaleY(-1) rotate(-20deg); width: 130px; height: 130px; }

/* 4. Frase bíblica */
.frase { padding-top: 110px; padding-bottom: 36px; }
.frase blockquote { max-width: 330px; margin: 0 auto; }
.frase p { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-style: italic; line-height: 1.55; color: var(--oliva); }
.frase cite { display: block; margin-top: 12px; font-style: normal; letter-spacing: 3px; text-transform: uppercase; font-size: .72rem; color: var(--verde); }

/* 5. Iniciales: R | F */
.iniciales { padding-top: 20px; padding-bottom: 28px; }
.monograma { display: flex; justify-content: center; align-items: center; gap: 22px;
  font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: clamp(4rem, 20vw, 5.6rem); line-height: 1; color: var(--oliva); }
.monograma i { width: 1px; height: .85em; background: var(--oliva); }   /* la rayita del medio */
.etiqueta { margin-top: 14px; font-family: 'Cormorant Garamond', serif; font-weight: 600; letter-spacing: .4em; margin-right: -.4em; text-transform: uppercase; font-size: .95rem; color: var(--verde); }

/* 6. Fotos: el borde rasgado y el papel que se levanta los crea script.js (sección 13 y sección 20 de este archivo) */
.invitacion figure { margin: 0; }
.invitacion figure img { display: block; width: 100%; height: auto; }
.foto-principal img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 60% center;  /* la foto es horizontal: recorte suave para no ampliarla de más */
  filter: contrast(1.06) saturate(1.1) sepia(.12);   /* un toque cálido y de contraste para acercarla a la paleta */
}
.foto-final img { aspect-ratio: 4 / 4.6; object-fit: cover;
}

/* 7. Padres */
.bendicion { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; line-height: 1.5; color: var(--oliva); margin-bottom: 28px; }
.familias { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.familia h3 { font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: .68rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--verde); margin-bottom: 8px; }
.familia p { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; line-height: 1.35; }

/* 8. Nombres y fecha grande */
.nombres-fecha { padding-top: 40px; }
.nombres { font-family: 'Great Vibes', cursive; font-size: clamp(3.4rem, 17vw, 4.8rem); line-height: 1.05; color: var(--oliva); margin: 6px 0 34px; }
.nombres .y { font-size: .7em; }
.fecha-grande .mes { letter-spacing: .5em; margin-right: -.5em; text-transform: uppercase; font-size: .85rem; border-top: 1px solid var(--oliva); border-bottom: 1px solid var(--oliva); padding: 6px 0; }
.fila-fecha { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 10px; }
.fila-fecha span { letter-spacing: 3px; text-transform: uppercase; font-size: .8rem; }
.fila-fecha b { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 4.2rem; line-height: 1; padding: 0 18px; }

/* 9. Ceremonia y recepción */
.lugares { display: grid; gap: 40px; padding-top: 30px; }
.lugar .hora { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; font-weight: 600; line-height: 1.2; }
.lugar h3 { font-size: .85rem; letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; font-family: 'Montserrat', sans-serif; font-weight: 400; color: var(--verde); margin: 4px 0 8px; }
.lugar p:last-of-type { font-size: .95rem; }
.boton { display: inline-block; margin-top: 16px; padding: 9px 26px; border: 1px solid var(--verde); background: var(--verde); color: #fff;
  text-decoration: none; border-radius: 30px; transition: .3s; cursor: pointer; font: inherit; font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; }
.boton:hover { background: transparent; color: var(--verde); }

/* 10. Itinerario: fondo de acuarela con borde rasgado arriba y abajo */
.invitacion .itinerario { margin: 20px 0; padding: 70px 28px;
  background:
    radial-gradient(ellipse at 18% 15%, rgba(143, 165, 117, .42), transparent 55%),
    radial-gradient(ellipse at 85% 45%, rgba(169, 176, 154, .55), transparent 60%),
    radial-gradient(ellipse at 25% 90%, rgba(127, 148, 104, .35), transparent 55%),
    #e4e6d6;
  clip-path: polygon(0.0% 1.3%, 3.6% 1.4%, 7.1% 0.8%, 10.7% 1.2%, 14.3% 0.1%, 17.9% 0.1%, 21.4% 0.5%, 25.0% 1.5%, 28.6% 0.9%, 32.1% 0.7%, 35.7% 1.3%, 39.3% 1.0%, 42.9% 0.7%, 46.4% 1.7%, 50.0% 1.5%, 53.6% 0.5%, 57.1% 1.3%, 60.7% 1.2%, 64.3% 1.9%, 67.9% 1.6%, 71.4% 0.6%, 75.0% 2.2%, 78.6% 0.3%, 82.1% 0.9%, 85.7% 1.7%, 89.3% 0.3%, 92.9% 1.1%, 96.4% 0.1%, 100.0% 1.5%, 100.0% 99.1%, 96.4% 99.5%, 92.9% 99.7%, 89.3% 98.2%, 85.7% 99.9%, 82.1% 98.8%, 78.6% 99.6%, 75.0% 98.4%, 71.4% 99.8%, 67.9% 99.0%, 64.3% 98.1%, 60.7% 99.7%, 57.1% 98.9%, 53.6% 99.6%, 50.0% 98.3%, 46.4% 99.9%, 42.9% 99.2%, 39.3% 98.0%, 35.7% 99.5%, 32.1% 99.8%, 28.6% 98.6%, 25.0% 99.7%, 21.4% 98.9%, 17.9% 99.9%, 14.3% 98.4%, 10.7% 99.6%, 7.1% 99.0%, 3.6% 99.8%, 0.0% 98.7%); }
.itinerario h2 { font-size: 1.1rem; font-family: 'Montserrat', sans-serif; font-weight: 400; letter-spacing: .25em; margin-right: -.25em; text-transform: uppercase; margin-bottom: 34px; }
.itinerario ul { list-style: none; display: grid; gap: 26px; max-width: 280px; margin: 0 auto; }
.itinerario li { display: flex; align-items: center; gap: 22px; text-align: left; }
.itinerario .ico { width: 46px; height: 46px; flex: none; color: var(--oliva); object-fit: contain; mix-blend-mode: multiply; }
.itinerario img.ico { transform: scale(1.7); filter: contrast(1.6) brightness(1.1); }  /* el dibujo de la iglesia trae mucho margen blanco */  /* multiply quita el fondo blanco del JPG */
.itinerario li b { display: block; font-weight: 400; font-size: .8rem; letter-spacing: 2px; }
.itinerario li span { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; }

/* 11. Cuenta regresiva */
.contador { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.caja { background: rgba(255, 255, 255, .7); border: 1px solid var(--verde); padding: 12px 10px; min-width: 68px; border-radius: 4px; font-size: .75rem; letter-spacing: 1px; text-transform: uppercase; }
.caja span { display: block; font-family: 'Cormorant Garamond', serif; font-size: 2rem; letter-spacing: 0; color: var(--verde); }

/* 12. Vestimenta y regalo */
.invitacion .detalle { padding-top: 24px; padding-bottom: 24px; }
.detalle h3 { font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: .8rem; letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; color: var(--verde); margin-bottom: 8px; }
.detalle p { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; line-height: 1.5; max-width: 340px; margin: 0 auto; }

/* 13. Confirmación de asistencia */
form { display: grid; gap: 14px; max-width: 340px; margin: 0 auto; }
input, select { padding: 12px; border: 1px solid #c9c6b8; border-radius: 4px; font: inherit; background: #fff; }

footer { padding: 40px 20px; text-align: center; background: var(--verde); }
footer .script { color: #fff; font-size: 2rem; }
footer .creditos { margin-top: 22px; font-size: .75rem; letter-spacing: 3px; text-transform: uppercase; color: rgba(255, 255, 255, .7); }

/* 14. Animación de aparición al hacer scroll */
.aparece { opacity: 0; transform: translateY(30px); transition: 1s; }
.aparece.visible { opacity: 1; transform: none; }

/* 15. Avión que vuela al hacer scroll (se dibuja en el lienzo; este div solo mide el tamaño) */
#avion { position: fixed; top: 0; left: 0; width: clamp(28px, 7vw, 50px); visibility: hidden; pointer-events: none; }
#avion img { width: 100%; height: auto; display: block; }

/* 16. Camino de guiones que deja el avión (oculto hasta que haces scroll) */
#estela { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .6s; }
#estela.volando { opacity: 1; }

/* 17. Pantalla de entrada: sobre cerrado + "Ver invitación" (el toque también arranca la música) */
body.bloqueado { overflow: hidden; }
#entrada { position: fixed; inset: 0; z-index: 100; border: 0; overflow: hidden; color: var(--oliva);
  background: linear-gradient(160deg, #f6efdc 0%, #e8ead8 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 56px; padding: 20px;
  cursor: pointer; touch-action: none; font: inherit; -webkit-tap-highlight-color: transparent;
  transition: opacity .9s ease, transform .9s ease; }
#entrada::before { content: ""; position: absolute; inset: 0; background: url("mapa.jpeg") center / cover no-repeat; opacity: .35; mix-blend-mode: multiply; pointer-events: none; }  /* el mapa del viaje, muy suave */
#entrada .r1 { top: -40px; left: -60px; }
#entrada .r2 { bottom: -40px; right: -60px; transform: rotate(180deg); }
#entrada.abierta { opacity: 0; transform: scale(1.04); pointer-events: none; }

/* El sobre: todo se mide con --w, así se adapta a cualquier pantalla */
.sobre { --w: min(78vw, 320px); position: relative; display: block; width: var(--w); height: calc(var(--w) * .68);
  margin-top: calc(var(--w) * .5); font-size: calc(var(--w) / 20); perspective: 900px; }
.sobre > span { position: absolute; display: block; }
.trasera { inset: 0; background: #6f7f5f; border-radius: 6px; box-shadow: 0 18px 40px rgba(60, 70, 50, .35); }

/* La carta asoma por arriba del sobre */
.carta { left: 7%; right: 7%; top: -50%; height: 78%; z-index: 1; background: #fbf8f1; border: 1px solid rgba(184, 147, 90, .6);
  border-radius: 4px; padding-top: 1.1em; text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  transition: transform .9s cubic-bezier(.2, .8, .2, 1) .45s; }
.carta span { display: block; }
.c-nombres { font-family: 'Great Vibes', cursive; font-size: 2.1em; line-height: 1.15; color: var(--oliva); }
.c-etiqueta { margin-top: .5em; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: .8em; letter-spacing: .4em; text-transform: uppercase; color: var(--verde); }
.c-fecha { margin-top: .5em; font-size: .62em; letter-spacing: .25em; text-transform: uppercase; color: var(--dorado); }

/* Frente con forma de "V" y solapa que la tapa */
.frente { inset: 0; z-index: 2; background: linear-gradient(180deg, #8a9a78, #7a8a68); border-radius: 6px;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); }
.solapa { left: 0; top: 0; width: 100%; height: 54%; z-index: 3; background: linear-gradient(180deg, #98a886, #879773);
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; }
.sello { left: 50%; top: 54%; width: 3.4em; height: 3.4em; margin: -1.7em 0 0 -1.7em; z-index: 4; border-radius: 50%;
  display: flex !important; align-items: center; justify-content: center; font-size: 1.1em; color: #fff7e2;
  background: radial-gradient(circle at 35% 30%, #e6c867, #b8935a 60%, #8e6c36); box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
  animation: latido 2.2s ease-in-out infinite; }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* Botón "Ver invitación" */
.ver { display: inline-block; padding: 14px 34px; border: 1px solid rgba(95, 111, 82, .6); border-radius: 40px; background: rgba(255, 255, 255, .45);
  font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; color: var(--verde); animation: pulso 2s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* Al tocar: se abre la solapa, sube la carta y desaparece el sello */
#entrada.abriendo { cursor: default; }
#entrada.abriendo .solapa { animation: abrirSolapa .8s ease forwards; }
#entrada.abriendo .carta { transform: translateY(-22%) scale(1.06); z-index: 5; }
#entrada.abriendo .sello { animation: none; opacity: 0; transform: scale(.4); transition: .4s; }
#entrada.abriendo .ver { animation: none; opacity: 0; transition: opacity .4s; }
@keyframes abrirSolapa {          /* el z-index baja a mitad del giro para que la solapa quede detrás de la carta */
  0%   { transform: rotateX(0deg);   z-index: 3; }
  50%  { transform: rotateX(90deg);  z-index: 3; }
  51%  { transform: rotateX(91deg);  z-index: 0; }
  100% { transform: rotateX(180deg); z-index: 0; }
}
/* =========================================================
   18. MEJORAS: fondo de acuarela y profundidad
   Pegar al FINAL de styles.css
   ========================================================= */

/* Fondo verde musgo tipo acuarela (se ve en computadora) */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 45% 38% at 10% 16%, rgba(205, 214, 188, .80), transparent 70%),
    radial-gradient(ellipse 40% 52% at 90% 10%, rgba(95, 111, 82, .65), transparent 70%),
    radial-gradient(ellipse 36% 42% at 4% 76%, rgba(90, 108, 76, .60), transparent 70%),
    radial-gradient(ellipse 48% 40% at 94% 68%, rgba(196, 206, 176, .75), transparent 70%),
    radial-gradient(ellipse 30% 26% at 22% 48%, rgba(127, 148, 104, .35), transparent 70%),
    radial-gradient(ellipse 65% 32% at 50% 106%, rgba(74, 88, 62, .55), transparent 70%),
    var(--fondo); }

/* Textura de papel y luz suave en la hoja */
.invitacion {
  background-color: var(--papel);
  background-image: 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 .45 0 0 0 0 .38 0 0 0 0 .25 0 0 0 .10 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 10px 30px rgba(35, 45, 28, .30), 0 30px 80px rgba(35, 45, 28, .35); }

/* En computadora: hoja separada de la mesa, con doble marco dorado */
@media (min-width: 600px) {
  .invitacion { margin: 40px auto; border-radius: 4px;
    box-shadow:
      0 0 0 1px rgba(184, 147, 90, .75),
      0 0 0 7px var(--papel),
      0 0 0 8px rgba(184, 147, 90, .55),
      0 14px 30px 8px rgba(35, 45, 28, .28),
      0 40px 90px 8px rgba(35, 45, 28, .35); }
}

/* Adorno dorado bajo los títulos */
.invitacion h2::after { content: ""; display: block; width: 90px; height: 7px; margin: 12px auto 0;
  background:
    radial-gradient(circle, var(--dorado) 3px, transparent 3.5px) center / 7px 7px no-repeat,
    linear-gradient(90deg, transparent, var(--dorado) 35%, transparent 44%, transparent 56%, var(--dorado) 65%, transparent) center / 100% 1px no-repeat; }

/* Iniciales y fecha con toque dorado */
.monograma { text-shadow: 0 2px 0 rgba(255, 255, 255, .9), 0 6px 14px rgba(74, 82, 64, .22); }
.monograma i { width: 2px; background: linear-gradient(transparent, var(--dorado) 20%, var(--dorado) 80%, transparent); }
.nombres { text-shadow: 0 4px 12px rgba(74, 82, 64, .18); }
.fecha-grande .mes { border-color: var(--dorado); }
.fila-fecha b { color: #9a7840; border-left: 1px solid rgba(184, 147, 90, .6); border-right: 1px solid rgba(184, 147, 90, .6); }

/* Fotos con sombra siguiendo el borde rasgado */
.foto-principal { filter: drop-shadow(0 10px 10px rgba(50, 60, 40, .30)); }
.foto-final { filter: drop-shadow(0 -8px 10px rgba(50, 60, 40, .22)); }

/* Línea entre los padres */
.familia + .familia { border-left: 1px solid rgba(184, 147, 90, .55); padding-left: 16px; }

/* Ceremonia y recepción como tarjetas */
.lugares { gap: 28px; }
.lugar { padding: 30px 20px; background: linear-gradient(160deg, #fffdf8, #f8f2e4); border-radius: 10px;
  border: 1px solid rgba(184, 147, 90, .45);
  box-shadow: 0 2px 4px rgba(60, 70, 45, .08), 0 14px 30px rgba(60, 70, 45, .16);
  outline: 1px solid rgba(184, 147, 90, .35); outline-offset: -7px; }

/* Itinerario hundido en el papel */
.invitacion .itinerario { box-shadow: inset 0 14px 28px rgba(80, 95, 60, .20), inset 0 -14px 28px rgba(80, 95, 60, .20); }

/* Contador, botones y formulario con relieve */
.caja { background: linear-gradient(180deg, #fffefa, #f3eede); border-color: rgba(184, 147, 90, .6); border-radius: 8px;
  box-shadow: 0 8px 18px rgba(60, 70, 45, .16); }
.boton { background: linear-gradient(180deg, #6d7f5e, #55654a); box-shadow: 0 6px 14px rgba(60, 75, 45, .28); }
.boton:hover { background: linear-gradient(180deg, #7b8d6b, #61725a); color: #fff; transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(60, 75, 45, .32); }
input, select { border-color: rgba(184, 147, 90, .5); border-radius: 8px; box-shadow: inset 0 2px 5px rgba(60, 70, 45, .10); }
input:focus, select:focus { outline: 2px solid var(--verde); outline-offset: 1px; }

/* Pie de página */
footer { background: radial-gradient(ellipse at 50% 0%, #738563, #4c5a41 80%); border-top: 3px double var(--dorado); }

/* 19. La foto final se muestra completa, sin recorte */
.invitacion .foto-final img { aspect-ratio: auto; height: auto; }

/* =========================================================
   20. Papel que se levanta al hacer scroll
   La fibra blanca, las tiras de papel y su sombra viven aquí;
   el movimiento lo calcula script.js (sección 13).
   ========================================================= */
.invitacion figure { position: relative; }
.invitacion figure img { position: relative; z-index: 1; }

/* Capa blanca detrás de la foto: asoma por la orilla rasgada como la fibra del papel */
.fibra { position: absolute; inset: 0; z-index: 0; background: #fffefa; pointer-events: none; }

/* La tira que se levanta: el contenedor lleva la sombra y la inclinación, la hoja lleva la forma */
.pliegue { position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none; opacity: 0; will-change: transform, height; }
.pliegue.arriba { top: 0; transform-origin: 50% 0; }
.pliegue.abajo { bottom: 0; transform-origin: 50% 100%; }
.pliegue .hoja { width: 100%; height: 100%; }

/* Reverso del papel: blanco arriba, más oscuro hacia la orilla suelta (se nota el grosor), con un brillo en diagonal */
.pliegue.arriba .hoja {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, .7) 45%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, #fffefb 0%, #f4eee0 60%, #d8cfb8 100%); }
.pliegue.abajo .hoja {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, .7) 45%, rgba(255, 255, 255, 0) 72%),
    linear-gradient(180deg, #d8cfb8 0%, #f4eee0 40%, #fffefb 100%); }