/* Rivorbit website. One style sheet for every page. */

@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/comfortaa-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/comfortaa-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Selawik";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/selawik-light.woff2") format("woff2");
}

@font-face {
  font-family: "Selawik";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/selawik-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Selawik";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/selawik-semibold.woff2") format("woff2");
}

/* Tokens. The page is one scene: the sky, green hills with a river, the water of the river, and a grass bank. */

:root {
  color-scheme: light dark;

  --ink: #0c1a2b;
  --ink-soft: #3b5168;
  --link: #0062a8;
  --leaf-ink: #2b7511;

  --sky-1: #0a58a6;
  --sky-2: #1670c4;
  --sky-3: #5bb6f2;
  --sky-4: #bfe7ff;
  --sky-5: #e4f6ff;

  --water-1: #3aaeee;
  --water-2: #0b75c9;
  --water-3: #0a4f8f;
  --deep: #0c1a2b;

  --on-scene: #ffffff;
  --on-scene-soft: #dcefff;

  --glass-top: rgba(255, 255, 255, 0.94);
  --glass-bottom: rgba(240, 249, 255, 0.82);
  --glass-rim: rgba(255, 255, 255, 0.95);
  --glass-line: rgba(12, 26, 43, 0.12);
  --glass-shadow: 0 24px 48px -24px rgba(3, 35, 80, 0.55);
  --gloss: rgba(255, 255, 255, 0.6);
  --sheen: rgba(255, 255, 255, 0.10);

  --focus: #ffffff;
  --focus-glass: #0062a8;

  /* The land: hills, a river, trees, and the grass bank at the bottom. */
  --haze: #f2fbff;
  --far-1: #d3f0e8;
  --far-2: #a9ddcd;
  --ground-1: #b4e891;
  --ground-2: #6cc553;
  --mound-1: #8ddb63;
  --mound-2: #43a83e;
  --near-1: #74d24d;
  --near-2: #2c8c36;
  --crest: rgba(244, 255, 222, 0.8);
  --bush: #359a3a;
  --river-far: #e8f8ff;
  --river-mid: #93d6fb;
  --lip: #e6fac9;
  --glow: rgba(255, 255, 255, 0.95);
  --leaf-1: #a2ec6c;
  --leaf-2: #1d7431;
  --leaf-gloss: rgba(255, 255, 255, 0.34);
  --trunk: #7a5a3c;
  --reed: #3c9c3b;
  --cattail: #7d502a;
  --bloom-1: #ffffff;
  --bloom-2: #ffe45c;
  --bloom-3: #ffaed2;
  --glint: #ffffff;
  --bar-top: rgba(255, 255, 255, 0.26);
  --bar-bottom: rgba(255, 255, 255, 0.08);
  --bar-rim: rgba(255, 255, 255, 0.45);
  --mtn-1: #93b6d6;
  --mtn-2: #c6e1ef;
  --snow: #ffffff;
  --snow-shade: #cfe0f2;
  --wave-opacity: 0.8;
  --cloud-opacity: 0.95;
  --fly: #e8ff8f;
  --shore-1: #82dc58;
  --shore-2: #2f8e3a;
  --ground: #11351f;
  --soil: #1c2a16;
  --foot-ink: #d3eadb;
  --puff: #ffffff;
  --puff-core: #c9b98a;
  --grass-back: #3e9d39;
  --grass-front: #8ade5e;
  --dl-leaf: #54bb3a;
  --dl-leaf-back: #2b8530;
  --dl-rib: rgba(220, 255, 190, 0.6);
  --dl-stem: #8fcf6a;
  --petal: #ffd42a;
  --petal-in: #ffaa00;
  --ground-shade: rgba(20, 80, 20, 0.24);
  --bush-2: #4aa63f;
  --bush-hi: rgba(225, 255, 190, 0.45);
  --forest: #8cc4a0;
  --forest-2: #6aae84;
  --field-1: #cfe27c;
  --field-2: #a5d867;
  --field-3: #e6dc8c;
  --field-4: #86c95c;
  --hedge: #57a644;
  --rows: rgba(70, 130, 40, 0.22);
  --dapple-hi: rgba(255, 255, 215, 0.16);
  --dapple-lo: rgba(10, 80, 20, 0.1);
  --tuft: rgba(40, 125, 40, 0.42);
  --bloom-4: #b998ff;
  --bloom-5: #ff5b4f;
  --bloom-center: #ffcf33;
  --rock: #b7c3cc;
  --rock-hi: rgba(255, 255, 255, 0.75);
  --oak-1: #9ad65a;
  --oak-2: #1f6a2b;
  --pine-1: #4fb25e;
  --pine-2: #1b6a3c;
  --blossom-1: #ffe3f0;
  --blossom-2: #f28fbd;
  --blossom-dot: rgba(255, 255, 255, 0.85);
  --leaf-dot: rgba(225, 255, 175, 0.5);
  --leaf-shade: rgba(10, 70, 20, 0.18);

  --display: "Comfortaa", "Selawik", "Segoe UI", system-ui, sans-serif;
  --body: "Selawik", "Segoe UI", system-ui, -apple-system, sans-serif;

  --measure: 68ch;

  /* The height of the grass bank at the bottom of the page. On a window wider than the bank picture at
     its fixed size (4320 pixels), it grows so that the bank still fills the width. */
  --shore-h: max(clamp(170px, 110px + 14vw, 216px), 100vw * 240 / 4800);
  --gutter: clamp(16px, 4vw, 40px);
  --wide: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f4ff;
    --ink-soft: #a9c3dc;
    --link: #8ad6ff;
    --leaf-ink: #a6f06a;

    --sky-1: #040b1a;
    --sky-2: #071631;
    --sky-3: #0d2850;
    --sky-4: #17406f;
    --sky-5: #1f5185;

    --water-1: #123f6c;
    --water-2: #0a2b50;
    --water-3: #061a33;
    --deep: #030a14;

    --on-scene: #eef8ff;
    --on-scene-soft: #a9c9e6;

    --glass-top: rgba(30, 58, 96, 0.92);
    --glass-bottom: rgba(14, 34, 62, 0.86);
    --glass-rim: rgba(150, 210, 255, 0.30);
    --glass-line: rgba(200, 230, 255, 0.14);
    --glass-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.8);
    --gloss: rgba(255, 255, 255, 0.10);
    --sheen: rgba(255, 255, 255, 0.045);

    --focus-glass: #8ad6ff;

    --haze: #1d5288;
    --far-1: #1d4862;
    --far-2: #163a52;
    --ground-1: #1e5248;
    --ground-2: #133c31;
    --mound-1: #1c5c3e;
    --mound-2: #0f3c28;
    --near-1: #1b6639;
    --near-2: #0b3520;
    --crest: rgba(170, 240, 205, 0.22);
    --bush: #0f4129;
    --river-far: #3274ad;
    --river-mid: #1c5389;
    --lip: #2b6550;
    --glow: rgba(180, 225, 255, 0.75);
    --leaf-1: #2e7f4a;
    --leaf-2: #0d3a23;
    --leaf-gloss: rgba(255, 255, 255, 0.07);
    --trunk: #3a2b20;
    --reed: #1e5d36;
    --cattail: #3b2817;
    --bloom-1: #a9c3e2;
    --bloom-2: #bfae55;
    --bloom-3: #ad84a3;
    --glint: #c4e6ff;
    --bar-top: rgba(120, 175, 255, 0.24);
    --bar-bottom: rgba(40, 90, 190, 0.12);
    --bar-rim: rgba(150, 200, 255, 0.38);
    --mtn-1: #1f3d63;
    --mtn-2: #284f76;
    --snow: #b6c9de;
    --snow-shade: #8ea6c2;
    --wave-opacity: 0.25;
    --cloud-opacity: 0.1;
    --shore-1: #1f6b3c;
    --shore-2: #0f3d24;
    --ground: #071b10;
    --soil: #0b120b;
    --foot-ink: #b5d1bd;
    --puff: #d3e3f3;
    --puff-core: #8a8060;
    --grass-back: #154a2b;
    --grass-front: #23673c;
    --dl-leaf: #22683a;
    --dl-leaf-back: #17502d;
    --dl-rib: rgba(160, 230, 180, 0.25);
    --dl-stem: #2f7448;
    --petal: #c9a92a;
    --petal-in: #b8860b;
    --ground-shade: rgba(0, 20, 10, 0.35);
    --bush-2: #134d30;
    --bush-hi: rgba(150, 220, 180, 0.12);
    --forest: #1d4a52;
    --forest-2: #183f44;
    --field-1: #2c5a3a;
    --field-2: #245035;
    --field-3: #3a5a3a;
    --field-4: #1f4a33;
    --hedge: #123d28;
    --rows: rgba(0, 20, 10, 0.3);
    --dapple-hi: rgba(140, 200, 255, 0.06);
    --dapple-lo: rgba(0, 20, 10, 0.18);
    --tuft: rgba(60, 130, 90, 0.4);
    --bloom-4: #8d7ab8;
    --bloom-5: #b0574f;
    --bloom-center: #b89a3a;
    --rock: #4c5d6b;
    --rock-hi: rgba(180, 210, 240, 0.25);
    --oak-1: #2e7a44;
    --oak-2: #0e3a24;
    --pine-1: #1f6346;
    --pine-2: #0b3324;
    --blossom-1: #a07a90;
    --blossom-2: #6d4660;
    --blossom-dot: rgba(255, 220, 240, 0.25);
    --leaf-dot: rgba(150, 230, 170, 0.12);
    --leaf-shade: rgba(0, 20, 10, 0.25);
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--on-scene);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.glass :focus-visible {
  outline-color: var(--focus-glass);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #0c1a2b;
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

/* Sky */

.sky {
  position: relative;
  display: flow-root;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 48%, var(--sky-3) 74%, var(--sky-4) 100%);
}

/* A higher sky, for pages with text near the bottom of the sky. */

.sky.high {
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
}

/* The header is a floating glass capsule, like the taskbar of the Frutiger Aero years. */

.bar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  max-width: calc(var(--wide) - 2 * var(--gutter) + 32px);
  margin: 14px max(var(--gutter) - 16px, 8px) 0;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--bar-rim);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--bar-top), var(--bar-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -10px 18px -12px rgba(150, 220, 255, 0.75), 0 12px 28px -14px rgba(0, 30, 80, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
}

@media (min-width: 1112px) {
  .bar {
    margin-left: auto;
    margin-right: auto;
  }
}

/* The gloss covers the upper half and follows the round ends of the capsule. */

.bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2px 3px 50% 3px;
  border-radius: 999px 999px 18px 18px / 999px 999px 6px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.brand {
  display: inline-block;
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* The mark and the name follow the Rivorbit lockup of the logo repository (tools/platforms.py).
   The shape of the mark is 1.25 em tall, the space before the name is 0.35 em, and the center of
   the disc sits on the middle of the capitals. The logo file has empty space around the shape:
   the shape fills 135 to 889 of the 1024 units across and 112 to 912 down, and the disc center
   is at 583 units down. Comfortaa capitals are 0.781 em tall. The margins below come from these numbers. */

.brand img {
  display: inline-block;
  vertical-align: baseline;
  width: 1.6em;
  height: 1.6em;
  margin: 0 0.139em -0.298em -0.211em;
}

/* On the blue glass of the header, a thin white halo keeps the blue river of the mark apart from the bar. */

.bar .brand img {
  filter: drop-shadow(0 0 0.6px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.5));
}

.bar nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  font-size: 1.0625rem;
}

.bar nav {
  gap: 4px;
}

.bar nav a {
  white-space: nowrap;
  padding: 6px 16px 6px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.bar nav svg {
  width: 1em;
  height: 1em;
  margin-right: 7px;
  vertical-align: -0.14em;
  fill: currentColor;
  filter: drop-shadow(0 1px 1px rgba(0, 30, 80, 0.4));
}

.bar nav a:hover,
.bar nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 51%, rgba(255, 255, 255, 0.18));
  box-shadow: inset 0 -8px 12px -6px rgba(190, 235, 255, 0.8), 0 0 14px rgba(170, 225, 255, 0.55);
}

/* Home hero: the orb floats above the place where the river leaves the horizon. */

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(28px, 7vw, 72px) var(--gutter) 0;
  text-align: center;
}

.hero h1 {
  text-shadow: 0 2px 4px rgba(0, 40, 100, 0.25), 0 0 32px rgba(160, 220, 255, 0.5);
  font-size: clamp(2.3rem, 6.4vw, 4.6rem);
  line-height: 1.08;
  max-width: 22ch;
  margin: 0 auto;
}

/* Each sentence of the lead stays whole: one line on a wide screen, and one line for each on a phone. */

.hero .lead {
  max-width: 46rem;
  margin: 18px auto 0;
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
}

.hero .lead span {
  display: inline-block;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  margin-top: 30px;
}

.actions.start {
  justify-content: flex-start;
  margin-top: 22px;
}

.actions .gel {
  font-size: 1.125rem;
  padding: 12px 26px;
}

/* On the smallest phones the link icons give their room to the text. */

@media (max-width: 379px) {
  .bar nav svg {
    display: none;
  }

  .bar nav a {
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .bar {
    padding: 6px 6px 6px 12px;
  }

  .bar nav {
    gap: 0;
    font-size: 1rem;
  }

  .bar nav a {
    padding: 6px 10px;
  }

  .brand {
    font-size: 1.25rem;
  }

  .actions .gel {
    font-size: 1rem;
    padding: 10px 18px;
  }
}

.orb {
  position: relative;
  z-index: 2;
  width: clamp(150px, 24vw, 230px);
  margin: clamp(44px, 8vw, 80px) auto 0;
}

.orb img {
  width: 100%;
  filter: drop-shadow(0 8px 14px rgba(4, 50, 110, 0.38));
}

/* The land. The art is 3200 x 360 units, and the river leaves the horizon at 136 units from the top, in
   the middle. The land keeps one height on screens 760 pixels and wider, so a change of the window
   width shows more or less land at the sides and does not zoom the scene or move the page up and down.
   Phones get a smaller land. On a window wider than the art at that height (about 2930 pixels, for
   example a 4K screen at 100% scale), the land grows so that it still fills the width. The positions of the moving parts are in units of the art (--x0 is the
   left edge of the art and --vw is its width). tools/make_land.py makes them. */

.land {
  --land-h: max(clamp(240px, 140px + 25vw, 330px), 100vw * 360 / 3200);
  position: relative;
  z-index: 1;
  height: var(--land-h);
  margin-top: calc(36px - var(--land-h) * 0.378);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 330px;
}

/* On a page with text at the bottom of the sky, the land starts below the text. */

.page-head + .land {
  margin-top: 0;
}

.land-art,
.shore-art {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  height: 100%;
  translate: -50% 0;
}

.land-art {
  --vw: 3200;
  --x0: 0;
  --vh: 360;
  aspect-ratio: 3200 / 360;
}

.hills,
.bank {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The haze is a thin bright band on the horizon, below the orb. */

.haze {
  position: absolute;
  inset: 0 0 auto;
  height: 38%;
  background: linear-gradient(180deg, transparent 45%, var(--haze));
}

/* The clouds drift along the horizon. They fade out before they pass behind the orb, so that the
   white disc of the logo never sits on a white cloud. The band does not move, only the clouds in it. */

.cloud-band {
  position: absolute;
  inset: 4% 0 auto;
  height: 33.4%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 40.5%, transparent 45%, transparent 55%, #000 59.5%);
  mask-image: linear-gradient(90deg, #000 40.5%, transparent 45%, transparent 55%, #000 59.5%);
}

.clouds {
  position: absolute;
  inset: 0 auto 0 0;
  width: 200%;
  opacity: var(--cloud-opacity);
  background: url("/assets/clouds.svg") repeat-x 0 0 / 25% 100%;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.far { opacity: 0.9; }
.crest { fill: none; stroke: var(--crest); stroke-width: 2; stroke-linecap: round; }
.bush { fill: var(--bush); }
.trunk { fill: var(--trunk); }
.lip { fill: none; stroke: var(--lip); stroke-width: 5; stroke-linejoin: round; }
.glow { fill: var(--glow); }
.gloss { fill: var(--leaf-gloss); }
.reed { fill: var(--reed); }
.stem { fill: none; stroke: var(--reed); stroke-width: 1.6; }
.cattail { fill: var(--cattail); }
.b1 { fill: var(--bloom-1); }
.b2 { fill: var(--bloom-2); }
.b3 { fill: var(--bloom-3); }
.b4 { fill: var(--bloom-4); }
.b5 { fill: var(--bloom-5); }
.bc { fill: var(--bloom-center); }

/* Detail on the land: shadows, varied bushes, forests, farm fields, sunlight and shade, grass, rocks, and
   the flecks in the tree crowns. */

.gshade { fill: var(--ground-shade); }
.bush-2 { fill: var(--bush-2); }
.bush-hi { fill: var(--bush-hi); }
.snow { fill: var(--snow); }
.snow-shade { fill: var(--snow-shade); }
.k-mtn-1 { stop-color: var(--mtn-1); }
.k-mtn-2 { stop-color: var(--mtn-2); }
.fields path { stroke: var(--hedge); stroke-width: 1; stroke-linejoin: round; }
.fd1 { fill: var(--field-1); }
.fd2 { fill: var(--field-2); }
.fd3 { fill: var(--field-3); }
.fd4 { fill: var(--field-4); }
.rows { fill: none; stroke: var(--rows); stroke-width: 0.7; }
.dap-hi { fill: var(--dapple-hi); }
.dap-lo { fill: var(--dapple-lo); }
.tufts { fill: none; stroke: var(--tuft); stroke-linecap: round; stroke-linejoin: round; }
.far-tufts { stroke-width: 0.6; }
.near-tufts { stroke-width: 1; }
.rock { fill: var(--rock); }
.rock-hi { fill: var(--rock-hi); }
.leaf-dot { fill: var(--leaf-dot); }
.leaf-shade { fill: var(--leaf-shade); }
.blossom-dot { fill: var(--blossom-dot); }

.k-far-1 { stop-color: var(--far-1); }
.k-far-2 { stop-color: var(--far-2); }
.k-ground-1 { stop-color: var(--ground-1); }
.k-ground-2 { stop-color: var(--ground-2); }
.k-mound-1 { stop-color: var(--mound-1); }
.k-mound-2 { stop-color: var(--mound-2); }
.k-near-1 { stop-color: var(--near-1); }
.k-near-2 { stop-color: var(--near-2); }
.k-river-far { stop-color: var(--river-far); }
.k-river-mid { stop-color: var(--river-mid); }
.k-river-near { stop-color: var(--water-1); }
.k-leaf-1 { stop-color: var(--leaf-1); }
.k-leaf-2 { stop-color: var(--leaf-2); }
.k-oak-1 { stop-color: var(--oak-1); }
.k-oak-2 { stop-color: var(--oak-2); }
.k-pine-1 { stop-color: var(--pine-1); }
.k-pine-2 { stop-color: var(--pine-2); }
.k-blossom-1 { stop-color: var(--blossom-1); }
.k-blossom-2 { stop-color: var(--blossom-2); }
.k-shore-1 { stop-color: var(--shore-1); }
.k-shore-2 { stop-color: var(--shore-2); }
.k-shore-3 { stop-color: var(--ground); }

/* Moving parts: each one is placed by its base point (--x, --y) and its width (--w), in art units. */

.sprite,
.ripple,
.spark,
.fly,
.seed,
.bfly-x {
  position: absolute;
  left: calc((var(--x) - var(--x0) - var(--w) / 2) * 100% / var(--vw));
  width: calc(var(--w) * 100% / var(--vw));
  height: auto;
  overflow: visible;
}

.sprite {
  top: calc((var(--y) - var(--w) * var(--r)) * 100% / var(--vh));
  transform-origin: 50% 100%;
}

.tree { --r: 1.4; aspect-ratio: 100 / 140; }
.oak { --r: 1.2727; aspect-ratio: 110 / 140; }
.pine { --r: 2.3333; aspect-ratio: 60 / 140; }
.blossom { --r: 1.4; aspect-ratio: 100 / 140; }
.poplar { --r: 3.5; aspect-ratio: 40 / 140; }
.reeds { --r: 1.6667; aspect-ratio: 60 / 100; }
.tuft { --r: 0.625; aspect-ratio: 80 / 50; }

.ripple,
.spark,
.seed,
.bfly-x {
  top: calc(var(--y) * 100% / var(--vh));
}

/* Wave crests drift down the river and grow as they come closer. Sparkles of sunlight flash on it. */

.ripple {
  aspect-ratio: 5 / 1;
  opacity: 0.45;
}

.wave-stroke {
  fill: none;
  stroke: var(--glint);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.spark {
  display: none;
  aspect-ratio: 1;
}

.sparkle {
  fill: var(--glint);
}

.fly {
  display: none;
  top: calc(var(--y) * 100% / var(--vh));
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 20%, var(--fly) 45%, transparent 72%);
}

@media (prefers-color-scheme: dark) {
  .fly {
    display: block;
  }
}

/* sprites:start */
.l1 { --x: 1542; --y: 186; --w: 12.1; --t: 9.0s; --d: -1.0s; --a: 0.9deg; }
.l2 { --x: 1664; --y: 196; --w: 14.6; --t: 8.2s; --d: -4.2s; --a: 1.0deg; }
.l3 { --x: 1684; --y: 190; --w: 13.1; --t: 9.6s; --d: -2.6s; --a: 0.8deg; }
.l4 { --x: 1352; --y: 284; --w: 72.1; --t: 8.4s; --d: -3.0s; --a: 0.8deg; }
.l5 { --x: 1790; --y: 266; --w: 53.9; --t: 7.6s; --d: -5.5s; --a: 1.1deg; }
.l6 { --x: 1100; --y: 304; --w: 72; --t: 9.2s; --d: -1.4s; --a: 0.9deg; }
.l7 { --x: 2130; --y: 296; --w: 77.9; --t: 8.8s; --d: -6.1s; --a: 0.8deg; }
.l8 { --x: 1240; --y: 236; --w: 34.3; --t: 7.9s; --d: -2.2s; --a: 0.7deg; }
.l9 { --x: 1970; --y: 226; --w: 30.9; --t: 8.6s; --d: -0.6s; --a: 0.7deg; }
.l10 { --x: 1390; --y: 280; --w: 36.3; --t: 5.2s; --d: -1.7s; --a: 3.0deg; }
.l11 { --x: 1646; --y: 288; --w: 38.3; --t: 5.8s; --d: -3.9s; --a: 3.0deg; }
.l12 { --x: 910; --y: 334; --w: 49.9; --t: 6.1s; --d: -0.8s; --a: 2.6deg; }
.l13 { --x: 2220; --y: 329; --w: 48.6; --t: 5.5s; --d: -2.9s; --a: 2.8deg; }
.rp1 { --x: 1504; --y: 248; --w: 18; --d: -1.4s; }
.rp2 { --x: 1488; --y: 270; --w: 22; --d: -2.9s; }
.rp3 { --x: 1542; --y: 290; --w: 28; --d: -4.3s; }
.rp4 { --x: 1612; --y: 310; --w: 34; --d: -5.7s; }
.rp5 { --x: 1500; --y: 324; --w: 40; --d: -7.1s; }
.rp6 { --x: 1700; --y: 336; --w: 46; --d: -8.6s; }
.rp7 { --x: 1420; --y: 346; --w: 50; --d: -10s; }
.sp1 { --x: 1516; --y: 254.0; --w: 8; --d: -0.8s; }
.sp2 { --x: 1552; --y: 291.0; --w: 10; --d: -1.7s; }
.sp3 { --x: 1464; --y: 310.5; --w: 11; --d: -2.5s; }
.sp4 { --x: 1646; --y: 322.0; --w: 12; --d: -3.3s; }
.sp5 { --x: 1542; --y: 335.5; --w: 13; --d: -4.1s; }
.sp6 { --x: 1730; --y: 343.5; --w: 13; --d: -5s; }
.f1 { --x: 1400; --y: 236; --w: 7; --t: 10.7s; --d: -2.3s; }
.f2 { --x: 1736; --y: 226; --w: 7; --t: 12.4s; --d: -4.6s; }
.f3 { --x: 1320; --y: 300; --w: 7; --t: 9.1s; --d: -6.9s; }
.f4 { --x: 1830; --y: 300; --w: 7; --t: 10.8s; --d: -9.2s; }
.f5 { --x: 1500; --y: 210; --w: 7; --t: 12.5s; --d: -11.5s; }
.f6 { --x: 2010; --y: 250; --w: 7; --t: 9.2s; --d: -13.8s; }
.f7 { --x: 1180; --y: 262; --w: 7; --t: 10.9s; --d: -16.1s; }
.f8 { --x: 2250; --y: 280; --w: 7; --t: 12.6s; --d: -18.4s; }
.sh1 { --x: 120; --y: 202; --w: 42; --t: 5.6s; --d: -1.2s; --a: 3.0deg; }
.sh2 { --x: 400; --y: 198; --w: 54.4; --t: 4.8s; --d: -2.4s; --a: 3.5deg; }
.sh3 { --x: 1080; --y: 196; --w: 54.4; --t: 5.2s; --d: -0.4s; --a: 3.5deg; }
.sh4 { --x: 1500; --y: 200; --w: 44.4; --t: 6.0s; --d: -3.3s; --a: 3.0deg; }
.dl { --x: 980; --y: 195; --w: 100; --t: 8s; --d: -2s; --a: 0.6deg; }
.s1 { --x: 975; --y: 42.5; --w: 20; --d: 0s; }
.s2 { --x: 981; --y: 34.5; --w: 20; --d: -3.2s; }
.s3 { --x: 969; --y: 42.5; --w: 20; --d: -6.9s; }
.s4 { --x: 975; --y: 34.5; --w: 20; --d: -9.4s; }
.s5 { --x: 981; --y: 42.5; --w: 20; --d: -12.8s; }
.bug-walk { --x: 700; --y: 170.6; --w: 20; transform: rotate(90deg); }
@media (prefers-reduced-motion: no-preference) { .bug-walk { animation: bug-walk 59.6s linear infinite; } }
@keyframes bug-walk {
  0% { transform: translate(0%, 0%) rotate(90deg); }
  0.5% { transform: translate(35%, -0.7%) rotate(96deg); }
  1.1% { transform: translate(70%, -1.1%) rotate(84deg); }
  1.6% { transform: translate(105%, -1.4%) rotate(96deg); }
  2.1% { transform: translate(140%, -1.4%) rotate(84deg); }
  2.7% { transform: translate(175%, -1.2%) rotate(96deg); }
  3.2% { transform: translate(210%, -0.8%) rotate(84deg); }
  3.7% { transform: translate(245%, -0.2%) rotate(96deg); }
  4.3% { transform: translate(280%, 0.6%) rotate(84deg); }
  4.8% { transform: translate(315%, 1.5%) rotate(96deg); }
  5.3% { transform: translate(350%, 2.5%) rotate(84deg); }
  5.9% { transform: translate(385%, 3.6%) rotate(96deg); }
  6.4% { transform: translate(420%, 4.7%) rotate(84deg); }
  6.9% { transform: translate(455%, 5.7%) rotate(96deg); }
  7.5% { transform: translate(490%, 6.8%) rotate(84deg); }
  8% { transform: translate(525%, 7.7%) rotate(96deg); }
  8.5% { transform: translate(560%, 8.8%) rotate(84deg); }
  9.1% { transform: translate(595%, 10%) rotate(96deg); }
  9.6% { transform: translate(630%, 11.4%) rotate(84deg); }
  10.2% { transform: translate(665%, 12.9%) rotate(96deg); }
  10.7% { transform: translate(700%, 14.5%) rotate(84deg); }
  11.2% { transform: translate(735%, 16.1%) rotate(96deg); }
  11.8% { transform: translate(770%, 17.7%) rotate(84deg); }
  12.3% { transform: translate(805%, 19.4%) rotate(96deg); }
  12.8% { transform: translate(840%, 21%) rotate(84deg); }
  13.4% { transform: translate(875%, 22.5%) rotate(96deg); }
  13.9% { transform: translate(910%, 23.9%) rotate(84deg); }
  14.4% { transform: translate(945%, 25.2%) rotate(96deg); }
  15% { transform: translate(980%, 26.2%) rotate(84deg); }
  15.5% { transform: translate(1015%, 26.9%) rotate(96deg); }
  16% { transform: translate(1050%, 27.3%) rotate(84deg); }
  16.6% { transform: translate(1085%, 27.2%) rotate(96deg); }
  17.1% { transform: translate(1120%, 26.1%) rotate(84deg); }
  17.6% { transform: translate(1155%, 24.1%) rotate(96deg); }
  18.2% { transform: translate(1190%, 21.3%) rotate(84deg); }
  18.7% { transform: translate(1225%, 17.8%) rotate(96deg); }
  19.2% { transform: translate(1260%, 14%) rotate(84deg); }
  19.8% { transform: translate(1295%, 10.5%) rotate(96deg); }
  20.3% { transform: translate(1330%, 7.8%) rotate(84deg); }
  20.8% { transform: translate(1365%, 6.1%) rotate(96deg); }
  21.4% { transform: translate(1400%, 5.7%) rotate(90deg); }
  22.7% { transform: translate(1400%, 5.7%) rotate(0deg); }
  23.3% { transform: translate(1400%, -8.3%) rotate(5deg); }
  23.8% { transform: translate(1400%, -22.2%) rotate(-5deg); }
  24.3% { transform: translate(1400%, -36.1%) rotate(5deg); }
  24.9% { transform: translate(1400%, -50%) rotate(-5deg); }
  25.4% { transform: translate(1400%, -63.9%) rotate(5deg); }
  26% { transform: translate(1400%, -77.9%) rotate(-5deg); }
  26.5% { transform: translate(1400%, -91.8%) rotate(5deg); }
  27.1% { transform: translate(1400%, -105.7%) rotate(-5deg); }
  27.6% { transform: translate(1400%, -119.6%) rotate(5deg); }
  28.2% { transform: translate(1400%, -133.5%) rotate(-5deg); }
  28.7% { transform: translate(1400%, -147.5%) rotate(5deg); }
  29.3% { transform: translate(1400%, -161.4%) rotate(-5deg); }
  29.8% { transform: translate(1400%, -175.3%) rotate(5deg); }
  30.3% { transform: translate(1400%, -189.2%) rotate(-5deg); }
  30.9% { transform: translate(1400%, -203.1%) rotate(5deg); }
  31.4% { transform: translate(1400%, -217.1%) rotate(0deg); }
  40.7% { transform: translate(1400%, -217.1%) rotate(0deg); }
  42.4% { transform: translate(1400%, -217.1%) rotate(180deg); }
  42.9% { transform: translate(1400%, -203.1%) rotate(185deg); }
  43.4% { transform: translate(1400%, -189.2%) rotate(175deg); }
  44% { transform: translate(1400%, -175.3%) rotate(185deg); }
  44.5% { transform: translate(1400%, -161.4%) rotate(175deg); }
  45.1% { transform: translate(1400%, -147.5%) rotate(185deg); }
  45.6% { transform: translate(1400%, -133.5%) rotate(175deg); }
  46.2% { transform: translate(1400%, -119.6%) rotate(185deg); }
  46.7% { transform: translate(1400%, -105.7%) rotate(175deg); }
  47.3% { transform: translate(1400%, -91.8%) rotate(185deg); }
  47.8% { transform: translate(1400%, -77.9%) rotate(175deg); }
  48.4% { transform: translate(1400%, -63.9%) rotate(185deg); }
  48.9% { transform: translate(1400%, -50%) rotate(175deg); }
  49.4% { transform: translate(1400%, -36.1%) rotate(185deg); }
  50% { transform: translate(1400%, -22.2%) rotate(175deg); }
  50.5% { transform: translate(1400%, -8.3%) rotate(185deg); }
  51.1% { transform: translate(1400%, 5.7%) rotate(180deg); }
  52.4% { transform: translate(1400%, 5.7%) rotate(270deg); }
  53% { transform: translate(1364.9%, 6.1%) rotate(276deg); }
  53.5% { transform: translate(1329.8%, 7.8%) rotate(264deg); }
  54% { transform: translate(1294.7%, 10.6%) rotate(276deg); }
  54.6% { transform: translate(1259.6%, 14.1%) rotate(264deg); }
  55.1% { transform: translate(1224.6%, 17.8%) rotate(276deg); }
  55.6% { transform: translate(1189.5%, 21.3%) rotate(264deg); }
  56.2% { transform: translate(1154.4%, 24.2%) rotate(276deg); }
  56.7% { transform: translate(1119.3%, 26.2%) rotate(264deg); }
  57.2% { transform: translate(1084.2%, 27.2%) rotate(276deg); }
  57.8% { transform: translate(1049.1%, 27.3%) rotate(264deg); }
  58.3% { transform: translate(1014%, 26.9%) rotate(276deg); }
  58.8% { transform: translate(978.9%, 26.2%) rotate(264deg); }
  59.4% { transform: translate(943.9%, 25.1%) rotate(276deg); }
  59.9% { transform: translate(908.8%, 23.8%) rotate(264deg); }
  60.5% { transform: translate(873.7%, 22.4%) rotate(276deg); }
  61% { transform: translate(838.6%, 20.9%) rotate(264deg); }
  61.5% { transform: translate(803.5%, 19.3%) rotate(276deg); }
  62.1% { transform: translate(768.4%, 17.7%) rotate(264deg); }
  62.6% { transform: translate(733.3%, 16%) rotate(276deg); }
  63.1% { transform: translate(698.2%, 14.4%) rotate(264deg); }
  63.7% { transform: translate(663.2%, 12.8%) rotate(276deg); }
  64.2% { transform: translate(628.1%, 11.3%) rotate(264deg); }
  64.7% { transform: translate(593%, 9.9%) rotate(276deg); }
  65.3% { transform: translate(557.9%, 8.7%) rotate(264deg); }
  65.8% { transform: translate(522.8%, 7.7%) rotate(276deg); }
  66.3% { transform: translate(487.7%, 6.7%) rotate(264deg); }
  66.9% { transform: translate(452.6%, 5.7%) rotate(276deg); }
  67.4% { transform: translate(417.5%, 4.6%) rotate(264deg); }
  68% { transform: translate(382.5%, 3.5%) rotate(276deg); }
  68.5% { transform: translate(347.4%, 2.4%) rotate(264deg); }
  69% { transform: translate(312.3%, 1.4%) rotate(276deg); }
  69.6% { transform: translate(277.2%, 0.5%) rotate(264deg); }
  70.1% { transform: translate(242.1%, -0.2%) rotate(276deg); }
  70.6% { transform: translate(207%, -0.8%) rotate(264deg); }
  71.2% { transform: translate(171.9%, -1.2%) rotate(276deg); }
  71.7% { transform: translate(136.8%, -1.4%) rotate(264deg); }
  72.2% { transform: translate(101.8%, -1.4%) rotate(276deg); }
  72.8% { transform: translate(66.7%, -1.1%) rotate(264deg); }
  73.3% { transform: translate(31.6%, -0.6%) rotate(276deg); }
  73.8% { transform: translate(-3.5%, 0.1%) rotate(264deg); }
  74.4% { transform: translate(-38.6%, 1.1%) rotate(276deg); }
  74.9% { transform: translate(-73.7%, 2.5%) rotate(264deg); }
  75.5% { transform: translate(-108.8%, 4.1%) rotate(276deg); }
  76% { transform: translate(-143.9%, 5.9%) rotate(264deg); }
  76.5% { transform: translate(-178.9%, 7.9%) rotate(276deg); }
  77.1% { transform: translate(-214%, 10%) rotate(264deg); }
  77.6% { transform: translate(-249.1%, 12.1%) rotate(276deg); }
  78.1% { transform: translate(-284.2%, 14.3%) rotate(264deg); }
  78.7% { transform: translate(-319.3%, 16.5%) rotate(276deg); }
  79.2% { transform: translate(-354.4%, 18.7%) rotate(264deg); }
  79.7% { transform: translate(-389.5%, 20.8%) rotate(276deg); }
  80.3% { transform: translate(-424.6%, 22.8%) rotate(264deg); }
  80.8% { transform: translate(-459.6%, 24.7%) rotate(276deg); }
  81.3% { transform: translate(-494.7%, 26.5%) rotate(264deg); }
  81.9% { transform: translate(-529.8%, 28.1%) rotate(276deg); }
  82.4% { transform: translate(-564.9%, 29.5%) rotate(264deg); }
  82.9% { transform: translate(-600%, 30.6%) rotate(270deg); }
  88.8% { transform: translate(-600%, 30.6%) rotate(270deg); }
  90.8% { transform: translate(-600%, 30.6%) rotate(450deg); }
  91.4% { transform: translate(-564.7%, 29.5%) rotate(456deg); }
  91.9% { transform: translate(-529.4%, 28.1%) rotate(444deg); }
  92.5% { transform: translate(-494.1%, 26.4%) rotate(456deg); }
  93% { transform: translate(-458.8%, 24.7%) rotate(444deg); }
  93.5% { transform: translate(-423.5%, 22.7%) rotate(456deg); }
  94.1% { transform: translate(-388.2%, 20.7%) rotate(444deg); }
  94.6% { transform: translate(-352.9%, 18.6%) rotate(456deg); }
  95.2% { transform: translate(-317.6%, 16.4%) rotate(444deg); }
  95.7% { transform: translate(-282.4%, 14.2%) rotate(456deg); }
  96.2% { transform: translate(-247.1%, 12%) rotate(444deg); }
  96.8% { transform: translate(-211.8%, 9.8%) rotate(456deg); }
  97.3% { transform: translate(-176.5%, 7.8%) rotate(444deg); }
  97.8% { transform: translate(-141.2%, 5.8%) rotate(456deg); }
  98.4% { transform: translate(-105.9%, 4%) rotate(444deg); }
  98.9% { transform: translate(-70.6%, 2.4%) rotate(456deg); }
  99.5% { transform: translate(-35.3%, 1%) rotate(444deg); }
  100% { transform: translate(0%, 0%) rotate(450deg); }
}
.bf1 { --x: 660; --y: 84; --w: 46; --tx: 9.0s; --ty: 4.5s; --turn: 18s; --d: 0.0s; }
.bf2 { --x: 660; --y: 118; --w: 46; --tx: 9.0s; --ty: 4.5s; --turn: 18s; --d: -2.2s; }
.bf3 { --x: 1300; --y: 120; --w: 46; --tx: 13.0s; --ty: 5.2s; --turn: 26s; --d: -4.0s; }
.bf4 { --x: 260; --y: 130; --w: 46; --tx: 11.0s; --ty: 3.7s; --turn: 22s; --d: -7.0s; }
.sf1 { --x: 560; --y: 150; --w: 9; --t: 9.9s; --d: -1.7s; }
.sf2 { --x: 840; --y: 140; --w: 9; --t: 11.8s; --d: -3.4s; }
.sf3 { --x: 1180; --y: 158; --w: 9; --t: 8.7s; --d: -5.1s; }
.sf4 { --x: 300; --y: 154; --w: 9; --t: 10.6s; --d: -6.8s; }
.sf5 { --x: 1420; --y: 144; --w: 9; --t: 12.5s; --d: -8.5s; }
/* sprites:end */

/* The grass bank at the bottom of the water. It reaches 2 pixels into the footer, so that no line of
   water shows between the grass and the footer. */

.shore {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: var(--shore-h);
  overflow: hidden;
  pointer-events: none;
  content-visibility: auto;
  contain-intrinsic-size: auto 216px;
}

/* The bank art repeats a 1600-unit strip three times, from -1600 to 3200 units. */

.shore-art {
  --vw: 4800;
  --x0: -1600;
  --vh: 240;
  aspect-ratio: 4800 / 240;
}

/* Life on the bank: a dandelion, a ladybug that walks along the grass and up the dandelion stem, seeds on
   the wind, and butterflies. At night the butterflies rest, and fireflies come out. */

.grass-back { fill: var(--grass-back); }
.grass-front { fill: var(--grass-front); }

.dandelion { --r: 1.75; aspect-ratio: 80 / 140; }
.dl-leaf { fill: var(--dl-leaf); }
.dl-leaf-back { fill: var(--dl-leaf-back); }
.dl-rib { fill: none; stroke: var(--dl-rib); stroke-width: 0.6; stroke-linecap: round; }
.dl-stem { fill: none; stroke: var(--dl-stem); stroke-width: 1.8; stroke-linecap: round; }
.dl-stem.thin { stroke-width: 1.4; }
.dl-bract { fill: var(--dl-leaf); stroke: var(--dl-leaf); stroke-width: 0.9; stroke-linecap: round; }
.dl-bud { fill: var(--dl-leaf); }
.dl-petal { fill: none; stroke: var(--petal); stroke-width: 2.3; stroke-linecap: round; }
.dl-petal-in { fill: none; stroke: var(--petal-in); stroke-width: 1.8; stroke-linecap: round; }
.puff { fill: none; stroke: var(--puff); stroke-width: 0.55; stroke-linecap: round; }
.puff-back { fill: none; stroke: var(--puff); stroke-width: 0.5; stroke-linecap: round; opacity: 0.45; }
.puff-halo { fill: var(--puff); opacity: 0.16; }
.puff-core { fill: var(--puff-core); }

/* The ladybug is placed by its center. Its walk is in the generated block above. */

.bug-walk {
  position: absolute;
  left: calc((var(--x) - var(--x0) - var(--w) / 2) * 100% / var(--vw));
  top: calc((var(--y) - var(--w) * 0.5833) * 100% / var(--vh));
  width: calc(var(--w) * 100% / var(--vw));
  aspect-ratio: 24 / 28;
}

.bug,
.seed svg,
.bfly-y,
.bfly-bob,
.bfly-face {
  display: block;
  width: 100%;
  height: 100%;
}

.bug-dark { fill: #18181c; }
.bug-white { fill: #ffffff; }
.bug-line { fill: none; stroke: #18181c; stroke-width: 0.7; }
.bug-leg { fill: none; stroke: #18181c; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.bug-gloss { fill: rgba(255, 255, 255, 0.7); }

.seed {
  display: none;
  aspect-ratio: 20 / 30;
}

.bfly-x { aspect-ratio: 48 / 40; }

/* The butterflies are real 3D: the body is tilted back so that you see it a little from above, and it is
   turned so that the head points the way it flies. Each wing hinges on its inner edge and turns on its
   own axis, so the two wings fold up toward each other. */

.bfly-bob { perspective: 160px; }

/* The face is drawn at twice the size and scaled down by half. Chrome draws a layer that turns in 3D at
   the size of the layer itself, so the larger drawing keeps the wings sharp. */

.bfly-face {
  position: relative;
  left: -50%;
  top: -50%;
  width: 200%;
  height: 200%;
  transform-style: preserve-3d;
  transform: scale(0.5) rotateX(50deg) rotateZ(90deg);
}

.wing,
.bfly-body-box {
  position: absolute;
  top: 0;
  height: 100%;
}

.bfly-body-box { left: 0; width: 100%; }
.wing { width: 50%; }
.wing-left { left: 0; transform-origin: 100% 50%; transform: rotateY(20deg); }
.wing-right { left: 50%; transform-origin: 0 50%; transform: rotateY(-20deg); }

.bfly-face.blue { --wing-a: #43b8ff; --wing-b: #1688ea; }
.bfly-face.sun { --wing-a: #ffd84a; --wing-b: #ffa726; }
.bfly-face.pink { --wing-a: #ff9ad2; --wing-b: #ff5fae; }
.bfly-face.red { --wing-a: #ff6150; --wing-b: #d8261a; }
.wing-a { fill: var(--wing-a); }
.wing-b { fill: var(--wing-b); }
.wing-a, .wing-b { stroke: rgba(255, 255, 255, 0.85); stroke-width: 0.8; stroke-linejoin: round; }
.wing-dot { fill: #ffffff; }
.wing-gloss { fill: rgba(255, 255, 255, 0.55); }
.bfly-body { fill: #1b2638; }
.bfly-antenna { fill: none; stroke: #1b2638; stroke-width: 0.9; stroke-linecap: round; }

@media (prefers-color-scheme: dark) {
  .bfly-x {
    display: none;
  }
}

/* Movement. Only transform and opacity change, so the graphics card does the work and the page is not
   painted again. Nothing moves when the device asks for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  .sway {
    animation: sway var(--t) ease-in-out var(--d) infinite alternate;
  }

  .ripple {
    opacity: 0;
    animation: ripple 9s ease-in-out var(--d) infinite;
  }

  .spark {
    display: block;
    opacity: 0;
    animation: spark 5s ease-in-out var(--d) infinite;
  }

  .fly {
    animation: fly var(--t) ease-in-out var(--d) infinite;
  }

  .clouds {
    animation: clouds 420s linear infinite;
  }

  .seed {
    display: block;
    opacity: 0;
    animation: seed 15s ease-in-out var(--d) infinite;
  }

  .bfly-x {
    animation: bfly-x var(--tx) ease-in-out var(--d) infinite alternate;
  }

  .bfly-y {
    animation: bfly-y var(--ty) ease-in-out var(--d) infinite alternate;
  }

  .bfly-face {
    animation: turn var(--turn) ease-in-out var(--d) infinite;
  }

  .bfly-bob {
    animation: bob 1.8s ease-in-out var(--d) infinite;
  }

  .wing-left {
    animation: flap-left 1.8s var(--d) infinite;
  }

  .wing-right {
    animation: flap-right 1.8s var(--d) infinite;
  }
}

@keyframes seed {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  8% { opacity: 0.95; }
  25% { transform: translate(260%, -40%) rotate(10deg); }
  50% { transform: translate(560%, -85%) rotate(-6deg); }
  75% { opacity: 0.9; transform: translate(880%, -70%) rotate(8deg); }
  100% { opacity: 0; transform: translate(1200%, -115%) rotate(-4deg); }
}

@keyframes bfly-x {
  from { transform: translateX(-480%); }
  to { transform: translateX(480%); }
}

@keyframes bfly-y {
  from { transform: translateY(-110%); }
  to { transform: translateY(110%); }
}

/* The butterfly faces right on the way out and left on the way back. It turns at each end of its
   sideways path, where the path slows down, and it turns through the far side, as a real one does. */

@keyframes turn {
  0%, 44% { transform: scale(0.5) rotateX(50deg) rotateZ(90deg); }
  56%, 94% { transform: scale(0.5) rotateX(50deg) rotateZ(-90deg); }
  100% { transform: scale(0.5) rotateX(50deg) rotateZ(90deg); }
}

/* One cycle: three wing beats, then a glide with the wings held up in a shallow V.
   Each beat has a slow downstroke and a quick upstroke. The wings almost meet above the body at the top
   of the stroke and dip below level at the bottom. */

@keyframes flap-left {
  0% { transform: rotateY(-18deg); animation-timing-function: ease-in; }
  6% { transform: rotateY(80deg); animation-timing-function: ease-out; }
  15% { transform: rotateY(-18deg); animation-timing-function: ease-in; }
  21% { transform: rotateY(80deg); animation-timing-function: ease-out; }
  30% { transform: rotateY(-18deg); animation-timing-function: ease-in; }
  36% { transform: rotateY(80deg); animation-timing-function: ease-out; }
  46%, 88% { transform: rotateY(28deg); animation-timing-function: ease-in-out; }
  100% { transform: rotateY(-18deg); }
}

@keyframes flap-right {
  0% { transform: rotateY(18deg); animation-timing-function: ease-in; }
  6% { transform: rotateY(-80deg); animation-timing-function: ease-out; }
  15% { transform: rotateY(18deg); animation-timing-function: ease-in; }
  21% { transform: rotateY(-80deg); animation-timing-function: ease-out; }
  30% { transform: rotateY(18deg); animation-timing-function: ease-in; }
  36% { transform: rotateY(-80deg); animation-timing-function: ease-out; }
  46%, 88% { transform: rotateY(-28deg); animation-timing-function: ease-in-out; }
  100% { transform: rotateY(18deg); }
}

/* Each downstroke lifts the body a little, and it sinks slowly in the glide. */

@keyframes bob {
  0% { transform: translateY(0); }
  15% { transform: translateY(-10%); }
  30% { transform: translateY(-16%); }
  46% { transform: translateY(-20%); }
  88% { transform: translateY(4%); }
  100% { transform: translateY(0); }
}

@keyframes sway {
  from { transform: rotate(calc(var(--a) * -1)); }
  to { transform: rotate(var(--a)); }
}

@keyframes ripple {
  0% { opacity: 0; transform: translateY(0) scale(0.7); }
  25% { opacity: 0.85; }
  70% { opacity: 0.55; }
  100% { opacity: 0; transform: translateY(260%) scale(1.25); }
}

/* A sparkle flashes and turns a little, then rests unseen for most of its cycle. */

@keyframes spark {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  6% { opacity: 1; transform: scale(1) rotate(25deg); }
  13% { opacity: 0; transform: scale(0.2) rotate(50deg); }
}

@keyframes fly {
  0% { opacity: 0; transform: translate(0, 0); }
  25% { opacity: 1; }
  50% { opacity: 0.2; transform: translate(320%, -260%); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(0, 0); }
}

@keyframes clouds {
  to { transform: translateX(-50%); }
}

/* Water */

/* Glassy bubbles rise slowly through the water. They are behind the sections, and the panels have no
   background blur, so the bubbles cost no repaint. */

.bubbles {
  position: absolute;
  inset: 0 0 max(15vw, 220px);
  overflow: hidden;
  pointer-events: none;
}

.bubbles i {
  position: absolute;
  bottom: var(--b, 10%);
  left: var(--l, 50%);
  width: var(--s, 18px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95) 0 9%, rgba(255, 255, 255, 0) 24%),
    radial-gradient(circle, rgba(255, 255, 255, 0) 54%, rgba(190, 235, 255, 0.35) 66%, rgba(255, 255, 255, 0.8) 71%, rgba(255, 255, 255, 0) 74%);
  opacity: 0.55;
}

.bubbles i:nth-child(1) { --l: 6%; --b: 8%; --s: 22px; --t: 19s; --d: -2s; }
.bubbles i:nth-child(2) { --l: 14%; --b: 30%; --s: 12px; --t: 15s; --d: -9s; }
.bubbles i:nth-child(3) { --l: 23%; --b: 4%; --s: 16px; --t: 22s; --d: -14s; }
.bubbles i:nth-child(4) { --l: 34%; --b: 52%; --s: 10px; --t: 14s; --d: -5s; }
.bubbles i:nth-child(5) { --l: 44%; --b: 12%; --s: 26px; --t: 24s; --d: -18s; }
.bubbles i:nth-child(6) { --l: 55%; --b: 40%; --s: 14px; --t: 17s; --d: -7s; }
.bubbles i:nth-child(7) { --l: 63%; --b: 6%; --s: 18px; --t: 20s; --d: -11s; }
.bubbles i:nth-child(8) { --l: 72%; --b: 60%; --s: 11px; --t: 13s; --d: -3s; }
.bubbles i:nth-child(9) { --l: 80%; --b: 18%; --s: 24px; --t: 23s; --d: -16s; }
.bubbles i:nth-child(10) { --l: 88%; --b: 46%; --s: 13px; --t: 16s; --d: -12s; }
.bubbles i:nth-child(11) { --l: 94%; --b: 10%; --s: 17px; --t: 21s; --d: -6s; }
.bubbles i:nth-child(12) { --l: 50%; --b: 70%; --s: 9px; --t: 12s; --d: -8s; }

@media (prefers-color-scheme: dark) {
  .bubbles i {
    --dim: 0.5;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .bubbles i {
    opacity: 0;
    animation: rise var(--t) linear var(--d) infinite;
  }
}

@keyframes rise {
  0% { opacity: 0; transform: translate(0, 0); }
  12% { opacity: calc(0.75 * var(--dim, 1)); }
  35% { transform: translate(10px, -210px); }
  65% { transform: translate(-8px, -420px); }
  85% { opacity: calc(0.6 * var(--dim, 1)); }
  100% { opacity: 0; transform: translate(4px, -620px); }
}

.water {
  position: relative;
  background: linear-gradient(180deg, var(--water-1) 0, var(--water-2) 260px, var(--water-3) 100%);
  padding-bottom: calc(40px + var(--shore-h));
}

/* Small wave crests on the water. They drift slowly toward you and fade with depth. The outer box holds
   the fade and does not move. The inner box moves down by one tile of the pattern (180 pixels) and starts again. */

.waves {
  position: absolute;
  inset: 0 0 auto;
  height: 380px;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 40%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 40%, transparent 85%);
}

.waves i {
  position: absolute;
  inset: -180px 0 0;
  opacity: var(--wave-opacity);
  background: url("/assets/waves.svg") repeat 0 0 / 480px 180px;
}

@media (prefers-reduced-motion: no-preference) {
  .waves i {
    animation: waves 30s linear infinite;
  }
}

@keyframes waves {
  to { transform: translateY(180px); }
}

/* Soft sunrays turn slowly behind the orb. The outer box fades the rays out below the orb, so they do
   not fall on the hills, and the inner box turns. The rays are clear at their center, where they would
   crowd together, and fade in near the edge of the disc. */

/* The rays turn around the center of the disc in the logo, at 54.6% across and 56.9% down its box. */

.rays {
  position: absolute;
  z-index: -1;
  left: 54.6%;
  top: 56.9%;
  width: 210%;
  aspect-ratio: 1;
  translate: -50% -50%;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 62%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 62%);
  pointer-events: none;
}

.rays i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.16) 0deg 5deg, rgba(255, 255, 255, 0) 5deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 0 17%, #000 32%, transparent 82%);
  mask-image: radial-gradient(closest-side, transparent 0 17%, #000 32%, transparent 82%);
}

@media (prefers-color-scheme: dark) {
  .rays i {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .orb {
    animation: float 7s ease-in-out infinite;
  }

  .rays i {
    animation: rays 240s linear infinite;
  }
}

@keyframes rays {
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.section {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) var(--gutter) 0;
}

.section > h2 {
  text-shadow: 0 1px 2px rgba(0, 40, 90, 0.35), 0 0 24px rgba(140, 210, 255, 0.45);
  font-size: clamp(1.625rem, 3.4vw, 2.25rem);
  margin-bottom: 24px;
}

/* Glass: the Aero surface. A bright rim and a gloss on the upper half. */

.glass {
  position: relative;
  isolation: isolate;
  color: var(--ink);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  border: 1px solid var(--glass-rim);
  border-radius: 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 0 1px rgba(130, 205, 255, 0.3), 0 0 30px -6px rgba(120, 200, 255, 0.45), var(--glass-shadow);
}

/* A soft aqua light along the lower edge of the glass. */

.glass::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 40%;
  border-radius: 0 0 26px 26px;
  background: radial-gradient(70% 90% at 50% 100%, rgba(140, 215, 255, 0.28), transparent 70%);
  pointer-events: none;
}

.glass::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 46%;
  border-radius: 26px 26px 50% 50% / 26px 26px 18px 18px;
  background: linear-gradient(180deg, var(--gloss), transparent);
  pointer-events: none;
}

.glass a {
  color: var(--link);
}

/* Products on the home page. Each game is a card: key art on top, a row of facts, and a description. */

.shelf {
  padding: 12px;
}

.product + .product {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-line);
}

/* The key art: the logo and the island on a band of sky, with clouds along the bottom. The sky matches
   the sky of the island art, and the edges of the island art fade into it. */

.keyart {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
  min-height: 280px;
  padding: 20px clamp(20px, 5vw, 56px);
  border-radius: 18px;
  background:
    radial-gradient(45% 70% at 80% 22%, rgba(167, 224, 252, 0.5), transparent 70%),
    linear-gradient(180deg, #2a8cf8 0%, #0d5ce0 48%, #0640c0 78%, #04309e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.keyart::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 -4px;
  aspect-ratio: 1000 / 120;
  background: url("/assets/keyart-clouds.svg") no-repeat 50% 100% / 100% 100%;
}

/* On a narrow card the cloud bank keeps its shape, and its sides run off the card. */

@media (max-width: 640px) {
  .keyart::before {
    aspect-ratio: auto;
    height: 64px;
    background-size: auto 100%;
  }
}

.keyart::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 44%;
  border-radius: 18px 18px 50% 50% / 18px 18px 36px 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.product h3 {
  margin: 0;
}

.title img {
  display: block;
  width: min(100%, 440px);
  height: auto;
  filter: drop-shadow(0 8px 14px rgba(0, 20, 80, 0.35));
}

.island {
  display: block;
  width: clamp(180px, 24vw, 270px);
  height: auto;
  -webkit-mask-image: radial-gradient(closest-side, #000 66%, transparent 99%);
  mask-image: radial-gradient(closest-side, #000 66%, transparent 99%);
}

@media (prefers-reduced-motion: no-preference) {
  .island {
    animation: hover 6s ease-in-out infinite alternate;
  }
}

@keyframes hover {
  from { transform: translateY(4px); }
  to { transform: translateY(-6px); }
}

/* The facts: what you do in the game, and how far along it is. */

.facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 20px clamp(10px, 2.6vw, 28px) 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0 20%, #9fe86a 50%, #4cb82a);
  box-shadow: 0 0 6px rgba(190, 255, 140, 0.9);
}

.product .about {
  padding: 16px clamp(10px, 2.6vw, 28px) clamp(14px, 2.4vw, 22px);
}

/* The card is narrow enough for easy reading, so the text uses its full width. Balanced lines keep a
   long sentence from breaking in the middle of a phrase. */

.product .about p {
  text-wrap: balance;
}

.product .about p + p {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .keyart {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    min-height: 0;
    padding: 22px 18px 26px;
  }

  .island {
    width: 170px;
  }
}

/* Contact: a glass panel with the email address as a gel button, and the platforms as glossy bubbles. */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px 48px;
  padding: clamp(24px, 4vw, 40px);
}

.write p {
  max-width: 30ch;
  margin-bottom: 20px;
  color: var(--ink-soft);
}

/* Gel: the glossy Frutiger Aero surface for buttons, chips, and badges, built like an Aqua gel capsule.
   - The upper half is lighter and ends at a crisp line in the middle.
   - The lower half starts darker at that line and brightens toward the bottom with a warm "caustic" glow,
     the light that passes through the gel and gathers at its base.
   - A white gloss spans the top from end to end. Its top corners follow the round ends of the capsule.
   The colors are deep enough, and the text has a dark edge, so that white text stays easy to read.
   Green is the default, like the leaf of the logo. On hover and on keyboard focus, a button does not move:
   it glows from its base and a sheen sweeps across it once. */

.gel {
  --g-top: #4fb63b;
  --g-mid: #2b9024;
  --g-low: #1d7f19;
  --caustic: rgba(170, 245, 100, 0.8);
  --edge: #176412;
  --drop: rgba(20, 90, 10, 0.6);
  --halo: rgba(170, 255, 120, 0.75);
  --ts: rgba(5, 55, 5, 0.75);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 14px 28px 14px 22px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background:
    radial-gradient(70% 50% at 50% 110%, var(--caustic), transparent 72%),
    linear-gradient(180deg, var(--g-top) 0%, var(--g-mid) 49%, var(--g-low) 51%, var(--g-low) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px var(--drop), 0 8px 16px -8px var(--drop);
  color: #ffffff;
  font-family: var(--display);
  font-size: clamp(1.125rem, 3.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  text-shadow: 0 1px 1px var(--ts), 0 0 2px var(--ts), 0 0 6px var(--ts);
  white-space: nowrap;
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}

/* The gloss shines at the top edge and fades out by about a third of the height, before it reaches the
   letters, so that white text keeps its contrast. */

.gel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px 1px 62% 1px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.04));
}

/* The sheen: a soft band of light that waits outside the left edge. */

.gel::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 60%;
  translate: -130% 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  pointer-events: none;
}

a.gel:hover,
a.gel:focus-visible {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -10px 16px -6px var(--caustic), 0 0 16px 2px var(--halo), 0 8px 16px -8px var(--drop);
  filter: brightness(1.07) saturate(1.1);
}

a.gel:active {
  filter: brightness(0.92);
  box-shadow: inset 0 2px 5px var(--drop), 0 1px 2px var(--drop);
}

@media (prefers-reduced-motion: no-preference) {
  a.gel:hover::after,
  a.gel:focus-visible::after {
    translate: 260% 0;
    transition: translate 0.8s ease-out;
  }
}

.gel.blue {
  --g-top: #4aa8ee;
  --g-mid: #1d7fd6;
  --g-low: #0b5fbd;
  --caustic: rgba(110, 220, 255, 0.8);
  --edge: #0a4f99;
  --drop: rgba(5, 50, 130, 0.6);
  --halo: rgba(150, 220, 255, 0.8);
  --ts: rgba(0, 35, 95, 0.75);
}

.gel.orange {
  --g-top: #ea8540;
  --g-mid: #d65f17;
  --g-low: #c4520a;
  --caustic: rgba(255, 210, 110, 0.85);
  --edge: #a3420a;
  --drop: rgba(140, 50, 0, 0.55);
  --halo: rgba(255, 210, 150, 0.8);
  --ts: rgba(100, 30, 0, 0.75);
}

/* Clear glass, for a quieter button on the sky. */

.gel.clear {
  --g-top: rgba(255, 255, 255, 0.24);
  --g-mid: rgba(255, 255, 255, 0.1);
  --g-low: rgba(255, 255, 255, 0.03);
  --caustic: rgba(255, 255, 255, 0.26);
  --edge: rgba(255, 255, 255, 0.62);
  --drop: rgba(0, 30, 80, 0.4);
  --halo: rgba(200, 240, 255, 0.7);
  --ts: rgba(0, 35, 95, 0.7);
}

/* Small gel, for chips and badges that are not buttons. */

.gel.small {
  gap: 6px;
  padding: 4px 12px 4px 9px;
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: 0 1px 1px var(--ts), 0 0 2px var(--ts);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 1px var(--drop), 0 4px 8px -5px var(--drop);
}

.gel.small svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  filter: drop-shadow(0 1px 1px var(--ts));
}

.glass .gel {
  color: #ffffff;
}

.gel-icon {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  filter: drop-shadow(0 1px 1px rgba(5, 60, 5, 0.5));
}

.follow > p {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-weight: 600;
}

.follow ul {
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: start;
  gap: 16px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  text-decoration: none;
}

.glass .social {
  color: var(--ink-soft);
}

.social:hover .name {
  color: var(--ink);
}

/* Each bubble is a glossy orb in the color of its platform. */

.bubble {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(62% 50% at 50% 104%, color-mix(in srgb, var(--brand) 45%, #fff6c8), transparent 75%),
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--brand) 88%, #ffffff), var(--brand) 58%, color-mix(in srgb, var(--brand) 72%, #000000));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 1px 2px rgba(0, 20, 60, 0.35), 0 8px 14px -8px rgba(0, 20, 60, 0.7);
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}

/* The sheen of a bubble waits outside its left edge. */

.bubble::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 70%;
  translate: -150% 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.6) 50%, transparent 80%);
  pointer-events: none;
}

.bubble::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 14%;
  right: 14%;
  height: 46%;
  border-radius: 50% 50% 42% 42% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.1));
}

.bubble svg {
  position: relative;
  width: 24px;
  height: 24px;
  fill: #ffffff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.social:hover .bubble,
.social:focus-visible .bubble {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), inset 0 -10px 14px -4px color-mix(in srgb, var(--brand) 40%, #fff6c8), 0 0 0 3px rgba(255, 255, 255, 0.7), 0 0 20px 2px color-mix(in srgb, var(--brand) 70%, #ffffff);
  filter: brightness(1.08) saturate(1.1);
}

@media (prefers-reduced-motion: no-preference) {
  .social:hover .bubble::after,
  .social:focus-visible .bubble::after {
    translate: 250% 0;
    transition: translate 0.7s ease-out;
  }
}

.yt { --brand: #ff1f3d; }
.ig { --brand: #d62976; }
.tt { --brand: #202028; }
.fb { --brand: #0866ff; }
.tw { --brand: #9146ff; }
.io { --brand: #fa5c5c; }

.ig .bubble {
  background: radial-gradient(circle at 30% 110%, #ffdc80 0%, #fcaf45 18%, #f56040 34%, #e1306c 52%, #c13584 68%, #833ab4 86%, #5851db 100%);
}

/* The TikTok note has its cyan and red edges. */

.tt .bubble svg {
  filter: drop-shadow(-1px -1px 0 #25f4ee) drop-shadow(1px 1px 0 #fe2c55);
}

/* The panel stacks before the six bubbles squeeze the column of the email button. When it stacks, its
   parts are centered. */

@media (max-width: 960px) {
  .contact {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .write p {
    margin-inline: auto;
  }

  .follow ul {
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .write .gel {
    gap: 9px;
    padding: 12px 20px 12px 16px;
    font-size: 1.0625rem;
  }
}

@media (max-width: 480px) {
  .follow ul {
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    gap: 16px 28px;
  }
}



/* Long text: the privacy policy */

.page-head {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(24px, 6vw, 56px) var(--gutter) clamp(40px, 6vw, 64px);
}

.page-head h1 {
  text-shadow: 0 2px 4px rgba(0, 40, 100, 0.25), 0 0 32px rgba(160, 220, 255, 0.5);
  font-size: clamp(2rem, 5vw, 3.25rem);
  max-width: 20ch;
}

.page-head p {
  margin-top: 14px;
  color: var(--on-scene-soft);
}

.doc {
  max-width: calc(var(--measure) + 2 * 48px);
  padding: clamp(24px, 5vw, 48px);
}

.doc h2 {
  font-size: 1.5rem;
  margin: 40px 0 12px;
}

.doc h2:first-child {
  margin-top: 0;
}

.doc p,
.doc ul {
  margin: 0 0 14px;
}

.doc ul {
  padding-left: 1.25em;
}

.doc li + li {
  margin-top: 6px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
  font-size: 1rem;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-top: 1px solid var(--glass-line);
}

.doc th {
  font-weight: 600;
}

.doc td code {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .doc thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .doc table,
  .doc tbody,
  .doc tr,
  .doc td {
    display: block;
  }

  .doc tr {
    border-top: 1px solid var(--glass-line);
    padding: 12px 0;
  }

  .doc td {
    border: 0;
    padding: 0;
  }

  .doc td:first-child {
    font-weight: 600;
    margin-bottom: 4px;
  }

  .doc td:first-child code {
    font-weight: 400;
  }
}

.doc .table-wrap {
  overflow-x: auto;
}

/* Footer: the soil under the meadow, with faint roots and pebbles. A dark glass dock holds the logo, the
   slogan, and the links. The small print sits below it. */

.foot {
  background:
    url("/assets/soil.svg") repeat-x 0 0 / 480px 240px,
    linear-gradient(180deg, var(--ground) 0, var(--soil) 100%);
  color: var(--foot-ink);
  font-size: 1rem;
}

.foot-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 36px var(--gutter) 40px;
}

.foot-dock {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding: 20px clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 28px -18px rgba(0, 0, 0, 0.6);
}

.foot-dock::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px 1px 55% 1px;
  border-radius: 21px 21px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.foot-brand .brand {
  color: #ffffff;
}

.foot-brand p {
  margin-top: 6px;
  color: var(--foot-ink);
  opacity: 0.85;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
}

.foot-nav a:not(.gel) {
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.foot-nav a:not(.gel):hover,
.foot-nav a:not(.gel):focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 51%, rgba(255, 255, 255, 0.1));
  box-shadow: inset 0 -8px 12px -6px rgba(190, 255, 170, 0.5), 0 0 14px rgba(170, 255, 170, 0.3);
}

.foot-nav .gel {
  margin-left: 8px;
}

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 32px;
  margin-top: 18px;
  padding: 0 4px;
  font-size: 0.9375rem;
  opacity: 0.9;
}

/* A sentence part never breaks inside itself, so a narrow screen breaks between the parts. */

.foot-legal span {
  display: inline-block;
}

@media (max-width: 720px) {
  .foot-dock,
  .foot-legal {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .foot-nav {
    justify-content: center;
  }

  .foot-nav .gel {
    margin-left: 0;
  }
}

/* Links on the page scroll smoothly, unless the device asks for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
