/* Eye of Light – the journey on the About page (first made for v9): the flight's canvas, its captions, a hairline of
   progress, the way out, and the hand-off in which the night parts and the paper page arrives. Loaded after theme.css. */

/* the flight's canvas: fixed behind everything, gone once the paper takes over */
body.has-journey #space { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; background: #050103; transition: opacity 2.4s ease; }
body.has-journey #space.parted { opacity: 0; pointer-events: none; }

/* while the journey flies, the page is held back */
body.has-journey.is-journey .site-header, body.has-journey.is-journey #main, body.has-journey.is-journey .site-footer { opacity: 0; transform: translateY(18px); }
body.has-journey.is-journey { overflow: hidden; height: 100vh; }
body.has-journey.is-journey::before, body.has-journey.is-journey .paper-life { opacity: 0; }
body.has-journey #main, body.has-journey .site-footer { transition: opacity 1.6s ease .2s, transform 1.6s var(--ease) .2s; }
body.has-journey .site-header { transition: opacity 1.6s ease .2s, transform 1.6s var(--ease) .2s, background-color .9s var(--ease), box-shadow .9s var(--ease), backdrop-filter .9s var(--ease); }
body.has-journey.revealed::before, body.has-journey.revealed .paper-life { opacity: 1; transition: opacity 2.2s ease; }
body.has-journey #main { position: relative; z-index: 1; }

/* ---------- the journey overlay */
#journey { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
#journey.gone { opacity: 0; transition: opacity 1.4s ease; }
.journey__caption {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0;
  font: italic 500 clamp(20px, 3.4vw, 40px)/1.28 var(--serif); letter-spacing: .04em;
  color: #FFF3E2; text-align: center; max-width: min(86vw, 780px); text-wrap: balance;
  text-shadow: 0 0 26px rgba(236, 200, 111, .4), 0 2px 22px rgba(0, 0, 0, .8);
  opacity: 0; transition: opacity .7s ease;
}
.journey__caption.on { opacity: 1; }
.journey__caption small { display: block; margin-top: .7em; font: 400 12.5px/1.5 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: #D9A98A; }
.journey__bar { position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%); width: min(280px, 52vw); height: 1px; background: rgba(236, 200, 111, .18); overflow: hidden; }
.journey__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #C8102E, var(--gold-2)); box-shadow: 0 0 12px rgba(236, 200, 111, .8); }
.journey__hint {
  position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); margin: 0;
  font: 400 10.5px/1.4 var(--sans); letter-spacing: .4em; text-transform: uppercase; color: #C79A76;
  opacity: .85; animation: hintPulse 3.2s ease-in-out infinite;
}
@keyframes hintPulse { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }

/* the way out: small and quiet, bottom right */
.journey__skip {
  position: fixed; right: 20px; bottom: 22px; z-index: 95;
  background: transparent; color: #E8C79E; border: 1px solid rgba(236, 200, 111, .35);
  font: 400 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: all .35s ease;
}
.journey__skip:hover { color: #FFF4E4; border-color: var(--gold-2); box-shadow: 0 0 24px rgba(236, 200, 111, .28); }
.journey__skip[hidden] { display: none; }

/* fly again, under the page's title */
.journey__replay { background: none; border: 0; cursor: pointer; margin-top: 16px; padding: 6px 2px;
  font: 400 12px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--accent-ink, #9C0A22); transition: color .3s; }
.journey__replay:hover { color: var(--accent, #C8102E); }

@media (prefers-reduced-motion: reduce) {
  body.has-journey #main, body.has-journey .site-footer, body.has-journey .site-header { transition: none; }
  .journey__caption { transition: opacity .3s ease; }
  .journey__hint { animation: none; }
}
