/* The animated logo (docs/jigsaw-spec.md section 23.2). Same pixel puzzle piece,
   with quiet movement: it assembles once on arrival, blinks now and then, and
   its glow breathes slowly. Nothing here changes the logo's size or position. */
.logo { overflow: visible; transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.logo rect { transform-box: fill-box; transform-origin: center; }

/* arriving: the two colour blocks slide in from opposite corners and settle */
@keyframes lg-pink-in { from { transform: translate(-4px, -4px); opacity: 0; } 55% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes lg-blue-in { from { transform: translate(4px, 4px); opacity: 0; } 55% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes lg-face-in { from { opacity: 0; } to { opacity: 1; } }
.logo .lg-pink { animation: lg-pink-in 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.1s both; }
.logo .lg-blue { animation: lg-blue-in 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.22s both; }
.logo .lg-mouth { animation: lg-face-in 0.3s ease 0.75s both; }

/* blinking: a quick close and open, about every seven seconds */
@keyframes lg-blink { 0%, 95.5%, 100% { transform: scaleY(1); } 97.5% { transform: scaleY(0.2); } }
.logo .lg-eye { animation: lg-face-in 0.3s ease 0.75s both, lg-blink 7s ease-in-out 3s infinite; }

/* the gold glow breathes (not on the jigsaw page, where the puzzle has the stage) */
@keyframes lg-glow {
  from { filter: drop-shadow(0 0 7px rgba(255, 225, 77, 0.22)); }
  to { filter: drop-shadow(0 0 13px rgba(255, 225, 77, 0.5)); }
}
.brand .logo { animation: lg-glow 3s ease-in-out infinite alternate; }
.hud .brand .logo { animation: none; }

/* pointing at it: a small lift and tilt */
.brand:hover .logo, .brand:focus-visible .logo { transform: translateY(-2px) rotate(-5deg); }

@media (prefers-reduced-motion: reduce) {
  .logo, .logo rect { animation: none !important; transition: none; }
  .brand:hover .logo, .brand:focus-visible .logo { transform: none; }
}
