/*
  A single piece of writing (read.thresholds.php): "Night", with a light / dark choice for the reader.
  Both gradients are drawn from the opening photograph (the frosted shore at Hjarbæk): the deep blue of
  its water for dark, its pale winter sky and sand for light.
*/

/* ---- 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: night over the water. Deep blue at the top, through a slow teal and a dusky violet,
  to the slate where the footer begins; soft pools of colour drift across it as you read.
*/
.wx::before {
  background:
    radial-gradient(60% 9% at 18% 22%, rgb(64 118 138 / .22), transparent 70%),
    radial-gradient(55% 8% at 84% 41%, rgb(108 92 146 / .2), transparent 70%),
    radial-gradient(65% 9% at 24% 63%, rgb(58 104 128 / .2), transparent 70%),
    radial-gradient(55% 8% at 78% 82%, rgb(146 112 102 / .14), transparent 70%),
    linear-gradient(180deg, #131e2a 0%, #172839 12%, #1a3040 26%, #213149 40%, #272f4b 52%, #23384b 64%, #22404d 76%, #283a4a 88%, #2b3e4d 100%);
}
/*
  light: the winter sky over the shore. Pale blue, through ice and a lilac haze, a faint rose and
  peach, a breath of sage, warming to the sand at the end; broad pools of colour drift across it,
  overlapping, so it keeps moving as you read.
*/
.wx::after {
  opacity: 0;
  background:
    radial-gradient(70% 10% at 86% 9%, rgb(160 200 228 / .55), transparent 72%),
    radial-gradient(65% 11% at 10% 20%, rgb(196 214 236 / .5), transparent 72%),
    radial-gradient(70% 10% at 78% 31%, rgb(204 184 228 / .5), transparent 72%),
    radial-gradient(60% 10% at 18% 42%, rgb(226 190 214 / .42), transparent 72%),
    radial-gradient(70% 11% at 84% 53%, rgb(240 196 186 / .44), transparent 72%),
    radial-gradient(60% 10% at 14% 64%, rgb(196 214 196 / .4), transparent 72%),
    radial-gradient(70% 10% at 80% 75%, rgb(244 206 170 / .46), transparent 72%),
    radial-gradient(65% 10% at 22% 87%, rgb(236 214 168 / .48), transparent 72%),
    radial-gradient(60% 8% at 76% 96%, rgb(214 196 220 / .36), transparent 72%),
    linear-gradient(180deg, #d6e3ee 0%, #e2ebf3 9%, #e7ebf3 18%, #ebe8f2 28%, #efe6ef 38%, #f0e6ea 48%, #f1e7e3 58%, #ebebe2 67%, #f0e8dc 77%, #f1e6d6 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;
}

/* 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; }
/* Thresholds only (this file is shared with About and Writing): its footer is a fogbound beach, the dunes running off
   into the mist where they meet the sea. It dissolves slowly out of the end of the essay (one long, eased dissolve over
   40vh, in the light and the dark reading alike); the closing line rests in the fog; the place where dunes, sand and
   sea vanish together lies between the closing line and the signature; and the evening slate comes up slowly over the
   sand, so the links stay easy to read. */
.wx-page.wx-thresholds .wa { padding-bottom: calc(40vh + .5rem); }   /* room for the long dissolve */
.wx-page.wx-thresholds .site-footer {
  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);
  /* the photograph is hung from the signature (--sig-y, set by read.js). The vanishing point is 59% of the way down and
     55% of the way across a 16:9 photo, so .33 of its width from the top; it sits 140px above the signature and in the
     middle of the screen. --fw (the photo's width) is wide enough that its top clears the footer's top. */
  --fw: max(112vw, calc((var(--sig-y, 700px) - 140px) * 3.03 + 40px));
  background:
    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%),   /* the slate: it begins well above the signature and deepens slowly */
    url('../img/writing/thresholds-footer.jpg') no-repeat,
    linear-gradient(#6f675d, #6f675d);   /* the sand's own colour beneath, wherever the photograph ends */
  background-size: auto, auto, var(--fw) auto, auto;
  background-position: 0 0, 0 0, calc(50vw - .55 * var(--fw)) calc(var(--sig-y, 700px) - 140px - .33 * var(--fw)), 0 0;
}
/* the light page: no sand laid over the photograph; the dissolve carries the page's own colour into it */
.wx-page.wx-thresholds .site-footer::before { display: none; }
/* the closing words rest in pale fog here, so they carry a deeper shade */
.wx-page.wx-thresholds .site-footer__closing { text-shadow: 0 1px 3px rgb(16 24 34 / .5), 0 2px 26px rgb(16 24 34 / .62), 0 0 60px rgb(16 24 34 / .4); }
.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; }

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