/* Existing card positions and fixed dimensions come from playroom.css. Only
   transform/opacity animate: the hero keeps exactly the same footprint. */
.home-cards { perspective: 1100px; }
.home-cards .home-story-card { --home-card-tilt: -15deg; transform: rotate(var(--home-card-tilt)); transform-origin: 50% 55%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.home-cards .route-card-end { --home-card-tilt: 10deg; }
.home-cards .route-card-center { transform: translateY(-27px); }
.home-cards .route-card-center > strong { display: block; width: 100%; text-align: center; white-space: nowrap; }
.home-cards [data-story-tone="ocean"] { background: #1d78e0; }
.home-cards [data-story-tone="moon"] { background: #ed4b42; }
.home-cards [data-story-tone="forest"] { background: #248463; }
.home-cards [data-story-tone="volcano"] { background: #c94d32; }
.home-cards [data-story-tone="chess"] { background: #394c76; }
.home-cards [data-story-tone="music"] { background: #9d4f9c; }
.home-cards [data-story-tone="desert"] { background: #ad712d; }
.home-cards [data-story-tone="aurora"] { background: #286d84; }
.home-cards .home-card-leaving { animation: home-card-leave 260ms cubic-bezier(.45,0,.65,.4) both; will-change: transform; }
.home-cards .home-card-arriving { animation: home-card-arrive 460ms cubic-bezier(.16,.8,.25,1) both; will-change: transform; }
@keyframes home-card-leave {
  from { transform: translateY(0) rotate(var(--home-card-tilt)) rotateY(0); }
  to { transform: translateY(-9px) rotate(var(--home-card-tilt)) rotateY(90deg); }
}
@keyframes home-card-arrive {
  from { transform: translateY(-9px) rotate(var(--home-card-tilt)) rotateY(-90deg); }
  78% { transform: translateY(2px) rotate(var(--home-card-tilt)) rotateY(2deg); }
  to { transform: translateY(0) rotate(var(--home-card-tilt)) rotateY(0); }
}
@media (max-width: 660px) {
  .home-cards .route-card-start { --home-card-tilt: -14deg; }
  .home-cards .route-card-end { --home-card-tilt: 12deg; }
  .home-cards .route-card-center { transform: translateY(-12px); }
  .home-cards .route-card-center > strong { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-cards .home-story-card { animation: none !important; transform: rotate(var(--home-card-tilt)) !important; will-change: auto; }
}
.reduce-motion .home-cards .home-story-card { animation: none !important; transform: rotate(var(--home-card-tilt)) !important; will-change: auto; }
