/* Dweller. One sheet of plain CSS, system fonts, one dark stage. */

:root {
  --bg: #14110e;
  --bg-2: #1a1612;
  --bg-3: #221d18;
  --ink: #f2ebe1;
  --ink-2: #b9ae9f;
  --ink-3: #91877a;
  --line: rgba(255, 236, 214, 0.09);
  --line-2: rgba(255, 236, 214, 0.16);
  --brass: #e9b44c;
  --brass-hi: #f6cf78;
  --brass-lo: #a8741f;
  --on-brass: #1f1507;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(96px, 12vw, 168px);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* CSS pixels per sheet pixel. dweller.js keeps --pet-s in step with the size control. */
  --pet-s: 1;
  --card-s: 0.8;
  /* Wick, the host, stands half as tall again as the cast (three device pixels per art pixel on a
     Retina screen, so still exactly crisp), and twice as tall where he introduces himself. */
  --host-s: 1.5;
  --resident-s: 2;
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; }
a { color: var(--brass-hi); text-underline-offset: 0.18em; }

:focus-visible {
  outline: 2px solid var(--brass-hi);
  outline-offset: 3px;
  border-radius: 6px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.center { text-align: center; }

h2 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
  font-weight: 750;
  letter-spacing: -0.034em;
  text-wrap: balance;
}

.lede {
  margin-top: 18px;
  max-width: 34em;
  font-size: clamp(18px, 1.9vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.center .lede { margin-inline: auto; }

/* Pixel art: never smoothed when enlarged. */
.still img, .strip img, .pet canvas, .card-floor canvas {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* A pet's still, standing on the floor line of its parent. Sizes come from the build
   (sheet pixels): --x offset of the trimmed box from the cell's center, --w and --h its size,
   --below how far it reaches under the feet. --s is CSS pixels per sheet pixel. */
.still {
  position: absolute;
  left: calc(var(--at, 50%) + var(--x) * var(--s, 1) * 1px);
  bottom: calc(var(--below) * var(--s, 1) * -1px);
  width: calc(var(--w) * var(--s, 1) * 1px);
  height: calc(var(--h) * var(--s, 1) * 1px);
}
.still picture, .still img { display: block; width: 100%; height: 100%; }

/* Where the no-JavaScript stills stand along their floor. */
.at-18 { --at: 18%; }
.at-24 { --at: 24%; }
.at-50 { --at: 50%; }
.at-82 { --at: 82%; }

/* Written by scripts/build-site-pets.sh: each pet's placement, and collection sizes. */
/* build:pets */
.p-wick { --x: -68; --w: 135; --h: 168; --below: 1; }
.p-warden { --x: -59; --w: 117; --h: 168; --below: 1; }
.p-paladin { --x: -55; --w: 109; --h: 166; --below: 1; }
.p-jester { --x: -69; --w: 138; --h: 166; --below: 2; }
.p-smith { --x: -63; --w: 126; --h: 177; --below: 2; }
.p-bard { --x: -61; --w: 121; --h: 178; --below: 2; }
.p-crusader { --x: -56; --w: 112; --h: 183; --below: 3; }
.p-sable { --x: -60; --w: 120; --h: 183; --below: 2; }
.p-komuso { --x: -57; --w: 115; --h: 170; --below: 2; }
.p-ashigaru { --x: -51; --w: 102; --h: 170; --below: 1; }
.p-oni { --x: -64; --w: 127; --h: 170; --below: 2; }
.p-ronin { --x: -54; --w: 107; --h: 170; --below: 2; }
.p-kitsune { --x: -82; --w: 163; --h: 170; --below: 2; }
.p-shinobi { --x: -73; --w: 146; --h: 170; --below: 2; }
.p-kabuto { --x: -75; --w: 149; --h: 170; --below: 1; }
.p-shieldmaiden { --x: -51; --w: 100; --h: 169; --below: 1; }
.p-berserker { --x: -77; --w: 155; --h: 168; --below: 1; }
.p-skald { --x: -63; --w: 124; --h: 171; --below: 1; }
.p-norse { --x: -63; --w: 125; --h: 170; --below: 1; }
.p-seer { --x: -60; --w: 119; --h: 170; --below: 1; }
.p-valkyrie { --x: -50; --w: 100; --h: 172; --below: 1; }
.p-vendel { --x: -58; --w: 115; --h: 171; --below: 1; }
.p-oracle { --x: -55; --w: 110; --h: 168; --below: 1; }
.p-scribe { --x: -59; --w: 118; --h: 151; --below: 1; }
.p-gladiator { --x: -54; --w: 107; --h: 168; --below: 1; }
.p-hoplite { --x: -57; --w: 114; --h: 168; --below: 1; }
.p-legion { --x: -65; --w: 130; --h: 168; --below: 1; }
.p-surfer { --x: -71; --w: 142; --h: 166; --below: 1; }
.p-keeper { --x: -79; --w: 159; --h: 183; --below: 2; }
.p-deckhand { --x: -73; --w: 147; --h: 182; --below: 1; }
.p-diver { --x: -60; --w: 120; --h: 183; --below: 2; }
.p-angler { --x: -61; --w: 122; --h: 179; --below: 2; }
.p-captain { --x: -55; --w: 110; --h: 183; --below: 2; }
.p-golem { --x: -63; --w: 126; --h: 168; --below: 1; }
.p-wyrmling { --x: -83; --w: 166; --h: 168; --below: 1; }
.p-griffin { --x: -83; --w: 166; --h: 168; --below: 1; }
.p-gargoyle { --x: -78; --w: 155; --h: 168; --below: 1; }
.n-4 { --n: 4; }
.n-5 { --n: 5; }
.n-6 { --n: 6; }
.n-7 { --n: 7; }
/* /build:pets */

/* Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(100svh, 980px);
  padding-top: clamp(40px, 8vh, 112px);
  text-align: center;
  background:
    radial-gradient(64% 34% at 50% 82%, rgba(233, 180, 76, 0.075), transparent 72%),
    linear-gradient(180deg, #110e0c 0%, var(--bg) 40%);
}

.title { line-height: 0; }
.wordmark {
  display: block;
  width: clamp(250px, min(44vw, 58vh), 540px);
  height: auto;
  margin-inline: auto;
}
.wm-face { fill: var(--brass); }
.wm-lit { fill: #fbdc8e; }
.wm-shadow { fill: #5e3f16; }

.promise {
  margin: clamp(18px, 3vh, 32px) auto 0;
  max-width: 28em;
  font-size: clamp(19px, 2.3vw, 25px);
  line-height: 1.4;
  color: var(--ink-2);
  text-wrap: balance;
}

.hero-inner { flex: none; }

/* Room above the button for Wick, who stands on it. */
.hero .download { margin-top: calc(168px * var(--pet-s) * var(--host-s) + clamp(16px, 3vh, 36px)); }
[data-ledge="button"] { --ledge-scale: var(--host-s); }

.download { display: flex; flex-direction: column; align-items: center; }
.perch-box { position: relative; }

.button {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  height: 56px;
  padding: 0 30px 3px;
  border: 0;
  border-radius: 8px;
  background: var(--brass);
  box-shadow: inset 0 2px 0 var(--brass-hi), inset 0 -4px 0 var(--brass-lo);
  color: var(--on-brass);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: #f0c05e; }
.button:active { transform: translateY(1px); }
.button:focus-visible { border-radius: 10px; }
.button[aria-disabled="true"] { cursor: default; }
.button[aria-disabled="true"]:active { transform: none; }
.button svg { width: 18px; height: 18px; flex: none; }

.download-meta {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.download-status { font-size: 14px; color: var(--ink-2); }
.download-status:not(:empty) { margin-top: 6px; }

/* The stage the hero pets walk on. */
.stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(172px * var(--pet-s) + clamp(20px, 4vh, 40px));
}
.stage .wrap { max-width: calc(1400px + 2 * var(--gutter)); }
.floor {
  --s: var(--pet-s);
  position: relative;
  height: 0;
}
.floor::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
}
.hint {
  padding: 14px 0 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}

/* Without JavaScript, stills stand where the live pets would. */
.nojs-pet { position: absolute; left: 0; right: 0; top: 0; height: 0; }
.nojs-button { --s: calc(var(--pet-s) * var(--host-s)); top: 0; }
.js .nojs-pet { display: none; }
html:not(.js) .js-only { display: none; }

/* Sections */

.section { padding-block: var(--section) 0; }

/* The resident: Wick, large, with a few words. */
.resident-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.resident-stage {
  position: relative;
  height: calc(168px * var(--pet-s) * var(--resident-s) + 76px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(56% 48px at 50% calc(100% - 36px), rgba(233, 180, 76, 0.1), transparent),
    linear-gradient(180deg, var(--bg-2), #110e0c);
}
.resident-floor {
  --s: calc(var(--pet-s) * var(--resident-s));
  --ledge-scale: var(--resident-s);
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 36px;
  height: 0;
  border-top: 1px solid var(--line-2);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
}
.resident-copy h2 { margin-top: 10px; }
.resident-more {
  margin-top: 14px;
  max-width: 30em;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}
.section.final { padding-bottom: var(--section); }
.section-head { margin-bottom: clamp(48px, 7vw, 80px); }

/* The cast. Wide screens give every collection one row of up to seven cards (the largest
   collection), and set small collections side by side, each as wide as its pets. */
@media (min-width: 1100px) {
  .roster {
    container-type: inline-size;
    display: flex;
    flex-wrap: wrap;
    gap: 56px 44px;
  }
  .collection {
    --card-w: calc((100cqw - 44px - 60px) / 7);
    width: min(100%, calc(var(--n) * var(--card-w) + (var(--n) - 1) * 12px));
  }
  .roster .cards { grid-template-columns: repeat(auto-fill, var(--card-w)); gap: 12px; }
  .roster .card { padding-inline: 12px; }
  .roster .card-stage { margin-inline: -12px; }
  .roster .card-name { font-size: 17px; }
  .roster .card-desc { font-size: 14px; text-wrap: balance; }
}

@media (max-width: 1099px) { .collection + .collection { margin-top: clamp(48px, 6vw, 72px); } }
.col-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 18px;
}
.col-head h3 {
  font-size: 23px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.col-count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brass);
}
.col-note {
  flex-basis: 100%;
  font-size: 15px;
  color: var(--ink-3);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--bg-2), #16120f);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.card-stage {
  --s: var(--card-s);
  position: relative;
  height: calc(194px * var(--card-s) + 30px);
  margin-inline: -16px;
  border-radius: 11px 11px 0 0;
  background: radial-gradient(56% 34px at 50% calc(100% - 20px), rgba(233, 180, 76, 0.07), transparent);
  overflow: hidden;
}
.card-floor {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 20px;
  height: 0;
}
.card-floor::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}
.card-floor.live .still:not(.live-still) { visibility: hidden; }
.live-still canvas { display: block; }
.card-name {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-desc {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
/* dweller.js turns animated cards into buttons that let the pet out. */
.card-hit {
  appearance: none;
  position: absolute;
  inset: -1px;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.card-hit:focus-visible { outline-offset: 2px; border-radius: 13px; }
.card.has-hit:hover { border-color: rgba(233, 180, 76, 0.34); background-color: var(--bg-3); }
.more {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-3);
}

/* Tiny by design */

.figures {
  /* Room above the top row for the pet standing on the second figure. */
  margin-top: calc(180px * var(--pet-s) - 40px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 72px 64px;
}
.figure {
  border-top: 2px solid var(--line-2);
  padding-top: 26px;
}
.num {
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.figure:first-child .num { color: var(--brass); }
.what {
  margin-top: 14px;
  max-width: 24em;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
}
.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px 56px;
  align-items: baseline;
  margin-top: clamp(72px, 9vw, 104px);
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
}
.how-line {
  font-size: clamp(22px, 2.4vw, 27px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.how p:not(.how-line) { font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.footnote {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}

/* Yours to control */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: center;
}
.copy > p:not(.invite) {
  margin-top: 20px;
  max-width: 30em;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
}
.copy h2 + p { margin-top: 24px; }
.invite { margin-top: 28px; font-size: 17px; font-weight: 650; }

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 16px;
}
.pill {
  appearance: none;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.pill:hover { border-color: var(--brass-lo); }
.pill:disabled { color: var(--ink-3); cursor: default; border-color: var(--line); }
.pill:focus-visible { border-radius: 10px; }

.seg {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  min-inline-size: 0;
}
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-2);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.seg input:checked + span { background: var(--bg-3); color: var(--brass-hi); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg input:focus-visible + span { outline: 2px solid var(--brass-hi); outline-offset: 1px; }

/* A quiet sketch of a desktop: menu bar, one window, a Dock. */
.desk {
  position: relative;
  height: clamp(400px, 40vw, 470px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(80% 60% at 70% 20%, rgba(120, 96, 150, 0.12), transparent 70%),
    linear-gradient(180deg, #1f1a22 0%, #1a1614 100%);
  overflow: hidden;
}
.desk-bar {
  display: flex;
  gap: 14px;
  align-items: center;
  height: 26px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 8, 7, 0.45);
}
.desk-bar i, .desk-bar b {
  width: 28px;
  height: 6px;
  border-radius: 2px;
  background: var(--line-2);
}
.desk-bar i:first-child { width: 12px; }
.desk-bar i:nth-child(3) { width: 22px; }
.desk-bar b { margin-left: auto; width: 46px; }
.desk-window {
  position: absolute;
  left: 7%;
  top: 44%;
  width: 40%;
  height: 34%;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: rgba(36, 30, 26, 0.9);
}
.desk-window i {
  position: absolute;
  top: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-2);
}
.desk-window i:nth-child(1) { left: 11px; }
.desk-window i:nth-child(2) { left: 25px; }
.desk-window i:nth-child(3) { left: 39px; }
.desk-spot {
  position: absolute;
  left: 7%;
  top: 44%;
  width: 40%;
  height: 0;
}
.dock {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: flex;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(40, 34, 30, 0.75);
  transform: translateX(-50%);
}
.dock i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.desk-floor {
  --s: var(--pet-s);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
}

/* Bring your own */

.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}
.panel {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
}
.panel figcaption {
  margin-top: auto;
  padding-top: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: balance;
}
.folder-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
}
.folder-head svg { width: 24px; height: 20px; fill: var(--brass); }
.files {
  margin: 10px 0 0 11px;
  padding-left: 22px;
  border-left: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 2;
  color: var(--ink-2);
}
.strip {
  margin-top: 20px;
  padding: 10px 12px 6px;
  border-radius: 9px;
  background: #100d0b;
  border: 1px solid var(--line);
}
.strip img { display: block; width: 100%; height: auto; object-fit: contain; }

.arrow { align-self: center; color: var(--ink-3); }
.arrow svg {
  display: block;
  width: 48px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mini-stage {
  position: relative;
  flex: 1;
  min-height: calc(176px * var(--pet-s) + 70px);
  border-radius: 9px;
  border: 1px solid var(--line);
  background:
    radial-gradient(50% 40px at 50% calc(100% - 30px), rgba(233, 180, 76, 0.08), transparent),
    #100d0b;
}
.mini-floor {
  --s: var(--pet-s);
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 30px;
  height: 0;
  border-top: 1px solid var(--line-2);
}

/* Questions */

.faq { margin-top: 44px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat;
  color: var(--brass);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  max-width: 36em;
  padding-bottom: 24px;
  color: var(--ink-2);
}

/* Bring one home */

.final-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  /* Room for Wick, beside the button, to stand clear of the line above. */
  margin-top: calc((168px * var(--host-s) - 40px) * var(--pet-s));
}
.final-side { position: relative; }
/* Level with the bottom of the button, just to its left. */
.perch {
  --s: calc(var(--pet-s) * var(--host-s));
  --ledge-scale: var(--host-s);
  position: absolute;
  top: 56px;
  right: 18px;
  width: 140px;
  height: 0;
}

/* Footer */

.foot { border-top: 1px solid var(--line); }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 28px 44px;
  font-size: 14px;
  color: var(--ink-3);
}
.weight:empty { display: none; }

/* Live pets (dweller.js) */

.pets {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}
.pet {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}
.pet.on { opacity: 1; }
.pet.away { visibility: hidden; }
.pet canvas { display: block; }
.pet.held { z-index: 1; }
.pet-hit {
  position: absolute;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
html.dragging, html.dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

@media (prefers-reduced-motion: reduce) {
  .pet, .button, .card, .seg span, .faq summary::after { transition: none; }
}

/* Smaller screens */

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .how { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .figures { grid-template-columns: minmax(0, 1fr); gap: 56px; margin-top: 0; }
  .figure[data-ledge] { margin-top: calc(180px * var(--pet-s) - 32px); }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .arrow { justify-self: center; transform: rotate(90deg); }
  .how p:not(.how-line) { font-size: 17px; }
  /* The pet stands on top of the button instead of beside it. */
  .final-row { grid-template-columns: minmax(0, 1fr); margin-top: calc(176px * var(--pet-s) * var(--host-s) + 24px); }
  .resident-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .final-side:last-child { display: none; }
  .perch { top: 0; left: calc(50% - 70px); right: auto; }
}

@media (max-width: 600px) {
  :root { --card-s: 0.6667; --pet-s: 0.6667; --resident-s: 1.5; }
  .hero { min-height: min(100svh, 740px); }
  .wordmark { width: min(76vw, 330px); }
  .promise { max-width: 17em; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 0 12px 14px; }
  .card-stage { margin-inline: -12px; }
  .card-floor { left: 8px; right: 8px; bottom: 16px; }
  .card-name { font-size: 16px; }
  .card-desc { font-size: 14px; }
  .desk { height: 380px; }
}

@media (max-width: 420px) {
  .seg span { padding: 6px 11px; }
  .panel { padding: 20px; }
  .button { min-width: 200px; }
}
