/* shell.css — owned by WP-SHELL. Tokens only (docs/vfx-master-spec.md §1 rule 5).
   Splash and launcher choreography that apps.css does not carry: the A1 exit
   (splash scales 1→1.04 and fades while the first screen slides up beneath),
   Pip rising beside the still life, the Pip launcher host, and the press tilt
   settling rule. Transform/opacity only; every keyframe ends at identity. */

/* ------------------------------------------------------------------ SPLASH */
/* Exit (pattern A1). Overrides apps.css's 1.09 zoom: the mark barely grows
   while the launcher arrives under it, so the eye stays on the new screen. */
#splash.is-out { animation: shSplashOut var(--fc-m-slow) var(--fc-ease-in) forwards; }
@keyframes shSplashOut { to { opacity: 0; transform: scale(1.04); visibility: hidden; } }

/* The first screen mounts while the splash is still fading and slides up
   into place beneath it. The class is removed when the splash is gone, so a
   later route change never replays it; the keyframe ends at identity. */
#fc-root.is-arriving { animation: shArrive var(--fc-m-slow) var(--fc-ease-out) both; }
@keyframes shArrive {
  from { opacity: 0; transform: translate3d(0, 24px, 0); }
  to   { opacity: 1; transform: none; }
}

/* Beat three: Pip's greet still rises beside the fruit, one spring, then
   holds. Positioned by JS from the disc centre like the fruit slots. */
.sp-pip { position: absolute; z-index: 4; opacity: 0; pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(20, 40, 10, .35));
  animation: shPipIn var(--fc-m-epic) var(--fc-ease-spring) var(--fc-m-slow) both; }
.sp-pip > img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center bottom; }
@keyframes shPipIn {
  0%   { opacity: 0; transform: translate3d(0, 40px, 0) scale(.8); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
/* Film hero stills are already lit and shadowed by Cycles; no second shadow. */
.sp-fruit.is-film { filter: none; }

@media (prefers-reduced-motion: reduce) {
  /* Final frame, no travel. */
  .sp-pip { opacity: 1; transform: none; animation: none; }
  #fc-root.is-arriving { animation: none; }
  #splash.is-out { animation: none; opacity: 0; visibility: hidden; }
}

/* ---------------------------------------------------------------- LAUNCHER */
/* Pip's host beside the greeting: the .pip--md box of spec §3.5 (112×132),
   declared here too so the launcher does not depend on apps.css landing. */
.launch-obj--pip { width: 112px; height: 132px; cursor: pointer; }
.launch-obj--pip canvas, .launch-obj--pip img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center bottom; }

/* The support tile carries Pip greeting: a mascot still is taller than it
   is wide, so it stands on the tile's icon box rather than filling it. */
.applet-ic .applet-obj--pip { width: 36px; height: 40px; object-fit: contain; object-position: center bottom; }

/* Press tilt (pattern A6): JS sets an inline perspective/rotate transform on
   pointerdown and clears it on release; apps.css's transition on .applet
   carries the tile back to identity. Only the pivot is declared here. */
.applet { transform-origin: center center; }
