/* Base layer: resets + rules every theme shares. Structural rules currently
 * live in each theme's theme.css (v0: extracted wholesale into travel);
 * promote rules here as more themes land. */
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* RSVP form rhythm (shared across themes) */
#rsvp-form .event-cards { margin: 1.6rem 0 2.2rem; }
#rsvp-form .people-field { margin-bottom: 1.6rem; }
#rsvp-form label:not(.event-card) > span { display: block; margin-bottom: .45rem; }
#rsvp-form textarea { display: block; width: 100%; }
#rsvp-form > button[type="submit"] { display: block; margin-top: 1.4rem; }

/* ---- surprise egg: movement presets ------------------------------------- *
 * Chosen in the CMS (easterEggs > surprise > "How it moves"). They animate
 * the container's contents, so they work the same whether that is the
 * theme's drawn illustration or a picture the couple uploaded. Only ever
 * runs once the egg is revealed (.sorpresa-in), and never for a guest who
 * asked for less motion. */
.sorpresa-img { display: block; width: 120px; height: auto; border-radius: 10px; }

.sorpresa-in.egg-anim-shake > :not(.sorpresa-hint) {
  animation: egg-shake 3s ease-in-out .8s infinite;
  transform-origin: 50% 90%;
}
.sorpresa-in.egg-anim-pulse > :not(.sorpresa-hint) { animation: egg-pulse 1.9s ease-in-out .6s infinite; }
.sorpresa-in.egg-anim-float > :not(.sorpresa-hint) { animation: egg-float 3.4s ease-in-out .4s infinite; }
.sorpresa-in.egg-anim-none  > :not(.sorpresa-hint) { animation: none; }

@keyframes egg-shake {
  0%, 82%, 100% { transform: rotate(0deg); }
  86% { transform: rotate(-6deg); }
  90% { transform: rotate(5deg); }
  94% { transform: rotate(-3deg); }
}
@keyframes egg-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes egg-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .sorpresa-in.egg-anim-shake > *,
  .sorpresa-in.egg-anim-pulse > *,
  .sorpresa-in.egg-anim-float > * { animation: none !important; }
}
