/* Little Bit Studio
   The page is a cross-section of the bugs' world: sky up top, grass and soil at the bottom.
   No web fonts and no third-party requests, in keeping with the privacy policy. */

:root {
  --sky-deep: #0b3f86;
  --sky: #1479e0;
  --sky-pale: #bfe2fb;
  --leaf: #4fbf26;
  --leaf-dark: #2c7d12;
  --ladybug: #d42f27;
  --ink: #14263d;
  --ink-soft: #4a5b70;
  --paper: #f8fbf3;
  --seam: #dfe8d2;
  --round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: #0a5fc0; text-underline-offset: .15em; }
a:hover { color: var(--sky-deep); }
:focus-visible { outline: 3px solid #ffd23e; outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--round); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
p { margin: 0 0 1em; max-width: 68ch; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .6em 1em; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }

/* header */
.top { background: var(--sky-deep); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; flex-wrap: wrap; }
.logo img { width: 138px; }
.top nav { display: flex; align-items: center; gap: clamp(.9rem, 3vw, 2rem); font-family: var(--round); font-weight: 700; }
.top nav a { color: #fff; text-decoration: none; padding: .35em 0; }
.top nav a:hover, .top nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--leaf); text-underline-offset: .35em; }
/* Apps menu */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; color: #fff; padding: .35em 0; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; display: inline-block; margin-left: .45em; border: solid transparent; border-width: .36em .32em 0; border-top-color: currentColor; vertical-align: middle; transition: transform .15s; }
.menu[open] summary::after { transform: rotate(180deg); }
.menu summary:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--leaf); text-underline-offset: .35em; }
.menu-panel { position: absolute; z-index: 20; top: calc(100% + .6rem); right: -6rem; width: min(46rem, calc(100vw - 2.5rem)); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: .5rem 1.5rem;
  background: #fff; color: var(--ink); border-radius: 16px; padding: 1.2rem 1.4rem; box-shadow: 0 1.2rem 2.5rem rgb(8 30 70 / .35); font-family: var(--text); font-weight: 400; }
.menu-panel h2 { font-size: .95rem; color: var(--ink-soft); margin: 0 0 .5rem; }
.menu-panel li a { display: flex; align-items: center; gap: .6rem; padding: .28rem .3rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu-panel li a:hover { background: #e9f3fd; color: var(--ink); text-decoration: none; }
.menu-panel img { width: 1.9rem; flex: none; }
.menu-panel p { grid-column: 1 / -1; margin: .4rem 0 0; padding-top: .8rem; border-top: 1px solid var(--seam); max-width: none; }
.top nav .menu-panel p a { color: #0a5fc0; padding: 0; }
.top nav .menu-panel p a:hover { text-decoration: underline; text-decoration-thickness: auto; text-decoration-color: currentColor; text-underline-offset: .15em; }
.top nav a.play { background: var(--leaf); color: #0d2a05; padding: .45em 1.3em; border-radius: 99px; }
.top nav a.play:hover { background: #6bd541; text-decoration: none; }

/* buttons */
.btn { display: inline-flex; flex-direction: column; justify-content: center; min-height: 3.1rem; padding: .35em 1.25em; border-radius: 12px;
  background: var(--ink); color: #fff; text-decoration: none; font-family: var(--round); font-weight: 700; line-height: 1.15; }
.btn small { font: 400 .72rem/1.2 var(--text); opacity: .8; }
.btn:hover { background: #000; color: #fff; }
.btn.browser { background: var(--leaf-dark); }
.btn.browser:hover { background: #1f5c0c; }
.btn.solid { background: var(--leaf); color: #0d2a05; border-radius: 99px; box-shadow: 0 2px 0 #3f9a1e, 0 10px 16px rgb(8 40 90 / .38); transition: transform .15s ease-out, box-shadow .15s ease-out, background .15s; }
.btn.solid:hover { background: #6bd541; color: #0d2a05; transform: translateY(-2px); box-shadow: 0 2px 0 #3f9a1e, 0 14px 20px rgb(8 40 90 / .42); }
.btn.solid:active { transform: translateY(1px); box-shadow: 0 1px 0 #3f9a1e, 0 4px 8px rgb(8 40 90 / .4); }
.btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; border-radius: 99px; }
.btn.ghost:hover { background: #fff; color: var(--sky-deep); }
.store-badge { display: inline-block; border-radius: 8px; }
.store-badge img { height: 2.75rem; width: auto; }
.store-badge:hover img { filter: brightness(1.25); }
.browser-badge { display: inline-flex; align-items: center; height: 2.75rem; padding: 0 1rem; box-sizing: border-box; background: #000; color: #fff;
  border: 1px solid #a6a6a6; border-radius: 7px; font: 500 1.05rem/1 var(--text); letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.browser-badge:hover { background: #262626; color: #fff; }
.app-head .browser-badge { color: #fff; }
.stores, .hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; max-width: none; }

.badge { display: inline-block; vertical-align: middle; font: 700 .78rem/1 var(--text); letter-spacing: 0; padding: .35em .7em; border-radius: 99px; margin-left: .4em; }
.badge.free { background: #d9f5cd; color: #1d5a0a; }
.badge.sale { background: #fde0dd; color: #a01b14; }
.badge.retired { background: #e4e8ee; color: #46546a; }

/* hero: sky, with the series' icons lined up on the horizon */
.hero { background: linear-gradient(var(--sky-deep), var(--sky) 60%, var(--sky-pale) 86%, var(--paper)); color: #fff; padding-top: clamp(2.5rem, 7vw, 5rem); margin-bottom: clamp(3.5rem, 8vw, 6rem); }
.hero { overflow-x: clip; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero h1 { max-width: 17ch; text-wrap: balance; }
/* a real game screen, framed like the tablet it is played on */
.hero-art { display: block; border: .7rem solid #10141c; border-radius: 1.6rem; overflow: hidden; background: #10141c;
  transform: rotate(2.5deg); box-shadow: 0 1.6rem 2.5rem rgb(8 40 90 / .45); transition: transform .2s ease-out; }
.hero-art:hover, .hero-art:focus-visible { transform: rotate(0) scale(1.015); }
.hero-art img { width: 100%; border-radius: .5rem; }
.hero-art { position: relative; }
.hero-bug { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: .5rem; }
.hero p { font-size: 1.2rem; max-width: 46ch; }
.hero-icons { display: flex; justify-content: center; gap: clamp(.3rem, 1.6vw, 1.4rem); padding: clamp(2rem, 5vw, 3.5rem) 1rem 0; margin-bottom: 0; transform: translateY(38%); }
.hero-icons a { width: clamp(2.9rem, 11.5vw, 8.5rem); flex: none; transform: rotate(var(--tilt)); transition: transform .18s ease-out; filter: drop-shadow(0 10px 10px rgb(8 40 90 / .35)); }
.hero-icons a:hover, .hero-icons a:focus-visible { transform: rotate(0) translateY(-8px) scale(1.06); }
.hero-icons img { width: 100%; }

/* app collections */
.group { padding-block: clamp(2rem, 5vw, 3.5rem); }
.group .lede { color: var(--ink-soft); font-size: 1.1rem; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 1.6rem 2.5rem; margin-top: 1.8rem; }
.app { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.1rem; align-items: start; color: inherit; text-decoration: none; }
.app:hover, .more-list a:hover { color: inherit; }
.app .app-icon { width: 5.5rem; filter: drop-shadow(0 5px 6px rgb(20 38 61 / .25)); transition: transform .15s ease-out; }
.app:hover .app-icon { transform: translateY(-4px) rotate(-3deg); }
/* Bugs and Buttons collection: a look at each game */
.apps.cards { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2.2rem 1.6rem; }
.app.card { display: block; }
.app.card .app-shot { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; box-shadow: 0 6px 14px rgb(20 38 61 / .18); transition: transform .18s ease-out, box-shadow .18s ease-out; }
.app.card:hover .app-shot { transform: translateY(-4px); box-shadow: 0 12px 22px rgb(20 38 61 / .25); }
.app.card .app-icon { float: left; width: 4rem; margin: -1.5rem .8rem 0 .7rem; position: relative; }
.app.card .app-text { display: block; }
.app strong { font: 700 1.25rem/1.2 var(--round); }
.app:hover strong { text-decoration: underline; text-decoration-color: var(--leaf); text-decoration-thickness: 3px; text-underline-offset: .2em; }
.app-line { display: block; margin-top: .25rem; }
.app-plat { display: block; margin-top: .3rem; font-size: .88rem; color: var(--ink-soft); }
.app.card strong { display: flex; align-items: center; min-height: 3rem; font-size: 1.15rem; }
.app.card .app-line { clear: left; }
.group-atomic { background: var(--ink); color: #fff; }
.group-atomic .lede, .group-atomic .app-plat { color: #b9c6d6; }
.group-atomic .app .app-icon { filter: drop-shadow(0 5px 8px rgb(0 0 0 / .5)); }

.promise { background: #e6f6da; padding-block: clamp(2rem, 5vw, 3.5rem); }
.promise-in { border-left: 6px solid var(--leaf); padding-left: clamp(1rem, 3vw, 2rem); }
.promise p:last-child { margin: 0; font-weight: 700; }
.news { padding-block: clamp(2rem, 5vw, 3.5rem); }
.news time { display: block; font-weight: 700; color: var(--ink-soft); }

/* app page */
.app-head { background: linear-gradient(var(--sky-deep), var(--sky) calc(100% - 8rem), var(--sky-pale) calc(100% - 2.5rem), var(--paper)); color: #fff; padding-block: clamp(2rem, 5vw, 3.5rem) 9rem; }
.app-head + section.wrap { margin-top: 0; }
.app-head + .about-app { margin-top: -1.5rem; }
.app-head-in { display: grid; grid-template-columns: clamp(7rem, 22vw, 14rem) 1fr; gap: clamp(1.2rem, 4vw, 3rem); align-items: start; }
/* the big icon's shadow is painted into the picture itself (see hero_icon in build.py): a CSS shadow filter drew late.
   The picture is 672px with the 512px icon in the middle, so it is scaled up and pulled out by the shadow margin. */
.app-head-in > img { filter: drop-shadow(0 12px 14px rgb(8 40 90 / .45)); }
.app-head-in > img.baked { filter: none; width: 131.25%; max-width: none; margin: -15.625%; }
.app-head p { font-size: 1.1rem; }
.app-head .btn { background: #fff; color: var(--ink); }
.app-head .btn:hover { background: var(--sky-pale); }
.app-head .btn.browser, .app-head .btn.solid { background: var(--leaf); color: #0d2a05; }
main > section.wrap { margin-top: clamp(2.2rem, 5vw, 3.5rem); }
.about-app p { font-size: 1.1rem; max-width: 75ch; }
.about-app strong { font-family: var(--round); letter-spacing: .02em; }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.split .features { grid-template-columns: 1fr; gap: 1rem; margin-top: .9rem; }
.features dd { padding-left: 2.35rem; }
.features dt { display: flex; align-items: center; }
.split .yt, .split .clip { max-width: none; }
.clip { display: block; width: 100%; max-width: 48rem; aspect-ratio: 4 / 3; border-radius: 16px; background: #000; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.2rem 2.5rem; margin: 1.2rem 0 0; }
.features dt { font: 700 1.1rem/1.3 var(--round); }
.features dd { margin: .15rem 0 0; color: var(--ink-soft); }
.policy { background: #e6f6da; border-left: 6px solid var(--leaf); padding: 1.3rem clamp(1rem, 3vw, 2rem); border-radius: 0 14px 14px 0; }
.policy h2 { font-size: 1.3rem; }
.policy p { margin: 0; max-width: 75ch; }
.policy p + p { margin-top: .7em; }
.note { color: var(--ink-soft); font-size: .95rem; }
.yt { position: relative; display: block; width: 100%; max-width: 48rem; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; }
.yt img, .yt iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.yt img { opacity: .8; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 5.5rem; height: 5.5rem; border-radius: 50%; background: var(--ladybug); box-shadow: 0 6px 20px rgb(0 0 0 / .45); }
.yt-play::after { content: ""; position: absolute; left: 39%; top: 30%; border: solid transparent; border-width: 1.1rem 0 1.1rem 1.8rem; border-left-color: #fff; }
.yt:hover .yt-play { transform: scale(1.08); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .8rem; margin-top: 1rem; }
.shots img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.shots.tall { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.shots.tall img { aspect-ratio: 3 / 4; }
.shots a:hover img { outline: 3px solid var(--sky); }
.more-list { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; margin-top: 1rem; }
.more-list a { display: grid; justify-items: center; align-content: start; gap: .5rem; width: 7.5rem; text-align: center; font: 700 .9rem/1.2 var(--round); color: inherit; text-decoration: none; }
.more-list a:hover { text-decoration: underline; }
.more-list img { width: 5.5rem; filter: drop-shadow(0 4px 5px rgb(20 38 61 / .22)); transition: transform .15s ease-out; }
.more-list a:hover img { transform: translateY(-4px); }

/* the picture shrinks to leave room for the counter and buttons, so nothing is cut off */
dialog.lightbox { border: 0; padding: .6rem; background: transparent; max-width: 100vw; max-height: 100vh; max-height: 100dvh; overflow: visible; }
dialog.lightbox::backdrop { background: rgb(8 18 32 / .9); }
dialog.lightbox img { max-width: calc(100vw - 2rem); max-height: calc(100vh - 9.5rem); max-height: calc(100dvh - 9.5rem); border-radius: 8px; margin: auto; }
dialog.lightbox .count { color: #fff; text-align: center; margin: .5rem 0 0; max-width: none; font-size: .95rem; }
dialog.lightbox .bar { display: flex; justify-content: center; gap: .6rem; margin-top: .6rem; }
dialog.lightbox button { font: 700 1rem var(--round); padding: .5em 1.1em; border-radius: 99px; border: 0; background: #fff; color: var(--ink); cursor: pointer; }

/* text pages */
/* text pages have no hero, so the header gets a short strip of sky that fades into the page */
main:has(> .prose)::before { content: ""; display: block; height: 6.5rem; background: linear-gradient(var(--sky-deep), var(--sky) 30%, var(--sky-pale) 72%, var(--paper)); }
.prose { padding-top: 1rem; }
.prose > * { max-width: 46rem; }
.prose h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: .8em; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; list-style: revert; }
.prose li { margin-bottom: .35em; }
.prose h3 { font: 700 1.1rem/1.3 var(--round); margin: 1.5em 0 .25em; }
.prose a:not([href]) { color: inherit; text-decoration: none; }
.prose .quiet { columns: 2; column-gap: 2rem; max-width: 30rem; }
.prose a { overflow-wrap: anywhere; }
.prose .ext { font-size: .85em; }
.lost { padding-bottom: 2rem; }
.about .role { color: var(--ink-soft); font-weight: 700; margin-top: -.4em; }

/* footer: grass, then soil */
.ground { margin-top: clamp(4rem, 9vw, 7rem); color: #fff; padding-top: 11.5rem;
  background: url(../images/layered-ground-min.png) top center / auto 26rem repeat-x,
              linear-gradient(transparent 10.5rem, #050201 10.5rem); }
.ground-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem 2.5rem; padding-block: 2.2rem 2rem; }
.ground h2 { font-size: 1.1rem; color: #fff; }
.ground a { color: #fff; }
.ground a:hover { color: #fff; text-decoration-thickness: 2px; }
.ground address { font-style: normal; }
.ground li { margin-bottom: .3em; }
.ground .legal { grid-column: 1 / -1; margin: 0; font-size: .9rem; }

@media (max-width: 52rem) {
  .menu { position: static; }
  .top-in { position: relative; }
  .menu-panel { left: 0; right: 0; width: auto; top: 100%; grid-template-columns: 1fr 1fr; }
  .menu-panel > div:first-child { grid-row: span 2; }
  .hero-in, .split { grid-template-columns: 1fr; }
  .hero-art { transform: rotate(1.5deg); max-width: 30rem; }
}
@media (max-width: 34rem) {
  .app-head-in { grid-template-columns: 1fr; }
  .app-head img { width: 8rem; }
  .app-head-in > img.baked { width: 10.5rem; margin: -1.25rem; }
  .logo img { width: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- playful touches ---------- */
:root { --bounce: cubic-bezier(.34, 1.56, .64, 1); }

/* sewing buttons */
.sew { width: 1.6em; height: 1.6em; flex: none; vertical-align: -.42em; margin-right: .5em; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .25)); }
.sew-h { width: 1.15em; height: 1.15em; vertical-align: -.2em; rotate: -12deg; }
.features dt .sew { transition: rotate .5s var(--bounce); }
.features div:hover .sew { rotate: 180deg; }
.button-row { display: flex; justify-content: center; align-items: center; gap: 1.6rem; margin: clamp(2.5rem, 6vw, 4rem) auto 0; }
.promise { margin-top: clamp(2rem, 5vw, 3rem); }
.button-row .sew { margin: 0; width: 2.5rem; height: 2.5rem; }
.button-row .sew:nth-child(2) { width: 1.8rem; height: 1.8rem; rotate: 20deg; translate: 0 .5rem; }
.button-row .sew:nth-child(3) { width: 3.4rem; height: 3.4rem; rotate: -15deg; }
.button-row .sew:nth-child(4) { width: 2rem; height: 2rem; rotate: 40deg; translate: 0 -.45rem; }
.button-row .sew:nth-child(5) { rotate: 8deg; }

/* the row of buttons is alive: they bob gently, and spin and hop when touched or scrolled to.
   They are always visible and always come back to rest where they started. */
.button-row { padding-block: 1.2rem .4rem; }
.button-row .sew { pointer-events: auto; cursor: pointer; animation: btn-bob 3s ease-in-out infinite; animation-delay: calc(var(--n) * -.7s); }
.button-row .sew:nth-child(1) { --n: 0; } .button-row .sew:nth-child(2) { --n: 1; animation-duration: 2.5s; }
.button-row .sew:nth-child(3) { --n: 2; animation-duration: 3.6s; } .button-row .sew:nth-child(4) { --n: 3; animation-duration: 2.7s; }
.button-row .sew:nth-child(5) { --n: 4; animation-duration: 3.2s; }
.button-row .sew.spin { animation: btn-spin .9s var(--bounce); }
@keyframes btn-bob { 50% { transform: translateY(-.45rem) rotate(14deg); } }
@keyframes btn-spin { 35% { transform: translateY(-1.6rem) rotate(220deg) scale(1.25); } 70% { transform: translateY(0) rotate(360deg) scale(.92); } to { transform: rotate(360deg); } }

/* pictures lie at slight angles, like photos on a table, and straighten when pointed at */
.shots li a { display: block; transition: rotate .35s var(--bounce), scale .35s var(--bounce); }
.shots img { border: 4px solid #fff; box-shadow: 0 4px 10px rgb(20 38 61 / .22); }
.shots li:nth-child(4n+1) a { rotate: -1.8deg; }
.shots li:nth-child(4n+2) a { rotate: 1.2deg; }
.shots li:nth-child(4n+3) a { rotate: -.7deg; }
.shots li:nth-child(4n) a { rotate: 2deg; }
.shots li a:hover, .shots li a:focus-visible { rotate: 0deg; scale: 1.06; position: relative; z-index: 1; }
.shots a:hover img { outline: none; }
.app.card .app-shot { transition: rotate .35s var(--bounce), transform .18s ease-out, box-shadow .18s ease-out; }
.cards li:nth-child(odd) .app-shot { rotate: -1.4deg; }
.cards li:nth-child(even) .app-shot { rotate: 1.3deg; }
.cards li:nth-child(3n) .app-shot { rotate: -.6deg; }
.app.card:hover .app-shot { rotate: 0deg; }

/* the row of app icons hops into place when the page opens */
.hero-icons a { animation: hop-in .7s var(--bounce) both; animation-delay: calc(var(--i) * 80ms + 250ms); }
@keyframes hop-in { from { opacity: 0; transform: translateY(3rem) rotate(0deg) scale(.6); } }

/* a ladybug walks through the grass in the footer; press it and it flies away */
.ground { position: relative; overflow-x: clip; }
.ladybug { position: absolute; top: 8.35rem; left: -4rem; width: 3.1rem; padding: 0; border: 0; background: none; cursor: pointer; animation: bug-walk 55s linear infinite; }
.ladybug svg { display: block; width: 100%; overflow: visible; animation: bug-bob .5s ease-in-out infinite alternate; }
.ladybug .leg-a, .ladybug .leg-b { transform-box: fill-box; transform-origin: center top; animation: bug-leg .28s ease-in-out infinite alternate; }
.ladybug .leg-b { animation-direction: alternate-reverse; }
.ladybug.rest, .ladybug.rest svg, .ladybug.rest .leg-a, .ladybug.rest .leg-b { animation-play-state: paused; }
.ladybug.fly { animation: bug-fly 1.7s cubic-bezier(.5, 0, .9, .4) forwards; }
.ladybug.fly .leg-a, .ladybug.fly .leg-b { animation-duration: .08s; }
@keyframes bug-walk { from { left: -4rem; } to { left: calc(100% + 4rem); } }
@keyframes bug-bob { to { translate: 0 -1.5px; } }
@keyframes bug-leg { from { rotate: -16deg; } to { rotate: 16deg; } }
@keyframes bug-fly { 15% { transform: translate(0, -.6rem) rotate(-12deg); } to { transform: translate(22rem, -80vh) rotate(-30deg) scale(.45); opacity: 0; } }

/* butterflies that glide across the home page now and then and scroll with it (added by site.js) */
.flutter { position: absolute; top: 0; left: 0; width: 100%; overflow: hidden; pointer-events: none; z-index: 5; }
.butterfly { position: absolute; left: 0; top: 0; will-change: transform; }
.butterfly-body, .butterfly-shadow { position: absolute; left: -50%; top: 0; width: 100%; translate: 0 -50%; }
.butterfly svg { display: block; width: 100%; overflow: visible; }
/* the shadow sits well below and a little to one side, smaller and blurred: the further away it is, the higher the butterfly seems */
.butterfly-shadow { translate: 26px calc(-50% + 64px); scale: .82; filter: brightness(0) blur(5px); opacity: .22; }
.butterfly .wing { transform-box: view-box; transform-origin: 50px 41px; animation: flap .15s ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.22); } }

@media (prefers-reduced-motion: reduce) {
  .hero-icons a, .ladybug svg, .ladybug .leg-a, .ladybug .leg-b, .button-row .sew { animation: none !important; }
  .ladybug { animation: none; left: 12%; }
}
