/* Felix Specter — Fernweh */
:root {
  --ink: #0c0b09;
  --ink-2: #14120f;
  --bone: #ebe4d6;
  --bone-dim: #a39b8c;
  --mute: #867d70; /* was #6d665b; lifted just enough to pass WCAG AA contrast on ink and ink-2 */
  --rule: rgba(235, 228, 214, 0.14);
  --ember: #c9925e;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --text: "EB Garamond", Garamond, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gut: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; } /* WebP wrapper: lays out exactly as the bare <img> did */
picture > source { display: none; } /* otherwise it counts as a grid/flex item */
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ember); color: var(--ink); }

/* Film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ───────── Masthead ───────── */
.mast {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gut);
  transition: background .5s var(--ease), padding .5s var(--ease);
}
.mast.solid {
  background: linear-gradient(to bottom, rgba(12, 11, 9, .97) 0%, rgba(12, 11, 9, .9) 55%, rgba(12, 11, 9, .0) 100%);
  padding-top: 14px; padding-bottom: 28px;
}
.wordmark {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .42em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { font-style: normal; color: var(--ember); }
.nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-dim);
  position: relative;
  padding: 4px 0;
  transition: color .3s;
}
.nav a:hover, .nav a[aria-current] { color: var(--bone); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ember); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); }

/* ───────── Hero ───────── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 2.6s ease-in-out;
}
.hero-slide.on { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 12s linear;
}
.hero-slide.on img { transform: scale(1.0); }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(0,0,0,.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.45) 0%, transparent 22%, transparent 55%, rgba(12,11,9,.92) 100%);
}
.hero-copy {
  position: absolute;
  z-index: 2;
  left: var(--gut); right: var(--gut); bottom: clamp(28px, 7vh, 72px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px 48px;
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(76px, 15vw, 240px);
  line-height: .82;
  letter-spacing: -.035em;
}
.hero .entry { margin: 0 0 18px; text-shadow: 0 1px 12px rgba(0,0,0,.6); color: var(--bone); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero .entry span { color: var(--bone); text-transform: none; letter-spacing: .06em; }
.hero .entry span:last-child { color: var(--ember); text-transform: uppercase; letter-spacing: .18em; }
.hero .defn {
  margin: 18px 0 0;
  max-width: 34ch;
  font-family: var(--serif);
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.4;
  color: var(--bone);
  opacity: .9;
}
.hero .defn .opp { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--bone-dim); }
.board { width: min(360px, 100%); color: var(--bone-dim); font-size: 11px; }
.board-head, .board-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.board-head { border-bottom: 1px solid var(--rule); color: var(--bone); }
.board-foot { border-top: 1px solid var(--rule); margin-top: 2px; }
.board-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
.board-rows { list-style: none; margin: 0; padding: 0; }
.board-rows li {
  display: grid; grid-template-columns: 1fr auto 4.6em; gap: 12px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px dashed rgba(235, 228, 214, .08);
  text-transform: uppercase; letter-spacing: .14em; white-space: nowrap;
}
.board-rows li:last-child { border-bottom: 0; }
.board-rows .c { color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-rows .t { color: var(--bone); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.board-rows .d { color: var(--ember); text-align: right; font-size: 9.5px; letter-spacing: .12em; }
.board-rows .flip { color: var(--ember); }
.hero-cue {
  position: absolute; z-index: 2; left: 50%; bottom: 18px;
  width: 1px; height: 46px; background: var(--rule); overflow: hidden;
}
.hero-cue::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 1px; height: 50%;
  background: var(--bone); animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { to { top: 110%; } }

/* ───────── Intro / prologue ───────── */
.prologue {
  padding: clamp(96px, 18vh, 200px) var(--gut) clamp(64px, 12vh, 140px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 48px clamp(32px, 7vw, 120px);
  max-width: 1500px;
  margin: 0 auto;
}
.prologue .lede {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4.4vw, 66px);
  line-height: 1.08;
  letter-spacing: -.01em;
}

.prologue .body p { margin: 0 0 1.1em; color: var(--bone-dim); max-width: 52ch; }
.prologue .body p:first-child { color: var(--bone); }
.textlink {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; display: inline-flex; gap: 12px; align-items: center;
  border-bottom: 1px solid var(--rule); padding-bottom: 6px; transition: border-color .3s, gap .4s var(--ease);
}
.textlink:hover { border-color: var(--ember); gap: 20px; }

.toc {
  grid-column: 1 / -1;
  list-style: none; margin: clamp(40px, 8vh, 96px) 0 0; padding: 0;
  border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.toc li { border-bottom: 1px solid var(--rule); }
.toc li:not(:nth-child(3n)) { border-right: 1px solid var(--rule); }
.toc a {
  display: grid; grid-template-columns: 3.2em 1fr auto; align-items: baseline;
  padding: 22px 20px; text-decoration: none; transition: background .4s;
}
.toc a:hover { background: var(--ink-2); }
.toc-num { font-family: var(--mono); font-size: 11px; color: var(--ember); letter-spacing: .1em; }
.toc-title { font-family: var(--serif); font-size: clamp(22px, 2vw, 30px); font-weight: 400; letter-spacing: -.005em; }
.toc-count { font-family: var(--mono); font-size: 11px; color: var(--mute); }

/* ───────── Chapters ───────── */
.chapter { padding: 0 var(--gut) clamp(80px, 14vh, 180px); }
.ch-head {
  max-width: 1500px; margin: 0 auto clamp(48px, 9vh, 110px);
  padding-top: clamp(64px, 12vh, 140px);
  border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: 6em 1fr auto; gap: 8px 24px; align-items: baseline;
}
.ch-num { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--ember); }
.ch-head h2 {
  margin: 0; font-family: var(--serif); font-weight: 300;
  font-size: clamp(44px, 7vw, 112px); line-height: .95; letter-spacing: -.015em;
}
.ch-line {
  grid-column: 2; margin: 14px 0 0; max-width: 40ch;
  font-family: var(--serif); font-size: clamp(19px, 1.6vw, 24px); color: var(--bone-dim);
  position: relative; padding-left: 40px;
}
.ch-line::before { content: ""; position: absolute; left: 0; top: .72em; width: 26px; height: 1px; background: var(--ember); }
.ch-count { grid-row: 1; grid-column: 3; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }

.row {
  max-width: 1500px; margin: 0 auto clamp(40px, 8vh, 110px);
  display: grid; gap: clamp(16px, 2.4vw, 40px); align-items: start;
}
.row-full { max-width: none; margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); }
.row-full figcaption { padding: 0 var(--gut); }
.row-full .ph-open { max-height: 100vh; }
.chapter { scroll-margin-top: -40px; }
.row-wide { grid-template-columns: 1fr 1fr; max-width: 1700px; }
.row-pair { grid-template-columns: 1fr 1fr; max-width: 1180px; }
.row-pair > :nth-child(2) { margin-top: clamp(40px, 14vh, 180px); }
.row-trio { grid-template-columns: repeat(3, 1fr); }
.row-trio > :nth-child(2) { margin-top: clamp(30px, 8vh, 110px); }
.row-left { grid-template-columns: minmax(0, 46%) 1fr; }
.row-right { grid-template-columns: 1fr minmax(0, 46%); }
.row-right .ph { grid-column: 2; }
.row-center { grid-template-columns: minmax(0, 520px); justify-content: center; }

.ph { margin: 0; }
.ph-open { display: block; width: 100%; overflow: hidden; background: var(--ink-2); aspect-ratio: var(--ar); cursor: zoom-in; }
.ph img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.6s var(--ease), opacity 1.2s ease, filter 1.2s ease;
  opacity: 0; filter: blur(8px);
}
.ph img.loaded { opacity: 1; filter: none; }
.ph-open:hover img { transform: scale(1.025); }
.ph-open:focus-visible { outline: 1px solid var(--ember); outline-offset: 4px; }
.ph figcaption {
  display: flex; gap: 14px; align-items: baseline; margin-top: 12px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute);
}
.ph .cap { font-family: var(--serif); font-size: 16px; letter-spacing: .01em; text-transform: none; color: var(--bone-dim); }
.ph .cap::before { content: "— "; color: var(--ember); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ───────── Coda ───────── */
.coda {
  position: relative; min-height: 92vh; display: grid; place-items: center; text-align: center;
  overflow: hidden; padding: 120px var(--gut);
}
.coda-bg { position: absolute; inset: 0; }
.coda-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.coda-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--ink), transparent 30%, transparent 70%, var(--ink)); }
.coda-inner { position: relative; max-width: 900px; }
.coda blockquote {
  margin: 0 0 40px; font-family: var(--serif); font-weight: 300;
  font-size: clamp(34px, 5vw, 76px); line-height: 1.08; letter-spacing: -.015em;
}
.coda blockquote::before, .coda blockquote::after { color: var(--ember); font-weight: 300; }
.coda blockquote::before { content: "“"; }
.coda blockquote::after { content: "”"; }
.coda .mono { color: var(--bone-dim); }

/* ───────── Footer ───────── */
.foot {
  padding: 48px var(--gut) 40px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: baseline;
  color: var(--mute);
}
.foot a { text-decoration: none; color: var(--bone-dim); }
.foot a:hover { color: var(--bone); }
.foot .sig { font-family: var(--serif); font-size: 22px; color: var(--bone-dim); letter-spacing: .02em; text-transform: none; }

/* ───────── Lightbox ───────── */
.lb {
  position: fixed; inset: 0; z-index: 90; background: rgba(6, 6, 5, .97);
  display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.lb.open { opacity: 1; visibility: visible; transition: opacity .5s ease; }
.lb-top, .lb-bot { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gut); color: var(--bone-dim); }
.lb-stage { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 0 clamp(8px, 6vw, 96px); min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity .35s ease; }
.lb-stage img.fade { opacity: 0; }
.lb-prev, .lb-next {
  position: absolute; top: 0; bottom: 0; width: 30%; z-index: 2;
  display: flex; align-items: center; padding: 0 var(--gut); color: var(--bone-dim);
}
.lb-prev { left: 0; cursor: w-resize; }
.lb-next { right: 0; justify-content: flex-end; cursor: e-resize; }
.lb-prev span, .lb-next span { opacity: 0; transition: opacity .3s; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; }
.lb-prev:hover span, .lb-next:hover span, .lb-prev:focus-visible span, .lb-next:focus-visible span { opacity: 1; }
.lb-cap { font-family: var(--serif); font-size: 18px; color: var(--bone-dim); letter-spacing: .01em; text-transform: none; }
.lb-close:hover { color: var(--bone); }
.lb-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lb-far { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ember); min-height: 1em; opacity: 0; }
.lb-far.on { animation: far-in 1s ease .35s both; }
@keyframes far-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }


/* ───────── Chapter rail (desktop) + chip (phones) ───────── */
.sheet-link { grid-column: 1 / -1; justify-self: start; margin-top: 28px; background: none; border-width: 0 0 1px; color: var(--bone); cursor: pointer; }
.rail {
  position: fixed; right: clamp(10px, 1.6vw, 24px); top: 50%; z-index: 40;
  transform: translate(12px, -50%); opacity: 0; visibility: hidden;
  transition: opacity .5s ease, transform .5s var(--ease), visibility 0s linear .5s;
}
.rail.on { opacity: 1; visibility: visible; transform: translate(0, -50%); transition: opacity .5s ease, transform .5s var(--ease); }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail a, .rail-sheet {
  position: relative; display: flex; justify-content: flex-end; align-items: center;
  padding: 5px 0; text-decoration: none; color: var(--mute); font-size: 10.5px; letter-spacing: .16em;
  background: none; border: 0; cursor: pointer; width: 100%; font-family: var(--mono);
}
.rail-num { white-space: nowrap; transition: color .3s; }
.rail-num::after { content: ""; display: inline-block; vertical-align: middle; width: 10px; height: 1px; margin-left: 8px; background: currentColor; transition: width .4s var(--ease); }
.rail-title {
  position: absolute; right: calc(100% + 10px); top: 50%; margin-top: -11px;
  text-transform: uppercase; white-space: nowrap; color: var(--bone);
  opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .4s var(--ease); pointer-events: none;
  background: rgba(12, 11, 9, .82); padding: 3px 8px;
}
.rail a:hover .rail-title, .rail a:focus-visible .rail-title, .rail-sheet:hover .rail-title, .rail-sheet:focus-visible .rail-title { opacity: 1; transform: none; }
.rail a:hover, .rail-sheet:hover { color: var(--bone); }
.rail a[aria-current] { color: var(--ember); }
.rail a[aria-current] .rail-num::after { width: 22px; }
.rail-sheet { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 14px; }
.rail-sheet > span:first-child { line-height: 1; }
.chip-ch { display: none; }

/* ───────── Contact sheet ───────── */
.cs {
  position: fixed; inset: 0; z-index: 80; background: rgba(12, 11, 9, .985);
  display: grid; grid-template-rows: auto auto auto 1fr;
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s;
}
.cs.open { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.cs-top { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gut); color: var(--bone-dim); border-bottom: 1px solid var(--rule); }
.cs-close:hover { color: var(--bone); }
.cs-filters { display: flex; gap: 8px; padding: 16px var(--gut) 6px; overflow-x: auto; scrollbar-width: none; }
.cs-filters::-webkit-scrollbar { display: none; }
.cs-chip {
  flex: none; font: inherit; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone-dim); background: none; border: 1px solid var(--rule); padding: 7px 12px; cursor: pointer; transition: all .25s;
}
.cs-chip:hover { color: var(--bone); border-color: var(--bone-dim); }
.cs-chip.on { color: var(--ink); background: var(--bone); border-color: var(--bone); }
.cs-key { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px var(--gut) 14px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.cs-key svg { width: 18px; height: 18px; fill: none; stroke: #d2402f; stroke-width: 7; stroke-linecap: round; }
.cs-key a { color: var(--bone-dim); }
.cs-body { overflow-y: auto; padding: 0 var(--gut) 60px; overscroll-behavior: contain; }
.cs-group { padding-top: 22px; }
.cs-group h3 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 22px; }
.cs-group h3 span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--ember); margin-right: 10px; }
.cs-group ol {
  list-style: none; margin: 0; padding: 10px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  background: #050504; border-top: 6px dotted rgba(235, 228, 214, .07); border-bottom: 6px dotted rgba(235, 228, 214, .07);
}
.cs-group li[hidden], .cs-group[hidden] { display: none; }
.cs-group button { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: var(--ink-2); cursor: zoom-in; }
.cs-group img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.88); transition: filter .3s; }
.cs-group button:hover img, .cs-group button:focus-visible img { filter: none; }
.cs-no { position: absolute; left: 5px; bottom: 4px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: #f2c14e; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.cs-ring {
  position: absolute; inset: -7%; width: 114%; height: 114%; pointer-events: none;
  fill: none; stroke: #d2402f; stroke-width: 2.4; stroke-linecap: round; opacity: .85;
  stroke-dasharray: 320; stroke-dashoffset: 320; transform: rotate(-8deg);
}
.cs.open .cs-ring { animation: grease 1.1s var(--ease) .25s forwards; }
@keyframes grease { to { stroke-dashoffset: 0; } }
.cs-empty { color: var(--mute); padding: 40px 0; }

/* Lightbox extras */
.lb-id { display: flex; gap: 14px; align-items: baseline; min-width: 0; }
.lb-ch { color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-right { display: flex; gap: 22px; align-items: center; }
.lb-buy { color: var(--ember); text-decoration: none; letter-spacing: .18em; border-bottom: 1px solid transparent; transition: border-color .3s; }
.lb-buy:hover { border-color: var(--ember); }

/* ───────── Inner pages ───────── */
.page { padding: clamp(120px, 20vh, 200px) var(--gut) clamp(80px, 12vh, 140px); }
.split { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.split-img { position: sticky; top: 110px; }
.split-img > img, .split-img > picture > img { width: 100%; max-height: calc(100vh - 160px); object-fit: cover; }
.split-img figcaption { margin-top: 12px; color: var(--mute); }
.dateline { color: var(--ember); margin: 0 0 28px; }
.page h1 {
  margin: 0 0 48px; font-family: var(--serif); font-weight: 300;
  font-size: clamp(44px, 6vw, 92px); line-height: 1.0; letter-spacing: -.015em;
}
.prose p { max-width: 58ch; margin: 0 0 1.25em; color: var(--bone); opacity: .88; }
.prose p.big { font-family: var(--serif); font-size: clamp(24px, 2.2vw, 32px); line-height: 1.35; opacity: 1; }
.prose .word { font-family: var(--serif); font-size: 1.2em; color: var(--ember); letter-spacing: .02em; }

.prose .ghost { border-left: 1px solid var(--ember); padding-left: 24px; margin: 48px 0; }

.form { display: grid; gap: 28px; max-width: 640px; }
.field { display: grid; gap: 10px; }
.field label { color: var(--bone-dim); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 20px; color: var(--bone); background: transparent;
  border: 0; border-bottom: 1px solid var(--rule); padding: 8px 0 12px; border-radius: 0;
  transition: border-color .3s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--bone-dim) 50%), linear-gradient(135deg, var(--bone-dim) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--ink); }
.field textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ember); }
.hp { position: absolute; left: -9999px; }
.btn {
  justify-self: start; font-family: var(--mono); font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  border: 1px solid var(--bone-dim); padding: 18px 34px; transition: background .4s, color .4s, border-color .4s;
}
.btn:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }

/* ───────── Responsive ───────── */
@media (max-width: 960px) {
  .prologue { grid-template-columns: 1fr; }
  .toc { grid-template-columns: 1fr 1fr; }
  .toc li:not(:nth-child(3n)) { border-right: 0; }
  .toc li:nth-child(odd) { border-right: 1px solid var(--rule); }
  .split { grid-template-columns: 1fr; }
  .split-img { position: static; }
  .split-img > img, .split-img > picture > img { max-height: 70vh; }
}
@media (max-width: 760px) {
  body { font-size: 17.5px; }
  .mast { padding-top: 16px; }
  .nav { gap: 14px; }
  .nav a { font-size: 10px; letter-spacing: .14em; }
  .wordmark { letter-spacing: .2em; font-size: 10.5px; }
  .split-img > img, .split-img > picture > img { max-height: 58vh; }
  .board-rows li:nth-child(n+5) { display: none; }
  .hero-copy { grid-template-columns: 1fr; }
  .board { width: 100%; }
  .toc { grid-template-columns: 1fr; }
  .toc li:nth-child(odd) { border-right: 0; }
  .ch-head { grid-template-columns: 1fr; }
  .ch-line { grid-column: 1; }
  .ch-count { grid-row: auto; grid-column: 1; }
  .row, .row-wide, .row-pair, .row-trio, .row-left, .row-right, .row-center { grid-template-columns: 1fr; }
  .row-right .ph { grid-column: 1; }
  .row-pair > :nth-child(2), .row-trio > :nth-child(2) { margin-top: 0; }
  .row-trio { grid-template-columns: 1fr 1fr; }
  .row-trio > :first-child { grid-column: 1 / -1; }
  .row-left .ph, .row-right .ph, .row-center .ph { width: 82%; }
  .row-right .ph { justify-self: end; }
  .lb-prev span, .lb-next span { display: none; }
  .rail { display: none; }
  .chip-ch {
    position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 40;
    display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
    padding: 10px 16px; border: 1px solid var(--rule); border-radius: 999px;
    background: rgba(12, 11, 9, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: var(--bone); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
    transform: translate(-50%, 24px); opacity: 0; visibility: hidden;
    transition: opacity .4s ease, transform .5s var(--ease), visibility 0s linear .4s;
  }
  .chip-ch.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .4s ease, transform .5s var(--ease); }
  .chip-num { color: var(--ember); }
  .chip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chip-icon { color: var(--bone-dim); font-size: 14px; }
  .cs-group ol { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; }
  .lb-ch { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-far.on { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
  body::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide img, .hero-slide.on img { transform: none; transition: none; }
  .ph img { filter: none; transition: opacity .3s; }
}

/* ───────── Emphasis without italics: a pencil mark, like a note in a travel journal ───────── */
.mark {
  color: var(--bone);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.5C30 5.5 62 9.8 96 6.6S166 4.2 198 7.4' fill='none' stroke='%23c9925e' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M8 10.6C52 8.4 104 10.9 150 8.9S186 8.6 194 9.6' fill='none' stroke='%23c9925e' stroke-width='1' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") no-repeat 0 100% / 100% .32em;
  padding-bottom: .1em;
}
.dim { color: var(--bone-dim); }
.sc { font-family: var(--mono); font-size: .62em; letter-spacing: .24em; text-transform: uppercase; color: var(--ember); vertical-align: .14em; }

/* ───────── Travel document (About) ───────── */
.doc {
  --paper: #e4dccb;
  --paper-ink: #2a2620;
  position: relative;
  margin: 0;
  color: var(--paper-ink);
  background:
    repeating-radial-gradient(circle at 78% 30%, transparent 0 9px, rgba(120, 96, 64, .07) 9px 10px),
    repeating-linear-gradient(115deg, transparent 0 14px, rgba(120, 96, 64, .05) 14px 15px),
    linear-gradient(160deg, #ebe4d4, #d9cfba);
  padding: 22px 22px 18px;
  border-radius: 6px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .25);
  transform: rotate(-1.4deg);
  font-family: var(--mono);
}
.doc-head { display: flex; justify-content: space-between; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: #6d6150; border-bottom: 1px solid rgba(42, 38, 32, .2); padding-bottom: 10px; margin-bottom: 16px; }
.doc-body { display: grid; grid-template-columns: 42% 1fr; gap: 18px; align-items: start; }
.doc-photo { position: relative; }
.doc-photo img { width: 100%; aspect-ratio: 629 / 853; object-fit: cover; filter: sepia(.18) contrast(1.02); border-radius: 2px; }
.doc-photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.doc dl { margin: 0; display: grid; gap: 9px; }
.doc dt { font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: #7d7060; }
.doc dd { margin: 1px 0 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--paper-ink); font-weight: 500; line-height: 1.3; }
.doc-mrz { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(42, 38, 32, .2); font-size: clamp(9px, 1.05vw, 12.5px); letter-spacing: .12em; line-height: 1.5; color: #3a342c; white-space: nowrap; overflow: hidden; }
.doc-stamp {
  position: absolute; right: -18px; bottom: 70px; width: 128px; height: 128px; border-radius: 50%;
  border: 2px solid rgba(160, 62, 42, .72); color: rgba(160, 62, 42, .78);
  display: grid; place-items: center; text-align: center; transform: rotate(14deg);
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase; line-height: 1.5;
  mix-blend-mode: multiply;
}
.doc-stamp::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed rgba(160, 62, 42, .55); }
.doc-stamp b { display: block; margin: 3px 0; font-family: var(--serif); font-size: 16px; letter-spacing: .1em; font-weight: 500; }
.doc-note { margin-top: 26px; color: var(--mute); }

/* ───────── Arrival (end of About): a route that ends where the reader is ───────── */
.arrive { margin-top: 72px; }
.prose .arrive-word { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 7vw, 104px); line-height: 1; letter-spacing: -.02em; opacity: 1; }
.arrive-route {
  position: relative; height: 14px; margin-top: 18px; max-width: 58ch;
  background: linear-gradient(90deg, var(--bone-dim) 50%, transparent 0) 0 50% / 10px 1px repeat-x;
  opacity: .7;
}
.arrive-x { position: absolute; right: 0; top: 50%; transform: translateY(-52%); color: var(--ember); font-size: 15px; line-height: 1; background: var(--ink); padding-left: 8px; }
.prose .arrive-note { margin: 10px 0 0; max-width: 58ch; text-align: right; color: var(--ember); opacity: 1; }
.reveal.in .arrive-route { animation: route 2.4s var(--ease) both .3s; }
@keyframes route { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (max-width: 760px) {
  .doc { padding: 16px; }
  .doc-body { gap: 14px; }
  .doc dd { font-size: 11.5px; }
  .doc-stamp { width: 96px; height: 96px; right: -6px; bottom: 64px; font-size: 7.5px; }
  .doc-stamp b { font-size: 12px; }
}

/* ───────── Shop (coming soon) ───────── */
.shop-board { width: 100%; max-width: 520px; margin: 40px 0 56px; }
.shop-board .board-foot span { color: var(--mute); }
.shop-form { max-width: 520px; }
.shop-small { color: var(--mute); margin: 0; }
.field input::placeholder { color: var(--mute); }

/* Visible to screen readers and search engines only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.prologue .tagline { grid-column: 1 / -1; margin: 0 0 -24px; }

/* Cart link in the menu (shop.js draws the cart; site.js shows the link on other pages) */
.nav .nav-cart { color: var(--ember); white-space: nowrap; }
.nav-cart[hidden] { display: none; }
@media (max-width: 560px) {
  .nav:has(.nav-cart:not([hidden])) { gap: 10px; }
  .nav-cart .nc-l { display: none; }
  .nav-cart .nc-n { display: inline-block; min-width: 18px; padding: 1px 5px; border: 1px solid var(--ember); text-align: center; letter-spacing: 0; }
  .nav-cart::after { display: none; }
}

/* Letters: the one-line email signup above every footer */
.letters { width: min(1500px, calc(100% - 2 * var(--gut))); margin: clamp(64px, 10vh, 120px) auto 0; padding: 32px 0 clamp(44px, 7vh, 72px); border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 12px 40px; align-items: center; }
.letters-label { font-family: var(--serif); font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; color: var(--bone); }
.letters-label span { color: var(--ember); }
.letters-row { display: flex; border-bottom: 1px solid var(--bone-dim); }
.letters-row input { flex: 1; min-width: 0; background: none; border: 0; color: var(--bone); font: inherit; font-size: 17px; padding: 10px 0; }
.letters-row input::placeholder { color: var(--mute); }
.letters-row input:focus { outline: none; }
.letters-row:focus-within { border-color: var(--bone); }
.letters-row button { color: var(--bone-dim); padding: 0 0 0 16px; }
.letters-row button:hover { color: var(--bone); }
.letters-msg { grid-column: 2; min-height: 1.4em; margin: 0; color: var(--ember); text-transform: none; letter-spacing: .06em; }
.letters-msg:empty { display: none; }
.letters-msg b { color: var(--bone); font-weight: 500; letter-spacing: .16em; }
@media (max-width: 760px) { .letters { grid-template-columns: 1fr; } .letters-msg { grid-column: 1; } }

/* Policies page */
.policy { max-width: 760px; margin: 0 auto; }
.policy h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3vw, 40px); margin: 64px 0 18px; scroll-margin-top: 110px; }
.policy a { color: var(--bone); }
.policy strong { font-weight: 500; color: var(--bone); }
.policy-toc { color: var(--mute); margin: 8px 0 0; }
.policy-toc a { color: var(--bone-dim); text-decoration: none; border-bottom: 1px solid var(--rule); }
.policy-table { margin: 8px 0 28px; border-top: 1px solid var(--rule); }
.policy-table div { display: grid; grid-template-columns: 21em 1fr; gap: 16px; /* 21em fits "Everywhere else · Standard" on one line */ padding: 12px 0; border-bottom: 1px solid var(--rule); }
.policy-table dt { color: var(--bone-dim); }
.policy-table dd { margin: 0; color: var(--bone); text-transform: none; letter-spacing: .04em; }
.policy-date { color: var(--mute); margin-top: 56px; }
@media (max-width: 560px) { .policy-table div { grid-template-columns: 1fr; gap: 4px; } }
.letters-compact { width: auto; max-width: 460px; margin: 44px auto 0; padding: 0; border: 0; grid-template-columns: 1fr; text-align: left; }
.letters-compact .letters-label { font-size: 19px; }
.letters-compact .letters-msg { grid-column: 1; }

/* A letter, now and then: the one-time invitation card (site.js decides when) */
.letter-card { position: fixed; left: var(--gut); bottom: 24px; z-index: 80; width: min(360px, calc(100vw - 2 * var(--gut))); padding: 22px 24px 18px; background: rgba(12, 11, 9, .96); border: 1px solid var(--rule); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.letter-card.in { opacity: 1; transform: none; }
.letter-x { position: absolute; top: 14px; right: 16px; color: var(--mute); font-size: 10px; }
.letter-x:hover { color: var(--bone); }
.letter-k { color: var(--ember); margin: 0 0 12px; font-size: 10px; }
.letter-h { font-family: var(--serif); font-size: 21px; line-height: 1.3; margin: 0 0 16px; color: var(--bone); }
.letter-card .letters { width: auto; margin: 0; padding: 0; border: 0; display: block; max-width: none; }
.letter-card .letters-msg { margin-top: 10px; }
.letter-f { color: var(--bone-dim); margin: 12px 0 0; font-size: 10px; }
.letter-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { .letter-card { transition: opacity .3s; transform: none; } }

/* ───────── Finish ─────────
   The details nobody should notice: dark native controls, balanced headings, no stranded last words,
   one focus ring, quiet underlines, prices that line up, and no browser colours leaking in. */
html { color-scheme: dark; scrollbar-color: #3b362e var(--ink); -webkit-tap-highlight-color: transparent; }
body { font-kerning: normal; text-rendering: optimizeLegibility; }
h1, h2, h3, blockquote, .lede, .ch-line, .defn, .letter-h, .letters-label, .pd-line, .toc-title, .print-title { text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 1px solid var(--ember); outline-offset: 3px; }
:where(a, button) { transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease), opacity .3s var(--ease); }
:where(p, dd, li) a:not([class]) { text-decoration-thickness: 1px; text-underline-offset: .24em; text-decoration-color: rgba(235, 228, 214, .32); }
:where(p, dd, li) a:not([class]):hover { text-decoration-color: currentColor; }
input, textarea, select { caret-color: var(--ember); }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--bone); -webkit-box-shadow: 0 0 0 1000px var(--ink) inset; transition: background-color 9999s 0s;
}
.pd-price, .cart-price, .cart-sum dd, .print-meta .mono, .board-rows .t { font-variant-numeric: lining-nums tabular-nums; }
/* Uppercase mono carries its letter-spacing after the last letter: end the nav underline on the glyph,
   and pull the last item out so its final letter sits exactly on the right gutter */
.nav a::after { right: .22em; }
.nav > a:not([hidden]):not(:has(~ a:not([hidden]))) { margin-right: -.22em; } /* the last visible item */
@media (max-width: 760px) {
  .nav a::after { right: .14em; }
  .nav > a:not([hidden]):not(:has(~ a:not([hidden]))) { margin-right: -.14em; }
}
.letters.joined .letters-row { display: none; }
.letters.joined .letters-msg { grid-column: 2; align-self: center; font-size: 12px; line-height: 1.7; }
.letters-compact.joined .letters-msg, .letter-card .letters.joined .letters-msg { grid-column: 1; }
@media (max-width: 760px) { .letters.joined .letters-msg { grid-column: 1; } }
/* Touch targets: every tappable thing gets at least 24 px of height (WCAG 2.2, 2.5.8).
   Padding grows the hit area; the matching negative margin keeps every pixel where it was. */
.nav a { padding: 12px 0; margin: -8px 0; }
.nav a::after { bottom: 8px; }
.foot a, :where(p, dd, li, figcaption) a:not([class]), .pd-story a, .policy-toc a { padding: 6px 0; } /* inline: no layout change */
.toc li a { padding: 6px 20px; } /* the chapter index keeps its own cell padding */
.lb-close, .cs-close { padding: 10px; margin: -10px; }
.letter-x { padding: 8px; top: 6px; right: 8px; }
/* Letters page: the signup form inside the prose column */
.letters-page { width: auto; margin: 56px 0 0; padding: 0; border: 0; grid-template-columns: 1fr; max-width: 520px; }
.letters-page .letters-msg { grid-column: 1; }
.letters-intro .policy-date a { color: var(--bone-dim); }
.letters-intro p.policy-date { margin-top: 44px; max-width: none; }
/* Letters page: the fog road from the 404 page, held far back behind the words */
.letters-hero { position: relative; min-height: 100vh; display: grid; align-items: center; overflow: hidden; }
.letters-bg { position: absolute; inset: 0; }
.letters-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: grayscale(1); }
.letters-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--ink) 4%, rgba(12,11,9,.55) 40%, rgba(12,11,9,.7) 70%, var(--ink)); }
.letters-hero .letters-intro { position: relative; width: 100%; }
/* Photographs: no long-press "Save to Photos" on phones, no dragging out */
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
