/* Shared by every page: the lit wall behind, the header, the small caps. */
:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --ink: #1f1914;
  --pale: #e6dccb;
  --paper: #e4dac7;
  --paper-ink: #1d1712;
  --blend: multiply;
  --serif: "DM Serif Display", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --g: clamp(18px, 4.2vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cap { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums; }

#gl { position: fixed; top: 0; left: 0; width: 100%; height: 100lvh; display: block; }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) var(--g) 24px;
  color: var(--ink);
  mix-blend-mode: var(--blend);
  opacity: 0;
  transition: opacity 2s var(--ease);
}
.nav.on { opacity: 1; }
.brand { font-family: var(--serif); font-size: 21px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: clamp(14px, 2.2vw, 30px); }
.nav-links a { padding: 6px 0; position: relative; white-space: nowrap; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease); }
.nav-links a.on::after, .nav-links a[aria-current="page"]::after, .nav-links a:hover::after { transform: scaleX(1); }

/* the arrows: the plainest way along the wall. Scrolling and the arrow keys do the same thing. */
.pager {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 15;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: clamp(10px, 2vw, 28px);
  color: var(--ink); mix-blend-mode: var(--blend);
  opacity: 0; transition: opacity 2s var(--ease) 1.4s;
}
html.lit .pager, html.no-gl .pager, html.fixed .pager { opacity: 1; }
.pager button { display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 10px; border: 0; background: none; cursor: pointer; font-size: 12px; }
.pager svg { flex: none; width: clamp(60px, 8vw, 104px); height: 20px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; transition: transform 0.7s var(--ease); }
.pager .next:not(:disabled):hover svg, .pager .next:focus-visible svg { transform: translateX(9px); }
.pager .prev:not(:disabled):hover svg, .pager .prev:focus-visible svg { transform: translateX(-9px); }
.pager button:disabled { opacity: 0.22; cursor: default; }
.pager .count { min-width: 58px; text-align: center; opacity: 0.7; white-space: nowrap; }
@media (max-width: 560px) { .pager { gap: 4px; } .pager button { gap: 10px; padding: 0 6px; } }
/* until the first move, the forward arrow leans a little, to say which way the wall goes */
@keyframes lean { 0%, 60%, 100% { transform: translateX(0); } 30% { transform: translateX(10px); } }
.pager.fresh .next svg { animation: lean 2.6s var(--ease) 3s infinite; }
@media (prefers-reduced-motion: reduce) { .pager.fresh .next svg { animation: none; } }
html.no-gl .pager { color: #ece4d6; mix-blend-mode: normal; }

/* a link drawn as a rule under small caps */
.rule-link { display: inline-block; padding-bottom: 5px; border-bottom: 1px solid currentColor; }

@media (max-width: 560px) {
  .brand { font-size: 18px; }
  .nav-links { gap: 14px; }
  .nav-links.cap { font-size: 9px; letter-spacing: 0.16em; }
}

html.no-gl body { background: #1b1814; color: #ece4d6; }
html.no-gl #gl { display: none; }
html.no-gl .nav { opacity: 1; mix-blend-mode: normal; color: #ece4d6; }
html.still body > *:not(#gl) { display: none !important; }
