/* saruuly.com v3: "Little apps for brighter days".
   THE RULE: the world is smooth retro cartoon (sky, ribbon, hills, sun, chunky type, phone, podium);
   everything alive, magic or digital is pixel art (the cast, stars, snow, fireworks, app screens, labels).
   Colours come from css/palette.css (generated from js/palette.js). */

@font-face { font-family: 'Fraunces'; src: url(../fonts/fraunces-900-soft-latin.woff2) format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url(../fonts/pixelify-sans-latin.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(../fonts/dm-sans-latin.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --f-display: 'Fraunces', 'Cooper Black', Georgia, serif;
  --f-pixel: 'Pixelify Sans', ui-monospace, monospace;
  --f-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --P: 4px;               /* the pixel unit for sprites on desktop (integer scaling only) */
  --mq-h: 0px;            /* marquee height (season only) */
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
html[data-season='newyear'] { --mq-h: 36px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night-900); scroll-behavior: smooth; }
html.still { scroll-behavior: auto; }
body { margin: 0; font-family: var(--f-body); font-size: 18px; line-height: 1.5; color: var(--cream-100); background: var(--night-900); overflow-x: clip; }
img, svg, canvas { display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--cream-100); color: var(--ink); border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--yellow-400); outline-offset: 4px; }

/* pixel sprites: always crisp, never smoothed */
img[src*='/px/'], .fx { image-rendering: pixelated; image-rendering: crisp-edges; }
@supports (image-rendering: pixelated) { img[src*='/px/'], .fx { image-rendering: pixelated; } }

/* ---------- the New Year layer ---------- */
.season-only, .season-on { display: none !important; }
html[data-season='newyear'] .season-only { display: block !important; }
html[data-season='newyear'] .season-on { display: revert !important; }
html[data-season='newyear'] .season-off { display: none !important; }

/* ---------- marquee (pixel font, stepped) ---------- */
.marquee { position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: var(--mq-h); overflow: hidden;
  background: var(--pink-500); color: var(--ink); border-bottom: 3px solid var(--ink); }
.mq-track { display: flex; width: max-content; height: 100%; align-items: center; will-change: transform; }
.mq-run { display: flex; align-items: center; gap: 22px; padding-right: 22px; white-space: nowrap;
  font: 500 18px/1 var(--f-pixel); letter-spacing: .06em; }
.spark { display: inline-block; width: 15px; height: 15px; background: url(../img/px/spark.svg) center / 15px 15px no-repeat; image-rendering: pixelated; }

/* ---------- nav ---------- */
.nav { position: absolute; z-index: 30; top: var(--mq-h); left: 0; right: 0; height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 40px; }
.brand { justify-self: start; display: block; padding: 6px; margin-left: -6px; }
.brand img { width: 45px; height: 45px; }
.brand { margin-top: 4px; }
.nav ul { display: flex; gap: 40px; }
.nav ul a { font-weight: 500; font-size: 17px; text-decoration: none; letter-spacing: .01em; opacity: .92; }
.nav ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.pill { justify-self: end; display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 999px;
  background: var(--cream-100); color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none;
  border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.pill:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
/* the right end of the nav: the pause toggle (only when something moves) and "Say hi" */
.nav-end { justify-self: end; display: flex; align-items: center; gap: 14px; }
.px-toggle { display: grid; place-items: center; width: 42px; height: 42px; margin: 0; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--cream-100); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); -webkit-tap-highlight-color: transparent;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
@media (hover: hover) { .px-toggle:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); } }
.px-toggle img { width: 14px; height: 14px; }
.px-toggle .i-play, .px-toggle[aria-pressed='true'] .i-pause { display: none; }
.px-toggle[aria-pressed='true'] .i-play { display: block; }
/* the New Year music toggle (js/music-button.js, in season only), right after the pause toggle. Its own class, never
   .px-toggle (ambient.js once took the first .px-toggle as the pause control): the same chip, copied, so restyle both
   together. Yellow while the music is on (aria-pressed). Loading (.loading + aria-busy): the note dims, and bobs only
   while motion is on and not paused (html.motion, not html.frozen), so it stays still but visible otherwise. */
.music-toggle { display: grid; place-items: center; width: 42px; height: 42px; margin: 0; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--cream-100); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); -webkit-tap-highlight-color: transparent;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
@media (hover: hover) { .music-toggle:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); } }
/* both chips press down when tapped (the lift above only where there is a mouse: on a phone it stuck after a tap) */
.px-toggle:active, .music-toggle:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.music-toggle img { width: 14px; height: 14px; }
.music-toggle[aria-pressed='true'] { background: var(--yellow-400); }
.music-toggle.loading img { opacity: .55; }
html.motion:not(.frozen) .music-toggle.loading img { animation: note-bob .9s steps(2) infinite; }
@keyframes note-bob { 50% { transform: translateY(-2px); } }
@media (max-width: 760px) { .music-toggle { width: 38px; height: 38px; } }
/* in season the nav's right end holds two chips; on narrow tablets (761-900 px) the links and the chips keep apart */
@media (min-width: 761px) and (max-width: 900px) { html[data-season='newyear'] .nav ul { gap: 28px; } html[data-season='newyear'] .nav-end { gap: 10px; } }
/* its floating copy (made by js/music-button.js on the first tap): top right, shown only while the music plays or loads
   and the nav's chip has scrolled out of view; a tap stops the music. Above the snow (20) and the footer (21), like the
   nav. It appears and goes without any motion. */
.music-float { position: fixed; z-index: 30; top: max(16px, calc(env(safe-area-inset-top) + 8px)); right: max(16px, calc(env(safe-area-inset-right) + 8px)); }
/* the music credit: a second footer line under the © line, shown in season only (.season-only) */
.foot .music-credit { max-width: 64ch; margin: 6px auto 0; font-size: 14px; font-weight: 400; line-height: 1.45; }

/* ---------- chapters ---------- */
.ch { position: relative; display: flow-root; overflow: clip; isolation: isolate; }
/* SEPARABLE SKIES: every chapter paints its sky on its own .sky layer (z 0), never on the section itself.
   --sky-top / --sky-bottom name the edge colours, so the scroll step can hide the .sky layers and paint ONE
   continuous sky behind the page (or blend the hard edges) without touching the content. */
.sky { position: absolute; inset: 0; z-index: 0; background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom)); }
.ch-inner { position: relative; z-index: 6; max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* film grain: a soft feTurbulence tile over the smooth world, never over pixel sprites */
.ch-hero::after, .alarm-stage::after, .ch-collab::after, .ch-journey::after, .ch-about::after, .ch-contact::after, .ch-midnight::after, .foot::after {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: url(../img/grain.svg) 0 0 / 220px 220px; opacity: .085; mix-blend-mode: overlay; }
.ch-about::after, .foot::after { opacity: .06; mix-blend-mode: multiply; }

.fx { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; }

/* ---------- 0. hero: New Year's Eve ---------- */
.ch-hero { --wm-y: clamp(318px, calc(28svh + 84px), 420px); height: clamp(760px, 100svh, 1120px); color: var(--cream-100);
  --sky-top: var(--night-900); --sky-bottom: #D2659E; }
.ch-hero > .sky { background: linear-gradient(to bottom,
  var(--night-900) 0%, var(--night-800) 34%, var(--night-700) 56%, #4E3096 68%, #A24E9F 79%, #D2659E 86%); background: linear-gradient(in oklch to bottom,
  var(--night-900) 0%, var(--night-800) 34%, var(--night-700) 56%, #4E3096 68%, #A24E9F 79%, #D2659E 86%); }
.stage { position: absolute; z-index: 2; left: 50%; top: var(--wm-y); width: 0; height: 0; }
.ribbon { position: absolute; }
.ribbon-hero { left: -720px; top: -335px; width: 1440px; height: 900px; overflow: visible; }
.ribbon-hero-m { display: none; }

.hero-copy { position: absolute; z-index: 7; left: 0; right: 0; top: calc(var(--wm-y) - 142px);
  display: flex; flex-direction: column; align-items: center; text-align: center; }
.wordmark { font: 900 clamp(150px, 19.4vw, 248px)/1.08 var(--f-display); letter-spacing: -.012em; color: var(--cream-100);
  font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144; padding: 0 30px 0 0; }
.wm { display: inline-block; -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill;
  text-shadow:
    1px 1px 0 var(--ink), 2px 2px 0 var(--ink), 3px 3px 0 var(--ink),
    4px 4px 0 var(--violet-500), 5px 5px 0 var(--violet-500), 6px 6px 0 var(--violet-500), 7px 7px 0 var(--violet-500),
    8px 8px 0 var(--violet-500), 9px 9px 0 var(--violet-500), 10px 10px 0 var(--violet-500), 11px 11px 0 var(--violet-500),
    12px 12px 0 var(--violet-500), 13px 13px 0 var(--violet-500), 14px 14px 0 var(--ink), 15px 15px 0 var(--ink), 16px 16px 0 var(--ink), 17px 17px 0 var(--ink); }
.tagline { margin-top: 30px; font-weight: 500; font-size: 26px; letter-spacing: .005em; color: var(--cream-100); }

/* the pixel button: stepped corners, hard pixel shadow */
.px-btn { --b: var(--P); position: relative; display: inline-flex; align-items: center; gap: 12px; margin-top: 34px;
  padding: 14px 26px 14px 28px; background: var(--pink-500); color: var(--ink); text-decoration: none;
  font: 600 24px/1 var(--f-pixel); letter-spacing: .02em;
  box-shadow:
    inset 0 var(--b) 0 0 #FF8DB8, inset 0 calc(var(--b) * -1) 0 0 #E2447F,
    0 calc(var(--b) * -1) 0 0 var(--ink), 0 var(--b) 0 0 var(--ink), calc(var(--b) * -1) 0 0 0 var(--ink), var(--b) 0 0 0 var(--ink),
    0 calc(var(--b) * 2) 0 0 var(--ink), var(--b) calc(var(--b) * 2) 0 0 var(--night-900), calc(var(--b) * 2) var(--b) 0 0 var(--night-900);
  transition: transform .12s steps(2); }
.px-btn:hover { transform: translateY(calc(var(--b) * -1)); }
.px-btn:active { transform: translateY(var(--b)); }
.px-btn .arw { font-size: 24px; }

/* ground: centre-anchored at 1:1 so sprites stay on integer pixels */
.ground { position: absolute; left: 50%; left: round(down, 50%, 1px); bottom: 0; width: 2560px; height: 380px; margin-left: -1280px; }
.hills { position: absolute; left: 0; bottom: 0; z-index: 3; }
.hills-m { display: none; }
/* left: 1725 px of the 2560 ground (the approved f1 at 1440); on narrower desktops it stays 30 px inside the right edge */
.tree { position: absolute; z-index: 5; left: min(1725px, calc(1280px + 50vw - 230px)); left: min(1725px, 1280px + round(up, 50vw, 1px) - 230px); bottom: 132px; width: calc(50 * var(--P)); height: calc(60 * var(--P)); }
.tree .fir { width: 100%; height: 100%; }
.gifts { position: absolute; z-index: 2; left: calc(-9 * var(--P)); bottom: calc(2 * var(--P)); width: calc(34 * var(--P)); height: calc(15 * var(--P)); }
/* two small snowy firs on the crest of the left hill: they frame the scene (like Pixo's trees) and fill the empty snow */
.far-fir { position: absolute; z-index: 4; }
.far-fir-1 { left: 612px; bottom: 160px; width: calc(26 * var(--P)); height: calc(36 * var(--P)); }
.far-fir-2 { left: 724px; bottom: 150px; width: calc(20 * var(--P)); height: calc(28 * var(--P)); }
/* (the cast in the hero: see "the cast" below) */

.ch-hero .fx-front { z-index: 6; }

/* ---------- 1. midnight: a short beat (season) or a calm passage of stars (evergreen) ---------- */
.ch-midnight { --sky-top: var(--night-900); --sky-bottom: var(--night-700); height: clamp(380px, 56svh, 600px);
  display: grid; place-items: center; color: var(--cream-100); }
.ch-midnight > .sky { background: linear-gradient(to bottom, var(--night-900) 0%, var(--night-800) 45%, var(--night-700) 100%); background: linear-gradient(in oklch to bottom, var(--night-900) 0%, var(--night-800) 45%, var(--night-700) 100%); }
html[data-season='newyear'] .ch-midnight { height: max(560px, 80svh); }
html[data-season='newyear'] .ch-midnight > .sky { background: linear-gradient(to bottom, var(--night-900) 0%, var(--night-900) 30%, var(--night-800) 70%, var(--night-700) 100%); background: linear-gradient(in oklch to bottom, var(--night-900) 0%, var(--night-900) 30%, var(--night-800) 70%, var(--night-700) 100%); }
.year-beat { text-align: center; }
.year { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.year-hi { font: 500 24px/1 var(--f-pixel); letter-spacing: .05em; padding: 11px 18px 10px; background: var(--ink); color: var(--cream-100);
  box-shadow: 0 0 0 3px var(--pink-500), 6px 6px 0 3px var(--ink); }
/* the year: cream face, ink edge, and a retro extrusion in the ribbon's own stripes (yellow, orange, pink, violet) */
.year-num { display: block; font: 900 clamp(150px, 25vw, 340px)/.92 var(--f-display); color: var(--cream-100); letter-spacing: -.01em;
  font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144; -webkit-text-stroke: 9px var(--ink); paint-order: stroke fill; padding-right: 22px;
  text-shadow:
    1px 1px 0 var(--ink), 2px 2px 0 var(--ink), 3px 3px 0 var(--ink),
    4px 4px 0 var(--yellow-400), 5px 5px 0 var(--yellow-400), 6px 6px 0 var(--yellow-400), 7px 7px 0 var(--yellow-400),
    8px 8px 0 var(--orange-500), 9px 9px 0 var(--orange-500), 10px 10px 0 var(--orange-500), 11px 11px 0 var(--orange-500),
    12px 12px 0 var(--pink-500), 13px 13px 0 var(--pink-500), 14px 14px 0 var(--pink-500), 15px 15px 0 var(--pink-500),
    16px 16px 0 var(--violet-500), 17px 17px 0 var(--violet-500), 18px 18px 0 var(--violet-500), 19px 19px 0 var(--violet-500),
    20px 20px 0 var(--ink), 21px 21px 0 var(--ink), 22px 22px 0 var(--ink); }

/* ---------- shared chapter type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 18px/1 var(--f-pixel); letter-spacing: .04em;
  padding: 9px 14px 8px; background: var(--ink); color: var(--cream-100); }
.display { font: 900 clamp(48px, 6.2vw, 84px)/1.02 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 1; letter-spacing: -.01em; word-spacing: .1em; }
.lead { font-size: 21px; line-height: 1.5; max-width: 30em; }

/* ---------- 2. dawn: the alarm, a pinned walkthrough Wake -> Walk -> Snap -> Shine ----------
   Static by default (no JS, reduced motion): four phones in a row (a snap row on phones).
   .motion (JS, motion allowed): .alarm-stage is sticky; .step-run below it gives the pinned scroll (4 x --step-len);
   the active step is [data-step] on the section. js/walkthrough.js measures --stage-h. At the Snap step the stage is the
   approved f2 frame. */
.ch-alarm { --step-len: 50svh; --sky-top: var(--night-700); --sky-bottom: var(--butter-200); color: var(--cream-100); overflow: visible; }
.alarm-stage { position: relative; min-height: 100svh; padding: 150px 0 90px; overflow: clip; isolation: isolate; }
/* static: the top 900 px are the f2 sky, sun and hills (stops in px, so the ink lead always sits on rose);
   below the hills the snow continues, and the four phones stand on it in a row */
.alarm-stage > .sky { background: linear-gradient(to bottom, var(--night-700) 0px, var(--violet-600) 189px, var(--rose-400) 423px, var(--apricot-300) 630px, var(--butter-200) 828px); background: linear-gradient(in oklch to bottom, var(--night-700) 0px, var(--violet-600) 189px, var(--rose-400) 423px, var(--apricot-300) 630px, var(--butter-200) 828px); }
.alarm-stage::before { content: ''; position: absolute; z-index: 3; left: 0; right: 0; top: 880px; bottom: 0; background: var(--cream-100); }
.sun { position: absolute; z-index: 1; left: 50%; top: 310px; margin-left: -236px; }
.dawn-hills { position: absolute; z-index: 3; left: 50%; top: 600px; margin-left: -1280px; }
.motion .alarm-stage { display: flex; align-items: center; padding: 70px 0 110px; }
.motion .alarm-stage > .sky { background: linear-gradient(to bottom, var(--night-700) 0%, var(--violet-600) 21%, var(--rose-400) 47%, var(--apricot-300) 70%, var(--butter-200) 92%); background: linear-gradient(in oklch to bottom, var(--night-700) 0%, var(--violet-600) 21%, var(--rose-400) 47%, var(--apricot-300) 70%, var(--butter-200) 92%); }
.motion .alarm-stage::before { display: none; }
.motion .sun { top: auto; bottom: calc(-310px - var(--land-dy, 0px)); translate: 0 var(--sun-y, 0px); } /* --sun-y: the sunrise through the walkthrough (js) */
/* --land-dy (js, short windows only): the land moves down so the hills never touch the last line of copy */
.motion .dawn-hills { top: auto; bottom: calc(0px - var(--land-dy, 0px)); }
.step-run { display: none; }
/* --pin-top: where the stage sticks. Bottom-aligned by default (a stage taller than the screen); on phones js/walkthrough.js
   may pin it a little higher so the screen's top edge never slices a line of copy */
.ch-alarm { --pin-top: min(0px, calc(100svh - var(--stage-h, 100svh))); }
.step-anchor { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none;
  top: calc(-1 * var(--pin-top) + (var(--i) + .5) * var(--step-len)); }

.alarm-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'foot' 'chips' 'phones'; row-gap: 22px; width: 100%; }
.ch-alarm .copy { grid-area: copy; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 716px; }
.copy-foot { grid-area: foot; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.walk { display: contents; }
.ch-alarm .display { color: var(--cream-100); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--ink), 6px 6px 0 var(--ink); max-width: 11.5em; }
/* the static walkthrough (no JS, reduced motion) has a wider copy column on tablets: no lone "up for." there
   (the pinned stage keeps the approved break "An alarm you have / to get up for.") */
html:not(.motion) .ch-alarm .display { text-wrap: balance; }
.ch-alarm .lead { color: var(--ink); font-weight: 500; max-width: 26em; }
.chips { grid-area: chips; display: none; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 13px 8px; border: 0; border-radius: 0; cursor: pointer;
  font: 500 18px/1 var(--f-pixel); background: var(--cream-100); color: var(--ink);
  box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink), 3px 6px 0 var(--ink);
  transition: transform .12s steps(2); -webkit-tap-highlight-color: transparent; }
.chip:hover { transform: translateY(-2px); }
/* keyboard focus: a stitched (dashed) frame around the chip, clearly unlike its own pixel border */
.ch-alarm .chip:focus-visible { outline: 3px dashed var(--ink); outline-offset: 7px; border-radius: 0; transform: translateY(-2px); }
.chip[aria-current='step'] { background: var(--yellow-400); }
.chip img, .phone-cap img { width: 18px; height: 18px; }
.ch-alarm :focus-visible { outline-color: var(--ink); }
.privacy-pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--cream-100); font-weight: 700; font-size: 17px; }
.privacy-pill img { width: 18px; height: 22px; }
.soon { font-weight: 700; font-size: 17px; color: var(--ink); }

/* the phone: everything scales with --sp (the screen's pixel unit: 4 px in the stage, 3 px in rows), so the
   pixel screens always sit on whole pixels. At --sp 4 these are exactly the approved f2 sizes. */
.phones-wrap { grid-area: phones; position: relative; --sp: 4px; margin-top: 96px; }
.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 34px; }
.phone figure { position: relative; margin: 0; }
.phone-body { position: relative; width: calc(75 * var(--sp)); height: calc(150 * var(--sp)); border-radius: calc(13 * var(--sp));
  background: var(--cream-100); border: calc(1.25 * var(--sp)) solid var(--ink); box-shadow: calc(3.5 * var(--sp)) calc(3.5 * var(--sp)) 0 var(--ink); padding: calc(4 * var(--sp)); }
.phone-body::before { content: ''; position: absolute; top: calc(6.5 * var(--sp)); left: 50%; width: calc(17.5 * var(--sp)); height: calc(2.5 * var(--sp));
  margin-left: calc(-8.75 * var(--sp)); border-radius: 9px; background: var(--ink); z-index: 2; }
.screen { position: relative; width: calc(65 * var(--sp)); height: calc(139.5 * var(--sp)); border-radius: calc(9.5 * var(--sp)); overflow: hidden;
  background: var(--night-800); border: var(--sp) solid var(--ink); }
.screen-art { position: absolute; left: 0; top: 0; width: calc(63 * var(--sp)); height: calc(137 * var(--sp)); }
.scr-time, .scr-label { position: absolute; left: 0; right: 0; text-align: center; font-family: var(--f-pixel); color: var(--cream-100); line-height: 1; white-space: nowrap; }
.scr-time { top: calc(6 * var(--sp)); font-size: calc(6 * var(--sp)); font-weight: 600; }
.scr-label { top: calc(102 * var(--sp)); font-size: calc(4.5 * var(--sp)); }
.scr-time.big { top: calc(12 * var(--sp)); font-size: calc(15 * var(--sp)); letter-spacing: .02em; }
.phone[data-step='wake'] .scr-label { top: calc(79 * var(--sp)); }
.phone[data-step='walk'] .scr-label { top: calc(112 * var(--sp)); }
.phone[data-step='shine'] .scr-label { top: calc(64 * var(--sp)); font-size: calc(5 * var(--sp)); font-weight: 600; }
.scr-time.ink, .scr-label.ink { color: var(--ink); }
.phone-cap { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 26px; font: 500 18px/1 var(--f-pixel); color: var(--ink); }

/* (the star ringing on the phone, the Sleepyhead beside it, Santa asleep: see "the cast" below) */

/* static row on desktop: smaller phones (3 px pixels), each with its step name, standing on the snow */
.ch-alarm .phones-wrap { --sp: 3px; margin-top: 110px; }

/* motion: the pinned stage (the approved f2 composition), the four screens stacked in one phone */
/* the pinned scroll is cream: when the iOS toolbar collapses (viewport svh -> lvh) the strip under the stuck stage
   continues the dawn snow instead of showing the night */
.motion .ch-alarm .step-run { display: block; height: calc(4 * var(--step-len)); background: var(--cream-100); }
.motion .alarm-stage { position: sticky; top: var(--pin-top); }
.motion .chips { display: flex; }
.motion .ch-alarm .phones-wrap { --sp: 4px; margin-top: 96px; }
.motion .phones { display: grid; }
.motion .phones > .phone { grid-area: 1 / 1; }
.motion .phone:not(:first-child) .phone-body { background: none; border-color: transparent; box-shadow: none; }
.motion .phone:not(:first-child) .screen { clip-path: inset(0 0 100% 0); transition: clip-path .42s steps(7, end); }
.motion .phone.is-shown .screen { clip-path: inset(0); }
.motion .phone-cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
@media (min-width: 761px) {
  .motion .alarm-grid { grid-template-columns: minmax(0, 1fr) 380px; column-gap: 64px;
    grid-template-rows: 1fr auto auto auto 1fr; grid-template-areas: '. phones' 'copy phones' 'chips phones' 'foot phones' '. phones'; }
  .motion .ch-alarm .phones-wrap { grid-row: 1 / -1; align-self: center; justify-self: center; }
}

/* ---------- 3. noon: mnCollab ---------- */
.ch-collab { min-height: 100svh; display: flex; align-items: flex-end; padding: 120px 0 148px; color: var(--ink); }
.noon-ground { position: absolute; z-index: 2; left: 50%; bottom: 0; margin-left: -1280px; }
.ch-collab { --sky-top: var(--sky-300); --sky-bottom: #BDE6FF; }
.ch-collab > .sky { background: linear-gradient(to bottom, var(--sky-300), #BDE6FF); background: linear-gradient(in oklch to bottom, var(--sky-300), #BDE6FF); }
.clouds { position: absolute; z-index: 1; left: 50%; top: 0; margin-left: -1280px; }
/* the left cloud keeps its place above the words at any window height: the words are bottom-aligned, so it is too
   (its box is the chapter's 900 px design height, so at 1440 x 900 nothing moves) */
@media (min-width: 1000px) { .clouds-a { top: auto; bottom: 0; } }
.collab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 48px; align-items: end; width: 100%; }
.ch-collab .copy { align-self: center; padding-bottom: 40px; }
.ch-collab .copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.ch-collab .display { font-size: clamp(64px, 8vw, 120px); color: var(--cream-100); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--ink), 6px 6px 0 var(--pink-500), 8px 8px 0 var(--pink-500), 10px 10px 0 var(--ink); }
.ch-collab .lead { font-weight: 500; font-size: 24px; }
.live .dot { width: 10px; height: 10px; background: var(--pink-500); box-shadow: 0 0 0 2px var(--ink); }
.ch-collab :focus-visible { outline-color: var(--ink); }
.motion .live .dot { animation: live 1.2s steps(2, jump-none) infinite; }
@keyframes live { 50% { opacity: .25; } }
.text-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.text-link img { width: 14px; height: 14px; }
.podium-scene { position: relative; width: 100%; max-width: 600px; aspect-ratio: 600 / 520; justify-self: end; }
.podium { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; }
/* (the podium's three and the star with the medal: see "the cast" below) */
.podium-scene::after { content: ''; position: absolute; left: -10px; right: 0; bottom: -14px; height: 18px; border-radius: 50%; background: rgba(30, 26, 77, .14); z-index: -1; }

/* ---------- 4. dusk: mnJourney ---------- */
.ch-journey { --sky-top: #3A2C93; --sky-bottom: #FFB79C; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-start;
  padding: clamp(110px, 17svh, 170px) 0 0; text-align: center; color: var(--cream-100); }
.ch-journey > .sky { background: linear-gradient(to bottom, #3A2C93 0%, #4E3AB4 26%, var(--violet-500) 46%, #A36ED6 64%, #E58DBE 79%, #FFB79C 92%); background: linear-gradient(in oklch to bottom, #3A2C93 0%, #4E3AB4 26%, var(--violet-500) 46%, #A36ED6 64%, #E58DBE 79%, #FFB79C 92%); }
.journey-copy { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ch-journey .display { font-size: clamp(64px, 8.4vw, 124px); color: var(--cream-100); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--ink), 6px 6px 0 var(--night-700), 8px 8px 0 var(--night-700), 10px 10px 0 var(--ink); }
.ch-journey .lead { font-weight: 500; font-size: 22px; }
.dusk-land { position: relative; z-index: 3; flex: 1 0 auto; min-height: 330px; margin-top: 40px; }
.ridges { position: absolute; left: 50%; bottom: 0; margin-left: -1280px; }
/* the caravan stands on the far ridge's plateau (x 1360..1720 of the 2560 frame), 3 px pixels: tiny and far */
.caravan { position: absolute; left: 50%; bottom: 248px; margin-left: 100px; width: calc(96 * 3px); height: calc(21 * 3px); }
/* (the Traveller and the Moth on the near ridge, the star peeking over it: see "the cast" below) */
/* the evening star: low in the west, behind the travellers (they walk east, away from it) */
.evening-star { position: absolute; left: 50%; bottom: 330px; margin-left: -520px; width: calc(9 * 4px); height: calc(9 * 4px); }

/* ---------- 5. about: soft cream, the name's meaning, the stitching, the company; then the principles ---------- */
.ch-about { --sky-top: var(--cream-100); --sky-bottom: var(--cream-200); color: var(--ink); padding: 150px 0 150px; }
.ch-about > .sky { background: linear-gradient(to bottom, var(--cream-100) 0%, var(--cream-100) 55%, var(--cream-200) 100%); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px 72px; align-items: end; }
.about-h { font: 900 clamp(44px, 5.2vw, 74px)/1.04 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 1; letter-spacing: -.01em; word-spacing: .06em; text-wrap: balance; }
.about-lines { display: flex; flex-direction: column; gap: 22px; padding-bottom: 8px; }
.stitch-line { font-size: 23px; line-height: 1.45; font-weight: 500; }
.company { font-size: 19px; line-height: 1.5; }
/* the ribbon passes through here as a stitched seam (kept clear). The star sews it level, between the words and the patches:
   the lane is 24 px taller than before the cast (its star is 12 sprite rows taller than the old one) */
.seam-lane { height: clamp(120px, calc(10vw + 24px), 174px); }
.ch-inner.principles-wrap { position: relative; padding-top: 36px; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
/* each principle is a sewn patch: cream cloth, ink edge, a running stitch inside, a pixel icon on a coloured badge */
.patch { position: relative; padding: 30px 30px 32px; background: var(--cream-100); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink); }
.patch::before { content: ''; position: absolute; inset: 9px; border: 2px dashed var(--lilac-300); border-radius: 18px; pointer-events: none; }
.patch .badge { position: relative; display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 20px; border-radius: 50%;
  border: 4px solid var(--ink); background: var(--pink-200); }
.p-reliable .badge { background: var(--yellow-200); }
.p-private .badge { background: #DCD2FF; }
.patch .badge img { width: 64px; height: 64px; }
.patch h3 { position: relative; font: 900 36px/1.1 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.patch p { position: relative; margin-top: 6px; font-size: 19px; font-weight: 500; }
/* (our little morning star now peeks at dusk, see .peek; the thread's seam passes above the patches) */

/* ---------- 6. night again: contact + footer ---------- */
/* (padding, not the slot's margin: a first child's margin would collapse through the section and open a gap above its sky) */
.ch-contact { --sky-top: var(--night-900); --sky-bottom: #4E3096; padding: clamp(90px, 13svh, 140px) 0 0; text-align: center; color: var(--cream-100); }
.ch-contact > .sky { background: linear-gradient(to bottom, var(--night-900) 0%, var(--night-800) 40%, var(--night-700) 66%, #4E3096 80%); background: linear-gradient(in oklch to bottom, var(--night-900) 0%, var(--night-800) 40%, var(--night-700) 66%, #4E3096 80%); }
/* room for the ribbon's 3-loop knot, one loop per app (drawn by the scroll step) */
.knot-slot { position: relative; z-index: 5; width: min(340px, 70vw); height: clamp(170px, 22svh, 240px); margin: 0 auto; }
.contact-copy { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.ch-contact .display { font-size: clamp(72px, 9.6vw, 140px); color: var(--cream-100); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--violet-500), 6px 6px 0 var(--violet-500), 8px 8px 0 var(--violet-500), 10px 10px 0 var(--violet-500), 12px 12px 0 var(--ink); }
.email { font: 900 clamp(34px, 5.2vw, 70px)/1.1 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 1; color: var(--yellow-400); text-decoration: none;
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink), 5px 5px 0 var(--ink); overflow-wrap: anywhere; }
.email:hover { text-decoration: underline; text-decoration-thickness: 5px; text-underline-offset: 12px; text-decoration-color: var(--pink-500); }
.ch-contact :focus-visible { outline-color: var(--cream-100); }
.night-land { position: relative; z-index: 3; height: 300px; margin-top: 60px; }
.night-hills { position: absolute; left: 50%; bottom: 0; margin-left: -1280px; }
/* (the row on the snow, the fir and the sleeping star: see "the cast" below) */
.foot { position: relative; isolation: isolate; background: var(--cream-100); color: var(--ink); padding: 6px 40px 44px; text-align: center; font-size: 16px; font-weight: 500; }
.foot .nw { white-space: nowrap; }
@media (max-width: 540px) { .foot .nw:first-child { display: block; } .foot .sep:nth-child(2) { display: none; } }
.foot a { text-underline-offset: 4px; text-decoration-thickness: 2px; }
.foot :focus-visible { outline-color: var(--ink); }
/* the footer sits above the season's snow (.world-front, z 20): cream flakes are invisible on its cream anyway, but they
   bit holes in its ink letters */
.foot { z-index: 21; }
/* In season the music credit makes the footer 3 lines (desktop) to 5-6 lines (phones) taller. The end of the story gives
   that room back (less footer padding, the snowy land closer to the email; phones also set the credit a size smaller),
   so at the very bottom the thread's knot sits about where it did before the credit (the owner's end screen). */
html[data-season='newyear'] .foot { padding-bottom: 20px; }
html[data-season='newyear'] .night-land { margin-top: 17px; }
@media (min-width: 761px) and (max-height: 800px) { html[data-season='newyear'] .night-land { height: 227px; margin-top: 0; } }

/* ---------- tablets (761-1180) ---------- */
@media (min-width: 761px) and (max-width: 1180px) {
  .tree { --P: 3px; left: calc(1280px + 50vw - 150px - 24px); left: calc(1280px + round(up, 50vw, 1px) - 174px); bottom: 128px; }
  .hero-copy { top: calc(var(--wm-y) - 120px); }
  .motion .alarm-grid { grid-template-columns: minmax(0, 1fr) 289px; column-gap: 40px; } /* (odd: the phone on a whole pixel) */
  .motion .ch-alarm .phones-wrap { --sp: 3px; margin-top: 76px; }
  /* static (no JS, reduced motion): the four steps as a 2 x 2 */
  html:not(.motion) .phones { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 44px 56px; }
  .collab-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 32px; }
  .podium-scene { --P: 3px; max-width: 460px; }
  .about-grid { gap: 34px 48px; }
  .principles { gap: 22px; }
  .patch { padding: 26px 22px 28px; }
  .patch h3 { font-size: 32px; }
}
/* portrait tablets: the noon copy above the podium */
@media (min-width: 761px) and (max-width: 999px) {
  .collab-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .ch-collab .copy { padding-bottom: 0; }
  .podium-scene { justify-self: center; max-width: 520px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .about-h { max-width: 15em; }
  .about-lines { max-width: 36em; }
  .clouds { top: -50px; }
  .clouds-a { top: -96px; }
}
/* laptops with short windows: keep the pinned stage inside the viewport (the star's hat included) */
@media (min-width: 761px) and (max-height: 880px) {
  .motion .alarm-stage { padding: 40px 0 64px; }
}
@media (min-width: 761px) and (max-height: 800px) {
  .ch-contact { padding-top: clamp(64px, 9svh, 100px); }
  .knot-slot { height: clamp(140px, 19svh, 240px); }
  .contact-copy { gap: 18px; }
  .night-land { height: 240px; margin-top: 30px; }
}
/* (up to 860 px tall the 4 px phone would fill the pinned stage and the ringing star's hat would leave it: the whole dawn
   picture, phone and cast, is drawn at 3 px there, one pixel size) */
@media (min-width: 1181px) and (max-height: 860px) {
  .motion .ch-alarm .phones-wrap { --sp: 3px; margin-top: 76px; }
  .motion .alarm-grid { grid-template-columns: minmax(0, 1fr) 289px; } /* (odd: the 225 px phone centres on a whole pixel) */
}

/* ---------- phones: recomposed, not shrunk ---------- */
@media (max-width: 760px) {
  :root { --P: 3px; --nav-h: 64px; }
  html[data-season='newyear'] { --mq-h: 30px; }
  .mq-run { font-size: 15px; gap: 16px; padding-right: 16px; }
  .spark { width: 12px; height: 12px; background-size: 12px 12px; }
  .nav { padding: 0 18px; grid-template-columns: auto 1fr auto; }
  .nav nav { display: none; }
  .brand img { width: 36px; height: 36px; }
  .pill { height: 38px; padding: 0 16px; font-size: 15px; }
  .nav-end { gap: 10px; }
  .px-toggle { width: 38px; height: 38px; }
  /* the copy is placed from the top and the fir from the bottom, so the hero never gets shorter than 820 px: on a short
     screen (an iPhone in Safari with its toolbars) the foot of the fir goes below the fold, never the star under the button.
     Short phones (100svh under 700 px: an iPhone SE, any iPhone in Safari with its toolbars) also move the copy, its button
     and the thread up a little (--short: 0 or 1 px) and the hero is 780 px. Written with svh, which stays put while iOS
     toolbars slide in and out (a max-height query would flip and make the page jump). */
  .ch-hero { --short: clamp(0px, (700px - 100svh) * 1000, 1px);
    --wm-y: calc(var(--mq-h) + var(--nav-h) + 146px - var(--short) * 42); height: max(calc(820px - var(--short) * 40), 100svh); }
  .ribbon-hero { display: none; }
  /* anchored to the left edge (not the centre): its rising part always hugs the edge, at 390 px and at 760 px */
  .ribbon-hero-m { display: block; left: -50vw; top: calc(var(--wm-y) * -1 - var(--short, 0px) * 42); width: 390px; height: 844px; overflow: visible; }
  .hero-copy { top: calc(var(--wm-y) - 52px); }
  .wordmark { font-size: 92px; padding: 0 8px 0 0; }
  .wm { -webkit-text-stroke: 5px var(--ink);
    text-shadow: 1px 1px 0 var(--ink), 2px 2px 0 var(--violet-500), 3px 3px 0 var(--violet-500), 4px 4px 0 var(--violet-500), 5px 5px 0 var(--violet-500), 6px 6px 0 var(--violet-500), 7px 7px 0 var(--ink), 8px 8px 0 var(--ink); }
  .tagline { font-size: 20px; line-height: 1.3; margin-top: 14px; }
  .tagline .nb { display: block; }
  .px-btn { font-size: 21px; padding: 12px 20px 12px 22px; margin-top: calc(28px - var(--short, 0px) * 8); }
  .ground { width: 780px; height: 300px; margin-left: -390px; }
  .hills-d { display: none; }
  .hills-m { display: block; }
  .tree { left: 315px; bottom: 73px; }
  .far-fir { display: none; }
  .ch-inner { padding: 0 22px; }

  /* midnight */
  .year { gap: 18px; }
  .year-hi { font-size: 18px; padding: 9px 14px 8px; }
  .year-num { font-size: clamp(110px, 31vw, 200px); -webkit-text-stroke: 6px var(--ink); padding-right: 14px;
    text-shadow: 1px 1px 0 var(--ink), 2px 2px 0 var(--ink), 3px 3px 0 var(--yellow-400), 4px 4px 0 var(--yellow-400), 5px 5px 0 var(--yellow-400),
      6px 6px 0 var(--orange-500), 7px 7px 0 var(--orange-500), 8px 8px 0 var(--orange-500), 9px 9px 0 var(--pink-500), 10px 10px 0 var(--pink-500), 11px 11px 0 var(--pink-500),
      12px 12px 0 var(--violet-500), 13px 13px 0 var(--violet-500), 14px 14px 0 var(--violet-500), 15px 15px 0 var(--ink), 16px 16px 0 var(--ink); }

  /* the alarm: copy first; the phone below it (a snap row when static, one pinned phone in motion).
     The tall stage pins bottom-aligned, so the chips sit UNDER the phone (always in view, like a carousel's dots);
     the sky reaches rose early so the ink lead keeps its contrast. */
  .alarm-stage { padding: 84px 0 56px; }
  .alarm-stage > .sky { background: linear-gradient(to bottom, var(--night-700) 0px, var(--violet-600) 90px, var(--rose-400) 270px, var(--apricot-300) 540px, var(--butter-200) 700px); background: linear-gradient(in oklch to bottom, var(--night-700) 0px, var(--violet-600) 90px, var(--rose-400) 270px, var(--apricot-300) 540px, var(--butter-200) 700px); }
  .alarm-stage::before { top: 760px; }
  .dawn-hills { top: 470px; margin-left: -1060px; }
  .sun { top: 330px; margin-left: -90px; }
  /* static: the land stands on the phones' row (anchored to the stage's bottom, the same place as at 390 px), so the
     copy above never runs into the hills, however many lines it wraps to */
  html:not(.motion) .alarm-stage::before { top: auto; height: 518px; }
  html:not(.motion) .dawn-hills { top: auto; bottom: 508px; }
  html:not(.motion) .sun { top: auto; bottom: 48px; }
  .motion .alarm-stage { padding: 84px 0 110px; }
  .motion .alarm-stage > .sky { background: linear-gradient(to bottom, var(--night-700) 0%, var(--violet-600) 11%, var(--rose-400) 27%, var(--apricot-300) 56%, var(--butter-200) 90%); background: linear-gradient(in oklch to bottom, var(--night-700) 0%, var(--violet-600) 11%, var(--rose-400) 27%, var(--apricot-300) 56%, var(--butter-200) 90%); }
  .motion .dawn-hills { margin-left: -1280px; }
  .motion .sun { margin-left: -236px; }
  .alarm-grid { grid-template-areas: 'copy' 'foot' 'phones' 'chips'; }
  .motion .alarm-stage { padding-bottom: 30px; }
  .privacy-pill { font-size: 15px; padding: 10px 16px; gap: 9px; }
  .display { text-wrap: balance; }
  .ch-alarm .display { -webkit-text-stroke: 5px var(--ink); text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--ink); }
  .ch-alarm .lead { font-size: 19px; }
  .chips { justify-content: center; gap: 8px; }
  .chip { gap: 6px; padding: 8px 9px 7px; font-size: 15px; }
  .chip img { width: 15px; height: 15px; }
  .ch-alarm .phones-wrap { margin: 20px -22px 0; }
  .phones { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 22px;
    padding: 126px 22px 20px; scroll-padding: 0 22px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phones > .phone { flex: none; scroll-snap-align: center; }
  .motion .ch-alarm .phones-wrap { --sp: 3px; margin: 110px 0 0; }
  .motion .phones { padding: 0; overflow: visible; justify-content: center; justify-items: center; }
  .motion .chips { margin-top: 2px; }

  .ch-collab { padding: 90px 0 120px; }
  .clouds { margin-left: -1170px; }
  .collab-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }

  /* dusk */
  .ch-journey { padding-top: 96px; }
  .ch-journey .lead { font-size: 19px; }
  .ch-journey .display { -webkit-text-stroke: 5px var(--ink); text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--night-700), 6px 6px 0 var(--night-700), 8px 8px 0 var(--ink); }
  .dusk-land { min-height: 300px; margin-bottom: -44px; }
  .ridges { margin-left: -1540px; }
  .caravan { bottom: 248px; margin-left: -96px; width: calc(96 * 2px); height: calc(21 * 2px); }
  .evening-star { bottom: 318px; margin-left: -150px; width: 27px; height: 27px; }

  /* about */
  .ch-about { padding: 100px 0 110px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .stitch-line { font-size: 20px; }
  .company { font-size: 17px; }
  .seam-lane { height: 120px; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .patch { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; padding: 20px 20px 22px; }
  .patch .badge { grid-row: 1 / 3; width: 72px; height: 72px; margin: 0; }
  .patch .badge img { width: 48px; height: 48px; }
  .patch h3 { font-size: 30px; align-self: end; }
  .patch p { margin: 2px 0 0; align-self: start; font-size: 17px; }

  /* night */
  .ch-contact .display { -webkit-text-stroke: 5px var(--ink); text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--violet-500), 6px 6px 0 var(--violet-500), 8px 8px 0 var(--ink); }
  .email { -webkit-text-stroke: 4px var(--ink); text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--ink); }
  .night-land { height: 250px; margin-top: 40px; }
  .night-hills { margin-left: -1480px; }
  .foot { padding: 4px 22px 34px; font-size: 15px; }
  html[data-season='newyear'] .night-land { margin-top: 0; }
  html[data-season='newyear'] .foot { padding-bottom: 12px; }
  html[data-season='newyear'] .foot .music-credit { margin-top: 4px; font-size: 12px; line-height: 1.35; }
}
/* short phones (up to 700 px tall): the credit's 4-6 lines would still push the knot off the top of the last screen, so
   in season the land (the sky above its hills) and the gap under "Say hi." give 40 px more back */
@media (max-width: 760px) and (max-height: 700px) {
  html[data-season='newyear'] .night-land { height: 222px; }
  html[data-season='newyear'] .contact-copy { gap: 14px; }
}

/* ---------- small tablets (600-760): the phone composition, a size up ---------- */
@media (min-width: 600px) and (max-width: 760px) {
  .ch-hero { --short: 0px; --wm-y: calc(var(--mq-h) + var(--nav-h) + 168px); height: max(940px, 100svh); }
  .hero-copy { top: calc(var(--wm-y) - 64px); }
  .wordmark { font-size: 124px; }
  .tagline { font-size: 24px; }
  .tagline .nb { display: inline; }
  .tree { --P: 4px; left: 290px; bottom: 70px; }
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .patch { display: block; padding: 24px 20px 26px; }
  .patch .badge { width: 80px; height: 80px; margin-bottom: 16px; }
  .patch .badge img { width: 64px; height: 64px; }
  .patch h3 { font-size: 28px; }
}

/* ---------- small phones (360-380): the four chips and the privacy pill stay on one line ---------- */
@media (max-width: 380px) {
  .chips { gap: 7px; }
  .chip { gap: 5px; padding: 8px 7px 7px; font-size: 14px; }
  .chip img { width: 14px; height: 14px; }
  .privacy-pill { font-size: 14px; padding: 10px 14px; gap: 8px; }
  .privacy-pill img { width: 15px; height: 18px; }
}

/* ---------- no JavaScript (or the scripts failed to load): a static pixel star field stands in for the canvas ---------- */
:is(.no-js, .js-failed) :is(.ch-hero, .ch-contact, .ch-midnight, .ch-journey, .alarm-stage) > .sky::before { content: ''; position: absolute; inset: 0;
  background: url(../img/stars.svg) 50% 0 / 2560px 900px no-repeat; image-rendering: pixelated; }
:is(.no-js, .js-failed) .alarm-stage > .sky::before { inset: 0 0 auto; height: 200px; background-position: 18% -340px; }
:is(.no-js, .js-failed) .ch-midnight > .sky::before { background-position: 64% -180px; }
:is(.no-js, .js-failed) .ch-journey > .sky::before { background-position: 36% -420px; }
:is(.no-js, .js-failed) .ch-contact > .sky::before { background-position: 58% -60px; }
:is(.no-js, .js-failed) :is(.ch-midnight, .ch-journey) > .sky::before {
  -webkit-mask-image: linear-gradient(#000 20%, transparent 85%); mask-image: linear-gradient(#000 20%, transparent 85%); }
:is(.no-js, .js-failed) .ch-journey > .sky::before { -webkit-mask-image: linear-gradient(#000 5%, transparent 45%); mask-image: linear-gradient(#000 5%, transparent 45%); }
:is(.no-js, .js-failed) .ch-contact > .sky::before { -webkit-mask-image: linear-gradient(#000 60%, transparent 90%); mask-image: linear-gradient(#000 60%, transparent 90%); }

/* ---------- the scroll world (html.world-on, set by js/ambient.js once the first sky is painted) ----------
   ONE continuous sky behind transparent chapters: a fixed layer whose gradient is composed every frame from the
   chapters' own .sky gradients (read from their computed style) plus bridges at the seams. The chapters' .sky layers
   and their per-chapter grain stay in the page for the no-JS version and are only hidden here. The grain now lies on
   the sky alone (5-8 %, it stops banding); the pixel stars sit above it, so it never touches a sprite. */
[hidden] { display: none !important; }
.world, .world-front { display: none; }
html.world-on body { background: transparent; }
html.world-on .world, html.world-on .world-front { display: block; position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; overflow: hidden; pointer-events: none; }
html.world-on .world { z-index: -1; isolation: isolate; background: var(--night-900); }
html.world-on .world-front { z-index: 20; }
.world-sky, .world-grain { position: absolute; inset: 0; }
.world-sky { background: var(--night-900); }
.world-grain { background: url(../img/grain.svg) 0 0 / 220px 220px; opacity: .07; mix-blend-mode: overlay; }
.world canvas, .world-front canvas { position: absolute; left: 0; top: 0; image-rendering: pixelated; will-change: transform; }
html.world-on .ch > .sky, html.world-on .alarm-stage > .sky { visibility: hidden; }
/* a ground bridge that scrolls with the ground (js/chapters.js SKIRTS): first child of the next chapter, behind its content */
.skirt { display: none; }
html.world-on .skirt { display: block; position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: -1; pointer-events: none; }
/* the linings (js/ambient.js): a page-attached copy of the fixed sky (gradient, grain, stars) in every chapter beside a
   ground seam, behind its content and under its skirt; the same as the world at rest, right in a late frame.
   .lining-foot: a 0-high sticky shelf after the pinned dawn stage that carries the strip below it */
.lining { display: none; }
html.world-on .lining { display: block; position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2; overflow: hidden; isolation: isolate; pointer-events: none; }
html.world-on .lining-top { bottom: auto; -webkit-mask-image: linear-gradient(#000 calc(100% - 80px), transparent); mask-image: linear-gradient(#000 calc(100% - 80px), transparent); }
.lining > i { position: absolute; inset: 0; background: url(../img/grain.svg) 0 0 / 220px 220px; opacity: .07; mix-blend-mode: overlay; }
.lining > canvas { position: absolute; left: 0; top: 0; image-rendering: pixelated; }
.lining-foot { display: none; }
html.world-on .lining-foot { display: block; position: sticky; height: 0; }
html.world-on .lining-foot[hidden] { display: none; }
html.world-on .lining-foot > .lining { bottom: auto; }
html.world-on .ch-hero::after, html.world-on .alarm-stage::after, html.world-on .ch-collab::after, html.world-on .ch-journey::after,
html.world-on .ch-about::after, html.world-on .ch-contact::after, html.world-on .ch-midnight::after { display: none; }
html.world-on.motion .ch-alarm .step-run { background: none; }

/* ---------- the thread through the page (tools/ribbon.mjs; stitched in by js/thread.js) ----------
   Each chapter holds one segment, anchored where its weave happens; --ax/--ay (set by the generator) is the anchor
   point inside the drawing. -w segments are for 761 px and up, -m segments for phones. */
.thread { position: absolute; pointer-events: none; overflow: visible; }
.ribbon-midnight-w, .ribbon-midnight-m, .ribbon-about-w, .ribbon-about-m, .ribbon-contact-w, .ribbon-contact-m {
  left: calc(50% - var(--ax)); top: calc(50% - var(--ay)); }
/* midnight: behind the fireworks (painted after it) and the year; it comes in from the left edge, whole (a bright ribbon
   faded to transparent over the night turned muddy) */
.thread-fade { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
/* dawn: behind the sun (z 1, painted after it), the hills and the phone */
.ribbon-dawn-w, .ribbon-dawn-m { z-index: 1; left: calc(50% - var(--ax)); top: auto; bottom: calc(0px - var(--land-dy, 0px)); }
html:not(.motion) .ribbon-dawn-w { bottom: auto; top: calc(900px - var(--ay)); }
/* noon: behind the ground and under the podium; the confetti falls in front */
.ribbon-noon-w, .ribbon-noon-m { z-index: 1; left: calc(50% - var(--ax)); top: auto; bottom: 0; }
/* dusk: behind both ridges; the caravan and the evening star stand in front */
.ribbon-dusk-w, .ribbon-dusk-m { left: calc(50% - var(--ax)); top: auto; bottom: 0; }
.seam-lane, .knot-slot { position: relative; }
.thread[data-seg$='-m'] { display: none; }
@media (max-width: 760px) {
  .thread[data-seg$='-w'] { display: none; }
  .thread[data-seg$='-m'] { display: block; }
  /* static phones (no JS, reduced motion): no band between the words and the hills is wide enough for the thread, so
     it rests here and comes back at noon (it used to run behind "Coming soon…" and the privacy pill) */
  html:not(.motion) .ribbon-dawn-m { display: none; }
}

/* ---------- our little morning star in flight (js/thread.js) ----------
   The cast's star: a .cast box (32 x 48 sprite px at its perch's pixel unit; js sets its size and place) with two
   strips, the flight [fly, fly:alt] and the medal flight [medal, medal:alt]; data-pose picks one. Its sparkle trail is in
   the sprite. js steps the flutter kick (.is-kick: frame 2) together with its one-pixel bob. It hands over to each
   chapter's own sprite, head in the same place (.is-away hides the empty perch). */
.flier { position: absolute; left: 0; top: 0; z-index: 2; will-change: transform; }
.flier > .strip { visibility: hidden; }
.flier[data-pose='fly'] > .f-fly, .flier[data-pose='medal'] > .f-medal { visibility: visible; }
.flier.is-kick > .strip { transform: translateX(-100%); }
.is-away { visibility: hidden; }
/* until js/thread.js has measured a segment (in the first frame) it stays out of sight, so it never flashes fully drawn */
html.world-on.stitching .thread:not([data-ready]) { visibility: hidden; }

/* ---------- the cast (img/cast/*.svg: tools/cast.mjs from js/cast.js and tools/cast-manifest.json; .gen/cast/CAST.md) ----------
   Eight characters and a New Year guest. Every sprite is a 32 x 48 grid (the sleigh 64 x 40) drawn at --P CSS px per
   sprite pixel: 4 on desktop, 3 on tablets and phones, whole pixels only, never rotated, mirrored or blurred. A placement
   is a .cast box one frame wide; its .strip holds a season pair (.season-off / .season-on) of a horizontal strip whose
   frame 1 is the designed still: what shows without JS, with reduced motion and while paused (the a-* classes below
   move a strip). Decorative only: alt="", aria-hidden, never takes a click.
   js/thread.js perches (the flying star hands over to them): .h-star (tree), .ringer, .medal-star, .peek, .sleeper. */
.cast { position: absolute; width: calc(32 * var(--P)); height: calc(48 * var(--P)); overflow: hidden; pointer-events: none; }
.cast.is-wide { width: calc(64 * var(--P)); height: calc(40 * var(--P)); }
.cast > .strip { position: absolute; inset: 0; }
.cast img { position: absolute; left: 0; top: 0; width: calc(var(--n, 1) * 100%); max-width: none; height: 100%; image-rendering: pixelated; }
/* frame k (from 0) = translateX(calc(-100% * k)); keyframes hold each frame (step-end) */
@keyframes cast-flip { 0%, 100% { transform: none; } 50% { transform: translateX(-100%); } }
@keyframes cast-blink { 0%, 100% { transform: none; } 94% { transform: translateX(-100%); } 97% { transform: none; } }
@keyframes cast-idle { 0% { transform: none; } 25% { transform: translateX(-200%); } 50% { transform: none; } 62% { transform: translateX(-100%); } 65% { transform: none; } 75% { transform: translateX(-200%); } 100% { transform: none; } }
@keyframes cast-doze { 0%, 100% { transform: translateX(-200%); } 50% { transform: translateX(-300%); } }
/* the sleigh hovers as a whole: one sprite pixel up and down (2.5% of its 40 rows: a whole pixel at any --P) */
@keyframes cast-hover { 0%, 100% { transform: none; } 50% { transform: translateY(-2.5%); } }
/* Motion only (JS, no reduced motion), and only in a chapter on or near the screen (.is-near, js/ambient.js): a chapter
   far away holds its stills. --t is a character's loop, --d where in it the character starts (a negative delay): every
   loop differs, so no two ever blink, breathe or wave together. */
.motion .is-near .cast > .strip.a-flip { animation: cast-flip var(--t, .6s) step-end var(--d, 0s) infinite; }
.motion .is-near .cast > .strip.a-blink { animation: cast-blink var(--t, 5s) step-end var(--d, 0s) infinite; }
.motion .is-near .cast > .strip.a-idle { animation: cast-idle var(--t, 4.8s) step-end var(--d, 0s) infinite; }
.motion .is-near .cast > .strip.a-doze { animation: cast-doze var(--z, 3s) step-end var(--d, 0s) infinite; }
.motion .is-near .cast.is-wide { animation: cast-hover var(--t, 1.4s) step-end var(--d, 0s) infinite; }
/* footer strips [wave, wave:alt, sleep, sleep:bob]: when the reader reaches the very bottom, js/ambient.js makes the row
   wave (a-flip), then sits each one down (.asleep on the .cast: frame 3, and a-doze: frames 3-4). A pause holds the sleep. */
.cast.asleep > .strip { transform: translateX(-200%); }
/* paused (the toggle, screenshots): the designed stills; a hidden tab: everything holds where it is (!important: the
   near-gated animation shorthands above are more specific and would reset the play state to running) */
.frozen .cast, .frozen .cast > .strip { animation: none !important; }
.tab-hidden .cast, .tab-hidden .cast > .strip { animation-play-state: paused !important; }

/* 0. hero, New Year's Eve (the approved mock at 1440 x 900): the star tops the fir and the Decorator reaches up at its
   left; the Tailor stands at the foot of the ribbon, the Snowball Kid on the left slope; the Moth hovers between the
   button and the fir; in season Santa's sleigh flies low over the far firs on the left. One pixel size: the scene's. */
.h-star { left: calc(9 * var(--P)); top: calc(-46 * var(--P)); z-index: 3; }
.h-decorator { left: calc(-18 * var(--P)); top: calc(12 * var(--P)); z-index: 1; }
.h-tailor { left: 843px; bottom: 128px; z-index: 6; }
.h-snowball { left: 980px; bottom: 88px; z-index: 6; }
.h-santa { display: none; z-index: 6; }
/* the Moth keeps the words' height (top-anchored, like them) and stays clear of the Decorator on narrower screens */
.h-moth { z-index: 6; top: calc(var(--wm-y) + 136px); left: calc(50% + 240px); left: round(down, min(50% + 240px, 100% - 430px), 1px); }
/* the sleigh: under the "S", above the far firs and below the hero's upper-left firework at any window height. The ribbon
   hangs from the words (a 1440 x 900 box at --wm-y - 335) and the sleigh flies low (100% - 504), so taller windows put it
   deeper against the ribbon (--dy, its top in the ribbon's box; 395 in the approved frame). Past 457 it moves left 0.7 px
   per px, so the reindeer keeps at least 24 px of sky before the ribbon; narrow tall windows cap the depth instead. */
.h-sleigh { z-index: 5; left: calc(50% - 698px); top: max(100% - 504px, 290px);
  --dy: min(max(clamp(760px, 100svh, 1120px) - 504px, 290px) - var(--wm-y) + 335px, 457px + max(0px, 50vw - 706px) * 1.428);
  left: round(down, 50% - 698px - max(0px, var(--dy) - 457px) * 0.7, 1px); top: round(down, var(--wm-y) - 335px + var(--dy), 1px); }
/* tall windows can show both sleighs at once: while the midnight one is on screen, this one climbs away up and to the
   right, out through the top, in 16 whole-pixel steps of 20 x 60 px (js/ambient.js sets .is-gone), and comes back when the
   reader scrolls up. Paused or reduced motion: it simply goes (no flight). */
.h-sleigh { transition: translate .8s steps(16, end), visibility 0s linear 0s; }
.h-sleigh.is-gone { translate: 320px -960px; visibility: hidden; transition: translate .8s steps(16, end), visibility 0s linear .8s; }
.frozen .h-sleigh { transition: none; }
/* narrower desktops: no free sky on the left for the sleigh (it would leave the screen and sit on the firs), so Santa
   stands on the left slope with his sack, where the Snowball Kid plays out of season */
@media (min-width: 1181px) and (max-width: 1411px) {
  .h-sleigh { display: none; }
  html[data-season='newyear'] .h-snowball { display: none; }
  .h-santa { display: block; }
}
/* (and on those, or on short windows, both step a little up the slope, so the tagline's first word keeps its room; the
   cloud steps back onto the ribbon's foot, keeping the approved ~25 px of sky between its needle and its neighbour) */
@media (min-width: 1181px) and (max-width: 1411px), (min-width: 1181px) and (max-height: 800px) {
  .h-tailor { left: 811px; }
  .h-snowball, .h-santa { left: 960px; bottom: 100px; }
}
/* tablets: the fir's 3 px pixels; Santa stands between the button and the Decorator on the right hill, the Moth hovers in
   the free sky left of the wordmark, the Tailor only where the foot of the ribbon is on screen */
@media (min-width: 761px) and (max-width: 1180px) {
  .h-tailor, .h-snowball, .h-moth, .h-santa { --P: 3px; }
  .h-sleigh { display: none; }
  .h-moth { left: 24px; top: calc(var(--wm-y) - 28px); }
  .h-santa { display: block; left: calc(50vw + 959px); left: calc(round(up, 50vw, 1px) + 959px); bottom: calc(round(down, 10.9vw, 1px) + 5px); }
}
/* portrait tablets: the foot of the ribbon is off screen (no Tailor); the Moth drifts in the open sky towards the fir */
@media (min-width: 761px) and (max-width: 923px) {
  .h-tailor { display: none; }
  .h-moth { left: calc(100% - 404px); top: calc(100% - 446px); }
}
/* phones (the approved phone mock): the fir with the star, the Decorator on its left and, in season, Santa with his sack on
   its right; out of season the kid with the snowball stands there (the two swap places, as on narrower desktops); the
   others are not crammed in (the moth flutters at dusk, the cloud sews in About) */
@media (max-width: 760px) {
  .h-tailor, .h-snowball, .h-moth, .h-sleigh { display: none; }
  .h-santa, html:not([data-season='newyear']) .h-snowball { display: block; }
  .h-santa, .h-snowball { left: 464px; bottom: 72px; }
}
@media (min-width: 600px) and (max-width: 760px) { .h-santa, .h-snowball { --P: 4px; left: 489px; bottom: 69px; } }
@media (max-width: 369px) { .h-santa, .h-snowball { left: 449px; } }

/* 1. midnight (season): Santa's sleigh flies under the "7" towards the lower-right burst, at the fireworks' 4 px. Short
   windows get a slightly taller beat so it fits under the year. (Phones: no room among the bursts.) */
.m-sleigh { display: none; z-index: 2; }
@media (min-width: 761px) {
  html[data-season='newyear'] .ch-midnight { height: max(700px, 80svh); }
  .m-sleigh { display: block; left: calc(50% + 214px); left: round(down, min(50% + min(214px, 15.74vw), 90% - 313px), 1px);
    top: calc(50% + 200px); top: round(down, min(50% + clamp(54px, 9vw, 122px) + 78px, 100% - 160px), 1px); }
}
/* tablets: the sprites' 3 px, the flying star's pixel beside it (one sprite pixel in the picture, as in the tablet hero) */
@media (min-width: 761px) and (max-width: 1180px) {
  .m-sleigh { --P: 3px; left: calc(50% + 160px); left: round(down, min(50% + min(214px, 15.74vw), 90% - 249px), 1px);
    top: calc(50% + 160px); top: round(down, min(50% + clamp(54px, 9vw, 122px) + 78px, 100% - 120px), 1px); }
}

/* 2. dawn: the star rings the bell on the phone's top-right corner (at Shine it cheers); the Sleepyhead wakes beside the
   phone, one pose per step; in season Santa sleeps on beside it (he overslept). Their pixel is the phone screen's
   (--sp: 4 px in the stage, 3 px in rows), so phone and cast share one pixel size. */
.ringer, .dawn-kid-row, .dawn-santa-row { --P: var(--sp); z-index: 3; }
.ringer { left: calc(44 * var(--sp)); top: calc(3 * var(--sp) - 48 * var(--P)); }
.ringer > .r-cheer, .ch-alarm[data-step='shine'] .ringer > .r-ring { opacity: 0; }
.ch-alarm[data-step='shine'] .ringer > .r-cheer { opacity: 1; }
/* keyboard focus on the phones: the same ring, drawn again above the cast on and beside them (an outline paints under a
   positioned sprite); the outline itself stays as the fallback */
.phones-wrap:has(> .phones:focus-visible)::after { content: ''; position: absolute; inset: -7px; z-index: 5; border: 3px solid var(--ink); pointer-events: none; }
/* the static row of four (no JS, reduced motion): the Sleepyhead wakes beside the first phone, Santa sleeps beside the
   last, both on the phones' ground line; only where the row's ends have room */
.dawn-kid-row { left: calc(-16px - 32 * var(--P)); top: calc(152 * var(--sp) - 48 * var(--P)); }
.dawn-santa-row { left: calc(78 * var(--sp) + 12px); top: calc(152 * var(--sp) - 48 * var(--P)); }
.motion :is(.dawn-kid-row, .dawn-santa-row) { display: none; }
@media (max-width: 760px), (min-width: 1181px) and (max-width: 1297px) { .dawn-kid-row, .dawn-santa-row { display: none; } }
/* the pinned stage: both stand at the foot of the stage beside the phone (--ph: the phone's left edge, the grid's right
   column), on the snow, or on the pink hill where short windows move the land down (--land-dy): never cut off */
.dawn-kid, .dawn-santa { display: none; z-index: 4; --P: 4px; --ph: min(100% - 380px, 50% + 240px); bottom: 28px; }
.dawn-kid { left: calc(var(--ph) - 16px - 32 * var(--P)); }
.dawn-santa { left: calc(var(--ph) + 326px); }
@media (min-width: 761px) { .motion .dawn-kid { display: block; } }
@media (min-width: 1400px) { .motion .dawn-santa { display: block; } }
@media (min-width: 761px) and (max-width: 1180px), (min-width: 1181px) and (max-height: 860px) {
  .dawn-kid, .dawn-santa { --P: 3px; --ph: min(100% - 298px, 50% + 322px); }
  .dawn-santa { left: calc(var(--ph) + 247px); }
}
/* one pose per step (hidden by visibility, never display:none, so each pose is loaded before its step). At Wake it sleeps
   until the flying star has landed with the bell (js/thread.js marks the empty perch .is-away). The motion step may set
   data-kid on the section to show any pose instead (sleep, wake, walk, snap, cocoa). */
.dawn-kid > .strip { visibility: hidden; }
.ch-alarm:not([data-kid])[data-step='wake'] .k-wake, .ch-alarm:not([data-kid])[data-step='walk'] .k-walk,
.ch-alarm:not([data-kid])[data-step='snap'] .k-snap, .ch-alarm:not([data-kid])[data-step='shine'] .k-cocoa,
.ch-alarm[data-kid='sleep'] .k-sleep, .ch-alarm[data-kid='wake'] .k-wake, .ch-alarm[data-kid='walk'] .k-walk,
.ch-alarm[data-kid='snap'] .k-snap, .ch-alarm[data-kid='cocoa'] .k-cocoa { visibility: visible; }
.ch-alarm:not([data-kid])[data-step='wake']:has(.ringer.is-away) .k-wake { visibility: hidden; }
.ch-alarm:not([data-kid])[data-step='wake']:has(.ringer.is-away) .k-sleep { visibility: visible; }

/* 3. noon: the podium. #1 the Cheerer sings, #2 the Sleepyhead snaps, #3 the Decorator admires; the star flies in with the
   medal for #1. The scene scales with its column, so every box is rounded to a whole pixel. */
.podium-scene > .cast { z-index: 1; }
.pod-1 { left: calc(50% - 14 * var(--P)); left: round(down, 50% - 14 * var(--P), 1px); bottom: calc(42.31% - 4px); bottom: round(down, 42.31% - 4px, 1px); }
.pod-2 { left: calc(17.67% - 18 * var(--P)); left: round(down, 17.67% - 18 * var(--P), 1px); bottom: calc(28.46% - 4px); bottom: round(down, 28.46% - 4px, 1px); }
.pod-3 { left: calc(82.33% - 16 * var(--P)); left: round(down, 82.33% - 16 * var(--P), 1px); bottom: calc(21.15% - 4px); bottom: round(down, 21.15% - 4px, 1px); }
.medal-star { left: 18%; left: round(down, 18%, 1px); bottom: 62.3%; bottom: round(down, 62.3%, 1px); }
@media (max-width: 760px) { .medal-star { left: round(down, 14%, 1px); bottom: round(down, 62.3% + 16px, 1px); } }

/* 4. dusk: the Traveller walks the near ridge with the lantern up and the Moth flutters at the lantern; further on the
   star peeks over the ridge (the strip's bottom edge is the ridge line); the caravan stays, tiny and far */
.dusk-traveller, .dusk-moth, .peek { z-index: 2; }
.dusk-traveller { left: calc(50% - 400px); left: round(down, 50% - 400px, 1px); bottom: 128px; }
.dusk-moth { left: calc(50% - 270px); left: round(down, 50% - 270px, 1px); bottom: 174px; }
.peek { left: calc(50% + 36px); left: round(down, 50% + 36px, 1px); bottom: 87px; }
@media (min-width: 761px) and (max-width: 1180px) {
  .dusk-traveller, .dusk-moth, .peek { --P: 3px; }
  .dusk-traveller { left: max(24px, round(down, 50% - 400px, 1px)); bottom: 124px; }
  .dusk-moth { left: max(122px, round(down, 50% - 302px, 1px)); bottom: 158px; }
  .peek { left: calc(50% + 32px); left: round(down, 50% + 32px, 1px); }
}
@media (max-width: 760px) {
  .dusk-traveller { left: calc(50% - 15px); left: round(down, min(50% - 15px, 100% - 213px), 1px); bottom: 93px; }
  .dusk-moth { left: calc(50% + 82px); left: round(down, min(50% + 82px, 100% - 116px), 1px); bottom: 127px; }
  .peek { left: calc(50% - 138px); left: round(down, 50% - 138px, 1px); }
}

/* 5. About: the Sky Tailor sews the seam ("the sky's stitching"): a little cloud with a golden needle in front of the
   ribbon in the middle of the lane, clear of the words above and the patches below */
.seam-tailor { z-index: 1; left: calc(50% - 16 * var(--P)); left: round(down, 50% - 16 * var(--P), 1px); bottom: 6px; }
@media (min-width: 761px) and (max-width: 1180px) { .seam-tailor { --P: 3px; } }
@media (max-width: 760px) { .seam-tailor { bottom: -6px; } }

/* 6. contact: everyone waves goodbye in a row on the night snow (Santa among them in season), then the fir and the star,
   asleep at the end of its journey. A zero-width flex row centred on a whole pixel; each item's margins (--ml, --mr, in
   sprite pixels) trim its empty columns, leave 2 sprite pixels between neighbours and add up to an even number, so the
   row always starts on a whole pixel. Fewer on narrower screens. */
.cast-row { position: absolute; z-index: 2; left: 50%; left: round(down, 50%, 1px); bottom: 24px; width: 0; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.cast-row > * { flex: none; margin: 0 calc(var(--mr, 0) * var(--P)) 0 calc(var(--ml, 0) * var(--P)); }
.cast-row > .cast { position: relative; }
.cast-row > .night-fir { position: relative; width: calc(26 * var(--P)); height: calc(36 * var(--P)); }
.cast-row > .sleeper { z-index: 1; --ml: -3; --mr: 1; }
.row-snowball { --ml: -4; --mr: 2; }
.row-decorator, .row-cheerer { --ml: -3; --mr: 1; }
.row-tailor { --ml: 1; --mr: 1; }
.row-sleepy { --ml: -2; --mr: 2; }
.row-traveller { --ml: 0; --mr: 2; }
@media (min-width: 1181px) and (max-width: 1279px) { html[data-season='newyear'] .row-moth { display: none; } }
@media (max-width: 1180px) { .cast-row { --P: 3px; } }
@media (max-width: 1023px) { .row-tailor, .row-moth { display: none; } }
@media (max-width: 760px) {
  .row-snowball, html[data-season='newyear'] :is(.row-sleepy, .row-cheerer) { display: none; }
  /* (in season the kid with the snowball, out of season by the fir in the hero, waves here instead of the singer on the
     podium: every one of the cast appears on a phone in both seasons) */
  html[data-season='newyear'] .row-snowball { display: block; }
}
@media (max-width: 599px) { .row-decorator, .row-traveller { display: none; } }
@media (max-width: 385px) { .row-sleepy { display: none; } html[data-season='newyear'] .row-santa { display: none !important; } }

/* the cast's timing (see the a-* rules): --t the loop, --d the start in it, --z the doze. Gentle: blinks every 4-6 s, a
   breath of about 1.5 s, the wing and the bell a little quicker; never two characters on the same loop. */
.h-star > .strip { --t: 1.8s; }
.h-decorator > .strip { --t: 5.2s; --d: -1.7s; }
.h-snowball > .strip { --t: 5.8s; --d: -3.3s; }
.h-tailor > .strip { --t: 6.4s; --d: -.6s; }
.h-santa > .strip { --t: 6.1s; --d: -4.4s; }
.h-moth > .strip { --t: .64s; }
.h-sleigh { --t: 1.4s; }
.m-sleigh { --t: 1.5s; --d: -.4s; }
.ringer > .r-ring { --t: .6s; }
.ringer > .r-cheer { --t: .8s; }
.dawn-kid > .k-sleep { --t: 3s; }
.dawn-kid > .k-snap { --t: 1.4s; }
.dawn-kid > .k-cocoa { --t: 1.7s; --d: -.5s; }
.dawn-santa > .strip { --t: 3.6s; --d: -1.3s; }
.pod-1 > .strip { --t: 1.2s; }
.pod-2 > .strip { --t: 1.5s; --d: -.4s; }
.pod-3 > .strip { --t: 1.9s; --d: -1.1s; }
.medal-star > .strip { --t: .7s; }
.dusk-traveller > .strip { --t: 4.6s; --d: -1.2s; }
.dusk-moth > .strip { --t: .7s; --d: -.2s; }
.peek > .strip { --t: 3.9s; --d: -2.5s; }
.seam-tailor > .strip { --t: 1.6s; }
.sleeper > .strip { --t: 3.2s; --d: -1.4s; }
.row-snowball > .strip { --t: .62s; --z: 3.1s; --d: -.3s; }
.row-decorator > .strip { --t: .74s; --z: 3.5s; --d: -.5s; }
.row-tailor > .strip { --t: .68s; --z: 3.9s; --d: -.1s; }
.row-cheerer > .strip { --t: .58s; --z: 3.3s; --d: -.4s; }
.row-sleepy > .strip { --t: .8s; --z: 3.7s; --d: -.2s; }
.row-traveller > .strip { --t: .7s; --z: 3.4s; --d: -.6s; }
.row-moth > .strip { --t: .64s; --z: 4.1s; --d: -.35s; }
.row-santa > .strip { --t: .76s; --z: 3.8s; --d: -.15s; }

/* ---------- frozen (screenshots): every animation holds its first frame ---------- */
.frozen *, .frozen *::before, .frozen *::after { animation-play-state: paused !important; animation-delay: 0s !important; }

/* ---------- reduced motion: designed still frames ---------- */
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
