:root{
  --rose:#c98a8a;
  --rose-dark:#a9605f;
  --gold:#c9a24b;
  --cream:#fdf8f3;
  --ink:#4a3a35;
  --serif:'Playfair Display', serif;
  --script:'Great Vibes', cursive;
  --body:'Cormorant Garamond', serif;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:var(--body);
  background:var(--cream);
  color:var(--ink);
  overflow-x:hidden;
}

/* INTRO: sobre de invitación */
.intro{
  position:fixed; inset:0; z-index:100;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:radial-gradient(circle at 50% 40%, #5c3a3a 0%, #2e1c1c 100%);
  transition:opacity .9s ease, visibility .9s ease;
}
.intro.done{opacity:0; visibility:hidden; pointer-events:none}
body.intro-active{overflow:hidden}

.envelope-scene{perspective:1400px}
.envelope{
  position:relative; width:280px; height:190px; cursor:pointer;
  animation:envelope-invite 2.2s ease-in-out infinite;
}
.intro.opening .envelope{animation:none}
@keyframes envelope-invite{
  0%, 100%{ transform:translateY(0) scale(1); }
  50%{ transform:translateY(-6px) scale(1.02); }
}

.env-body{
  position:absolute; inset:0;
  background:linear-gradient(160deg, #f5e6d3, #e8cfa8);
  border-radius:6px;
  box-shadow:0 30px 60px rgba(0,0,0,.45);
}

.env-letter{
  position:absolute; left:8%; right:8%; top:14px; height:150px;
  background:#fffaf2; border-radius:4px;
  box-shadow:0 4px 14px rgba(0,0,0,.2);
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  transform:translateY(6px) scale(.85); opacity:0;
}
.intro.opening .env-letter{
  animation:letter-rise 1.1s ease-out forwards; animation-delay:1.65s;
}
.env-letter-script{font-family:var(--script); font-size:1.7rem; color:var(--rose-dark)}
.env-letter-sub{font-family:var(--body); font-size:.85rem; letter-spacing:.1em; text-transform:uppercase; color:var(--ink); opacity:.7}
@keyframes letter-rise{
  0%{transform:translateY(6px) scale(.85); opacity:0}
  60%{opacity:1}
  100%{transform:translateY(-64px) scale(1.04); opacity:1}
}

.env-flap{
  position:absolute; top:0; left:0; width:100%; height:96px;
  background:linear-gradient(160deg, #e8cfa8, #d4a373);
  clip-path:polygon(0 0, 100% 0, 50% 100%);
  transform-origin:top center;
  transform:rotateX(0deg);
  backface-visibility:hidden;
  box-shadow:0 6px 12px rgba(0,0,0,.15);
  z-index:2;
}
.intro.opening .env-flap{
  animation:flap-open .9s ease-in forwards; animation-delay:1.05s;
}
@keyframes flap-open{
  to{ transform:rotateX(-178deg); }
}

.env-seal{
  position:absolute; top:66px; left:50%; width:52px; height:52px; margin-left:-26px;
  border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #c9a24b, #8a6d3b);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--serif); font-weight:600; color:#3a2b1a; font-size:.95rem;
  box-shadow:0 3px 8px rgba(0,0,0,.35);
  z-index:3;
}
.intro.opening .env-seal{
  animation:seal-crack .5s ease-in forwards; animation-delay:.7s;
}
@keyframes seal-crack{
  0%{ transform:scale(1) rotate(0deg); opacity:1 }
  60%{ transform:scale(1.15) rotate(-8deg); opacity:1 }
  100%{ transform:scale(.4) rotate(25deg); opacity:0 }
}

.intro-hint{
  margin-top:1.6rem; color:#f2e6da; font-family:var(--body); font-size:.9rem;
  letter-spacing:.06em; opacity:.8; transition:opacity .4s ease;
}
.intro.opening .intro-hint{opacity:0}

.intro-skip{
  margin-top:1.2rem; background:none; border:1px solid rgba(255,255,255,.4);
  color:#f2e6da; font-family:var(--body); font-size:.85rem; letter-spacing:.08em;
  padding:.5rem 1.2rem; border-radius:30px; cursor:pointer; opacity:.75;
  transition:background .25s ease, opacity .25s ease;
  z-index:6;
}
.intro-skip:hover{background:rgba(255,255,255,.12); opacity:1}
/* durante el video, el botón flota abajo */
.intro.playing .intro-skip{position:fixed; bottom:24px; left:50%; transform:translateX(-50%); margin:0}

/* QUEMADO: el sobre se consume desde un punto con borde incandescente */
.intro.burning .envelope-scene{ animation:none; }
.intro.burning .envelope{
  animation:none;
  -webkit-mask:radial-gradient(circle at 60% 62%, #000 0, #000 var(--burn,0%), transparent calc(var(--burn,0%) + 9%));
  mask:radial-gradient(circle at 60% 62%, #000 0, #000 var(--burn,0%), transparent calc(var(--burn,0%) + 9%));
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  animation:burn-consume 1.6s ease-in forwards;
}
@keyframes burn-consume{
  0%{ --burn:150%; filter:none; }
  20%{ filter:sepia(.4) brightness(1.05); }
  100%{ --burn:0%; filter:sepia(.9) brightness(.5) contrast(1.2); }
}
/* anillo incandescente que sigue el borde que se consume */
.intro.burning .envelope::after{
  content:''; position:absolute; inset:-6%;
  -webkit-mask:radial-gradient(circle at 60% 62%, transparent 0, transparent var(--burn,0%), #000 calc(var(--burn,0%) + 2%), #000 calc(var(--burn,0%) + 7%), transparent calc(var(--burn,0%) + 11%));
  mask:radial-gradient(circle at 60% 62%, transparent 0, transparent var(--burn,0%), #000 calc(var(--burn,0%) + 2%), #000 calc(var(--burn,0%) + 7%), transparent calc(var(--burn,0%) + 11%));
  background:radial-gradient(circle at 60% 62%, #ffd24a, #ff7a18 40%, #b3231a 70%);
  filter:blur(3px); opacity:.95; pointer-events:none;
  animation:burn-consume 1.6s ease-in forwards;
}
/* @property permite animar --burn suavemente donde esté soportado; si no, salta pero funciona */
@property --burn{ syntax:'<percentage>'; inherits:true; initial-value:0%; }

/* BRASAS */
.embers{position:absolute; inset:0; pointer-events:none; z-index:4; overflow:visible}
.ember{
  position:absolute; bottom:46%; left:55%;
  width:5px; height:5px; border-radius:50%;
  background:radial-gradient(circle, #ffe08a, #ff7a18 60%, transparent);
  opacity:0;
}
.intro.burning .ember{ animation:ember-rise var(--dur,1.8s) ease-out forwards; animation-delay:var(--delay,0s); }
@keyframes ember-rise{
  0%{ transform:translate(0,0) scale(1); opacity:0; }
  15%{ opacity:1; }
  100%{ transform:translate(var(--dx,0), -220px) scale(.2); opacity:0; }
}

/* VIDEO FULLSCREEN */
.intro-video{
  position:fixed; inset:0; z-index:5; background:#000; overflow:hidden;
  opacity:0; visibility:hidden; transition:opacity .6s ease;
}
.intro.playing .intro-video{ opacity:1; visibility:visible; }
/* overscan: iframe agrandado y centrado para recortar cualquier resto de título/marca
   de YouTube que controls:0 no alcance a ocultar del todo (mismo truco que el video del home) */
.intro-video iframe{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:130%; height:130%; border:0; pointer-events:none;
}
.intro-play{
  position:absolute; z-index:2; left:50%; bottom:9vh; transform:translateX(-50%);
  border:1px solid rgba(255,255,255,.75); border-radius:30px;
  background:rgba(24,15,15,.72); color:#fff; padding:.75rem 1.25rem;
  font:600 1rem var(--body); letter-spacing:.04em; white-space:nowrap;
  cursor:pointer;
}
.intro-play[hidden]{display:none}

.intro-sound{
  position:absolute; z-index:6; right:20px; bottom:20px;
  border:1px solid rgba(255,255,255,.75); border-radius:30px;
  background:rgba(24,15,15,.72); color:#fff; padding:.65rem 1rem;
  font:600 .95rem var(--body); letter-spacing:.03em; cursor:pointer;
}
.intro-sound:hover{background:rgba(24,15,15,.9)}
.intro-sound[hidden]{display:none}
@media (max-width:440px){
  .intro-sound{right:12px; bottom:16px}
}
@media (max-width:760px){
  .intro-video iframe{ width:150%; height:150%; }
}
@media (max-width:440px){
  .intro-video iframe{ width:165%; height:165%; }
}

/* reveal on scroll */
.reveal{opacity:0; transform:translateY(24px); transition:opacity .9s ease, transform .9s ease}
.reveal.in{opacity:1; transform:translateY(0)}

/* HERO */
.hero{
  position:relative; min-height:100vh;
  display:flex; align-items:center; justify-content:center; text-align:center;
  background:
    linear-gradient(180deg, rgba(74,58,53,.35), rgba(74,58,53,.55)),
    url('images/portada/portada.jpg') center/cover no-repeat;
  color:#fff;
}
.hero-content{padding:1.5rem}
.hero-subtitle{
  font-family:var(--body); letter-spacing:.3em; text-transform:uppercase;
  font-size:.85rem; margin-bottom:1rem; opacity:.9;
}
.hero-names{
  font-family:var(--serif); font-weight:600;
  font-size:clamp(2.6rem, 8vw, 5.5rem);
  line-height:1.1;
}
.hero-names em{font-family:var(--script); font-style:normal; color:var(--gold); padding:0 .2em}
.hero-date{
  margin-top:1rem; font-size:1.3rem; letter-spacing:.2em;
}
.countdown{
  display:flex; gap:1.2rem; justify-content:center; margin-top:2rem;
}
.cd-item{
  border-radius:10px; padding:.7rem 1rem; min-width:64px;
}
.cd-item span{display:block; font-family:var(--serif); font-size:1.6rem}
.cd-item small{font-size:.7rem; letter-spacing:.15em; text-transform:uppercase; opacity:.85}
/* en el hero (fondo oscuro), el contador es translúcido claro */
.hero .cd-item{
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.35);
  backdrop-filter:blur(4px);
}
/* fuera del hero (fondo claro), el contador usa la paleta cálida del sitio */
.zoom-card .cd-item{
  background:#fff; border:1px solid #e5d4c4; box-shadow:0 6px 16px rgba(74,58,53,.08);
}
.zoom-card .cd-item span{color:var(--rose-dark)}
.zoom-card .cd-item small{color:var(--ink); opacity:.6}
.scroll-cue{
  display:inline-block; margin-top:2.5rem; color:#fff; text-decoration:none;
  font-size:.9rem; letter-spacing:.1em; opacity:.85; animation:bob 2s ease-in-out infinite;
}
@keyframes bob{50%{transform:translateY(6px)}}

/* El resto de la web permanece oculto hasta hacer click en "Descubre nuestra historia" */
.site-content{display:none}
.site-content.revealed{display:block; animation:content-fade-in .8s ease}
@keyframes content-fade-in{from{opacity:0} to{opacity:1}}

/* QUOTE */
.quote{
  text-align:center; padding:4rem 1.5rem; font-family:var(--script);
  font-size:clamp(1.6rem,4vw,2.4rem); color:var(--rose-dark);
}

/* SECTIONS */
.section{padding:5rem 1.5rem; text-align:center}
.section.alt{background:#f7ece4}
.section-title{
  font-family:var(--serif); font-size:clamp(1.8rem,4vw,2.6rem);
  margin-bottom:2.5rem; position:relative; display:inline-block;
}
.section-title::after{
  content:''; display:block; width:60px; height:2px; background:var(--gold);
  margin:.8rem auto 0;
}

/* CARDS */
.cards-grid{
  display:grid; gap:1.8rem; max-width:1000px; margin:0 auto;
  grid-template-columns:repeat(auto-fit, minmax(230px,1fr));
}
.card{
  background:#fff; border-radius:16px; padding:2.2rem 1.5rem;
  box-shadow:0 10px 30px rgba(74,58,53,.08);
  transition:transform .35s ease, box-shadow .35s ease;
}
.card:hover{transform:translateY(-8px); box-shadow:0 16px 36px rgba(74,58,53,.15)}
.card-icon{font-size:2.2rem; margin-bottom:.8rem}
.card h3{font-family:var(--serif); margin-bottom:.6rem; color:var(--rose-dark)}
.card-time{margin-top:.6rem; font-weight:600; color:var(--gold)}
.card-link{
  display:inline-block; margin-top:.8rem; color:var(--rose-dark); font-weight:600;
  text-decoration:none; border-bottom:1px solid currentColor;
}
.card-link:hover{color:var(--gold)}

/* VIDEO */
.video-wrap{
  position:relative; max-width:820px; margin:0 auto; border-radius:16px; overflow:hidden;
  box-shadow:0 16px 40px rgba(74,58,53,.18); aspect-ratio:16/9; background:#000;
}
/* overscan: iframe agrandado y centrado para recortar título (arriba) y branding (abajo) de YouTube.
   Las barras de YouTube tienen altura casi fija en px, así que en pantallas chicas hace falta
   más overscan para taparlas — de ahí el aumento por media query. */
.video-wrap iframe{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:120%; height:120%; border:0; display:block; pointer-events:none;
}
@media (max-width:760px){
  .video-wrap iframe{ width:138%; height:138%; }
}
@media (max-width:440px){
  .video-wrap iframe{ width:150%; height:150%; }
}
.video-sound{
  position:absolute; bottom:14px; right:14px; z-index:2;
  width:44px; height:44px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(30,20,18,.55); color:#fff; font-size:1.1rem;
  backdrop-filter:blur(4px); transition:background .2s ease, transform .2s ease;
}
.video-sound:hover{background:rgba(30,20,18,.8); transform:scale(1.08)}

/* NUESTRA HISTORIA — capítulos + mosaico */
.chapter{max-width:900px; margin:0 auto 3.5rem}
.chapter-num{
  font-family:var(--body); letter-spacing:.25em; text-transform:uppercase;
  font-size:.8rem; color:var(--gold);
}
.chapter-title{font-family:var(--script); font-size:2.2rem; color:var(--rose-dark); margin:.2rem 0}
.chapter-text{opacity:.8; margin-bottom:1.6rem; font-size:1.05rem}
.mosaic{
  display:grid; gap:.7rem;
  /* minmax(0,1fr), no solo 1fr: evita un bug real de Chrome donde una celda
     que combina grid-column:span + aspect-ratio duplica el ancho de columna
     (el auto-mínimo de "1fr" se infla con el tamaño del aspect-ratio) */
  grid-template-columns:repeat(4, minmax(0, 1fr));
}
.mosaic-item{
  aspect-ratio:1/1; border:none; border-radius:10px; padding:0; cursor:pointer;
  background:#e8cfa8 center/cover no-repeat;
  box-shadow:0 6px 16px rgba(74,58,53,.1);
  transition:transform .3s ease, box-shadow .3s ease;
}
.mosaic-item:hover{transform:scale(1.05); box-shadow:0 12px 24px rgba(74,58,53,.2)}
/* primera foto de cada capítulo, más grande: ocupa 2 columnas, cuadrada
   por aspect-ratio (ya no por grid-row:span — con minmax(0,1fr) arriba,
   aspect-ratio + column-span ya no dispara el bug de Chrome, y así no
   depende de que la fila vecina tenga contenido para no colapsar). */
.mosaic-item:first-child{grid-column:span 2; aspect-ratio:1/1}
/* foto destacada extra (ej. la última del Capítulo 1, con los perros — "ya
   estábamos construyendo nuestro hogar").
   grid-column:-3/-1 (en vez de span 2) la ancla a las ÚLTIMAS 2 columnas
   de la fila — o sea, a la derecha — sin importar si hay 4 o 3 columnas. */
.mosaic-item.mosaic-feature{grid-column:-3 / -1; aspect-ratio:1/1}

/* Capítulo 2 permanece oculto hasta darle click a "Ver Capítulo 2" */
.chapter-hidden{display:none}
.chapter-next{
  display:block; margin:1.8rem auto 0; padding:.8rem 1.8rem;
  background:var(--rose-dark); color:#fff; border:none; border-radius:30px;
  font-family:var(--serif); font-size:1rem; cursor:pointer;
  transition:background .25s ease, transform .2s ease;
}
.chapter-next:hover{background:var(--gold); transform:translateY(-2px)}
.chapter-next.done{display:none}

/* GALERIA — carrusel automático de 3 fotos (izquierda / centro / derecha) */
.gallery-sub{margin-bottom:2rem; opacity:.75}
.carousel{
  position:relative; max-width:760px; margin:0 auto 1.2rem;
  aspect-ratio:16/8; overflow:hidden;
}
.carousel-track{position:relative; width:100%; height:100%}
.carousel-slide{
  position:absolute; top:50%; left:50%; width:52%; height:82%;
  border:none; padding:0; cursor:pointer; border-radius:14px;
  background:#e8cfa8 center/cover no-repeat;
  box-shadow:0 10px 24px rgba(74,58,53,.15);
  transform:translate(-50%,-50%) scale(.7);
  opacity:0; z-index:1; pointer-events:none;
  transition:transform .7s cubic-bezier(.65,0,.35,1), opacity .7s ease, box-shadow .4s ease;
}
.carousel-slide.is-center{
  transform:translate(-50%,-50%) scale(1);
  opacity:1; z-index:3; pointer-events:auto;
  box-shadow:0 18px 40px rgba(74,58,53,.28);
}
.carousel-slide.is-prev{
  transform:translate(-155%,-50%) scale(.8);
  opacity:.55; z-index:2; pointer-events:auto;
}
.carousel-slide.is-next{
  transform:translate(55%,-50%) scale(.8);
  opacity:.55; z-index:2; pointer-events:auto;
}
.carousel-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:4;
  width:40px; height:40px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(30,20,18,.45); color:#fff; font-size:1.3rem;
  backdrop-filter:blur(3px); transition:background .2s ease;
}
.carousel-arrow:hover{background:rgba(30,20,18,.75)}
.carousel-arrow.prev{left:6px}
.carousel-arrow.next{right:6px}
.carousel-dots{
  display:flex; gap:.4rem; justify-content:center; flex-wrap:wrap;
  max-width:480px; margin:0 auto;
}
.carousel-dots .dot{
  width:7px; height:7px; border-radius:50%; background:#d9c6b8;
  transition:background .25s ease, transform .25s ease; cursor:pointer;
}
.carousel-dots .dot.active{background:var(--rose-dark); transform:scale(1.3)}

@media (max-width:520px){
  .carousel{aspect-ratio:1/1}
  .carousel-slide{width:60%; height:78%}
  .carousel-slide.is-prev{transform:translate(-130%,-50%) scale(.72)}
  .carousel-slide.is-next{transform:translate(30%,-50%) scale(.72)}
}

.lightbox[open]{
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); margin:0;
  border:none; border-radius:14px; padding:0; max-width:90vw; max-height:85vh;
  min-width:240px; min-height:180px;
  background:linear-gradient(160deg, #f0d9c4, #d9a97e);
  display:flex; align-items:center; justify-content:center;
}
.lightbox::backdrop{background:rgba(30,20,18,.85)}
.lightbox img{display:block; max-width:90vw; max-height:85vh; border-radius:10px}
.lightbox-close{
  position:absolute; top:-14px; right:-14px; width:34px; height:34px; border-radius:50%;
  border:none; background:var(--rose-dark); color:#fff; font-size:1rem; cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,.3);
}

@media (max-width:520px){
  .mosaic{grid-template-columns:repeat(3, minmax(0, 1fr))}
  .chapter-title{font-size:1.8rem}
}

/* ITINERARIO */
.itinerary-sub{margin-bottom:2.5rem; opacity:.8; font-size:1.05rem}
.day-block{max-width:680px; margin:0 auto 2.8rem}
.day-title{
  font-family:var(--serif); color:var(--rose-dark); font-size:1.3rem;
  text-align:left; margin-bottom:1.4rem; padding-bottom:.5rem;
  border-bottom:1px solid #e5d4c4;
}
.day-title span{
  display:block; font-family:var(--body); font-style:italic;
  font-size:.9rem; color:var(--ink); opacity:.6; font-weight:400; margin-top:.15rem;
}

/* TIMELINE */
.timeline{max-width:640px; margin:0 auto; text-align:left; position:relative}
.timeline::before{
  content:''; position:absolute; left:92px; top:0; bottom:0; width:2px;
  background:linear-gradient(var(--gold), var(--rose));
}
.tl-item{display:flex; gap:1.5rem; margin-bottom:2.2rem; align-items:flex-start}
.tl-time{
  width:78px; flex:0 0 78px; font-family:var(--serif); color:var(--rose-dark);
  font-weight:600; text-align:right; padding-top:2px; font-size:.9rem;
  white-space:nowrap;
}
.tl-body{
  background:#fff; border-radius:12px; padding:1rem 1.3rem;
  box-shadow:0 6px 18px rgba(74,58,53,.07); flex:1;
  border-left:3px solid var(--gold);
}
.tl-body h4{font-family:var(--serif); color:var(--ink); margin-bottom:.3rem}
.tl-body p{font-size:.95rem; opacity:.85; text-align:justify}

/* DRESS CODE */
.dress-main{font-family:var(--script); font-size:2.4rem; color:var(--rose-dark)}
.dress-desc{max-width:52ch; margin:.6rem auto 0; opacity:.85}
.palette{display:flex; gap:.7rem; justify-content:center; margin:1.4rem 0}
.palette span{width:38px; height:38px; border-radius:50%; box-shadow:0 2px 8px rgba(0,0,0,.15)}
.dress-note{font-style:italic; opacity:.75; margin-top:.5rem; font-size:.95rem}

/* CLIMA */
.climate-temps{display:flex; gap:2.5rem; justify-content:center; margin:1.4rem 0}
.temp-item span{display:block; font-family:var(--serif); font-size:1.8rem; color:var(--rose-dark)}
.temp-item small{letter-spacing:.15em; text-transform:uppercase; font-size:.75rem; opacity:.7}
.climate-note{opacity:.8; max-width:44ch; margin:0 auto}

/* FAQ */
.faq-list{max-width:640px; margin:0 auto; text-align:left}
.faq-list details{
  background:#fff; border-radius:12px; margin-bottom:.8rem; padding:0 1.3rem;
  box-shadow:0 6px 18px rgba(74,58,53,.07); overflow:hidden;
}
.faq-list summary{
  font-family:var(--serif); color:var(--rose-dark); font-size:1.05rem;
  padding:1rem 0; cursor:pointer; list-style:none; position:relative; padding-right:1.5rem;
}
.faq-list summary::-webkit-details-marker{display:none}
.faq-list summary::after{
  content:'+'; position:absolute; right:0; top:50%; transform:translateY(-50%);
  color:var(--gold); font-size:1.4rem; transition:transform .25s ease;
}
.faq-list details[open] summary::after{transform:translateY(-50%) rotate(45deg)}
.faq-list details p{padding:0 0 1.1rem; opacity:.85; font-size:.98rem; line-height:1.5}

/* BODA VIRTUAL (ZOOM) */
.zoom-sub{max-width:48ch; margin:0 auto 2rem; opacity:.8}
.zoom-card{
  max-width:420px; margin:0 auto; background:#fdf8f3; border-radius:18px;
  padding:2.2rem 1.8rem; box-shadow:0 10px 30px rgba(74,58,53,.1);
}
.zoom-icon{font-size:2.4rem; margin-bottom:.8rem}
.zoom-pending{opacity:.75; font-size:.95rem; margin-bottom:1.4rem; line-height:1.5}

/* POZO DE SOBRES */
.gifts-sub{max-width:52ch; margin:0 auto 2rem; opacity:.8}
.carriage-scene{max-width:640px; margin:2.5rem auto 1.4rem}
.carriage-bob{
  position:relative; width:100%; aspect-ratio:620/240;
  animation:carriage-bob 3.5s ease-in-out infinite;
}
@keyframes carriage-bob{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }
.carriage-svg{position:absolute; inset:0; width:100%; height:100%}
.carriage-svg .wheel{animation:wheel-turn 14s linear infinite}
@keyframes wheel-turn{ to{transform:rotate(360deg)} }

/* zona de carga: montaña de sobres que se llena a lo largo del carruaje ancho */
.carriage-load{
  position:absolute; left:13%; right:13%; top:-12%; bottom:30%;
  display:flex; flex-wrap:wrap-reverse; align-content:flex-start;
  justify-content:center; padding:4px;
  /* ponytail: overflow visible — la montaña rebosa apenas el borde; el ancho + auto-escala evitan que suba hasta el texto */
}
.gifts-empty{font-style:italic; opacity:.6; margin-bottom:2rem}
.gifts-empty.hidden{display:none}

.gift-envelope{
  /* --scale lo fija el JS según cuántos sobres hay: la montaña se densifica en vez de crecer sin fin */
  position:relative; width:calc(74px * var(--scale,1)); height:calc(50px * var(--scale,1));
  border-radius:4px;
  background:linear-gradient(160deg, #f5e6d3, #e8cfa8);
  box-shadow:0 3px 8px rgba(40,25,20,.35);
  overflow:hidden;
  display:flex; align-items:flex-end; justify-content:center;
  margin:calc(-7px * var(--scale,1)) calc(-10px * var(--scale,1)); /* traslape entre sobres */
  transform:translate(var(--dx,0), var(--dy,0)) rotate(var(--rot,0deg));
  animation:gift-drop .7s cubic-bezier(.3,.9,.4,1.2);
  font-size:calc(1rem * var(--scale,1));
}
@keyframes gift-drop{
  0%{ transform:translate(var(--dx,0), -130px) rotate(-18deg); opacity:0 }
  60%{ transform:translate(var(--dx,0), calc(var(--dy,0px) + 5px)) rotate(var(--rot,0deg)); opacity:1 }
  100%{ transform:translate(var(--dx,0), var(--dy,0)) rotate(var(--rot,0deg)) }
}
.gift-envelope::before{
  content:''; position:absolute; top:0; left:0; width:100%; height:44%;
  background:linear-gradient(160deg, #e8cfa8, #d4a373);
  clip-path:polygon(0 0, 100% 0, 50% 100%);
}
.gift-envelope .ge-seal{
  position:absolute; top:26%; left:50%; transform:translateX(-50%);
  width:calc(15px * var(--scale,1)); height:calc(15px * var(--scale,1)); border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #c9a24b, #8a6d3b);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--serif); font-size:.32em; font-weight:600; color:#3a2b1a;
}
.gift-envelope .ge-name{
  font-family:var(--script); font-size:.58em; color:var(--rose-dark);
  padding:0 .3em .25em; line-height:1; max-width:100%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* RSVP */
.rsvp{background:#f7ece4}
.rsvp-sub{margin-bottom:2rem; opacity:.8}
.rsvp-form{
  max-width:480px; margin:0 auto; display:flex; flex-direction:column; gap:1.2rem;
  text-align:left;
}
.rsvp-form label{
  display:flex; flex-direction:column; gap:.4rem; font-weight:600; font-size:.95rem;
}
.rsvp-form input, .rsvp-form select, .rsvp-form textarea{
  font-family:var(--body); font-size:1rem; padding:.7rem .9rem;
  border:1px solid #d9c6b8; border-radius:8px; background:#fff; color:var(--ink);
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus{
  outline:2px solid var(--gold);
}
.rsvp-form button{
  margin-top:.5rem; padding:.9rem; border:none; border-radius:30px;
  background:var(--rose-dark); color:#fff; font-family:var(--serif); font-size:1.05rem;
  cursor:pointer; transition:background .25s ease, transform .2s ease;
}
.rsvp-form button:hover{background:var(--gold); transform:translateY(-2px)}
.rsvp-form button:disabled{opacity:.6; cursor:not-allowed; transform:none}
#rsvp-status, #gift-status{font-size:.9rem; min-height:1.2em}
#rsvp-status.ok, #gift-status.ok{color:#2e7d4f}
#rsvp-status.err, #gift-status.err{color:#b3382c}

/* FOOTER */
.footer{
  text-align:center; padding:3rem 1.5rem; background:var(--ink); color:#f2e6da;
}
.footer-names{font-family:var(--script); font-size:2rem; color:var(--gold); margin-bottom:.5rem}

@media (max-width:480px){
  .countdown{gap:.6rem}
  .cd-item{min-width:52px; padding:.5rem .6rem}
  .tl-item{gap:.8rem}
  .timeline::before{left:70px}
  /* ancho fijo (no min-width) + nowrap: si el texto ("10:00 a.m.") no cabe,
     se desborda hacia la izquierda (lejos de la línea) en vez de comprimirse
     y encimarse con ella */
  .tl-time{width:62px; flex:0 0 62px; font-size:.72rem; white-space:nowrap}
}
