/* shoji-subpage.css - the V7 shoji doors carried to the seven sub-pages.
   Same two painted leaves, same easing and the same 760ms close / 860ms open as
   shoji-v5.css; nothing here is drawn in code and no rule paints a field behind
   copy. Every door rule is scoped to html:not(.is-stage), so the home page's own
   door cycle cannot see it, and this sheet only ships on the sub-pages.
   The wall is a fixed layer that stays out of hit testing in every state. */

@media (min-width:768px) and (prefers-reduced-motion:no-preference){
html:not(.is-stage) .shoji{position:fixed;inset:0;z-index:40;overflow:hidden;pointer-events:none;visibility:visible}
html:not(.is-stage) .shoji__leaf{position:absolute;top:0;height:100%;background-color:#EBD4A9;background-repeat:repeat-x;background-size:auto 100%;transition:none;will-change:transform}
html:not(.is-stage) .shoji__leaf--l{left:0;width:calc(50% + 4px);z-index:2;background-image:url("/media/shoji-v5/door-left-sm.webp");background-position:right center;transform:translate3d(-100%,0,0);box-shadow:16px 0 46px -16px rgba(46,28,14,.6)}
html:not(.is-stage) .shoji__leaf--r{right:0;width:50%;z-index:1;background-image:url("/media/shoji-v5/door-right-sm.webp");background-position:left center;transform:translate3d(100%,0,0);box-shadow:-16px 0 46px -16px rgba(46,28,14,.6)}
@media (min-resolution:1.5dppx){html:not(.is-stage) .shoji__leaf--l{background-image:url("/media/shoji-v5/door-left.webp")}html:not(.is-stage) .shoji__leaf--r{background-image:url("/media/shoji-v5/door-right.webp")}}
html.is-closing:not(.is-stage) .shoji__leaf{transform:translate3d(0,0,0);transition:transform 760ms cubic-bezier(0.22,0.61,0.36,1)}
html.is-shut:not(.is-stage) .shoji__leaf{transform:translate3d(0,0,0);transition:none}
/* the open carries its own target and its own transition. Inheriting them from
   the base rule meant the animation began on the same frame that is-shut took
   `transition:none` away, and a browser that resolved that pair in one pass had
   nothing to animate from: the leaves jumped off-canvas instead of gliding.
   is-opening is dropped at 860ms; the base rule holds the same off-canvas
   transform, so the handover moves nothing. */
@keyframes shoji-open-l{from{transform:translate3d(0,0,0)}to{transform:translate3d(-100%,0,0)}}
@keyframes shoji-open-r{from{transform:translate3d(0,0,0)}to{transform:translate3d(100%,0,0)}}
html.is-opening:not(.is-stage) .shoji__leaf--l{transform:translate3d(-100%,0,0);transition:none;animation:shoji-open-l 860ms var(--ease-arrive) both}
html.is-opening:not(.is-stage) .shoji__leaf--r{transform:translate3d(100%,0,0);transition:none;animation:shoji-open-r 860ms var(--ease-arrive) both}
html.is-motion-paused:not(.is-stage) .shoji__leaf{animation-play-state:running!important}

/* open: the wall is off-canvas and must not take a click or a hover */
html:not(.is-shut):not(.is-closing) .shoji{pointer-events:none}
html.is-shut:not(.is-stage) .shoji,html.is-opening:not(.is-stage) .shoji{pointer-events:none}

html:not(.is-stage) .shoji__title{position:absolute;left:50%;top:43.5%;z-index:3;margin:0;transform:translate(-50%,-50%);opacity:0;color:var(--ink);font:400 clamp(1.25rem,2.2vw,2.05rem)/1.12 var(--serif);letter-spacing:.32em;text-transform:uppercase;white-space:nowrap;text-align:center;will-change:opacity;transition:opacity 200ms ease}
/* the label is there the moment the wall is: no is-named wait */
html.is-shut:not(.is-stage) .shoji__title{opacity:.88}
html.is-shut.is-named:not(.is-stage) .shoji__title{opacity:.88}
/* gone on frame one of the open, not 200ms into it */
html.is-opening:not(.is-stage) .shoji__title{opacity:0;transition:none}

/* the page waits behind the wall while it is shut, and is opaque again the
   instant the wall starts to open */
html.is-shut:not(.is-stage) body > :not(.shoji){opacity:0}
/* the page beneath is already at full weight on the first frame of the open */
html.is-opening:not(.is-stage) body > :not(.shoji){opacity:1}
/* escape: a page whose wall was never built (the home page between 768 and 1023,
   where stage.js does not run) never hides content, whatever the marker says */
html.is-shut:not(.is-stage):not(:has(.shoji)) body > :not(.shoji){opacity:1}

/* M3: the arrival settle. While the wall is shut the masthead art sits at the
   homepage's own arrival value, 1.018; the frame that lifts is-shut adds
   is-opening, and the art settles to 1 over 900ms var(--ease-arrive).
   The transition sits on the settled rule, not on html.is-opening: is-opening
   is removed at 860ms, so a rule keyed to it would snap the art back to 1.018
   mid-open. Only the `scale` property is touched, so the shared object-fit and
   object-position of .masthead__art are not in the fight, and html:not(.is-stage)
   keeps the settle off the home page in every width. */
html:not(.is-stage) .masthead__art{scale:1;transition:scale 900ms var(--ease-arrive)}
html.is-shut:not(.is-stage) .masthead__art{scale:1.018;transition:none}
}

/* M3 anchor glide and the reveal pair live in v5-layout.css, landed by M2 while
   this file was open (html:not(.is-stage){scroll-behavior:smooth}, plus the
   html.has-reveal pair on .page with its own print and reduced-motion escape).
   Nothing is duplicated here: shoji-nav.js adds html.has-reveal and .is-in, and
   that sheet reads them. A second copy in this file would only re-time what M2
   already set, so the only motion rule this file adds is the masthead settle. */

@media (max-width:767px),(prefers-reduced-motion:reduce),print{.shoji{display:none}}
