/*
  Thirty-Four Thousand Feet (read.34000feet.php): a poem, in the design of the read.* pages, with a light / dark
  choice for the reader. Both gradients are drawn from its photograph: the deep blue above the cloud, white cloud,
  haze, and the desert far below.
*/

/* ---- 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 deep blue above the cloud. Near-black blue at the top, through the sky's cerulean and the haze at
  the horizon, to the slate where the footer begins; pools of cloud-light, horizon cyan and desert brown drift across it.
*/
.wx::before {
  background:
    radial-gradient(65% 10% at 82% 9%, rgb(40 120 190 / .22), transparent 72%),
    radial-gradient(60% 10% at 16% 22%, rgb(60 160 210 / .16), transparent 72%),
    radial-gradient(65% 10% at 80% 36%, rgb(230 238 244 / .06), transparent 72%),
    radial-gradient(60% 10% at 18% 50%, rgb(150 118 92 / .14), transparent 72%),
    radial-gradient(65% 10% at 82% 64%, rgb(70 150 196 / .16), transparent 72%),
    radial-gradient(60% 10% at 20% 78%, rgb(160 130 100 / .12), transparent 72%),
    radial-gradient(60% 9% at 76% 90%, rgb(220 230 240 / .06), transparent 72%),
    linear-gradient(180deg, #06162a 0%, #0a2038 12%, #0d2a46 24%, #12334f 36%, #173a52 48%, #1c3c50 60%, #223d4d 72%, #273e4c 86%, #2b3e4d 100%);
}
/*
  light: the bright air. Clear blue at the top, through cloud-white and the haze, warming to the desert's
  sand where the footer begins.
*/
.wx::after {
  opacity: 0;
  background:
    radial-gradient(70% 10% at 84% 7%, rgb(120 182 230 / .45), transparent 72%),
    radial-gradient(65% 10% at 12% 18%, rgb(150 200 236 / .42), transparent 72%),
    radial-gradient(70% 10% at 80% 31%, rgb(255 255 255 / .5), transparent 72%),
    radial-gradient(60% 10% at 16% 45%, rgb(214 222 232 / .45), transparent 72%),
    radial-gradient(70% 11% at 84% 58%, rgb(230 210 182 / .4), transparent 72%),
    radial-gradient(60% 10% at 14% 72%, rgb(190 214 236 / .36), transparent 72%),
    radial-gradient(65% 10% at 78% 86%, rgb(232 210 176 / .44), transparent 72%),
    linear-gradient(180deg, #d7e8f4 0%, #dfecf5 10%, #e8f0f5 22%, #f1f3f4 34%, #eef0f0 46%, #ece9e3 60%, #ede5d8 74%, #ede4d6 88%, #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 view from thirty-four thousand feet, a lone snow peak breaking through the haze above the
   clouds. It dissolves slowly out of the end of the essay, the peak rests in open sky above the closing line, and the
   evening slate comes up slowly from the bottom, so the links stay easy to read. */
.wa { padding-bottom: calc(40vh + .5rem); }   /* room for the long dissolve */
.wx-page .site-footer {
  /* one long, eased dissolve: the end of the page fades straight into the photograph over 40vh (no second, darker fade
     on top of it), in both the light and the dark reading */
  margin-top: -40vh;
  padding-top: calc(40vh + clamp(9rem, 30vh, 17rem));
  -webkit-mask-image: linear-gradient(180deg, transparent 0, rgb(0 0 0 / .03) 4vh, rgb(0 0 0 / .1) 8vh, rgb(0 0 0 / .22) 12vh, rgb(0 0 0 / .35) 16vh, rgb(0 0 0 / .5) 20vh, rgb(0 0 0 / .65) 24vh, rgb(0 0 0 / .78) 28vh, rgb(0 0 0 / .9) 32vh, rgb(0 0 0 / .97) 36vh, #000 40vh);
  mask-image: linear-gradient(180deg, transparent 0, rgb(0 0 0 / .03) 4vh, rgb(0 0 0 / .1) 8vh, rgb(0 0 0 / .22) 12vh, rgb(0 0 0 / .35) 16vh, rgb(0 0 0 / .5) 20vh, rgb(0 0 0 / .65) 24vh, rgb(0 0 0 / .78) 28vh, rgb(0 0 0 / .9) 32vh, rgb(0 0 0 / .97) 36vh, #000 40vh);
  /* --sig-y (set by read.js) is where the signature sits; the slate rises from well above it and deepens slowly,
     solid beneath the small print */
  background:
    linear-gradient(transparent, transparent),   /* (the top's darker fade, no longer needed: the dissolve does it) */
    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%) - 300px),
      rgb(109 140 161 / .06) calc(var(--sig-y, 70%) - 235px),
      rgb(100 130 152 / .15) calc(var(--sig-y, 70%) - 170px),
      rgb(86 116 138 / .27) calc(var(--sig-y, 70%) - 105px),
      rgb(74 102 124 / .41) calc(var(--sig-y, 70%) - 40px),
      rgb(62 89 110 / .56) calc(var(--sig-y, 70%) + 25px),
      rgb(52 77 96 / .7) calc(var(--sig-y, 70%) + 90px),
      rgb(44 67 85 / .82) calc(var(--sig-y, 70%) + 155px),
      rgb(40 61 78 / .92) calc(var(--sig-y, 70%) + 220px),
      #283f50 calc(var(--sig-y, 70%) + 290px),
      #1e2e3b 100%),   /* more gradual than the homepage's: it begins higher and deepens slowly */
    url('../img/writing/34000-feet-footer.jpg') 50% 29% / cover no-repeat;   /* the peak between the closing line and the signature */
}
/* wider screens: a tall photograph in a wide footer shows only a band of itself, and which band depends on the screen's
   shape. So it's sized to the footer's width (a little wider, which brings the peak to the middle) and hung from the
   signature: the peak's summit always sits about 420px above it, in the open sky above the closing words, with the
   clouds spreading out below. (The summit is 47% of the way down the photo; at 116% of the width the photo is
   154.7vw tall, so the summit is 72.7vw down it.) */
@media (min-width: 900px) {
  .wx-page .site-footer {
    background-size: auto, auto, auto, 116% auto;
    background-position: 0 0, 0 0, 0 0, 0% calc(var(--sig-y, 70%) - 420px - 72.7vw);
  }
}
/* phones: the tall photograph would fit the footer exactly and leave the peak behind the closing words, so it's drawn
   a little larger and lifted, bringing the peak up into the sky above the closing words */
@media (max-width: 899px) {
  .wx-page .site-footer { background-size: auto, auto, auto, auto 130%; background-position: 0 0, 0 0, 0 0, 50% -27vh; }
}
/* the light page: no sand laid over the photograph; the dissolve carries the page's own colour into it */
.wx-page .site-footer::before { display: none; }
.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; }
}

/* ---- a poem: set as written, line by line, its indents as steps; each line arrives on its own ---- */
.wa--poem .wa-head { margin-bottom: clamp(3rem, 8vh, 5rem); }
.wa-poem {
  margin: 0 !important;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.1rem + .55vw, 1.5rem) !important;
  line-height: 1.6 !important;
}
.wa-poem__l { display: block; padding-left: calc(var(--in, 0) * 1.6em + 1.2em); text-indent: -1.2em; }   /* each step of indent as written; a long line that wraps hangs a little further in */
.wa-poem__gap { display: block; height: 1.3em; }
.wa-after { margin-top: clamp(3rem, 8vh, 4.5rem); padding-top: 1.4rem; border-top: 1px dashed var(--wx-rule); }
.wa-after p { margin: 0 0 .7rem; font-family: var(--font-display); font-style: italic; font-size: 1rem; line-height: 1.6; color: var(--wx-soft); }
.wa-after em { font-style: normal; }
.wa-after__cap { font-family: var(--font-body) !important; font-style: normal !important; font-size: .78rem !important; }
.wa-after + .wa-end { margin-top: clamp(2rem, 5vh, 3rem); }

/*
  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; }
/* the closing words rest over bright cloud here, so they carry a deeper shade */
.wx-page .site-footer__closing { text-shadow: 0 1px 3px rgb(16 24 34 / .45), 0 2px 26px rgb(16 24 34 / .6), 0 0 60px rgb(16 24 34 / .35); }

/* 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%);
}
