/* Nogama. One family (Archivo, variable in width and weight), flat fields only.
   The colours are the two games' own: Lanternauts' water bands and five lights, Lumen Deep's slate and LCD glass. */

:root {
  /* the surface */
  --slate: #EBE7DA;
  --paper: #F7F6EE;
  --ink: #060912;
  /* the water, by depth */
  --sun1: #9CCFD6;
  --sun2: #63ADBF;
  --sun3: #3B88A8;
  --twi: #1F5078;
  --twi-up: #2A6890;
  --mid1: #142E4C;
  --mid2: #11233D;
  --mid3: #0E192F;
  --aby: #080C1B;
  --had: #0B060B;
  --floor: #060306;
  /* text on dark water */
  --ice: #E6F1FF;
  --mist: #B7C6DD;
  /* the lights */
  --cyan: #5FE6F2;
  --violet: #A98BFF;
  --gold: #FFC95A;
  --red: #FF3B4E;
  --lcd: #A9B89B;

  --light: #F7F6EE; /* the lantern's colour at this depth; the script sets it */
  --rig: #060912;   /* the line and the lantern's frame */

  --m: clamp(20px, 2.3vw, 34px);
  --line-x: 27.7vw; /* where the line hangs; the script puts it under the O */
  --edge: calc(var(--line-x) + 3.4vw); /* the second left edge, just right of the line */

  --t-mega: clamp(44px, min(7.4vw, 11.5svh), 118px);
  --t-head: clamp(32px, 4.6vw, 72px);
  --t-state: clamp(22px, 2.3vw, 34px);
  --t-body: clamp(17px, 1.25vw, 19px);
  --t-small: 15px;

  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--floor); -webkit-text-size-adjust: 100%; }
body {
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ice);
  background: var(--floor);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; }
a { color: inherit; }
p, h1, h2, h3, ul, figure { margin: 0; padding: 0; }
i { font-style: italic; }
:focus-visible { outline: 3px solid var(--light); outline-offset: 3px; }
.hero :focus-visible, .intro :focus-visible { outline-color: var(--ink); }
::selection { background: var(--ice); color: var(--ink); }

.skip { position: fixed; z-index: 9; left: 12px; top: -80px; background: var(--ink); color: var(--slate); padding: 12px 16px; }
.skip:focus { top: 12px; }

/* ---------- layers: water (below everything), the line and its light, then the page ---------- */
#surface { position: fixed; z-index: 0; left: 0; top: 0; width: 100%; height: 100lvh; pointer-events: none; }
.snow { position: fixed; z-index: 0; inset: 0; pointer-events: none; overflow: hidden; opacity: var(--snow, 0); }
.snow i {
  position: absolute; left: 0; right: 0; top: -420px; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' fill='%23E6F1FF'%3E%3Ccircle cx='34' cy='52' r='1.6'/%3E%3Ccircle cx='190' cy='18' r='1.1'/%3E%3Ccircle cx='310' cy='96' r='1.9'/%3E%3Ccircle cx='96' cy='170' r='1.2'/%3E%3Ccircle cx='244' cy='214' r='1.5'/%3E%3Ccircle cx='392' cy='262' r='1.1'/%3E%3Ccircle cx='58' cy='318' r='1.8'/%3E%3Ccircle cx='170' cy='372' r='1.2'/%3E%3Ccircle cx='330' cy='396' r='1.5'/%3E%3C/svg%3E") 0 0 / 420px 420px;
  animation: sink 52s linear infinite;
}
.snow i + i { background-size: 290px 290px; top: -290px; opacity: .4; animation: sink2 34s linear infinite; }
@keyframes sink { to { transform: translateY(420px); } }
@keyframes sink2 { to { transform: translateY(290px); } }

/* The shadow in the deep: the one of Lanternauts' lantern drop, a rattail far off, drawn by the game (near black, its fins
   a step lighter, its tail fading in steps). As in the drop it is 1.35 times as long as the window is wide and crosses
   behind the lantern, head first, in 2.1 seconds; and its back is caught by the lantern's light: the game's second drawing
   of it, in the lantern's colour, shows only inside the lantern's rings (the script moves those two circles).
   It keeps one depth: its box sits in the ladder's water (the script places it from data-lives) and scrolls with the page.
   While that depth is on screen it passes from the right, then a few seconds later from the left. */
.deep { position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: calc(var(--ht) + 44px); overflow: hidden; pointer-events: none; visibility: hidden; --len: 135vw; --ht: calc(var(--len) * 130 / 600); }
.deep.on { visibility: visible; }
.deep__run { position: absolute; left: 0; top: 22px; width: var(--len); height: var(--ht); will-change: transform; animation: deep-pass 14s linear infinite; }
.deep__turn { width: 100%; height: 100%; animation: deep-turn 14s step-end infinite; }
.deep:not(.on) .deep__run, .deep:not(.on) .deep__turn { animation-play-state: paused; }
.deep__lit { position: absolute; inset: 0; color: var(--light); opacity: .35; clip-path: circle(0 at 0 0); transition: color .8s; }
.deep__lit--near { opacity: .4; }
/* The drop's own pass: from just past the right edge to just past the left, rising ten pixels, on its curve. Then mirrored, from the left. */
@keyframes deep-pass {
  0%, 3.5% { transform: translate3d(105vw, 0, 0); animation-timing-function: cubic-bezier(.45, .1, .55, .9); }
  18.5% { transform: translate3d(calc(-1.02 * var(--len)), -10px, 0); }
  18.51%, 46% { transform: translate3d(calc(-1.02 * var(--len)), 0, 0); animation-timing-function: cubic-bezier(.45, .1, .55, .9); }
  61% { transform: translate3d(105vw, -10px, 0); }
  61.01%, 100% { transform: translate3d(105vw, 0, 0); }
}
@keyframes deep-turn { 0% { transform: none; } 30% { transform: scaleX(-1); } 80% { transform: none; } }

#rig, #rig-top { position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.pin-on #rig-top { z-index: 4; width: 40px; } /* on a phone, while the title bar is pinned: the line and lantern stay in front of it */
#rig-line { stroke: var(--rig); stroke-width: 1.5; opacity: .85; transition: stroke .6s; }
.lamp rect { fill: var(--rig); transition: fill .6s; }
.lamp__tie { fill: none; stroke: var(--rig); stroke-width: 1.6; transition: stroke .6s; }
.lamp .lamp__glass { fill: var(--light); }
.ring { fill: var(--light); opacity: 0; transition: opacity .8s, fill .8s; }
.lit-on .r1 { opacity: .15; }
.lit-on .r2 { opacity: .09; }
.lit-on .r3 { opacity: .055; }
.ping { fill: none; stroke: var(--light); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ping.go { animation: ping 1.3s var(--ease); }
@keyframes ping { 0% { opacity: .95; transform: scale(.5); } 100% { opacity: 0; transform: scale(6); } }

main { overflow-x: clip; }
section, footer { position: relative; }
.wrap { position: relative; z-index: 2; padding-left: max(var(--m), env(safe-area-inset-left, 0px)); padding-right: max(var(--m), env(safe-area-inset-right, 0px)); }

/* A band of water: one flat colour, its top edge a slow swell. */
.band { background: var(--band); }
.band::after {
  content: ""; position: absolute; z-index: 0; top: -29px; left: -1200px; right: 0; height: 30px; background: var(--band);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='30' preserveAspectRatio='none'%3E%3Cpath d='M0 16C120 4 260 4 400 14S640 28 800 18S1080 28 1200 16V30H0Z'/%3E%3C/svg%3E") repeat-x 0 0 / 1200px 30px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='30' preserveAspectRatio='none'%3E%3Cpath d='M0 16C120 4 260 4 400 14S640 28 800 18S1080 28 1200 16V30H0Z'/%3E%3C/svg%3E") repeat-x 0 0 / 1200px 30px;
  animation: drift 64s linear infinite;
}
.thresh.band::after, .ladder.band::after { animation-duration: 90s; animation-direction: reverse; }
.intro.band::after, .hero.band::after { display: none; } /* the surface's own canvas draws this edge */
@keyframes drift { to { transform: translateX(1200px); } }

/* ---------- the top: the name, three links, the gauge ---------- */
.top {
  position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 28px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(var(--m), env(safe-area-inset-right, 0px)) 14px max(var(--m), env(safe-area-inset-left, 0px)); pointer-events: none; color: var(--ink); transition: color .5s;
}
.top > * { pointer-events: auto; }
.top-deep .top { color: var(--ice); }
.top__mark, .top__nav { transition: opacity .35s, transform .45s var(--ease); }
.top__mark { width: 104px; opacity: 0; transform: translateY(-10px); text-decoration: none; font-weight: 900; }
.top__mark svg { width: 100%; height: auto; fill: currentColor; }
.top__mark svg + span, .lumen-mark svg + span, .lant-mark svg + span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.under .top__mark { opacity: 1; transform: none; }
.top__nav { margin-left: auto; display: flex; gap: 30px; font-size: var(--t-small); font-weight: 500; }
.top__nav a, .floor__links a { position: relative; display: inline-block; text-decoration: none; padding: 8px 0; }
.top__nav a::after, .floor__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease); }
.top__nav a:hover::after, .floor__links a:hover::after { transform: scaleX(1); }
.top-hide .top__mark, .top-hide .top__nav { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.top__menu, .top__nav a.plan-only { display: none; }
.gauge {
  display: flex; align-items: baseline; gap: 10px; background: var(--lcd); color: #0E140D; padding: 9px 12px 8px;
  font-size: var(--t-small); line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gauge b { font-weight: 800; min-width: 7ch; text-align: right; }
.gauge span { font-weight: 500; min-width: 8ch; display: inline-block; }
.gauge span.tick { animation: tick .5s var(--ease); }
@keyframes tick { from { opacity: 0; transform: translateY(9px); } }

/* ---------- buttons: one flat shape, square ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .7em; min-height: 54px; padding: 0 24px; background: var(--ink); color: var(--slate);
  font: 600 var(--t-body)/1 Archivo, sans-serif; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .12s, background-color .25s, color .25s;
}
.btn span { display: inline-block; transition: transform .35s var(--ease); }
.btn:hover { background: #1B2A4A; }
.btn:hover span { transform: translateY(4px); }
.btn:active { transform: translateY(2px); }
.btn--light { background: var(--light); color: var(--ink); transition: transform .12s, background-color .6s; }
.btn--light:hover { background: var(--ice); }

/* ---------- type ---------- */
.h-head {
  font-size: var(--t-head); line-height: .94; letter-spacing: -.035em; font-weight: 800; text-transform: uppercase;
  font-variation-settings: "wdth" 125;
}
.h-head .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.h-head .ln > span { display: block; }
.h-mega {
  font-size: var(--t-mega); line-height: .86; letter-spacing: -.04em; font-weight: 900; text-transform: uppercase; color: var(--light);
  font-variation-settings: "wdth" 112; transition: color .7s;
}
.h-mega span { display: block; white-space: nowrap; }
#ladder-title { display: flex; flex-direction: column; justify-content: flex-end; }
.state { font-size: var(--t-state); line-height: 1.22; font-weight: 500; letter-spacing: -.012em; max-width: 39ch; }
.game__title { font-size: var(--t-state); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.game__desc { max-width: 36ch; margin-top: 22px; }
.game__status { margin-top: 18px; font-size: var(--t-small); font-weight: 600; color: var(--light); transition: color .7s; }

/* ---------- the surface ---------- */
.hero { height: 100svh; min-height: 540px; color: var(--ink); touch-action: pan-y; }
.hero .wrap { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: calc(var(--m) + env(safe-area-inset-bottom, 0px)); }
.hero__name { font-size: 19vw; line-height: .8; font-weight: 900; letter-spacing: -.05em; text-transform: uppercase; font-variation-settings: "wdth" 125; margin-bottom: auto; padding-top: 30svh; }
.js .hero__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; }
.hero__foot { max-width: 27ch; display: grid; gap: 22px; justify-items: start; }
.hero__line { font-weight: 500; line-height: 1.38; }

/* Lanternauts' sunlit animals, at home in the first two hundred metres. Above the water, under the text. */
.shoal { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.swimmer { position: absolute; left: 0; top: var(--y); width: var(--w); aspect-ratio: 1; margin-top: calc(var(--w) / -2); }
.swimmer__bob { width: 100%; height: 100%; animation: bob 9s ease-in-out infinite alternate; }
.swimmer svg { width: 100%; height: 100%; overflow: visible; }
.swimmer--atoll { --w: clamp(84px, 9vw, 150px); --y: 69%; animation: cruise 115s linear infinite; animation-delay: -44s; }
.swimmer--rook { --w: clamp(88px, 9.6vw, 160px); --y: 87%; left: 62%; animation: hold 17s ease-in-out infinite alternate; }
.swimmer--rook .swimmer__bob { animation-duration: 6.5s; }
.swimmer--mantle { --w: clamp(104px, 11.5vw, 190px); --y: clamp(70px, 10svh, 110px); animation: cruise 88s linear infinite; animation-delay: -31s; }
.swimmer--mantle .swimmer__bob { animation-name: glide; animation-duration: 11s; }
.shoal:not(.live) .swimmer, .shoal:not(.live) .swimmer__bob { animation-play-state: paused; }
@keyframes cruise { from { transform: translate3d(-34vw, 0, 0); } to { transform: translate3d(114vw, 0, 0); } }
@keyframes hold { from { transform: translate3d(-3.5vw, 0, 0); } to { transform: translate3d(3.5vw, 0, 0); } }
@keyframes bob { from { transform: translateY(-8px) rotate(-1.4deg); } to { transform: translateY(8px) rotate(1.4deg); } }
@keyframes glide { from { transform: translateY(-13px) rotate(-3deg); } to { transform: translateY(13px) rotate(2deg); } }

/* ---------- intro: title, note, facts ---------- */
.intro { color: var(--ink); }
.intro .wrap { padding-top: clamp(130px, 24svh, 240px); padding-bottom: clamp(120px, 20svh, 200px); }
.intro__head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: end; }
.intro__head .h-head { grid-column: 1 / 10; font-size: var(--t-mega); line-height: .9; }
.intro__note { grid-column: 10 / 13; line-height: 1.45; font-weight: 500; max-width: 270px; justify-self: end; }
.facts { list-style: none; display: grid; grid-template-columns: calc(var(--edge) - var(--m)) 1fr 1fr 1.25fr; column-gap: 0; margin-top: clamp(80px, 14svh, 130px); }
.facts li { padding-right: 24px; }
.facts strong { display: block; font-size: var(--t-head); line-height: 1; font-weight: 800; letter-spacing: -.035em; font-variation-settings: "wdth" 125; font-variant-numeric: tabular-nums; }
.facts strong { white-space: nowrap; }
.facts span { display: block; margin-top: 12px; font-size: var(--t-small); line-height: 1.35; font-weight: 500; max-width: 19ch; }

/* ---------- a knot on the line: one depth, one name ---------- */
.knot {
  position: absolute; z-index: 2; top: 0; left: var(--line-x); transform: translate(-5px, -50%);
  display: flex; align-items: center; gap: 12px; font-size: var(--t-small); line-height: 1; white-space: nowrap; color: var(--ice);
}
.knot::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.knot b { font-weight: 800; font-variant-numeric: tabular-nums; }
.knot span { font-weight: 500; }

/* ---------- Lumen Deep: the plate plays ---------- */
.game .wrap { padding-top: clamp(130px, 22svh, 220px); padding-bottom: clamp(130px, 22svh, 220px); }
.lumen__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: stretch; }
.lumen__text { grid-column: 1 / 7; display: flex; flex-direction: column; justify-content: space-between; gap: 44px; min-width: 0; }
.lumen__plate { grid-column: 7 / 13; align-self: start; }
.lumen-mark svg { width: calc((var(--line-x) - var(--m)) * 1.7568); max-width: 100%; height: auto; overflow: visible; }
.plate-ui { aspect-ratio: 1; max-height: 82svh; margin-left: auto; background: #030A1E; }
.plate-ui canvas { width: 100%; height: 100%; touch-action: manipulation; cursor: pointer; }
.lumen__plate figcaption { margin-top: 14px; font-size: var(--t-small); color: var(--mist); text-align: right; }
.tabs { display: flex; gap: 28px; margin-bottom: 22px; }
.tabs button { background: none; border: 0; padding: 8px 0; font: 500 var(--t-body)/1 Archivo, sans-serif; color: var(--mist); cursor: pointer; transition: color .25s; }
.tabs button:hover { color: var(--ice); }
.tabs button[aria-selected="true"] { color: var(--ice); font-weight: 800; text-decoration: underline; text-decoration-color: var(--light); text-decoration-thickness: 3px; text-underline-offset: 9px; }
.cells { display: grid; grid-template-columns: 1fr 1fr; max-width: 520px; }
.cell { height: 72px; border: 0; font: 600 var(--t-body)/1 Archivo, sans-serif; cursor: pointer; transition: transform .12s, background-color .25s; }
.cell:active { transform: translateY(2px); }
.cell--a { background: var(--light); color: var(--ink); }
.cell--a:hover { background: var(--ice); }
.cell--b { background: var(--twi-up); color: var(--ice); }
.cell--b:hover { background: var(--sun3); }

/* ---------- 1,000 m ---------- */
.thresh .wrap { padding-top: clamp(150px, 30svh, 300px); padding-bottom: clamp(130px, 26svh, 260px); }
.thresh .state { margin-left: calc(var(--edge) - var(--m)); }

/* ---------- Lanternauts ---------- */
.lant .wrap { padding-bottom: clamp(90px, 14svh, 150px); }
.lant-mark svg { width: min(100%, 940px); height: auto; overflow: visible; }
.lant__body { margin-left: calc(var(--edge) - var(--m)); margin-top: clamp(40px, 7svh, 72px); }

.ladder__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; padding-bottom: 16svh; }
.ladder__band { position: absolute; left: 0; right: 0; bottom: 0; top: 100%; }
.ladder__pin { grid-column: 1 / 7; position: sticky; top: 0; height: 100svh; align-self: start; display: flex; flex-direction: column; justify-content: flex-start; padding-top: clamp(84px, 14svh, 140px); gap: 30px; min-width: 0; }
.ladder__bar { display: contents; }
.ladder__pass { grid-column: 7 / 13; min-width: 0; }
.readout { display: grid; gap: 8px; }
.readout__zone { font-size: var(--t-state); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.readout__more { color: var(--mist); }
.stars { display: flex; gap: 9px; margin-top: 8px; }
.stars svg { width: 24px; height: 24px; fill: #26314F; transition: fill .45s, transform .5s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.stars svg.on { fill: var(--light); transform: rotate(90deg); }

.spec { position: relative; min-height: 98svh; display: flex; flex-direction: column; justify-content: center; padding: 6svh 0; }
.spec__plate { width: 50%; aspect-ratio: 4 / 5; background: var(--slate); overflow: hidden; }
.spec__plate img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 7%; }
.spec__plate--crop img { object-fit: cover; object-position: 0 50%; padding: 0; }
.spec__plate--cover img { object-fit: cover; padding: 0; }
.spec__plate--dark { background: #000; }
.spec__plate--dark img { object-fit: cover; object-position: 3% 0; mix-blend-mode: normal; padding: 0; transform: scale(1.09); transform-origin: 20% 0; }
.spec__beast { position: absolute; z-index: 1; width: 70%; aspect-ratio: 1; right: -5%; top: 50%; margin-top: -46%; pointer-events: none; }
.spec__beast svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spec__cap { position: relative; z-index: 2; margin-top: 24px; max-width: 34ch; }
.spec__name { font-size: var(--t-state); line-height: 1; font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-variation-settings: "wdth" 112; }
.spec__role { margin: 8px 0 14px; font-size: var(--t-small); line-height: 1.4; color: var(--mist); }
.spec:nth-of-type(even) .spec__plate { margin-left: auto; }
.spec:nth-of-type(even) .spec__beast { right: auto; left: -6%; }
.spec:nth-of-type(even) .spec__cap { margin-left: 50%; }

/* How each creature arrives: its lights come on one after another, then the animal itself, each in its own way. */
.spec[data-zone="2"] { --zl: var(--violet); }
.spec[data-zone="3"] { --zl: var(--gold); }
.spec[data-zone="4"] { --zl: var(--red); }
.beast__in { position: absolute; inset: 0; }
.js .beast__in { transform: var(--from, translate3d(0, 30%, 0) scale(.8)); transition: transform var(--dur, 1.9s) var(--curve, cubic-bezier(.16, .84, .24, 1)); will-change: transform; }
.js .is-in .beast__in { transform: none; }
.js .beast__body { opacity: 0; transition: opacity .4s linear; }
.js .is-in .beast__body { opacity: 1; transition: opacity var(--fade, 1.1s) ease var(--body, .9s); }
.js .beast__glow .lt { opacity: 0; transition: opacity .2s linear; }
.js .is-in .beast__glow .lt { opacity: 1; transition: opacity .28s linear var(--d, 0ms); }
.spec[data-id="vesper"] { --from: translate3d(6%, 48%, 0) scale(.6) rotate(16deg); --dur: 2.3s; --body: .8s; }               /* rises, unfurling */
.spec[data-id="hex"] { --from: translate3d(-82%, 9%, 0) rotate(-6deg); --dur: 1.2s; --curve: cubic-bezier(.06, .92, .18, 1); --body: .15s; --fade: .5s; } /* strikes */
.spec[data-id="nocturne"] { --from: translate3d(16%, -6%, 0) scale(.4); --dur: 2.8s; --curve: cubic-bezier(.3, .6, .2, 1); --body: 1.7s; --fade: .9s; } /* looms: the lure first */
.spec[data-id="choir"] { --from: translate3d(-24%, -28%, 0) scale(.84) rotate(-13deg); --dur: 2.6s; --body: 1.5s; }            /* lets itself down, lantern by lantern */
.spec[data-id="vigil"] { --from: translate3d(-40%, 3%, 0) scale(.88); --dur: 2s; --body: 1.1s; }                              /* comes forward behind its beam */

/* The art kit's own motion (Lanternauts, prototype/css/art.css): slow and heavy, only while on screen. */
.lk-anim .lk-swim { transform-box: view-box; transform-origin: 100px 100px; animation: lk-swim 6s ease-in-out infinite; }
.lk-anim .lk-sway { transform-box: view-box; animation: lk-sway 3.6s ease-in-out infinite; }
.lk-anim .lk-sway.lk-rev { animation-name: lk-sway-rev; }
.lk-anim .lk-glow { transform-box: view-box; animation: lk-pulse 3.2s ease-in-out infinite; }
@keyframes lk-swim { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 30% { transform: translate(1.5px, -4px) rotate(-1.2deg); } 65% { transform: translate(-1px, 2px) rotate(.8deg); } }
@keyframes lk-sway { 50% { transform: rotate(6deg); } }
@keyframes lk-sway-rev { 50% { transform: rotate(-6deg); } }
@keyframes lk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- the floor ---------- */
.floor { min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
.floor__wrap { flex: 1; display: flex; flex-direction: column; padding-top: clamp(130px, 22svh, 230px); }
.floor__top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: start; }
.floor__say { grid-column: 1 / 10; display: grid; gap: 34px; justify-items: start; }
.floor__links { grid-column: 10 / 13; list-style: none; display: grid; gap: 4px; font-weight: 500; justify-self: end; min-width: 190px; }
.floor__legal { margin-top: auto; padding: 70px 0 20px; display: flex; justify-content: space-between; gap: 40px; font-size: var(--t-small); line-height: 1.45; color: var(--mist); }
.floor__credits { max-width: 62ch; text-align: right; }
.floor__mark { position: relative; z-index: 2; height: 0; }
.floor__mark svg { position: absolute; top: 0; fill: var(--slate); transform-origin: 50% 100%; }

/* ---------- entrances. Hidden only once the script is running; shown at once without it. ---------- */
.js [data-r] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 85ms); }
.js [data-r].in { opacity: 1; transform: none; }
.js .h-head[data-r] { opacity: 1; transform: none; }
.js .h-head[data-r] .ln > span { transform: translateY(104%); transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.js .h-head[data-r] { font-variation-settings: "wdth" 80; transition: font-variation-settings 1.1s var(--ease); }
.js .h-head[data-r].in { font-variation-settings: "wdth" 125; }
.js .h-head[data-r].in .ln > span { transform: none; }
.js .lant-mark[data-r] { opacity: 1; transform: none; }
.js .lant-mark .draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--ease); }
.js .lant-mark.in .draw { stroke-dashoffset: 0; }
.js .lant-mark circle { visibility: hidden; }
.js .lant-mark.lamp-on circle { visibility: visible; }
.js .lumen-mark[data-r] g { transform: scaleX(0); transform-box: fill-box; transform-origin: center; transition: transform 1.2s var(--ease) .3s; }
.js .lumen-mark.in g { transform: none; }
.lit { transition: opacity .25s linear; }

@media (max-width: 899px) {
  .lumen__grid { display: flex; flex-direction: column; }
  .lumen__text { display: contents; }
  .lumen-mark { order: 1; }
  .lumen__plate { order: 2; margin-top: 36px; width: 100%; }
  .plate-ui { max-height: none; }
  .lumen__controls { order: 3; margin-top: 30px; }
  .lumen__say { order: 4; margin-top: 40px; }
  .lumen__plate figcaption { text-align: left; }
}

/* ---------- one column, for a phone ---------- */
@media (max-width: 699px) {
  :root { --line-x: 18px; --edge: 40px; --t-mega: clamp(40px, 13vw, 76px); --t-head: clamp(32px, 10.4vw, 56px); --t-state: clamp(21px, 5.8vw, 28px); }
  .wrap { padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .top { padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; }
  .top { gap: 0; }
  .top__mark { width: 88px; }
  .top__menu { display: block; margin-left: auto; margin-right: 2px; border: 0; background: var(--lcd); color: #0E140D; padding: 9px 12px 8px; font: 800 var(--t-small)/1 Archivo, sans-serif; cursor: pointer; }
  .top__menu:active { transform: translateY(2px); }
  .gauge span { min-width: 7ch; }
  .top__nav { position: absolute; top: 100%; left: 16px; right: 16px; margin: 0; display: grid; gap: 0; background: var(--lcd); color: #0E140D; font-size: var(--t-body); font-weight: 700; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s; }
  .top.open .top__nav { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .25s, transform .35s var(--ease); }
  .top__nav a, .top__nav a.plan-only { display: flex; justify-content: space-between; align-items: baseline; padding: 15px 16px; }
  .top__nav a::after { content: attr(data-m); position: static; height: auto; background: none; transform: none; font-weight: 500; font-variant-numeric: tabular-nums; }
  .swimmer--atoll { --w: 22vw; --y: 57%; }
  .swimmer--rook { --w: 23vw; --y: 68%; left: 46%; }
  .swimmer--mantle { --w: 28vw; --y: 84px; }
  @keyframes cruise { from { transform: translate3d(-60vw, 0, 0); } to { transform: translate3d(118vw, 0, 0); } }
  .hero .wrap { padding-left: 20px; }
  .intro__head, .lumen__grid, .floor__top { display: block; }
  .intro__head .h-head { font-size: var(--t-head); line-height: .94; }
  .intro__note { margin-top: 26px; max-width: 32ch; justify-self: start; }
  .facts { grid-template-columns: 1fr; gap: 30px 0; }
  .lumen__text { gap: 30px; }
  .lumen-mark svg { width: min(100%, 320px); }
  .cell { height: 60px; }
  .thresh .state, .lant__body { margin-left: 0; }
  .ladder__grid { display: block; }
  .ladder__pin { position: sticky; top: 0; z-index: 3; display: block; height: var(--pinh, auto); margin: 0 -20px 0 -40px; padding: 0; pointer-events: none; }
  .ladder__bar { display: flex; flex-direction: column; gap: 10px; padding: 60px 20px 14px 40px; background: var(--pin, var(--mid3)); transition: background-color .6s; pointer-events: auto; }
  .readout { grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
  .readout__zone { font-size: var(--t-body); }
  .readout__more { font-size: var(--t-small); grid-row: 2; }
  .stars { grid-row: 1 / 3; grid-column: 2; margin: 0; gap: 5px; }
  .stars svg { width: 17px; height: 17px; }
  .spec { min-height: 0; padding: 11svh 0 5svh; }
  .spec__plate { width: 56%; }
  .spec__beast { width: 60%; right: -7%; top: 11svh; margin-top: 5%; }
  .spec:nth-of-type(even) .spec__beast { left: -7%; right: auto; }
  .spec:nth-of-type(even) .spec__cap { margin-left: 0; }
  .spec__cap { margin-top: 26px; }
  .floor__links { margin-top: 44px; justify-self: start; }
  .floor__legal { display: block; padding-top: 56px; }
  .floor__credits { text-align: left; margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .deep { display: none; }
  .band::after, .snow i, .lk-anim .lk-swim, .lk-anim .lk-sway, .lk-anim .lk-glow { animation: none; }
  .js [data-r], .js .h-head[data-r] .ln > span { opacity: 1; transform: none; transition: none; }
  .js .h-head[data-r] { font-variation-settings: "wdth" 125; transition: none; }
  .js .lant-mark .draw { stroke-dashoffset: 0; transition: none; }
  .js .lant-mark circle { visibility: visible; }
  .js .lumen-mark[data-r] g { transform: none; transition: none; }
  .ping.go { animation: none; }
  .js .beast__in { transform: none; transition: none; }
  .js .beast__body, .js .beast__glow .lt { opacity: 1; transition: none; }
  .swimmer, .swimmer__bob { animation: none; }
  .swimmer--atoll { left: 54%; }
  .swimmer--mantle { left: 60%; }
}
