/* Abroad journey: intro overlay (space → Lugano → route → Ruli), the interactive globe stage, spatial photos.
   Space is always dark (both themes): --ink background with --cream text. Tokens only. */

/* ── intro overlay ── */
.journey-intro { display: none; }
.journey-play .journey-intro {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--sky) 22%, var(--ink)) 0%, var(--ink) 62%);
  color: var(--cream);
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out), filter .9s var(--ease-out);
}
.journey-play body { overflow: hidden; }
.journey-intro.is-done { opacity: 0; transform: scale(1.08); filter: blur(8px); pointer-events: none; }
.journey-intro__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.journey-intro.is-live .journey-intro__canvas { opacity: 1; }
.journey-intro__text { position: absolute; left: 0; right: 0; top: max(28px, 7vh); text-align: center; padding: 0 20px; pointer-events: none; }
.journey-intro__eyebrow { margin: 0 0 .5em; font: 600 .75rem/1 var(--font-body); letter-spacing: .24em; text-transform: uppercase; color: var(--sand); }
.journey-intro__title { margin: 0; font: 400 clamp(1.7rem, 4.6vw, 3rem)/1.1 var(--font-display); color: var(--cream); animation: intro-rise 1.4s var(--ease-out) both .2s; }
.journey-intro__place { margin: .8em 0 0; min-height: 1.5em; font-size: clamp(.95rem, 2.2vw, 1.15rem); color: var(--cream); opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s var(--ease-out); }
.journey-intro__place.is-in { opacity: 1; transform: none; }
.journey-intro__place strong { color: var(--sand); font-weight: 600; }
@keyframes intro-rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

/* one dot per country along the bottom: fills in as the route reaches it */
.journey-intro__stops { position: absolute; bottom: max(70px, 10vh); left: 50%; transform: translateX(-50%); display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.journey-intro__stops li { width: 8px; height: 8px; border-radius: 50%; background: var(--cream); opacity: .25; transition: opacity .4s ease, transform .4s var(--ease-out), background .4s ease; }
.journey-intro__stops li.is-on { opacity: 1; background: var(--ochre); transform: scale(1.3); }

.journey-intro__skip { position: absolute; right: 18px; bottom: 18px; min-height: 42px; padding: .6em 1.2em; border-radius: var(--radius-pill); border: 1px solid color-mix(in srgb, var(--cream) 45%, transparent); background: color-mix(in srgb, var(--cream) 12%, transparent); color: var(--cream); font: 600 .9rem/1 var(--font-body); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.journey-intro__skip:hover { background: color-mix(in srgb, var(--cream) 22%, transparent); }
.journey-intro__skip:focus-visible { outline-color: var(--cream); }

/* ── photo portal (intro + stage): a circle that opens over the pinned place ── */
.journey-intro__portal, .journey-globe__portal {
  position: absolute; left: 50%; top: 50%; width: min(46vmin, 360px); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; overflow: hidden; pointer-events: none;
  clip-path: circle(0% at 50% 50%); transition: clip-path 1s var(--ease-out), width 1.1s var(--ease-out), border-radius 1.1s var(--ease-out), box-shadow 1s ease;
  box-shadow: 0 0 0 3px var(--cream), 0 30px 80px color-mix(in srgb, var(--ink) 70%, transparent);
}
.journey-intro__portal img, .journey-globe__portal img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transition: transform 2.4s var(--ease-out); }
.is-open:is(.journey-intro__portal, .journey-globe__portal) { clip-path: circle(50% at 50% 50%); }
.is-open:is(.journey-intro__portal, .journey-globe__portal) img { transform: scale(1); }
/* the final dive: the Ruli photo grows to fill the screen */
.journey-intro__portal.is-open[data-size="full"] { width: 160vmax; clip-path: circle(50% at 50% 50%); box-shadow: none; transition-duration: 1.3s; }

/* ── interactive globe stage (My Journey) ── */
.journey-globe {
  position: relative; isolation: isolate; overflow: hidden; margin: 0 auto clamp(24px, 4vw, 44px);
  height: clamp(420px, 70vh, 680px); border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--sky) 26%, var(--ink)) 0%, var(--ink) 70%);
  box-shadow: var(--shadow-glass); color: var(--cream);
}
.journey-globe__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.journey-globe__canvas:active { cursor: grabbing; }
.journey-globe__portal { width: min(38%, 260px); pointer-events: auto; cursor: zoom-out; }
.journey-globe__caption { position: absolute; left: 0; right: 0; top: 18px; margin: 0; text-align: center; font-size: 1.05rem; color: var(--cream); pointer-events: none; padding: 0 16px; }
.journey-globe__caption strong { color: var(--sand); font-weight: 600; }
.journey-globe__tools { position: absolute; left: 0; right: 0; bottom: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 12px; }
.journey-globe__tools .btn { min-height: 40px; padding: .55em 1.1em; font-size: .88rem; }
.journey-globe .btn--glass { background: color-mix(in srgb, var(--cream) 14%, transparent); color: var(--cream); border-color: color-mix(in srgb, var(--cream) 40%, transparent); }
.journey-globe__hint { position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; text-align: center; font-size: .8rem; color: var(--cream); opacity: .8; pointer-events: none; }
.journey-globe.is-failed .journey-globe__canvas, .journey-globe.is-failed .journey-globe__hint { display: none; }
.journey-globe .btn:focus-visible { outline-color: var(--cream); }

/* "Show on globe" on each place card */
.story-place__fly { display: inline-flex; align-items: center; gap: .4em; margin-top: 14px; min-height: 38px; padding: .45em 1em; border-radius: var(--radius-pill); border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text); font: 600 .85rem/1 var(--font-body); cursor: pointer; }
.story-place__fly:hover { background: var(--glass-bg-hover); }
.story-place__fly svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ── spatial photos: tilted back and lowered off-centre, lifted and level in the middle of the screen ──
   --sp: -1 (above) … 0 (centred) … 1 (below); --focus: 0 … 1 at centre; --tx/--ty: pointer offset on hover */
.journey-page .story-row, .journey-page .story-split, .journey-page .story-places { perspective: 1200px; }
.is-spatial:not(.reveal), .is-spatial.reveal.is-in {
  transform-style: preserve-3d; will-change: transform;
  transform:
    translate3d(0, calc(var(--sp, 0) * 18px), calc(var(--focus, 0) * 40px))
    rotateX(calc(var(--sp, 0) * 9deg + var(--ty, 0) * -6deg))
    rotateY(calc(var(--tx, 0) * 7deg))
    scale(calc(.96 + var(--focus, 0) * .04));
  box-shadow: 0 calc(10px + var(--focus, 0) * 26px) calc(30px + var(--focus, 0) * 50px) color-mix(in srgb, var(--ink) calc(14% + var(--focus, 0) * 18%), transparent);
  transition: transform .25s linear, box-shadow .25s linear !important;
}
.is-spatial .frame img { transform: scale(calc(1.08 - var(--focus, 0) * .08)) translateY(calc(var(--sp, 0) * -3%)); transition: transform .25s linear; }

@media (max-width: 767px) {
  .journey-globe { height: min(78vh, 560px); }
  .journey-globe__portal { width: 56%; }
  .is-spatial:not(.reveal), .is-spatial.reveal.is-in { transform: translate3d(0, calc(var(--sp, 0) * 10px), 0) rotateX(calc(var(--sp, 0) * 6deg)) scale(calc(.97 + var(--focus, 0) * .03)); }
}
@media (prefers-reduced-motion: reduce) {
  .journey-intro { display: none !important; }
  .is-spatial, .is-spatial .frame img { transform: none !important; }
}
