/* The Long Road: a scroll-driven painted journey. One fixed stage of paintings (or one scrubbed film once it
   exists), with HTML copy pinned in each painting's empty space. Dusk palette and type from styles.css. */
body.journey { padding: 0; background: #2C2A35; color: var(--dusk-ink); overflow-x: hidden; }
.jr-top { position: fixed; inset: 0 0 auto 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: linear-gradient(rgba(30, 28, 38, 0.55), transparent); }
.jr-top a { color: var(--dusk-ink); text-decoration: none; font-family: var(--font-display); font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
.jr-top a.jr-tag { font-family: inherit; font-weight: 500; text-shadow: none; }
.jr-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.jr-tag { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dusk-warm); border: 1px solid color-mix(in srgb, var(--dusk-warm) 50%, transparent); border-radius: 99px; padding: 3px 10px; }

.jr-stage { position: fixed; inset: 0; overflow: hidden; background: #2C2A35; }
.jr-scene, .jr-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fx, 50%) 50%; opacity: 0; will-change: transform, opacity, filter; transform-origin: var(--fx, 50%) 58%; }
.jr-video { opacity: 1; transition: object-position 1.2s ease; }
.jr-mist { position: absolute; inset: -10%; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, rgba(236, 226, 214, 0.85), rgba(170, 176, 186, 0.55) 45%, rgba(92, 102, 112, 0.0) 80%), var(--paper); }
/* Fog banks that drift past during each camera move. */
.jr-fog { position: absolute; inset: -20% -30%; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.jr-fog-far { background: radial-gradient(ellipse 38% 30% at 30% 55%, rgba(226, 222, 216, 0.75), transparent 70%), radial-gradient(ellipse 34% 26% at 72% 40%, rgba(214, 214, 220, 0.6), transparent 70%); filter: blur(18px); }
.jr-fog-near { background: radial-gradient(ellipse 30% 40% at 20% 62%, rgba(240, 234, 226, 0.9), transparent 72%), radial-gradient(ellipse 36% 34% at 58% 48%, rgba(236, 232, 228, 0.85), transparent 70%), radial-gradient(ellipse 28% 36% at 88% 66%, rgba(230, 226, 222, 0.8), transparent 72%); filter: blur(24px); }
.jr-vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 18vmin rgba(20, 18, 28, 0.55); }

/* Chapter dots, with the seal colour for the one you're in. */
.jr-nav { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 5; display: grid; gap: 9px; transition: opacity .3s; }
.jr-nav button { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--dusk-ink-2); font-size: 0.78rem; }
.jr-nav button span { opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; text-shadow: 0 1px 6px rgba(0,0,0,0.6); white-space: nowrap; }
.jr-nav button:hover span, .jr-nav button:focus-visible span { opacity: 1; transform: none; }
.jr-nav button i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--dusk-ink-2); transition: background .3s, transform .3s; }
.jr-nav button[aria-current="step"] i { border-color: var(--primary); transform: scale(1.6); }
.jr-nav button:focus-visible i { outline: 2px solid var(--dusk-warm); outline-offset: 3px; }

/* Scroll feedback: a bar across the top and a ring on the current dot, both filling through the chapter on every
   scroll tick so the page never looks frozen while a painting holds. */
.jr-progress { position: fixed; inset: 0 0 auto 0; z-index: 7; height: 3px; background: rgba(255, 247, 238, 0.12); pointer-events: none; transition: opacity .3s; }
.jr-progress i { display: block; height: 100%; background: var(--primary); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 8px color-mix(in srgb, var(--primary) 60%, transparent); }
.jr-nav button[aria-current="step"] i { background: conic-gradient(var(--primary) calc(var(--p, 0) * 1turn), color-mix(in srgb, var(--primary) 25%, transparent) 0); }

main { position: relative; z-index: 2; }
.jr-loading { position: fixed; left: 16px; bottom: 14px; z-index: 5; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--dusk-ink-2); background: rgba(36, 34, 46, 0.55); border-radius: 99px; padding: 4px 10px; }
.jr-loading[hidden] { display: none; }
.jr-intro { height: 150vh; }
.jr-ch { height: 280vh; }
/* The copy is pinned for the length of its chapter and faded by journey.js. */
.jr-copy { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 72px clamp(16px, 6vw, 96px) 48px; opacity: 0; }
.jr-copy > * { max-width: 27rem; width: 100%; }
.jr-copy > * { will-change: transform, opacity; }
.jr-copy.right { align-items: flex-end; }
.jr-copy.bottom { justify-content: flex-end; align-items: center; text-align: center; padding-bottom: 20vh; }
.jr-copy.bottom > * { max-width: 36rem; }
.jr-copy.bottom-left { justify-content: flex-end; padding-bottom: 20vh; }
.jr-copy.center { align-items: center; text-align: center; }
.jr-copy.center > * { max-width: 40rem; }
/* A soft wash of dusk behind the words, so they read on any part of the painting. */
.jr-copy::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--wash, 1); background: linear-gradient(90deg, rgba(36, 34, 46, 0.72), rgba(36, 34, 46, 0.0) 55%); }
.jr-copy.right::before { background: linear-gradient(270deg, rgba(36, 34, 46, 0.72), rgba(36, 34, 46, 0.0) 55%); }
.jr-copy.bottom::before, .jr-copy.bottom-left::before { background: linear-gradient(0deg, rgba(36, 34, 46, 0.78), rgba(36, 34, 46, 0.0) 70%); }
.jr-copy.center::before { background: radial-gradient(ellipse at 50% 50%, rgba(36, 34, 46, 0.55), rgba(36, 34, 46, 0.0) 70%); }

.jr-copy h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.6rem, 1.6rem + 5vw, 5.6rem); line-height: 1; margin: 6px 0 14px; text-shadow: 0 2px 24px rgba(0,0,0,0.45); }
.jr-copy h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.2rem); line-height: 1.05; margin: 4px 0 14px; text-wrap: balance; text-shadow: 0 2px 20px rgba(0,0,0,0.4); }
.jr-copy p { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.18rem); line-height: 1.6; color: var(--dusk-ink); margin: 0; text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.jr-copy .eyebrow, .jr-copy .era { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dusk-warm); margin: 0; }
/* The opening: the cover's brain-and-wheel, the full title and the subtitle. */
.jr-copy .jr-logo { width: clamp(150px, 30vh, 280px); margin: 0 auto 6px; }
.jr-logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55)); }
.jr-intro .jr-copy h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 4.6rem); margin: 4px 0 8px; max-width: 60rem; }
.jr-copy .jr-subtitle { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 1rem + 0.9vw, 1.6rem); line-height: 1.3; color: var(--dusk-ink); margin: 0 0 18px; }
.jr-intro .jr-copy .eyebrow { margin-bottom: 10px; }
.jr-copy .hint { margin-top: 40px; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dusk-ink-2); animation: jr-bob 2.2s ease-in-out infinite; }
@keyframes jr-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
/* Chapter seal: the cover's coral, pressed like a stamp. */
.seal { display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding-inline: 6px; border-radius: 50%; margin-bottom: 14px; background: var(--primary); color: #FFF7EE; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.04em; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.28), 0 4px 14px rgba(0,0,0,0.35); }
.jr-copy > .seal { width: auto; max-width: max-content; }
.jr-copy.bottom .seal { margin-inline: auto; }

.jr-end { position: relative; z-index: 3; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 80px 16px; background: var(--dusk); color: var(--dusk-ink); }
.jr-end img { width: 160px; height: 160px; border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.4); margin-bottom: 14px; }
.jr-end h2 { font-family: var(--font-display); font-weight: 500; font-style: italic; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem); color: var(--dusk-warm); max-width: 22ch; margin: 0; text-wrap: balance; }
.jr-end .muted { color: var(--dusk-ink-2); letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.8rem; margin: 6px 0 22px; }
.jr-end .jr-soon { margin: 4px 0 0; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dusk-warm); }
.jr-end h2.jr-book { font-style: normal; color: var(--dusk-ink); font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem); max-width: none; margin-top: 4px; }
.jr-end .jr-subtitle { margin: 0; font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.5rem); color: var(--dusk-warm); }
.jr-trailer { width: min(860px, 100%); margin: 6px 0 34px; }
.jr-trailer video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #1E1C26; box-shadow: 0 18px 40px rgba(0,0,0,0.4); }
.jr-trailer figcaption { margin-top: 10px; font-size: 0.8rem; color: var(--dusk-ink-2); }
.jr-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; width: min(860px, 100%); }
.jr-door { display: flex; flex-direction: column; gap: 6px; padding: 20px; text-align: left; border-radius: 12px; text-decoration: none; color: var(--dusk-ink); background: rgba(36, 34, 46, 0.45); border: 1px solid rgba(244, 238, 228, 0.22); transition: border-color .2s, transform .2s, background .2s; }
.jr-door:hover, .jr-door:focus-visible { border-color: var(--dusk-warm); background: rgba(36, 34, 46, 0.6); transform: translateY(-2px); }
.jr-door .eyebrow { color: var(--dusk-warm); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }
.jr-door b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.jr-door span { color: var(--dusk-ink-2); line-height: 1.5; }
.jr-door .go { margin-top: auto; padding-top: 6px; color: var(--dusk-warm); font-weight: 600; }

/* The book: a CSS 3D object built from the cover. Its size follows the viewport so the open spread
   always fits; everything inside scales with --w. journey.js turns it with the scroll. */
section.jr-book { position: relative; z-index: 3; height: 420vh; background: var(--dusk); }
.bk-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7vh; --w: min(30vw, 40vh, 340px); --h: calc(var(--w) * 1.5); --t: calc(var(--w) * 0.16); }
.bk-scene { width: calc(var(--w) * 2); height: var(--h); perspective: 1800px; display: flex; justify-content: center; }
.bk { position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; will-change: transform; }
.bk > div, .bk-leaf > .bk-face { position: absolute; }
.bk-back { inset: 0; transform: translateZ(calc(var(--t) / -2)); background: #3B2F2A; border-radius: 2px 6px 6px 2px; box-shadow: 0 30px 60px rgba(0,0,0,0.45); }
.bk-edge { background: repeating-linear-gradient(90deg, #EFE6D6 0 2px, #DCCFB8 2px 3px); }
/* Each edge is a strip centred on the book's outline, then turned 90° so it spans the thickness. */
.bk-edge-r { top: 1px; height: calc(var(--h) - 2px); left: calc(var(--w) - var(--t) / 2 - 1px); width: var(--t); transform: rotateY(90deg); background: repeating-linear-gradient(90deg, #F2EADB 0 1px, #D9CCB4 1px 2px); }
.bk-edge-t, .bk-edge-b { left: 0; width: calc(var(--w) - 2px); height: var(--t); background: repeating-linear-gradient(0deg, #F2EADB 0 1px, #D9CCB4 1px 2px); }
.bk-edge-t { top: calc(var(--t) / -2 + 1px); transform: rotateX(90deg); }
.bk-edge-b { top: calc(var(--h) - var(--t) / 2 - 1px); transform: rotateX(90deg); }
.bk-spine { top: 0; bottom: 0; left: 0; width: var(--t); transform-origin: left center; transform: rotateY(-90deg) translateX(calc(var(--t) / -2)); background: linear-gradient(90deg, #2E2622, #4A3A33 50%, #2E2622); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8% 0; color: #EBC79A; font-family: var(--font-display); font-size: calc(var(--t) * 0.36); letter-spacing: 0.08em; }
.bk-spine span { writing-mode: vertical-rl; white-space: nowrap; }
.bk-spine span + span { font-size: 0.8em; color: #DCD4C8; }
.bk-page { inset: 0; background: #F7F0E3; color: #2B221A; padding: 9%; display: flex; flex-direction: column; justify-content: center; font-family: var(--font-display); font-size: calc(var(--w) * 0.042); line-height: 1.4; box-shadow: inset 6px 0 14px -8px rgba(60, 40, 20, 0.35); }
.bk-last { transform: translateZ(calc(var(--t) / 2 - 3px)); }
.bk-leaf { inset: 0; transform-style: preserve-3d; transform-origin: left center; }
.bk-face { inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.bk-back-face { transform: rotateY(180deg); box-shadow: inset -6px 0 14px -8px rgba(60, 40, 20, 0.35); }
.bk-cover .bk-front { border-radius: 2px 6px 6px 2px; overflow: hidden; box-shadow: inset 4px 0 6px rgba(0,0,0,0.25); background: #2C2A35; }
.bk-cover .bk-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-page p { margin: 0 0 0.7em; }
.bk-page figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.6em; }
.bk-page figure img { width: 100%; max-height: 82%; object-fit: contain; }
.bk-page figcaption { font-size: 0.8em; font-style: italic; color: #6B5B49; }
.bk-kicker { font-size: 0.75em; letter-spacing: 0.2em; text-transform: uppercase; color: #A8432F; }
.bk-pull { font-style: italic; color: #4A3A33; }
.bk-prose { justify-content: flex-start; font-size: calc(var(--w) * 0.038); }
.bk-contents ol { margin: 0; padding-left: 1.4em; font-size: 0.86em; line-height: 1.45; }
.bk-more { margin-top: 0.6em; font-size: 0.8em; font-style: italic; color: #6B5B49; }
.bk-title { align-items: center; text-align: center; }
.bk-t { font-size: 1.9em; line-height: 1.05; margin-bottom: 0.5em !important; }
.bk-s { font-style: italic; color: #6B5B49; }
.bk-a { margin-top: 2em !important; letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.75em; }
.bk-quote { align-items: center; text-align: center; font-size: calc(var(--w) * 0.075); line-height: 1.15; }
.bk-quote em { color: #A8432F; }
.bk-caption { text-align: center; color: var(--dusk-ink); }
.bk-caption .jr-soon { margin: 0; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dusk-warm); }
.bk-cap-line { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem); }

/* Phones: every chapter's copy becomes a caption at the bottom, and the dots shrink to a rail. */
@media (max-width: 720px) {
  .jr-copy, .jr-copy.right, .jr-copy.bottom, .jr-copy.bottom-left { justify-content: flex-end; align-items: flex-start; text-align: left; padding: 72px 36px 22svh 16px; }
  .jr-copy.bottom .seal { margin-inline: 0; }
  .jr-copy::before, .jr-copy.right::before, .jr-copy.bottom::before, .jr-copy.bottom-left::before { background: linear-gradient(0deg, rgba(36, 34, 46, 0.86), rgba(36, 34, 46, 0.0) 80%); }
  .jr-copy.center { justify-content: center; align-items: center; text-align: center; }
  .jr-copy.center::before { background: radial-gradient(ellipse at 50% 50%, rgba(36, 34, 46, 0.6), rgba(36, 34, 46, 0.0) 75%); }
  .jr-top > a:first-child { font-size: 0.95rem; line-height: 1.15; }
  .jr-links { flex-wrap: nowrap; gap: 6px; }
  .jr-links .jr-tag { letter-spacing: 0.08em; padding: 3px 8px; white-space: nowrap; }
  .jr-nav { right: 6px; gap: 7px; }
  .jr-nav button i { width: 7px; height: 7px; }
  .jr-nav button span { display: none; }
  .jr-ch { height: 250vh; }
  .bk-stage { --w: min(46vw, 36vh); }
}
/* The smallest phones: let the two top-bar pills stack rather than run off the edge. */
@media (max-width: 359px) { .jr-links { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .jr-copy .hint { animation: none; } }
.jr-prelaunch { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 22px; }
.jr-pre { padding: 12px 20px; border-radius: 999px; text-decoration: none; font-weight: 600; color: #1d1a26; background: var(--dusk-warm); border: 1px solid var(--dusk-warm); transition: transform .2s, background .2s; }
.jr-pre:nth-child(2) { color: var(--dusk-ink); background: transparent; }
.jr-pre:hover, .jr-pre:focus-visible { transform: translateY(-2px); }
