/* Home: the journey scroll story (index.html #journey, assets/pages/journey.js). Split out of index.css on 12 Oct 2026. */
/* ---------- JOURNEY: pinned line-drawing story (oil rig, house, hospital, school, people; assets/pages/journey.js) ---------- */
.journey { position: relative; background: var(--bg); color: var(--fg); }
.jr-stage {
  position: relative; overflow: hidden; isolation: isolate;
  height: 100vh; height: 100svh; min-height: 560px;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: calc(var(--nav-h) + 14px) 0 calc(36px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 90% at 50% 0%, #0B2545 0%, #061629 45%, var(--navy-950) 100%);
}
.jr-svg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; overflow: hidden; }
.jr-svg .ln { fill: none; stroke: var(--teal-300); stroke-width: var(--sw, 2.2); stroke-linecap: round; stroke-linejoin: round; opacity: .92; }
.jr-svg .ln2 { fill: none; stroke: var(--teal-300); stroke-width: calc(var(--sw, 2.2) * .6); stroke-linecap: round; stroke-linejoin: round; opacity: .5; }
.jr-svg .solid { fill: #030F1E; stroke: none; }
.jr-svg .glow { fill: #FFE6B3; stroke: none; }
.jr-svg .jr-halo { fill: rgba(255, 214, 150, .16); stroke: none; }
.jr-star { fill: #EAF1F3; }
.jr-star.tw { animation: jrTw 3.2s ease-in-out infinite alternate; }
@keyframes jrTw { from { opacity: .25; } to { opacity: .9; } }
.jr-moon-glow { fill: rgba(234, 241, 243, .07); }
.jr-moon-c { fill: #EAF1F3; filter: drop-shadow(0 0 10px rgba(234, 241, 243, .5)); }
.jr-sky, .jr-clouds, .jr-sun, .jr-sun-rays { display: none; }   /* the daytime sky, clouds and sun (light mode, at the end) */
.jr-hz { stroke: var(--teal-300); stroke-width: calc(var(--sw, 2.2) * .7); opacity: .7; }
.jr-gl { stroke: var(--teal-300); stroke-width: calc(var(--sw, 2.2) * .45); fill: none; }
/* until the script takes over (or without it), only the first scene shows, fully drawn */
.jr-scene:not([data-scene="0"]) { opacity: 0; }
.journey.is-ready .jr-scene { opacity: 1; }
.jr-shade { position: absolute; inset: auto 0 0 0; height: 58%; z-index: -1; pointer-events: none; background: radial-gradient(55% 75% at 0% 100%, rgba(2, 11, 23, .72), rgba(2, 11, 23, 0) 72%), linear-gradient(rgba(2, 11, 23, 0), rgba(2, 11, 23, .55) 45%, rgba(2, 11, 23, .9)); }

.jr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.jr-titles { display: grid; gap: 12px; min-width: 0; }
.jr-title { font-size: var(--t-xl); font-weight: 800; font-stretch: 112%; line-height: 1.05; max-width: 22ch; }
.jr-hint { display: none; align-items: center; gap: 10px; color: var(--fg-muted); padding-top: 4px; transition: opacity .6s var(--ease); }
.jr-hint svg { animation: jrBob 1.8s var(--ease) infinite; }
@keyframes jrBob { 50% { transform: translateY(4px); } }
.journey.is-live .jr-hint { display: inline-flex; }

.jr-foot { grid-row: 3; display: grid; gap: clamp(18px, 3vh, 30px); }
.jr-caps { display: grid; }
.jcap { grid-area: 1 / 1; display: grid; gap: 12px; align-content: end; min-width: 0; opacity: 0; transform: translateY(-16px); transition: opacity .22s linear, transform .4s var(--ease); pointer-events: none; }
.jcap.is-on { opacity: 1; transform: none; pointer-events: auto; transition: opacity .5s var(--ease) .18s, transform .8s var(--ease) .18s; }
.jcap.is-on ~ .jcap:not(.is-on) { transform: translateY(26px); }
.jcap-label { color: var(--accent); }
.jcap-label::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; margin-right: 10px; vertical-align: 1px; }
.jcap-title { font-size: clamp(1.9rem, .9rem + 3.1vw, 4.3rem); font-weight: 900; font-stretch: 118%; line-height: .95; letter-spacing: -.028em; max-width: 16ch; }
.jcap-text { color: rgba(var(--fg-rgb), .82); max-width: 46ch; }
.jcap-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }

/* track: five stops on one line */
/* the track ends short of the Ask SAA button so the last stop stays visible */
.jr-track { position: relative; list-style: none; margin: 0 max(0px, calc(236px - var(--gutter) - max(0px, (100vw - 1432px) / 2))) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
.jr-track li { position: relative; z-index: 1; min-width: 0; display: flex; justify-content: center; }
.jr-track li:first-child { justify-content: flex-start; } .jr-track li:nth-child(5) { justify-content: flex-end; }
.jt-bar { position: absolute !important; left: 0; right: 0; top: 6px; height: 1px; z-index: 0 !important; background: rgba(var(--fg-rgb), .18); }
.jt-fill { position: absolute; left: 0; top: -.5px; width: 100%; height: 2px; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--teal-100), var(--teal-300) 50%, var(--teal)); box-shadow: 0 0 12px var(--glow); }
.jt-stop { display: grid; justify-items: center; gap: 10px; padding: 0 4px 4px; background: none; border: 0; color: var(--fg-faint); cursor: pointer; font: inherit; min-height: 44px; }
.jr-track li:first-child .jt-stop { justify-items: start; padding-left: 0; } .jr-track li:nth-child(5) .jt-stop { justify-items: end; padding-right: 0; }
.jt-stop i { width: 13px; height: 13px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px rgba(var(--fg-rgb), .45); transition: background-color .4s var(--ease), box-shadow .4s var(--ease); }
.jt-stop span { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: color .4s var(--ease); }
.jt-stop.is-past i { background: var(--teal); box-shadow: inset 0 0 0 1.5px var(--teal); }
.jt-stop.is-on i { background: var(--accent-fill); box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .16), 0 0 18px var(--accent-fill); }
.jt-stop.is-on span, .jt-stop:hover span { color: var(--fg); }
.jt-stop:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 8px; }

@media (max-width: 860px) {
  .jr-stage { padding-top: calc(var(--nav-h) + 6px); }
  .jr-title { font-size: 1.35rem; }
  .jr-hint { font-size: .62rem; }
  .jcap { gap: 10px; }
  .jcap-title { font-size: clamp(1.8rem, 8.4vw, 2.4rem); }
  .jcap-text { font-size: .95rem; }
  /* phones: only the current stop keeps its label */
  .jt-stop span { opacity: 0; }
  .jt-stop.is-on span { opacity: 1; }
  .jr-track li:nth-child(2) .jt-stop.is-on, .jr-track li:nth-child(3) .jt-stop.is-on, .jr-track li:nth-child(4) .jt-stop.is-on { position: relative; }
}
@media (max-width: 520px) { .jr-track { margin-right: 64px; } }
@media (prefers-reduced-motion: reduce) {
  .jcap, .jcap.is-on { transition: opacity .2s linear; transform: none; }
  .jr-star.tw, .jr-hint svg { animation: none; }
}

/* ---------- Light mode: the same journey by day ----------
   A morning sky (the .jr-sky rect and its #jrDay gradient in index.html, drawn in scene units so the warm haze
   always sits on the horizon; its top stays light enough for the teal eyebrow, 4.7:1), deep teal line work,
   .solid fills painted with that same sky so they still hide the lines behind, line-drawn clouds instead of
   stars, the moon swapped for a sun (same group, so the same position logic in journey.js), warm lights toned
   down, and a light scrim behind the captions. Everything here is CSS, so the header switch repaints it live. */
:root[data-theme="light"] .jr-stage { background: linear-gradient(#D2E7EE, #E0EDF0 40%, #EEF2EE 66%, #EDF3F3); }
:root[data-theme="light"] .jr-sky { display: inline; fill: url(#jrDay); }
:root[data-theme="light"] .jr-svg .ln { stroke: var(--teal-ink); opacity: .9; }
:root[data-theme="light"] .jr-svg .ln2 { stroke: var(--teal-ink); opacity: .5; }
:root[data-theme="light"] .jr-svg .solid { fill: url(#jrDay); }
:root[data-theme="light"] .jr-svg .glow { fill: #EBA43C; }
:root[data-theme="light"] .jr-svg .jr-halo { fill: rgba(235, 164, 60, .18); }
:root[data-theme="light"] .jr-stars, :root[data-theme="light"] .jr-moon-c { display: none; }
:root[data-theme="light"] .jr-clouds { display: inline; }
:root[data-theme="light"] .jr-cloud { fill: rgba(255, 255, 255, .6); stroke: var(--teal-ink); stroke-opacity: .32; stroke-width: calc(var(--sw, 2.2) * .7); }
:root[data-theme="light"] .jr-cloud-l { fill: none; stroke: var(--teal-ink); stroke-opacity: .24; stroke-width: calc(var(--sw, 2.2) * .6); stroke-linecap: round; }
:root[data-theme="light"] .jr-moon-glow { fill: url(#jrSunGlow); transform: scale(2.3); transform-box: fill-box; transform-origin: center; }
:root[data-theme="light"] .jr-sun { display: inline; fill: #FFD685; stroke: #E09A35; stroke-width: calc(var(--sw, 2.2) * .8); }
:root[data-theme="light"] .jr-sun-rays { display: inline; fill: none; stroke: #E09A35; stroke-width: calc(var(--sw, 2.2) * .7); stroke-linecap: round; opacity: .75; }
:root[data-theme="light"] .jr-hz { stroke: var(--teal-ink); opacity: .6; }
:root[data-theme="light"] .jr-gl { stroke: var(--navy-700); stroke-opacity: .5; }
:root[data-theme="light"] .jr-shade { background: radial-gradient(55% 75% at 0% 100%, rgba(var(--bg-rgb), .8), rgba(var(--bg-rgb), 0) 72%), linear-gradient(rgba(var(--bg-rgb), 0), rgba(var(--bg-rgb), .6) 45%, rgba(var(--bg-rgb), .92)); }
/* a soft daylight halo keeps the small labels clean where the sun's rays or a cloud pass behind them */
:root[data-theme="light"] .jr-hint, :root[data-theme="light"] .jr-head .eyebrow { text-shadow: 0 0 3px rgba(var(--deep-rgb), .9), 0 0 12px rgba(var(--deep-rgb), .8); }
/* the construction crane's jib slides in behind the heading: the same halo keeps the navy type from reading as struck through */
:root[data-theme="light"] .jr-title { text-shadow: 0 0 4px rgba(var(--deep-rgb), .95), 0 0 16px rgba(var(--deep-rgb), .85); }
/* portrait framing (journey.js): the sun sits lower and a little left, clear of the "Scroll to travel" hint */
@media (max-aspect-ratio: 1/1) {
  :root[data-theme="light"] .jr-moon > * { translate: -40px 80px; }
}
:root[data-theme="light"] .jt-fill { background: linear-gradient(90deg, var(--teal-400), var(--teal) 50%, var(--teal-ink)); }
/* track stops keep 3:1 on the light scrim: a firmer ring, and the display teal for visited and current stops */
:root[data-theme="light"] .jt-stop:not(.is-past):not(.is-on) i { box-shadow: inset 0 0 0 1.5px rgba(var(--fg-rgb), .58); }
:root[data-theme="light"] .jt-stop.is-past i { background: var(--teal-display); box-shadow: inset 0 0 0 1.5px var(--teal-display); }
:root[data-theme="light"] .jt-stop.is-on i { background: var(--teal-display); }
