/* Journey layer. Everything is scoped to .has-journey, which only JavaScript adds,
   so no-script and reduced-motion visitors keep the published page. */
:root{
  --ease-out:cubic-bezier(.23,1,.32,1);
  --ease-drawer:cubic-bezier(.32,.72,0,1);
  --deep:#0e211c;
}
::selection{background:#10372f;color:#eef3ef}
html{scrollbar-color:#7d9a8e transparent}
@media (prefers-reduced-motion:no-preference){@view-transition{navigation:auto}}
.portal button:active,.portal a:active{transform:scale(.97)}
.portal button,.portal-links a{transition:transform .12s var(--ease-out),background-color .18s var(--ease-out),color .18s var(--ease-out)}

html.lenis,html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}
.lenis.lenis-stopped{overflow:hidden}

.has-journey .portal{background:var(--deep);overflow:clip}
.has-journey .portal-scene{padding:0;scroll-margin-top:0;background:transparent;isolation:auto}

/* Stages */
.jr-stage{position:relative;height:calc(var(--len,240) * 1svh + 100svh);background:var(--deep)}
@supports (height:100lvh){.jr-stage{height:calc(var(--len,240) * 1svh + 100lvh)}}
.jr-pin{--bar:0px;position:sticky;top:0;height:100svh;overflow:hidden;transform-origin:50% 45%;will-change:transform}
/* Phone browsers retract their toolbar while scrolling. The pin fills the larger viewport, so no
   strip of page shows beneath it, and --bar lifts bottom controls above the toolbar when it shows.
   Desktop browsers have no retracting toolbar, so there --bar is 0. */
@supports (height:100lvh){.jr-pin{--bar:calc(100lvh - 100svh);height:100lvh}}
.jr-film,.jr-gl{position:absolute;inset:0;width:100%;height:100%;display:block}
.jr-slot{display:contents}
.jr-probe{position:absolute;top:0;left:0;width:0;height:100svh;visibility:hidden;pointer-events:none}
.jr-sheet{position:relative;z-index:2;margin-top:-100svh;border-radius:clamp(18px,2.4vw,32px) clamp(18px,2.4vw,32px) 0 0;overflow:clip;padding:clamp(4.5rem,8vw,7rem) clamp(1.25rem,5vw,6rem) clamp(3.5rem,7vw,6rem);outline:none}
.jr-copy{position:absolute;z-index:2;left:clamp(1.25rem,5vw,6rem)}
.jr-clock{position:absolute;z-index:2;left:clamp(1.25rem,5vw,6rem);bottom:calc(clamp(1.25rem,3vw,2.25rem) + var(--bar));margin:0;font-size:1rem;line-height:1.3;font-variant-numeric:tabular-nums}
.jr-skip{position:absolute;z-index:3;right:clamp(1.25rem,5vw,6rem);bottom:calc(clamp(1rem,2.6vw,1.9rem) + var(--bar));display:inline-flex;align-items:center;min-height:44px;padding:0 1.1rem;border-radius:999px;background:var(--stage-ink,#10372f);color:var(--stage-ground,#eef3ef)!important;font-size:1rem;font-weight:600;text-decoration:none;white-space:nowrap;transition:transform .14s var(--ease-out)}
.jr-skip:hover{transform:translateY(-1px)}
.jr-skip:focus-visible{outline:3px solid var(--stage-ink,#10372f);outline-offset:3px}

/* Floating chapter bar */
/* Hidden from pointers over the hero, which has its own project list, but never from the keyboard. */
.jr-way{position:fixed;inset:0 0 auto;z-index:6;height:0;opacity:0;pointer-events:none;transition:opacity .2s var(--ease-out)}
.jr-way.is-shown,.jr-way:focus-within{opacity:1;pointer-events:auto}
.has-journey .portal-wayfinder{position:absolute;top:.7rem;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 1.5rem);justify-content:flex-start;gap:.15rem;padding:.25rem;background:#eef3ef;border:0;border-radius:999px;scrollbar-width:none;box-shadow:0 6px 20px -8px rgba(14,33,28,.45)}
.has-journey .portal-wayfinder::-webkit-scrollbar{display:none}
.has-journey .portal-wayfinder a{transition:background-color .18s var(--ease-out),color .18s var(--ease-out)}

/* Opening: the camera enters the hero's surface */
.has-journey .portal-opening{display:block;--len:210;padding:0;background:var(--deep)}
.jr-dive .jr-pin{--dark:0;background:color-mix(in srgb,var(--deep) calc(var(--dark) * 100%),#eef3ef)}
.jr-dive .jr-copy{inset:auto clamp(1.25rem,5vw,6rem) calc(12svh + var(--bar));color:#e4efe8;pointer-events:none;opacity:0}
/* The copy stays in the accessibility tree while it is faded out; keyboard focus inside it shows it
   on a dark ground at once (journey.js also scrolls to where it is fully shown). */
.jr-dive .jr-copy:has(:focus-visible){opacity:1!important;transform:none!important}
.jr-dive .jr-pin:has(:focus-visible){--dark:1!important}
.jr-dive h2{font-size:clamp(3.4rem,13vw,15rem)!important;line-height:.9!important;letter-spacing:-.05em!important;max-width:none!important;font-weight:600;color:#e4efe8}
.jr-dive .portal-opening-foot{max-width:none;justify-content:space-between;margin-top:1.6rem;gap:1.5rem}
.jr-dive .portal-opening-foot p{font-size:clamp(1.1rem,1.6vw,1.4rem);max-width:34ch}
.jr-dive .portal-opening-foot a{color:#e4efe8}
/* Project index inside the opening: five real images with a caption row, so the screen before the
   first stage shows the whole set. The headline gives up some size to make room for it. */
.jr-dive h2{font-size:clamp(3rem,min(9.5vw,15svh),11rem)!important}
.jr-dive .portal-index{margin-top:clamp(1rem,3.2svh,2.2rem);grid-template-columns:repeat(5,minmax(0,1fr))}
.jr-dive .portal-index-media{max-height:24svh}
.jr-dive .portal-index a{color:#e4efe8}
.jr-dive .portal-index-media{background:rgba(228,239,232,.08)}
.jr-dive .portal-index-year,.jr-dive .portal-index-field,.jr-dive .portal-index-line{color:#a9beb4}
.jr-dive .portal-index a:focus-visible{outline-color:#e4efe8;outline-offset:4px}
.jr-dive .portal-opening-foot{margin-top:clamp(1rem,3svh,1.6rem)}
.has-journey .portal-opening + article{margin-top:-100svh;position:relative;z-index:2}

/* Continue the atlas's ground and reading type into the individual artefacts. */
:is(.jr-morpher,.jr-morphliner,.jr-fly,.jr-brain){--stage-ink:#edf3ed;--stage-ground:#0e211c}
:is(.jr-morpher,.jr-morphliner,.jr-fly,.jr-brain) .jr-pin{color:var(--stage-ink)}
:root.has-journey :is(.jr-morpher,.jr-morphliner,.jr-fly,.jr-brain) .portal-title{
  color:var(--stage-ink);font:600 clamp(3.75rem,7.6vw,8.4rem)/.9 var(--sans);letter-spacing:-.064em;margin:0 0 .9rem
}
.has-journey :is(.jr-morpher,.jr-fly,.jr-brain) .portal-kicker{display:none}
:root.has-journey :is(.jr-morpher,.jr-brain) .portal-project-name,
:root.has-journey .jr-fly .fly-claim p,
.jr-limit{
  color:#cad9d1;font-family:var(--sans)
}
.has-journey .jr-fly .fly-limit{color:#a9beb3}
:root.has-journey .jr-way .portal-wayfinder a{font:600 .94rem/1.1 var(--sans);letter-spacing:0;text-transform:none}
:root.has-journey :is(.jr-morpher,.jr-morphliner,.jr-fly,.jr-brain) .jr-clock{font:400 .92rem/1.3 var(--sans);letter-spacing:0}
.jr-dive .portal-index a:is([href="#work-fly"],[href="#work-morphbrain"]) img{object-fit:contain}
.jr-dive .portal-index a[href="#work-fly"] img{filter:brightness(1.55)}

/* Model Morpher: a centered saved mesh with room for both ends of the recording. */
.jr-morpher{--len:180}
.jr-morpher .jr-pin{background:radial-gradient(ellipse at 68% 46%,#26443b 0%,var(--deep) 65%)}
.jr-morpher .jr-copy{top:clamp(6rem,24svh,15rem);width:min(32vw,28rem)}
.jr-morpher .jr-slot{position:absolute;inset:8% 3.3% 10% 34%;display:block}
.jr-morpher :is(.jr-film,.jr-film-poster){filter:brightness(1.25) saturate(.84)}
.has-journey .portal-morpher-head{max-width:none;padding:0;pointer-events:auto}
.has-journey .portal-morpher-head .portal-project-name{font:400 clamp(1.05rem,1.45vw,1.4rem)/1.32 var(--sans);max-width:31ch}
.has-journey .portal-morpher .jr-sheet{background:#dce3de;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:clamp(2rem,5vw,6rem);align-items:start}
.has-journey .portal-morpher .portal-project-foot{grid-column:1;grid-row:1;display:block;margin:0}
.has-journey .portal-morpher .portal-project-foot .portal-links{margin-top:1.4rem;justify-self:start}
.has-journey .portal-morpher-caption{grid-column:1;grid-row:2;display:grid;grid-template-columns:1fr;gap:1rem;margin-top:1.6rem}
.has-journey .portal-surface{grid-column:2;grid-row:1/span 2;margin:0;min-height:clamp(28rem,44vw,44rem)}
.has-journey .portal-morpher .portal-film-details{grid-column:1/-1}

/* Morphliner: the exported camera shot retains its authored framing. */
.jr-morphliner{--len:175}
.jr-morphliner .jr-pin{background:radial-gradient(ellipse at 50% 41%,#354138,var(--deep) 67%)}
.jr-morphliner .jr-slot{
  position:absolute;display:block;top:44%;left:50%;width:min(86vw,calc(55svh * 16 / 9),72rem);
  aspect-ratio:16/9;transform:translate(-50%,-50%) scale(var(--screen-scale,1))
}
.jr-morphliner :is(.jr-film,.jr-film-poster){
  mask-image:radial-gradient(ellipse closest-side,#000 65%,transparent 100%)
}
.jr-morphliner .jr-copy{inset:auto clamp(1.25rem,5vw,6rem) calc(4.7rem + var(--bar))}
.has-journey .jr-morphliner .morphliner-head{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:.55rem 2rem;margin:0;padding:0;border:0;background:none}
:root.has-journey .jr-morphliner .portal-title{font-size:clamp(3.05rem,5.6vw,6rem);margin:0}
:root.has-journey .jr-morphliner .morphliner-intro{color:#cad9d1;max-width:37ch;font:400 clamp(1.04rem,1.25vw,1.22rem)/1.37 var(--sans);margin:0}
.has-journey .portal-cinema .jr-sheet{background:#eeece6;color:#20282a}

/* EEG */
.jr-eeg{--len:190;--stage-ink:#f3f4ef;--stage-ground:#111}
.jr-eeg .jr-pin{background:#0b0d0d;color:#f3f4ef;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,8fr);align-items:center;gap:clamp(1.5rem,3vw,3rem);padding:clamp(5rem,12svh,7rem) clamp(1.25rem,5vw,6rem) calc(clamp(4.5rem,10svh,6rem) + var(--bar))}
.jr-eeg .jr-copy{position:relative;left:auto;right:auto;order:-1}
.has-journey .portal-eeg header{display:block;padding:0;margin:0}
.has-journey .portal-eeg .portal-title{font-size:clamp(2.6rem,4.4vw,5rem);line-height:.96;margin:.6rem 0 1rem;letter-spacing:-.045em;color:#f3f4ef}
.has-journey .portal-eeg .portal-kicker{color:#c8cfca}
.has-journey .portal-eeg-question{color:#c3cdf7!important}
.jr-reveal{position:relative;overflow:hidden}
.jr-reveal img{display:block;width:100%;height:auto}
.jr-eeg .portal-eeg-figure{margin:0;background:none!important;border:0!important;padding:0!important;color:#c8cfca}
.jr-eeg .portal-eeg-figure figcaption{display:flex;justify-content:space-between;gap:1rem;margin-top:.7rem;padding:0;background:none;color:#c8cfca;font-size:1rem}
.jr-eeg .portal-eeg-figure a{color:#f3f4ef}
.has-journey .portal-eeg .jr-sheet{background:#f7f6f2}
.jr-edge{position:absolute;display:block;background:#7f96ff}
.jr-reveal .jr-edge{top:0;bottom:0;width:2px}

/* Fly: the original reconstruction is the exhibit. The pairing stays in the study. */
.jr-fly{--len:150}
.jr-fly .jr-pin{background:radial-gradient(ellipse at 74% 48%,#1b3530,var(--deep) 64%)}
.jr-fly .jr-copy{top:clamp(5.5rem,21svh,12rem);width:min(32vw,28rem)}
.has-journey .jr-fly .fly-head{margin:0;padding:0;display:block}
.has-journey .jr-fly .fly-claim{max-width:27rem;margin-top:1.2rem}
.has-journey .jr-fly .fly-claim a{color:var(--stage-ink);text-decoration:underline;text-underline-offset:.18em}
.has-journey .jr-fly .fly-claim a:focus-visible{outline-color:var(--stage-ink)}
.has-journey .jr-fly .jr-neuron-key{color:var(--stage-ink);display:flex;flex-wrap:wrap;gap:.15rem .8rem}
.jr-neuron-key li{gap:.35rem}
.jr-neuron-key .fly-stroke{width:1rem;filter:brightness(1.56)}
.jr-neurons{position:absolute;right:5%;top:50%;width:min(58vw,calc(77svh * 570 / 480));aspect-ratio:570/480;transform:translateY(-50%)}
.jr-neuron-portrait{display:block;width:100%;height:auto;filter:brightness(1.56)}
.has-journey .portal-fly .jr-sheet{background:#eeece6}

/* MorphBrain */
.jr-brain{--len:160}
.jr-brain .jr-pin{background:radial-gradient(ellipse at 73% 48%,#29423b,var(--deep) 63%)}
.jr-brain .jr-copy{top:clamp(6rem,26svh,15rem);width:min(39vw,35rem)}
.has-journey .jr-brain header{padding:0;margin:0}
:root.has-journey .jr-brain .portal-title{font-size:clamp(3.25rem,6.6vw,7.2rem)}
.jr-fields{position:absolute;right:clamp(1.25rem,12vw,13rem);top:50%;height:min(74svh,60vw);aspect-ratio:2/3;transform:translateY(-50%)}
.jr-fields img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.jr-fields .jr-edge{top:0;bottom:0;width:1px;background:#c9e0d4;box-shadow:0 0 7px #b8daca99}
.has-journey .portal-brain .jr-sheet{background:#dfeae3}

/* Close */
.has-journey .xp-foot{flex-wrap:wrap}
.has-journey .xp-foot>p:first-child{font-size:clamp(3.4rem,15.4vw,19rem);line-height:.9;letter-spacing:-.05em;font-weight:600;margin:0 0 1.5rem;width:100%}
.jr-limit{font-size:1rem;line-height:1.42;max-width:36ch;margin-top:1rem!important}
.jr-eeg .jr-limit{color:#d7dcd8;max-width:44ch}
.jr-brain .jr-limit{color:#dfe9e3}

@media (max-width:800px){
  .has-journey .portal-wayfinder{left:.75rem;right:.75rem;transform:none;width:auto;max-width:none;mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent)}
  .jr-copy{left:1.25rem;right:1.25rem}
  .jr-clock{left:1.25rem;right:11.5rem;bottom:calc(1.1rem + var(--bar));font-size:.92rem}
  .jr-skip{right:1rem;bottom:calc(.8rem + var(--bar));padding:0 .9rem;font-size:.95rem}
  .jr-limit{font-size:.95rem;line-height:1.34;max-width:none;margin-top:.6rem!important}
  .has-journey .portal-morpher .jr-sheet{display:block}
  .has-journey .portal-surface{margin-top:1.6rem}

  /* Use reserved rows for copy, the full artefact and controls on short screens. */
  :is(.jr-morpher,.jr-morphliner,.jr-eeg,.jr-fly,.jr-brain)>.jr-pin{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr) auto;align-items:stretch;gap:.85rem 1rem;padding:4.4rem 1.25rem calc(.8rem + var(--bar))}
  :is(.jr-morpher,.jr-morphliner,.jr-fly,.jr-brain)>.jr-pin{padding-top:5.15rem}
  :is(.jr-morpher,.jr-morphliner,.jr-eeg,.jr-fly,.jr-brain)>.jr-pin>.jr-copy{position:relative;inset:auto;grid-column:1/-1;grid-row:1;width:auto;max-width:none}
  :is(.jr-morpher,.jr-morphliner,.jr-eeg,.jr-fly,.jr-brain)>.jr-pin>.jr-slot{position:relative;inset:auto;display:flex;align-items:center;justify-content:center;grid-column:1/-1;grid-row:2;min-height:0;container-type:size}
  :is(.jr-morpher,.jr-morphliner,.jr-eeg,.jr-fly,.jr-brain)>.jr-pin>.jr-clock{position:static;grid-column:1;grid-row:3;align-self:center;font-size:.85rem;line-height:1.3}
  :is(.jr-morpher,.jr-morphliner,.jr-eeg,.jr-fly,.jr-brain)>.jr-pin>.jr-skip{position:static;grid-column:2;grid-row:3;align-self:center}
  .jr-morphliner .jr-slot{width:100%;transform:none;aspect-ratio:auto}
  .jr-morphliner .jr-slot>.jr-film-wrap{width:min(100cqw,calc(100cqh * 16 / 9));height:auto;aspect-ratio:16/9;transform:scale(var(--screen-scale,1))}
  .jr-slot>.jr-film{position:static;width:100%;height:100%}
  .jr-slot>.jr-neurons{position:relative;inset:auto;transform:none;width:min(100cqw,calc(100cqh * 570 / 480));height:auto}
  .jr-slot>.jr-fields{position:relative;inset:auto;transform:none;height:min(100cqh,calc(100cqw * 1.5));width:auto}
  .jr-slot>.portal-eeg-figure{width:min(100cqw,calc((100cqh - 2.6rem) * 1720 / 980))}

  :root.has-journey :is(.jr-morpher,.jr-morphliner,.jr-fly,.jr-brain) .portal-title{font-size:clamp(2.2rem,min(10.5vw,7svh),4.35rem);margin-bottom:.45rem}
  .jr-fly .portal-title br,.jr-morpher .portal-title br{display:none}
  .has-journey .portal-morpher-head .portal-project-name{font-size:1.15rem}
  .jr-eeg .jr-clock{display:none}
  .has-journey .jr-fly .fly-claim{max-width:none;margin-top:.7rem;gap:.55rem}
  .has-journey .jr-fly .fly-claim>p:first-child{font-size:1.02rem;line-height:1.36}
  .has-journey .jr-fly .fly-limit{font-size:.92rem;line-height:1.36}
  :root.has-journey .jr-way .portal-wayfinder{justify-content:space-between;gap:0;mask-image:none}
  :root.has-journey .jr-way .portal-wayfinder a{padding-inline:.34rem;font-size:.84rem}
  :root.has-journey .jr-dive .exhibit-preview[data-project="work-fly"] .exhibit-preview-frame{aspect-ratio:16/9}
  .has-journey .portal-eeg .portal-title{font-size:min(clamp(2.2rem,9vw,3.4rem),6svh)}
  /* Opening on phones: a compact list that fits above the toolbar on short screens. */
  .jr-dive .jr-copy{bottom:calc(6svh + var(--bar))}
  .jr-dive h2{font-size:clamp(2.6rem,12vw,4rem)!important}
  .jr-dive .portal-index{margin-top:.9rem;gap:.5rem;grid-template-columns:minmax(0,1fr)}
  .jr-dive .portal-index a{grid-template-columns:min(4.75rem,8svh) minmax(0,1fr)}
  .jr-dive .portal-opening-foot{margin-top:.9rem}
  .jr-dive .portal-opening-foot p{font-size:1rem}
}
/* The pinned index must fit between the top of the screen and the bottom offset, so it sheds detail
   as the screen gets shorter: the one-line descriptions, then the intro sentence, then (landscape
   phones and very short windows) the field labels, keeping five small images with their names. */
@media (min-width:601px) and (max-width:800px){.jr-dive .portal-index{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:1.25rem}}
@media (max-width:1180px),(max-height:760px){.jr-dive .portal-index-line{display:none}}
@media (max-height:640px){.jr-dive .portal-opening-foot p{display:none}}
@media (max-width:800px) and (max-height:640px){.jr-dive .portal-index{gap:.35rem}}
@media (max-height:500px){
  .jr-dive .jr-copy{bottom:calc(5svh + var(--bar))}
  .jr-dive h2{font-size:clamp(2rem,12svh,3rem)!important}
  .jr-dive .portal-index{grid-template-columns:repeat(5,minmax(0,1fr));gap:.6rem;margin-top:.7rem}
  .jr-dive .portal-index a{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;row-gap:.3rem;align-items:start}
  .jr-dive .portal-index-media{aspect-ratio:16/9;max-height:none}
  .jr-dive .portal-index-year,.jr-dive .portal-index-field{display:none}
  .jr-dive .portal-index-row strong{font-size:.9rem;line-height:1.25}
  .jr-dive .portal-opening-foot{margin-top:.7rem}
}

@media (max-width:800px) and (max-height:700px){.has-journey .portal-eeg-question{display:none}}
@media (max-width:800px) and (max-height:600px){
  .has-journey .portal-morpher-head .portal-kicker,.has-journey .portal-eeg .portal-kicker,.has-journey .portal-brain .portal-kicker,.has-journey .fly-study .portal-kicker{display:none}
}

@media print{
  .jr-stage{height:auto}
  .jr-pin{position:static;height:auto;transform:none!important}
  .jr-film,.jr-gl,.jr-skip,.jr-clock,.jr-way,.jr-neurons,.jr-fields{display:none}
  .jr-copy{position:static}
  .jr-sheet{margin-top:0}
}

/* About: labels in the reading type rather than tracked capitals. */
.has-journey .about__label{font-family:inherit;text-transform:none;letter-spacing:0;font-size:1rem;font-weight:600}
