*{box-sizing:border-box;margin:0;padding:0}
html,body{background:#000}
/* Reserve the scrollbar's space from the very first paint, so the page width (and therefore the photo size)
   is already final during the loading screen and never shifts when loading ends. */
html{scrollbar-gutter:stable}
html.loading,html.loading body{overflow:hidden;height:100%}

/* ---------- the sky photo (1333 x 2000) ----------
   Desktop / wide screens: the WHOLE width of the photo fits the screen, so the photo is taller than the
   viewport and scrolling travels down it.
   Phones (screen narrower than the photo): the photo is scaled to the screen height and anchored top-left
   (the right side is cropped), and the first section is exactly one photo tall, so the photo ends
   precisely where the next section starts. */
#landing{position:relative;width:100%}
#skyphoto{
  position:relative;width:100%;
  aspect-ratio:1333 / 2000;      /* sized from its container's width, never from 100vw (which includes the scrollbar) */
  background:#8f9bb5 url(images/sky.jpg) top left / 100% 100% no-repeat;
  /* eye adjusting after waking up (driven by loader.js) */
  filter:blur(calc((1 - var(--focus, 1)) * 28px)) brightness(calc(1 + (1 - var(--adapt, 1)) * 1.5));
}
@media (max-aspect-ratio: 1333/2000){
  #skyphoto{
    aspect-ratio:auto;
    height:100vh;height:100svh;
    background-size:auto 100%;
    background-position:top left;
  }
}

/* ---------- "Welcome", written in cursive near the bottom right (see welcome.js) ----------
   position:fixed = pinned to the screen: it never moves, however you scroll.
   On desktop the START of the W sits on the centre line of the screen (left:50% anchors the word's left edge there; the
   small negative x-shift cancels the empty space before the first stroke) and the word runs off to the right, over the
   boy in black. top = 78% down the screen. width = how big the word is. */
#welcome{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:140;pointer-events:none}
@media (max-width:899px){ #welcome{transform:translate(-50%,-50%)} }   /* phones: too narrow for that, so centre it */
/* portrait phones (taller than wide): the word sits at the TOP of the screen instead of the middle, and (welcome.js) it never glitches away */
@media (max-width:899px) and (orientation:portrait){ #welcome{top:calc(env(safe-area-inset-top, 0px) + 9vh);transform:translate(-50%,0)} }
#welcome canvas{display:block;width:clamp(300px,38vw,880px);height:auto;
  filter:drop-shadow(0 3px 7px rgba(60,20,45,.34))}
/* while the word is glitching (welcome.js adds the class) its ink turns black; the #00FFBB fringes of the glitch filter stay */
/* the vines that grow around the word where the mouse passes (welcome.js) sit exactly on top of it */
#welcome #wvines{position:absolute;left:0;top:0;width:100%;height:100%;filter:drop-shadow(0 0 4px rgba(0,255,187,.45))}
#welcome.glitching canvas{filter:brightness(0) drop-shadow(0 3px 7px rgba(60,20,45,.34))}

/* ---------- the old-Windows message box ("This is Lorne") ---------- */
#winbox{position:fixed;left:60%;top:56vh;transform:translate(-50%,-50%);z-index:150;display:none;pointer-events:none;
  font:400 clamp(13px,1vw,20px)/1.25 Tahoma,'MS Sans Serif',Verdana,Arial,sans-serif;color:#000;
  background:#c0c0c0;min-width:19em;padding:.18em;
  box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #dfdfdf,inset -2px -2px #808080,inset 2px 2px #fff,.45em .6em 0 rgba(0,0,0,.28)}
#winbox .wb-title{display:flex;justify-content:space-between;align-items:center;padding:.22em .3em;color:#000;font-weight:700;
  background:#00FFBB;letter-spacing:.01em}
#winbox .wb-x{display:grid;place-items:center;width:1.25em;height:1.15em;line-height:1;color:#000;background:#c0c0c0;font-size:1em;
  box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #fff,inset -2px -2px #808080,inset 2px 2px #dfdfdf}
#winbox .wb-body{display:flex;align-items:center;gap:1.1em;padding:1.5em 1.8em 1.2em}
#winbox .wb-icon{flex:none;width:2.6em;height:2.6em}
#winbox .wb-body p{margin:0;font-size:1.15em}
#winbox .wb-btns{display:flex;justify-content:center;padding:0 1em 1.1em}
#winbox .wb-ok{display:grid;place-items:center;min-width:6.2em;padding:.4em 0;background:#c0c0c0;
  box-shadow:inset -1px -1px #0a0a0a,inset 1px 1px #fff,inset -2px -2px #808080,inset 2px 2px #dfdfdf,0 0 0 1px #000}
#winbox.pop{animation:wbpop .16s ease-out}
@keyframes wbpop{from{scale:.65;opacity:0}60%{scale:1.06;opacity:1}to{scale:1;opacity:1}}

/* ---------- grid of heads, at the very back (over the sky photo, under all the clouds and people) ---------- */
#heads{position:absolute;inset:0;overflow:hidden;pointer-events:none;opacity:0;transition:opacity 3s ease 1.2s}
#heads.show{opacity:var(--heads-o,.5)}
.hrow{position:absolute;left:0;display:flex;flex-wrap:nowrap;white-space:nowrap;will-change:transform;
  animation-duration:var(--dur,60s);animation-timing-function:linear;animation-iteration-count:infinite}
.hrow img{flex:none;display:block;object-fit:contain;max-width:none;transition:opacity .3s ease}
@keyframes heads-left{from{transform:translate3d(0,0,0)}to{transform:translate3d(calc(var(--dist) * -1),0,0)}}
@keyframes heads-right{from{transform:translate3d(calc(var(--dist) * -1),0,0)}to{transform:translate3d(0,0,0)}}

/* ---------- extra clouds (cut out of a second photo) ---------- */
#clouds{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.cloud{
  position:absolute;height:auto;max-width:none;user-select:none;-webkit-user-drag:none;
  will-change:transform;
  /* warm them up so white clouds sit naturally in the sunset light */
  opacity:0;translate:0 36px;
}
/* feather the very edge of every cut-out so no straight tracing line can ever show */
.cloud{
  -webkit-mask-image:linear-gradient(to right,transparent,#000 9%,#000 91%,transparent),linear-gradient(to bottom,transparent,#000 12%,#000 88%,transparent);
  -webkit-mask-composite:source-in;
  mask-image:linear-gradient(to right,transparent,#000 9%,#000 91%,transparent),linear-gradient(to bottom,transparent,#000 12%,#000 88%,transparent);
  mask-composite:intersect;
}
/* the rappelling man's rope: two strands from the top of the screen down to his hands.
   position:fixed so it always starts at the top edge, whatever the scroll. */
#rope{
  position:fixed;top:0;width:10px;height:0;z-index:111;pointer-events:none;   /* just behind the man (z 112), above the middle clouds */
  background:linear-gradient(90deg,#b8343a 0 40%,transparent 40% 60%,#e0605a 60% 100%);
  filter:drop-shadow(0 0 2px rgba(120,30,40,.45));
  transform-origin:50% 0;opacity:0;
  animation:ropeSway 5.5s ease-in-out infinite;
  transition:opacity 2s ease 2.2s;
}
#clouds.show #rope{opacity:.95}
#rope.gone{opacity:0 !important}    /* while the rope is falling (an SVG copy animates it) */
/* sway uses the independent `rotate` property, so it adds to the lean that JS sets through `transform` */
@keyframes ropeSway{0%,100%{rotate:-.6deg}50%{rotate:.6deg}}
@media (prefers-reduced-motion:reduce){#rope{animation:none}}

/* the white medieval ">" : plain white text, no glow, no edge fade */
.cloud.chevron{
  -webkit-mask-image:none; mask-image:none;
  color:#fff; white-space:nowrap; line-height:1; text-align:left;
  filter:none; text-shadow:none; user-select:none; pointer-events:none;
}

/* people keep their full silhouette (no edge fade) */
.cloud.person{ -webkit-mask-image:none; mask-image:none }
#clouds.show .cloud{
  opacity:var(--o,.9);translate:0 0;
  transition:opacity 2.6s ease var(--d,0s), translate 3.2s cubic-bezier(.2,.7,.2,1) var(--d,0s);
}

/* ---------- the mountains ----------
   The photo (1500 x 731: the bottom third was cropped, the sky removed, then another 80px taken off the bottom) is laid over
   the bottom of the sky section.
   Its see-through "sky pockets" end 440 rows down (of 731); everything below that is solid. So only the lower 291 rows hang
   below the sky photo, and that is the height of this section. The picture is as wide as the page and sits on the bottom of
   it, so its top part overlaps the bottom of the sky and the sunset clouds show through where the photo's sky was.
   --pocket = rows of the photo that overlap the sky.   --scale = how much wider than the page the picture is (phones: more). */
#peaks{--pocket:440;--scale:1;position:relative;width:100%;
  aspect-ratio:calc(1500 / ((731 - var(--pocket)) * var(--scale)));
  background:transparent}      /* (transparent: the mirrored sky below sits behind the heads grid, which carries on over it) */
/* behind the mountains: the bottom of the sky photo, MIRRORED, so it carries straight on from the end of the sky (no seam). It only shows through
   the gaps in the mountains' outline while the mountains are still gliding up into place; at the very bottom they cover all of it. */
#peaks::before{content:"";position:absolute;inset:0;background:url(images/sky.jpg) left bottom / 100% auto no-repeat;transform:scaleY(-1);z-index:-1;pointer-events:none}
/* the mountains (sky removed, the same sunset clouds show through) and, in front, the person: peaks.js lifts him up as you reach the bottom */
#peaks-stage{position:absolute;left:0;right:0;bottom:0;top:-150vh;overflow:hidden;z-index:145;pointer-events:none}
#peaks-range,#peaks-person{position:absolute;will-change:transform;right:0;bottom:0;width:calc(100% * var(--scale));height:auto;max-width:none;display:block;
  user-select:none;pointer-events:none}
#peaks-person{z-index:2;will-change:transform}
/* while the loading screen is up the mountains and the person are hidden (on a phone the first screen is short enough that they would show through) */
html.loading #peaks-stage,html.loading #peaks::before{visibility:hidden}
@media (max-aspect-ratio: 1333/2000){ #peaks{--scale:1.7} }
@media (max-aspect-ratio: 1333/2000){ #peaks::before{background-size:auto 100vh;background-size:auto 100svh} }   /* phones: bigger, anchored right so the person stays in frame */

/* ---------- loading screen ---------- */
#loader.done{display:none}

/* the world behind the eyelids: out-of-focus bright light that sharpens, then pure white */
#light{position:absolute;inset:0;background:#d9d4c8;filter:blur(40px);overflow:hidden;transform:scale(1.15);opacity:0}
#light i{position:absolute;border-radius:50%;filter:blur(30px)}
#light i:nth-child(1){left:8%;top:12%;width:46vw;height:60vh;background:#fff6dd}
#light i:nth-child(2){right:4%;top:30%;width:40vw;height:50vh;background:#cfe3f5}
#light i:nth-child(3){left:34%;bottom:-8%;width:50vw;height:42vh;background:#fffaf0}

#lids{position:absolute;inset:0;width:100%;height:100%;display:block;background:transparent}

/* the heartbeat monitor: one clean #00FFBB line that runs across the WHOLE screen, with its beats making the shapes of "Lorne" in the middle (loader.js draws it) */
#loadtext{position:absolute;left:0;top:50%;width:100vw;height:auto;transform:translateY(-59.09%);overflow:visible;   /* (the line's baseline, 59% down the picture, sits exactly on the middle of the screen) */
  fill:none;stroke-linecap:round;stroke-linejoin:round;transition:opacity .35s ease;filter:drop-shadow(0 0 7px rgba(0,255,187,.8))}
#loadtext .pt{stroke:#00FFBB;stroke-width:3.2;stroke-dasharray:1 1;stroke-dashoffset:1}
#loadtext .ph{stroke:#eafff8;stroke-width:4.6;stroke-dasharray:.03 2;stroke-dashoffset:.03}
#loadtext.gone{opacity:0}

/* ---------- text-message chat (bottom of the page, left side) ---------- */
#chat{--cw:clamp(230px,24vw,350px);position:fixed;left:max(12px,calc(((100vw - 15px) * .535 - var(--cw)) / 2));   /* gap to the screen edge = gap to the person (his hat starts 53.5% across) */
  top:36vh;width:var(--cw);z-index:160;display:flex;flex-direction:column;gap:8px;
  font:400 clamp(14px,1.05vw,17px)/1.3 -apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',Helvetica,Arial,sans-serif;
  pointer-events:none;visibility:hidden}
#chat.on{visibility:visible}
#chat .msg{max-width:88%;padding:.55em .95em;border-radius:1.25em;display:none;position:relative}
#chat .msg.them{align-self:flex-start;background:#e9e9eb;color:#000;border-bottom-left-radius:.35em}
#chat .msg.me{align-self:flex-end;background:#00FFBB;color:#000;border-bottom-right-radius:.35em}
#chat .msg.show{display:block;animation:chatpop .28s cubic-bezier(.2,.9,.3,1.2)}
@keyframes chatpop{from{opacity:0;transform:scale(.6) translateY(8px)}to{opacity:1;transform:none}}
#chat .typing{padding:.8em 1em;gap:.3em;transform-origin:0 100%}
#chat .typing.show{display:flex}
#chat .typing i{width:.6em;height:.6em;border-radius:50%;background:#8e8e93;animation:chatdot 1.2s infinite ease-in-out}
#chat .typing i:nth-child(2){animation-delay:.18s}#chat .typing i:nth-child(3){animation-delay:.36s}
@keyframes chatdot{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-.22em)}}
#chat-opts{display:none;flex-direction:column;align-items:flex-end;gap:6px;margin-top:4px}
#chat-opts.show{display:flex;animation:chatpop .3s ease-out}
#chat-opts button{font:inherit;color:#000;background:rgba(255,255,255,.92);border:1.5px solid #00FFBB;border-radius:1.25em;
  padding:.45em .9em;text-align:left;cursor:pointer;pointer-events:auto;transition:background .15s,color .15s}
#chat-opts button:hover{background:#00FFBB;color:#000}

/* ---------- contact section (typewriter) ---------- */
#contact{--cw:clamp(230px,24vw,350px);position:fixed;left:max(12px,calc(((100vw - 15px) * .535 - var(--cw)) / 2));top:34vh;width:max(var(--cw),270px);z-index:160;
  padding:1.1em 1.2em 1.2em;color:#2a2622;background:rgba(250,246,236,0);border-radius:3px;
  font:400 clamp(12px,.95vw,15px)/1.45 'Special Elite','Courier New',Courier,monospace;visibility:hidden;pointer-events:none}
#contact.on{visibility:visible;pointer-events:auto;background:rgba(250,246,236,.94);box-shadow:0 10px 30px rgba(40,25,30,.28);transition:background .5s,box-shadow .5s}
#contact h2{font:inherit;font-size:1.35em;letter-spacing:.14em;margin-bottom:.35em}
#contact .lead{margin-bottom:.9em}
#contact label{display:block;margin-bottom:.7em;letter-spacing:.1em}
#contact input,#contact textarea{display:block;width:100%;margin-top:.2em;font:inherit;color:inherit;background:transparent;border:0;border-bottom:1.5px solid #2a2622;
  border-radius:0;padding:.25em .1em;outline:0;resize:none;opacity:0;transition:opacity .5s,background .2s}
#contact input:focus,#contact textarea:focus{background:rgba(0,0,0,.05)}
#contact.ready input,#contact.ready textarea{opacity:1}
#contact button{font:inherit;letter-spacing:.2em;color:#faf6ec;background:#2a2622;border:0;padding:.55em 1.4em;cursor:pointer;margin-top:.3em}
#contact button:hover{background:#000}
#contact .status{margin-top:.6em;min-height:1.4em;font-size:.9em}
#contact .w,#chat .w{display:inline-block;white-space:nowrap}
#contact .c,#chat .c{display:inline-block;will-change:transform}
#chat .msg.out{background:transparent}

/* ---------- paper lanterns hanging from the clouds (built in clouds.js) ---------- */
.lantern{position:absolute;pointer-events:none;will-change:transform;opacity:0}
#clouds.show .lantern{opacity:1;transition:opacity 2.4s ease var(--d,0s)}
.lantern .hang{transform-origin:50% 0;animation:lsway var(--sw,5.5s) ease-in-out var(--ph,0s) infinite}
.lantern .string{display:block;width:1.6px;height:var(--len,60px);margin:0 auto;background:linear-gradient(#3a2a2a,#6a4a44)}
.lantern .lamp{position:relative;width:100%;margin-top:-1px}
.lantern .lamp svg{position:relative;display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 0 6px rgba(255,150,60,.75))}
.lantern .halo,.lantern .hot{position:absolute;left:50%;top:44%;width:340%;aspect-ratio:1;translate:-50% -50%;border-radius:50%;pointer-events:none}
.lantern .halo{background:radial-gradient(circle,rgba(255,176,80,.62),rgba(255,120,50,.22) 38%,transparent 68%);animation:lpulse 3.6s ease-in-out var(--ph,0s) infinite}
/* the mouse-glow layers: clouds.js sets their opacity (0 to 1) from how close the mouse is, and the transition eases it */
.lantern .hot,.lantern .lit{opacity:0;transition:opacity .25s ease-out}
.lantern .hot{width:480%;background:radial-gradient(circle,rgba(255,214,140,.95),rgba(255,150,60,.42) 36%,transparent 68%)}
.lantern .lit{position:absolute;left:-6%;top:3%;width:112%;height:78%;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(255,240,180,.8),rgba(255,176,80,.4) 55%,transparent 72%)}
@keyframes lsway{0%,100%{rotate:-3.5deg}50%{rotate:3.5deg}}
@keyframes lpulse{0%,100%{opacity:.5;scale:.94}50%{opacity:1;scale:1.08}}

/* the guitar hanging from its cloud (same string and sway as the lanterns) */
.lantern.hanger .lamp img{display:block;width:100%;height:auto;user-select:none}

/* ---------- the beat: the subwoofer, the toddler and his echoes all pump to this one animation (no JavaScript per frame) ----------
   One beat = 60 / BPM seconds (BPM = 116 in clouds.js). The curve is a kick on the beat plus a softer bump on the off-beat. */
:root{--beat:.5172s}
.pump{animation:beat-pump var(--beat) linear var(--bd,0s) infinite}

/* ---------- subwoofer next to the toddler (built in clouds.js): a real-3D car-audio sub turned to face the toddler ----------
   --D = the speaker's width in px (set by clouds.js); every --z is a depth as a fraction of D. */
.sub{position:absolute;opacity:0;--D:300px;pointer-events:none;will-change:transform;perspective:calc(var(--D) * 3);perspective-origin:50% 45%}
#clouds.show .sub{opacity:1;transition:opacity 2.4s ease var(--d,0s)}
.sub .shadow{position:absolute;left:8%;right:-6%;bottom:-3%;height:16%;border-radius:50%;background:radial-gradient(ellipse,rgba(30,15,30,.4),transparent 70%)}
.sub .box{position:relative;width:100%;aspect-ratio:1;transform-style:preserve-3d;animation:beat-box var(--beat) linear infinite;
  transform:rotateY(var(--turn,-50deg)) rotateX(var(--tilt,5deg))}
.sub .box>*{position:absolute;border-radius:50%}
/* full-size ring made from two radii (percent of the radius), used for the frame and the rubber surround */
.sub .band{inset:0;transform:translateZ(calc(var(--D) * var(--z)));
  background:radial-gradient(circle closest-side,transparent var(--a),var(--c1) var(--a),var(--c2) var(--b),transparent var(--b))}
/* a centred disc, --sz = its width as a percent of the speaker */
.sub .d{left:50%;top:50%;width:var(--sz);height:var(--sz);margin:calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2);transform:translateZ(calc(var(--D) * var(--z)))}
.sub .fw{background:#17171a;border:1px solid #2a2a30}
.sub .fw.f2{background:#101013}
.sub .bk{background:#15151a;border:1px solid #2a2a31;
  -webkit-mask-image:repeating-conic-gradient(#000 0 17deg,transparent 17deg 60deg);mask-image:repeating-conic-gradient(#000 0 17deg,transparent 17deg 60deg)}
/* the magnet: short, fat, smooth matte drum with a wider flange lip on the end */
.sub .mo{background:#2a2a31;border:1px solid #141418}
.sub .mo.fl{background:#33333b;border-color:#1a1a1f}
.sub .mo.cap{background:radial-gradient(circle,#3a3a42 0 14%,#202026 14% 22%,#34343c 22% 40%,#1c1c21 40% 46%,#2e2e35 46%);border:2px solid #3c3c44}
/* terminal posts: chrome cylinders lying sideways */
.sub .term{transform:translate3d(calc(var(--D) * var(--tx)),calc(var(--D) * var(--ty)),calc(var(--D) * var(--z))) rotateY(90deg);
  background:linear-gradient(180deg,#f0f0f6,#8a8a94 55%,#d0d0d8);border:0}
.sub .term.nut{background:linear-gradient(180deg,#d8d8e0,#6a6a74);border:1px solid #3a3a42}
.sub .bolt{width:4.2%;height:4.2%;margin:-2.1%;transform:translateZ(calc(var(--D) * .007));
  background:radial-gradient(circle,#000 38%,#4a4a52 46%,#1a1a1e 72%)}
/* the cone pushes out on every beat */
.sub .pump3d{animation:beat-cone var(--beat) linear infinite}
.sub .cone{background:radial-gradient(circle at 42% 38%,#34343a,#1c1c20 70%,#111114);box-shadow:inset 0 0 0 1px #000}
.sub .stitch{background:none;border:2px dashed rgba(240,240,246,.9)}
.sub .sheen{background:linear-gradient(118deg,transparent 28%,rgba(255,255,255,.13) 38%,transparent 52%)}
/* sound rings spreading out from the face */
.sub .ring{left:50%;top:50%;width:100%;height:100%;margin:-50% 0 0 -50%;border:2px solid rgba(255,255,255,.75);pointer-events:none;animation:beat-ring var(--beat) linear infinite}
.sub .ring.r2{animation-name:beat-ring2}
.pump.idle,.sub.idle *{animation-play-state:paused}                       /* off screen: stop animating (clouds.js toggles .idle) */
@media (prefers-reduced-motion:reduce){.pump,.sub .box,.sub .pump3d,.sub .ring{animation:none}}
@keyframes beat-pump{0.00%{scale:1.150}2.50%{scale:1.128}5.00%{scale:1.109}7.50%{scale:1.093}10.00%{scale:1.079}12.50%{scale:1.067}15.00%{scale:1.057}17.50%{scale:1.048}20.00%{scale:1.041}22.50%{scale:1.035}25.00%{scale:1.030}27.50%{scale:1.025}30.00%{scale:1.021}32.50%{scale:1.018}35.00%{scale:1.015}37.50%{scale:1.013}40.00%{scale:1.011}42.50%{scale:1.009}45.00%{scale:1.008}47.50%{scale:1.007}50.00%{scale:1.073}52.50%{scale:1.059}55.00%{scale:1.047}57.50%{scale:1.038}60.00%{scale:1.030}62.50%{scale:1.024}65.00%{scale:1.020}67.50%{scale:1.016}70.00%{scale:1.013}72.50%{scale:1.010}75.00%{scale:1.008}77.50%{scale:1.007}80.00%{scale:1.005}82.50%{scale:1.004}85.00%{scale:1.003}87.50%{scale:1.003}90.00%{scale:1.002}92.50%{scale:1.002}95.00%{scale:1.001}97.50%{scale:1.001}100.00%{scale:1.001}}
@keyframes beat-box{0.00%{scale:1.0200}2.50%{scale:1.0171}5.00%{scale:1.0145}7.50%{scale:1.0123}10.00%{scale:1.0105}12.50%{scale:1.0089}15.00%{scale:1.0076}17.50%{scale:1.0064}20.00%{scale:1.0055}22.50%{scale:1.0046}25.00%{scale:1.0039}27.50%{scale:1.0034}30.00%{scale:1.0029}32.50%{scale:1.0024}35.00%{scale:1.0021}37.50%{scale:1.0018}40.00%{scale:1.0015}42.50%{scale:1.0013}45.00%{scale:1.0011}47.50%{scale:1.0009}50.00%{scale:1.0098}52.50%{scale:1.0078}55.00%{scale:1.0063}57.50%{scale:1.0051}60.00%{scale:1.0041}62.50%{scale:1.0033}65.00%{scale:1.0026}67.50%{scale:1.0021}70.00%{scale:1.0017}72.50%{scale:1.0014}75.00%{scale:1.0011}77.50%{scale:1.0009}80.00%{scale:1.0007}82.50%{scale:1.0006}85.00%{scale:1.0005}87.50%{scale:1.0004}90.00%{scale:1.0003}92.50%{scale:1.0002}95.00%{scale:1.0002}97.50%{scale:1.0002}100.00%{scale:1.0001}}
@keyframes beat-cone{0.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0300)))}2.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0256)))}5.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0218)))}7.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0185)))}10.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0157)))}12.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0134)))}15.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0114)))}17.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0096)))}20.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0082)))}22.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0070)))}25.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0059)))}27.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0050)))}30.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0043)))}32.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0036)))}35.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0031)))}37.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0026)))}40.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0022)))}42.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0019)))}45.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0016)))}47.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0014)))}50.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0147)))}52.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0118)))}55.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0094)))}57.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0076)))}60.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0061)))}62.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0049)))}65.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0039)))}67.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0032)))}70.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0025)))}72.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0021)))}75.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0017)))}77.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0013)))}80.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0011)))}82.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0009)))}85.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0007)))}87.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0006)))}90.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0005)))}92.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0004)))}95.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0003)))}97.50%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0002)))}100.00%{transform:translateZ(calc(var(--D) * (var(--z) + 0.0002)))}}
@keyframes beat-ring{0.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.800);opacity:0.550}2.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.669);opacity:0.470}5.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.553);opacity:0.399}7.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.455);opacity:0.339}10.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.372);opacity:0.288}12.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.301);opacity:0.245}15.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.241);opacity:0.208}17.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.189);opacity:0.177}20.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.146);opacity:0.150}22.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.109);opacity:0.128}25.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.078);opacity:0.109}27.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.051);opacity:0.092}30.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.028);opacity:0.078}32.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.009);opacity:0.067}35.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.993);opacity:0.057}37.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.979);opacity:0.048}40.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.967);opacity:0.041}42.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.957);opacity:0.035}45.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.948);opacity:0.030}47.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.941);opacity:0.025}50.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.340);opacity:0.269}52.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.253);opacity:0.216}55.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.183);opacity:0.173}57.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.128);opacity:0.139}60.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.083);opacity:0.112}62.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.047);opacity:0.090}65.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.018);opacity:0.072}67.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.995);opacity:0.058}70.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.976);opacity:0.047}72.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.962);opacity:0.038}75.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.950);opacity:0.030}77.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.940);opacity:0.024}80.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.932);opacity:0.020}82.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.926);opacity:0.016}85.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.921);opacity:0.013}87.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.917);opacity:0.010}90.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.914);opacity:0.008}92.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.911);opacity:0.007}95.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.909);opacity:0.005}97.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.907);opacity:0.004}100.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.906);opacity:0.004}}
@keyframes beat-ring2{0.00%{transform:translateZ(calc(var(--D) * .012)) scale(2.400);opacity:0.300}2.50%{transform:translateZ(calc(var(--D) * .012)) scale(2.181);opacity:0.256}5.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.989);opacity:0.218}7.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.825);opacity:0.185}10.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.686);opacity:0.157}12.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.568);opacity:0.134}15.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.468);opacity:0.114}17.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.382);opacity:0.096}20.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.310);opacity:0.082}22.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.248);opacity:0.070}25.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.196);opacity:0.059}27.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.152);opacity:0.050}30.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.114);opacity:0.043}32.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.082);opacity:0.036}35.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.055);opacity:0.031}37.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.031);opacity:0.026}40.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.012);opacity:0.022}42.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.995);opacity:0.019}45.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.981);opacity:0.016}47.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.969);opacity:0.014}50.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.633);opacity:0.147}52.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.488);opacity:0.118}55.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.372);opacity:0.094}57.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.279);opacity:0.076}60.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.205);opacity:0.061}62.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.145);opacity:0.049}65.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.097);opacity:0.039}67.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.058);opacity:0.032}70.00%{transform:translateZ(calc(var(--D) * .012)) scale(1.027);opacity:0.025}72.50%{transform:translateZ(calc(var(--D) * .012)) scale(1.003);opacity:0.021}75.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.983);opacity:0.017}77.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.967);opacity:0.013}80.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.954);opacity:0.011}82.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.943);opacity:0.009}85.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.935);opacity:0.007}87.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.928);opacity:0.006}90.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.923);opacity:0.005}92.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.918);opacity:0.004}95.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.915);opacity:0.003}97.50%{transform:translateZ(calc(var(--D) * .012)) scale(0.912);opacity:0.002}100.00%{transform:translateZ(calc(var(--D) * .012)) scale(0.910);opacity:0.002}}

/* the sender's name above the first message, so it reads as a text from Lorne */
#chat .who{display:none;align-self:flex-start;margin:0 0 -5px .9em;font-size:.8em;font-weight:600;letter-spacing:.02em;color:#fff;text-shadow:0 1px 3px rgba(60,20,45,.65)}
#chat .who.show{display:block;animation:chatpop .28s cubic-bezier(.2,.9,.3,1.2)}

/* the top end of every hanging line is plugged into a simple wall jack: a tall rhombus (a square seen at an angle) with a small dark ethernet-port shape in it */
.lantern .jack{position:absolute;left:50%;top:0;width:28%;aspect-ratio:24 / 40;translate:-50% -50%;transform:skewY(24deg);z-index:0;   /* sized as a share of the lantern's own width, so it scales with it */
  box-sizing:border-box;background:#f1efe9}
.lantern .jack::before{content:"";position:absolute;left:50%;top:50%;width:25%;aspect-ratio:6 / 5;translate:-50% -50%;background:#26272b;
  clip-path:polygon(0 0,34% 0,34% 24%,66% 24%,66% 0,100% 0,100% 100%,0 100%)}     /* the little notch on top is what makes it look like an ethernet port */
/* the cable passes OVER the plate and ends in the port, so it looks plugged in */
.lantern .hang{position:relative;z-index:1}
/* some outlets face the other way (a mirror image of the others) */
.lantern.jack-r .jack{transform:skewY(-24deg)}

/* the typewriter: its picture, with a text area laid over the blank paper (clouds.js types into it) */
.tw img{display:block;width:100%;height:auto;transition:transform .06s ease-out}
.tw.hit img{transform:translateY(.8px)}
.tw-paper{position:absolute;left:21%;top:7%;width:58%;height:20%;overflow:hidden;color:#1b1b1f;
  font:400 calc(var(--tw, 200px) * .053)/1.3 'Special Elite','Courier New',Courier,monospace;letter-spacing:.01em;word-break:break-word}
.tw-ink{white-space:pre-wrap}
.tw-caret{display:inline-block;width:.5em;height:1.05em;margin-left:1px;vertical-align:-.15em;background:#1b1b1f;opacity:.75;animation:twblink .9s steps(1) infinite}
@keyframes twblink{50%{opacity:0}}
@media (prefers-reduced-motion:reduce){.tw-caret{animation:none}.tw img{transition:none}}
/* the sheet that has been typed on is pulled out of the machine and flies away (a copy of the sheet and its text; the fresh sheet is underneath) */
.tw-fly{position:absolute;inset:0;pointer-events:none;opacity:0;transform-origin:59% 14%}
.tw-fly .sheet{position:absolute;left:17.7%;top:0;width:67.7%;height:27.5%;background:#fefefd;box-shadow:0 2px 5px rgba(40,25,40,.3)}
.tw-fly .txt{position:absolute;left:21%;top:7%;width:58%;color:#1b1b1f;white-space:pre-wrap;
  font:400 calc(var(--tw, 200px) * .053)/1.3 'Special Elite','Courier New',Courier,monospace;letter-spacing:.01em}
.tw-fly.go{animation:twfly 1.05s cubic-bezier(.35,.1,.7,.6) forwards}
@keyframes twfly{
  0%{opacity:1;transform:none}
  22%{opacity:1;transform:translate(3%,-26%) rotate(-4deg)}
  100%{opacity:0;transform:translate(78%,-250%) rotate(38deg) scale(.7)}}
@media (prefers-reduced-motion:reduce){.tw-fly.go{animation:none}}

/* the monk's speech bubble: a boxy bubble with rounded corners, a black outline and a grey inside, in a light oriental handwriting typeface (Klee One); its tail points down to the monk */
.monk img{display:block;width:100%;height:auto}
.monk .bubble{position:absolute;left:-122%;top:-5%;width:128%;box-sizing:border-box;padding:.5em .6em;pointer-events:none;
  background:#d8d8d4;border:max(1.2px, calc(var(--tw, 160px) * .0085)) solid #0e0e10;border-radius:calc(var(--tw, 160px) * .07);
  opacity:0;transform:scale(.15);transform-origin:92% 130%;transition:opacity .25s ease,transform .38s cubic-bezier(.3,1.5,.5,1)}
.monk .bubble.show{opacity:1;transform:scale(1)}
/* the tail: a short, stubby point with rounded sides, angled towards the monk's mouth */
.monk .bubble .tail{position:absolute;right:8%;top:calc(100% - 1px);width:15%;height:auto;overflow:visible;pointer-events:none}
.monk .bubble .tail .tf{fill:#d8d8d4}
.monk .bubble .tail .ts{fill:none;stroke:#0e0e10;stroke-width:max(1.2px, calc(var(--tw, 160px) * .0085));vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.monk .bubble .say{display:block;text-align:center;color:#2a2a2e;white-space:nowrap;
  font:400 calc(var(--tw, 160px) * .095)/1.15 'Klee One','Zen Kurenaido','Hiragino Mincho ProN','Yu Mincho',Georgia,serif;letter-spacing:.03em}
@media (prefers-reduced-motion:reduce){.monk .bubble{transition:none}}
/* simple sketched hatching in two of the bubble's corners (little runs of thin parallel lines) */
.monk .bubble .sk{position:absolute;width:26%;aspect-ratio:1;pointer-events:none;
  background:repeating-linear-gradient(-45deg,transparent 0 .32em,rgba(14,14,16,.78) .32em .4em)}
.monk .bubble .sk.tl{left:.18em;top:.18em;clip-path:polygon(0 0,100% 0,0 100%);width:20%}
.monk .bubble .sk.br{right:.18em;bottom:.18em;clip-path:polygon(100% 0,100% 100%,0 100%);width:20%}

/* the head on the right that spins as you scroll and drifts up the screen (spinhead.js picks which picture shows and moves it) */
#spinhead{position:fixed;right:clamp(14px,4vw,90px);top:0;width:clamp(96px,10vw,210px);aspect-ratio:188/225;z-index:125;pointer-events:none;
  will-change:transform;transition:opacity 1.2s ease .6s;filter:drop-shadow(0 4px 9px rgba(60,20,45,.35))}
#spinhead img{position:absolute;inset:0;width:100%;height:100%;visibility:hidden;user-select:none}
#spinhead img.on{visibility:visible;opacity:var(--fade,1)}
html.loading #spinhead{opacity:0;transition:none}
/* the copies the head leaves behind (spinhead.js makes them): same box as the head itself */
.spinecho{position:fixed;right:clamp(14px,4vw,90px);top:0;width:clamp(96px,10vw,210px);aspect-ratio:188/225;pointer-events:none;will-change:transform,opacity;
  filter:drop-shadow(0 4px 9px rgba(60,20,45,.35));user-select:none}
html.loading .spinecho{visibility:hidden}

/* the hand that flicks a card across the screen (handcard.js picks the hand picture and flies the card). Everything is measured in "design units" --u:
   the six hand pictures are 470 x 580 of them (they all line up on the wrist) and the card sits just beyond the fingertips, 220 x 320. */
#handcard{--u:calc(38vh / 580);position:fixed;left:calc(4vw + 624px);top:calc(24vh - 258px);transition:opacity 1.2s ease .6s;width:calc(var(--u) * 682);height:calc(var(--u) * 580);z-index:124;pointer-events:none;will-change:transform}
#handcard img{position:absolute;display:block;user-select:none}
#handcard .hc-hand{left:0;top:0;width:calc(var(--u) * 470);height:calc(var(--u) * 580);visibility:hidden;filter:drop-shadow(0 4px 8px rgba(40,20,40,.35))}
#handcard .hc-hand.on{visibility:visible}
#handcard .hc-card{left:calc(var(--u) * 462);top:calc(var(--u) * 145);width:calc(var(--u) * 220);height:calc(var(--u) * 320);will-change:transform;
  filter:drop-shadow(0 6px 10px rgba(40,20,40,.4))}
html.loading #handcard{opacity:0;transition:none}
/* phones: much smaller (the hand is turned a quarter turn, so its box is 682 x 580 units WIDE x TALL before turning): centred about 72% across, the wrist at the top of the screen */
@media (max-width:899px){ #handcard{--u:calc(10.5vh / 580);left:calc(72vw - 6.2vh);top:calc(-1vh)} }

/* portrait phones: the chat is centred on the screen, a little smaller, just under the person's face (chat.js sets how far down) */
@media (max-width:899px) and (orientation:portrait){
  #chat{--cw:min(80vw,260px);left:50%;transform:translateX(-50%);gap:3px;font-size:11.5px;line-height:1.25}
  #chat .msg{padding:.32em .75em}
  #chat .who{margin-bottom:-3px}
  #chat-opts{gap:3px;margin-top:2px}
  #chat-opts button{padding:.22em .75em}
}

/* ---------- the new section after the mountains ---------- */
#next{position:relative;z-index:300;min-height:100vh;min-height:100svh;display:grid;place-items:center;text-align:center;padding:12vh 8vw;
  background:#0c0c10;color:#fff}
#next h2{margin:0 0 .4em;font:400 clamp(28px,4.2vw,64px)/1.1 'UnifrakturCook',serif;color:#00FFBB}
#next p{margin:0;font:400 clamp(15px,1.3vw,20px)/1.5 'Special Elite',monospace;opacity:.75}
/* scrolling on past the mountains (night.js sets --hold and --night): the sky, the mountains and the person stay where they are while the sky turns to night; then the next section follows */
#scene{position:relative;overflow:clip}      /* (clip: the zoom scales things bigger than the page; nothing may spill out sideways or add scroll length) */
#scene-in{position:sticky;top:0}      /* fall.js sets its top and the scene's height, so the sky, mountains and person are held by the browser itself (no jumping) */
html.nostick #scene-in{position:static}
#night{position:fixed;inset:0;z-index:141;pointer-events:none;opacity:calc(var(--night,0) * .78);display:none;
  background:
    radial-gradient(1.2px 1.2px at 12% 14%,#fff,transparent),radial-gradient(1px 1px at 31% 8%,#fff,transparent),radial-gradient(1.4px 1.4px at 47% 19%,#fff,transparent),
    radial-gradient(1px 1px at 63% 11%,#fff,transparent),radial-gradient(1.3px 1.3px at 79% 22%,#fff,transparent),radial-gradient(1px 1px at 91% 9%,#fff,transparent),
    radial-gradient(1px 1px at 22% 33%,#fff,transparent),radial-gradient(1.2px 1.2px at 56% 36%,#fff,transparent),radial-gradient(1px 1px at 86% 40%,#fff,transparent),
    radial-gradient(1px 1px at 6% 41%,#fff,transparent),radial-gradient(1.2px 1.2px at 38% 28%,#fff,transparent),radial-gradient(1px 1px at 70% 30%,#fff,transparent),
    linear-gradient(180deg,#04061a 0%,#0b1233 45%,#1a2147 80%,#241f45 100%)}
html.night-on #night{display:block}

/* the sky's pictures only glide into place once, at the start; after that they must follow the scroll bar exactly (no floating) */
#clouds.settled .cloud{transition:opacity 2.6s ease var(--d,0s)}

/* at night the mountains and the person darken too, but much less than the sky, so the lighting on them looks right (they dim and cool a little) */
html.night-on #peaks-range{filter:brightness(calc(1 - var(--night,0) * .38)) saturate(calc(1 - var(--night,0) * .15)) hue-rotate(calc(var(--night,0) * -8deg))}
html.night-on #peaks-person{filter:brightness(calc(1 - var(--night,0) * .17)) saturate(calc(1 - var(--night,0) * .08)) hue-rotate(calc(var(--night,0) * -4deg))}

/* the sky photo is cropped on its sides and enlarged just enough to be taller, so it runs on behind the mountains section too (no mirrored copy, no line where one photo ends and another begins).
   fall.js sets --pkh = the height of the mountains section. (On a portrait phone the old arrangement stays.) */
@media (min-aspect-ratio: 1334/2000){
  #peaks::before{display:none}
  #skyphoto{background:none}      /* (the photo is drawn by ::after below, ONE image all the way down: two images at different sizes would leave a line where one ends) */
  #clouds{bottom:calc(var(--pkh, 0px) * -1)}      /* the clouds are no longer chopped off in a straight line where the sky section ends: they carry on behind the mountains section */
  #skyphoto::after{content:"";position:absolute;left:0;right:0;top:0;bottom:calc(var(--pkh, 0px) * -1);z-index:-1;pointer-events:none;
    background:url(images/sky.jpg) center top / auto 100% no-repeat}
}

/* the clouds the screen flies through (fall.js): they sit in the bottom screen of the held scene, behind the mountains and the person and under the night, and appear as the night comes */
#fly{position:absolute;left:0;right:0;bottom:0;height:100vh;overflow:hidden;z-index:142;pointer-events:none;opacity:var(--night,0);display:none}      /* (above the night layer, which is z 141: the clouds darken themselves with a filter) */
#fly .fc{position:absolute;left:50%;top:50%;width:var(--cw,300px);will-change:transform,opacity}
#fly .fc > img{position:relative;z-index:1;display:block;width:100%;max-width:none;height:auto;user-select:none}
/* the lanterns that hang from these clouds are the sky's own (.lantern): width and string length are shares of the cloud's width; the cloud is drawn over the string's top end */
#fly .lantern{opacity:1;z-index:0;width:calc(var(--cw) * var(--lw,.15));margin-left:calc(var(--cw) * var(--lw,.15) * -.5);--len:calc(var(--cw) * var(--ll,.28))}
/* at the end of the flight the screen turns the colour of the next section */
#veil{position:absolute;left:0;right:0;bottom:0;height:100vh;z-index:143;background:#0c0c10;opacity:var(--veil,0);pointer-events:none}

/* the flight's lanterns glow a little more than before (the night is over them), and more again when the mouse is near (fall.js fades .hot and .lit in) */
#fly .lantern .halo{filter:brightness(1.45) saturate(1.15);width:400%}
#fly .lantern .lamp svg{filter:drop-shadow(0 0 8px rgba(255,160,70,.95))}

/* the flying clouds darken themselves into night colours (a filter on the cloud only), so the lanterns hanging from them are never dimmed */
#fly .fc > img{filter:brightness(.34) sepia(1) hue-rotate(188deg) saturate(1.25)}

/* the face you fly into the mouth of (fall.js places it so the middle of the mouth is the middle of the screen); a little darker, like the rest of the night */
#fly .face{position:absolute;left:50%;top:50%;max-width:none;display:none;filter:brightness(.62) saturate(.85);will-change:transform,opacity;user-select:none}

/* the section after the flight: the throat walls on the edges of the screen only (gullet.js draws them on one fixed canvas, clipped to this section); the middle is clear for the content */
#next{clip-path:inset(0)}
#gullet{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:0;pointer-events:none;
  --fade:radial-gradient(ellipse at center,transparent 28%,rgba(0,0,0,.04) 35%,rgba(0,0,0,.12) 42%,rgba(0,0,0,.26) 49%,rgba(0,0,0,.45) 57%,rgba(0,0,0,.66) 65%,rgba(0,0,0,.84) 75%,rgba(0,0,0,.95) 85%,#000 94%);
  -webkit-mask-image:var(--fade);mask-image:var(--fade)}      /* (a long, eased fade from the dark middle out to the full picture, so there is no visible edge) */


/* the sections after the flight: one screen of scrolling per page. The page stays put (the stage is stuck to the screen) and each page's words FADE in and out as you scroll (pages.js). */
#next{display:block;padding:0;min-height:0;height:calc(100vh * (var(--pages, 4) + 1 + var(--slide, 0) + var(--outro, 0)));height:calc(100svh * (var(--pages, 4) + 1 + var(--slide, 0) + var(--outro, 0)));margin-top:calc(-100vh * (1 + var(--slide, 0)));margin-top:calc(-100svh * (1 + var(--slide, 0)))}
html.night-on #scene{z-index:301}      /* (once the sky has started turning to night: above the sections, which start underneath it, so it can slide down and away to reveal them. Not before: at the start it must stay under the loading screen) */
#next .next-stage{position:sticky;top:0;width:100%;height:100vh;height:100svh;overflow:hidden;z-index:1}
#next .pg{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;text-align:center;padding:12vh 8vw;opacity:0;visibility:hidden;will-change:opacity,transform}

/* "So what's a Lorne do?": typewriter letters in the middle of the screen, glowing in the site's mint (fall.js types it out as you scroll through the clouds) */
#flytext{position:absolute;left:50%;top:50%;display:none;white-space:nowrap;pointer-events:none;
  font:400 min(7vw,130px)/1.2 'Special Elite','Courier New',Courier,monospace;letter-spacing:.04em;color:#f2fffb;text-align:center;will-change:opacity,transform}
#flytext span{text-shadow:0 0 4px #fff,0 0 10px #00FFBB,0 0 22px #00FFBB,0 0 44px rgba(0,255,187,.85),0 0 90px rgba(0,255,187,.6);animation:flyglow 3.2s ease-in-out infinite alternate}
#flytext span:nth-child(odd){animation-delay:-1.1s}
@keyframes flyglow{0%{filter:brightness(.92)}100%{filter:brightness(1.25)}}
#flytext .cover{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;background:radial-gradient(ellipse at 50% 50%,rgba(66,72,100,1) 0,rgba(66,72,100,1) 70%,rgba(66,72,100,.9) 100%)}   /* (a night-cloud-coloured base so there can be no gaps) */
#flytext .cover img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover;max-width:none;filter:brightness(.4) sepia(1) hue-rotate(188deg) saturate(1.2)}      /* (the cloud pictures, night-coloured like the others) */

/* paragraph text on the pages: a comfortable line length that stays inside the clear middle of the screen */
#next .pg p{max-width:min(32em,46vw);line-height:1.6}

/* the blackletter heading font draws a lowercase k that looks like an f, so any k in a heading is drawn in a clearer blackletter */
#next h2 .kfix{font-family:'Pirata One','UnifrakturCook',serif}

/* the light at the end of the throat and the night sky you fly out into (gullet.js draws it on its own canvas: the throat canvas is faded out in the middle, this one is not) */
#gleam{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:0;pointer-events:none}

/* the two copies of the boy in black that slide out to each side every so often (clouds.js): hidden and tucked in behind him until it is their turn */
#clouds.show .cloud.boyside{opacity:0;translate:0 0;transition:opacity .45s ease var(--sd,0s),translate .55s cubic-bezier(.2,.8,.25,1) var(--sd,0s)}
#clouds.show .cloud.boyside.on{opacity:var(--o,1);translate:var(--sx,0px) 0}

/* the dragon's wink (clouds.js): the picture of his eye shut is always there but cut away to nothing; when it is time the eyelids close TOGETHER (one from above, one from below, meeting in the middle),
   stay shut a moment, and open again the same way. --g is how far they have closed (0 = open, 1 = shut); the eye is the band between 71% and 76% of the picture's height */
@property --g{syntax:'<number>';inherits:false;initial-value:0}
#clouds .dragonwink{--g:0;pointer-events:none;
  --m:linear-gradient(to bottom,#000 0,#000 calc(71% + var(--g) * 2.5%),transparent calc(71% + var(--g) * 2.5%),transparent calc(76% - var(--g) * 2.5%),#000 calc(76% - var(--g) * 2.5%),#000 100%);
  -webkit-mask-image:var(--m);mask-image:var(--m)}
#clouds .dragonwink.on{animation:dragonwink 3.2s ease-in-out forwards}
@keyframes dragonwink{0%{--g:0}35%{--g:1}60%{--g:1}100%{--g:0}}
@media (prefers-reduced-motion:reduce){#clouds .dragonwink.on{animation:none}}
