@font-face {
  font-family: "Singleflow Serif";
  src: url("/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Singleflow Serif";
  src: url("/fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --black: #0a0a0b;
  --ink: #f2efe9;
  --dim: rgba(242, 239, 233, 0.62);
  --faint: rgba(242, 239, 233, 0.56);
  --hair: rgba(242, 239, 233, 0.14);
  --gold: #e0a458;
  --serif: "Singleflow Serif", Georgia, serif;
  --gutter: clamp(1.5rem, 5vw, 10rem);
  --rail: 78rem;
  --pad: max(var(--gutter), (100% - var(--rail)) / 2);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

html { scrollbar-color: rgba(242, 239, 233, 0.18) transparent; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.05rem + 0.14vw, 1.32rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

footer { margin-top: auto; }

::selection { background: var(--gold); color: var(--black); }

a { color: inherit; }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 0.35em; }

.work a:focus-visible,
.next a:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--ink); }

.piece p a:focus-visible,
.piece li a:focus-visible { outline-offset: 0.12em; }

/* ---------- grain ---------- */

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 3;
  opacity: 0.6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- the flow line ---------- */

.flow {
  position: fixed;
  top: 5rem;
  bottom: 0;
  left: max(1.25rem, calc(max(var(--gutter), (100vw - 78rem) / 2) - 2.75rem));
  width: 1px;
  z-index: 4;
  background: var(--hair);
  pointer-events: none;
}

.flow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: calc(var(--p, 0) * 100%);
  background: var(--gold);
  transition: height 0.15s linear;
}

@media (max-width: 63.99rem) { .flow { display: none; } }

/* ---------- nav ---------- */

nav.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--pad);
  transition: background 0.3s, backdrop-filter 0.3s;
}

nav.top.scrolled {
  background: linear-gradient(180deg,
    rgb(10,10,11) 0%, rgb(10,10,11) 50%,
    rgba(10,10,11,0.8) 70%, rgba(10,10,11,0.35) 85%,
    rgba(10,10,11,0) 100%);
  padding-bottom: 5rem;
}

.wordmark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

nav.top .links { display: flex; gap: 1.9rem; flex-wrap: wrap; }

nav.top .links a {
  font-size: 0.92rem;
  color: var(--dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.25s;
}

nav.top .links a:hover,
nav.top .links a:focus-visible { color: var(--gold); }

nav.top .links a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.15em;
}

@media (max-width: 47.99rem) {
  nav.top { position: absolute; flex-wrap: wrap; }
  .chapter:first-of-type { padding-top: 13rem; }
  nav.top.scrolled { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  nav.top .links {
    flex-basis: 100%;
    margin-top: 0.8rem;
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
  }
  nav.top .links a { font-size: 0.88rem; }
}

/* ---------- chapters: the single flow ---------- */

.chapter {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5rem, 14vh, 8rem) var(--pad);
  overflow: hidden;
}

.chapter .bg {
  position: absolute;
  inset: -12% 0;
  z-index: -1;
  filter: saturate(1.08);
  animation: drift 30s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(transparent 0%, transparent 11%, #000 26%, #000 74%, transparent 89%, transparent 100%);
  mask-image: linear-gradient(transparent 0%, transparent 11%, #000 26%, #000 74%, transparent 89%, transparent 100%);
}

.chapter:first-of-type .bg {
  -webkit-mask-image: linear-gradient(#000 0%, #000 74%, transparent 89%, transparent 100%);
  mask-image: linear-gradient(#000 0%, #000 74%, transparent 89%, transparent 100%);
}

@keyframes drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1.03); }
  to   { transform: translate3d(1.5%, 1.5%, 0) scale(1.1); }
}

.bg-1 { background:
  radial-gradient(120% 90% at 82% 8%, rgba(224, 164, 88, 0.42), transparent 55%),
  radial-gradient(70% 60% at 12% 88%, rgba(133, 84, 33, 0.55), transparent 60%),
  radial-gradient(50% 45% at 60% 55%, rgba(224, 164, 88, 0.14), transparent 70%),
  #0a0a0b; }
.bg-2 { background:
  radial-gradient(110% 85% at 15% 12%, rgba(96, 122, 194, 0.46), transparent 58%),
  radial-gradient(75% 60% at 85% 80%, rgba(38, 54, 108, 0.6), transparent 62%),
  radial-gradient(40% 40% at 55% 40%, rgba(224, 164, 88, 0.1), transparent 70%),
  #0a0a0b; }
.bg-3 { background:
  radial-gradient(115% 90% at 80% 85%, rgba(122, 84, 160, 0.48), transparent 60%),
  radial-gradient(70% 55% at 18% 20%, rgba(58, 36, 82, 0.64), transparent 62%),
  radial-gradient(45% 40% at 50% 60%, rgba(224, 164, 88, 0.11), transparent 72%),
  #0a0a0b; }
.bg-0 { background:
  radial-gradient(115% 90% at 78% 12%, rgba(224, 164, 88, 0.16), transparent 58%),
  radial-gradient(70% 55% at 15% 85%, rgba(242, 239, 233, 0.06), transparent 60%),
  #0a0a0b; }
.bg-4 { background:
  radial-gradient(120% 95% at 20% 80%, rgba(163, 66, 58, 0.48), transparent 58%),
  radial-gradient(80% 60% at 85% 15%, rgba(84, 33, 30, 0.6), transparent 62%),
  radial-gradient(45% 40% at 55% 50%, rgba(224, 164, 88, 0.13), transparent 70%),
  #0a0a0b; }

html.js .chapter .kicker,
html.js .chapter h2,
html.js .chapter .sub,
html.js .chapter .go {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.js .chapter.in .kicker { transition-delay: 0.05s; }
html.js .chapter.in h2     { transition-delay: 0.14s; }
html.js .chapter.in .sub   { transition-delay: 0.23s; }
html.js .chapter.in .go    { transition-delay: 0.32s; }

html.js .chapter.in .kicker,
html.js .chapter.in h2,
html.js .chapter.in .sub,
html.js .chapter.in .go { opacity: 1; transform: none; }

.kicker {
  color: var(--gold);
  font-size: clamp(0.85rem, 0.78rem + 0.12vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
}

.chapter .num {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(5rem, 11vw, 11rem);
  font-weight: 200;
  color: rgba(242, 239, 233, 0.07);
  pointer-events: none;
}

.chapter h2 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.6rem, 6.6vw, 8.2rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.chapter h2 strong { font-weight: 650; }

.chapter .sub {
  margin: 1.5rem 0 0;
  max-width: 42ch;
  color: var(--dim);
  font-size: clamp(1rem, 1.15vw, 1.4rem);
  line-height: 1.55;
}

@media (max-width: 40rem) {
  .chapter .num {
    top: auto;
    bottom: clamp(1.5rem, 5vh, 3rem);
    transform: none;
    font-size: 3.5rem;
  }
  .chapter h2 { max-width: none; }
  .chapter .sub { max-width: 34ch; }
}

.chapter .go {
  align-self: flex-start;
  display: inline-block;
  margin-top: 1.9rem;
  color: var(--ink);
  font-size: clamp(1rem, 0.9rem + 0.18vw, 1.3rem);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.2em;
  transition: color 0.25s, opacity 0.7s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.chapter .go:hover,
.chapter .go:focus-visible { color: var(--gold); }

/* ---------- work index ---------- */

.work {
  padding: clamp(5rem, 14vh, 9rem) var(--pad);
}

.label {
  color: var(--gold);
  font-size: clamp(0.85rem, 0.78rem + 0.12vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin: 0 0 2.5rem;
}

.work ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hair);
}

.work li { border-bottom: 1px solid var(--hair); }

.work a {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.2rem;
  align-items: baseline;
  padding: 2.1rem 0;
  text-decoration: none;
  transition: padding-left 0.3s ease;
}

.work a:hover,
.work a:focus-visible { padding-left: 0.8rem; box-shadow: inset 2px 0 0 var(--ink); }

.work .num {
  color: var(--gold);
  font-size: clamp(0.95rem, 0.9rem + 0.1vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.work .t {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 350;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
  transition: color 0.25s;
}

.work a:hover .t,
.work a:focus-visible .t { color: var(--gold); }

.work .d {
  grid-column: 2;
  margin: 0.5rem 0 0;
  color: var(--dim);
  font-size: clamp(1.02rem, 0.96rem + 0.12vw, 1.22rem);
  max-width: 62ch;
}

@media (max-width: 40rem) {
  .work a { grid-template-columns: 1fr; gap: 0; }
  .work .num { margin-bottom: 0.5rem; }
  .work .d { grid-column: 1; margin-top: 1.1rem; }
}

/* ---------- footer ---------- */

footer {
  position: relative;
  padding: 2.4rem var(--pad) 3rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  flex-wrap: wrap;
}

footer .fm { font-weight: 700; font-size: clamp(1.1rem, 1.04rem + 0.12vw, 1.3rem); color: inherit; text-decoration: none; }

footer .fr { color: var(--faint); font-size: clamp(0.9rem, 0.85rem + 0.1vw, 1.05rem); }

/* ---------- piece pages ---------- */

.piece-hero {
  position: relative;
  padding: clamp(8rem, 22vh, 13rem) var(--pad) clamp(3rem, 8vh, 5rem);
  overflow: hidden;
}

.piece-hero .bg {
  position: absolute;
  inset: -12% 0 auto;
  height: 124%;
  z-index: -1;
  animation: drift 30s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(#000 0%, #000 42%, rgba(0,0,0,0.7) 58%, rgba(0,0,0,0.42) 70%, rgba(0,0,0,0.2) 79%, rgba(0,0,0,0.07) 85%, transparent 90%);
  mask-image: linear-gradient(#000 0%, #000 42%, rgba(0,0,0,0.7) 58%, rgba(0,0,0,0.42) 70%, rgba(0,0,0,0.2) 79%, rgba(0,0,0,0.07) 85%, transparent 90%);
}

.piece-hero .kicker { margin-bottom: 1.2rem; }

.piece-hero h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(2.3rem, 1.2rem + 2.5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.07;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.piece {
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--pad) clamp(4rem, 9vh, 6rem);
}

.piece > * { max-width: var(--rail); }

.piece p { margin: 0 0 1.5em; text-wrap: pretty; }

.piece h2 {
  margin: 2.75em 0 0.75em;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.35;
  text-wrap: balance;
}

.piece ol, .piece ul { margin: 0 0 1.5em; padding-left: 1.4em; }
.piece li { margin-bottom: 0.6em; }
.piece li::marker { color: var(--gold); }

.piece a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.2s;
}

.piece a:hover, .piece a:focus-visible { color: var(--gold); }

.piece strong { font-weight: 650; }

/* ---------- next piece ---------- */

.next {
  position: relative;
  padding: clamp(3rem, 8vh, 5rem) var(--pad);
}

.next::before,
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  border-top: 1px solid var(--hair);
}

main:has(> .work:last-child) + footer::before,
main.work + footer::before { display: none; }

.next a {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.2rem;
  align-items: baseline;
  text-decoration: none;
  transition: padding-left 0.3s ease;
}

.next a:hover, .next a:focus-visible { padding-left: 0.8rem; box-shadow: inset 2px 0 0 var(--ink); }

.next .num {
  color: var(--gold);
  font-size: clamp(0.95rem, 0.9rem + 0.1vw, 1.1rem);
  font-weight: 600;
}

.next .t {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 350;
  line-height: 1.2;
  text-wrap: balance;
  transition: color 0.25s;
}

.next a:hover .t, .next a:focus-visible .t { color: var(--gold); }

@media (max-width: 40rem) {
  .next a { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .chapter .bg, .piece-hero .bg, .grain { animation: none; }
  html.js .chapter .kicker, html.js .chapter h2,
  html.js .chapter .sub, html.js .chapter .go {
    opacity: 1; transform: none; transition: none;
  }
  html { scroll-behavior: auto; }
}

@media (max-width: 30rem) {
  .piece p { hyphens: auto; hyphenate-limit-chars: 8 4 5; }
}

body.reading {
  --rail: 34rem;
  --pad: max(var(--gutter), (100% - var(--rail)) / 2);
}

body.reading nav.top,
body.reading footer {
  padding-left: max(var(--gutter), (100% - 78rem) / 2);
  padding-right: max(var(--gutter), (100% - 78rem) / 2);
}

body.reading footer::before {
  left: max(var(--gutter), (100% - 78rem) / 2);
  right: max(var(--gutter), (100% - 78rem) / 2);
}

html:not(.js) nav.top {
  background: linear-gradient(180deg,
    rgb(10,10,11) 0%, rgb(10,10,11) 50%,
    rgba(10,10,11,0.8) 70%, rgba(10,10,11,0.35) 85%,
    rgba(10,10,11,0) 100%);
  padding-bottom: 5rem;
}

html:not(.js) .flow { display: none; }

.work a, .next a, .chapter .go { scroll-margin-top: 7.5rem; }

@media (max-width: 47.99rem) {
  .piece-hero { padding-top: 13rem; }
}

#strategy h2 { max-width: 14ch; }

@media (min-width: 120rem) {
  body.reading { --rail: 38rem; }
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 20;
  background: var(--black);
  color: var(--ink);
  padding: 0.6em 1.1em;
  border: 1px solid var(--gold);
  text-decoration: none;
}

.skip:focus-visible { left: 1rem; top: 1rem; outline: none; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- print ---------- */

@media print {
  :root {
    --black: #fff;
    --ink: #111;
    --dim: #333;
    --faint: #555;
    --hair: #bbb;
    --gold: #8a6420;
  }
  body { background: #fff; }
  .grain, .flow, .chapter .bg, .piece-hero .bg, .chapter .num { display: none; }
  nav.top, nav.top.scrolled, html:not(.js) nav.top {
    position: static;
    background: none;
    padding-bottom: 1.4rem;
  }
  nav.top .links { display: none; }
  html.js .chapter .kicker, html.js .chapter h2,
  html.js .chapter .sub, html.js .chapter .go {
    opacity: 1; transform: none; transition: none;
  }
  .chapter { min-height: 0; padding-top: 3rem; padding-bottom: 3rem; break-inside: avoid; }
  .piece-hero { padding-top: 2rem; }
  .next { display: none; }
  .work li { break-inside: avoid; }
  footer { break-inside: avoid; }
  ::selection { background: none; color: inherit; }
}
