/* The home screen's scroll cue (owner 2026-10-21: "make the button into a little scroll animation to show that you need
   to scroll; on scroll you go to the next page where the button appears", then "this should be a scroll up animation, and
   when on the next page if you scroll down you go back to the first page, smooth between the 2"). In place of the home's
   Begin your journey: a mouse outline whose wheel dot rolls up and fades, on a loop, over the word Scroll (phones: a
   chevron sinking over "Swipe down"). It fades in when the button used to (their fadeIn, 4 s in). A scroll up, a swipe
   down, the up arrow, Page Up, Space, Enter or a click moves to the Welcome page; a scroll down, a swipe up, the down
   arrow or Page Down there comes back (loader.js). The Welcome sits above the home, so the pages read as scrolled both
   ways. Reduced motion: the dot only pulses, nothing slides. */
#paoLoad { --ease-out-ui: cubic-bezier(0.23, 1, 0.32, 1); --ease-in-out-ui: cubic-bezier(0.77, 0, 0.175, 1); }

#paoLoad .pao-scroll { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: .4rem 1rem; color: var(--white);
  font-family: var(--fontFamily-title); font-size: 1.05em; letter-spacing: .4px; line-height: 1; cursor: pointer;
  animation: fadeIn 1.5s ease-in-out 4s backwards; }
#paoLoad .pao-scroll .mouse { position: relative; width: 26px; height: 40px; box-sizing: border-box; border: 1.5px solid currentColor; border-radius: 13px; }
#paoLoad .pao-scroll .wheel { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: currentColor;
  animation: pao-wheel 1.6s var(--ease-in-out-ui) infinite; }
#paoLoad .pao-scroll .chev { display: none; width: 22px; height: 22px; animation: pao-chev 1.6s var(--ease-in-out-ui) infinite; }
#paoLoad .pao-scroll .chev svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#paoLoad .pao-scroll .label { opacity: .85; transition: opacity .2s ease; }
#paoLoad .pao-scroll .label-touch { display: none; }
@keyframes pao-wheel { 0% { transform: translateY(13px); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(2px); opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes pao-chev { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateY(4px); opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }
@media (hover: hover) and (pointer: fine) { #paoLoad .pao-scroll:hover .label { opacity: 1; } }
@media (pointer: coarse) {
  #paoLoad .pao-scroll .mouse, #paoLoad .pao-scroll .label-mouse { display: none; }
  #paoLoad .pao-scroll .chev, #paoLoad .pao-scroll .label-touch { display: block; }
}

/* the page change reads as a scroll up, and back as a scroll down: the Welcome sits above the home. On: the home's words
   sink 8vh as they fade and the Welcome comes down into place. Back (.is-back): the Welcome rises away as it fades and the
   home's words come up into place. Both ways the page leaving goes at once and the page arriving 0.3 s after it */
#paoLoad .home .titleContainer, #paoLoad .home .buttonContainer { transition: translate 1.2s var(--ease-out-ui); }
#paoLoad.is-welcome .home .titleContainer, #paoLoad.is-welcome .home .buttonContainer { translate: 0 8vh; }
#paoLoad.is-back:not(.is-welcome) .home .titleContainer, #paoLoad.is-back:not(.is-welcome) .home .buttonContainer { transition-delay: .3s; }
#paoLoad .welcome .container { translate: 0 -8vh; transition: translate 1.2s var(--ease-out-ui); }
#paoLoad.is-welcome .welcome .container { translate: 0 0; transition-delay: .3s; }
/* the page leaving keeps its place while its letters go out backwards (loader.js lettersOut, about 1 s), then fades in half a
   second; its button fades at once. The home comes back over 1.2 s after 0.3 s (its very first showing is at once, hud.css) */
#paoLoad.is-welcome .home { transition: opacity .5s ease-in-out .75s; }
#paoLoad.is-back:not(.is-welcome) .welcome { transition: opacity .5s ease-in-out .75s; }
#paoLoad.is-back:not(.is-welcome) .welcome .buttonContainer > * { animation: none; opacity: 0; transition: opacity .3s ease; }
#paoLoad.is-welcome .home .buttonContainer > * { opacity: 0; transition: opacity .3s ease; }
#paoLoad.is-back.is-home:not(.is-welcome) .home { transition-duration: 1.2s; transition-delay: .3s; }
/* a swipe down turns the page on phones: never the browser's pull-to-refresh while the opening shows */
html:has(body.pao-loading), body.pao-loading { overscroll-behavior-y: none; }
#paoLoad { touch-action: none; }

@media (prefers-reduced-motion: reduce) {
  #paoLoad .pao-scroll .wheel, #paoLoad .pao-scroll .chev { animation: pao-pulse 2s ease infinite; }
  @keyframes pao-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
  #paoLoad .home .titleContainer, #paoLoad .home .buttonContainer, #paoLoad .welcome .container { transition: none; translate: none; }
}

/* Travel (owner 2026-10-21: "when the button is clicked the text should not animate out, it should just go to the loading
   screen, nothing animates out"): both pages gone in the same frame, whatever turned before (the rules above for going back
   outrank hud.css's own instant cut, so this one is !important) */
#paoLoad.is-black .home, #paoLoad.is-black .welcome { transition: none !important; animation: none !important; opacity: 0 !important; }

/* the near ground's shading (hud.css .home::before: the bottom and the sides darker) belongs to the opening as a whole, under
   both pages (owner 2026-10-21: "the ground gets brighter lighting when you scroll up to the next scene, I want it to stay the
   same brightness all the way through"): it went with the home page as it faded, so the ground brightened on the way to the
   Welcome. Now it shows from the moment the home does until Travel */
#paoLoad .home::before { display: none; }
#paoLoad::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0;
  background: linear-gradient(to bottom, rgba(6, 8, 32, 0) 42%, rgba(6, 8, 32, .62) 100%), linear-gradient(to right, rgba(6, 8, 32, .55) 0%, rgba(6, 8, 32, 0) 22%, rgba(6, 8, 32, 0) 80%, rgba(6, 8, 32, .55) 100%); }
#paoLoad.is-home::before { opacity: 1; }
#paoLoad.is-black::before { opacity: 0; }
