:root {
  --cream: #FFF6EC;
  --cream-deep: #FCE9D6;
  --coral: #FF7A5C;
  --coral-deep: #E85F42;
  --blush: #FFD6CB;
  --butter: #FFE7A8;
  --ink: #3B2418;
  --ink-soft: #6E5444;
  --milk: #FFFFFF;
  --font: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --i: 0; /* purr intensity, 0..1, set by pet.js */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
}
html { overflow-x: clip; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
h1, h2, h3 { font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fine { font-size: .9rem; color: var(--ink-soft); }

/* Pointer-specific hints */
.hint-touch { display: none; }
@media (hover: none) { .hint-mouse { display: none; } .hint-touch { display: inline; } }
/* On touch screens a vertical swipe still scrolls the page; side-to-side strokes pet the cat. */
@media (pointer: coarse) { .hero .crowd { touch-action: pan-y; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font: 600 1.15rem/1 var(--font);
  color: var(--milk); background: var(--coral);
  border: 0; border-radius: 999px; padding: 1rem 1.6rem;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--coral-deep);
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 6px 0 var(--coral-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--coral-deep); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: var(--milk); color: var(--ink); box-shadow: 0 4px 0 var(--blush); }
.btn-ghost:hover { box-shadow: 0 6px 0 var(--blush); }

/* Header */
.top {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px max(16px, 4vw);
}
.brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: 1.3rem; text-decoration: none; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.top-cta { font-weight: 600; text-decoration: none; padding: .55rem 1rem; border-radius: 999px; background: var(--milk); box-shadow: 0 3px 0 var(--blush); }
.top-cta:hover { background: var(--blush); }

/* ---------- 1. Hero ---------- */
/* Desktop: the words on the left, the cats on the right, both centred in the first screen. */
.hero {
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-content: center;
  column-gap: clamp(32px, 5vw, 80px);
  text-align: left;
  padding: 84px max(24px, 4vw) 32px;
  max-width: 1280px; margin: 0 auto;
}
/* Two lines, "Your cat," / "on your Mac.", each letter its own span so the headline purrs too. */
.petme {
  font-size: clamp(3rem, 6.4vw, 6.25rem);
  font-weight: 700; line-height: .95; letter-spacing: -0.03em;
  white-space: nowrap; margin-bottom: 1.4rem;
}
.petme .ln { display: block; }
.petme .ln > span { display: inline-block; transform-origin: 50% 90%; }
.petme .sp { width: .22em; }
.purring .petme .ln > span:not(.sp) { animation: shiver .09s linear infinite; }
.purring .petme .ln > span:nth-child(2n) { animation-direction: reverse; animation-duration: .11s; }
@keyframes shiver {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(calc(var(--i) * 2.4px), calc(var(--i) * -1.6px)) rotate(calc(var(--i) * 2deg)); }
  50% { transform: translate(0, calc(var(--i) * 1.8px)); }
  75% { transform: translate(calc(var(--i) * -2.4px), 0) rotate(calc(var(--i) * -2deg)); }
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem; padding: .36rem .85rem .36rem .7rem;
  background: #ECE7F8; color: #55477F; border-radius: 999px; font-weight: 600; font-size: 1rem;
}
.eyebrow span { width: .58rem; height: .58rem; border-radius: 50%; background: #9C8FD3; animation: eyebrow-breathe 3.75s ease-in-out infinite; }
@keyframes eyebrow-breathe { 0%, 100% { box-shadow: 0 0 0 1px rgba(156,143,211,.25); } 50% { box-shadow: 0 0 0 7px rgba(156,143,211,.16); } }
.lede { font-size: clamp(1.2rem, 2vw, 1.5rem); max-width: 34ch; margin-bottom: 1.8rem; color: var(--ink); }
.soon { margin-top: 1rem; font-size: .95rem; color: var(--ink-soft); text-wrap: balance; }

.hero-stage { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; --kw: min(136px, calc((50vw - 96px) / 4.3)); /* one cat's width */ }
/* The crowd: eight equal cats on two shelves of four. Each sticker's own ledge stroke sits
   on the shelf line (--c = the ledge's height in the image); short segments drawn over each
   sticker's edges bridge the white sticker borders so the shelf reads as one continuous line. */
.crowd {
  --shelf: #3E2119;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 20px;
  min-width: calc(var(--kw) * 4 + 80px); /* the belts' width, so nothing moves when the wall arrives */
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.crowd:active { cursor: grabbing; }
.shelf { display: flex; align-items: flex-end; }
.glow {
  position: absolute; inset: -20% 15% 0; border-radius: 50%; z-index: 0;
  background: radial-gradient(ellipse, rgba(255,122,92,.4), rgba(255,122,92,0) 66%);
  opacity: calc(.2 + var(--i) * .8); transform: scale(calc(.85 + var(--i) * .25));
  transition: opacity .3s, transform .3s; pointer-events: none;
}
.kitty {
  position: relative; z-index: 1; width: var(--kw); flex: none;
  transform: translate(var(--jx, 0px), calc((1 - var(--c)) * 100% + var(--jy, 0px))) scale(var(--s, 1));
  transform-origin: 50% 100%;
}
.kitty::before { content: ""; display: block; padding-top: var(--ar, 100%); }
.kitty::after {
  content: ""; position: absolute; left: -1px; right: -1px; top: calc(var(--c) * 100%);
  height: calc(var(--kw) * .0175); transform: translateY(-50%); pointer-events: none;
  background: linear-gradient(to right, var(--shelf) 0 14%, transparent 14% 86%, var(--shelf) 86% 100%);
}
.k-pepper { --c: .8962; } .k-siam { --c: .8760; } .k-calico { --c: .8860; } .k-cream { --c: .8835; }
.k-tabby { --c: .9038; } .k-tiger { --c: .9020; } .k-smokey { --c: .9040; } .k-mochi { --c: .8878; }
.kitty .f { position: absolute; inset: 0; opacity: 0; transition: opacity .16s ease; }
.kitty .f.on { opacity: 1; }
.kitty img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(59,36,24,.16)); pointer-events: none; }
/* Shared cats (from the app): with 4 or more, the shelf becomes a slow conveyor belt (pet.js
   builds it). The track holds every cat twice and slides by half, so it loops without a seam.
   It rests off screen, under the mouse and under a finger, so anyone can stop and pet. */
.belt {
  --fade: 40px;
  position: relative; z-index: 1;
  width: calc(var(--kw) * 4 + var(--fade) * 2);
  overflow: hidden;
  /* room for the purr's swell above, and below the shelf for the stickers' feet and name tags */
  padding: 14px 0 calc(var(--kw) * .18 + 30px);
  margin: -14px 0 calc(var(--kw) * -.18);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}
.track {
  display: flex; align-items: flex-end; width: max-content;
  animation: belt var(--dur, 60s) linear var(--delay, 0s) infinite;
}
.belt + .belt .track { animation-direction: reverse; }
@keyframes belt { to { transform: translateX(-50%); } }
.crowd.still .track, .crowd.held .track { animation-play-state: paused; }
@media (hover: hover) { .crowd:hover .track { animation-play-state: paused; } }
.k-wall { --c: .9; }
.k-wall img.f { inset: auto; left: var(--ix, 0); top: var(--iy, 0); width: var(--iw, 100%); height: var(--ih, 100%); max-width: none; object-fit: fill; }
.tag {
  position: absolute; left: 50%; top: 100%; z-index: 2;
  transform: translate(-50%, 3px) rotate(-2deg);
  max-width: calc(var(--kw) * 1.05); padding: .05rem .55rem;
  font: 600 clamp(.72rem, calc(var(--kw) * .1), .88rem)/1.35 var(--font); color: var(--ink);
  background: var(--milk); border-radius: 999px; box-shadow: 0 2px 0 var(--blush);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.k-wall:nth-child(2n) .tag { transform: translate(-50%, 3px) rotate(2deg); }
.hearts { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.heart {
  position: absolute; font-size: 30px; line-height: 1; color: var(--coral);
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 3px 2px rgba(59,36,24,.18));
  animation: rise 1.6s ease-out forwards;
}
@keyframes rise {
  0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 0; }
  15% { opacity: 1; transform: translate(calc(var(--dx) * .2), -20px) scale(1) rotate(calc(var(--r) * .3)); }
  100% { transform: translate(var(--dx), -190px) scale(.9) rotate(var(--r)); opacity: 0; }
}
/* Filled by pet.js from the real wall; keeps its height so the shelves don't jump when it appears. */
.just {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 1.9rem; margin-bottom: .35rem; padding: .18rem .75rem;
  max-width: 100%; border-radius: 999px; background: var(--milk); box-shadow: 0 2px 0 var(--blush);
  font-size: .95rem; font-weight: 600; color: var(--ink); visibility: hidden; opacity: 0; transition: opacity .5s;
}
.just.on { visibility: visible; opacity: 1; }
.just span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.just i { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: #5DBB7A; box-shadow: 0 0 0 3px rgba(93,187,122,.2); }
.pet-hint {
  margin-top: calc(var(--kw, 120px) * .14 + .5rem); /* clear the part of the stickers below the shelf */ font-weight: 600; color: var(--ink-soft);
  transition: opacity .4s;
}
.pet-hint::before { content: "🐾 "; }
.petted .pet-hint { opacity: 0; }
.sound {
  margin-top: .8rem;
  display: inline-flex; align-items: center; gap: .45rem;
  font: 500 .95rem/1 var(--font); color: var(--ink);
  background: var(--milk); border: 0; border-radius: 999px; padding: .55rem .95rem .55rem .7rem;
  box-shadow: 0 3px 0 var(--blush); cursor: pointer;
}
.sound svg { width: 20px; height: 20px; }
.sound .waves { opacity: .25; }
.sound[aria-pressed="true"] { background: var(--butter); }
.sound[aria-pressed="true"] .waves { opacity: 1; }
.haptic { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------- 2. Feel it: the ASMR ---------- */
/* Flat pale lavender. One slow ~7.5 s breath, only while on screen (pet.js); stroking Pepper (--p) swells it. */
.calm {
  --calm-bg: #F1EEF8; --lav: #9C8FD3; --ink-calm: #6A5A73; --p: 0;
  background: var(--calm-bg); color: var(--ink);
  display: grid; grid-template-columns: auto minmax(0, 31rem); align-items: center; justify-content: center;
  gap: clamp(40px, 7vw, 104px);
  padding: clamp(56px, 7vw, 92px) max(20px, 6vw);
}
.calm-stage { display: flex; flex-direction: column; align-items: center; text-align: center; }
.calm-pool {
  position: relative; width: clamp(280px, 32vw, 420px); aspect-ratio: 1;
  display: grid; place-items: center; cursor: grab; touch-action: pan-y;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.calm-pool:active { cursor: grabbing; }
.calm-pool .hearts { z-index: 4; }
.pool-kitty { --kw: clamp(168px, 19vw, 244px); --c: 1; z-index: 2; }
.pool-kitty::after { display: none; }
.pool-kitty img { object-position: 50% 100%; filter: drop-shadow(0 12px 16px rgba(86,70,130,.18)); }
.pool-hint { min-height: 1.6em; font-weight: 600; color: var(--ink-calm); transition: opacity .4s; }
.pool-hint::before { content: "🐾 "; }
.calm.petted .pool-hint { opacity: 0; }
.calm .sound { box-shadow: 0 3px 0 #DCD5EF; }
.rrr { position: absolute; z-index: 3; font-weight: 700; color: var(--lav); opacity: 0; pointer-events: none; font-size: calc(15px + var(--p) * 13px); }
.r1 { left: 13%; top: 24%; } .r2 { right: 10%; top: 17%; } .r3 { right: 18%; top: 58%; }
.calm.purring .rrr { animation: rrr 1.7s ease-out infinite; }
.calm.purring .r2 { animation-delay: .55s; } .calm.purring .r3 { animation-delay: 1.1s; }
@keyframes rrr { from { transform: translateY(8px); opacity: calc(.25 + var(--p) * .75); } to { transform: translateY(-46px); opacity: 0; } }
.ripple {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--lav); opacity: 0; transform: scale(.45);
}
.ripple:nth-child(2) { border-color: var(--coral); }
.calm-glow {
  position: absolute; inset: calc(14% - var(--p) * 9%); border-radius: 50%; transition: inset .3s;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(214,205,240,.55) 48%, rgba(255,214,203,.18) 64%, rgba(241,238,248,0) 72%);
}
.calm.on .ripple { animation: calm-ripple 7.5s cubic-bezier(.25,.1,.3,1) infinite; }
.calm.on .ripple:nth-child(2) { animation-delay: 2.5s; }
.calm.on .ripple:nth-child(3) { animation-delay: 5s; }
.calm.on .calm-glow { animation: calm-breathe 7.5s ease-in-out infinite; }
@keyframes calm-ripple {
  0% { transform: scale(.45); opacity: 0; }
  20% { opacity: .42; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes calm-breathe { 0%, 100% { transform: scale(.94); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
.kicker { color: #7A6CB8; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .88rem; margin-bottom: .6rem; }
.calm-copy h2 { font-size: clamp(2.5rem, 4.6vw, 4rem); margin-bottom: 1rem; }
.calm-lede { font-size: 1.22rem; color: var(--ink-calm); margin-bottom: 1.3rem; text-wrap: pretty; }
.mini-pad {
  position: relative; width: 168px; height: 88px; margin-bottom: 1.3rem; border-radius: 16px;
  background: linear-gradient(#FBFAFE, #E5E0F3); border: 2px solid #CFC7E6; box-shadow: inset 0 2px 0 #fff;
}
.mini-pad i {
  position: absolute; top: 34px; left: calc(26px + var(--n) * 30px); width: 18px; height: 18px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 0 4px rgba(255,122,92,.2);
}
.mini-pad i:nth-child(1) { --n: 0; } .mini-pad i:nth-child(2) { --n: 1; } .mini-pad i:nth-child(3) { --n: 2; } .mini-pad i:nth-child(4) { --n: 3; }
.calm.on .mini-pad i { animation: stroke-pad 3.75s ease-in-out infinite; }
@keyframes stroke-pad { 0%, 100% { transform: translateX(-16px); } 50% { transform: translateX(16px); } }
.calm-points { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .55rem; }
.calm-points li { position: relative; padding-left: 1.4rem; font-size: 1.05rem; line-height: 1.4; color: var(--ink-soft); }
.calm-points li::before { content: ""; position: absolute; left: 0; top: .48em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--lav); box-shadow: 0 0 0 3px rgba(156,143,211,.18); }
.calm-points strong { color: var(--ink); font-weight: 600; }

/* ---------- 3. A cat that notices you ---------- */
.alive { padding: clamp(56px, 7vw, 88px) max(16px, 4vw) clamp(32px, 4vw, 48px); max-width: 1180px; margin: 0 auto; }
.alive > h2 { text-align: center; margin-bottom: clamp(38px, 4vw, 52px); }
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 14px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--milk); border-radius: 26px; padding: 14px 12px 16px; box-shadow: 0 5px 0 var(--cream-deep);
}
.t-peach { background: #FFE9DE; box-shadow: 0 5px 0 #F9D2C0; } .t-lav { background: #ECE8F8; box-shadow: 0 5px 0 #D8D0EE; }
.t-butter { background: #FFF1C9; box-shadow: 0 5px 0 #F4DD97; } .t-blush { background: #FFE1DA; box-shadow: 0 5px 0 #F8C6B9; }
.t-sage { background: #E9F3E4; box-shadow: 0 5px 0 #CFE3C6; } .t-share { background: #E4F0F7; box-shadow: 0 5px 0 #C6DEEC; }
.tile-art { position: relative; height: 122px; width: 100%; display: flex; align-items: flex-end; justify-content: center; margin: 4px 0 8px; }
.tile-art > picture { height: 100%; }
.tile-art > picture img { height: 100%; width: auto; filter: drop-shadow(0 5px 6px rgba(59,36,24,.13)); }
.say {
  position: absolute; z-index: 2; top: -30px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  max-width: calc(100% + 8px); width: max-content; padding: .3rem .68rem; border-radius: 13px;
  background: var(--milk); color: var(--ink); font-size: .84rem; font-weight: 600; line-height: 1.15;
  box-shadow: 0 2px 0 rgba(59,36,24,.13), 0 0 0 1.5px rgba(59,36,24,.1);
}
.tile h3 { font-size: 1.18rem; line-height: 1.12; margin-bottom: .2rem; }
.tile p { color: var(--ink-soft); font-size: .95rem; line-height: 1.25; text-wrap: balance; }
.tile p a { color: var(--coral-deep); font-weight: 600; text-underline-offset: 2px; }
.share-mini { aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; transform: rotate(-3deg); box-shadow: 0 5px 12px rgba(59,36,24,.2); }
.tile-art > .share-mini img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.tile-art .waver { width: 112px; height: 122px; aspect-ratio: auto; }

/* ---------- 3. Your cat, drawn ---------- */
.drawn {
  display: grid; grid-template-columns: minmax(0, 29rem) minmax(0, 560px); align-items: center; justify-content: center;
  gap: clamp(28px, 5vw, 72px);
  margin: clamp(14px, 2vw, 24px) max(12px, 2vw) 0; padding: clamp(48px, 6vw, 76px) max(20px, 4vw);
  background: var(--ink); color: var(--cream); border-radius: 40px; overflow: hidden;
}
.drawn .kicker { color: var(--butter); }
.drawn h2 { font-size: clamp(2.5rem, 4.6vw, 4rem); margin-bottom: 1rem; }
.drawn-lede { font-size: 1.22rem; color: #F2E3D6; margin-bottom: 1.5rem; text-wrap: pretty; }
.drawn .morph { width: 100%; margin: 0; }

/* Photo → sticker: s1 develops the photo, s2 scans it, s3 the sticker jumps out of it. */
.morph {
  --pw: 280px;            /* polaroid width */
  --sw: 190px;            /* sticker width: the drawn cat about the size of the photo */
  --st-top: 89px;         /* sticker vertically centered on the polaroid */
  --pol-x: -115px;        /* polaroid's final offset */
  --st-x: 145px;          /* sticker's final offset */
  position: relative; height: 360px; max-width: 820px; margin: 40px auto 0;
}
.polaroid {
  position: absolute; left: 50%; top: 24px; width: var(--pw); margin-left: calc(var(--pw) / -2);
  background: var(--milk); padding: 12px 12px 0; border-radius: 6px;
  box-shadow: 0 18px 34px rgba(0,0,0,.35);
  transform: rotate(-4deg); transform-origin: 50% 50%;
  transition: transform .9s cubic-bezier(.5,0,.2,1), box-shadow .9s;
}
.photo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 2px; background: #2a1d16; }
.photo img { width: 100%; height: 100%; object-fit: cover;
  filter: brightness(2.4) contrast(.35) saturate(0) blur(3px); transition: filter 1.8s ease-out; }
.caption { color: var(--ink-soft); font-size: 1.05rem; font-weight: 500; padding: 12px 0 16px; transform: rotate(-1deg); }
.scan {
  position: absolute; left: 0; right: 0; top: -30%; height: 30%; opacity: 0;
  background: linear-gradient(to bottom, rgba(255,231,168,0), rgba(255,231,168,.85) 70%, #fff 76%, rgba(255,122,92,0));
  mix-blend-mode: screen;
}
.arrow { position: absolute; left: 50%; top: 140px; width: 40px; margin-left: 6px; color: var(--butter); opacity: 0; transform: scale(.6); transition: opacity .4s .5s, transform .5s .5s cubic-bezier(.3,1.6,.5,1); }
.demo {
  position: absolute; left: 50%; top: var(--st-top); width: var(--sw); margin-left: calc(var(--sw) / -2);
  aspect-ratio: 480 / 447; padding: 0; border: 0; background: none; cursor: pointer;
  opacity: 0; pointer-events: none;
  transform: translateX(0) scale(.25) rotate(-25deg);
}
.df { position: absolute; inset: 0; opacity: 0; transition: opacity .15s; }
.df.on { opacity: 1; }
.df img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
.zz { position: absolute; right: 6%; top: 4%; font-weight: 700; font-size: 26px; color: var(--butter); opacity: 0; transition: opacity .4s; }
.zz span { font-size: .8em; margin-left: 2px; }
.sleeping .zz { opacity: 1; animation: zz 2.4s ease-in-out infinite; }
@keyframes zz { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.burst { position: absolute; left: 50%; top: 45%; }
.burst i { position: absolute; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--butter); opacity: 0; }
.burst i:nth-child(even) { background: var(--coral); width: 10px; height: 10px; margin: -5px; }

.morph.s1 .photo img, .morph.s2 .photo img { filter: none; }
.morph.s2 .scan { animation: scan 1.1s ease-in-out forwards; }
.morph.s2 .photo img { filter: saturate(1.5) contrast(1.15); transition-duration: .9s; }
@keyframes scan { 0% { top: -30%; opacity: 1; } 100% { top: 100%; opacity: 1; } }
.morph.s3 .photo img { filter: none; }
.morph.s3 .polaroid { transform: translateX(var(--pol-x)) translateY(10px) scale(.86) rotate(-7deg); box-shadow: 0 10px 20px rgba(0,0,0,.3); }
.morph.s3 .arrow { opacity: 1; transform: scale(1); }
.morph.s3 .demo {
  opacity: 1; pointer-events: auto;
  transform: translateX(var(--st-x)) scale(1) rotate(0);
  transition: transform .8s cubic-bezier(.3,1.45,.45,1) .15s, opacity .2s .15s;
}
.morph.s3 .burst i { animation: burst .8s ease-out .45s both; }
.burst i:nth-child(1) { --bx: -120px; --by: -90px; } .burst i:nth-child(2) { --bx: 110px; --by: -110px; }
.burst i:nth-child(3) { --bx: 150px; --by: 10px; } .burst i:nth-child(4) { --bx: -150px; --by: 20px; }
.burst i:nth-child(5) { --bx: -60px; --by: -150px; } .burst i:nth-child(6) { --bx: 70px; --by: 120px; }
@keyframes burst { 0% { transform: translate(0,0) scale(.3); opacity: 1; } 100% { transform: translate(var(--bx), var(--by)) scale(1); opacity: 0; } }
/* End of a loop: the sticker slips back into the photo, which returns to the middle. */
.morph.out .photo img { filter: none; }
.morph.s3.out .polaroid { transform: rotate(-4deg); }
.morph.s3.out .arrow { opacity: 0; transition-delay: 0s; }
.morph.out .demo { opacity: 0; transform: translateX(var(--pol-x)) scale(.3) rotate(-15deg); transition: transform .6s ease-in, opacity .4s ease-in .2s; pointer-events: none; }
.morph.snap .photo img, .morph.snap .demo, .morph.snap .polaroid { transition: none !important; }
.demo:active .df { transform: scale(.97); }

.waver {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0;
  background: none; border: 0; cursor: pointer; border-radius: 24px;
}
.waver picture { position: absolute; inset: 0; transition: opacity .12s, transform .25s cubic-bezier(.3,1.6,.5,1); }
.waver img { width: 100%; height: 100%; object-fit: contain; }
.waver .w { opacity: 0; }
.waver.hi .a { opacity: 0; }
.waver.hi .w { opacity: 1; }
.waver.hi picture { transform: translateY(-6px) scale(1.06); }

/* ---------- 5. Buy ---------- */
.buy {
  text-align: center; padding: 24px max(16px, 5vw) clamp(40px, 5vw, 56px);
  max-width: 720px; margin: 0 auto;
}
.buy-cat { width: 132px; margin: 0 auto -2px; }
.buy h2 { margin-bottom: 1.3rem; }
.buy-lede { font-size: 1.2rem; max-width: 30rem; margin: 0 auto 1.8rem; }
.btn-big { font-size: 1.3rem; padding: 1.15rem 2rem; }
.buy-sub { margin-top: 1.1rem; font-weight: 600; color: var(--ink); text-wrap: balance; }
.buy-req { margin-top: .4rem; font-size: .95rem; color: var(--ink-soft); text-wrap: balance; }
.send-purr {
  margin-top: 1.1rem; padding: .5rem .95rem; border: 0; border-radius: 999px; cursor: pointer;
  background: #F1EEF8; color: var(--ink); font: 600 .98rem/1.2 var(--font);
}
.send-purr:hover { background: #E5DFF5; }
.price { white-space: nowrap; }

/* A small note at the bottom of the screen (buy.js). */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 20;
  max-width: calc(100vw - 32px); width: max-content;
  padding: .75rem 1.2rem; border-radius: 999px;
  background: var(--ink); color: var(--cream); font-weight: 500; font-size: 1rem; text-align: center;
  box-shadow: 0 8px 24px rgba(59,36,24,.25);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .25s, transform .25s cubic-bezier(.3,1.5,.5,1);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.foot { text-align: center; padding: 32px 16px 48px; color: var(--ink-soft); font-size: .95rem; }
.foot p + p { margin-top: .3rem; }
.legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1rem; }
.legal-links a { font-weight: 600; color: var(--ink); text-underline-offset: 3px; }
.legal-links a:hover { color: var(--coral-deep); }

/* ---------- Thanks + legal pages ---------- */
.top.static { position: static; }
.page { max-width: 720px; margin: 0 auto; padding: 24px max(16px, 5vw) 64px; }
.page h1 { font-size: clamp(2.4rem, 7vw, 3.6rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
.page .lede { margin-bottom: 1.6rem; }
.thanks { text-align: center; }
.thanks .lede { margin-left: auto; margin-right: auto; }
.thanks-cat { width: 170px; margin: 0 auto 8px; }
.waiting .thanks-cat { animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.card {
  background: var(--milk); border-radius: 30px; padding: 26px clamp(18px, 4vw, 32px);
  box-shadow: 0 6px 0 var(--cream-deep); text-align: left;
}
.card + .card { margin-top: 22px; }
.card h2 { font-size: 1.5rem; margin-bottom: .8rem; }
.key-label { font-weight: 600; color: var(--ink-soft); font-size: .95rem; margin-bottom: .5rem; }
.key-row { display: flex; gap: 10px; align-items: stretch; }
.key {
  flex: 1; min-width: 0; margin: 0;
  font: 600 clamp(1rem, 3.6vw, 1.35rem)/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em;
  background: var(--cream); border: 2px dashed var(--blush); border-radius: 16px;
  padding: .85rem 1rem; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all;
}
.key-row .btn { padding: .8rem 1.2rem; font-size: 1rem; flex: none; }
.copied { min-height: 1.5em; margin-top: .5rem; font-size: .95rem; font-weight: 600; color: var(--coral-deep); }
.dl { margin-top: 1.4rem; }
.dl .btn { width: 100%; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: .8rem; align-items: baseline; padding: .45rem 0; }
.steps li::before {
  content: counter(s); flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: inline-grid; place-items: center; transform: translateY(.35rem);
  background: var(--butter); font-weight: 700; font-size: 1rem;
}
.state-msg { font-size: 1.2rem; max-width: 32rem; margin: 0 auto; }
.state-msg + .state-msg { margin-top: .8rem; font-size: 1rem; color: var(--ink-soft); }
.spinner { display: inline-flex; gap: 6px; margin-top: 1.2rem; }
.spinner i { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); animation: dot 1s ease-in-out infinite; }
.spinner i:nth-child(2) { animation-delay: .15s; } .spinner i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-6px); opacity: 1; } }

.legal h2 { font-size: 1.6rem; margin: 2.2rem 0 .7rem; }
.legal p, .legal li { font-size: 1.08rem; color: var(--ink); }
.legal p + p { margin-top: .8rem; }
.legal ul { padding-left: 1.3rem; margin: .6rem 0 0; }
.legal li + li { margin-top: .4rem; }
.legal .updated { color: var(--ink-soft); font-size: .95rem; }
.legal a { color: var(--coral-deep); font-weight: 600; text-underline-offset: 3px; }
.fill {
  display: inline-block; padding: 0 .4em; border-radius: 6px;
  background: #FFE04D; color: #3B2418; font-weight: 700; outline: 2px dashed var(--coral-deep);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .crowd > .shelf + .shelf { display: none; } /* one shelf on phones, also before the wall has loaded */
  .hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 76px 16px 40px; gap: .8rem; min-height: 0; }
  .hero-copy { align-items: center; }
  .petme { margin-bottom: .8rem; font-size: clamp(3rem, 13.4vw, 6rem); }
  .lede { margin-bottom: 1.2rem; }
  .hero-copy .btn, .hero-copy .soon { display: none; }
  .hero-stage { --kw: min(120px, calc((100vw - 40px) / 4)); }
  .crowd { padding-top: 4px; min-width: 0; }
  .belt { --fade: 22px; width: 100vw; }
  .calm { grid-template-columns: 1fr; justify-items: center; gap: 24px; padding: 48px 20px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawn { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; border-radius: 30px; gap: 22px; padding: 44px 16px 36px; }
  .drawn-lede { max-width: 32rem; }
  .calm-copy { text-align: center; }
  .mini-pad { display: none; }
  .calm-pool { width: min(76vw, 300px); }
  .pool-kitty { --kw: min(44vw, 176px); }
  .calm-points { text-align: left; width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
  .calm-points { text-align: left; max-width: 30rem; margin: 0 auto; }
}
@media (max-width: 700px) {
  .morph { --pw: 230px; --sw: 155px; --st-top: 88px; --pol-x: -110px; --st-x: 100px; height: 330px; }
  .arrow { width: 30px; margin-left: -10px; top: 130px; }
}
@media (max-width: 520px) {
  .top-cta { font-size: .95rem; padding: .5rem .85rem; }
  .key-row { flex-direction: column; }
  .morph { --pw: 180px; --sw: 125px; --st-top: 68px; --pol-x: -62px; --st-x: 88px; height: 270px; }
  .arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .purring .petme .ln > span, .eyebrow span, .mini-pad i, .rrr { animation: none !important; }
  .morph .polaroid, .morph .demo, .morph .arrow, .photo img { transition: none !important; }
  .morph.s2 .scan, .morph.s3 .burst i { animation: none; }
  .heart { animation-duration: 1s; }
  .track { animation: none; }
  .waiting .thanks-cat, .spinner i { animation: none; }
  .toast { transition: none; }
  .calm .ripple, .calm-glow { animation: none !important; }
  .calm .ripple:nth-child(1) { opacity: .3; transform: scale(.66); }
  .calm .ripple:nth-child(2) { opacity: .18; transform: scale(.83); }
  .calm .ripple:nth-child(3) { opacity: .1; transform: scale(1); }
  .belt { overflow-x: auto; scrollbar-width: thin; }
}
