/* Healthfinity site. Colours are the app's own (app/scripts/ui/UI.gd). Pixel art is scaled by
   whole art pixels: --p is the size of one art pixel. No rounded corners, no blur, no glow. */

@font-face {
  font-family: "Press Start 2P";
  src: url("/assets/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Jersey 15";
  src: url("/assets/fonts/Jersey15-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #1b1f3b;
  --ink-deep: #121428;
  --night: #232a5c;
  --paper: #dcecff;
  --paper-hi: #f6faff;
  --paper-lo: #b4cdf2;
  --gold: #ffd23f;
  --gold-lo: #e0a91f;
  --green: #3ddc97;
  --green-ink: #0d6e48;
  --bar-green: #0f6e5a;
  --red: #ff4d6d;
  --cream: #fff4d6;
  --text: #1b1f3b;
  --muted: #3d4670;
  --link: #1d4fae;
  --p: 2px;
  --gutter: 16px;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --jersey: "Jersey 15", "Press Start 2P", ui-monospace, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  color-scheme: light;
}
@media (min-width: 600px) { :root { --p: 3px; --gutter: 24px; } }
@media (min-width: 1200px) { :root { --p: 4px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink) url("/assets/img/lawn-spring.png") repeat;
  background-size: calc(128 * var(--p)) calc(128 * var(--p));
  image-rendering: pixelated;
  overflow-x: hidden;
}
@media (min-width: 600px) { body { font-size: 18px; } }
img { max-width: 100%; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 50;
  background: var(--gold); color: var(--ink); padding: 8px 12px;
  border: 3px solid var(--ink); font-weight: 700;
}
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--text { max-width: 820px; }

/* ── top bar ─────────────────────────────────────────────────────────────── */
.bar {
  position: relative; z-index: 5;
  background: var(--ink-deep);
  border-bottom: 3px solid #000;
  box-shadow: inset 0 -3px 0 var(--night);
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.bar__brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; }
.bar__brand img { width: 32px; height: 32px; border: 2px solid #000; image-rendering: pixelated; display: block; }
.bar__name { font-family: var(--pixel); font-size: 12px; letter-spacing: .06em; }
.bar__links { display: flex; gap: 18px; }
.bar__links a {
  color: var(--cream); text-decoration: none;
  font-family: var(--jersey); font-size: 22px; line-height: 1;
  padding: 6px 0; border-bottom: 3px solid transparent;
}
.bar__links a:hover, .bar__links a[aria-current="page"] { border-bottom-color: var(--gold); color: #fff; }
@media (max-width: 419px) { .bar__name { display: none; } }

/* ── hero: sky, sun, clouds, lawn ────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: #1b1f3b; }
.sky {
  position: relative;
  background: url("/assets/img/sky.png") repeat-x center bottom;
  background-size: calc(320 * var(--p)) calc(120 * var(--p));
  padding: calc(14 * var(--p)) var(--gutter) calc(64 * var(--p));
  text-align: center;
  min-height: calc(120 * var(--p));
}
.sky--short { min-height: 0; padding: calc(16 * var(--p)) var(--gutter) calc(18 * var(--p)); }
.sky--short { background-position: center calc(100% + 40 * var(--p)); }

.cloud { position: absolute; z-index: 1; display: block; height: auto; pointer-events: none; }
.cloud--a { width: calc(39 * var(--p)); bottom: calc(26 * var(--p)); left: 4%; animation: drift 90s linear infinite alternate; }
.cloud--b { width: calc(46 * var(--p)); bottom: calc(44 * var(--p)); right: 18%; animation: drift 120s linear infinite alternate-reverse; }
.cloud--c { width: calc(35 * var(--p)); bottom: calc(8 * var(--p)); left: 30%; animation: drift 75s linear infinite alternate; display: none; }
@media (min-width: 900px) { .cloud--c { display: block; } }
@keyframes drift { from { transform: translateX(-6vw); } to { transform: translateX(6vw); } }

.hero__copy { position: relative; z-index: 3; max-width: 760px; margin: 0 auto; }

.tagline {
  margin: .5em 0 0;
  font-family: var(--jersey); text-transform: uppercase;
  font-size: clamp(30px, 7.4vw, 54px); line-height: 1; letter-spacing: .03em;
  color: var(--cream);
  text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 0 6px 0 var(--ink), 3px 6px 0 var(--ink), -3px 6px 0 var(--ink);
}
/* Each word is cut like a title letter, one step down: its own colour from the logo, a light band
   on top and a shade at the foot (hard stops on the font's own rows), a one-row drop in a deep
   shade, and the ink line round it. Jersey 15 draws a 15-row cap on a 27-row em, so 1em/27 is one
   art pixel and the bands sit on whole rows at any size. Without background-clip: text the line
   stays cream (the rule above). */
.tw { display: inline-block; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .tw {
    --tp: calc(1em / 27); --k: #07081a;
    color: transparent; text-shadow: none;
    background: linear-gradient(180deg,
      var(--c0) calc(7em / 27), var(--c1) 0 calc(9em / 27), var(--c2) 0 calc(15em / 27),
      var(--c3) 0 calc(18em / 27), var(--c4) 0);
    -webkit-background-clip: text; background-clip: text;
    filter: drop-shadow(0 var(--tp) 0 var(--c5))
      drop-shadow(var(--tp) 0 0 var(--k)) drop-shadow(calc(-1 * var(--tp)) 0 0 var(--k))
      drop-shadow(0 var(--tp) 0 var(--k)) drop-shadow(0 calc(-1 * var(--tp)) 0 var(--k));
    animation: twin .48s steps(4) both; animation-delay: calc(.75s + var(--n) * 120ms);
  }
}
.tw--diet { --n: 0; --c0: #ffd7b5; --c1: #ffb676; --c2: #ff963c; --c3: #db8134; --c4: #ad6629; --c5: #6b3f19; }
.tw--exercise { --n: 1; --c0: #bcdfff; --c1: #84c4ff; --c2: #50aaff; --c3: #4592db; --c4: #3674ad; --c5: #22476b; }
.tw--play { --n: 2; --c0: #ccf2c0; --c1: #a0e68c; --c2: #78dc5a; --c3: #67bd4d; --c4: #52963d; --c5: #325c26; }
/* a word steps up into place after the title letters land (prefers-reduced-motion: it stands still) */
@keyframes twin { from { opacity: 0; translate: 0 calc(6em / 27); } to { opacity: 1; translate: 0 0; } }
@media (forced-colors: active) { .tw { color: CanvasText; background: none; filter: none; } }
.lede {
  margin: 22px auto 0; max-width: 34em;
  color: #fff; font-size: 18px; line-height: 1.55;
  text-shadow: 2px 0 0 #07081a, -2px 0 0 #07081a, 0 -2px 0 #07081a, 0 2px 0 #07081a, 0 3px 0 #07081a;
}
@media (min-width: 600px) { .lede { font-size: 20px; } }

.soon {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 26px 0 0;
  padding: 10px 16px 12px;
  font-family: var(--jersey); font-size: 22px; line-height: 1; text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink); background: var(--gold); white-space: nowrap;
  border: 3px solid var(--ink);
  box-shadow: inset 0 -5px 0 var(--gold-lo), inset 0 3px 0 #fff3b0, 5px 5px 0 var(--ink);
}
.soon img { width: 32px; height: 32px; }
@media (min-width: 600px) { .soon { font-size: 26px; } }

/* Apple's official "Download on the App Store" badge: unchanged art, clear space around it, never under 40px tall */
.appstore { display: inline-block; line-height: 0; }
.appstore img { display: block; width: auto; height: 40px; }
.appstore:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
.store { margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 14px 18px; }
.store .appstore img { height: 52px; }
@media (min-width: 600px) { .store .appstore img { height: 60px; } }
.store__soon {
  margin: 14px 0 0;
  font-family: var(--jersey); font-size: 20px; line-height: 1; text-transform: uppercase; letter-spacing: .03em;
  color: var(--cream);
  text-shadow: 2px 0 0 #07081a, -2px 0 0 #07081a, 0 -2px 0 #07081a, 0 2px 0 #07081a, 0 3px 0 #07081a;
}
.playsoon { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; line-height: 0; }
.playsoon img { display: block; width: auto; height: 52px; }
@media (min-width: 600px) { .playsoon img { height: 60px; } }
.playsoon__label {
  font-family: var(--jersey); font-size: 20px; line-height: 1; text-transform: uppercase; letter-spacing: .03em;
  color: var(--cream);
  text-shadow: 2px 0 0 #07081a, -2px 0 0 #07081a, 0 -2px 0 #07081a, 0 2px 0 #07081a, 0 3px 0 #07081a;
}
.foot__store { margin: 16px 0 0 !important; }

.ground {
  position: relative; z-index: 2;
  height: calc(40 * var(--p));
  background: url("/assets/img/lawn-spring.png") repeat;
  background-size: calc(128 * var(--p)) calc(128 * var(--p));
  background-position: center top;
  border-top: var(--p) solid #265c3a;
  box-shadow: inset 0 var(--p) 0 #468c46;
}
.ground--thin { height: calc(10 * var(--p)); }
/* The lawn under the hero goes on from the ground's own tile: the same tile, the same centre, and
   the row where the ground stops (its height less the top border). So no tile row is cut there. */
.hero + main {
  background: url("/assets/img/lawn-spring.png") repeat;
  background-size: calc(128 * var(--p)) calc(128 * var(--p));
  background-position: center calc(-39 * var(--p));
}
.hero:has(.ground--thin) + main { background-position: center calc(-9 * var(--p)); }
.sprite { position: absolute; display: block; height: auto; image-rendering: pixelated; }
.sun { width: calc(76 * var(--p)); bottom: 100%; left: 50%; margin-left: calc(-38 * var(--p)); z-index: 0; }
.tree { width: calc(32 * var(--p)); left: 3%; bottom: calc(6 * var(--p)); }
.bush { width: calc(32 * var(--p)); left: 22%; bottom: calc(6 * var(--p)); display: none; }
.house { width: calc(72 * var(--p)); right: 3%; bottom: calc(6 * var(--p)); }
.mailbox { width: calc(11 * var(--p)); right: calc(3% + 78 * var(--p)); bottom: calc(10 * var(--p)); }
.dog {
  width: calc(16 * var(--p)); height: calc(12 * var(--p));
  left: calc(3% + 36 * var(--p)); bottom: calc(8 * var(--p));
  background: url("/assets/img/pet-dog.png") 0 0 no-repeat;
  background-size: calc(64 * var(--p)) calc(12 * var(--p));
  animation: dog 1s steps(4) infinite;
}
@keyframes dog { to { background-position: calc(-64 * var(--p)) 0; } }
@media (min-width: 900px) {
  .bush { display: block; }
  .dog { left: calc(22% + 54 * var(--p)); }
}

/* ── sections on the lawn ────────────────────────────────────────────────── */
main { display: block; }
.band { padding: 40px 0 44px; }
@media (min-width: 900px) { .band { padding: 64px 0; } }
.band.band--tight { padding-top: 0; }

.plaque {
  display: inline-block; margin: 0 0 24px;
  padding: 10px 16px 12px;
  font-family: var(--jersey); font-weight: 400; text-transform: uppercase;
  font-size: clamp(30px, 6vw, 44px); line-height: 1; letter-spacing: .02em;
  color: #fff; background: var(--bar-green);
  border: 3px solid var(--ink);
  box-shadow: inset 0 -5px 0 #0a4d3f, 5px 5px 0 var(--ink);
}

.panel {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: inset 0 -6px 0 var(--paper-lo), inset 0 3px 0 var(--paper-hi), 6px 6px 0 rgba(27, 31, 59, .85);
  padding: 22px 20px 26px;
}
@media (min-width: 600px) { .panel { padding: 30px 34px 34px; } }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.panel__title {
  margin: -22px -20px 22px; padding: 10px 20px 12px;
  background: var(--bar-green); color: #fff;
  border-bottom: 3px solid var(--ink);
  font-family: var(--jersey); font-weight: 400; text-transform: uppercase;
  font-size: 32px; line-height: 1; letter-spacing: .02em;
  display: flex; align-items: center; gap: 12px;
}
.panel__title img { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
@media (min-width: 600px) { .panel__title { margin: -30px -34px 26px; padding: 12px 34px 14px; } }

/* screenshots */
.shots {
  list-style: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 18px;
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-color: var(--ink) transparent;
}
.shots li { flex: 0 0 66%; max-width: 280px; scroll-snap-align: center; }
.shots img {
  display: block; width: 100%; height: auto; aspect-ratio: 540 / 1200;
  border: 4px solid var(--ink); background: var(--ink);
  image-rendering: auto;
  box-shadow: 6px 6px 0 rgba(27, 31, 59, .85);
}
@media (min-width: 900px) {
  .shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; overflow: visible; margin: 0; padding: 0; }
  .shots li { max-width: none; }
}
.hint { margin: 10px 0 0; color: #fff; font-size: 15px; text-shadow: 0 2px 0 var(--ink); }
@media (min-width: 900px) { .hint { display: none; } }

.duo { display: grid; gap: 30px; }
@media (min-width: 900px) { .duo { grid-template-columns: 1.25fr 1fr; align-items: start; gap: 36px; } }

.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.feats li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.feats img {
  width: 40px; height: 40px; padding: 2px; image-rendering: pixelated;
  background: var(--paper-hi); border: 2px solid var(--ink);
}
.feats strong { display: block; font-size: 18px; line-height: 1.3; }
.feats span { display: block; color: var(--muted); font-size: 16px; line-height: 1.5; }
@media (min-width: 600px) { .feats strong { font-size: 19px; } .feats span { font-size: 17px; } }

.plain p { margin: 0 0 14px; }
.stack { display: grid; gap: 30px; }

.note {
  margin: 18px 0 0; padding: 12px 14px;
  background: var(--paper-hi); border: 2px dashed var(--muted);
  font-size: 16px; color: var(--muted);
}
.free-list { list-style: none; margin: 0 0 14px; padding: 0; }
.free-list li { padding: 8px 0 8px 30px; position: relative; border-top: 2px dashed var(--paper-lo); }
.free-list li:first-child { border-top: 0; }
.free-list li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 14px; height: 14px;
  background: var(--green); border: 2px solid var(--ink);
}

/* ── legal text ──────────────────────────────────────────────────────────── */
.page-title {
  margin: 0; color: var(--cream);
  font-family: var(--pixel); font-weight: 400;
  font-size: clamp(18px, 4.6vw, 34px); line-height: 1.45; letter-spacing: .02em;
  text-shadow: 0 .15em 0 var(--ink), .1em .1em 0 var(--ink), -.1em .1em 0 var(--ink);
}
.page-sub { margin: 14px 0 0; color: #fff; font-size: 16px; text-shadow: 0 2px 0 var(--ink); }
@media (min-width: 600px) { .page-sub { font-size: 18px; } }

.legal { font-size: 17px; }
@media (min-width: 600px) { .legal { font-size: 18px; } }
.legal h2 {
  margin: 34px 0 12px; padding-top: 26px;
  border-top: 3px dashed var(--paper-lo);
  font-family: var(--jersey); font-weight: 400; text-transform: uppercase;
  font-size: 32px; line-height: 1.05; letter-spacing: .02em; color: var(--bar-green);
}
.legal h2:first-of-type { margin-top: 26px; }
.legal h3 { margin: 22px 0 8px; font-size: 19px; line-height: 1.3; }
.legal p, .legal ul, .legal ol { margin: 0 0 14px; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin: 0 0 8px; }
.legal li::marker { color: var(--bar-green); font-weight: 700; }
.lead { font-size: 1.08em; }

.tablewrap { overflow-x: auto; margin: 0 0 16px; border: 3px solid var(--ink); background: var(--paper-hi); }
table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 2px solid var(--paper-lo); }
th { background: var(--night); color: #fff; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td:first-child { width: 58%; }

.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 4px 52px; min-height: 40px; margin-bottom: 12px; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0; width: 38px; height: 38px;
  display: grid; place-items: center;
  font-family: var(--pixel); font-size: 14px; color: var(--ink);
  background: var(--gold); border: 3px solid var(--ink); box-shadow: inset 0 -4px 0 var(--gold-lo);
}
.ui {
  font-family: var(--jersey); font-size: 1.2em; line-height: 1; letter-spacing: .02em; text-transform: uppercase;
  padding: 1px 6px 2px; background: var(--paper-hi); border: 2px solid var(--ink); white-space: nowrap;
}
.ui--red { background: var(--red); color: #fff; }

.kv { display: grid; gap: 16px; margin: 0 0 16px; }
@media (min-width: 700px) { .kv { grid-template-columns: 1fr 1fr; } }
.kv section { background: var(--paper-hi); border: 3px solid var(--ink); padding: 14px 16px 6px; }
.kv h3 { margin: 0 0 8px; display: flex; gap: 10px; align-items: center; }
.kv h3 img { width: 32px; height: 32px; image-rendering: pixelated; }
.kv ul { padding-left: 1.2em; }

.mailbtn {
  display: inline-block; margin: 4px 0 14px;
  padding: 10px 16px 12px;
  font-family: var(--jersey); font-size: 24px; line-height: 1; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: var(--gold);
  border: 3px solid var(--ink);
  box-shadow: inset 0 -5px 0 var(--gold-lo), 4px 4px 0 var(--ink);
}
.mailbtn:hover { color: var(--ink); background: #ffe070; }
.mailbtn:active { transform: translate(2px, 2px); box-shadow: inset 0 -3px 0 var(--gold-lo), 2px 2px 0 var(--ink); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; overflow-wrap: anywhere; }

/* ── footer ──────────────────────────────────────────────────────────────── */
.foot {
  color: #e6e9ff;
  background: #1b1f3b url("/assets/img/sky-night.png") repeat-x center bottom;
  background-size: calc(320 * var(--p)) calc(48 * var(--p));
  border-top: 3px solid #000;
  padding: 34px 0 calc(50 * var(--p));
  font-size: 16px;
}
.foot a { color: #fff; }
.foot a:hover { color: var(--gold); }
.foot__top { display: grid; gap: 24px; }
@media (min-width: 800px) { .foot__top { grid-template-columns: 1fr auto; align-items: start; gap: 40px; } }
.foot__brand { display: flex; gap: 12px; align-items: center; margin: 0 0 8px; }
.foot__brand img { width: 48px; height: 48px; border: 3px solid #000; image-rendering: pixelated; }
.foot__brand b { font-family: var(--pixel); font-weight: 400; font-size: 14px; color: var(--cream); }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot nav a {
  font-family: var(--jersey); font-size: 24px; line-height: 1; text-decoration: none;
  padding: 4px 0; border-bottom: 3px solid var(--gold);
}
.foot p { margin: 0 0 10px; }
.credits { margin-top: 26px !important; padding-top: 18px; border-top: 2px dashed #4a5290; color: #c7ccf0; font-size: 15px; line-height: 1.55; }

/* ── AI stance ───────────────────────────────────────────────────────────── */
.page-sub--small { margin-top: 6px; font-size: 15px; opacity: .9; }
.tenets { display: grid; gap: 30px; }
@media (min-width: 900px) { .tenets { grid-template-columns: repeat(3, 1fr); gap: 30px; } .tenets__wide { grid-column: 1 / -1; grid-row: 1; } }
.big { font-size: 1.12em; line-height: 1.5; }
.sign {
  display: inline-block; margin: -8px 0 26px; padding: 10px 14px;
  background: var(--paper-hi); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  font-size: 16px;
}
.duo--even { margin-bottom: 30px; }
@media (min-width: 900px) { .duo--even { grid-template-columns: 1fr 1fr; } }
.credit-list { list-style: none; margin: 0; padding: 0; }
.credit-list li { padding: 10px 0; border-top: 2px dashed var(--paper-lo); font-size: 16px; line-height: 1.5; }
.credit-list li:first-child { border-top: 0; padding-top: 0; }
.credit-list b { color: var(--ink); font-size: 17px; }
.credit-list a { display: block; font-size: 15px; overflow-wrap: anywhere; }
.signoff { text-align: center; }
.signoff__name { font-family: var(--jersey); font-size: 30px; line-height: 1.1; text-transform: uppercase; color: var(--bar-green); }
.signoff .btn { margin-top: 6px; }

/* home: the art pledge */
.pledge {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 28px 0 0; padding: 12px 16px 14px;
  background: var(--ink-deep); color: var(--cream);
  border: 3px solid #000; box-shadow: inset 0 3px 0 var(--night), 5px 5px 0 var(--ink);
  font-family: var(--jersey); font-size: 24px; line-height: 1.1; text-transform: uppercase; letter-spacing: .02em;
}
.pledge img { width: 32px; height: 32px; image-rendering: pixelated; flex: none; }
.pledge a { color: var(--gold); margin-left: auto; }
.pledge a:hover { color: #fff; }
@media (min-width: 900px) { .pledge { font-size: 28px; } }

/* ── 404 ─────────────────────────────────────────────────────────────────── */
.lost .sky { min-height: calc(120 * var(--p)); padding-top: calc(26 * var(--p)); }
.lost .lede { margin-top: 18px; }
.btn {
  display: inline-block; margin-top: 24px;
  padding: 10px 18px 12px;
  font-family: var(--jersey); font-size: 26px; line-height: 1; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: var(--gold);
  border: 3px solid var(--ink);
  box-shadow: inset 0 -5px 0 var(--gold-lo), 5px 5px 0 var(--ink);
}
.btn:hover { color: var(--ink); background: #ffe070; }

/* ── home: the living yard ──────────────────────────────────────────────────
   Every sprite is an owned strip (tools/build_scene.py). Speed first: every motion here is a
   transform or an opacity, so the compositor plays it and the page does not paint again.
   A sprite is a window (overflow: hidden, one frame big). Its ::before holds the whole strip
   (--img, --f frames, --t a loop, --d a delay) and slides one frame at a time with steps().
   --hp is the art pixel of the place a sprite is in (the yard or the gym). */
:root { --hp: var(--p); --lp: 2px; }
@media (min-width: 375px) { :root { --lp: 3px; } }
@media (min-width: 600px) { :root { --lp: 4px; } }
@media (min-width: 1000px) { :root { --lp: 6px; } }
@media (min-width: 1280px) { :root { --lp: 7px; } }

.gull .spr, .tree-s, .tuft, .smoke, .walker .spr, .fly, .clock, .cooler, .gg { overflow: hidden; }
.gull .spr::before, .tree-s::before, .tuft::before, .smoke::before, .walker .spr::before, .fly::before,
.clock::before, .cooler::before, .gg::before {
  content: ""; position: absolute; left: 0; top: 0; height: 100%;
  width: calc(var(--f) * 100%);
  background: var(--img) 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated;
  animation: sx var(--t) steps(var(--f)) infinite var(--d, 0s);
}
@keyframes sx { to { transform: translateX(-100%); } }
/* the same slide under other names: a state swap starts a new animation at frame 0, so no
   frame of the new strip is cut short */
@keyframes sxc { to { transform: translateX(-100%); } }
@keyframes sxj { to { transform: translateX(-100%); } }
@keyframes sxr { to { transform: translateX(-100%); } }

/* Off screen or in a hidden tab, site.js adds .paused: nothing plays where nobody looks. */
.paused *, .paused *::before, .paused *::after { animation-play-state: paused !important; }

.hero--home .sky { padding-top: calc(12 * var(--p)); }
.hero--home .hero__copy { z-index: 3; }

/* stars that twinkle in the night part of the sky */
.stars { position: absolute; inset: 0 0 48% 0; z-index: 0; pointer-events: none; }
.star {
  position: absolute; width: var(--p); height: var(--p); background: #fff4d6;
  animation: twinkle 3.4s step-end infinite; animation-delay: calc(-1 * var(--d));
}
.star:nth-child(3n+1) {
  box-shadow: var(--p) 0 0 #8f8fd0, calc(-1 * var(--p)) 0 0 #8f8fd0, 0 var(--p) 0 #8f8fd0, 0 calc(-1 * var(--p)) 0 #8f8fd0;
}
@keyframes twinkle { 0% { opacity: 1; } 35% { opacity: .3; } 50% { opacity: 1; } 70% { opacity: .6; } 85% { opacity: 1; } }

/* clouds cross the sky; the far ones are slower (and move less when you scroll) */
.hero--home .cloud {
  left: 0; bottom: auto; display: block;
  animation: cross var(--t, 110s) linear infinite; animation-delay: var(--dl, 0s);
}
.hero--home .cloud--a { top: 30%; width: calc(39 * var(--p)); --t: 140s; --dl: -20s; }
.hero--home .cloud--b { top: 12%; width: calc(46 * var(--p)); --t: 110s; --dl: -70s; }
.hero--home .cloud--c { top: 46%; width: calc(35 * var(--p)); --t: 170s; --dl: -120s; opacity: .9; }
.hero--home .cloud--d { top: 62%; width: calc(39 * var(--p)); --t: 90s; --dl: -40s; }
.hero--home .cloud--e { top: 4%; width: calc(35 * var(--p)); --t: 200s; --dl: -150s; opacity: .8; }
@keyframes cross {
  from { transform: translateX(calc(-1 * var(--cx) - 50 * var(--p))); }
  to { transform: translateX(calc(100vw - var(--cx))); }
}

/* gulls from the beach glide past now and then */
.gull {
  position: absolute; left: 0; z-index: 1; cursor: pointer;
  width: calc(15 * var(--p)); height: calc(12 * var(--p));
  --img: url("/assets/img/scene/gull.png"); --f: 4; --t: .55s;
  animation: glide var(--gt) linear infinite var(--dl), bob 1.1s step-end infinite;
}
.gull--a { top: 22%; --gt: 30s; --dl: -6s; }
.gull--b { top: 36%; --gt: 41s; --dl: -27s; }
@keyframes glide {
  0% { transform: translateX(calc(100vw + 20px)); }
  45%, 100% { transform: translateX(calc(-20 * var(--p))); }
}
@keyframes bob { 0% { translate: 0 0; } 50% { translate: 0 calc(-1 * var(--p)); } }
/* a tap: the gull hops up inside its glide and beats its wings fast */
.gull .spr { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 100%; }
.gull .spr.hop::before { animation: sxc .22s steps(4) infinite; }
/* the hero text lets a tap through to the gulls behind it; its links still work */
.hero--home .hero__copy { pointer-events: none; }
.hero--home .hero__copy a { pointer-events: auto; }

/* the title: owned letter cells (Press Start 2P drawn at 1x), a wave, a shine, sparkles */
.logo { margin: 0 calc(-1 * var(--gutter)); display: flex; justify-content: center; font-size: 0; line-height: 0; }
.logo__in { position: relative; display: inline-flex; padding: calc(3 * var(--lp)) 0 0; }
.lt {
  position: relative; display: block; flex: none;
  width: calc(9 * var(--lp)); height: calc(12 * var(--lp));
  margin-right: var(--lp);  /* one px of night sky between two letters */
  background: url("/assets/img/scene/logo.png?v=b5d6456") calc(var(--i) * -9 * var(--lp)) 0 / calc(108 * var(--lp)) calc(12 * var(--lp));
  image-rendering: pixelated;
  animation: drop .64s steps(8) both, wave 2.6s step-end infinite;
  animation-delay: calc(var(--i) * 55ms), calc(1.2s + var(--i) * 90ms);
}
.lt:last-of-type { margin-right: 0; }
/* the shine: the letter's fill is a still mask; only the light band in it moves */
.lt > i {
  position: absolute; inset: 0; overflow: hidden; opacity: .75;
  -webkit-mask: url("/assets/img/scene/logo-fill.png?v=b5d6456") calc(var(--i) * -9 * var(--lp)) 0 / calc(108 * var(--lp)) calc(12 * var(--lp)) no-repeat;
  mask: url("/assets/img/scene/logo-fill.png?v=b5d6456") calc(var(--i) * -9 * var(--lp)) 0 / calc(108 * var(--lp)) calc(12 * var(--lp)) no-repeat;
}
.lt > i::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(-8 * var(--lp)); width: calc(4 * var(--lp));
  background: linear-gradient(90deg, #fff 0 50%, transparent 50% 75%, #fff 75%);
  animation: shine 5.2s steps(20) infinite; animation-delay: calc(2s + var(--i) * 70ms);
}
@keyframes drop {
  0% { translate: 0 calc(-28 * var(--lp)); opacity: 0; }
  60% { translate: 0 0; opacity: 1; }
  75% { translate: 0 calc(-3 * var(--lp)); }
  100% { translate: 0 0; opacity: 1; }
}
@keyframes wave {
  0% { transform: translateY(0); }
  8% { transform: translateY(calc(-1 * var(--lp))); }
  16% { transform: translateY(calc(-2 * var(--lp))); }
  24% { transform: translateY(calc(-1 * var(--lp))); }
  32% { transform: translateY(0); }
}
@keyframes shine { 0% { transform: none; } 16%, 100% { transform: translateX(500%); } }

/* sparkles: a pixel, then a small cross, then a big cross, then gone. Solid pixels, no blur.
   Each stage is a still shape that only turns its opacity on and off. */
.spk {
  --s: var(--lp); --c: #fff4d6;
  position: absolute; z-index: 2; width: var(--s); height: var(--s); background: var(--c);
  pointer-events: none; opacity: 0;
  animation: spk0 3.2s step-end infinite var(--dl, 0s);
}
.spk::before, .spk::after {
  content: ""; position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); opacity: 0;
  animation: spk1 3.2s step-end infinite var(--dl, 0s);
  box-shadow: var(--s) 0 0 var(--c), calc(-1 * var(--s)) 0 0 var(--c), 0 var(--s) 0 var(--c), 0 calc(-1 * var(--s)) 0 var(--c);
}
.spk::after {
  animation-name: spk2;
  box-shadow: calc(2 * var(--s)) 0 0 var(--c), calc(-2 * var(--s)) 0 0 var(--c), 0 calc(2 * var(--s)) 0 var(--c), 0 calc(-2 * var(--s)) 0 var(--c);
}
.spk--a { left: calc(-2 * var(--lp)); top: calc(2 * var(--lp)); --dl: .9s; }
.spk--c { left: 71%; bottom: calc(-2 * var(--lp)); --dl: 1.5s; }
.spk--d { right: calc(-2 * var(--lp)); top: calc(5 * var(--lp)); --dl: 2.8s; --c: #ffd23f; }
@keyframes spk0 { 0% { opacity: 0; } 6% { opacity: 1; } 36%, 100% { opacity: 0; } }
@keyframes spk1 { 0% { opacity: 0; } 12% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes spk2 { 0% { opacity: 0; } 18% { opacity: 1; } 24%, 100% { opacity: 0; } }

/* the "coming soon" badge: a light band crosses it now and then */
.hero--home .soon { position: relative; overflow: hidden; isolation: isolate; }
.hero--home .soon::before {
  content: ""; position: absolute; z-index: -1; left: 0; top: 3px; bottom: 5px; width: 100%;
  background: linear-gradient(90deg, #fff7c4 0 10px, transparent 10px) no-repeat;
  transform: translateX(-30px);
  animation: badge 6s steps(24) infinite 2.4s;
}
@keyframes badge { 0% { transform: translateX(-30px); } 18%, 100% { transform: translateX(calc(100% + 30px)); } }

/* the yard */
.tree-s {
  width: calc(34 * var(--p)); height: calc(46 * var(--p));
  left: calc(3% - var(--p)); bottom: calc(6 * var(--p));
  --img: url("/assets/img/scene/tree.png"); --f: 4; --t: 3.6s;
}
.tuft {
  position: absolute; z-index: 0; pointer-events: none;
  width: calc(18 * var(--p)); height: calc(15 * var(--p));
  --img: url("/assets/img/scene/tuft.png"); --f: 4; --t: 2.8s;
}
.tuft--flower-w { --img: url("/assets/img/scene/flower-w.png"); width: calc(17 * var(--p)); height: calc(11 * var(--p)); }
.tuft--flower-p { --img: url("/assets/img/scene/flower-p.png"); width: calc(17 * var(--p)); height: calc(13 * var(--p)); }
.smoke {
  position: absolute; z-index: 1; pointer-events: none;
  right: calc(3% + 44 * var(--p)); bottom: calc(85 * var(--p));
  width: calc(24 * var(--p)); height: calc(38 * var(--p));
  --img: url("/assets/img/scene/smoke.png"); --f: 9; --t: 2.2s; opacity: .85;
}
.hero--home .house { z-index: 2; }
.hero--home .mailbox { z-index: 3; }

/* the dog walks the yard and the avatar works out in one spot. site.js moves the dog with a transform; without it they
   stand still. They face left with "scale", so the hop's transform still works. */
.walker { position: absolute; display: block; z-index: 4; cursor: pointer; }
.walker .spr { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 100%; }
.walker .spr::before { animation: none; }
.walker.left .spr { scale: -1 1; }
.pup { width: calc(17 * var(--p)); height: calc(12 * var(--p)); left: calc(3% + 38 * var(--p)); bottom: calc(8 * var(--p)); z-index: 5; }
.pup .spr { --img: url("/assets/img/scene/dog-walk.png"); --f: 4; }
.pup.walk .spr::before { animation: sx .5s steps(4) infinite; }
.pup.sit .spr { --img: url("/assets/img/scene/dog-sit.png"); }
.pup.sit .spr::before { animation: sitdown .3s steps(2) forwards, wag .7s steps(2) infinite .3s; }
@keyframes sitdown { from { transform: none; } to { transform: translateX(-50%); } }
@keyframes wag { from { transform: translateX(-50%); } to { transform: translateX(-100%); } }
.gnome { width: calc(48 * var(--p)); height: calc(48 * var(--p)); left: calc(3% + 46 * var(--p)); bottom: calc(4 * var(--p)); }
.gnome .spr { --img: url("/assets/img/scene/hero-jacks.png?v=648bb00"); --f: 2; }
.gnome.jacks .spr::before { animation: sxj .8s steps(2) infinite; }
.gnome.squat .spr { --img: url("/assets/img/scene/hero-squat.png?v=b5d6456"); }
.gnome.squat .spr::before { animation: sx 1.6s steps(2) infinite; }
.gnome.rope .spr { --img: url("/assets/img/scene/hero-rope.png?v=a4d9d4a"); --f: 16; }
.gnome.rope .spr::before { animation: sxr .8s steps(16) infinite; }
.gnome.cheer .spr { --img: url("/assets/img/scene/hero-cheer.png"); }
.gnome.lift .spr { --img: url("/assets/img/scene/hero-lift-cheer.png?v=b5d6456"); }
.gnome.cheer .spr::before, .gnome.lift .spr::before { animation: sxc .29s steps(2) infinite; }
@media (min-width: 900px) { .pup { left: calc(22% + 54 * var(--p)); } .gnome { left: calc(30% + 40 * var(--p)); } }

/* a butterfly. It flies behind the house, so it never sits on the wall. */
.fly {
  position: absolute; z-index: 1; pointer-events: none;
  width: calc(9 * var(--p)); height: calc(9 * var(--p));
  --img: url("/assets/img/scene/fly-a.png"); --f: 7; --t: .6s;
  animation: flutter 19s ease-in-out infinite alternate;
}
.fly--a { left: 14%; bottom: calc(20 * var(--p)); }
@keyframes flutter {
  0% { transform: translate(0, 0); }
  20% { transform: translate(calc(14 * var(--p)), calc(-10 * var(--p))); }
  40% { transform: translate(calc(30 * var(--p)), calc(-3 * var(--p))); }
  60% { transform: translate(calc(22 * var(--p)), calc(-18 * var(--p))); }
  80% { transform: translate(calc(44 * var(--p)), calc(-8 * var(--p))); }
  100% { transform: translate(calc(58 * var(--p)), calc(-14 * var(--p))); }
}

/* tap or hover: a hop with a squash. A tap shows a small heart. */
.tap { cursor: pointer; }
.hop { transform-origin: 50% 100%; animation: hop .42s linear; }
/* up with ease-out, down with ease-in, a small squash on the land: sub-pixel, no steps */
@keyframes hop {
  0% { transform: translateY(0) scale(1, 1); animation-timing-function: cubic-bezier(.2, .7, .35, 1); }
  46% { transform: translateY(calc(-8 * var(--hp))) scale(.97, 1.03); animation-timing-function: cubic-bezier(.6, 0, .9, .45); }
  78% { transform: translateY(0) scale(1.1, .9); animation-timing-function: cubic-bezier(.3, .6, .4, 1); }
  100% { transform: translateY(0) scale(1, 1); }
}
.heartpop {
  position: absolute; z-index: 9; pointer-events: none;
  width: calc(14 * var(--hp)); height: calc(12 * var(--hp));
  background: url("/assets/img/scene/heart.png?v=b5d6456") 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated;
  animation: rise .8s cubic-bezier(.2, .8, .3, 1) forwards, fade .8s linear forwards;
}
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(calc(-12 * var(--hp))); } }
@keyframes fade { 0%, 50% { opacity: 1; } 100% { opacity: 0; } }

/* ── home: the gym ───────────────────────────────────────────────────────────
   Six owned stations (Modern Gym Environment Kit by Maru, Hall Pass, LimeZu, as the app cuts them),
   64 x 72 art px each, with an avatar strip on top. --gp is the gym's art pixel. */
.band--gym { padding-top: 8px; }
.gymwrap { display: grid; gap: 22px; justify-items: center; text-align: center; }
.gym__copy { display: grid; justify-items: center; }
.gym__copy .plaque { margin-bottom: 0; position: relative; z-index: 1; }
.gym__plate {
  max-width: 34em; margin-top: -3px; padding: 16px 18px 18px;
  background: var(--ink-deep); color: var(--cream);
  border: 3px solid #000; box-shadow: inset 0 3px 0 var(--night), 5px 5px 0 var(--ink);
}
.gym__lede { margin: 0 0 10px; font-size: 17px; line-height: 1.5; }
@media (min-width: 600px) { .gym__lede { font-size: 18px; } .gym__plate { padding: 18px 26px 20px; } }
.gym__tip { margin: 0; font-family: var(--jersey); font-size: 24px; line-height: 1; text-transform: uppercase; color: var(--gold); }
.gym {
  --gp: 2px; --hp: var(--gp);
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, calc(64 * var(--gp)));
  row-gap: calc(2 * var(--gp));
  background: #07081a; border: 3px solid #07081a;
  box-shadow: 6px 6px 0 rgba(27, 31, 59, .85);
}
@media (min-width: 390px) {
  .gym { grid-template-columns: repeat(3, calc(64 * var(--gp))); margin: 0 calc(-1 * var(--gutter)); box-shadow: none; }
}
@media (min-width: 640px) { .gym { --gp: 3px; margin: 0; box-shadow: 6px 6px 0 rgba(27, 31, 59, .85); } }
@media (min-width: 1200px) { .gym { --gp: 4px; } }
.st { position: relative; width: calc(64 * var(--gp)); height: calc(72 * var(--gp)); overflow: hidden; }
.st__bg, .st > span { position: absolute; display: block; image-rendering: pixelated; }
.st__bg { inset: 0; background: 0 0 / 100% 100% no-repeat; }
.st--tread .st__bg { background-image: url("/assets/img/scene/gym-1.png"); }
.st--squat .st__bg { background-image: url("/assets/img/scene/gym-2.png"); }
.st--bag .st__bg { background-image: url("/assets/img/scene/gym-3.png"); }
.st--rope .st__bg { background-image: url("/assets/img/scene/gym-4.png"); }
.st--jacks .st__bg { background-image: url("/assets/img/scene/gym-5.png"); }
.st--jump .st__bg { background-image: url("/assets/img/scene/gym-6.png?v=648bb00"); }
.clock, .cooler { left: calc(var(--x) * var(--gp)); top: calc(var(--y) * var(--gp)); }
.clock { width: calc(16 * var(--gp)); height: calc(16 * var(--gp)); --img: url("/assets/img/scene/clock.png"); --f: 8; --t: 8s; }
.cooler { width: calc(16 * var(--gp)); height: calc(32 * var(--gp)); --img: url("/assets/img/scene/cooler.png"); --f: 4; --t: 2.4s; }
.gg {
  left: calc(var(--x) * var(--gp)); top: calc(var(--y) * var(--gp));
  width: calc(48 * var(--gp)); height: calc(48 * var(--gp));
  --d: calc(var(--n) * -.37s);
}
.gg--tread { --img: url("/assets/img/scene/g-tread.png"); --f: 4; --t: .5s; }
.gg--squat { --img: url("/assets/img/scene/g-squat.png?v=648bb00"); --f: 2; --t: 1.6s; }
.gg--bag { --img: url("/assets/img/scene/g-bag.png?v=fe3a436"); --f: 8; --t: .8s; }
.gg--rope { --img: url("/assets/img/scene/g-rope.png?v=222be5a"); --f: 16; --t: .8s; }
.gg--jacks { --img: url("/assets/img/scene/g-jacks.png?v=648bb00"); --f: 2; --t: .8s; }
.gg--jump { --img: url("/assets/img/scene/g-jump.png?v=fe3a436"); --f: 8; --t: 1.6s; }
.gg.cheer { --f: 2; --t: .29s; }
.gg.cheer::before { animation: sxc .29s steps(2) infinite; }
.gg--tread.cheer { --img: url("/assets/img/scene/g-tread-cheer.png"); }
.gg--squat.cheer { --img: url("/assets/img/scene/g-squat-cheer.png?v=b5d6456"); }
.gg--bag.cheer { --img: url("/assets/img/scene/g-bag-cheer.png?v=fe3a436"); }
.gg--rope.cheer { --img: url("/assets/img/scene/g-rope-cheer.png?v=648bb00"); }
.gg--jacks.cheer { --img: url("/assets/img/scene/g-jacks-cheer.png?v=648bb00"); }
.gg--jump.cheer { --img: url("/assets/img/scene/g-jump-cheer.png?v=fe3a436"); }

/* ── reveals as you scroll (site.js adds .in; with no script, all shows at once) ── */
.js .rv, .js .rv-kids > li { transition: opacity .55s ease-out, translate .55s cubic-bezier(.2, .9, .25, 1.15); }
.js .rv:not(.in) { opacity: 0; translate: 0 calc(10 * var(--p)); }
.js .rv-kids:not(.in) > li { opacity: 0; translate: 0 calc(24 * var(--p)); }
.js .rv-kids > li:nth-child(2) { transition-delay: .09s; }
.js .rv-kids > li:nth-child(3) { transition-delay: .18s; }
.js .rv-kids > li:nth-child(4) { transition-delay: .27s; }
.js .gym.rv .st { transition: opacity .4s ease-out, translate .4s cubic-bezier(.2, .9, .25, 1.15); transition-delay: calc(var(--n) * 70ms); }
.js .gym.rv:not(.in) { opacity: 1; translate: none; }
.js .gym.rv:not(.in) .st { opacity: 0; translate: 0 calc(6 * var(--gp)); }

/* Calm motion: the scene stands still, everything shows at once. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero--home .cloud { left: var(--cx); }
  .gull { display: none; }
  .js .rv:not(.in), .js .rv-kids:not(.in) > li, .js .gym.rv:not(.in) .st { opacity: 1; translate: none; }
}
