/* Chihaya Atelier site styles. Colours and type come from tokens.css. */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  position: relative;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 8px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

.shell {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.cap { font-size: var(--fs-caption); line-height: 1.35; font-style: italic; color: var(--ink-soft); }
.label {
  font-size: 0.75rem; line-height: 1.3; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
}
.ph {
  border: 1px dashed var(--ink-soft); padding: 0 6px; border-radius: 2px;
  font-style: italic; color: var(--ink-soft); font-size: 0.88em; white-space: nowrap;
}

/* ---------- sticky top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: var(--rule);
  transition: box-shadow 0.25s ease;
}
.topbar.scrolled { box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--ink) 55%, transparent); }
.nav {
  display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap;
  padding-block: 10px;
}
.lock { display: block; line-height: 0; text-decoration: none; }
.lock .fallback { width: 170px; height: auto; display: block; }
.lock svg.navrv { width: 170px; height: auto; display: block; }
.nav-right { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.nav ul { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.nav ul a { text-decoration: none; border-bottom: 1px solid transparent; padding: 2px 0; }
.nav ul a:hover, .nav ul a[aria-current] { border-bottom-color: var(--ink); }
.theme-toggle {
  position: relative; z-index: 2; align-self: flex-start; margin-block: -10px; width: 52px; height: 86px;
  padding: 0; background: transparent; border: 0; cursor: pointer; line-height: 0; color: var(--ink);
}
.theme-toggle svg { display: block; margin: 0 auto; overflow: visible; }
.theme-toggle .bulb { fill: var(--paper-2); transition: fill 0.5s ease; }
.theme-toggle .glow { opacity: 0; transition: opacity 0.5s ease; }
:root[data-theme="dark"] .theme-toggle .bulb { fill: var(--accent); }
:root[data-theme="dark"] .theme-toggle .glow { opacity: 1; }
.theme-toggle .lamp-body { transform-origin: 20px 0; transition: transform 0.3s ease; }
.theme-toggle:hover .lamp-body { transform: rotate(3deg); }
.theme-toggle .pull, .theme-toggle .sway { transform-origin: 29px 35px; }
.theme-toggle .bead { transform-origin: 29px 56px; }
@media (prefers-reduced-motion: no-preference) {
  /* the cord drifts like a loose chain: the bead lags a little behind the line */
  .theme-toggle .sway { animation: cord-sway 5.5s ease-in-out infinite alternate; }
  .theme-toggle .bead { animation: bead-sway 5.5s ease-in-out -0.9s infinite alternate; }
  @keyframes cord-sway { from { transform: rotate(-3deg); } to { transform: rotate(3.5deg); } }
  @keyframes bead-sway { from { transform: rotate(4deg); } to { transform: rotate(-5deg); } }
  .theme-toggle.tug .lamp-body { animation: lamp-swing 1s ease-out; }
  .theme-toggle.tug .pull { animation: lamp-tug 0.5s ease-out; }
  @keyframes lamp-swing { 0% { transform: rotate(0); } 20% { transform: rotate(7deg); } 45% { transform: rotate(-4deg); } 70% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
  @keyframes lamp-tug { 0% { transform: scaleY(1); } 30% { transform: scaleY(1.28); } 60% { transform: scaleY(0.96); } 100% { transform: scaleY(1); } }
  /* the page change: the browser cross-fades; we reveal the new theme as a circle from the lamp (see main.js) */
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
  ::view-transition-new(root) { z-index: 2; }
  ::view-transition-old(root) { z-index: 1; }
  /* browsers without view transitions: fade colours for half a second */
  .theme-fade, .theme-fade * { transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease !important; }
}
.menu-btn { display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; background: transparent; border: 0; }
.menu-btn span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.menu-btn span:nth-child(1) { top: 15px; }
.menu-btn span:nth-child(2) { top: 21px; }
.menu-btn span:nth-child(3) { top: 27px; }
.topbar.open .menu-btn span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.topbar.open .menu-btn span:nth-child(2) { opacity: 0; }
.topbar.open .menu-btn span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- bands: full-width sections that change background, edged like a stamp ---------- */
.band { position: relative; background: var(--bg); color: var(--ink); --hole: var(--bg); padding-block: clamp(56px, 8vw, 104px); }
.tone-paper { --bg: var(--bg-paper); }
.tone-paper2 { --bg: var(--bg-paper2); }
.tone-sea { --bg: var(--bg-sea); }
.tone-night {
  /* Chalk Night palette inside the band, whichever theme the page is in */
  --paper: #141a2a; --paper-2: #212634; --ink: #e7e2d2; --ink-soft: #b2b0a8; --line: #3e424c;
  --sea: #7ea2c9; --leaf: #8eb499; --roof: #d89f5a; --accent: #f5ca5c;
  --bg: var(--bg-night);
}
.tone-pond {
  /* Frogestra's own palette inside the band, whichever theme the page is in */
  --paper: #E8EFE1; --paper-2: #F7FAF2; --ink: #4A4A44; --ink-soft: #6E7266; --line: #C3CFBA;
  --sea: #8FB8E8; --leaf: #7DB35F; --roof: #7DB35F; --accent: #F5D96B; --stamp: #F7FAF2; --stamp-ink: #4A4A44;
  --bg: var(--bg-pond);
}
:root[data-theme="dark"] .tone-pond {
  /* Chalk Night: a dusk pond, the same hues dimmed */
  --paper: #17241d; --paper-2: #22332a; --ink: #e7e2d2; --ink-soft: #b2b0a8; --line: #3a4a40;
  --sea: #7ea2c9; --leaf: #8eb499; --roof: #8eb499; --accent: #f5ca5c; --stamp: #ece6d2; --stamp-ink: #2a302e;
}
:root[data-theme="dark"] .tone-pond .night-art, :root[data-theme="dark"] .pond-frogs img { filter: brightness(0.42) saturate(0.8); }
.tone-notebook {
  /* Marginfall: warm ruled notebook paper with a red margin line, dimmed in Chalk Night */
  --rule-blue: #8DA6C2; --rule-red: #CF7C7C;
  --bg: var(--bg-notebook);
  background-image:
    linear-gradient(90deg, #0000 calc(var(--gutter) + 8px), var(--rule-red) calc(var(--gutter) + 8px) calc(var(--gutter) + 10px), #0000 calc(var(--gutter) + 10px)),
    repeating-linear-gradient(#0000 0 31px, var(--rule-blue) 31px 32px),
    radial-gradient(120% 90% at 50% 40%, #0000 55%, color-mix(in srgb, #8a6a2e 16%, transparent));
  background-position: 0 0, 0 12px, 0 0;
}
:root[data-theme="dark"] .tone-notebook { --rule-blue: #3a4660; --rule-red: #6b3f48; }

/* Marginfall feature layout: the promo is the main visual, the shots sit in a row below,
   and paper clouds hang on strings from the top */
.pj.feature.flip .pj-text { order: 0; }
.feature .pj-grid { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 24px clamp(16px, 3vw, 40px); }
.feature .pj-name { font-size: clamp(3rem, 7.4vw, 5.5rem); }
.feature .pj-desc { font-size: 1.3125rem; }
.mf-hero { rotate: -1deg; }
.mf-hero > img { display: block; width: 118%; max-width: none; margin-left: -4%; height: auto; filter: drop-shadow(0 22px 20px color-mix(in srgb, #2e3836 30%, transparent)); }
.collage.row { display: flex; align-items: flex-start; justify-content: center; gap: clamp(10px, 2.4vw, 34px); aspect-ratio: auto; margin-top: clamp(28px, 4vw, 56px); }
.collage.row .shot { position: relative; flex: none; width: 31%; }
.collage.row .s1 { rotate: -2.4deg; }
.collage.row .s2 { rotate: 1.6deg; margin-top: 22px; }
.collage.row .s3 { rotate: -1.2deg; }
.collage.row .shot:hover { rotate: 0deg; }
.mf-scene { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.fx-on .mf-scene.fx { opacity: 1; transform: none; }
.mf-scene img { position: absolute; height: auto; translate: calc(var(--mx, 0) * var(--d, 0) * 1px) 0; transition: translate 0.35s ease-out; }
.mf-cloud { top: -6px; transform-origin: 50% 0; width: clamp(56px, 7vw, 92px); --d: 16; }
.mf-cloud.c1 { left: 3%; }
.mf-cloud.c2 { left: 33%; top: -34px; width: clamp(46px, 5.6vw, 74px); --d: 10; }
.mf-cloud.c3 { right: 4%; top: -14px; --d: 20; }
:root[data-theme="dark"] .mf-scene img, :root[data-theme="dark"] .mf-hero > img { filter: brightness(0.62) saturate(0.85); }
@media (prefers-reduced-motion: no-preference) {
  .mf-cloud { animation: mfsway 5.5s ease-in-out infinite alternate; }
  .mf-cloud.c2 { animation-duration: 7s; animation-delay: -2s; }
  .mf-cloud.c3 { animation-duration: 6.2s; animation-delay: -3.5s; }
  .mf-hero > img { animation: mffloat 6s ease-in-out infinite alternate; }
}
@keyframes mfsway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes mffloat { from { transform: translateY(0); } to { transform: translateY(-8px); } }
/* Land of Rocks: a smooth, layered landscape. Sky gradient, a snowy peak, three soft hills,
   clouds drifting and two kites bobbing. Chalk Night turns it into dusk. */
.tone-land {
  --paper: #F2F8EE; --paper-2: #FFFFFF; --ink: #25332F; --ink-soft: #41524C; --line: #A9C4B4;
  --leaf: #4F8A45; --stamp: #FBF8EE; --stamp-ink: #25332F;
  --bg: #CFE6F0;
  padding-bottom: clamp(120px, 13vw, 180px);
  background:
    radial-gradient(38% 34% at 80% 12%, rgb(255 250 225 / 0.8), #0000 72%),
    linear-gradient(180deg, #76B6E6 0%, #9DCBEB 30%, #CFE6F0 62%, #EEF3DA 100%);
}
:root[data-theme="dark"] .tone-land {
  --paper: #17241D; --paper-2: #22332A; --ink: #E7E2D2; --ink-soft: #C3C0B6; --line: #3A4A40;
  --stamp: #ECE6D2; --stamp-ink: #2A302E; --bg: #2B2F5E;
  background:
    radial-gradient(30% 30% at 80% 12%, rgb(220 226 255 / 0.28), #0000 72%),
    linear-gradient(180deg, #141A3A 0%, #2B2F5E 42%, #5A4A73 74%, #9A6D78 100%);
}
.land-scene { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.fx-on .land-scene.fx { opacity: 1; transform: none; }
.land-scene img { position: absolute; display: block; }
.tone-land .collage.landscape { aspect-ratio: 1 / 1.2; }
.tone-land .collage .shot { transform: none; transition: transform 0.3s ease, rotate 0.3s ease; }
.tone-land .collage .shot:hover { transform: translateY(-6px); rotate: 0deg; }
.tone-land .collage .s1 { width: 62%; left: 0; top: 0; rotate: -3deg; z-index: 1; }
.tone-land .collage .s2 { width: 52%; left: auto; right: 0; top: 6%; rotate: 2.4deg; z-index: 2; }
.tone-land .collage .s3 { width: 48%; left: 4%; top: 25%; bottom: auto; rotate: -1.6deg; z-index: 3; }
.tone-land .collage .s4 { width: 50%; right: 2%; top: 37%; rotate: 1.8deg; z-index: 4; }
.tone-land .collage .s5 { width: 46%; left: 0; top: 52%; rotate: -2.2deg; z-index: 5; }
.tone-land .collage .s6 { width: 44%; right: 6%; top: 65%; rotate: 2.8deg; z-index: 6; }
.ls-hill { left: -2%; width: 104%; max-width: none; bottom: 0; translate: calc(var(--mx, 0) * var(--d, 0) * 1px) 0; transition: translate 0.4s ease-out; }
.ls-hill.back { height: clamp(200px, 26vw, 340px); --d: -6; }
.ls-hill.mid { height: clamp(150px, 19vw, 250px); --d: -12; }
.ls-hill.front { height: clamp(110px, 13vw, 170px); --d: -20; }
.ls-mtn { right: 10%; bottom: calc(clamp(200px, 26vw, 340px) * 0.6); width: clamp(220px, 26vw, 380px); height: auto; opacity: 0.92; }
.ls-cloud { left: 0; height: auto; opacity: 0.96; }
.ls-cloud.k1 { left: 8%; top: 7%; width: clamp(150px, 19vw, 270px); }
.ls-cloud.k2 { left: 52%; top: 24%; width: clamp(130px, 15vw, 210px); opacity: 0.85; }
.ls-cloud.k3 { left: 78%; top: 11%; width: clamp(90px, 11vw, 150px); opacity: 0.8; }
.ls-kite { height: auto; width: clamp(26px, 3vw, 40px); transform-origin: 50% 0; }
.ls-kite.a { left: 64%; top: 18%; }
.ls-kite.b { left: 91%; top: 30%; width: clamp(22px, 2.5vw, 32px); }
.pj-logo { display: block; width: min(100%, 440px); height: auto; margin: 4px 0 6px -6px; filter: drop-shadow(0 8px 10px color-mix(in srgb, #25332F 28%, transparent)); }
:root[data-theme="dark"] .land-scene img { filter: brightness(0.42) saturate(0.7); }
:root[data-theme="dark"] .land-scene .ls-cloud { filter: brightness(0.55) sepia(0.3); }
:root[data-theme="dark"] .pj-logo { filter: brightness(0.85) saturate(0.9); }
@media (prefers-reduced-motion: no-preference) {
  .ls-cloud { left: 0; animation: lsdrift 110s linear infinite; animation-delay: var(--dl, 0s); }
  .ls-cloud.k1 { --dl: -30s; animation-duration: 120s; }
  .ls-cloud.k2 { --dl: -75s; animation-duration: 160s; }
  .ls-cloud.k3 { --dl: -10s; animation-duration: 95s; }
  .ls-kite { animation: lskite 5.5s ease-in-out infinite alternate; }
  .ls-kite.b { animation-duration: 7s; animation-delay: -2.5s; }
}
@keyframes lsdrift { from { transform: translateX(-30vw); } to { transform: translateX(110vw); } }
@keyframes lskite { from { transform: translate(0, 0) rotate(-6deg); } to { transform: translate(10px, -12px) rotate(7deg); } }
.tone-night .night-art { height: clamp(130px, 17.5vw, 220px); object-position: 60% 45%; }
.tone-night .collage.portrait { aspect-ratio: 1 / 0.8; }
.tone-pond { padding-bottom: clamp(90px, 9vw, 120px); }
.tone-pond .night-art { height: clamp(130px, 15vw, 200px); object-position: 50% 38%; margin-bottom: 4px; }
.tone-pond .collage.landscape { aspect-ratio: 1 / 0.68; }
.pond-frogs { position: absolute; left: 0; right: 0; bottom: 6px; z-index: 1; display: flex; justify-content: center; gap: clamp(8px, 4vw, 56px); pointer-events: none; }
.pond-frogs img { width: clamp(64px, 9vw, 112px); height: auto; }
.pond-frogs img:nth-child(2) { translate: 0 10px; }
.edge::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 10px; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at 50% 0, var(--prev) 5px, #0000 5.6px) 0 0 / 16px 10px repeat-x;
}

/* scroll reveals (only when scripts mark the page and motion is allowed) */
.fx-on .fx { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fx-on .fx.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero-band {
  padding-block: clamp(40px, 5vw, 64px) clamp(48px, 7vw, 96px);
  background:
    radial-gradient(60% 75% at 76% 52%, color-mix(in srgb, var(--sea) 15%, transparent), #0000 72%),
    var(--bg);
}
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 40px; align-items: center; min-height: min(70vh, 640px);
}
.hero h1 { font-size: var(--fs-display); line-height: 1.02; max-width: 12ch; }
.hero .about { margin-top: 20px; max-width: 42ch; font-size: 1.25rem; line-height: 1.45; }
.cta { display: flex; gap: 14px 16px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.btn {
  display: inline-block; background: var(--ink); color: var(--paper); padding: 10px 22px;
  text-decoration: none; border: 1px solid var(--ink);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn.ghost:hover { background: var(--paper-2); }
.scene { position: relative; justify-self: end; width: 100%; max-width: 520px; }
.scene svg.rv { width: 100%; height: auto; display: block; }
.skip-intro {
  position: absolute; right: 0; top: 0; background: var(--paper); border: 1px solid var(--line);
  padding: 0 10px; line-height: 24px; font-size: var(--fs-caption); font-style: italic; color: var(--ink-soft);
}
.skip-intro:hover { background: var(--paper-2); color: var(--ink); }
.cat-poke {
  position: absolute; left: 27%; top: 8%; width: 46%; height: 62%; z-index: 2;
  background: transparent; border: 0; border-radius: 40%; cursor: pointer;
}
.bubble {
  position: absolute; left: 50%; top: -2%; z-index: 3; max-width: 82%; width: max-content;
  transform: translate(-50%, 6px); opacity: 0; pointer-events: none;
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--ink-soft); border-radius: 14px;
  padding: 8px 14px; font-style: italic; text-align: center; line-height: 1.3;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px;
  background: var(--paper-2); border-right: 1px solid var(--ink-soft); border-bottom: 1px solid var(--ink-soft);
  transform: rotate(45deg);
}
.bubble.show { opacity: 1; transform: translate(-50%, 0); }

/* a giant line, for scale contrast */
.statement { padding-block: clamp(72px, 12vw, 150px); overflow: hidden; }
.giant { font-size: clamp(2.75rem, 9.4vw, 8rem); line-height: 0.98; letter-spacing: -0.01em; }
.giant span { display: block; font-style: italic; color: var(--ink-soft); }
.giant span.a { font-style: normal; color: var(--ink); }

/* ---------- atelier ---------- */
.atelier { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 28px 64px; align-items: end; }
.atelier .big { font-size: clamp(1.75rem, 4.4vw, 3rem); line-height: 1.14; max-width: 22ch; }
.atelier .vis { border-left: 2px solid var(--roof); padding-left: 18px; max-width: 34ch; }
.atelier .vis p:last-child { font-size: 1.25rem; line-height: 1.45; margin-top: 4px; }

/* ---------- project scenes ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 4vw, 44px); }
.sec-head h2 { font-size: var(--fs-heading); line-height: 1.15; }
.pj { overflow: hidden; }
.pj-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px clamp(32px, 6vw, 88px); align-items: center; }
.pj.flip .pj-text { order: 2; }
.pj-text .label { margin-bottom: 8px; }
.pj-name { font-size: clamp(2.5rem, 6.4vw, 4.5rem); line-height: 1; }
.pj-aka { font-style: italic; color: var(--ink-soft); margin-top: 8px; }
/* the banner already draws the name; keep the text for screen readers */
.pj-name.sr, .pj-aka.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pj-desc { margin-top: 18px; max-width: 38ch; font-size: 1.25rem; line-height: 1.45; }
.pj-text .stamp { margin-top: 30px; }
.pj-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 22px; }
.see-detail { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.see-detail span { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.see-detail svg { transition: transform 0.2s ease; }
.see-detail:hover span, .see-detail:focus-visible span { text-decoration-thickness: 2px; }
.see-detail:hover svg, .see-detail:focus-visible svg { transform: translateX(3px); }
.btn.demo { display: inline-flex; align-items: center; gap: 9px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 18px 7px 12px; text-decoration: none;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 8px;
}
.store .st { display: flex; flex-direction: column; line-height: 1.05; }
.store small { font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; }
.store b { font-weight: 400; font-size: 1.25rem; }
a.store:hover { background: transparent; color: var(--ink); }
.store.off { background: transparent; color: var(--ink-soft); border: 1px dashed var(--ink-soft); cursor: not-allowed; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.collage { position: relative; width: 100%; }
.collage.landscape { aspect-ratio: 1 / 0.86; }
.collage.portrait { aspect-ratio: 1 / 0.92; }
.shot {
  position: absolute; margin: 0; background: var(--stamp); padding: 7px 7px 22px;
  box-shadow: 0 10px 22px -8px color-mix(in srgb, #000 45%, transparent);
  transition: transform 0.3s ease;
}
.shot img { display: block; width: 100%; height: auto; }
.shot::after {
  content: ""; position: absolute; top: -9px; left: 38%; width: 62px; height: 18px;
  background: color-mix(in srgb, var(--accent) 50%, transparent); transform: rotate(3deg);
}
.landscape .s1 { width: 66%; left: 4%; top: 0; transform: rotate(-3deg); z-index: 1; }
.landscape .s2 { width: 58%; right: 0; top: 30%; transform: rotate(2.4deg); z-index: 2; }
.landscape .s3 { width: 50%; left: 2%; bottom: 0; transform: rotate(-1.6deg); z-index: 3; }
.portrait .s1 { width: 34%; left: 3%; top: 10%; transform: rotate(-5deg); z-index: 1; }
.portrait .s2 { width: 34%; left: 33%; top: 0; transform: rotate(1.8deg); z-index: 3; }
.portrait .s3 { width: 34%; left: 62%; top: 12%; transform: rotate(5deg); z-index: 2; }
.shot:hover { transform: rotate(0) translateY(-6px); z-index: 6; }

/* sea band: drifting pencil waves and a paper boat */
.tone-sea { padding-bottom: clamp(110px, 12vw, 150px); }
.waves {
  position: absolute; left: 0; right: 0; bottom: 0; height: 66px; z-index: 0; pointer-events: none;
  background: var(--sea); opacity: 0.35;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='22' viewBox='0 0 72 22'%3E%3Cpath d='M0 11q9-9 18 0t18 0 18 0 18 0' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 72px 22px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='22' viewBox='0 0 72 22'%3E%3Cpath d='M0 11q9-9 18 0t18 0 18 0 18 0' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 72px 22px repeat;
}
.boat { position: absolute; bottom: 38px; left: 12%; width: 62px; height: auto; z-index: 1; pointer-events: none; }
.pj > .shell { position: relative; z-index: 2; }

/* night and pond bands: the project's wide banner (night also gets a few stars) */
.night-art { display: block; width: 100%; height: clamp(150px, 22vw, 260px); object-fit: cover; object-position: 60% 50%;
  -webkit-mask-image: linear-gradient(#000 70%, #0000); mask-image: linear-gradient(#000 70%, #0000); margin-top: calc(-1 * clamp(56px, 8vw, 104px)); margin-bottom: 36px; }
.tone-night::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.55;
  background-image:
    radial-gradient(circle, #fff 0.8px, #0000 1.4px),
    radial-gradient(circle, #fff 0.6px, #0000 1.2px);
  background-size: 130px 110px, 77px 93px; background-position: 14px 22px, 60px 50px;
}
.next-band { padding-block: 44px; }
.next-stamp {
  max-width: 300px; min-height: 120px; margin: 0 auto; padding: 18px; border: 2px dashed var(--line);
  display: grid; place-items: center; text-align: center; color: var(--ink-soft);
}

/* ---------- postage stamps ---------- */
.stamp {
  --s: 12px; --hole-c: var(--hole);
  position: relative; display: block; width: 100%; max-width: 270px; padding: 18px 18px 14px;
  background: var(--stamp); color: var(--stamp-ink); text-decoration: none; isolation: isolate;
  --base: 0deg;
  transform: perspective(800px) rotate(var(--base)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.2s ease, translate 0.25s ease;
}
.stamp::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background:
    radial-gradient(circle, var(--hole-c) 3.4px, #0000 3.9px) 0 -4px / var(--s) 8px repeat-x,
    radial-gradient(circle, var(--hole-c) 3.4px, #0000 3.9px) 0 calc(100% + 4px) / var(--s) 8px repeat-x,
    radial-gradient(circle, var(--hole-c) 3.4px, #0000 3.9px) -4px 0 / 8px var(--s) repeat-y,
    radial-gradient(circle, var(--hole-c) 3.4px, #0000 3.9px) calc(100% + 4px) 0 / 8px var(--s) repeat-y;
}
.stamp .inner {
  border: 1px solid color-mix(in srgb, var(--stamp-ink) 55%, transparent);
  padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px;
}
.stamp .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; line-height: 1.3; text-transform: uppercase; }
.stamp .top span { letter-spacing: 0.12em; font-size: 0.6875rem; }
.stamp .top em { font-style: normal; letter-spacing: 0.04em; font-size: 0.9375rem; padding: 0 6px; flex: none; white-space: nowrap; text-transform: none; }
.stamp .art { border: 1px solid color-mix(in srgb, var(--stamp-ink) 40%, transparent); background: #fffdf5; padding: 5px; }
.stamp .art img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.stamp h3 { font-size: 1.375rem; line-height: 1.15; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; margin-top: 2px; }
.stamp .sci { font-style: italic; text-align: center; font-size: 0.9375rem; line-height: 1.3; }
.stamp .tiny { font-size: 0.625rem; line-height: 1.4; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; opacity: 0.85; }
.stamp.s-in-development .top em { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.stamp.s-demo .top em { background: color-mix(in srgb, var(--sea) 30%, transparent); }
.stamp.s-released .top em { background: color-mix(in srgb, var(--leaf) 35%, transparent); }
.stamp.l { --base: -2.2deg; }
.stamp.r { --base: 1.8deg; }
a.stamp:hover, a.stamp:focus-visible { --base: 0deg; translate: 0 -4px; }

/* ---------- spirit in practice ---------- */
.spirit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.spirit-head h2 { font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1.04; }
.spirit { border-top: 2px solid var(--ink); }
.spirit .row {
  display: grid; grid-template-columns: 170px minmax(0, 270px) minmax(0, 1fr); gap: 6px 32px; align-items: center;
  padding: 20px 0; border-bottom: var(--rule);
}
.spirit .mi { width: 160px; max-width: 100%; height: auto; }
.spirit .w { font-size: clamp(2.25rem, 5.6vw, 3.75rem); line-height: 1.05; }
.spirit .w small { display: block; font-size: 0.8125rem; line-height: 1.3; font-style: italic; color: var(--ink-soft); margin-top: 2px; }
.spirit .m { font-size: 1.25rem; line-height: 1.45; max-width: 40ch; }

/* ---------- footer ---------- */
.foot { padding-block: 24px 0; }
.walk { position: relative; height: 56px; }
.walk .cat {
  position: absolute; bottom: -3px; left: 4%; width: 52px; height: 52px;
  transition: left 14s cubic-bezier(0.3, 0.6, 0.4, 1);
}
.walk.go .cat { left: calc(88% - 52px); }
.walk.still .cat { transition: none; left: calc(88% - 52px); }
.walk .cat svg { width: 100%; height: 100%; display: block; }
.foot .rule { border-top: 3px solid var(--ink); }
.foot .cols { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.8fr)); gap: 20px 40px; padding-top: 22px; }
.foot h2 { font-size: 0.75rem; line-height: 1.3; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; font-weight: 400; }
.foot ul { display: flex; flex-direction: column; gap: 4px; }
.foot a { text-decoration: none; border-bottom: 1px solid transparent; }
.foot a:hover, .foot a[aria-current] { border-bottom-color: var(--ink); }
.foot .base { margin-top: 24px; padding: 14px 0 max(28px, env(safe-area-inset-bottom, 0px)); border-top: var(--rule); display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; }
.wm { display: flex; flex-direction: column; line-height: 1; }
.wm b { font-weight: 400; font-size: 2.25rem; }
.wm small { font-size: 0.625rem; letter-spacing: 0.42em; margin-top: 4px; color: var(--ink-soft); text-transform: uppercase; }

/* ---------- privacy page ---------- */
.doc { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 30px 56px; align-items: start; }
.toc { position: sticky; top: 92px; font-size: 1rem; line-height: 1.45; }
.toc ul { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; border-left: var(--rule); padding-left: 14px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; text-underline-offset: 4px; }
.paper { background: var(--paper-2); padding: clamp(24px, 5vw, 56px); line-height: 1.6; }
.paper p, .paper ul, .paper ol { max-width: 66ch; }
.paper .lead { margin-top: 26px; }
.paper .after { margin-top: 14px; }
.paper h1 { font-size: clamp(1.875rem, 4.6vw, 2.75rem); line-height: 1.08; }
.paper section { margin-top: 52px; padding-top: 34px; border-top: var(--rule); }
.paper h2 { font-size: 1.75rem; line-height: 1.2; margin-bottom: 16px; }
.paper p + p { margin-top: 14px; }
.paper h3 { font-size: 0.8125rem; line-height: 1.3; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin: 28px 0 10px; }
.paper ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.paper h3 + ul, .paper h3 + p { margin-top: 0; }
.paper li { position: relative; padding-left: 22px; }
.paper li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 7px; height: 7px; border-radius: 50%; background: var(--roof); opacity: 0.8; }
.paper li.no::before { background: transparent; border: 1.5px solid var(--ink-soft); width: 8px; height: 8px; }
.paper ol { margin: 4px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.paper ol li { padding-left: 4px; }
.paper ol li::before { display: none; }
.glance-wrap { margin-top: 36px; overflow-x: auto; border: var(--rule); background: var(--paper); }
.glance { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 1rem; line-height: 1.4; }
.glance th, .glance td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: var(--rule); }
.glance thead th { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 400; background: var(--paper-2); }
.glance tbody th { font-weight: 400; }
.glance tr:last-child th, .glance tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  /* on phones each row becomes a small card, so nothing needs sideways scrolling */
  .glance-wrap { overflow: visible; border: 0; background: none; }
  .glance { min-width: 0; }
  .glance thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .glance, .glance tbody, .glance tr, .glance th, .glance td { display: block; }
  .glance tr { background: var(--paper); border: var(--rule); margin-bottom: 10px; padding: 4px 0; }
  .glance th, .glance td { border: 0 !important; padding: 5px 14px; }
  .glance tbody th { font-size: 1.125rem; }
  .glance td::before { content: attr(data-label); display: block; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
}
.paper .short { margin-top: 28px; background: var(--paper); padding: 20px 24px; border-left: 3px solid var(--accent); max-width: 60ch; font-size: 1.25rem; line-height: 1.45; }
.draftflag { display: inline-block; margin-top: 14px; border: 1px dashed var(--roof); padding: 4px 10px; font-size: var(--fs-caption); line-height: 1.35; font-style: italic; }

/* ---------- not found ---------- */
.nf { min-height: 420px; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; padding-block: 24px; }
.nf .in { position: relative; }
.nf .rain { position: absolute; inset: 0; pointer-events: none; }
.nf .rain svg { width: 100%; height: 100%; }
.nf h1 { font-size: clamp(1.875rem, 5vw, 2.875rem); line-height: 1.1; margin-top: 8px; }
.nf p { max-width: 36ch; margin: 8px auto 0; }
.nf .catbox { width: 120px; height: 120px; margin: 0 auto; }
.nf .catbox svg { width: 100%; height: 100%; display: block; }

/* ---------- logo reveals ----------
   The finished logo is the default state. Motion only runs when main.js arms it
   (first visit, no reduced-motion preference). */
.rv { --wl: 1.9s; --wd: 1s; --fl: 1.6s; --ml: 3.2s; overflow: visible; }
.rv .p-path { --dl: 0s; --dd: 0.8s; }
.rv .p-legs { --dl: 0.1s; --dd: 0.8s; }
.rv .p-coat { --dl: 0.6s; --dd: 1s; }
.rv .p-head { --dl: 1s; --dd: 0.8s; }
.rv .p-umb { --dl: 1.2s; --dd: 1.2s; }
.rv .p-tail { --dl: 2s; --dd: 0.7s; }
.rv.fast { --wl: 0.8s; --wd: 0.6s; --fl: 0.9s; --ml: 1.4s; }
.rv.fast .p-legs { --dl: 0s; --dd: 0.4s; }
.rv.fast .p-coat { --dl: 0.15s; --dd: 0.5s; }
.rv.fast .p-head { --dl: 0.35s; --dd: 0.4s; }
.rv.fast .p-umb { --dl: 0.5s; --dd: 0.6s; }
.rv.fast .p-tail { --dl: 0.9s; --dd: 0.4s; }
.rv .path .dr { stroke-opacity: 0.5; }
.rv .path { opacity: 0; } /* the ground and path exist only during the walk-in */
.rip { fill: none; stroke: var(--sea); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.rip:first-child { opacity: 0.4; }
.walker, .bobber { transform-origin: 100px 158px; }
.umb { transform-origin: 100px 146px; }
.tail { transform-origin: 126px 146px; }
.eyes { transform-origin: 100px 98px; }
.ear { transform-origin: 112px 88px; }
/* the hero cat looks toward the pointer: main.js sets --tilt, --ex and --ey */
.umbtilt { transform-origin: 100px 146px; transform: rotate(var(--tilt, 0deg)); transition: transform 0.3s ease; }
.eyelook { transform: translate(var(--ex, 0px), var(--ey, 0px)); transition: transform 0.15s ease; }
.rv.settled .rig, .walk .cat svg .rig, .catbox .rig { filter: url(#pencil); }

@media (prefers-reduced-motion: no-preference) {
  .rv.armed .dr { stroke-dasharray: 1 2; stroke-dashoffset: 1; }
  .rv.armed .wash, .rv.armed .face, .rv.armed .wm-fade, .rv.armed .ripples { opacity: 0; }
  .rv.armed .path { opacity: 1; }
  .rv.armed.run .dr { animation: rvdraw var(--dd, 1s) var(--dl, 0s) ease forwards; }
  .rv.armed.run .wash { animation: rvfade var(--wd) var(--wl) ease forwards; }
  .rv.armed.run .face { animation: rvfade 0.4s var(--fl) ease forwards; }
  .rv.armed.run .wm-fade { animation: rvfade 0.7s var(--ml) ease forwards; }
  .rv.armed.run .ripples { animation: rvfade 0.5s 3s ease forwards; }
  .rv.walk.armed.run .path { animation: rvout 0.6s 2.7s ease forwards; }
  .rv.walk.armed.run .walker { animation: rvwalk 3.4s cubic-bezier(0.15, 0.7, 0.25, 1) both; }
  .rv.walk.idle .umb { animation: rvsway 5s ease-in-out infinite alternate; }
  .rv.walk.idle .tail { animation: rvtail 2.8s ease-in-out infinite alternate; }
  .rv.walk.idle .eyes { animation: rvblink 5.6s 4s infinite; }
  .rv.walk.idle .ear { animation: rvtwitch 7s 3.5s infinite; }
  .rv.walk.idle .bobber { animation: rvbreathe 4.2s ease-in-out 3.6s infinite; }
  .rv.walk.run .bobber { animation: rvstep 0.45s ease-in-out 8 alternate, rvbreathe 4.2s ease-in-out 3.6s infinite; }
  .rv.walk.run .legL { animation: rvleg 0.9s ease-in-out 4; }
  .rv.walk.run .legR { animation: rvleg 0.9s ease-in-out -0.45s 4; }
  .rv.fast.run .ear { animation: rvtwitch1 0.35s 1.75s 1; }
  .rip { animation: rvrip 3.2s ease-out infinite; }
  .rip:nth-child(2) { animation-delay: -1.1s; }
  .rip:nth-child(3) { animation-delay: -2.2s; }
  .walk.go .cat svg { animation: bob 0.7s ease-in-out infinite alternate; }
  .drop { animation: fall 2s linear infinite; }
  .drop:nth-child(2n) { animation-duration: 2.5s; animation-delay: -0.8s; }
  .drop:nth-child(3n) { animation-duration: 3s; animation-delay: -1.5s; }
  .drop2 { animation: fall 3.6s linear infinite; }
  .drop2:nth-child(2n) { animation-duration: 4.4s; animation-delay: -1.3s; }
  .drop2:nth-child(3n) { animation-duration: 5.1s; animation-delay: -2.6s; }
  .waves { animation: wavedrift 22s linear infinite; }
  .boat { animation: sail 52s linear infinite; }
  .boat svg { animation: bobboat 3.4s ease-in-out infinite alternate; }
  .tone-night::after { animation: twinkle 6s ease-in-out infinite alternate; }
}
@media (prefers-reduced-motion: reduce) {
  a.stamp:hover, a.stamp:focus-visible { translate: none; }
  .shot:hover { transform: none; }
}
@keyframes rvdraw { to { stroke-dashoffset: 0; } }
@keyframes rvfade { to { opacity: 1; } }
@keyframes rvout { to { opacity: 0; } }
@keyframes rvwalk { from { transform: translateY(-52px) scale(0.2); } to { transform: translateY(0) scale(1); } }
@keyframes rvstep { from { transform: translateY(0) rotate(-1.4deg); } to { transform: translateY(-3px) rotate(1.4deg); } }
@keyframes rvbreathe { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-1px) scaleY(1.012); } }
@keyframes rvleg { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes rvsway { from { transform: rotate(-1.3deg); } to { transform: rotate(1.3deg); } }
@keyframes rvtail { from { transform: rotate(-5deg); } to { transform: rotate(6deg); } }
@keyframes rvblink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes rvtwitch { 0% { transform: rotate(0); } 2% { transform: rotate(-12deg); } 4% { transform: rotate(4deg); } 6%, 100% { transform: rotate(0); } }
@keyframes rvtwitch1 { 0% { transform: rotate(0); } 30% { transform: rotate(-12deg); } 65% { transform: rotate(4deg); } 100% { transform: rotate(0); } }
@keyframes rvrip { 0% { transform: scale(0.35); opacity: 0.6; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes bob { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-2px) rotate(1.5deg); } }
@keyframes fall { from { transform: translateY(-14px); opacity: 0; } 15% { opacity: 0.8; } to { transform: translateY(40px); opacity: 0; } }
@keyframes wavedrift { to { -webkit-mask-position: 72px 0; mask-position: 72px 0; } }
@keyframes sail { from { transform: translateX(-120px); } to { transform: translateX(calc(100vw + 60px)); } }
@keyframes bobboat { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-4px) rotate(2deg); } }
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 0.6; } }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero, .atelier, .pj-grid, .doc, .foot .cols { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .scene { justify-self: center; max-width: 340px; }
  .pj.flip .pj-text { order: 0; }
  .pj-text .stamp { max-width: 250px; }
  .spirit .row { grid-template-columns: 110px minmax(0, 1fr); }
  .spirit .mi { width: 110px; grid-row: span 2; }
  .spirit .m { grid-column: 2; }
  .toc { position: static; }
  .walk .cat { width: 44px; height: 44px; }
  .walk.go .cat, .walk.still .cat { left: calc(86% - 44px); }
  html { scroll-padding-top: 76px; }
}
@media (max-width: 640px) {
  .collage.row { flex-direction: column; align-items: center; }
  .collage.row .shot { width: 78%; }
  .collage.row .s2 { align-self: flex-end; margin-top: 0; }
  .mf-hero > img { width: 100%; margin-left: 0; }
  /* phones: logo and a three-line button in one slim row; the links open below it */
  .nav { flex-wrap: wrap; gap: 0 10px; padding-block: 6px; }
  .lock svg.navrv, .lock .fallback { width: 128px; }
  .menu-btn { display: block; }
  .nav-right {
    display: none; flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: 12px;
    padding: 4px 0 18px; border-top: var(--rule);
  }
  .topbar.open .nav-right { display: flex; }
  .nav nav, .nav ul { width: 100%; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; font-size: 1.3125rem; padding: 10px 0; border-bottom: 0; }
  .nav ul a:hover, .nav ul a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
  .theme-toggle { margin-block: 0; align-self: flex-start; }
  .theme-toggle .chain { display: none; }
  html { scroll-padding-top: 62px; }
}

/* ---------- hero cat: an embroidered raincoat cat, flipped like stop-motion, with rain that lands on its umbrella ---------- */
.cat-hero { position: relative; width: min(100%, calc(74vh * 0.8667)); margin-left: auto; aspect-ratio: 520 / 600; }
@media (max-width: 760px) { .cat-hero { margin-inline: auto; } }
.cat-hero .puddle {
  position: absolute; left: 50%; bottom: 0; width: 84%; height: 10%; transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sea) 36%, transparent), color-mix(in srgb, var(--sea) 16%, transparent) 68%, transparent 100%);
}
.cat-rig {
  position: absolute; left: 50%; bottom: 2%; height: 86%; aspect-ratio: 480 / 760;
  transform: translateX(-50%) rotate(calc(var(--lean, 0deg) + var(--shake, 0deg))); transform-origin: 50% 97%;
  filter: drop-shadow(0 10px 8px color-mix(in srgb, var(--ink) 24%, transparent));
}
:root[data-theme="dark"] .cat-rig { filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 26%, transparent)) brightness(0.95); }
.cat-sprite { position: absolute; inset: 0; background: url("../assets/img/hero/cat-strip.webp") 0 0 / 500% 100% no-repeat; }
/* the tail is its own layer, behind the body: a still image until hero.js takes over and bends it */
.cat-tail-img { position: absolute; left: 74.58%; top: 50.79%; width: 17.08%; height: auto; }
.cat-tail { position: absolute; left: -10%; top: 0; width: 120%; height: 100%; pointer-events: none; display: none; }
.cat-hero.tail-live .cat-tail { display: block; }
.cat-hero.tail-live .cat-tail-img { visibility: hidden; }
.cat-rain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.cat-hero .cat-poke { left: 16%; top: 8%; width: 68%; height: 92%; border-radius: 28%; z-index: 2; }
.cat-hero .cat-poke:focus-visible { outline: 2px solid var(--ink-soft); outline-offset: -6px; }
.cat-hero.arm .cat-rig, .cat-hero.arm .thread { visibility: hidden; }
.thread { position: absolute; left: 50%; bottom: 2%; width: 74%; transform: translateX(-50%); border-top: 2px dashed var(--roof); opacity: 0; pointer-events: none; z-index: 1; }

@media (prefers-reduced-motion: no-preference) {
  .cat-sprite { animation: cat-flip 10s step-end infinite; }
  .cat-hero.pet .cat-sprite { animation: none; background-position: 25% 0; }
  .cat-hero.stitching .cat-rig { animation: cat-stitch 1.5s steps(32, end) both; }
  .cat-hero.stitching .thread { animation: cat-thread 1.5s steps(32, end) both; }
}
@keyframes cat-stitch { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes cat-thread { 0% { bottom: 2%; opacity: 1; } 92% { opacity: 1; } 100% { bottom: 88%; opacity: 0; } }
@keyframes cat-flip {
  0% { background-position: 0% 0; }
  4.167% { background-position: 50% 0; }
  8.333% { background-position: 0% 0; }
  12.5% { background-position: 75% 0; }
  16.667% { background-position: 0% 0; }
  20.833% { background-position: 100% 0; }
  25% { background-position: 0% 0; }
  29.167% { background-position: 50% 0; }
  33.333% { background-position: 75% 0; }
  37.5% { background-position: 0% 0; }
  41.667% { background-position: 100% 0; }
  45.833% { background-position: 0% 0; }
  50% { background-position: 50% 0; }
  54.167% { background-position: 0% 0; }
  58.333% { background-position: 75% 0; }
  62.5% { background-position: 0% 0; }
  66.667% { background-position: 25% 0; }
  70.833% { background-position: 0% 0; }
  75% { background-position: 100% 0; }
  79.167% { background-position: 0% 0; }
  83.333% { background-position: 75% 0; }
  87.5% { background-position: 50% 0; }
  91.667% { background-position: 0% 0; }
  95.833% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}
