/* celebration.css — ring box opening, the letter, save-the-date countdown, actions.
   Transform owners: .cel-box-wrap = entrance · .cel-box-lid = lid swing · .cel-ring-wrap = rise · .cel-num = tick. */

.cel-inner { padding-top: calc(40px + var(--sat)); }
.cel-center { gap: 22px; }
.cel-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.cel-title { font-size: clamp(36px, 10vw, 60px); opacity: 0; }
.cel-sub { max-width: 30ch; opacity: 0; }
.cel-hero.is-in .cel-title { animation: bounceIn .8s var(--ease-back) 1.6s both; }
.cel-hero.is-in .cel-sub { animation: fadeIn .8s var(--ease-out) 2.2s both; }
.cel-bday { font-size: 20px; font-style: italic; text-shadow: var(--text-shadow); opacity: 0; }
.cel-hero.is-in .cel-bday { animation: fadeIn .8s var(--ease-out) 2.8s both; }

/* ----- ring box ----- */
.cel-box-wrap { margin: 6px 0 4px; }
.cel-hero.is-in .cel-box-wrap { animation: scaleIn .7s var(--ease-out) both; }
.cel-box { position: relative; width: 132px; height: 116px; perspective: 600px; }
.cel-box-base {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56%;
  border-radius: 8px 8px 16px 16px;
  background: linear-gradient(#7a1033, #4a0619);
  box-shadow: 0 18px 34px rgba(40, 0, 15, .45), inset 0 -4px 8px rgba(0, 0, 0, .35);
  z-index: 1;
}
.cel-box-inside { position: absolute; left: 10%; right: 10%; bottom: 40%; height: 22%; border-radius: 50%; background: radial-gradient(#fff 0, #ffe4ec 40%, #c2185b 100%); z-index: 2; opacity: .9; }
.cel-box-seam { position: absolute; left: 6px; right: 6px; bottom: 54%; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-hi), var(--gold-deep)); z-index: 4; }
.cel-box-lid {
  position: absolute; left: -3px; right: -3px; bottom: 54%; height: 40%;
  border-radius: 20px 20px 6px 6px;
  background: linear-gradient(#93163f, #5e0a24);
  box-shadow: inset 0 3px 4px rgba(255, 255, 255, .18);
  transform-origin: 50% 0;
  transition: transform .75s var(--ease-flap);
  z-index: 5;
}
.cel-box.is-open .cel-box-lid { transform: translateY(-30%) rotateX(-110deg); }
.cel-ring-wrap {
  position: absolute; left: 50%; bottom: 44%; width: 68px; margin-left: -34px;
  z-index: 3;
  opacity: 0;
  transform: translateY(24px) scale(.8);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.cel-box.is-ring .cel-ring-wrap { opacity: 1; transform: translateY(-14px) scale(1); z-index: 6; }
.cel-ring { width: 68px; height: auto; filter: drop-shadow(0 6px 10px rgba(80, 0, 20, .35)); }
.cel-glint { position: absolute; top: 6px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff, 0 0 20px #bfe8ff; opacity: 0; }
.cel-box.is-ring .cel-glint { animation: rbTw 2.4s ease-in-out 1s infinite; }

.cel-photo { width: min(78vw, 300px); border-radius: 14px; border: 10px solid #fffdf9; box-shadow: var(--shadow-card); transform: rotate(-2deg); }

/* ----- the letter ----- */
.cel-letter { opacity: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; cursor: pointer; }
.cel-letter.is-in { animation: slideUp .8s var(--ease-out) both; }
.cel-letter-h { font-size: 22px; font-weight: 600; color: var(--ink); }
.cel-p { font-size: 17px; line-height: 1.6; color: var(--ink); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.cel-p.is-pending { opacity: 0; transform: translateY(8px); }
.cel-p.is-shown { opacity: 1; transform: none; }
.cel-signoff { margin-top: 6px; font-size: 16px; color: var(--ink-soft); opacity: 0; transition: opacity .8s ease; }
.cel-sign { font-size: 24px; font-style: italic; color: var(--ink); opacity: 0; transition: opacity 1s ease .3s; }
.cel-callback { font-size: 15px; color: var(--ink-soft); opacity: 0; transition: opacity .8s ease .6s; }
.cel-letter.is-done .cel-signoff, .cel-letter.is-done .cel-sign, .cel-letter.is-done .cel-callback { opacity: 1; }

/* ----- save the date ----- */
.cel-tail { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; opacity: 0; pointer-events: none; }
.cel-tail.is-in { animation: slideUp .8s var(--ease-out) both; pointer-events: auto; }
.cel-date { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cel-date-kicker { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--rose-700); }
.cel-date-title { font-size: 26px; font-weight: 600; color: var(--ink); }
.cel-date-when { font-size: 16px; font-weight: 600; color: var(--ink-soft); }
.cel-date.is-today .cel-date-title { animation: pulse 2.4s var(--ease-pulse) infinite; color: var(--rose-700); }


/* ----- actions ----- */
.cel-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(92vw, 360px); }
.cel-actions .btn { width: 100%; }
.cel-wa-ico { width: 22px; height: 22px; color: #25D366; }
.cel-inperson { font-size: 24px; font-style: italic; text-shadow: var(--text-shadow); text-align: center; }


@media (prefers-reduced-motion: reduce) {
  .cel-hero.is-in .cel-title, .cel-hero.is-in .cel-sub, .cel-hero.is-in .cel-bday, .cel-letter.is-in, .cel-tail.is-in, .cel-hero.is-in .cel-box-wrap { animation: fadeIn .3s ease both !important; animation-duration: .3s !important; }
  .cel-box-lid, .cel-ring-wrap, .cel-p { transition-duration: .15s !important; }
  .cel-box.is-ring .cel-glint { animation: none !important; opacity: .8; }
}
