/* The platform chapters share the same scroll, including the map's arrival. */
#home { --handoff:clamp(44px,11svh,114px); }
#home > :is(#method,.cv-chapter,.bb-chapter,.pr-chapter,#gate) { position:relative; isolation:isolate; }
#home #method { --reveal-paper:#fff; }
#home .cv-chapter { --reveal-paper:#061713; }
#home .bb-chapter { --reveal-paper:#fff1df; }
#home .pr-chapter { --reveal-paper:#0b1223; }
#home .ashram-chapter .practice-bench {
  align-items:center;
  column-gap:clamp(25px,5vw,90px);
  margin-top:clamp(36px,8svh,88px);
  margin-bottom:clamp(40px,8svh,88px);
}
#home .ashram-chapter .practice-beat { min-height:0; padding-block:clamp(15px,3svh,36px); }
#home .ashram-chapter .practice-beat :is(h3,p) { font-size:clamp(14px,1.45vw,23px); }
#home .ashram-chapter .practice-origin h3 { font-size:clamp(28px,3.6vw,57px); }
#home .ashram-chapter .practice-console { position:relative; top:auto; margin-block:0; }
#home .ashram-chapter .warren-branch { margin-top:clamp(10px,2svh,32px); }
#home .city-arrival { min-height:100svh; height:100svh; }
#home .city-stage { position:relative; }
#home .city-model-flight { display:none; }
#home .city-arrival[data-exploring] footer { display:flex; pointer-events:none; }
#home .city-arrival[data-exploring] footer a { pointer-events:auto; }
@media (prefers-reduced-motion:no-preference) {
  #home .catalogue[data-travel] { padding-bottom:12svh; }
  #home { overflow-x:clip; }
  #home > :is(#method,.cv-chapter,.bb-chapter,.pr-chapter,#gate) { margin-top:calc(-1 * var(--handoff)); }
  #home > :is(#method,.cv-chapter,.bb-chapter,.pr-chapter,#gate)::before {
    content:"";
    position:absolute;
    inset:0 0 auto;
    z-index:3;
    height:var(--handoff);
    background:linear-gradient(to bottom,transparent,var(--reveal-paper));
    pointer-events:none;
  }
  #home > :is(#method,.cv-chapter,.bb-chapter,.pr-chapter) {
    isolation:auto;
    overflow:visible;
    background:none;
    padding-top:var(--handoff);
  }
  #home > :is(#method,.cv-chapter,.bb-chapter,.pr-chapter)::before {
    z-index:0;
    inset:0;
    height:auto;
    background:var(--reveal-paper);
    mask-image:linear-gradient(to bottom,transparent,#000 var(--handoff));
  }
  #home .practice-intro,#home .practice-bench { z-index:2; }
  #home > #method { padding-top:clamp(100px,17svh,205px); }
  #home > #gate .city-arrival {
    mask-image:linear-gradient(to bottom,transparent 0,#000 calc(var(--handoff)*(1 - var(--city-arrival,0))));
  }
  #home > #gate { background:transparent; }
  #home > #gate::before { content:none; }
  #home .city-arrival[data-flight] { height:224svh; }
  #home [data-flight] .city-stage { position:sticky; top:0; overflow:clip; background:#111c25; }
  #home [data-flight] .city-poster img {
    transform-origin:63% 50%;
    transform:scale(calc(1 + .45*var(--atlas-travel,0) - .29*var(--city-flight,0)));
  }
  #home [data-flight] .city-stage :is(.city-poster,.city-frame-host) {
    clip-path:inset(0 0 0 calc((1 - var(--atlas-travel,0))*30%));
  }
  #home [data-flight] .city-model-flight {
    position:absolute;
    display:block;
    z-index:2;
    inset:0;
    overflow:hidden;
    pointer-events:none;
    opacity:calc(1 - var(--model-travel,0));
    transform-origin:65% 46%;
    transform:translateX(calc(var(--model-travel,0)*-38%)) scale(calc(1.02 + var(--model-travel,0)*1.62));
    clip-path:inset(0 calc(var(--model-travel,0)*36%) 0 0);
  }
  #home .city-model-flight img { width:100%; height:100%; object-fit:cover; object-position:54% 54%; }
  #home [data-flight] :is(.city-entrance,footer) { opacity:clamp(0,calc((var(--city-flight,0) - .81)*8),1); }
  #home .city-entrance:focus-within,#home .city-stage footer:focus-within { opacity:1; }
  #home .city-return { z-index:6; }
  #home .city-arrival[data-exploring] footer { opacity:1; }
  #home :is(.cv-chapter,.pr-chapter)[data-scene-pin] {
    height:calc(100svh + clamp(290px,58svh,630px) + var(--handoff));
  }
  #home [data-scroll-frame] { --enter:1; --exit:0; --direction:1; position:relative; z-index:3; }
  #home :is(.warren-branch,.bb-layout)[data-scroll-frame] { --direction:-1; }
  #home :is(.cv-chapter,.pr-chapter)[data-scene-pin] > [data-scroll-frame],
  #home .bb-chapter[data-book-scroll] > [data-scroll-frame] { position:sticky; }
  #home [data-scroll-frame] > :is(.ashram-introduction,.warren-story,.cv-copy,.bb-intro,.pr-intro,.practice-sequence) {
    translate:calc((1 - var(--enter)) * var(--direction) * -11vw - var(--exit) * var(--direction) * 28vw)
      calc((1 - var(--enter)) * 17svh + var(--exit) * 16svh);
    opacity:calc(.48 + var(--enter) * .52 - var(--exit) * .17);
  }
  #home [data-scroll-frame] > :is(.ashram-specimen,.warren-apps,.cv-atlas,.bb-spread,.pr-exhibit,.practice-console) {
    translate:calc((1 - var(--enter)) * var(--direction) * 17vw + var(--exit) * var(--direction) * 26vw)
      calc((1 - var(--enter)) * 7svh + var(--exit) * 24svh);
    scale:calc(.75 + var(--enter) * .25 + var(--exit) * .14);
    rotate:calc(((1 - var(--enter)) * 7deg - var(--exit) * 12deg)*var(--direction));
    opacity:calc(.65 + var(--enter) * .35 - var(--exit) * .35);
  }
  #home [data-scroll-frame] :is(h2,.warren-story h3) {
    clip-path:inset(-15% -9% calc((1 - var(--enter))*89% - 15%) -9%);
  }
  #home [data-scroll-frame] > :focus-within { opacity:1; }
  #home [data-scroll-frame] > :focus-within :is(h2,h3) { clip-path:none; }
  #home .cv-chapter[data-scene-pin] .cv-branch:not(.selected) {
    stroke-dasharray:1;
    stroke-dashoffset:max(0,calc(.72 - var(--scene-position,.5)*1.65));
  }
  #home .pr-chapter[data-scene-pin] .pr-future-view img {
    transform:scale(calc(1.19 - var(--scene-position,.5)*.15)) translateX(calc((.5 - var(--scene-position,.5))*6%));
  }
}
@media (max-width:760px) {
  #home .ashram-chapter .practice-bench { gap:25px; }
  #home .ashram-chapter .practice-console { margin-bottom:14px; }
}
