/* Psychosis: the entrance. Two breaks in one wall of dark pencil soil:
   the left one opens onto the gallery, the right one onto the creatures.
   (Art direction and assets from the Psychosis kit; the site header comes from /styles.css.) */
:root {--bar:62px; --cream:#fff2d6; --lime:#cee326}
.sr {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
a {text-decoration:none}
@media (max-width:720px) {:root {--bar:56px}}
:root {
  --paper-wall: url(/img/soil.jpg);
}
html {background:#231511}
body {position:relative; isolation:isolate; background:transparent}
body::before {
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:#241610 var(--paper-wall) repeat left top / 402px 215px;
}

#fork {
  position:relative; isolation:isolate; overflow:hidden;
  height:100vh; height:100svh; padding-top:var(--bar);
  min-height:385px; display:grid; place-items:center;
  background:radial-gradient(ellipse at 45% 45%,#61311718 2%,transparent 59%),linear-gradient(to bottom,#170d0a0a 40%,#120a0755 100%);
}

.strata {
  width:min(91%,1370px); display:grid; grid-template-columns:1.05fr 1fr;
  column-gap:clamp(23px,5.8vw,97px); align-items:center;
}
.passage {display:flex;align-items:center;flex-direction:column;justify-content:center;min-width:0;position:relative;touch-action:manipulation}
.passage .piece {display:block;position:relative;width:100%;isolation:isolate;pointer-events:none}
#gallery-choice .piece {aspect-ratio:1.41}
#creature-choice .piece {aspect-ratio:1.41}
.piece img {display:block;position:absolute;width:100%;height:100%;object-fit:contain;inset:0;user-select:none;-webkit-user-drag:none}
#gallery-choice {transform:translateY(-2.1vh)}
#creature-choice {transform:translateY(3.2vh)}
.caption {
  display:inline-block;position:relative;margin-top:clamp(4px,1.3svh,16px);padding:3px 9px 8px;
  color:#fff2d6;font:400 clamp(26px,2.6vw,42px)/1.1 'DM Serif Display',Georgia,serif;
  letter-spacing:-.043em;text-shadow:0 2px 2px #1c100c,0 0 12px #1c100c;
}
.caption::after {
  content:"";position:absolute;bottom:2px;left:11%;right:9%;height:2px;background:#e4af5b;
  transform:rotate(-3deg) scaleX(0);transform-origin:left;transition:transform .23s ease-out;
}
.passage:focus-visible {outline:none}
.passage:focus-visible .caption {outline:2px dashed #e7c794;outline-offset:4px}
.passage:focus-visible .caption::after {transform:rotate(-3deg) scaleX(1)}
@media(hover:hover){.passage:hover .caption::after {transform:rotate(-3deg) scaleX(1)}}
.small-watch {position:absolute;pointer-events:none;user-select:none;width:clamp(27px,var(--width),63px);left:var(--x);top:var(--y);z-index:-1;opacity:var(--alpha);transform:translate(-50%,-50%) rotate(var(--angle))}
.small-watch img {width:100%;display:block;animation:wall-blink 13s var(--lag) infinite}
@keyframes wall-blink {0%,63%,65%,100%{transform:scaleY(1)}64%{transform:scaleY(.15)}}
@media(min-width:651px) and (max-aspect-ratio:5/4) {.strata{width:94%;column-gap:3.5vw}}
@media(max-width:650px) and (orientation:portrait) {
  #fork{min-height:535px;}
  .strata{grid-template-columns:1fr;width:100%;gap:clamp(14px,2.4svh,25px);padding:12px 0}
  .passage{width:min(73vw,46svh,355px);justify-self:start}
  #gallery-choice{margin-left:6.8vw;transform:none}
  #creature-choice{margin-right:5.5vw;justify-self:end;transform:none}
  .caption{font-size:clamp(22px,3svh,27px);margin-top:2px;padding:1px 7px 5px}
  .small-watch.mobile-hide{display:none}
}
@media(max-height:600px) and (orientation:landscape) {
  #fork{min-height:225px}
  .strata{width:min(84%,calc((100svh - var(--bar) - 49px) * 3.1));column-gap:5vw}
  .caption{font-size:22px;margin-top:0;padding-bottom:4px}
  #creature-choice,#gallery-choice{transform:none}
}
@media(prefers-reduced-motion:reduce){.small-watch img{animation:none}}
:root {
  --twisting-ink: url(/psychosis/art/root-twist.webp);
  --frayed-ink: url(/psychosis/art/root-fringe.webp);
  --hairline-ink: url(/psychosis/art/root-veins.webp);
}
.ink-root {
  display:block; position:absolute; z-index:-1; pointer-events:none;
  background:50% 50% / 100% 100% no-repeat;
}
.ink-twist {background-image:var(--twisting-ink)}
.ink-fringe {background-image:var(--frayed-ink)}
.ink-veins {background-image:var(--hairline-ink)}
.piece .ink-fringe,.piece .ink-veins {mask-image:linear-gradient(180deg,transparent 1%,#000 22%,#000 92%,transparent)}
.bank-top {width:20%;height:52%;left:4%;top:-21%;transform:rotate(13deg);opacity:.83}
.bank-hair {width:23%;height:18%;right:27%;top:-4%;transform:rotate(180deg);opacity:.68}
.bank-side {width:14%;height:39%;right:-3%;top:19%;transform:rotate(-17deg) scaleX(-1);opacity:.79}
.bank-foot {width:16%;height:38%;left:20%;bottom:-9%;transform:rotate(158deg);opacity:.83}
.bank-bottom {width:22%;height:21%;right:3%;bottom:-4%;transform:rotate(-174deg);opacity:.62}
.root-gallery-side {width:29%;height:87%;right:-9%;top:-21%;transform:rotate(7deg);opacity:.97}
.root-gallery-fringe {width:27%;height:31%;left:18%;bottom:-5%;transform:rotate(9deg)}
.root-tear-side {width:23%;height:71%;right:0;top:-21%;transform:rotate(-11deg);opacity:.86}
.root-tear-fray {width:54%;height:31%;left:29%;bottom:-13%;transform:rotate(3deg);opacity:.96}
.root-tear-tip {width:16%;height:23%;left:8%;bottom:-5%;transform:rotate(15deg);opacity:.86}
#creature-choice .piece .visitor {width:100%;height:100%;inset:0}
#gallery-choice .caption,#creature-choice .caption {z-index:1}
@media(max-width:650px) and (orientation:portrait){
 .bank-top{width:24%;height:29%;left:4%;top:-11%}
 .bank-side{width:25%;height:26%;right:-8%;top:31%}
 .bank-foot{width:20%;height:27%;left:3%;bottom:-4%}
 .bank-hair,.bank-bottom {display:none}
 .root-gallery-side{width:23%;height:63%;top:-7%;right:-9%}
 .root-tear-fray {height:27%;bottom:-10%}
 .small-watch{left:var(--mx,var(--x));top:var(--my,var(--y))}
}
.ink-twist {mask-image:linear-gradient(to bottom,transparent 0%,#000 12%,#000 92%,transparent)}
.bank-hair,.bank-bottom {mask-image:radial-gradient(ellipse at 50% 68%,#000 30%,#000b 58%,transparent 81%)}
.root-gallery-side {transform:rotate(148deg);right:-2%;top:-25%}
.root-tear-side {transform:rotate(164deg);right:-5%;top:-16%}
.root-tear-fray {left:34%;width:50%;height:25%;bottom:-9%}

/* Gallery: a wider torn rim around the eye, so the opening breaks into the soil more gradually,
   like the creature tear: a brown crayon band cut in the same ragged shape as the opening
   (the picture itself is the mask), with the eye drawn a little smaller inside it. */
#gallery-choice .piece img {inset:4.5%; width:91%; height:91%; z-index:1}
.tear-rim {position:absolute; inset:0; z-index:0;
  background:linear-gradient(#7a4a3266,#7a4a3266), #2c1810 url(/img/soil.jpg) repeat 0 0/402px 215px;
  -webkit-mask:url(/psychosis/art/gallery-eye.webp) center/contain no-repeat;
          mask:url(/psychosis/art/gallery-eye.webp) center/contain no-repeat;
  transform:rotate(-1.5deg);
  filter:drop-shadow(0 0 1px #140904cc) drop-shadow(0 4px 8px #0d060388)}
