/*
  "Drawing In" (read.drawingin.php), in the design of read.thresholds.php, with a light / dark choice for the reader.
  Both gradients are drawn from its opening photograph: cloud pouring over a dark mountain, light behind it.
*/

/* ---- the reader's two pages ---- */
:root {
  --wx-fg: var(--paper);
  --wx-soft: rgb(243 237 227 / .68);
  --wx-rule: rgb(243 237 227 / .22);
  --wx-end: #2b3e4d;              /* where the page meets the footer */
  --wx-glow: 255 249 238;
  --wx-drop: 255 255 255;
}
:root[data-theme="light"] {
  --wx-fg: #1f2a35;
  --wx-soft: #4a5866;
  --wx-rule: rgb(31 42 53 / .22);
  --wx-end: #ece3d4;
  --wx-glow: 255 255 255;
  --wx-drop: 96 118 158;
}

/* ---- the JW monogram, top left, as on the new homepage ---- */
.signature { width: clamp(72px, 6.3vw, 94px); aspect-ratio: 300 / 217; }   /* the JW, a little larger */
.signature {
  top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 3.4vw, 40px));
  right: auto;
  left: calc(env(safe-area-inset-left, 0px) + clamp(22px, 4vw, 54px));
}
.signature__mark {
  inset: 4%;
  -webkit-mask: url("/assets/img/jw-monogram.png") center / contain no-repeat;
  mask: url("/assets/img/jw-monogram.png") center / contain no-repeat;
}
/* its pulse: the soft water-drop glow of the new homepage, not the site's older ring */
.signature::before,
.signature::after {
  z-index: -1;
  width: 110px; height: 110px; margin: -55px 0 0 -55px;
  box-shadow: none !important;
  background: radial-gradient(circle,
    rgb(255 255 255 / .06) 0%, rgb(255 255 255 / .09) 16%, rgb(255 255 255 / .13) 30%,
    rgb(255 255 255 / .15) 42%, rgb(255 255 255 / .11) 54%, rgb(255 255 255 / .06) 64%,
    rgb(255 255 255 / .025) 72%, rgb(255 255 255 / 0) 80%);
  filter: blur(6px);
}
[data-chrome-ink="dark"] .signature::before {
  background: radial-gradient(circle,
    rgb(255 255 255 / .2) 0%, rgb(255 255 255 / .28) 16%, rgb(255 255 255 / .38) 30%,
    rgb(255 255 255 / .42) 42%, rgb(255 255 255 / .32) 54%, rgb(255 255 255 / .18) 64%,
    rgb(255 255 255 / .07) 72%, rgb(255 255 255 / 0) 80%);
}
.signature::after { display: none; }
.signature.is-rippling::before { animation: wx-sig-glow 2600ms var(--ease-soft) 1; }
.signature.is-rippling .signature__mark { animation: none; }
@media (hover: hover) and (pointer: fine) {
  .signature:hover::before { animation: wx-sig-glow 2600ms var(--ease-soft) 1; }
}
@keyframes wx-sig-glow {
  0% { opacity: 0; transform: scale(.7); }
  22% { opacity: .9; }
  58% { opacity: .4; }
  100% { opacity: 0; transform: scale(4); }
}

/* ---- the menu: exactly as on the new homepage (copied from index.jesse.php) ---- */
/* The menu: the footer's steel-slate blue, always with light words. */
.js .menu,
.js .menu[data-tone] {
  /* the same steel-slate blues as the bottom of the footer: lighter at the top, deepening downward */
  background: linear-gradient(180deg, rgb(109 140 161 / .92) 0%, rgb(78 108 131 / .94) 22%, rgb(56 82 102 / .95) 48%, rgb(41 63 80 / .96) 76%, rgb(32 49 62 / .97) 100%);
  color: var(--paper);
}
.is-menu-open .signature { color: var(--paper); }

/* The menu: a soft, feathered reveal growing from the monogram instead of a hard-edged circle. */
@property --mr { syntax: "<length>"; inherits: false; initial-value: 0px; }
.js .menu {
  --mr: 0px;
  clip-path: none;
  -webkit-mask-image: radial-gradient(circle at var(--mx, 64px) var(--my, 44px), #000 max(0px, calc(var(--mr) - 32vmin)), transparent var(--mr));
  mask-image: radial-gradient(circle at var(--mx, 64px) var(--my, 44px), #000 max(0px, calc(var(--mr) - 32vmin)), transparent var(--mr));
  transition: --mr 1150ms var(--ease-water), visibility 0s linear 1150ms;
}
.js .menu.is-open {
  --mr: calc(var(--r, 160vmax) + 40vmin);
  clip-path: none;
  transition: --mr 1150ms var(--ease-water), visibility 0s;
}

/* Closing: the words stay put and the withdrawing overlay's soft edge carries them away,
   so each word disappears exactly as the dark passes over it. They reset once it has gone.
   (Opening keeps the site's own staggered arrival.) */
.js .menu:not(.is-open) .menu__link,
.js .menu:not(.is-open) .menu__secondary a {
  transition: opacity 0s linear 1150ms, filter 0s linear 1150ms, transform 0s linear 1150ms;
}

/* ---- the page: two gradients, one over the other, so switching cross-fades ---- */
.wx {
  --wx-measure: var(--text-measure);
  position: relative;
  z-index: 1;
  min-height: 100vh;
  color: var(--wx-fg);
  transition: color 900ms var(--ease-soft);
}
.wx::before,
.wx::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  transition: opacity 900ms var(--ease-soft);
}
/*
  dark: the mountain in cloud. The near-black of the ridge at the top, through storm blue-grey and
  slate, mist and a breath of the forest's green, to the slate where the footer begins; pools of
  cloud-light and the blue of the sky's breaks drift across it.
*/
.wx::before {
  background:
    radial-gradient(70% 9% at 82% 8%, rgb(220 226 232 / .07), transparent 72%),
    radial-gradient(60% 9% at 16% 19%, rgb(92 120 148 / .2), transparent 72%),
    radial-gradient(65% 10% at 80% 31%, rgb(200 210 220 / .06), transparent 72%),
    radial-gradient(60% 9% at 20% 44%, rgb(56 78 68 / .24), transparent 72%),
    radial-gradient(65% 9% at 84% 56%, rgb(104 124 150 / .18), transparent 72%),
    radial-gradient(60% 9% at 14% 68%, rgb(118 116 140 / .14), transparent 72%),
    radial-gradient(65% 10% at 78% 80%, rgb(60 84 76 / .22), transparent 72%),
    radial-gradient(60% 8% at 24% 92%, rgb(96 124 150 / .16), transparent 72%),
    linear-gradient(180deg, #11171c 0%, #151d24 10%, #1a242d 22%, #1e2a33 34%, #212d34 46%, #24323a 58%, #22302f 68%, #253339 78%, #283840 89%, #2b3e4d 100%);
}
/*
  light: the cloud itself. Bright cloud-white at the top, sunlit where the light breaks through,
  through silver and the pale blue of the sky's breaks, a mist of sage from the forest below,
  warming toward the sand where the footer begins.
*/
.wx::after {
  opacity: 0;
  background:
    radial-gradient(70% 10% at 84% 7%, rgb(252 244 222 / .7), transparent 72%),
    radial-gradient(65% 10% at 12% 18%, rgb(184 204 224 / .5), transparent 72%),
    radial-gradient(70% 10% at 80% 30%, rgb(214 212 228 / .44), transparent 72%),
    radial-gradient(60% 10% at 18% 42%, rgb(200 214 202 / .46), transparent 72%),
    radial-gradient(70% 11% at 84% 53%, rgb(190 206 224 / .46), transparent 72%),
    radial-gradient(60% 10% at 14% 65%, rgb(222 212 226 / .4), transparent 72%),
    radial-gradient(70% 10% at 80% 77%, rgb(204 218 204 / .42), transparent 72%),
    radial-gradient(65% 10% at 22% 89%, rgb(238 220 190 / .44), transparent 72%),
    linear-gradient(180deg, #eff1f2 0%, #ebeef0 10%, #e6eaee 22%, #e2e8ee 34%, #e6eaea 46%, #e4e9e3 58%, #e8e9e5 70%, #ece8e0 82%, #ece3d4 100%);
}
:root[data-theme="light"] .wx::after { opacity: 1; }
:root[data-theme="light"] .wx::before { opacity: 0; }   /* both fade, so the other never shows at an edge */

/* ---- the article ---- */
.wa { display: flex; flex-direction: column; padding-bottom: calc(9vh + .5rem); }   /* room for the footer to fade in over */
.wa > *:not(.wa-fig) {
  width: min(100% - 2 * var(--gutter), var(--wx-measure));
  margin-left: auto;
  margin-right: auto;
}
.wa-fig { margin: 0; }
.wa-fig img { display: block; width: 100%; height: auto; max-width: none; }
.wa-fig figcaption {
  margin-top: .7rem;
  font-family: var(--font-body);
  font-size: .78rem;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--wx-soft);
  transition: color 900ms var(--ease-soft);
}
.wa-place { font-style: italic; }

/* the opening photograph, fading down into the page */
.wa-fig--before .wa-fig__frame {
  height: 74vh;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
}
.wa-fig--before img { height: 100%; object-fit: cover; filter: brightness(.7) saturate(.85); transition: filter 900ms var(--ease-soft); }
:root[data-theme="light"] .wa-fig--before img { filter: none; }
.wa-fig--before figcaption { display: none; }

/* the title, rising out of the photograph's fade, under a soft light like the homepage's moon */
.wa-head { position: relative; margin-top: -24vh; text-align: center; }
.wa-head::before {
  content: ""; position: absolute; left: 50%; top: -9rem; width: 18rem; height: 18rem; margin-left: -9rem;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgb(var(--wx-glow) / .22) 0%, rgb(var(--wx-glow) / .1) 30%, rgb(var(--wx-glow) / 0) 68%);
  filter: blur(6px);
  animation: wx-moon 7s ease-in-out infinite;
}
@keyframes wx-moon { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.12); } }

.wa-back { margin: 0 0 1.2rem; font-family: var(--font-body); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.wa-back a { color: var(--wx-soft); text-decoration: none; transition: color 900ms var(--ease-soft); }
.wa-back a::before { content: "‹"; display: inline-block; margin-right: .5em; font-size: 1.3em; line-height: 0; transform: translateY(.04em); }
.wa-back a:hover { color: var(--wx-fg); }
.wa-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(3.2rem, 2rem + 5.6vw, 7rem);
  line-height: .98;
  letter-spacing: -.02em;
}
.wa-dek {
  margin: .8rem 0 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.2rem, 1.05rem + .7vw, 1.6rem);
  line-height: 1.35;
  color: var(--wx-soft);
  transition: color 900ms var(--ease-soft);
}
.wa-dek em { font-style: normal; }
.wa-meta {
  margin: 1.4rem 0 0;
  font-family: var(--font-body);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--wx-soft);
  transition: color 900ms var(--ease-soft);
}
.wa-meta span + span::before { content: "·"; margin: 0 .7em; opacity: .7; }

/* arriving out of a blur, as text does on the homepage */
@keyframes wx-arrive { from { opacity: 0; filter: blur(14px); } to { opacity: 1; filter: blur(0); } }
.wa-head > * { animation: wx-arrive 1600ms var(--ease-soft) both; }
.wa-head > :nth-child(2) { animation-delay: 250ms; }
.wa-head > :nth-child(3) { animation-delay: 700ms; }
.wa-head > :nth-child(4) { animation-delay: 1000ms; }

.wa-note { margin-top: clamp(2.4rem, 6vh, 3.6rem); margin-bottom: clamp(2.4rem, 6vh, 3.6rem); }
.wa-note p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.62;
  color: var(--wx-soft);
  transition: color 900ms var(--ease-soft);
}
.wa-note em { font-style: normal; }

.wa-body p {
  margin: 0 0 1.15em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-read);
  line-height: var(--text-read-lh);
  text-wrap: pretty;
  hanging-punctuation: first;
}
/* the pull quotes: large, centred, softly lit, and they blur under the mouse like the homepage's words */
.wa-pull { margin: 0; padding: clamp(2rem, 6vh, 3.5rem) 0; text-align: center; }   /* the same size and measure as About's callouts */
.wa-pull p {
  max-width: var(--text-call-measure);
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;   /* pulled from the text, so set in italics; About's callouts stand on their own and stay upright */
  font-size: var(--text-call);
  line-height: var(--text-call-lh);
  text-wrap: balance;
}
.wa-break { display: grid; place-items: center; height: 4.2rem; }
/* a single drop of light, like the homepage's hidden spots */
.wa-break span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: .35;
}

/* a subtitle set like a dictionary entry */
.wa-dek--define { font-style: normal; }
.wa-define__word { font-style: italic; }
.wa-define__part { margin: 0 .55em; font-family: var(--font-body); font-size: .58em; letter-spacing: .16em; text-transform: uppercase; vertical-align: .22em; opacity: .85; }
.wa-define__sense { font-style: italic; }
.wa-define__sense em { font-style: normal; }

/* the diary: set in, in italics, held by a faint line */
.wa-quote { margin: 1.6em 0 1.9em; padding: .1em 0 .1em 1.4em; border-left: 1px solid var(--wx-rule); }
.wa-quote p { margin: 0 0 .9em; font-style: italic; font-size: calc(var(--text-read) * .94) !important; line-height: 1.62 !important; opacity: .9; }
.wa-quote p:last-child { margin-bottom: 0; }
.wa-quote em { font-style: normal; }

/* "we / draw / in / breath": each word a step down and across, arriving on its own */
.wa-stair { margin: 1.3em 0 1.7em; font-weight: 300; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem) !important; line-height: 1.5 !important; }
.wa-stair span { display: block; padding-left: calc(var(--step, 0) * 2.6em); }

/* short lines, each on its own line; some set in */
.wa-lines { margin: 1.4em 0 1.6em; line-height: 1.62 !important; }
.wa-lines span { display: block; }
.wa-lines span.is-in { padding-left: 2.2em; }

/* a photograph within the essay: a little wider than the text, as it is (the worn card and all), captioned in the hand of the page */
.wa-print { margin: 2.6em -2.5rem 2.8em; }
.wa-print img { display: block; width: 100%; height: auto; max-width: none; border-radius: 3px; box-shadow: 0 24px 60px rgb(10 14 18 / .38); }
:root[data-theme="light"] .wa-print img { box-shadow: 0 24px 60px rgb(40 50 60 / .2); }
.wa-print figcaption { margin-top: .9rem; font-family: var(--font-display); font-style: italic; font-size: 1.02rem; text-align: center; color: var(--wx-soft); }
@media (max-width: 700px) { .wa-print { margin-left: 0; margin-right: 0; } }

/* notes: small numbers in the text, the notes themselves after the essay */
.wa-ref { font-size: .6em; line-height: 0; vertical-align: .75em; }
.wa-ref a { padding: 0 .15em; font-family: var(--font-body); color: var(--wx-soft); text-decoration: none; }
.wa-ref a:hover { color: var(--wx-fg); }
.wa-notes { margin-top: clamp(2.5rem, 7vh, 4rem); padding-top: 1.4rem; border-top: 1px dashed var(--wx-rule); }
.wa-notes__label { margin: 0 0 .9rem; font-family: var(--font-body); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--wx-soft); }
.wa-notes ol { margin: 0; padding-left: 1.3em; }
.wa-notes li { margin: 0 0 .9em; padding-left: .3em; font-family: var(--font-display); font-size: 1rem; line-height: 1.6; color: var(--wx-soft); }
.wa-notes li::marker { font-family: var(--font-body); font-size: .8em; }
.wa-notes li:target { color: var(--wx-fg); }
.wa-notes__back { margin-left: .2em; color: inherit; text-decoration: none; opacity: .7; }
.wa-notes__back:hover { opacity: 1; }
.wa-notes + .wa-end { margin-top: clamp(2rem, 5vh, 3rem); }

/* the closing photograph, feathered into the page */
.wa-fig--after { width: min(100% - 2 * var(--gutter), 56rem); margin: clamp(3rem, 8vh, 5rem) auto 0; }
.wa-fig--after .wa-fig__frame {
  -webkit-mask-image: radial-gradient(ellipse 70% 68% at 50% 50%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 68% at 50% 50%, #000 50%, transparent 100%);
}
.wa-fig--after figcaption { text-align: center; }

.wa-end { margin-top: clamp(3rem, 8vh, 5rem); }
.wa-origin { padding: 1.6rem 0 1.5rem; border-top: 1px dashed var(--wx-rule); border-bottom: 1px dashed var(--wx-rule); }
.wa-origin__label { margin: 0 0 .5rem; font-family: var(--font-body); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--wx-soft); }
.wa-origin__text { margin: 0 0 1.4rem; font-family: var(--font-display); font-style: italic; font-size: 1.08rem; line-height: 1.55; color: var(--wx-soft); }
/*
  The way on to Substack: no outline, just a soft drop of light that swells in under the words,
  slides along them and fades (the homepage's cue under its words), and an arrow that leans forward.
*/
@property --drop-x { syntax: "<percentage>"; inherits: false; initial-value: 4%; }
@property --drop-a { syntax: "<number>"; inherits: false; initial-value: 0; }
.wa-origin__link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .2rem 0;
  color: inherit;
  text-decoration: none;
}
.wa-origin__words {
  --drop-x: 4%;
  --drop-a: 0;
  padding-bottom: .3em;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.08rem, 1rem + .3vw, 1.22rem);
  letter-spacing: .005em;
  background-image: radial-gradient(closest-side,
    rgb(var(--wx-drop) / calc(var(--drop-a) * .8)) 0%,
    rgb(var(--wx-drop) / calc(var(--drop-a) * .45)) 35%,
    rgb(var(--wx-drop) / calc(var(--drop-a) * .12)) 70%,
    rgb(var(--wx-drop) / 0) 100%);
  background-repeat: no-repeat;
  background-size: 3.2em .34em;
  background-position: var(--drop-x) 100%;
  animation: wx-drop 5s linear 1.2s infinite;
}
@keyframes wx-drop {
  0% { --drop-x: 4%; --drop-a: 0; }
  22% { --drop-a: .95; }
  50% { --drop-a: .85; }
  72% { --drop-x: 96%; --drop-a: 0; }
  100% { --drop-x: 96%; --drop-a: 0; }
}
.wa-origin__arrow { flex: none; width: 15px; height: 15px; margin-top: -.35em; opacity: .7; transition: transform 700ms var(--ease-soft), opacity 500ms var(--ease-soft); }
.wa-origin__link:hover .wa-origin__arrow,
.wa-origin__link:focus-visible .wa-origin__arrow { transform: translate(3px, -3px); opacity: 1; }
/* hovering: the drop rests under the whole phrase */
.wa-origin__link:hover .wa-origin__words,
.wa-origin__link:focus-visible .wa-origin__words {
  animation: none;
  --drop-x: 50%;
  --drop-a: .6;
  background-size: 100% .34em;
}
.wa-origin__link:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; border-radius: 4px; }

/*
  The article arrives after the title: each part comes out of a blur as it rises into view
  (set by the script as you scroll); until the title has settled, nothing below it shows.
*/
.js .wx [data-wx-reveal] { opacity: 0; filter: blur(12px); transition: opacity 700ms var(--ease-soft), filter 900ms var(--ease-soft); }
.js .wx.is-ready [data-wx-reveal] { will-change: opacity, filter; }

/* reading progress, a hairline along the top */
.wx-progress { position: fixed; z-index: 40; left: 0; right: 0; top: 0; height: 2px; }
.wx-progress span { display: block; height: 100%; background: currentColor; opacity: .5; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---- light / dark: a quiet sun or moon, top right, opposite the monogram ---- */
.wx-theme {
  position: fixed;
  z-index: 45;
  top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 3.4vw, 40px));
  right: calc(env(safe-area-inset-right, 0px) + clamp(22px, 4vw, 54px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--wx-chrome, var(--paper));
  opacity: .72;
  cursor: pointer;
  transition: opacity 500ms var(--ease-soft), color 900ms var(--ease-soft);
}
[data-chrome-ink="dark"] .wx-theme { --wx-chrome: var(--ink); }
.wx-theme:hover, .wx-theme:focus-visible { opacity: 1; }
.wx-theme:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
.wx-theme svg { grid-area: 1 / 1; width: 22px; height: 22px; transition: opacity 700ms var(--ease-soft), transform 900ms var(--ease-soft); }
/* it shows the one you'd switch to: the sun on the dark page, the moon on the light one */
.wx-theme__moon { opacity: 0; transform: rotate(-30deg) scale(.7); }
:root[data-theme="light"] .wx-theme__sun { opacity: 0; transform: rotate(40deg) scale(.7); }
:root[data-theme="light"] .wx-theme__moon { opacity: 1; transform: none; }
/* a soft drop of light behind it, as on the homepage's arrows */
.wx-theme::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%; z-index: -1; opacity: 0;
  background: radial-gradient(circle, rgb(255 255 255 / .12) 0%, rgb(255 255 255 / .22) 42%, rgb(255 255 255 / 0) 72%);
  filter: blur(5px);
  transition: opacity 600ms var(--ease-soft);
}
.wx-theme:hover::before { opacity: 1; }
.is-menu-open .wx-theme { opacity: 0; visibility: hidden; }

/* ---- the footer: as on the homepage, on a gradient that flows on from the page into the evening slate ---- */
.wx-page .site-footer {
  position: relative;
  z-index: 2;
  min-height: 0;   /* only as tall as what it holds (the site's footer is otherwise most of a screen tall, with its words at the bottom) */
  /* it overlaps the end of the page and fades in over it, so there's no seam between them */
  margin-top: -9vh;
  padding-top: calc(9vh + clamp(2.5rem, 7vh, 4.5rem));
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9vh);
  mask-image: linear-gradient(180deg, transparent 0, #000 9vh);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.1rem);
  color: var(--paper);
  /* from the night blue at the end of the page into the steel-slate blues of the menu and the homepage footer */
  background: linear-gradient(180deg, #2b3e4d 0%, #2a4050 30%, #283f50 50%, #243746 74%, #1e2e3b 100%);   /* deepening only, with no lighter band */
}
/* the light page's footer: sand, through a soft lilac, into the same steel-slate blues */
.wx-page .site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, #ece3d4 0%, #dcd2cd 8%, #a9b6c3 18%, #6d8ca1 29%, #4e6c83 40%, #3d586c 52%, #2b4253 64%, #243746 80%, #1e2e3b 100%);
  transition: opacity 900ms var(--ease-soft);
}
:root[data-theme="light"] .wx-page .site-footer::before { opacity: 1; }
/* this piece's footer: the lake at sundown, light breaking through the clouds over the pier. It rises slowly out of the
   end of the essay, the closing line rests in the sky, and the evening slate comes up from the bottom over the beach,
   exactly as on the homepage, so the links stay easy to read. */
.wa { padding-bottom: calc(18vh + .5rem); }   /* room for the longer fade */
.wx-page .site-footer {
  margin-top: -18vh;
  padding-top: calc(18vh + clamp(9rem, 30vh, 17rem));
  -webkit-mask-image: linear-gradient(180deg, transparent 0, rgb(0 0 0 / .35) 7vh, rgb(0 0 0 / .75) 13vh, #000 18vh);
  mask-image: linear-gradient(180deg, transparent 0, rgb(0 0 0 / .35) 7vh, rgb(0 0 0 / .75) 13vh, #000 18vh);
  /* --sig-y (set by read.js) is where the signature sits; the slate rises exactly as on the homepage, from the same
     distance above the signature, in the same steps, solid by the links */
  background:
    linear-gradient(180deg,
      #24333f 0%, rgb(36 51 63 / .78) 9%, rgb(36 51 63 / .5) 19%, rgb(36 51 63 / .26) 29%, rgb(36 51 63 / .1) 38%, rgb(36 51 63 / 0) 46%),
    radial-gradient(60% 34% at 38% 100%, rgb(120 104 86 / .16), transparent 70%),
    linear-gradient(180deg,
      transparent 0%, transparent calc(var(--sig-y, 70%) - 187px),
      rgb(109 140 161 / .14) calc(var(--sig-y, 70%) - 125px),
      rgb(78 108 131 / .38) calc(var(--sig-y, 70%) - 55px),
      rgb(61 88 108 / .66) calc(var(--sig-y, 70%) + 22px),
      rgb(43 66 83 / .88) calc(var(--sig-y, 70%) + 107px),
      #283f50 calc(var(--sig-y, 70%) + 200px),
      #243746 calc(var(--sig-y, 70%) + 340px), #1e2e3b 100%),
    url('../img/writing/drawing-in-footer.jpg') 50% 46% / cover no-repeat;
}
/* the light page: its sand fades slowly into the photograph rather than covering it */
.wx-page .site-footer::before {
  background: linear-gradient(180deg, #ece3d4 0%, rgb(236 227 212 / .86) 8%, rgb(236 227 212 / .62) 16%, rgb(236 227 212 / .38) 25%, rgb(236 227 212 / .18) 34%, rgb(236 227 212 / .06) 42%, rgb(236 227 212 / 0) 50%);
}
.wx-page .site-footer__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.wx-page .site-footer__closing { order: 1; max-width: 24ch; font-size: var(--text-closing); line-height: 1.16; margin: 0 auto clamp(4rem, 11vh, 6.5rem); text-shadow: 0 2px 28px rgb(40 28 20 / .55); }
.wx-page .site-footer__sig {
  order: 2;
  display: block;
  margin: 0 auto;
  width: clamp(130px, 13vw, 170px);
  aspect-ratio: 1200 / 932;
  -webkit-mask: url("/assets/img/jesse-signature-white.png") center / contain no-repeat;
  mask: url("/assets/img/jesse-signature-white.png") center / contain no-repeat;
}
.wx-page .site-footer__role {
  order: 3;
  position: relative;
  margin: -2.6rem 0 clamp(2.5rem, 6.5vh, 4rem);
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem);
  letter-spacing: .01em;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wx-page .site-footer__role {
    color: transparent;
    background-image: linear-gradient(90deg,
      rgb(243 237 227 / .78) 0%, rgb(243 237 227 / .78) 38%, #fff3e2 50%, rgb(243 237 227 / .78) 62%, rgb(243 237 227 / .78) 100%);
    background-size: 260% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 1px 8px rgb(40 28 20 / .55));
    animation: wx-role-glow 5.2s ease-in-out 1s infinite;
  }
}
.wx-page .site-footer__role.is-chars {
  color: rgb(243 237 227 / .8);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  animation: none;
}
.wx-page .site-footer__role.is-chars .bt-char { animation: wx-role-char-glow 5.2s ease-in-out 1s infinite; }
@keyframes wx-role-char-glow {
  0%, 22%, 100% { color: rgb(243 237 227 / .8); text-shadow: none; }
  9% { color: #fff6ea; text-shadow: 0 0 12px rgb(255 240 220 / .45); }
}
@keyframes wx-role-glow {
  0% { background-position: 100% 0; }
  70%, 100% { background-position: 0% 0; }
}
.wx-page .site-footer__nav { order: 4; margin-bottom: clamp(.5rem, 1.5vh, 1rem); }
.wx-page .site-footer__nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.9rem; margin: 0; padding: 0; list-style: none; }
.wx-page .site-footer__nav a { display: inline-block; padding: .45rem .1rem; font-size: .9375rem; letter-spacing: .02em; color: inherit; text-decoration: none; opacity: .9; transition: opacity 500ms var(--ease-soft), transform 600ms var(--ease-soft); }
.wx-page .site-footer__nav a:hover, .wx-page .site-footer__nav a:focus-visible { opacity: 1; transform: translateY(-2px); }   /* the word rises a little, as the menu's do */
.wx-page .site-footer__legal { order: 5; }
.wx-page .site-footer .visually-hidden { order: 6; }

@media (prefers-reduced-motion: reduce) {
  .wa-head > *, .wa-head::before { animation: none; }
  .wx, .wx::before, .wx::after { transition: none; }
  .js .wx [data-wx-reveal] { opacity: 1; filter: none; transition: none; }
  .wa-origin__words { animation: none; --drop-x: 50%; --drop-a: .45; background-size: 100% .34em; }
  .wx-page .site-footer__role { animation: none; background-position: 50% 0; }
  .wx-page .site-footer__role.is-chars .bt-char { animation: none; }
}

/*
  Links: no sliding drop of light (that means "there's something hidden here", in the opening and on the
  road and the moon). A link takes a fine line under its words when you point at it.
*/
.wa-origin__words { animation: none; background: none; text-decoration: underline 1px; text-underline-offset: .32em; text-decoration-color: transparent; transition: text-decoration-color 500ms var(--ease-soft); }
.wa-origin__link:hover .wa-origin__words,
.wa-origin__link:focus-visible .wa-origin__words { background: none; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }

/* the footer's small links: a straight line under the one the mouse is on */
.site-footer__legal a:hover { text-decoration: underline solid 1px; text-underline-offset: .3em; }

/* a phone: the closing words rest in the bright, broken cloud above the pier; an even dusk across the whole width of the
   sky behind them (placed from the signature, as the slate is: the words sit 60 to 160px above it), no shape to it */
@media (max-width: 700px) {
  .wx-page .site-footer {
    background:
      linear-gradient(180deg,
        #24333f 0%, rgb(36 51 63 / .78) 9%, rgb(36 51 63 / .5) 19%, rgb(36 51 63 / .26) 29%, rgb(36 51 63 / .1) 38%, rgb(36 51 63 / 0) 46%),
      linear-gradient(180deg,
        rgb(24 34 46 / 0) calc(var(--sig-y, 70%) - 280px), rgb(24 34 46 / .42) calc(var(--sig-y, 70%) - 185px),
        rgb(24 34 46 / .42) calc(var(--sig-y, 70%) - 40px), rgb(24 34 46 / 0) calc(var(--sig-y, 70%) + 20px)),
      radial-gradient(60% 34% at 38% 100%, rgb(120 104 86 / .16), transparent 70%),
      linear-gradient(180deg,
        transparent 0%, transparent calc(var(--sig-y, 70%) - 187px),
        rgb(109 140 161 / .14) calc(var(--sig-y, 70%) - 125px),
        rgb(78 108 131 / .38) calc(var(--sig-y, 70%) - 55px),
        rgb(61 88 108 / .66) calc(var(--sig-y, 70%) + 22px),
        rgb(43 66 83 / .88) calc(var(--sig-y, 70%) + 107px),
        #283f50 calc(var(--sig-y, 70%) + 200px),
        #243746 calc(var(--sig-y, 70%) + 340px), #1e2e3b 100%),
      url('../img/writing/drawing-in-footer.jpg') 50% 46% / cover no-repeat;
  }
}

/* light: the opening photograph dissolves into the page on a long eased curve (the plain straight fade left a visible
   line where it met the pale page, its end too sudden against the light) */
:root[data-theme="light"] .wa-fig--before .wa-fig__frame {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 30%, rgb(0 0 0 / .96) 38%, rgb(0 0 0 / .88) 46%, rgb(0 0 0 / .76) 54%, rgb(0 0 0 / .61) 62%, rgb(0 0 0 / .45) 70%, rgb(0 0 0 / .3) 77%, rgb(0 0 0 / .18) 84%, rgb(0 0 0 / .09) 90%, rgb(0 0 0 / .03) 95%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 30%, rgb(0 0 0 / .96) 38%, rgb(0 0 0 / .88) 46%, rgb(0 0 0 / .76) 54%, rgb(0 0 0 / .61) 62%, rgb(0 0 0 / .45) 70%, rgb(0 0 0 / .3) 77%, rgb(0 0 0 / .18) 84%, rgb(0 0 0 / .09) 90%, rgb(0 0 0 / .03) 95%, transparent 100%);
}
