/* The Little Guide — littleguide.plexiri.com
   Colours, faces and sketches come from the app: native/LittleGuide/Ink/InkPalette.swift,
   App/AppStyle.swift and Sketches/SketchArtTable.swift. */

@font-face {
  font-family: "Caveat";
  src: url("/assets/fonts/Caveat_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cedarville Cursive";
  src: url("/assets/fonts/CedarvilleCursive_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4f1e8;          /* the world's paper */
  --stage: #ece9e0;          /* the same paper, as the 3D scene renders it */
  --card: #fbf8f0;           /* guide pages and choice chips */
  --ink: rgba(26, 29, 25, .94);
  --title: #24271f;
  --deep: #2c3328;
  --aside: #6f6a58;
  --hint: #566349;
  --note: #7a3f2c;
  --rust: #9a4a36;
  --rule: #d9d1bd;
  --green: #3f5a33;
  --chosen: #e6eed8;
  --chosen-edge: #4f7a3f;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --script: "Cedarville Cursive", "Caveat", cursive;
  --serif: "Iowan Old Style", "Baskerville", "New York", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--deep);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--green); text-underline-offset: 4px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid #4f7a3f; outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--card); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 60px;
  padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: var(--paper);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--title); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(36, 39, 31, .12); }
.brand span { font: 22px/1 var(--script); padding-top: 4px; white-space: nowrap; }
.badge { display: inline-flex; flex: none; border-radius: 9px; }
.badge img { height: 100%; width: auto; }
.badge--bar { height: 40px; }
@media (max-width: 359px) { .brand span { display: none; } }

/* ---------------------------------------------------------------- hero */
.hero__copy { display: none; }

.device { position: relative; }
.stage {
  position: relative;
  container-type: size;
  height: calc(100svh - 60px - env(safe-area-inset-top));
  min-height: 540px;
  max-height: 820px;
  overflow: hidden;
  background: var(--stage);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  isolation: isolate;
}
.stage[data-gesture="on"] { touch-action: none; }
.stage__paper {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 70% at 50% 8%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 60%),
    repeating-linear-gradient(0deg, rgba(90, 80, 60, .028) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(90, 80, 60, .022) 0 1px, transparent 1px 4px);
}

/* The world: an island the width of the page, the fellow standing on it. */
.stage {
  --iw: min(106cqw, 560px, calc((100cqh - var(--ground) - 70px) * 1.3));
  --ground: clamp(150px, 31cqh, 236px);
}
.world { position: absolute; inset: 0; pointer-events: none; }
.ground {
  position: absolute; left: 50%; bottom: var(--ground);
  width: var(--iw); transform: translateX(-50%);
  transition: opacity .6s ease, transform .9s cubic-bezier(.2, .8, .2, 1), width .6s ease, bottom .6s ease;
}
.island { width: 100%; height: auto; }
.ground__shadow {
  position: absolute; left: 8%; right: 8%; bottom: -14%; height: 30%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(60, 55, 40, .2), rgba(60, 55, 40, 0) 70%);
}
.bench { position: absolute; width: 13%; left: 10%; bottom: 46%; fill: none; stroke: #24271f; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bench path:first-child { fill: #a7825c55; }
.bench:not([hidden]) { animation: pop .7s cubic-bezier(.3, 1.6, .5, 1) both; }

.planet {
  position: absolute; left: 50%; top: 24cqh; width: min(46cqw, 200px); height: auto;
  transform: translate(-50%, 0);
  opacity: 0; transition: opacity .8s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1);
  animation: bob 6s ease-in-out infinite;
}
.planet::after { content: ""; }
.stage[data-stage="void"] .planet,
.stage[data-stage="planet"] .planet { opacity: 1; }
.stage[data-stage="planet"] .planet { transform: translate(-50%, 0) scale(1.18); }
.stage[data-stage="void"] .ground,
.stage[data-stage="planet"] .ground { opacity: 0; transform: translate(-50%, 30px); }

/* ---------------------------------------------------------------- the fellow */
.fellow {
  position: absolute; left: 50%;
  bottom: calc(var(--ground) + var(--iw) * .166);
  width: calc(var(--iw) * .6);
  margin-left: calc(var(--iw) * -.3);
  pointer-events: none;
  transition: opacity .4s ease, width .6s ease, bottom .6s ease, margin-left .6s ease;
}
.fellow__run { transition: transform 1.25s cubic-bezier(.45, .05, .3, 1); transform-origin: 50% 100%; }
.fellow__flip { transition: transform .22s ease; transform-origin: 50% 100%; }
.fellow__act { transform-origin: 50% 96%; position: relative; }
.fellow__img { width: 100%; height: auto; transform-origin: 50% 96%; animation: breathe 3.4s ease-in-out infinite; }
.fellow__shadow {
  position: absolute; z-index: -1; left: 22%; right: 22%; bottom: -1%; height: 9%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(50, 60, 30, .32), rgba(50, 60, 30, 0) 72%);
  transition: transform 1.25s cubic-bezier(.45, .05, .3, 1);
}
.fellow__hit {
  position: absolute; left: 50%; z-index: 3;
  bottom: calc(var(--ground) + var(--iw) * .18);
  width: calc(var(--iw) * .42); height: calc(var(--iw) * .48);
  margin-left: calc(var(--iw) * -.21);
  border-radius: 50%;
  pointer-events: none;
}
.fellow__hit:focus-visible { outline-offset: 0; }

/* Hidden before it arrives and while the narrator is still looking at the little rock. */
.stage[data-stage="void"] .fellow,
.stage[data-stage="planet"] .fellow { opacity: 0; }
.stage[data-stage="void"] .fellow__run,
.stage[data-stage="planet"] .fellow__run { transform: translateX(80cqw); }

/* Arrival: in from the right at considerable speed. */
.fellow.is-arriving .fellow__act { animation: arrive .95s cubic-bezier(.2, .9, .3, 1) both; }
/* Run: to the very edge of the page, facing away. */
.stage[data-run="away"] .fellow__run { transform: translateX(calc(50cqw - var(--iw) * .27)) scale(.82); }
.stage[data-run="away"] .fellow__shadow { transform: translateX(calc(50cqw - var(--iw) * .27)) scale(.82); }
.stage[data-run="away"] .fellow__act { animation: patter .26s linear 5; }
.stage[data-run="back"] .fellow__run { transform: translateX(calc(50cqw - var(--iw) * .27)) scale(.82); }
.stage[data-run="back"] .fellow__shadow { transform: translateX(calc(50cqw - var(--iw) * .27)) scale(.82); }
.stage[data-run="near"] .fellow__run { transition-duration: .4s; }

.fellow.is-rawr .fellow__act { animation: rawr .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.fellow.is-bristle .fellow__act { animation: bristle .55s ease both; }
.fellow.is-hop .fellow__act { animation: hop .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.fellow.is-flinch .fellow__act { animation: flinch .45s ease both; }
.fellow.is-settle .fellow__act { animation: sink 1.2s ease both; }
.fellow.is-wiggle .fellow__act { animation: wiggle .7s ease both; }

.cloud {
  position: absolute; left: 26%; width: 50%; top: -17%;
  transition: transform 1.4s ease, opacity .6s ease;
  animation: drift 5s ease-in-out infinite;
}
.cloud.is-smaller { transform: scale(.66) translateY(18%); }

/* ---------------------------------------------------------------- title card */
.title {
  position: absolute; left: 0; right: 0; top: 7cqh; text-align: center; padding: 0 20px;
  transition: opacity .5s ease, transform .6s ease;
}
.title__name { margin: 0; font: clamp(34px, 11cqw, 50px)/1.1 var(--script); color: var(--title); white-space: nowrap; }
.title__tag { margin: 12px 0 0; font: clamp(21px, 6.2cqw, 27px)/1.2 var(--hand); color: #5f6a53; }
.stage:not([data-stage="title"]) .title { opacity: 0; transform: translateY(-14px); pointer-events: none; visibility: hidden; transition: opacity .5s ease, transform .6s ease, visibility 0s .6s; }

/* ---------------------------------------------------------------- the calm bar and pocket */
.calm { position: absolute; top: 22px; right: max(16px, env(safe-area-inset-right)); width: min(38cqw, 150px); height: auto; overflow: visible; }
.calm__fill { transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(var(--calm, .1)); transition: transform 2.2s cubic-bezier(.3, .7, .3, 1); }
.calm:not([hidden]) { animation: fadein .8s ease both; }

/* The pocket, as the app draws it once it is introduced: compact ink drawings, no labels (each
   button keeps its spoken label). A row in the top-left corner; app.js keeps the island and the
   fellow below it, so it never sits on top of the scene. */
.pocket {
  position: absolute; left: max(6px, env(safe-area-inset-left)); top: 8px; z-index: 4;
  display: flex; flex-direction: row; gap: 2px;
  transition: opacity .45s ease, transform .45s ease, visibility 0s 0s;
}
.pocket.is-away { opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .45s ease, transform .45s ease, visibility 0s .45s; }
.pocket:not(.is-away) .offer { animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.pocket .offer:nth-child(2) { animation-delay: .12s; }
.pocket .offer:nth-child(3) { animation-delay: .24s; }
.offer { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; }
.offer svg { width: 36px; height: 36px; fill: none; stroke: #24271f; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.offer:nth-child(1) svg { transform: rotate(-6deg); }
.offer:nth-child(3) svg { transform: rotate(4deg); }
.offer span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.offer:active svg { transform: scale(.82); }
.pocket.is-asking .offer svg { animation: nudge 2.4s ease-in-out infinite; }
.pocket.is-asking .offer:nth-child(2) svg { animation-delay: .3s; }
.pocket.is-asking .offer:nth-child(3) svg { animation-delay: .6s; }

.gift { position: absolute; left: 0; top: 0; width: 48px; height: 48px; z-index: 5; pointer-events: none; opacity: 0; }
.gift svg { width: 100%; height: 100%; fill: none; stroke: #24271f; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- the hold ring */
.ring { position: absolute; z-index: 6; width: 92px; height: 92px; margin: -46px 0 0 -46px; pointer-events: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring__track { stroke: rgba(36, 39, 31, .25); stroke-dasharray: 3 6; }
.ring__arc { stroke: #4f7a3f; stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 201; }
.ring.is-running .ring__arc { transition: stroke-dashoffset var(--ms, 4200ms) linear; stroke-dashoffset: 0; }
.ring__label {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  font: 19px/1 var(--hand); color: #3b4437; background: rgba(251, 248, 240, .9); padding: 4px 10px 5px; border-radius: 10px; white-space: nowrap;
}

/* ---------------------------------------------------------------- narration */
.tale {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 0 max(22px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: none;
}
.tale > * { pointer-events: auto; }
.words {
  font: clamp(23px, 7.1cqw, 30px)/1.2 var(--hand); color: var(--ink);
  min-height: 2.4em;
  pointer-events: none !important;
}
.words p { margin: 0 0 .38em; }
.words p:last-child { margin-bottom: 0; }
.stage[data-speaker="creature"] .words { font-size: clamp(34px, 11cqw, 46px); line-height: 1.05; text-align: center; }
.w { display: inline-block; white-space: pre; }
.w.is-writing { clip-path: inset(-.4em 100% -.4em -.3em); animation: write var(--d, .3s) linear var(--at, 0s) forwards; }
.words.is-done .w.is-writing { animation: none; clip-path: none; }
.u { background: linear-gradient(transparent 82%, rgba(77, 90, 69, .7) 82%, rgba(77, 90, 69, .7) 90%, transparent 90%) no-repeat 0 0 / 0 100%; }
.u.is-drawn { animation: underline .6s ease var(--at, 0s) forwards; }
.words.is-done .u.is-drawn { animation: none; background-size: 100% 100%; }
.aside { margin: .2em 0 0; font: clamp(19px, 5.6cqw, 23px)/1.2 var(--hand); color: var(--aside); min-height: 0; opacity: 0; transition: opacity .6s ease; }
.aside.is-shown { opacity: 1; }
.aside:empty { display: none; }
.note {
  font: clamp(19px, 5.6cqw, 23px)/1.2 var(--hand); color: var(--note);
  margin-bottom: .5em; min-height: 0;
  opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease;
  pointer-events: none !important;
}
.note.is-shown { opacity: 1; transform: none; }

.foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 56px; margin-top: 6px; }
.foot__hint { min-height: 44px; display: flex; flex-direction: column; justify-content: flex-end; }
.hint { margin: 0; font: clamp(17px, 5cqw, 20px)/1.15 var(--hand); color: var(--hint); opacity: 0; transition: opacity .6s ease; }
.hint.is-shown { opacity: 1; }
.link {
  font: 19px/1 var(--hand); color: #4f5a44; text-decoration: underline; text-underline-offset: 3px;
  min-height: 44px; padding: 0 4px; margin-left: -4px; text-align: left; align-self: flex-start;
}
.doit { min-height: 40px; }
.next {
  display: flex; align-items: center; gap: 6px; flex: none;
  min-width: 64px; min-height: 52px; justify-content: flex-end; margin-right: -6px; padding: 0 6px;
  transition: opacity .3s ease;
}
.next svg { width: 58px; height: 40px; fill: none; stroke: #24271f; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.next[aria-disabled="true"] { opacity: .28; cursor: default; }
.next.is-ready svg { animation: nudge-x 1.8s ease-in-out infinite; }
.next__begin { font: 24px/1 var(--hand); color: #505b48; display: none; }
.stage[data-stage="title"] .tale { align-items: center; justify-content: center; height: var(--ground); padding-bottom: 8px; }
.stage[data-stage="title"] .foot { justify-content: center; }
.stage[data-stage="title"] .next { flex-direction: column-reverse; gap: 0; margin-right: 0; }
.stage[data-stage="title"] .next__begin { display: block; }
.stage[data-stage="title"] .foot__hint, .stage[data-stage="title"] .words { display: none; }
.title__play { display: none; margin: 0; font: clamp(17px, 5cqw, 20px)/1.2 var(--hand); color: var(--hint); text-align: center; order: 2; }
.stage[data-stage="title"] .title__play { display: block; }

/* ---------------------------------------------------------------- choices */
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.chip {
  min-height: 44px; padding: 4px 16px 6px; border-radius: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1.5px #3d4436, 0 2px 0 rgba(74, 66, 50, .14);
  font: 21px/1 var(--hand); color: var(--deep);
}
.chip:active { background: #efe8d6; }
.chip[aria-pressed="true"] { background: var(--chosen); box-shadow: inset 0 0 0 1.5px var(--chosen-edge); color: #2f5a24; }
.choices[hidden] { display: none; }

/* ---------------------------------------------------------------- the guide page */
.page {
  position: relative; margin: 0 -4px 4px; padding: 14px 16px 10px;
  background: var(--card); border-radius: 4px 4px 6px 4px;
  box-shadow: 0 1px 0 rgba(74, 66, 50, .12), 0 10px 26px -12px rgba(74, 66, 50, .5), inset 0 0 0 1px rgba(217, 209, 189, .8);
  transform: rotate(-.6deg);
}
.page:not([hidden]) { animation: lift .7s cubic-bezier(.2, .8, .2, 1) both; }
.page::after { content: ""; position: absolute; right: 0; top: 0; width: 28px; height: 28px; background: linear-gradient(225deg, var(--stage) 50%, #e4dccb 50%); border-radius: 0 0 0 4px; }
.page__head { margin: 0; font: 20px/1.2 var(--hand); color: var(--rust); }
.page__line { margin: 2px 0 8px; font: clamp(21px, 6.4cqw, 25px)/1.15 var(--hand); color: var(--ink); }
.page__try { display: grid; grid-template-columns: 46px 1fr; gap: 4px 8px; align-items: start; }
.tick { width: 46px; height: 46px; display: grid; place-items: center; margin-top: 4px; }
.tick svg { width: 32px; height: 32px; fill: none; stroke: #24271f; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.tick__mark { stroke: #3f5a33; stroke-width: 3; stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .45s ease; }
.tick[aria-pressed="true"] .tick__mark { stroke-dashoffset: 0; }
.page__label { margin: 0; font: 17px/1.1 var(--hand); color: #8a6a4a; }
.page__text { margin: 2px 0 0; font: clamp(18px, 5.4cqw, 21px)/1.15 var(--hand); color: var(--ink); }
.page .link { min-height: 40px; font-size: 18px; }
.page__gate { margin: 2px 0 0; font: 16px/1.15 var(--hand); color: var(--aside); }
.page[hidden], .end[hidden] { display: none; }

/* ---------------------------------------------------------------- the end of the demo */
.end {
  position: absolute; inset: auto 0 0 0; z-index: 7;
  padding: 26px max(24px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: linear-gradient(rgba(236, 233, 224, 0), var(--stage) 22%);
}
.end:not([hidden]) { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.end__over { margin: 0; font: clamp(34px, 10.5cqw, 44px)/1.1 var(--script); color: var(--title); }
.end__text { margin: 8px 0 16px; font: clamp(21px, 6.2cqw, 25px)/1.2 var(--hand); color: var(--ink); max-width: 22em; }
.badge--end { height: 50px; }
.end__small { margin: 10px 0 0; font: 15px/1.3 var(--sans); color: #5f6655; }
.end .link { margin: 2px 0 0; align-self: center; font-size: 18px; }
.stage[data-beat="end"] .tale { opacity: 0; pointer-events: none; }
.stage[data-beat="end"] .tale > * { pointer-events: none; }

/* ---------------------------------------------------------------- below the demo */
.book { padding: 56px var(--gutter) 8px; max-width: 1080px; margin: 0 auto; }
h2 { font: 400 clamp(30px, 8vw, 44px)/1.12 var(--serif); color: #24311f; letter-spacing: -.01em; margin: 0 0 14px; text-wrap: balance; }
.book__lede { margin: 0 0 26px; font-size: 18px; color: #3b4437; max-width: 36em; }
.shots {
  list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(62vw, 250px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots li { scroll-snap-align: start; }
.shots img { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 0 0 1px rgba(36, 39, 31, .1), 0 14px 30px -18px rgba(60, 50, 30, .55); background: var(--stage); }

.notes { padding: 32px var(--gutter) 8px; max-width: 760px; margin: 0 auto; }
.margin {
  list-style: none; margin: 0; padding: 10px 18px 6px;
  background: var(--card); border-radius: 6px;
  box-shadow: 0 1px 0 rgba(74, 66, 50, .1), 0 18px 40px -26px rgba(74, 66, 50, .55), inset 0 0 0 1px rgba(217, 209, 189, .9);
}
.margin li { display: grid; grid-template-columns: 50px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px dashed var(--rule); }
.margin li:last-child { border-bottom: 0; }
.margin svg { width: 50px; height: 50px; fill: none; stroke: #24271f; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.margin svg path:first-child { stroke-width: 2.3; }
.margin h3 { margin: 0; font: 400 26px/1.1 var(--hand); color: var(--title); }
.margin p { margin: 2px 0 0; color: #3b4437; font-size: 16.5px; }

.last { padding: 56px var(--gutter) 40px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.last__scene { position: relative; width: min(100%, 420px); aspect-ratio: 960 / 380; margin-bottom: 18px; }
.last__island { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; }
.last__scene { aspect-ratio: 960 / 560; }
.last__fellow { position: absolute; left: 50%; width: 58%; height: auto; bottom: 13%; transform: translateX(-50%); }
.last h2 { margin-bottom: 6px; }
.last__line { margin: 0 0 22px; font: 25px/1.2 var(--hand); color: var(--ink); max-width: 18em; }
.badge--last, .badge--hero { height: 50px; }
.last__small { margin: 12px 0 0; font-size: 14px; color: #5f6655; }

.foot-page { border-top: 1px solid var(--rule); margin: 0 var(--gutter); padding: 20px 0 max(28px, env(safe-area-inset-bottom)); color: #5f6655; font-size: 14px; text-align: center; }
.foot-page nav { display: flex; justify-content: center; gap: 8px 24px; flex-wrap: wrap; }
.foot-page nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
.foot-page p { margin: 6px 0 0; }

/* ---------------------------------------------------------------- desktop */
@media (min-width: 900px) {
  .bar { display: none; }
  .hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(40px, 6vw, 96px);
    align-items: center; max-width: 1120px; margin: 0 auto; padding: 40px 40px 24px; min-height: min(100vh, 980px);
  }
  .hero__copy { display: block; max-width: 520px; }
  .hero__icon { width: 84px; height: 84px; border-radius: 19px; box-shadow: 0 0 0 1px rgba(36, 39, 31, .1), 0 12px 26px -14px rgba(50, 40, 20, .5); margin-bottom: 22px; }
  .hero h1 { margin: 0 0 18px; font-weight: 400; }
  .hero__name { display: block; font: clamp(52px, 5.2vw, 68px)/1.1 var(--script); color: var(--title); white-space: nowrap; }
  .hero__kind { display: block; margin-top: 12px; font: 30px/1.1 var(--hand); color: #5f6a53; }
  .hero__lede { font: 400 22px/1.45 var(--serif); color: #2c3328; margin: 0 0 10px; }
  .hero__ask { font: 30px/1.2 var(--hand); color: var(--note); margin: 0 0 26px; }
  .hero__note { margin: 18px 0 0; font-size: 15px; color: #5f6655; max-width: 26em; }
  .device {
    width: 400px; height: min(820px, calc(100vh - 64px)); min-height: 640px;
    padding: 12px; border-radius: 54px; background: #24271f;
    box-shadow: 0 0 0 1px #000, 0 40px 80px -40px rgba(40, 30, 10, .6), 0 18px 34px -24px rgba(40, 30, 10, .5);
  }
  .stage { height: 100%; min-height: 0; max-height: none; border-radius: 42px; }
  .book { padding-top: 72px; }
  .shots { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 4px 0 18px; }
  .notes { padding-top: 48px; }
  .last { padding-top: 80px; }
}

/* ---------------------------------------------------------------- motion */
@keyframes write { to { clip-path: inset(-.4em -.4em -.4em -.3em); } }
@keyframes underline { to { background-size: 100% 100%; } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, .985); } }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -6px; rotate: 2deg; } }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 4% -3%; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes lift { from { transform: translateY(24px) rotate(-.6deg); opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes nudge { 0%, 80%, 100% { transform: translateY(0); } 88% { transform: translateY(-4px) rotate(-4deg); } }
@keyframes nudge-x { 0%, 70%, 100% { transform: translateX(0); } 82% { transform: translateX(5px); } }
@keyframes arrive {
  0% { transform: translateX(95cqw) rotate(14deg); }
  55% { transform: translateX(-6%) rotate(-6deg) scale(1.04, .94); }
  72% { transform: translateX(3%) rotate(3deg) scale(.97, 1.04); }
  100% { transform: none; }
}
@keyframes rawr {
  0% { transform: scale(1); }
  25% { transform: scale(1.12, .9); }
  45% { transform: scale(.94, 1.1) translateY(-6%); }
  70% { transform: scale(1.04, .97); }
  100% { transform: scale(1); }
}
@keyframes bristle {
  0%, 100% { transform: none; }
  15% { transform: translateX(-3%) rotate(-3deg); }
  30% { transform: translateX(3%) rotate(3deg) scale(1.05); }
  45% { transform: translateX(-2%) rotate(-2deg); }
  60% { transform: translateX(2%) rotate(2deg); }
  80% { transform: translateX(-1%); }
}
@keyframes hop { 0%, 100% { transform: none; } 30% { transform: translateY(-9%) scale(.96, 1.05); } 60% { transform: scale(1.05, .95); } }
@keyframes flinch { 0%, 100% { transform: none; } 30% { transform: translateX(6%) scale(.94, 1.04); } }
@keyframes sink { 0% { transform: none; } 40% { transform: scale(1.04, .95); } 100% { transform: none; } }
@keyframes wiggle { 0%, 100% { transform: none; } 25% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }
@keyframes patter { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .fellow__img, .planet, .cloud, .next.is-ready svg, .pocket.is-asking .offer svg { animation: none !important; }
  .w.is-writing { clip-path: none; animation: none; }
  .u { background-size: 100% 100%; }
  .ring.is-running .ring__arc { transition-duration: var(--ms, 4200ms) !important; }
}


/* Keep the keyboard focus ring on the fellow while it waits at the edge. */
.fellow__hit { transition: transform 1.25s cubic-bezier(.45, .05, .3, 1); }
.stage[data-run="away"] .fellow__hit,
.stage[data-run="back"] .fellow__hit { transform: translateX(calc(50cqw - var(--iw) * .27)) scale(.82); }

/* Short screens: the guide page tightens up so the island above it stays whole. */
@media (max-height: 700px) {
  .page { padding: 10px 14px 6px; }
  .page__line { font-size: 20px; margin-bottom: 4px; }
  .page__text { font-size: 17.5px; }
  .page .link { min-height: 44px; }
}
