/* The paper, clouds and teddy share one scene; every reading surface stays above it. */
#invitation { z-index:auto; isolation:auto; background:transparent; }
#invitation > .site-header,
#invitation > .hero,
#invitation > .love-note,
#invitation > .details,
#invitation > .wish,
#invitation > .rsvp,
#invitation > footer { position:relative; z-index:5; }
#invitation > #moon-destination { z-index:auto; }
#moon-destination > :not(.moon-scene) { position:relative; z-index:5; }
.journey-bear {
  position:fixed; left:0; top:0; z-index:2; display:block;
  width:230px; height:auto; padding:0; margin:0; border:0;
  background:transparent; border-radius:45%;
  transform-origin:43% 96.5%; will-change:transform;
  pointer-events:none; touch-action:pan-y; user-select:none;
  -webkit-user-select:none; transition:none;
  opacity:var(--traveller-opacity,.34);
  filter:blur(var(--traveller-blur,3px));
}
.journey-bear .journey-figure { display:block; width:100%; transform-origin:43% 96.5%; animation:traveller-bob 7s ease-in-out infinite; }
.journey-bear img { display:block; width:100%; height:auto; pointer-events:none; -webkit-user-drag:none; }
.journey-bear:focus-visible { outline:2px solid #b89961; outline-offset:7px; }
.journey-bear[data-state="launching"] .journey-figure { animation:none; }
.journey-bear[data-state="landed"] { pointer-events:auto; }
.journey-bear[data-state="landed"] .journey-figure { animation:none; transform:none; }
.journey-bear.is-hugging .journey-figure { animation:traveller-hug .65s ease; }
.journey-active .cover-teddy,.journey-active #teddy-hug { visibility:hidden!important; pointer-events:none!important; }
@keyframes traveller-bob { 0%,100% { transform:translateY(0) rotate(-.4deg); } 50% { transform:translateY(var(--flight-bob,-4px)) rotate(.5deg); } }
@keyframes traveller-hug { 0%,100% { transform:rotate(0) scale(1); } 35% { transform:rotate(-4deg) scale(1.045); } 70% { transform:rotate(3deg) scale(1.015); } }
.journey-clouds { position:static; width:0; height:0; pointer-events:none; }
.journey-cloud-layer { position:fixed; inset:0; overflow:hidden; pointer-events:none; opacity:0; transition:opacity .7s ease; }
.journey-cloud-layer-back { z-index:1; }
.journey-cloud-layer-front { z-index:3; }
.journey-active .journey-cloud-layer { opacity:1; }
.journey-cloud { display:block; position:absolute; left:0; top:0; width:160px; height:43px; border-radius:50%; background:radial-gradient(ellipse at 50% 22%,#fffefbf2 0,#f7f4edd9 44%,#e7dfd39e 83%,transparent 100%); filter:blur(1.4px); opacity:.62; will-change:transform; }
.journey-cloud::before,.journey-cloud::after,.journey-cloud i { content:""; display:block; position:absolute; border-radius:50%; background:radial-gradient(ellipse at 45% 25%,#fffffcf5,#f8f5eee6 70%,#e4ddd28c); }
.journey-cloud::before { left:11%; top:-16px; width:43%; height:44px; }
.journey-cloud::after { left:38%; top:-25px; width:45%; height:52px; }
.journey-cloud i { right:1%; top:-6px; width:35%; height:37px; }
.journey-cloud-near { height:29px; opacity:.55; filter:blur(2px); }
.journey-cloud-near::before { height:32px; top:-10px; }
.journey-cloud-near::after { height:37px; top:-17px; }
.journey-cloud-near i { height:27px; }
/* The final cloud bed belongs to the document, so landing remains exact at any height. */
.journey-ready #moon-destination.storybook-reveal { opacity:1; transform:none; transition:none; }
.moon-scene { position:relative; z-index:1; width:min(100%,350px); aspect-ratio:1; margin:7px auto 16px; isolation:isolate; }
.landing-moon { display:block; width:100%; height:100%; object-fit:contain; }
#moon-landing-point { position:absolute; left:51%; top:78%; width:0; height:0; pointer-events:none; }
.moon-scene::after { content:""; position:absolute; left:24%; right:20%; top:76%; height:14%; background:radial-gradient(ellipse,#e4ca853d,transparent 68%); border-radius:50%; opacity:0; transition:opacity .7s ease; pointer-events:none; }
.journey-landed .moon-scene::after { opacity:1; }
.journey-ready #moon-destination { padding-top:42px; }
@media(max-width:760px) { .moon-scene { width:min(100%,330px); } }
.motion-paused .journey-figure,.page-away .journey-figure { animation-play-state:paused!important; }
.motion-paused .journey-cloud-layer,.motion-paused .moon-scene::after { transition:none; }
@media(prefers-reduced-motion:reduce) { body:not(.motion-running) .journey-figure { animation:none!important; } body:not(.motion-running) .journey-cloud-layer,body:not(.motion-running) .moon-scene::after { transition:none; } }
