/* ==========================================================
   Movimiento: entrada ordenada de la portada, aparición suave
   al bajar, acordeones y detalles. Solo se oculta contenido
   cuando JavaScript está activo (html.js).
   ========================================================== */
:root{
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
}

/* El sistema anterior queda neutralizado */
.reveal{ opacity: 1; transform: none; transition: none; }

/* ---------- Entrada de la portada ---------- */
.cover-photo picture{ display:block; width:100%; height:100%; }

html.js .cover-photo picture,
html.js .cover-name,
html.js .cover-age,
html.js .cover .band .wrap > *{
  animation-fill-mode: both;
  animation-play-state: paused;
}
html.js .cover-photo picture{ animation: photoIn 2.6s var(--ease-out) both; }
html.js .cover-name{ animation: titleIn 1.4s var(--ease-out) .55s both; }
html.js .cover-age{ animation: riseIn 1.1s var(--ease-out) .95s both; }
html.js .cover .band .wrap > *{ animation: riseIn 1s var(--ease-out) both; }
html.js .cover .band .fecha{ animation-delay: 1.25s; }
html.js .cover .band .tagline{ animation-delay: 1.37s; }
html.js .cover .band .faltan{ animation-delay: 1.49s; }
html.js .cover .band .countdown{ animation-delay: 1.61s; }

html.intro .cover-photo picture,
html.intro .cover-name,
html.intro .cover-age,
html.intro .cover .band .wrap > *{
  animation-play-state: running;
}

@keyframes photoIn{
  0%   { opacity: 0; transform: scale(1.07); }
  45%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes titleIn{
  0%   { opacity: 0; transform: translate3d(0, 18px, 0); filter: blur(8px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes riseIn{
  0%   { opacity: 0; transform: translate3d(0, 14px, 0); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Aparición al bajar ---------- */
html.js .reveal-item{
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity .9s var(--ease-soft),
    transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
  will-change: opacity, transform;
}
html.js .reveal-item.in{
  opacity: 1;
  transform: none;
}
html.js .reveal-item.done{ will-change: auto; }

/* ---------- Cuenta regresiva: cambio suave del número ---------- */
.countdown .num.tick{ animation: numTick .5s var(--ease-out); }
@keyframes numTick{
  0%   { opacity: .35; transform: translate3d(0, -5px, 0); }
  100% { opacity: 1;   transform: none; }
}

/* ---------- Acordeón y formulario ---------- */
.acc-panel{ transition: max-height .55s var(--ease-out); }
.acc-panel-inner{
  opacity: 0;
  transform: translate3d(0, -6px, 0);
  transition: opacity .3s ease, transform .45s var(--ease-out);
}
.acc-item.open .acc-panel-inner{
  opacity: 1;
  transform: none;
  transition-delay: .08s;
}
.acc-head .chev{ transition: transform .45s var(--ease-out); }
#rsvp-fields{ transition: max-height .65s var(--ease-out) !important; }

/* ---------- Botones ---------- */
.btn{
  transition: background .25s ease, color .25s ease, transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
@media (hover: hover){
  .btn:hover{ transform: translate3d(0, -2px, 0); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
}
.btn:active{ transform: scale(.97); }

/* ---------- Firma DB (discreta) ---------- */
footer .credit{ margin-top: 16px; line-height: 0; }
.db-mark{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 7px;
  letter-spacing: .04em;
  line-height: 1;
  color: rgba(33,29,25,.28);
}

/* ---------- Acompañantes ---------- */
.form-group .label{
  display:block;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(33,29,25,.5);
  margin-bottom: 9px;
}
.acomp-group{
  max-height: 900px;
  overflow: hidden;
  transition: max-height .5s var(--ease-out), opacity .35s ease, margin .5s var(--ease-out);
}
.acomp-group.oculto{ max-height: 0; opacity: 0; margin-bottom: 0; }
.stepper{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid rgba(33,29,25,.18);
  border-radius: 999px;
  padding: 5px;
}
.step-btn{
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: var(--ink-dark);
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display:flex; align-items:center; justify-content:center;
  transition: transform .3s var(--ease-out), opacity .25s ease, background .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.step-btn:active{ transform: scale(.9); }
.step-btn:disabled{ opacity: .18; cursor: default; transform: none; }
.step-btn:focus-visible{ outline: 2px solid var(--pink-deep); outline-offset: 2px; }
.step-num{
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--ink-dark);
  min-width: 2ch;
  text-align: center;
}
.acomp-hint{
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(33,29,25,.5);
  text-align: center;
}
.acomp-list{ margin-top: 4px; }
.acomp-item{
  max-height: 120px;
  overflow: hidden;
  padding-top: 12px;
  transition: max-height .38s var(--ease-out), opacity .3s ease, transform .45s var(--ease-out), padding .38s var(--ease-out);
}
.acomp-item.entrando{ opacity: 0; transform: translate3d(0, -8px, 0); }
.acomp-item.saliendo{ opacity: 0; padding-top: 0; }
.acomp-item label{
  display:block;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pink-deep);
  margin-bottom: 6px;
}
.acomp-row{ position: relative; }
.acomp-row .form-field{ padding-right: 44px; }
.acomp-quitar{
  position: absolute;
  top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: rgba(33,29,25,.4);
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.acomp-quitar:hover, .acomp-quitar:focus-visible{ color: var(--pink-deep); background: rgba(198,93,120,.08); outline: none; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce){
  html.js .cover-photo picture,
  html.js .cover-name,
  html.js .cover-age,
  html.js .cover .band .wrap > *{ animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  html.js .reveal-item{ opacity: 1; transform: none; transition: none; }
}

/* En celulares el botón no queda "pintado" después de tocarlo */
@media (hover: none){
  .btn:hover{ background: var(--white); color: var(--black); }
  .light .btn:hover{ background: var(--ink-dark); color: var(--cream); }
}

/* Dress code: tonos a evitar */
.dress-note{
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  text-align: center;
}
.dress-swatches{
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.dress-swatches span{
  position: relative;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(247,242,236,.16);
  overflow: hidden;
}
.dress-swatches span::after{
  content: '';
  position: absolute;
  left: -2px; right: -2px; top: 50%;
  height: 1.5px;
  background: var(--pink);
  transform: rotate(-45deg);
}
.dress-note p{
  text-wrap: balance;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(247,242,236,.75);
}
.dress-note b{ color: var(--white); font-weight: 500; }

/* Dress code: siempre visible, sin acordeón */
.acc-fijo .acc-head-fijo{ cursor: default; }
.acc-fijo .acc-panel{ max-height: none; overflow: visible; transition: none; }
.acc-fijo .acc-panel-inner{ opacity: 1; transform: none; transition: none; padding-bottom: 26px; }
