/* WAKA sky shell, loaded after site.css on every page but the home page (which draws the same sky itself).
   CSS only: first paint is the finished sky. Colours are site.css tokens or values the home sky uses. */
:root { --edge: url("../brand/koru-edge.webp"); }
body.shell { background: transparent; min-height: 100svh; display: flex; flex-direction: column; }
.shell main { flex: 1 0 auto; }

/* Sky */
.sk { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(75% 65% at 10% 4%, rgb(29 107 90 / .85), rgb(29 107 90 / 0)), radial-gradient(60% 60% at 92% 8%, rgb(31 95 122 / .8), rgb(31 95 122 / 0)), radial-gradient(80% 55% at 78% 92%, rgb(27 58 110 / .75), rgb(27 58 110 / 0)), var(--night); }
.sk::before, .sk .ab { content: ""; position: absolute; inset: -25% -15%; }
.sk::before { background: radial-gradient(34% 17% at 38% 28%, rgb(29 107 90 / .75), rgb(29 107 90 / 0)), radial-gradient(28% 14% at 72% 20%, rgb(31 95 122 / .7), rgb(31 95 122 / 0)); transform: rotate(-14deg) skewX(-20deg); }
.sk .ab { background: radial-gradient(30% 14% at 30% 60%, rgb(26 100 112 / .55), rgb(26 100 112 / 0)), radial-gradient(26% 12% at 70% 70%, rgb(27 58 110 / .6), rgb(27 58 110 / 0)); transform: rotate(10deg) skewX(16deg); }
.sk::after, .sk .s2, .sk .s3, .sk .s4 { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 1px; border-radius: 50%; opacity: .9; }
.sk::after { color: var(--moonlit); box-shadow: 83vw 84vh,62vw 49vh,97vw 45vh,8vw 4vh,87vw 5vh,31vw 79vh,3vw 14vh,46vw 3vh,82vw 24vh,63vw 65vh,68vw 21vh,48vw 19vh,71vw 19vh,28vw 35vh,40vw 79vh,90vw 10vh,92vw 72vh,38vw 57vh,87vw 79vh,65vw 21vh,72vw 81vh,64vw 71vh,22vw 89vh,54vw 78vh,9vw 44vh,49vw 4vh,80vw 7vh,79vw 18vh,15vw 16vh,52vw 72vh,94vw 9vh,23vw 53vh,29vw 72vh,84vw 56vh,32vw 38vh,84vw 89vh,96vw 52vh,57vw 21vh,54vw 50vh,60vw 4vh,95vw 91vh,27vw 47vh,20vw 62vh,92vw 14vh; }
.sk .s2 { color: #a0c8e6; box-shadow: 57vw 86vh,19vw 16vh,90vw 81vh,25vw 20vh,73vw 93vh,20vw 94vh,87vw 60vh,42vw 11vh,5vw 95vh,24vw 70vh,26vw 82vh,59vw 30vh,8vw 23vh,91vw 21vh,57vw 14vh,36vw 88vh,97vw 65vh,69vw 58vh,3vw 63vh,48vw 73vh,32vw 99vh,8vw 55vh,73vw 70vh,79vw 91vh,35vw 68vh,62vw 38vh,58vw 61vh,69vw 50vh,61vw 91vh,26vw 2vh,31vw 67vh,14vw 50vh; }
.sk .s3 { width: 2px; height: 2px; color: var(--harbour-30); box-shadow: 53vw 7vh,20vw 25vh,4vw 46vh,44vw 84vh,52vw 64vh,46vw 28vh,83vw 70vh,32vw 24vh,29vw 8vh,76vw 40vh,84vw 39vh,95vw 84vh,1vw 22vh,97vw 40vh,8vw 63vh,77vw 27vh,56vw 45vh,20vw 73vh,12vw 42vh,31vw 88vh,22vw 40vh,11vw 98vh,25vw 60vh,37vw 45vh; }
.sk .s4 { width: 2px; height: 2px; color: #e4edfb; box-shadow: 45vw 56vh 0 .5px,45vw 56vh 7px 2px rgb(170 200 240/.5),92vw 47vh 0 .5px,92vw 47vh 7px 2px rgb(170 200 240/.5),19vw 51vh 0 .5px,19vw 51vh 7px 2px rgb(170 200 240/.5),63vw 79vh 0 .5px,63vw 79vh 7px 2px rgb(170 200 240/.5),10vw 31vh 0 .5px,10vw 31vh 7px 2px rgb(170 200 240/.5),10vw 80vh 0 .5px,10vw 80vh 7px 2px rgb(170 200 240/.5),69vw 5vh 0 .5px,69vw 5vh 7px 2px rgb(170 200 240/.5),97vw 96vh 0 .5px,97vw 96vh 7px 2px rgb(170 200 240/.5),16vw 2vh 0 .5px,16vw 2vh 7px 2px rgb(170 200 240/.5); }
@media (max-width: 700px) { .sk .s2, .sk .ab { display: none; } }
@keyframes skT { from { opacity: .45; } to { opacity: 1; } }
@keyframes skA { to { transform: translate3d(6%, 4%, 0) rotate(-10deg) skewX(-27deg); } }
@keyframes skB { to { transform: translate3d(-7%, -3%, 0) rotate(6deg) skewX(22deg); } }
@media (prefers-reduced-motion: no-preference) {
  :is(html:not(.js), html.motion-on) .sk::before { animation: skA 52s ease-in-out infinite alternate; }
  :is(html:not(.js), html.motion-on) .sk .ab { animation: skB 67s ease-in-out infinite alternate; }
  :is(html:not(.js), html.motion-on) .sk::after { animation: skT 9s ease-in-out infinite alternate; }
  :is(html:not(.js), html.motion-on) .sk .s2 { animation: skT 13s ease-in-out -4s infinite alternate; }
  :is(html:not(.js), html.motion-on) .sk .s3 { animation: skT 6s ease-in-out -2s infinite alternate; }
  :is(html:not(.js), html.motion-on) .sk .s4 { animation: skT 4.5s ease-in-out -1s infinite alternate; }
}

/* Pattern band, top and foot: the site emboss method on a crop of the koru linework */
@supports (mask-composite: subtract) and (mask-mode: luminance) {
  .shell main::before, .shell main::after, .shell .site-footer::before, .shell .site-footer::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; pointer-events: none; mask-repeat: no-repeat; mask-mode: alpha, luminance, luminance; mask-composite: intersect, subtract; mask-size: 100% 100%, 100% auto, 100% auto; }
  .shell main::before, .shell main::after { height: min(25vw, 460px); mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 48%, transparent), var(--edge), var(--edge); }
  .shell .site-footer::before, .shell .site-footer::after { bottom: 0; mask-image: linear-gradient(to top, #000, #000 35%, transparent), var(--edge), var(--edge); }
  .shell main::before, .shell .site-footer::before { background: #040810; opacity: .4; mask-position: 0 0, 50% 100%, 50% calc(100% + 2px); }
  .shell main::after, .shell .site-footer::after { background: var(--moonlit); opacity: .18; mask-position: 0 0, 50% 100%, 50% calc(100% - 2px); }
  @media (max-width: 639px) {
    .shell main::before, .shell main::after { height: 280px; mask-size: 100% 100%, auto 100%, auto 100%; }
    .shell .site-footer::before, .shell .site-footer::after { mask-size: 100% 100%, auto 100%, auto 100%; }
    .shell main::before, .shell .site-footer::before { mask-position: 0 0, 28% 100%, 28% calc(100% + 2px); }
    .shell main::after, .shell .site-footer::after { mask-position: 0 0, 28% 100%, 28% calc(100% - 2px); }
  }
}

/* Head on the sky; light cards for forms and drawings, night glass for reading */
.shell .band { padding-block: var(--s6) var(--s9); }
.shell .page-head, .shell .crumb, .shell .other-way { text-shadow: 0 2px 22px rgb(8 16 30 / .6); }
.shell .page-head .lead, .shell .crumb, .shell .aside, .shell .other-way { color: var(--ink); }
.sheet, .card { position: relative; padding: var(--s5); border: 1px solid var(--card-line); border-radius: var(--r-1); color: var(--ink); }
.sheet { background: rgb(26 40 64 / .92); box-shadow: inset 0 1px 0 rgb(230 235 240 / .12), 0 24px 60px rgb(0 0 0 / .35); }
.card { background: var(--n05); box-shadow: 0 24px 70px rgb(0 0 0 / .45); }
.sheet > :first-child { margin-top: 0; }
.sheet.prose ul li::before { background: var(--harbour-30); }
.page-figure.card { padding: var(--s3); }
.shell .site-footer { background: none; border-top: 1px solid var(--line-soft); }
@media (min-width: 640px) { .sheet, .card { padding: var(--s6); } }

/* Wananga page */
.l-head h1 { font-size: clamp(38px, 10.2vw, 64px); line-height: 1.02; }
.l-head .cta .btn { box-shadow: 0 0 0 1px rgb(230 235 240 / .5), 0 12px 44px rgb(127 167 158 / .4); }
.l-top #register { margin-top: var(--s6); }
details.more { display: block; }
.l-block { max-width: none; margin-top: var(--s5); }
@media (min-width: 960px) {
  .l-two { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-rows: auto auto auto 1fr; column-gap: var(--s8); align-items: start; }
  .l-two .l-head { grid-column: 1; margin-bottom: var(--s6); }
  .l-two #register { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; }
  .l-two .l-block { grid-column: 1; width: 100%; margin-top: 0; margin-bottom: var(--s5); }
}


@media (forced-colors: active) {
  .sk { display: none; }
  .sheet, .card { border-color: CanvasText; }
}
@media print {
  .sk { display: none; }
  .shell main::before, .shell main::after, .shell .site-footer::before, .shell .site-footer::after { display: none; }
  .sheet, .card { background: #fff !important; border: 0; box-shadow: none; padding: 0; }
  .shell [data-theme] { --ink: #000; --text-2: #222; --text-3: #333; --link: #000; --accent-text: #000; }
}
