:root {
  --paper: #f8f2e4;
  --ink: #2b231c;
  --soft: #6e6152;
  --faint: #a2937f;
  --link: #2f6a45;
  --link-line: rgba(47, 106, 69, 0.35);
  --brass: #c99a2e;
  --col: 37rem;
  --grain: 0.3;
}
/* the paper warms and dims a little with the hour */
[data-time='morning'] { --paper: #f9f4e8; }
[data-time='afternoon'] { --paper: #f8f0de; }
[data-time='dusk'] { --paper: #f5ecdc; --grain: 0.34; }
[data-time='night'] { --paper: #f0e9dc; --grain: 0.38; --soft: #645a4e; }
/* the hour's glaze, matching the painting's (GLAZE in rive/shire-ii/gen.mjs) */
:root { --hour: rgba(244, 227, 176, 0); }
[data-time='morning'] { --hour: rgba(244, 207, 168, 0.1); }
[data-time='afternoon'] { --hour: rgba(233, 179, 86, 0.15); }
[data-time='dusk'] { --hour: rgba(160, 109, 154, 0.24); }
[data-time='night'] { --hour: rgba(30, 42, 94, 0.42); }
/* the halo reaches past the screen's edge on narrow windows; that shouldn't scroll */
body { overflow-x: clip; }
[data-season='winter'] { --link: #2f5f62; --link-line: rgba(47, 95, 98, 0.35); }
[data-season='autumn'] { --link: #6a5a24; --link-line: rgba(140, 100, 30, 0.38); }

html { background: var(--paper); transition: background-color 2s; }
/* smooth only for the signpost's own jumps; arriving at #writing from a post lands there at once */
html.settled { scroll-behavior: smooth; }
body {
  color: var(--ink);
  background: var(--paper);
  font: 400 19px/1.62 'Alegreya', 'Alegreya Fallback', ui-serif, Georgia, serif;
  transition: background-color 2s;
}
::selection { background: rgba(233, 185, 58, 0.35); }

a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
a:hover { text-decoration-color: currentColor; text-decoration-style: wavy; }
a:focus-visible { outline: 2px dashed var(--link); outline-offset: 3px; border-radius: 2px; }

.col { max-width: var(--col); margin: 0 auto; padding: 30px 20px 90px; }


/* ---- the hill */
.hill { margin: 14px -90px 4px; position: relative; container-type: inline-size; }
/* the hour's light, carried on past the painting: the painting's own glaze (in Rive)
   covers the canvas evenly and thins away over its bottom 6%; this is the same colour
   around the other three sides, fading out, with a hole exactly where the canvas is */
.hill, .gate { --halo: 160px; --art: calc(100cqw * 4 / 9); isolation: isolate; }
.gate { --halo: 44px; --art: calc(100cqw * 21 / 60); }
.hill::before, .gate::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: calc(-1 * var(--halo)); right: calc(-1 * var(--halo)); top: calc(-1 * var(--halo));
  height: calc(var(--art) + var(--halo));
  background: var(--hour);
  /* layers composite bottom-up: (the fade down) minus (the canvas), then times (the fade across) */
  mask:
    linear-gradient(to right, transparent, rgb(0 0 0 / 0.2) calc(var(--halo) * 0.3), rgb(0 0 0 / 0.65) calc(var(--halo) * 0.62), #000 var(--halo), #000 calc(100% - var(--halo)), rgb(0 0 0 / 0.65) calc(100% - var(--halo) * 0.62), rgb(0 0 0 / 0.2) calc(100% - var(--halo) * 0.3), transparent),
    linear-gradient(to bottom, transparent, rgb(0 0 0 / 0.2) calc(var(--halo) * 0.3), rgb(0 0 0 / 0.65) calc(var(--halo) * 0.62), #000 var(--halo), #000 calc(100% - var(--art) * 0.06), transparent),
    linear-gradient(#000, #000) no-repeat var(--halo) var(--halo) / calc(100% - 2 * var(--halo)) calc(100% - var(--halo));
  mask-composite: intersect, subtract;
  /* hidden until there's a painting to frame, then it comes up with it, on exactly the
     same clock as the canvas below (whose hour glaze is in from its first frame), so the
     tint inside the painting and around it always match and no edge shows */
  opacity: 0;
  transition: background-color 1.6s linear, opacity var(--glaze-in, 1.1s) var(--glaze-ease, cubic-bezier(0.33, 0, 0.2, 1));
}
.hill.glazed::before { opacity: 1; }
.hill canvas, .gate canvas { opacity: 0; transition: opacity var(--glaze-in, 1.1s) var(--glaze-ease, cubic-bezier(0.33, 0, 0.2, 1)); }
.hill.glazed canvas, .gate.glazed canvas { opacity: 1; }
/* behind a still, the canvas is covered: it can simply be there */
.hill.stilled { --glaze-in: 0.35s; }
.hill.stilled canvas { transition: none; opacity: 1; }
.gate.glazed::before { opacity: 0.6; }
.hill canvas { width: 100%; aspect-ratio: 900 / 400; height: auto; }
/* the finished painting as a picture, over the canvas until the live one takes over:
   framed as the canvas is (filling it here; cropped to cover, anchored right, on phones) */
.hill .still {
  position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 900 / 400; height: auto;
  object-fit: fill; pointer-events: none; opacity: 0; transition: opacity 0.35s ease-out;
}
.hill.stilled .still { opacity: 1; }
/* coming back: the finished painting and its arms are simply there, as you left them */
.known .hill.stilled:not(.live) .still { transition: none; }
.known .planted .arm { animation: none; }
.known .planted .arm .o, .known .planted .arm .soak, .known .planted .arm b, .known .planted .arm small, .known .planted .upright .o, .known .planted .upright .soak { transition: none; }
.hill.stilled.live .still { opacity: 0; transition-duration: 0.6s; }
.sign {
  margin: -6px 0 0 calc(90px + 4%);
  font: 600 22px/1.2 'Caveat', 'Caveat Fallback', cursive; color: var(--soft);
  transform: rotate(-1.4deg); transform-origin: left;
  animation: write 0.9s 0.5s cubic-bezier(0.5, 0, 0.3, 1) both;
}
@keyframes write { from { clip-path: inset(-10px 100% -10px -10px); } to { clip-path: inset(-10px -10px -10px -10px); } }

/* ---- the signpost at the verge. The post is painted into the hill (Rive);
   the arms are links laid over it, placed in the painting's own units */
.signpost { --u: calc(100cqw / 900); position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 900 / 400; pointer-events: none; }
.upright { display: none; }
.arm {
  position: absolute; display: flex; align-items: baseline; gap: 0.32em; white-space: nowrap;
  height: calc(var(--u) * 34); top: calc(var(--u) * (122 + var(--i) * 42));
  font: 700 calc(var(--u) * 25) / calc(var(--u) * 34) 'Caveat', 'Caveat Fallback', cursive; color: #33281f; text-decoration: none;
  pointer-events: auto; isolation: isolate;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.9s cubic-bezier(0.3, 2.2, 0.45, 0.8);
}
.arm b { font-weight: 700; }
.arm small { font: 500 calc(var(--u) * 18.5) / 1 'Caveat', 'Caveat Fallback', cursive; color: #6e5f50; }
.arm .paint { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; }
.arm.r { left: calc(var(--u) * 157); padding: 0 calc(var(--u) * 36) 0 calc(var(--u) * 24); transform-origin: calc(var(--u) * 11) 50%; }
.arm.l { right: calc(100% - var(--u) * 171); padding: 0 calc(var(--u) * 24) 0 calc(var(--u) * 36); transform-origin: calc(100% - var(--u) * 11) 50%; }

/* the arms go up one by one once the post is inked: the line draws on, the paint soaks in, then the lettering */
.arm { opacity: 0; }
.planted .arm { opacity: 1; animation: swing-in 0.75s calc(var(--i) * 0.11s) cubic-bezier(0.34, 1.4, 0.64, 1) both; }
@keyframes swing-in { from { opacity: 0; transform: rotate(calc(var(--tilt, 0deg) - 12deg)) scaleX(0.55); } }
.arm .o { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.planted .arm .o { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s cubic-bezier(0.45, 0.05, 0.25, 1) calc(var(--i) * 0.11s + 0.1s); }
.arm .soak { opacity: 0; }
.planted .arm .soak { opacity: 1; transition: opacity 1.2s ease calc(var(--i) * 0.11s + 0.45s); }
.arm b, .arm small { position: relative; opacity: 0; }
.planted .arm b, .planted .arm small { opacity: 1; transition: opacity 0.5s ease calc(var(--i) * 0.11s + 0.6s); }
.arm.settled { animation: none; }
/* the ink boils, three re-traced cels at the hill's own pace, but only on the arm
   you're touching: each swap repaints a blurred stroke, and doing that on every
   arm all the time kept the browser busy for nothing */
.paint .cel { visibility: hidden; }
.paint .c0 { visibility: visible; }
.arm:hover .paint .cel, .arm:focus-visible .paint .cel, .badge:hover .paint .cel, .badge:focus-visible .paint .cel { visibility: hidden; animation: boil 0.4s step-end infinite; }
.arm:hover .paint .c1, .arm:focus-visible .paint .c1, .badge:hover .paint .c1, .badge:focus-visible .paint .c1 { animation-delay: -0.267s; }
.arm:hover .paint .c2, .arm:focus-visible .paint .c2, .badge:hover .paint .c2, .badge:focus-visible .paint .c2 { animation-delay: -0.133s; }
@keyframes boil { 0% { visibility: visible; } 33.33% { visibility: hidden; } 100% { visibility: hidden; } }

/* a loose arm creaks round on its nail, overshoots, and settles a little askew */
.arm:hover, .arm:focus-visible { text-decoration: none; }
.arm.r:hover, .arm.r:focus-visible { transform: rotate(calc(var(--tilt) + 3.5deg)); }
.arm.l:hover, .arm.l:focus-visible { transform: rotate(calc(var(--tilt) - 3.5deg)); }
.arm .tint { transition: fill-opacity 0.4s; }
.arm:hover .tint, .arm:focus-visible .tint { fill-opacity: 0.44; }
.arm:focus-visible { outline: 2px dashed var(--link); outline-offset: 2px; }
/* a regular's tick, inked beside the arm they took last time */
.tick {
  position: absolute; top: -0.32em; width: 0.8em; height: 0.8em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2.5 11.5c2 1.4 3.4 3.2 4.6 5.6C9.6 10.4 13 5.6 18 2.4' fill='none' stroke='%232b231c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.arm.r .tick { right: -0.5em; }
.arm.l .tick { left: -0.5em; }

/* ---- marks the pen left behind: sparing, in the hill's ink */
.mark { position: absolute; z-index: 1; pointer-events: none; opacity: 0; }
.mark .paint { width: 100%; height: 100%; overflow: visible; }
.hill .mark { transition: opacity 0.4s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); transform: scale(0.6); }
.hill.inked .mark { opacity: 1; transform: none; }
.hill.inked .m-flick { transition-delay: 0.5s; }
.m-blot { right: -118px; top: -20px; width: 56px; aspect-ratio: 1; }
.m-flick { position: relative; display: inline-block; vertical-align: -4px; margin-left: 10px; width: 84px; aspect-ratio: 130 / 50; transform-origin: left; }
.room-block .mark, .colophon .mark { transition: opacity 0.6s ease 0.9s; }
.bloomed .mark { opacity: 1; }
.m-drip { left: -16px; top: 26px; width: 15px; aspect-ratio: 26 / 80; transform-origin: top; transform: scaleY(0); }
.bloomed .m-drip { transform: none; transition: opacity 0.4s ease 1.2s, transform 2.6s cubic-bezier(0.3, 0.6, 0.3, 1) 1.2s; }
.m-hatch { right: -4px; top: -6px; width: 40px; aspect-ratio: 60 / 50; transform: rotate(8deg); }
.colophon { position: relative; }
.m-spatter { left: -70px; top: -18px; width: 58px; aspect-ratio: 1; }

/* ---- reading */
main { margin-top: 30px; }
.intro p { margin: 0 0 1em; }
.intro { margin-bottom: 58px; }

.room-block { margin: 0 0 52px; }
.room-block h2 { scroll-margin-top: 40px; }
.room-block h2 {
  position: relative; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px;
  margin: 0 0 12px; font-size: 22px; font-weight: 700; letter-spacing: 0.005em;
}
.room-block h2 .room { font: 500 19px/1 'Caveat', 'Caveat Fallback', cursive; color: var(--faint); transform: rotate(-2deg) translateY(-1px); }
.room-block h2 small { flex-basis: 100%; font-size: 14px; font-weight: 400; font-style: italic; color: var(--faint); margin-top: -2px; }
.room-block h2 .wash { left: -30px; top: -14px; width: 150px; height: 64px; }


/* lists, with little round brass knobs for bullets */
.knobs { list-style: none; margin: 0; padding: 0 0 0 1.25em; }
.knobs li { position: relative; margin: 0 0 0.42em; }
.knobs li::before {
  content: ''; position: absolute; left: -1.05em; top: 0.68em; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0d27a, var(--brass) 62%, #8a6a1e);
  box-shadow: 0 0 0 1px rgba(43, 35, 28, 0.6);
  opacity: 0.85;
}
.knobs .when { color: var(--faint); font-size: 15px; font-style: italic; white-space: nowrap; }
.knobs .star { color: var(--brass); font-size: 14px; }
.knobs.inline { display: flex; flex-wrap: wrap; gap: 4px 36px; padding-left: 1.25em; }

/* ---- leaving by the gate */
.leaving { margin-top: 80px; }
.gate { position: relative; margin: 0 -30px; container-type: inline-size; }
.gate canvas { width: 100%; aspect-ratio: 600 / 210; height: auto; }
.board {
  position: absolute; left: 6.6%; top: 20%; width: 37.6%; height: 39%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1em;
  text-align: center; transform: rotate(-1.1deg);
  font-family: 'Caveat', 'Caveat Fallback', cursive; color: #3a2f25; line-height: 1.05;
}
.board p { margin: 0; font-size: clamp(14px, 3.9cqw, 25px); font-weight: 600; }
.board a { font-size: clamp(13px, 3.5cqw, 22px); font-weight: 500; }
.colophon { margin: 18px 0 0; font-size: 15px; font-style: italic; color: var(--soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.colophon a { font-style: normal; }
.arm.back {
  position: relative; top: auto; height: 32px; padding: 0 16px 0 28px; --tilt: 1.5deg; transform-origin: calc(100% - 11px) 50%;
  font: 600 18px/32px 'Caveat', 'Caveat Fallback', cursive; opacity: 1;
}
.arm.back .soak, .arm.back b, .arm.back .o { opacity: 1; stroke-dashoffset: 0; }
.arm.back:hover, .arm.back:focus-visible { transform: rotate(calc(var(--tilt) - 3.5deg)); }

/* ---- narrower screens */
@media (max-width: 860px) {
  /* the hour's halo reaches past the screen's edges here; on phones that would widen
     the page (they zoom out to fit it), so clip it at the sides */
  .hill, .gate { overflow-x: clip; }
  .hill { margin: 12px -20px 4px; }
  .sign { margin-left: 4%; }
  .m-spatter { left: auto; right: -8px; top: -34px; }
}
/* on a phone the painting is cropped close around the door (taller than the wide
   desktop strip) and the post stands at its left edge, arms out over the slope */
@media (max-width: 600px) {
  .hill { margin: 8px -16px 2px; --art: calc(100cqw * 5 / 6); --halo: 70px; }
  .hill canvas, .hill .still { aspect-ratio: 6 / 5; }
  .hill .still { object-fit: cover; object-position: 100% 50%; }
  .signpost { --u: 1px; inset: 0 0 auto; width: auto; aspect-ratio: 6 / 5; }
  .upright { display: block; position: absolute; left: 20px; bottom: 6px; width: 26px; }
  .upright .o { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s cubic-bezier(0.45, 0.05, 0.25, 1); }
  .upright .soak { opacity: 0; transition: opacity 1s ease 0.5s; }
  .planted .upright .o { stroke-dashoffset: 0; }
  .planted .upright .soak { opacity: 1; }
  .arm {
    top: auto; bottom: calc(20px + (5 - var(--i)) * 35px); height: 30px;
    font-size: 19px; line-height: 30px; animation-delay: calc(0.5s + var(--i) * 0.11s);
  }
  .arm small { font-size: 14px; }
  .arm.r, .arm.l { left: 23px; right: auto; padding: 0 26px 0 19px; transform-origin: 10px 50%; }
  .sign { font-size: 19px; margin: 6px 0 0 4px; }
  /* in Work, each date on its own line under the role, rather than wherever it wraps */
  #work + .knobs .when { display: block; margin-top: -1px; font-size: 14px; line-height: 1.4; }
}
/* narrow phones: the boards carry just the room, so they stop short of the door
   (the room's name is still there, beside each heading) */
@media (max-width: 460px) {
  .arm small { display: none; }
  .arm.r, .arm.l { padding: 0 22px 0 17px; }
}
@media (max-width: 380px) {
  .arm { bottom: calc(18px + (5 - var(--i)) * 32px); height: 27px; font-size: 17px; line-height: 27px; }
}
@media (max-width: 520px) {
  body { font-size: 17.5px; }
  .col { padding: 22px 16px 96px; }
  .gate { margin: 0 -16px; }
  .room-block h2 .wash { left: -22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sign { animation: none; }
  .paint .cel, .arm:hover .paint .cel, .arm:focus-visible .paint .cel { animation: none; }
  .arm:hover .paint .c0, .arm:focus-visible .paint .c0 { visibility: visible; }
  .paint .c0 { visibility: visible; }
  .arm, .arm .soak, .arm b, .arm small, .mark { opacity: 1; }
  .arm .o, .upright .o { stroke-dashoffset: 0; }
  .m-drip { transform: none; }
}

/* without a wide margin, the blot comes in beside the heading instead of past the page's edge */
@media (max-width: 860px) {
  .m-blot { right: -4px; top: -40px; width: 40px; }
}

/* ---- Elsewhere: a painted badge for each service */
.knobs.inline:has(.badge) { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.knobs.inline:has(.badge) li::before { display: none; }
.badge { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--ink, #2b231c); }
.badge .mark-icon { display: block; width: 54px; height: 54px; transition: transform 0.6s cubic-bezier(0.3, 2.2, 0.45, 0.8); }
.badge .mark-icon .paint { width: 100%; height: 100%; overflow: visible; }
.badge .label { font: 600 18px/1 'Caveat', 'Caveat Fallback', cursive; color: var(--soft, #6e6152); }
.badge:hover, .badge:focus-visible { text-decoration: none; }
.badge:hover .mark-icon, .badge:focus-visible .mark-icon { transform: rotate(-6deg) translateY(-2px); }
.badge:hover .label, .badge:focus-visible .label { color: var(--ink, #2b231c); }

/* ---- at the door: a "knock", and whoever answers */
.say { position: absolute; z-index: 3; pointer-events: none; font-family: 'Caveat', 'Caveat Fallback', cursive; color: var(--ink); }
.say.sfx {
  font: 700 19px/1 'Caveat', 'Caveat Fallback', cursive; color: #5a4632; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  animation: knock-word 1.2s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.say.sfx.wide { letter-spacing: 0.06em; }
/* readable on any light: a halo of paper by day; lamplit cream on a dark halo at dusk and night */
.say.sfx { text-shadow: 0 0 2px #f8f2e4, 0 0 5px #f8f2e4, 0 0 9px rgba(248, 242, 228, 0.8); }
[data-time='dusk'] .say.sfx, [data-time='night'] .say.sfx {
  color: #fdeab8; text-shadow: 0 0 2px rgba(28, 22, 16, 0.9), 0 0 6px rgba(28, 22, 16, 0.7), 0 0 12px rgba(255, 190, 90, 0.35);
}
@keyframes knock-word {
  0% { opacity: 0; translate: 0 4px; scale: 0.7; }
  14% { opacity: 1; translate: 0 0; scale: 1.08; }
  26% { scale: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; translate: 0 -18px; }
}
/* a speech bubble in the hill's hand: the painted bubble (paint.js bubble, laid on by
   main.js once the words are measured) is the background, its tail in the bottom 12px
   with the tip at the element's bottom edge, --tail in from its left. The words are
   sized to the painting, so the bubble keeps its size next to the door on a phone */
.say.speech, .say.angry {
  padding: 0.3em 0.68em calc(0.36em + 12px); transform: translateY(-100%);
  font-size: clamp(15px, 1.95cqw, 21px); font-weight: 600; line-height: 1.1; white-space: normal; width: max-content; max-width: 11em;
  background: no-repeat 0 0 / 100% 100%;
  filter: drop-shadow(2px 3px 0 rgba(43, 35, 28, 0.1));
  animation: bubble-in 0.42s cubic-bezier(0.34, 1.6, 0.64, 1) both;
  transform-origin: var(--tail, 18px) 100%;
}
.say.gone { animation: bubble-out 0.5s ease-in both; }
.say.gone.hushed { animation-duration: 0.2s; }
@keyframes bubble-in { 0% { opacity: 0; scale: 0.4; } 100% { opacity: 1; scale: 1; } }
@keyframes bubble-out { to { opacity: 0; translate: 0 -6px; } }
/* someone very cross: the same bubble, in red ink, louder and shaking */
.say.angry {
  font-size: clamp(20px, 2.7cqw, 29px); font-weight: 700; letter-spacing: 0.02em; color: #8e2a18;
  animation: bubble-in 0.2s cubic-bezier(0.34, 2, 0.64, 1) both, rage 0.32s steps(2) 0.2s 3;
}
.say.angry.gone { animation: bubble-out 0.35s ease-in both; }
@keyframes rage { 0% { rotate: -3deg; } 50% { rotate: 3deg; } 100% { rotate: 0deg; } }
@media (prefers-reduced-motion: reduce) { .say { animation: none !important; } }

/* ---- saying hello: a letter, addressed to the hill */
.intro p.hello { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-bottom: 10px; }
.post-desk { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 18px; margin: 0 0 1em; }
.letter {
  position: relative; display: block; width: min(100%, 340px); aspect-ratio: 2 / 1; container-type: inline-size;
  text-decoration: none; color: var(--ink);
  transform: rotate(-1.6deg); transform-origin: 30% 80%;
  transition: transform 0.5s cubic-bezier(0.3, 1.8, 0.5, 1), filter 0.4s;
  filter: drop-shadow(1px 2px 0 rgba(43, 35, 28, 0.1));
}
.letter .paint { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.letter:hover, .letter:focus-visible { text-decoration: none; transform: rotate(0.6deg) translateY(-4px); filter: drop-shadow(3px 7px 2px rgba(43, 35, 28, 0.14)); }
.letter:hover .paint .cel, .letter:focus-visible .paint .cel { visibility: hidden; animation: boil 0.4s step-end infinite; }
.letter:hover .paint .c1, .letter:focus-visible .paint .c1 { animation-delay: -0.267s; }
.letter:hover .paint .c2, .letter:focus-visible .paint .c2 { animation-delay: -0.133s; }
.letter:focus-visible { outline: 2px dashed var(--link); outline-offset: 4px; }
/* the address, in an older hand, right of the twine (paint.js letter: the flourish
   runs under the addressee at 121 of 170) */
.letter .addr { position: absolute; left: 28%; right: 5%; top: 0; bottom: 0; font: italic 400 1em/1 'Alegreya', 'Alegreya Fallback', Georgia, serif; color: #3a2a1c; }
.letter .addr > span { position: absolute; left: 0; white-space: nowrap; transform: translateY(-86%); }
.letter .via { top: 22%; left: auto; right: 0; font-size: 4.4cqw; color: #7a6248; }
.letter .to { top: 69.5%; font-size: 7cqw; }
.letter .to .em { color: var(--link); }
.letter .at { top: 85%; font-size: 4.9cqw; color: #5e4a36; }
/* posted: up and away toward the hill's postbox, and a fresh envelope comes back */
.letter.posting { animation: post-off 2.2s cubic-bezier(0.5, 0, 0.3, 1) both; pointer-events: none; }
@keyframes post-off {
  0% { transform: rotate(-1.6deg); opacity: 1; }
  10% { transform: rotate(2deg) translate(4px, 6px) scale(0.98); opacity: 1; }
  32% { transform: rotate(-14deg) translate(70px, -140px) scale(0.42); opacity: 0; }
  70% { transform: rotate(-1.6deg) translate(0, 14px); opacity: 0; }
  100% { transform: rotate(-1.6deg); opacity: 1; }
}
.post-desk { position: relative; }
.hello .copy {
  padding: 0 0 6px; border: 0; cursor: pointer;
  transform: rotate(-2.5deg) translateY(-1px); transform-origin: left center; /* jotted in beside the line, a little askew */
  font: 500 18px/1.2 'Caveat', 'Caveat Fallback', cursive; color: var(--soft);
  /* a pencilled wave underneath, drifting along like a slow stream */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='6'%3E%3Cpath d='M0 3Q3 .6 6 3T12 3T18 3T24 3' fill='none' stroke='%232b231c' stroke-opacity='.32' stroke-width='1.1'/%3E%3C/svg%3E") repeat-x 0 100% / 24px 6px;
  animation: drift 7s linear infinite;
  transition: color 0.2s;
}
@keyframes drift { to { background-position: 24px 100%; } }
.hello .copy:hover { color: var(--ink); }
/* "copied", let go as smoke above the button (main.js puff), a letter at a time */
.puff {
  position: absolute; z-index: 2; display: flex; transform: translate(-50%, -100%); pointer-events: none; white-space: pre;
  font: 600 20px/1 'Caveat', 'Caveat Fallback', cursive; color: #54493d;
  text-shadow: 0 0 6px rgba(110, 97, 82, 0.35);
}
.puff span { display: inline-block; }
.hello .copy:focus-visible { outline: 2px dashed var(--link); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .letter, .letter:hover { transition: none; transform: rotate(-1.6deg); }
  .hello .copy { animation: none; }
}
