/* Home "Everywhere I've been": section card with a preview globe, and the fullscreen travel map (public/js/travel.js).
   Space is always dark in both themes: --ink background, --cream text. Tokens only. */

/* ── section ── */
.travels__card { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; min-height: clamp(420px, 60vh, 560px); border-radius: var(--radius-lg); cursor: pointer;
  background: radial-gradient(ellipse at 30% 55%, color-mix(in srgb, var(--sky) 30%, var(--ink)) 0%, var(--ink) 70%); box-shadow: var(--shadow-glass); }
.travels__preview { position: absolute; inset: 0 50% 0 0; width: 50%; height: 100%; opacity: 0; transition: opacity 1.2s ease, transform 1.2s var(--ease-out); transform: scale(.92); }
.travels.is-live .travels__preview { opacity: 1; transform: none; }
.travels__card:hover .travels__preview { transform: scale(1.03); }
.travels__text { grid-column: 2; margin: clamp(16px, 3vw, 32px); cursor: auto; }
.travels__text h2 { margin-bottom: .35em; }
.travels__lede { color: var(--cream); font-size: 1.05rem; line-height: 1.55; max-width: 40ch; }
.travels__stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 1.2em 0 1.6em; padding: 0; list-style: none; color: var(--cream); font-size: .92rem; }
.travels__stats strong { display: block; font: 400 1.9rem/1.1 var(--font-display); color: var(--sand); }
.travels__launch .nav-ico { width: 20px; height: 20px; }
.travels__text .eyebrow { color: var(--sand); }
@media (max-width: 767px) {
  .travels__card { grid-template-columns: 1fr; grid-template-rows: 300px auto; }
  .travels__preview { inset: 0 0 auto 0; width: 100%; height: 300px; }
  .travels__text { grid-column: 1; grid-row: 2; }
}

/* ── fullscreen explorer ── */
.travel-open body { overflow: hidden; }
.travel-x { position: fixed; inset: 0; z-index: 300; overflow: hidden; color: var(--cream);
  background: radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--sky) 22%, var(--ink)) 0%, var(--ink) 65%);
  opacity: 0; transform: scale(1.03); transition: opacity .45s ease, transform .6s var(--ease-out); }
.travel-x[hidden] { display: none; }
.travel-x.is-in { opacity: 1; transform: none; }
.travel-x__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.travel-x__canvas:active { cursor: grabbing; }
.travel-x__portal { position: absolute; left: 50%; top: 50%; width: min(42vmin, 320px); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; overflow: hidden;
  clip-path: circle(0% at 50% 50%); transition: clip-path .9s var(--ease-out); box-shadow: 0 0 0 3px var(--cream), 0 30px 80px color-mix(in srgb, var(--ink) 70%, transparent); pointer-events: none; }
.travel-x__portal.is-open { clip-path: circle(50% at 50% 50%); } /* never takes the pointer: the map under it handles drag, zoom and tap-to-close */
.travel-x__portal img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); transition: transform 2.2s var(--ease-out); }
.travel-x__portal.is-open img { transform: scale(1); }

.travel-x__top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: max(16px, env(safe-area-inset-top)) var(--gutter) 0; pointer-events: none; }
.travel-x__side { display: grid; gap: 10px; justify-items: start; max-width: min(440px, 70vw); }
.travel-x__where { pointer-events: auto; padding: 12px 18px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--ink) 62%, transparent); border: 1px solid color-mix(in srgb, var(--cream) 22%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); max-width: min(440px, 70vw); }
.travel-x__label { margin: 0 0 .3em; font: 600 .72rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--sand); }
.travel-x__here { margin: 0; font: 400 clamp(1.3rem, 3vw, 1.8rem)/1.15 var(--font-display); color: var(--cream); }
.travel-x__here strong { font-weight: 400; color: var(--cream); }
.travel-x__note { margin: .3em 0 0; font-size: .92rem; color: var(--cream); opacity: .85; }
.travel-x__close { pointer-events: auto; display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--cream) 40%, transparent); background: color-mix(in srgb, var(--ink) 55%, transparent); color: var(--cream); cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.travel-x__tools { display: flex; gap: 10px; flex: none; }
.travel-x__sound[aria-pressed="true"] .off, .travel-x__sound[aria-pressed="false"] .on { display: none; }
.travel-x__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.travel-x__close:focus-visible, .travel-x__rail button:focus-visible, .travel-x__zoom button:focus-visible, .travel-x__fact-next:focus-visible { outline-color: var(--cream); }

/* fun facts for the current place */
.travel-x__fact { pointer-events: auto; max-width: min(380px, 70vw); padding: 12px 16px 12px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--ink) 62%, transparent); border: 1px solid color-mix(in srgb, var(--sand) 40%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: opacity .3s ease; }
.travel-x__fact[hidden] { display: none; }
.travel-x__fact.is-new { animation: trip-in .45s var(--ease-out) both; }
.travel-x.is-traveling .travel-x__fact { opacity: 0; visibility: hidden; }
.travel-x__fact-label { display: flex; align-items: center; gap: 6px; margin: 0 0 .4em; font: 600 .72rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--sand); }
.travel-x__fact-label svg { width: 14px; height: 14px; fill: currentColor; }
.travel-x__fact-label span { margin-left: auto; letter-spacing: .05em; text-transform: none; font-weight: 500; opacity: .8; }
.travel-x__fact-text { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--cream); }
.travel-x__fact-next { margin-top: .6em; padding: 4px 0; border: 0; background: none; color: var(--sand); font: 600 .85rem/1.2 var(--font-body); cursor: pointer; }
.travel-x__fact-next:hover { text-decoration: underline; text-underline-offset: 3px; }
.travel-x__fact-next[hidden] { display: none; }

/* zoom controls */
.travel-x__zoom { position: absolute; right: var(--gutter); top: 50%; translate: 0 -50%; display: grid; gap: 1px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid color-mix(in srgb, var(--cream) 30%, transparent); background: color-mix(in srgb, var(--cream) 20%, transparent); }
.travel-x__zoom button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: color-mix(in srgb, var(--ink) 70%, transparent); color: var(--cream); cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .2s ease; }
.travel-x__zoom button:hover { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.travel-x__zoom svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.travel-x.is-traveling .travel-x__zoom { opacity: .5; pointer-events: none; }

/* trip card: mode, route, km counter, progress */
.travel-x__trip { position: absolute; left: 50%; top: max(110px, 16vh); translate: -50% 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 14px; min-width: min(360px, calc(100vw - 2 * var(--gutter)));
  padding: 12px 18px 14px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--ink) 70%, transparent); border: 1px solid color-mix(in srgb, var(--cream) 22%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: trip-in .45s var(--ease-out) both; }
.travel-x__trip[hidden] { display: none; }
@keyframes trip-in { from { opacity: 0; transform: translateY(-8px); } }
.travel-x__mode-ico { grid-row: 1; width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: var(--sand); color: var(--ink); fill: currentColor; stroke: none; }
.travel-x__mode-ico[data-mode-ico="train"] { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.travel-x__trip[data-mode="plane"] [data-mode-ico="train"], .travel-x__trip[data-mode="train"] [data-mode-ico="plane"] { display: none; }
.travel-x__route { margin: 0; font-weight: 600; color: var(--cream); }
.travel-x__stats { margin: 0; font-size: .88rem; color: var(--cream); opacity: .9; font-variant-numeric: tabular-nums; }
.travel-x__stats [data-km] { font-weight: 700; color: var(--sand); }
.travel-x__bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--cream) 20%, transparent); overflow: hidden; }
.travel-x__bar span { display: block; height: 100%; background: var(--sand); transform-origin: left; transform: scaleX(0); }

/* rail of places */
.travel-x__rail { position: absolute; left: 0; right: 0; bottom: max(34px, calc(env(safe-area-inset-bottom) + 24px)); }
.travel-x__rail ul { display: flex; gap: 10px; margin: 0; padding: 6px var(--gutter); list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.travel-x__rail ul::-webkit-scrollbar { display: none; }
.travel-x__rail li { flex: none; scroll-snap-align: center; }
.travel-x__rail button { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 16px 6px 6px; border-radius: var(--radius-pill); border: 1px solid color-mix(in srgb, var(--cream) 25%, transparent);
  background: color-mix(in srgb, var(--ink) 62%, transparent); color: var(--cream); font: inherit; text-align: left; cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.travel-x__rail button:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--cream) 55%, transparent); }
.travel-x__rail button[aria-current="true"] { background: var(--sand); color: var(--ink); border-color: var(--sand); }
.travel-x__rail strong { display: block; font-size: .95rem; line-height: 1.2; }
.travel-x__rail small { display: block; font-size: .78rem; opacity: .85; white-space: nowrap; }
.travel-x__thumb { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--thumb, none) center / cover, color-mix(in srgb, var(--cream) 20%, transparent); }
.travel-x.is-traveling .travel-x__rail button { opacity: .6; pointer-events: none; }
.travel-x__hint { position: absolute; left: 0; right: 0; bottom: max(8px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font-size: .78rem; color: var(--cream); opacity: .75; pointer-events: none; }
@media (max-width: 1240px) { .travel-x__trip { top: auto; bottom: 120px; } } /* below the facts, which would overlap it */
@media (max-width: 600px) {
  .travel-x__zoom { top: auto; bottom: 224px; translate: none; }
  .travel-x__hint-wide { display: none; }
  .travel-x__fact { padding: 10px 14px; }
  .travel-x__fact-text { font-size: .88rem; }
}

/* ── interstitials (public/js/travel-scenes.js): boarding and arriving ──
   Themed like the rest of the site: a bright cabin / carriage in light, a dim warm one in dark. The --*-at / --*-ms
   times come from the CUES table in the script, shared with the sounds. */
.scene { --body: color-mix(in srgb, var(--cream) 88%, var(--sand)); --panel: color-mix(in srgb, var(--bg) 86%, var(--sand)); --line: color-mix(in srgb, var(--ink) 34%, var(--sand));
  --carpet: color-mix(in srgb, var(--sky) 42%, var(--ink)); --seat: color-mix(in srgb, var(--sky) 72%, var(--ink)); --lit: color-mix(in srgb, var(--cream) 78%, var(--sand));
  position: absolute; inset: 0; z-index: 5; overflow: hidden; cursor: pointer; background: var(--bg); color: var(--text); animation: scene-in .28s ease both; }
:root[data-theme="dark"] .scene { --body: color-mix(in srgb, var(--cream) 30%, var(--ink)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .scene { --body: color-mix(in srgb, var(--cream) 30%, var(--ink)); } }
.scene.is-out { opacity: 0; transition: opacity .3s ease; pointer-events: none; }
@keyframes scene-in { from { opacity: 0; } }
.scene__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene__art g { transform-box: view-box; transform-origin: 800px 520px; }
.scene__bloom { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, var(--cream), color-mix(in srgb, var(--sand) 60%, transparent) 60%, transparent); opacity: 0; pointer-events: none; }
.scene__card { position: absolute; left: 50%; bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px)); translate: -50% 0; width: max-content; max-width: calc(100vw - 2 * var(--gutter)); padding: 14px 24px 16px; text-align: center; animation: trip-in .5s var(--ease-out) .12s both; }
.scene__label { margin: 0 0 .45em; font: 600 .72rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--link); }
.scene__place { margin: 0; font: 400 clamp(1.25rem, 3vw, 1.8rem)/1.15 var(--font-display); color: var(--heading); }
.scene__card, .scene__skip { background: color-mix(in srgb, var(--bg) 78%, transparent); }
.scene__skip { position: absolute; top: max(16px, env(safe-area-inset-top)); right: var(--gutter); min-height: 48px; padding: 0 20px; border-radius: var(--radius-pill); color: var(--text); font: 600 .9rem/1 var(--font-body); cursor: pointer; }

.s-body { fill: var(--body); } .s-wall, .s-ceil { fill: var(--panel); }
.s-side { fill: color-mix(in srgb, var(--panel) 82%, var(--ink)); }
.s-inner { fill: color-mix(in srgb, var(--panel) 78%, var(--sand)); }
.s-bin { fill: color-mix(in srgb, var(--panel) 90%, var(--cream)); stroke: var(--line); stroke-width: 2; }
.s-binline { fill: none; stroke: var(--line); stroke-width: 4; opacity: .5; }
.s-roof, .s-platform { fill: color-mix(in srgb, var(--ink) 78%, var(--sand)); } .s-edge { fill: var(--ochre); }
.s-floor { fill: var(--carpet); } .s-sill { fill: color-mix(in srgb, var(--line) 80%, var(--cream)); }
.s-leaf-body { fill: color-mix(in srgb, var(--body) 86%, var(--sky)); stroke: var(--line); stroke-width: 3; }
.s-stripe { fill: var(--terracotta); } .s-seal { fill: var(--ink); }
.s-frame { fill: none; stroke: var(--line); stroke-width: 12; }
.s-rib { fill: none; stroke: var(--line); stroke-width: 7; opacity: .4; }
.s-glass, .s-window, .s-sky { fill: color-mix(in srgb, var(--sky) 52%, var(--cream)); }
.s-glass { fill-opacity: .62; stroke: var(--glass-border); stroke-width: 5; } .s-window { stroke: var(--line); stroke-width: 4; }
.s-shine { stroke: var(--cream); stroke-width: 10; stroke-linecap: round; opacity: .5; }
.s-seat { fill: var(--seat); stroke: color-mix(in srgb, var(--seat) 60%, var(--ink)); stroke-width: 2; } .s-seat-dark { fill: color-mix(in srgb, var(--seat) 60%, var(--ink)); }
.s-headrest { fill: var(--sand); } .s-pole { fill: var(--ochre); } .s-light { fill: var(--lit); } .s-lamp { fill: var(--ochre); }
.s-handle { fill: var(--terracotta); } .s-recess { fill: color-mix(in srgb, var(--line) 50%, var(--body)); }
.s-sign { fill: var(--ink); } .s-plane { fill: var(--sand); }
.s-route { stroke: var(--sand); stroke-width: 5; } .s-stop { fill: var(--cream); } .s-stop.is-next { fill: var(--terracotta); }
.s-belt { fill: none; stroke: var(--ochre); stroke-width: 7; stroke-linecap: round; } .s-belt circle { fill: var(--ochre); stroke: none; }

/* walking in (push), doors, lever */
.scene--plane.scene--board .s-bridge { animation: s-through var(--push-ms) cubic-bezier(.5, 0, .75, .6) var(--push-at) both; }
.scene--plane.scene--board .s-cabin { animation: s-near var(--ms) ease-in-out both; }
@keyframes s-through { 80% { opacity: 1; } to { transform: scale(5.4); opacity: 0; } }
@keyframes s-near { from { transform: scale(.82); } to { transform: scale(1.25); } }
.scene--arrive .s-view { animation: s-out var(--push-ms) cubic-bezier(.5, 0, .85, .6) var(--push-at) both; }
@keyframes s-out { to { transform: scale(3.6); } }
.scene--arrive .scene__bloom { animation: s-bloom var(--push-ms) ease-in var(--push-at) both; }
@keyframes s-bloom { 45% { opacity: 0; } to { opacity: .75; } }
.s-leaf--l { --slide: -206px; } .s-leaf--r { --slide: 206px; } .s-leaf--cabin { --slide: -345px; }
.scene--arrive .s-leaf, .s-view--out .s-leaf { animation: s-slide var(--door-ms) cubic-bezier(.6, 0, .2, 1) var(--door-at) both; }
.scene--train.scene--board .s-view--in .s-leaf { animation: s-slide var(--shut-ms) cubic-bezier(.45, 0, .55, 1) var(--shut-at) reverse both; }
@keyframes s-slide { to { transform: translateX(var(--slide)); } }
.s-view--out { animation: s-step var(--push-ms) ease-in var(--push-at) both, s-gone var(--swap-ms) linear var(--swap-at) both; }
@keyframes s-step { to { transform: scale(2.1); } }
@keyframes s-gone { to { opacity: 0; } }
.scene__art .s-lever { transform-box: fill-box; transform-origin: 12% 50%; animation: s-lever var(--latch-ms) ease-in-out var(--latch-at) both; }
@keyframes s-lever { to { transform: rotate(-32deg); } }
.s-belt { animation: s-belt .3s linear .9s both; }
@keyframes s-belt { to { opacity: .22; } }

/* reduced motion: one still picture (doors open), faded in and out */
.scene.is-still * { animation: none !important; }
.scene.is-still { animation: scene-in .4s ease both; }
.scene.is-still .s-leaf { transform: translateX(var(--slide)); }
