/* ==========================================================================
   Motion — small delights (all skipped under prefers-reduced-motion)
   ========================================================================== */

/* content drifts into place as the letter is read */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* wrong code: the envelope shakes its head */
@keyframes headshake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
.login-card.shake { animation: headshake 0.45s ease; }

/* a swallow crosses the page when the letter opens */
@keyframes swallow-flight {
  0%   { transform: translate(-12vw, 78vh) rotate(4deg) scale(0.9); opacity: 0; }
  8%   { opacity: 0.9; }
  45%  { transform: translate(44vw, 30vh) rotate(-6deg) scale(1.05); }
  92%  { opacity: 0.9; }
  100% { transform: translate(112vw, 12vh) rotate(-3deg) scale(0.95); opacity: 0; }
}
.flying-swallow {
  position: fixed;
  top: 0;
  left: 0;
  width: 9rem;
  height: 9rem;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  animation: swallow-flight 4.2s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
/* the two birds twirl around a shared centre while the flock crosses */
.twirl {
  position: absolute;
  inset: 0;
  animation: orbit 2s linear infinite;
}
.twirl img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4rem;
  height: auto;
  margin: -1.4rem 0 0 -2rem;
  animation: orbit-keep-upright 2s linear infinite;
}
.twirl-b, .twirl-b img { animation-delay: -1s; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes orbit-keep-upright {
  from { transform: translateY(-1.9rem) rotate(0deg); }
  to   { transform: translateY(-1.9rem) rotate(-360deg); }
}

/* gentle lifts */
.weather-day, .pack-list label { transition: transform 0.2s ease; }
.weather-day:hover { transform: translateY(-2px); }
.pack-list label:hover { background: rgba(143, 164, 131, 0.07); }

/* Short windows: tighten the sidebar so sign-out stays in view */
@media (max-height: 780px) and (min-width: 841px) {
  .side { padding-top: 3.2rem; }
  .side-logo { width: 4.2rem; margin-bottom: 1.3rem; }
  .main-nav button { padding-top: 0.3rem; padding-bottom: 0.3rem; }
  .side-swallow { width: 6.5rem; margin-bottom: 0.6rem; }
  .side-foot { padding-top: 0.8rem; }
}

