/* 1238 St. James Place — the slide-out menu, shared by the main page and every other page. */
/* ---------- Page menu: a round button (on the main page, only between the covers). The button is a spot of the
   page's own paper with an edge that fades out, like an erased spot; it opens a sheet with the links. ---------- */
.sjp-menubtn { position: fixed; top: max(15px, 1.25vh); right: max(18px, 1.5vw); z-index: 900; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 140px; height: 140px; padding: 0; font: 20px 'Architects Daughter', cursive; color: #040A00; cursor: pointer;
  background: none; border: 0; }
.sjp-menubtn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: #F4F4F0 url('../textures/paper.png') 0 0 / 256px 256px repeat;
  -webkit-mask-image: radial-gradient(closest-side, #000 58%, transparent 100%); mask-image: radial-gradient(closest-side, #000 58%, transparent 100%); transition: filter .15s; }
.sjp-menubtn:hover::before, .sjp-menubtn:focus-visible::before { filter: brightness(1.04) saturate(2) hue-rotate(-10deg); }
.sjp-menubtn:focus-visible { outline: 0; }
/* The same brush-stroke hamburger as the other pages' menu */
.sjp-menubtn__lines { position: relative; width: 46px; height: 40px; }
.sjp-menubtn__lines i { position: absolute; left: 3px; right: 3px; height: 9px; background: #040A00;
  -webkit-mask: url('../masks/marker-stroke.png') 0 50% / 100% 100% no-repeat; mask: url('../masks/marker-stroke.png') 0 50% / 100% 100% no-repeat; }
.sjp-menubtn__lines i:nth-child(1) { top: 7px; transform: rotate(-2deg); }
.sjp-menubtn__lines i:nth-child(2) { top: 16px; right: 8px; transform: scaleX(-1) rotate(1deg); -webkit-mask-image: url('../../marker-stroke-mulhdku0-zjrv.png'); mask-image: url('../../marker-stroke-mulhdku0-zjrv.png'); }
.sjp-menubtn__lines i:nth-child(3) { top: 25px; left: 7px; transform: rotate(1.5deg); -webkit-mask-image: url('../../marker-stroke-mulhshi1-dhrm.png'); mask-image: url('../../marker-stroke-mulhshi1-dhrm.png'); }
/* The menu slides out from the left: a rectangle of the page's paper, rounded at the bottom right, its edges faded out */
.sjp-menu { border: 0; padding: 0; margin: 0; background: transparent; max-width: none; position: fixed; z-index: 950; inset: 0 auto auto 0; width: min(430px, 90vw); height: auto; max-height: 100dvh; overflow: auto; overflow-x: hidden;
  transform: translateX(-105%); transition: transform .3s ease-out, overlay .3s allow-discrete, display .3s allow-discrete; }
.sjp-menu[open] { transform: none; }
@starting-style { .sjp-menu[open] { transform: translateX(-105%); } }
.sjp-menu.is-out[open] { transform: translateX(-105%); }
.sjp-menu__sheet { position: relative; isolation: isolate; box-sizing: border-box; width: 100%; padding: 46px 52px 54px 40px; font-family: 'Architects Daughter', cursive; color: #040A00; }
.sjp-menu__sheet::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 0 0 64px 0; background: #F4F4F0 url('../textures/paper.png') 0 0 / 256px 256px repeat;
  -webkit-mask-image: linear-gradient(to left, transparent, #000 30px), linear-gradient(to top, transparent, #000 30px); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, transparent, #000 30px), linear-gradient(to top, transparent, #000 30px); mask-composite: intersect; }
.sjp-menu__x { position: absolute; top: 12px; right: 30px; background: none; border: 0; font: 34px/1 'Josefin Sans', sans-serif; color: #040A00; cursor: pointer; }
.sjp-menu__x:focus, .sjp-menu__x:focus-visible { outline: 0; }
.sjp-menu__title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 20px; }
.sjp-menu__title img { width: 28px; }
.sjp-menu ul { list-style: none; margin: 0; padding: 0; }
.sjp-menu li { margin: 2px 0; }
.sjp-menu a { position: relative; z-index: 0; display: inline-block; padding: 4px 2px; font-size: 28px; line-height: 1.15; color: #040A00; text-decoration: none; }
.sjp-menu a::after { content: ""; position: absolute; left: -6px; right: -8px; bottom: 0; height: 14px; z-index: -1; background: #FFFF02; -webkit-mask: url('../masks/hl-box.svg') 0 0 / 100% 100% no-repeat; mask: url('../masks/hl-box.svg') 0 0 / 100% 100% no-repeat; clip-path: inset(0 100% 0 0); transition: clip-path .25s; }
.sjp-menu a:hover::after, .sjp-menu a:focus-visible::after { clip-path: inset(0 0 0 0); }
.sjp-menu > .sjp-menu__sheet > ul > li:nth-child(odd) { transform: rotate(-.7deg); }
.sjp-menu > .sjp-menu__sheet > ul > li:nth-child(even) { transform: rotate(.6deg); }
/* Tools: a dropdown, closed until its name is tapped */
.sjp-menu__group { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; padding: 4px 2px; font: 28px/1.15 'Architects Daughter', cursive; color: #040A00; background: none; border: 0; cursor: pointer; }
.sjp-menu__group::after { content: ""; width: 14px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1.6 2.2 C4 4.4 5.6 6.6 7.2 8 C9 6 10.8 4.2 12.6 2' fill='none' stroke='%23040A00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s; }
.sjp-menu__group:focus-visible { outline: 0; }
.sjp-menu li.is-open > .sjp-menu__group::after { transform: rotate(180deg); }
.sjp-menu__group + ul { display: none; padding-left: 24px; }
.sjp-menu li.is-open > .sjp-menu__group + ul { display: block; }
.sjp-menu__group + ul a { font-size: 23px; }
@media (max-width: 520px) { .sjp-menu__sheet { padding: 40px 40px 48px 28px; } .sjp-menubtn { width: 112px; height: 112px; font-size: 17px; right: 4px; } }
@media (prefers-reduced-motion: reduce) { .sjp-menu a::after { transition: none; } }
