/* Meowlennialz: warm cream ground, ink, and pink only for the gum. Unbounded speaks, Rubik reads.
   The page is cat furniture: shelves the cats walk along, and bars at the screen's edges they hang from. */
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/assets/fonts/unbounded-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Rubik"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/rubik-latin.woff2) format("woff2");
}

:root {
  --ink: #1A1426;
  --cream: #FFF4E4;
  --gum: #FF3D7F;
  --bg: var(--cream);
  --fg: var(--ink);
  --soft: #675B66;      /* secondary text, ink thinned toward cream: 5.9:1 on cream */
  --line: #E6D8C4;      /* separators inside lists */
  --tint: #F8EBD7;      /* a quiet field on the cream */
  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 3.4vw, 52px);
  --wide: 1440px;
  --section: clamp(84px, 10vw, 152px);
  --shelf: 6px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
/* Ink regions: the reveal, the test band, the footer. */
.ink {
  --bg: var(--ink); --fg: var(--cream); --soft: #CBBDB4; --line: #3B3149; --tint: #241C33;
  background: var(--bg); color: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--cream); caret-color: var(--gum);
}
body {
  margin: 0; min-height: 100svh;
  background: var(--bg); color: var(--fg);
  font: 400 clamp(16px, .2vw + 15.2px, 18px)/1.6 var(--text);
  font-synthesis: none;
  overflow-x: clip;
}
/* A whisper of grain, so the flat fields feel printed rather than rendered. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.4 -0.3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0; }
a {
  color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color .2s;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gum); color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 1em; height: 1em; flex: none; transition: transform .35s var(--ease); }

/* ---------- Type roles ---------- */
.display { margin: 0; font: 800 clamp(44px, 7.2vw, 6rem)/.95 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.h2 { margin: 0; font: 700 clamp(30px, 4vw, 3.5rem)/1.02 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.h3 { margin: 0; font: 700 clamp(19px, 1.7vw, 24px)/1.15 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.lead { margin: 0; max-width: 21ch; font: 700 clamp(28px, 3.9vw, 3.6rem)/1.08 var(--display); letter-spacing: -.032em; text-wrap: balance; }
.sub { max-width: 46ch; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.5; color: var(--soft); text-wrap: pretty; }
.meta { font-weight: 500; font-size: 15px; line-height: 1.4; color: var(--soft); }
.prose p { max-width: 65ch; margin-bottom: 1em; text-wrap: pretty; }
.prose h2 { margin: 2.2em 0 .5em; font: 700 clamp(20px, 2vw, 26px)/1.15 var(--display); letter-spacing: -.02em; }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line);
}
.home .top { position: absolute; inset: 0 0 auto 0; background: none; border: 0; }
.brand { display: block; padding: 6px 0; }
.brand .full { width: clamp(160px, 14vw, 200px); height: auto; aspect-ratio: 5946.7 / 1748.8; }
.brand .mark { display: none; width: 42px; height: 42px; }
.home .brand { visibility: hidden; }
.menu { display: flex; align-items: center; gap: clamp(2px, 1.2vw, 16px); }
.menu a {
  position: relative; padding: 14px 10px; font: 600 14px/1 var(--display); letter-spacing: -.005em; text-decoration: none;
}
.menu a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.menu a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--gum);
}
@media (max-width: 560px) {
  .brand .full { display: none; }
  .brand .mark { display: block; }
  .menu a { padding: 14px 8px; font-size: 13px; }
}

/* ---------- Page frame ---------- */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding-top: var(--section); }
.page-head { position: relative; padding-top: clamp(96px, 9vw, 136px); }
.page-head .sub { margin-top: clamp(16px, 2vw, 24px); }
.head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.head .sub { grid-column: 1 / -1; }
.more { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1.2 var(--display); text-decoration: none; }
.more:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.more:hover .ic.to { transform: translateX(3px); }
.more:hover .ic.out { transform: translate(2px, -2px); }

/* A shelf: an ink plank on two brackets. Cats walk along it (.stroll inside). */
.shelf { position: relative; width: min(100%, 780px); height: var(--shelf); margin: 0 0 clamp(30px, 3.4vw, 46px); background: var(--ink); border-radius: 3px; }
.shelf.r { margin-left: auto; }
.shelf.full { width: 100%; }
.shelf::before, .shelf::after { content: ""; position: absolute; top: calc(var(--shelf) - 1px); width: 12px; height: 16px; background: var(--ink); }
.shelf::before { left: 22px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.shelf::after { right: 22px; clip-path: polygon(0 0, 100% 0, 100% 100%); }

/* Buttons: an ink slab with rounded corners like the wordmark's letters; the arrow moves, nothing jumps. */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 22px; border-radius: 14px;
  background: var(--fg); color: var(--bg); text-decoration: none;
  font: 600 15px/1 var(--display); letter-spacing: -.01em;
  transition: background-color .2s, color .2s;
}
.btn .ic { width: 18px; height: 18px; }
.btn:hover .ic.to { transform: translateX(4px); }
.btn:hover .ic.out { transform: translate(3px, -3px); }
.btn.line { background: none; color: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
.btn.line:hover { background: var(--fg); color: var(--bg); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Facts as a list */
.spec { position: relative; margin: 0; border-top: 1px solid var(--line); }
.spec > div:not(.stroll) { display: grid; grid-template-columns: minmax(7.5em, 32%) 1fr; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--soft); font-weight: 500; }
.spec dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .spec > div:not(.stroll) { grid-template-columns: 1fr; } }

/* The way around: big words, an arrow that leans in */
.index { position: relative; margin: 0; padding: 0; list-style: none; }
.index a {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px clamp(14px, 2vw, 28px);
  padding: clamp(18px, 2.2vw, 28px) 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.index .t { font: 800 clamp(36px, 6.2vw, 5.6rem)/1 var(--display); letter-spacing: -.035em; transition: transform .5s var(--ease); }
.index .d { color: var(--soft); font-weight: 500; }
.index .ic { width: clamp(26px, 3vw, 42px); height: clamp(26px, 3vw, 42px); }
.index a:hover .t { transform: translateX(.1em); }
.index a:hover .ic { transform: translateX(8px); }
@media (max-width: 720px) { .index .d { display: none; } }

/* Footer: an ink field, the full name in cream with its pink O */
.foot { position: relative; margin-top: var(--section); padding: clamp(60px, 7vw, 104px) var(--gutter) 28px; }
.foot > .stroll { top: 0; }
.foot .say { display: grid; gap: 16px; justify-items: start; padding-bottom: clamp(52px, 6vw, 88px); }
.foot .mail { font: 700 clamp(18px, 5vw, 4.6rem)/1.02 var(--display); letter-spacing: -.035em; text-decoration: none; overflow-wrap: anywhere; }
.foot .mail:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.foot .name { width: 100%; height: auto; aspect-ratio: 2183.3 / 268; }
.foot .fine {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  margin-top: clamp(28px, 3vw, 40px); padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--soft);
}
.foot .fine nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot .fine a { text-decoration: none; }
.foot .fine a:hover { color: var(--fg); text-decoration: underline; }
.inline-ic { display: inline-flex; align-items: center; gap: 6px; }
.inline-ic .ic { width: .85em; height: .85em; }

/* ---------- Home: blow the gum ---------- */
.blow { position: relative; }
.stage { position: relative; }
.panel { position: relative; min-height: 100svh; }

.hero { display: grid; grid-template-rows: auto 1fr auto auto; padding: 74px var(--gutter) 20px; min-height: 100svh; }
.hud { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.hud .meta { color: var(--fg); }
.hud .soft { color: var(--soft); }
.hud a { text-decoration: none; }
.hud a:hover { text-decoration: underline; }
.cat-box { display: grid; place-items: center; min-height: 0; padding: 8px 0 clamp(14px, 2.4vw, 30px); }
.cat { width: min(64svh, 70vw, 640px); height: auto; aspect-ratio: 1; }
.hero .name { position: relative; margin: 0; }
.hero .name > svg { width: 100%; height: auto; aspect-ratio: 2183.3 / 268; }
.hero .name .stroll { top: 11.6%; }
.hero .hud.bottom { padding-top: clamp(14px, 2vw, 22px); }
.blow-cue { display: inline-flex; align-items: center; gap: 10px; }
.blow-cue .ball { width: 10px; height: 10px; border-radius: 50%; background: var(--gum); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.8); } }

.gum-panel { display: grid; align-content: end; padding: 0 var(--gutter) clamp(32px, 7vh, 72px); background: var(--gum); color: var(--ink); }
.statement { margin: 0; max-width: 12ch; font: 800 clamp(46px, 9vw, 6rem)/.94 var(--display); letter-spacing: -.04em; text-wrap: balance; }

/* The pop lands on Goal Kuchick's gameplay: the video in an ink frame (a cat lies on it), a line, and a small card out. */
.reveal { display: grid; place-items: center; padding: clamp(84px, 12vh, 120px) var(--gutter) clamp(28px, 5vh, 56px); background: var(--bg); }
.show { display: grid; grid-template-columns: auto minmax(0, 30rem); align-items: center; justify-content: center; gap: clamp(28px, 5vw, 88px); }
.game-show { padding-top: clamp(40px, 5vw, 64px); }
.frame { position: relative; height: min(72svh, 760px); aspect-ratio: 9 / 16; border-radius: 22px; background: var(--ink); box-shadow: 0 0 0 var(--shelf) var(--ink), 0 24px 60px -24px rgba(26, 20, 38, .55); }
.frame video { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; background: var(--ink); }
.show-copy { display: grid; gap: clamp(16px, 2vw, 24px); justify-items: start; }
.gk-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 18px 12px 12px;
  border-radius: 18px; background: var(--tint); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow .2s;
}
.gk-card img { width: 52px; height: 52px; border-radius: 13px; }
.gk-card strong { display: block; font: 700 17px/1.2 var(--display); letter-spacing: -.01em; }
.gk-card .ic { width: 20px; height: 20px; }
.gk-card:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.gk-card:hover .ic { transform: translate(3px, -3px); }
@media (max-width: 720px) {
  .reveal { padding-top: clamp(70px, 9vh, 96px); }
  .show { grid-template-columns: 1fr; justify-items: center; gap: 22px; }
  .frame { height: min(50svh, 440px); }
  .show-copy { justify-items: center; text-align: center; }
  .show-copy .display { font-size: clamp(34px, 9vw, 44px); }
}

/* With script and motion: the stage pins and the three panels play one after another. */
.js-blow .blow { height: 260svh; }
.js-blow .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.js-blow .panel { position: absolute; inset: 0; min-height: 0; }
.js-blow .gum-panel { background: none; }
.js-blow .statement { opacity: 0; transform: translateY(30px); }
.js-blow .reveal { visibility: hidden; }
.js-blow .stage.covered .hero { visibility: hidden; }
.js-blow .stage.popped .reveal { visibility: visible; }
.js-blow .stage.popped .gum-panel { visibility: hidden; }
.gum-svg { display: none; }
.js-blow .gum-svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.shards { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.shards i { position: absolute; left: 0; top: 0; background: var(--gum); box-shadow: inset 0 0 0 3px var(--ink); opacity: 0; border-radius: 46% 54% 38% 62% / 55% 40% 60% 45%; }
.shards b { position: absolute; left: 50%; top: 44%; translate: -50% -50%; font: 900 clamp(64px, 13vw, 168px)/1 var(--display); letter-spacing: -.05em; color: var(--cream); -webkit-text-stroke: clamp(5px, .9vw, 10px) var(--ink); paint-order: stroke fill; opacity: 0; white-space: nowrap; }
.stage.popped .shards i { animation: shard .75s cubic-bezier(.15, .7, .25, 1) forwards; }
.stage.popped .shards b { animation: popword .7s var(--ease) forwards; }
@keyframes shard {
  0% { opacity: 1; transform: translate(var(--x0), var(--y0)) rotate(0) scale(1); }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(var(--r)) scale(.2); }
}
@keyframes popword { 0% { opacity: 1; transform: scale(.4) rotate(-10deg); } 30% { opacity: 1; transform: scale(1.08) rotate(-5deg); } 65% { opacity: 1; } 100% { opacity: 0; transform: scale(1.18) rotate(-5deg); } }

/* ---------- Inner pages ---------- */
.split { display: grid; gap: clamp(28px, 5vw, 80px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }

/* An ink band that owns its whole width */
.band { position: relative; margin-top: var(--section); padding: clamp(64px, 8vw, 120px) 0; }
.platforms { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.platform { display: grid; gap: 6px; padding: 24px; border-radius: 18px; background: var(--tint); }
.platform .state { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); font-weight: 500; }
.platform .state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; }

/* Press */
.downloads { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.downloads a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; padding: clamp(18px, 2.2vw, 26px) 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.downloads .t { font: 700 clamp(22px, 3vw, 2.6rem)/1.05 var(--display); letter-spacing: -.03em; }
.downloads .d { grid-column: 1; color: var(--soft); font-variant-numeric: tabular-nums; }
.downloads .go { grid-row: 1 / span 2; grid-column: 2; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--cream); }
.downloads .go .ic { width: 22px; height: 22px; }
.downloads a:hover .go .ic { transform: translateY(3px); }

.logos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.logo-tile { border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: var(--tint); }
.logo-tile .grounds { display: grid; grid-template-columns: 1fr 1fr; min-height: 200px; }
.logo-tile .g { display: grid; place-items: center; padding: 24px; }
.logo-tile .g.light { background: var(--cream); --fg: var(--ink); }
.logo-tile .g.dark { background: var(--ink); --fg: var(--cream); }
.logo-tile svg { width: 100%; height: auto; }
.logo-tile .files { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 14px 16px; }
.logo-tile .files strong { font: 700 15px/1 var(--display); }
.logo-tile .files nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; font-weight: 500; }

.swatches { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.swatch { display: grid; align-content: space-between; gap: 22px; min-height: 230px; padding: 22px; border-radius: 18px; text-align: left; }
.swatch .nm { font: 700 clamp(22px, 2.2vw, 30px)/1 var(--display); letter-spacing: -.02em; }
.swatch .val { line-height: 1.5; font-variant-numeric: tabular-nums; }
.swatch .copy { font-weight: 600; opacity: .75; }
.swatch:hover .copy { opacity: 1; text-decoration: underline; }
.swatch.ink { background: var(--ink); color: var(--cream); }
.swatch.cream { background: var(--cream); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.swatch.gum { background: var(--gum); color: var(--ink); }

.rules { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: 18px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rules .ic { width: 15px; height: 15px; margin-top: .3em; }

/* Contact */
.big-mail { display: inline-block; font: 800 clamp(30px, 6.4vw, 6rem)/.98 var(--display); letter-spacing: -.04em; text-decoration: none; overflow-wrap: anywhere; }
.big-mail:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 10px; }
.copy-btn { padding: 12px 16px; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--fg); font: 600 14px/1 var(--display); }
.copy-btn:hover { background: var(--fg); color: var(--bg); }
.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 95; translate: -50% 0; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--cream);
  font: 600 14px/1 var(--display); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .3s var(--ease); pointer-events: none;
}
.toast.on { opacity: 1; transform: none; }

/* 404 */
.lost { min-height: 74svh; display: grid; place-items: center; align-content: center; text-align: center; gap: 22px; padding: 40px var(--gutter); }
.lost .cat { width: min(40svh, 60vw); }
.lost-floor { position: relative; width: min(560px, 86vw); height: var(--shelf); margin-top: clamp(88px, 9vw, 112px); background: var(--ink); border-radius: 3px; }

@media (max-width: 720px) {
  .hide-s { display: none; }
}
@media (max-width: 720px) and (orientation: portrait) { .cat { width: min(84vw, 56svh); } }

/* ---------- The millennial cats (assets/js/cats.js, painted by tools/build_cats.py) ---------- */
.stroll { position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; z-index: 3; }
.sit { position: absolute; top: 0; width: 0; height: 0; z-index: 4; pointer-events: none; }
.meow { position: absolute; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; user-select: none; }
.meow img { display: block; height: 100%; width: auto; max-width: none; -webkit-user-drag: none; }
.meow .flip { height: 100%; }

.walker { --h: clamp(84px, 7.6vw, 118px); left: 0; bottom: 0; height: var(--h); width: calc(var(--h) * var(--ratio)); }
.walker .flip { transition: transform .25s var(--ease); }
.walker.left .flip { transform: scaleX(-1); }
.walker img { transform-origin: 50% 100%; }
.walker.walking img { animation: waddle .46s linear infinite; }

.sitter { --h: clamp(96px, 8.6vw, 136px); left: 0; top: 0; height: var(--h); width: calc(var(--h) * var(--ratio)); translate: -50% calc(var(--line) * -100%); }
.sitter.hoodie { --h: clamp(84px, 7.4vw, 118px); }
.sitter img { transform-origin: 50% calc(var(--line) * 100%); animation: breathe 3.6s ease-in-out infinite; }

/* A bar out of the left or right edge with its bracket at the wall; the cat's paws hold it. */
.perch { --hh: clamp(88px, 9vw, 134px); position: absolute; top: calc(var(--hh) * .1 + 12px); height: 0; width: calc(var(--hh) * 1.2); z-index: 3; pointer-events: none; }
.perch::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--shelf) / -2); height: var(--shelf); background: var(--ink); }
.perch::after { content: ""; position: absolute; top: calc(var(--shelf) / 2 - 1px); width: 12px; height: 16px; background: var(--ink); }
.perch.r { right: 0; }
.perch.r::before { border-radius: 3px 0 0 3px; }
.perch.r::after { right: 12px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.perch.l { left: 0; }
.perch.l::before { border-radius: 0 3px 3px 0; }
.perch.l::after { left: 12px; clip-path: polygon(0 0, 100% 0, 0 100%); }
main.wrap .perch.r { right: calc(var(--gutter) * -1); }
main.wrap .perch.l { left: calc(var(--gutter) * -1); }
.hanger { top: 0; height: var(--hh); width: calc(var(--hh) * var(--ratio)); translate: 0 calc(var(--line) * -100%); }
.perch.r .hanger { left: 10%; }
.perch.l .hanger { right: 10%; }
.hanger img { transform-origin: 50% calc(var(--line) * 100%); animation: sway 2.8s ease-in-out infinite alternate; }

.meow.hop .flip { animation: hop .46s linear; }
.meow:not(.awake), .meow:not(.awake) * { animation-play-state: paused !important; }   /* loops rest while off screen */
.meow .says {
  position: absolute; left: 50%; bottom: 100%; margin-bottom: 4px; padding: 6px 10px; translate: -50% 0; z-index: 2;
  background: var(--ink); color: var(--cream); border-radius: 12px;
  font: 700 12px/1 var(--display); white-space: nowrap;
  opacity: 0; transform: translateY(6px) scale(.85); transition: opacity .15s, transform .3s var(--ease); pointer-events: none;
}
.meow.talking .says { opacity: 1; transform: none; }
.hanger .says { bottom: auto; top: 30%; left: 100%; translate: 6px 0; }
.perch.r .hanger .says { left: auto; right: 100%; translate: -6px 0; }

@keyframes waddle {
  0%, 100% { transform: translateY(0) rotate(-2.5deg); }
  25% { transform: translateY(-5%) rotate(0deg); }
  50% { transform: translateY(0) rotate(2.5deg); }
  75% { transform: translateY(-5%) rotate(0deg); }
}
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012, 1.03); } }
@keyframes sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
/* a real jump: up decelerating, down accelerating */
@keyframes hop {
  0% { translate: 0 0; animation-timing-function: cubic-bezier(.2, .6, .35, 1); }
  45% { translate: 0 -12px; animation-timing-function: cubic-bezier(.55, 0, .8, .4); }
  100% { translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01s !important; }
  .meow, .meow *, .blow-cue .ball { animation: none !important; }
}
