/* Creatures: the five-character viewer from the Psychosis kit, under the site header. */
:root{--bar:62px}
@media (max-width:720px){:root{--bar:56px}}
:root{color-scheme:dark;--paper:#211f23;--ink:#c6c0bc;--lime:#ddea6b}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--paper)}
main{font:15px/1.25 system-ui,-apple-system,sans-serif}
main{position:relative;isolation:isolate;height:100%;height:100dvh;display:grid;grid-template-rows:minmax(0,1fr) auto;background:radial-gradient(ellipse at 50% 46%,#28262a,var(--paper) 76%)}
#space{position:relative;min-height:0;touch-action:none;user-select:none}
canvas,img.pose{position:absolute;inset:0;width:100%;height:100%;display:block}
img.pose{object-fit:contain;pointer-events:none}
canvas{touch-action:none;cursor:grab;outline:none}canvas:active{cursor:grabbing}
canvas:focus-visible{outline:1px dotted #817f75;outline-offset:-5px}
main nav{display:flex;justify-content:center;align-items:center;gap:9px;padding:0 14px max(14px,env(safe-area-inset-bottom))}
button{border:0;background:transparent;color:var(--ink);min-width:62px;min-height:42px;position:relative;padding:9px 12px;font:inherit;letter-spacing:.015em;cursor:pointer}
button::after{content:"";position:absolute;left:calc(50% - 9px);bottom:5px;width:18px;height:2px;background:var(--lime);border-radius:55% 25% 45% 30%;transform:rotate(-2deg) scaleX(0);transition:transform .14s}
button[aria-pressed=true]{color:var(--lime)}button[aria-pressed=true]::after{transform:rotate(-2deg) scaleX(1)}
button:hover{color:#eeebdc}button:focus-visible{outline:1px solid var(--lime);outline-offset:-2px;border-radius:3px}
[hidden]{display:none!important}
@media (max-height:450px){main nav{padding-bottom:3px}button{min-height:35px}}
@media (prefers-reduced-motion:reduce){button::after{transition:none}}
main nav{position:relative}
#next{position:absolute;right:clamp(12px,4vw,56px);top:0;display:grid;place-items:center;width:43px;height:42px;min-width:0;min-height:0;padding:0;border-radius:50%;color:var(--ink)}
#next::after{display:none} #next:hover{color:var(--lime);background:#ffffff09}#next svg{width:21px;height:21px;transition:transform .14s}#next:hover svg{transform:translateX(2px)}
main[data-paper="light"]{--paper:#e4d9c5;--ink:#51493f;--lime:#772739;background:radial-gradient(ellipse at 50% 44%,#eadfcb,#e1d5c0 83%);color-scheme:light}
main[data-paper="light"] button:hover{color:#3d272a}main[data-paper="light"] #next:hover{background:#32202808}
.status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:340px){main nav{padding-right:52px;gap:2px}#next{right:5px}}
@media(prefers-reduced-motion:reduce){#next svg{transition:none}}
#prev{order:-1}#prev,#next{width:40px;height:40px;min-height:0;min-width:0;padding:0;border-radius:50%;display:grid;place-items:center}
#prev{position:absolute;left:clamp(12px,4vw,56px);top:0}#prev:after{display:none}#prev svg{width:21px;height:21px;transform:scaleX(-1)}#prev:hover{color:var(--lime);background:#88888815}
@media(max-width:400px){main nav{padding-left:42px;padding-right:42px;gap:0}#prev{left:2px}#next{right:2px}button[data-motion]{min-width:50px}}
#space{overflow:hidden}
#motion-film{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);height:auto;pointer-events:none}
main.filming{background:#232126}main.filming[data-paper="light"]{background:#e6dcc9}

/* the site menu: tucked away so the creatures get the whole screen; it comes back when the
   cursor goes near the top (or for a moment after a tap up there on a phone), like the gallery */
.top.dark{background:rgba(20,8,24,.55);transition:translate .35s ease,opacity .35s ease}
.top.dark.tucked{translate:0 -100%;opacity:0}
/* crayon texture over each creature's own background color: the home page's soil drawing,
   turned neutral grey (img/soil-grain.jpg) so it only adds the strokes and keeps the colors */
main::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:url(/img/soil-grain.jpg) repeat center/402px 215px;mix-blend-mode:overlay;opacity:.5}
main[data-paper="light"]::before{mix-blend-mode:soft-light;opacity:.7}

/* which creature you're on, e.g. 03 / 18 */
.count{position:absolute;top:max(18px,env(safe-area-inset-top));right:clamp(16px,4vw,60px);z-index:2;font-size:12px;letter-spacing:.12em;font-variant-numeric:tabular-nums;color:var(--ink);opacity:.55;pointer-events:none}
