/* 乌孙 · the story inside the book. A handscroll of the Tianshan drawn in ink (after Saltwake's Pirate Ship),
   the trail's two thousand years in climbing letters (after Tana Camps), the lake as a living picture
   (after Wander Far), and a colophon. Everything sits on the book's own paper. */
.ws { --paper: #F4F2ED; --ink: #1C1A17; --ink2: #3B3731; --mid: #8d8b86; --hair: rgba(28,26,23,.16);
  --ws-serif: "Newsreader", "Noto Serif SC", "Songti SC", serif; --ws-sans: "Inter Tight", "Noto Sans SC", system-ui, sans-serif;
  --e: cubic-bezier(.22,.61,.36,1); --u: 1px; color: var(--ink); }
.ws section { position: relative; }
.ws .stg { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.ws .ws-in { position: absolute; inset: 0; transform-origin: 50% 40%; }
.ws-eb { font: 600 11px/1 var(--ws-sans); letter-spacing: .22em; color: var(--acc); }

/* ---------- 1 · the handscroll ---------- */
.ws-sc .stg { background: var(--paper); }
/* the drawing's paper fills hide the book's grain, so the grain is laid once more over the whole scroll */
.ws-grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: url("/lab/shelf/grain.png") 0 0 / 220px 220px; }
.ws-hero { position: absolute; inset: 0; z-index: 4; transform-origin: 50% 40%; }
.ws-far, .ws-roll { position: absolute; inset: 0; transform-origin: 50% 40%; opacity: 0; }
.ws-far svg { position: absolute; left: 0; top: 0; width: calc(var(--u) * 6000); height: 100%; overflow: visible; }
.ws-far path { fill: var(--paper); stroke: rgba(28,26,23,.22); stroke-width: 1.6; stroke-linejoin: round; }
.ws-strip { position: absolute; left: 0; top: 0; height: 100%; width: calc(var(--u) * 6000); }
.ws-ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ws-ink path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ws-ink .ws-mid { fill: var(--paper); stroke: rgba(28,26,23,.4); stroke-width: 1.7; }
.ws-ink .ws-ground { fill: var(--paper); stroke: var(--ink); stroke-width: 2.6; }
.ws-hatch path { stroke: rgba(28,26,23,.42); stroke-width: 1.8; }
.ws-ink .ws-tree { stroke: rgba(28,26,23,.5); stroke-width: 1.5; }
.ws-ink .ws-rope { stroke: var(--ink); stroke-width: 1.2; }
.ws-ink .ws-post { stroke: var(--ink); stroke-width: 2.2; }
.ws-rider { fill: var(--acc); }
.ws-water path { stroke: var(--acc); stroke-width: 2; opacity: .75; }
.ws-ink .ws-walked { stroke: var(--acc); stroke-width: 3.6; }
.ws-ink .ws-pin { stroke: rgba(28,26,23,.32); stroke-width: 1; stroke-dasharray: 2 6; }
.ws-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.ws-walker circle { fill: var(--acc); }
.ws-walker .ring { fill: none; stroke: var(--acc); stroke-width: 1.5; opacity: .35; }

/* the scroll's frontispiece and colophon, written top to bottom */
.ws-head { position: absolute; left: calc(var(--u) * 80); top: calc(var(--u) * 150); writing-mode: vertical-rl; display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--u) * 26); }
.ws-head h2 { font: 600 calc(var(--u) * 116)/1 var(--ws-serif); letter-spacing: .14em; }
.ws-head p { font: 500 max(10px, calc(var(--u) * 13))/1 var(--ws-sans); letter-spacing: .32em; color: var(--mid); padding-top: calc(var(--u) * 8); }
.ws-seal { display: inline-block; writing-mode: vertical-rl; background: var(--acc); color: var(--paper); font: 600 calc(var(--u) * 15)/1.15 var(--ws-serif); font-style: normal; letter-spacing: .08em; padding: calc(var(--u) * 7) calc(var(--u) * 5); border-radius: calc(var(--u) * 2); }
.ws-head .ws-seal { align-self: flex-end; }
.ws-tail { position: absolute; left: calc(var(--u) * 5700); top: calc(var(--u) * 210); writing-mode: vertical-rl; display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--u) * 22); }
.ws-tail p { font: 400 calc(var(--u) * 26)/1 var(--ws-serif); letter-spacing: .3em; }
.ws-tail .ws-seal { align-self: flex-end; }

/* the stations, labelled along the top of the scroll */
.ws-lbl { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--u) * 46); transform: translateX(-50%); text-align: center; white-space: nowrap; opacity: .28; transition: opacity .8s var(--e); }
.ws-lbl.on { opacity: 1; }
.ws-lbl b { display: block; font: 500 calc(var(--u) * 15)/1 var(--ws-serif); color: var(--acc); letter-spacing: .1em; }
.ws-lbl h3 { margin-top: calc(var(--u) * 10); font: 600 calc(var(--u) * 25)/1.1 var(--ws-serif); letter-spacing: .12em; }
.ws-lbl p { margin-top: calc(var(--u) * 8); font: 500 max(10px, calc(var(--u) * 11.5))/1 var(--ws-sans); letter-spacing: .14em; color: var(--mid); }

/* photographs printed along the trail */
.ws-pr { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u)); margin: 0; }
.ws-pr .ph { height: calc(var(--h) * var(--u)); overflow: hidden; background: #E4E0D6; clip-path: inset(100% 0 0 0); transition: clip-path 1.1s cubic-bezier(.7,0,.2,1); }
.ws-pr.up .ph { clip-path: inset(0 0 100% 0); }
.ws-pr img, .ws-pr video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transition: transform 1.7s var(--e); }
.ws-pr.in .ph { clip-path: inset(0); }
.ws-pr.in img, .ws-pr.in video { transform: none; }
.ws-pr figcaption { margin-top: calc(var(--u) * 9); font: 500 max(10px, calc(var(--u) * 11.5))/1.3 var(--ws-sans); letter-spacing: .12em; color: var(--ink2); opacity: 0; transform: translateY(6px); transition: opacity .8s var(--e) .55s, transform .8s var(--e) .55s; }
.ws-pr.in figcaption { opacity: 1; transform: none; }

.ws-hud { position: absolute; left: 32px; right: 32px; bottom: 26px; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font: 500 12px/1 var(--ws-sans); letter-spacing: .12em; color: var(--ink2); opacity: 0; pointer-events: none; }
.ws-hud .r { justify-self: end; }
.ws-hud .r b { font: 500 15px/1 var(--ws-serif); font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink); margin: 0 .2em; }
.ws-rail { position: relative; width: min(34vw, 420px); height: 1px; background: var(--hair); }
.ws-rail i { position: absolute; left: calc(var(--p) * 100%); top: -3px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(28,26,23,.4); transition: background .4s, box-shadow .4s; }
.ws-rail i.on { background: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.ws-rail b { position: absolute; left: 0; top: 0; width: 100%; height: 1px; }
.ws-rail b::after { content: ""; position: absolute; left: -6px; top: -6px; width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--acc); }

/* ---------- 2 · two thousand years ---------- */
.ws-tale .ws-in { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 6vw; }
.ws-big { margin-top: 4.4vh; font: 500 clamp(40px, 7vw, 124px)/1.14 var(--ws-serif); letter-spacing: .05em; }
.ws-big .ln { display: block; white-space: nowrap; }
.ws-big .ch { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(4deg); transition: opacity .9s var(--e), transform .9s var(--e); transition-delay: calc(var(--d) * 42ms); }
.ws-big .pill { display: inline-block; width: .86em; height: .86em; margin: 0 .16em; vertical-align: -.08em; border-radius: 50%; overflow: hidden; transform: scale(0); transition: transform .9s cubic-bezier(.34,1.56,.64,1); transition-delay: calc(var(--d) * 42ms); }
.ws-big .pill img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); transition: transform 1.3s var(--e); transition-delay: calc(var(--d) * 42ms); }
.on .ws-big .ch { opacity: 1; transform: none; }
.on .ws-big .pill, .on .ws-big .pill img { transform: none; }
.ws-verse { margin-top: 6vh; opacity: 0; transform: translateY(14px); transition: opacity 1s var(--e) 1.1s, transform 1s var(--e) 1.1s; }
.ws-verse p { font: 400 17px/2 var(--ws-serif); letter-spacing: .1em; color: var(--ink2); }
.ws-verse cite { display: block; margin-top: 12px; font: 500 11px/1 var(--ws-sans); font-style: normal; letter-spacing: .2em; color: var(--mid); }
.on .ws-verse { opacity: 1; transform: none; }

/* ---------- 3 · route notes ---------- */
.ws-notes .ws-in { display: grid; grid-template-columns: .8fr 1.25fr .85fr; gap: 5vw; align-items: center; padding: 12vh 7vw 10vh; }
.ws-notes .ws-big.sm { margin-top: 26px; font-size: clamp(64px, 9vw, 156px); line-height: 1.02; }
.ws-p { font: 400 15px/2.05 var(--ws-serif); letter-spacing: .04em; color: var(--ink2); }
.ws-tb { margin-top: 30px; border-bottom: 1px solid var(--hair); }
.ws-tb div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-top: 1px solid var(--hair); }
.ws-tb dt { font: 500 12px/1.6 var(--ws-sans); letter-spacing: .14em; color: var(--mid); }
.ws-tb dd { font: 400 14.5px/1.6 var(--ws-serif); letter-spacing: .04em; color: var(--acc); text-align: right; }
.ws-p, .ws-tb div { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--e), transform .9s var(--e); }
.ws-p { transition-delay: .35s; }
.ws-tb div:nth-child(1) { transition-delay: .55s; } .ws-tb div:nth-child(2) { transition-delay: .63s; } .ws-tb div:nth-child(3) { transition-delay: .71s; }
.ws-tb div:nth-child(4) { transition-delay: .79s; } .ws-tb div:nth-child(5) { transition-delay: .87s; } .ws-tb div:nth-child(6) { transition-delay: .95s; }
.on .ws-p, .on .ws-tb div { opacity: 1; transform: none; }
.ws-c3 { margin: 0; }
.ws-c3 .ph, .ws-pair .ph { overflow: hidden; background: #E4E0D6; clip-path: inset(100% 0 0 0); transition: clip-path 1.2s cubic-bezier(.7,0,.2,1) .3s; }
.ws-c3 .ph { aspect-ratio: 2 / 3; max-height: 72vh; }
.ws-c3 img, .ws-pair img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); transition: transform 1.8s var(--e) .3s; }
.on .ws-c3 .ph, .on .ws-pair .ph { clip-path: inset(0); }
.on .ws-c3 img, .on .ws-pair img { transform: none; }

/* ---------- 4 · the lake ---------- */
.ws-lk-t { position: absolute; left: 0; right: 0; top: 1.5vh; z-index: 1; text-align: center; font: 500 clamp(80px, 14vw, 250px)/1 var(--ws-serif); letter-spacing: .14em; white-space: nowrap; }
.ws-lk-p { position: absolute; inset: 0; z-index: 2; overflow: hidden; background: #DCD8CE; clip-path: inset(19% 21% 17% 21% round 6px); }
.ws-lk-p video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ws-lk-s { position: absolute; inset: 0; opacity: 0; background: linear-gradient(to top, rgba(12,16,24,.5), rgba(12,16,24,0) 52%), linear-gradient(to right, rgba(12,16,24,.22), rgba(12,16,24,0) 50%); }
.ws-lk-c { position: absolute; left: 6vw; bottom: 9vh; max-width: 30em; color: #fff; opacity: 0; text-shadow: 0 1px 18px rgba(0,0,0,.25); }
.ws-lk-c h3 { font: 500 clamp(44px, 6vw, 100px)/1 var(--ws-serif); letter-spacing: .12em; }
.ws-lk-c p { margin-top: 18px; font: 400 15px/1.95 var(--ws-serif); letter-spacing: .05em; max-width: 26em; }
.ws-chip { position: absolute; right: 3vw; bottom: 4vh; opacity: 0; padding: 9px 13px; border-radius: 2px; background: rgba(244,242,237,.92); font: 500 11.5px/1 var(--ws-sans); letter-spacing: .12em; color: var(--ink2); }
.ws-chip b { color: var(--ink); margin-right: .5em; }

/* ---------- 5 · colophon ---------- */
.ws-end .ws-in { display: grid; grid-template-columns: auto 1fr; gap: 7vw; align-items: center; padding: 0 9vw; }
.ws-pair { position: relative; width: 72vh; height: 72vh; }
.ws-pair figure { position: absolute; margin: 0; }
.ws-e1 { left: 0; top: 0; width: 60vh; }
.ws-e1 .ph { height: 60vh; }
.ws-e1 img { object-position: 50% 8%; }
.ws-e1 figcaption { margin-top: 12px; font: 500 11.5px/1.4 var(--ws-sans); letter-spacing: .12em; color: var(--ink2); }
.ws-e2 { right: 0; bottom: 0; width: 22vh; }
.ws-e2 .ph { height: calc(22vh * 4 / 3); transition-delay: .7s; }
.ws-e2 img { transition-delay: .7s; }
.ws-e3 h2 { font: 500 clamp(40px, 4.8vw, 84px)/1.3 var(--ws-serif); letter-spacing: .1em; }
.ws-e3 p { margin-top: 28px; font: 400 15px/2 var(--ws-serif); letter-spacing: .05em; color: var(--ink2); }
.ws-colo { margin-top: 44px; display: flex; align-items: center; gap: 14px; font: 500 11px/1.6 var(--ws-sans); letter-spacing: .2em; color: var(--mid); }
.ws-colo .ws-seal { --u: 1.1px; }
.ws-e3 > * { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--e), transform 1s var(--e); }
.ws-e3 > :nth-child(1) { transition-delay: .5s; } .ws-e3 > :nth-child(2) { transition-delay: .7s; } .ws-e3 > :nth-child(3) { transition-delay: .9s; }
.on .ws-e3 > * { opacity: 1; transform: none; }

@media (max-width: 767px) {
  .ws-hud { left: 18px; right: 18px; bottom: 18px; grid-template-columns: 1fr auto; gap: 18px; }
  .ws-hud > p:first-child { display: none; }
  .ws-rail { width: auto; }
  .ws-notes .ws-in { grid-template-columns: 1fr; gap: 22px; padding: 76px 26px 30px; align-content: center; }
  .ws-notes .ws-big.sm { display: none; }
  .ws-c1 .ws-eb { font-size: 13px; }
  .ws-c3 { display: none; }
  .ws-p { font-size: 14px; line-height: 1.95; }
  .ws-tb { margin-top: 18px; }
  .ws-tb div { padding: 8px 0; }
  .ws-big { font-size: clamp(30px, 9.6vw, 44px); }
  .ws-verse p { font-size: 15px; }
  .ws-lk-c { left: 24px; right: 24px; bottom: 12vh; }
  .ws-lk-c p { font-size: 14px; }
  .ws-end .ws-in { grid-template-columns: 1fr; gap: 26px; padding: 70px 26px 40px; align-content: center; justify-items: start; }
  .ws-pair { width: 100%; height: 44vh; }
  .ws-e1 { width: 76%; } .ws-e1 .ph { height: 36vh; }
  .ws-e1 figcaption { display: none; }
  .ws-e2 { width: 34%; } .ws-e2 .ph { height: 20vh; }
  .ws-e3 h2 { font-size: 30px; line-height: 1.4; }
  .ws-e3 p { margin-top: 14px; font-size: 14px; }
  .ws-colo { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-big .ch, .ws-big .pill, .ws-big .pill img, .ws-verse, .ws-p, .ws-tb div, .ws-e3 > *, .ws-pr .ph, .ws-pr img, .ws-pr figcaption { transition: none; }
}
