/* Adaptor House — editorial design system, light half.
   Inverse of historicalpresent.com/assets/editorial.css: HP is the dark half, AH the light.
   Same type, rules, grid, and motion; ground and figure swapped. The Works index is the reference page. */
:root {
  --ground: #f7f5f0;
  --figure: #0c0c0b;
  --soft: #34322e;
  --muted: #67625a;
  --faint: #9a958c;
  --line: #ddd8ce;
  --line-strong: #bfb9ae;
  --accent: #7a6634;
  --accent-dim: #b3a172;
  --panel: #efece5;
  --panel-hi: #e7e3da;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 36rem;
  --wrap: min(1120px, calc(100% - 2rem));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  color: var(--figure);
  background: var(--ground);
  font: 400 1.18rem/1.62 var(--serif);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--accent-dim); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: #000; text-decoration-color: var(--accent); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

.label {
  color: var(--accent);
  font: 600 .68rem/1.4 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* ---------- masthead */
.site-head {
  width: var(--wrap);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.3rem 0;
}
.brand { display: inline-flex; align-items: center; width: 190px; flex: none; text-decoration: none; }
.brand svg { display: block; width: 100%; height: auto; }
.brand .logo-line { stroke: var(--figure); stroke-width: 2; fill: none; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.brand .divider { stroke-width: 1.5; }
.brand .wordmark { fill: var(--figure); font: 300 86px var(--sans); letter-spacing: 10px; dominant-baseline: middle; }
.head-links { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font: 500 .7rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.head-links a { text-decoration: none; color: var(--muted); }
.head-links a:hover, .head-links a[aria-current="page"] { color: var(--figure); }
.head-links a[aria-current="page"] { box-shadow: 0 1px 0 var(--accent); }

/* ---------- sticky section index */
.page-index {
  position: sticky;
  top: 0;
  z-index: 10;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 240, .92);
  backdrop-filter: blur(8px);
}
.page-index nav {
  width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: .85rem 0;
  font: 500 .68rem/1.4 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.page-index nav::-webkit-scrollbar { display: none; }
.page-index a { text-decoration: none; color: var(--muted); }
.page-index a:hover { color: var(--figure); }
.page-index .who { color: var(--figure); font-weight: 600; margin-right: .4rem; }
.page-index .sep { flex: none; width: 1px; height: 1rem; background: var(--line-strong); }
.page-index .out { color: var(--accent); }
.page-index a[aria-current="true"] { color: var(--figure); box-shadow: 0 1px 0 var(--accent); }

/* ---------- hero */
.hero {
  width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.hero h1.title {
  margin: 1.1rem 0 1.6rem;
  font: 400 clamp(3.8rem, 9.5vw, 8.4rem)/.88 var(--serif);
  letter-spacing: -.035em;
}
.hero h1.title em { display: block; color: var(--soft); }
.dek {
  max-width: 40rem;
  margin: 0;
  color: var(--soft);
  font: italic 400 clamp(1.3rem, 2.1vw, 1.6rem)/1.42 var(--serif);
}

/* ---------- vitals: a horizontal row of figures; each counts up and draws its rule as it arrives */
.vitals {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.vital {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.2rem 2rem 2.4rem 0;
  text-decoration: none;
}
.vital + .vital { padding-left: 2rem; border-left: 1px solid var(--line); }
.vital::after {
  content: ""; position: absolute; left: 0; right: 2rem; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
.vital + .vital::after { left: 2rem; }
.vital b {
  font: 400 clamp(3.4rem, 6vw, 4.8rem)/.9 var(--serif);
  font-variant-numeric: oldstyle-nums tabular-nums;
  letter-spacing: -.03em;
  transition: color .3s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
}
.vital .label { margin-top: 1rem; color: var(--muted); font-size: .72rem; transition: color .3s ease; }
.vital small { margin-top: .45rem; color: var(--faint); font: italic 1rem/1.4 var(--serif); }
a.vital:hover { color: var(--figure); }
a.vital:hover::after { transform: none; }
a.vital:hover b { color: var(--accent); transform: translateY(-3px); }
a.vital:hover .label { color: var(--figure); }
.js .vitals.in .vital::after { animation: vital-rule 1.4s cubic-bezier(.6, 0, .2, 1) calc(var(--i, 0) * 150ms + .2s) both; }
@keyframes vital-rule { 0% { transform: scaleX(0); } 55% { transform: none; } 100% { transform: scaleX(0); transform-origin: right; } }

/* ---------- sections */
.section {
  width: var(--wrap);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3.4fr);
  gap: 2rem clamp(2rem, 5vw, 4.5rem);
}
.section + .section { border-top: 1px solid var(--line); }
.rail { position: relative; }
.rail-inner { position: sticky; top: 5.2rem; }
.rail .num { display: block; margin-top: .9rem; color: var(--faint); font: 400 2.4rem/1 var(--serif); font-variant-numeric: oldstyle-nums; }
.section h2 {
  margin: 0 0 2.4rem;
  max-width: 20ch;
  font: 400 clamp(2.3rem, 4.6vw, 3.7rem)/1.02 var(--serif);
  letter-spacing: -.02em;
  text-wrap: balance;
}
.section h2 em { color: var(--soft); }

.prose { max-width: var(--measure); margin-bottom: 2.6rem; }
.prose p { margin: 0 0 1.25rem; color: #24221f; hanging-punctuation: first; }
.prose p:first-child::first-letter {
  float: left;
  margin: .07em .09em 0 -.02em;
  color: var(--accent);
  font: 400 4.6em/.8 var(--serif);
}
.prose p:first-child::first-line { font-variant: small-caps; letter-spacing: .04em; }
.prose a { color: var(--accent); }

/* ---------- catalogue entries */
.catalogue { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.catalogue .entry { border-bottom: 1px solid var(--line); }
.catalogue .entry a { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 1.4rem; align-items: center; padding: 1.1rem 0; text-decoration: none; transition: padding-left .25s ease; }
.catalogue .entry a:hover { padding-left: .35rem; color: #000; }
.catalogue .entry .glyph { display: grid; place-items: center; height: 5.5rem; background: var(--panel); color: var(--figure); font: 400 1.9rem/1 var(--serif); letter-spacing: .04em; transition: background .25s ease, color .25s ease; }
.catalogue .entry a:hover .glyph { background: var(--figure); color: var(--ground); }
.catalogue .entry h3 { margin: 0 0 .25rem; font: italic 400 1.5rem/1.15 var(--serif); }
.catalogue .entry p { margin: 0; color: var(--muted); font: .82rem/1.5 var(--sans); letter-spacing: .02em; }
.catalogue .entry .go { color: var(--accent); font: 500 .66rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }

/* ---------- works */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.works.two { grid-template-columns: repeat(2, 1fr); }
.work {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  padding: 1.6rem 1.6rem 1.7rem;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: background .2s ease;
}
a.work:hover { background: var(--panel-hi); color: var(--figure); }
.work .ghost {
  position: absolute; right: -.05em; top: -.12em;
  color: #e2ddd2; font: 400 6.2rem/1 var(--serif); font-variant-numeric: lining-nums; letter-spacing: -.04em;
  pointer-events: none;
}
.work .kind { position: relative; display: flex; gap: .8rem; }
.work .kind span + span { color: var(--muted); }
.work h3 { position: relative; margin: auto 0 .55rem; font: italic 400 1.62rem/1.12 var(--serif); }
.work p { position: relative; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.work p a { color: var(--soft); }
/* A card holding more than one link: the title and go-line link the work, the body may link elsewhere. */
.work h3 a, a.go { text-decoration: none; }
.work h3 a:hover { color: #000; text-decoration: underline; text-decoration-color: var(--accent); }
a.go:hover { color: var(--figure); }
.work .go { position: relative; margin-top: 1.2rem; color: var(--accent); font: 500 .68rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.status { position: relative; display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.1rem; color: var(--muted); font: 500 .62rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--accent); }

/* ---------- editorial note: the dark seed in the light half */
.note { width: var(--wrap); margin: 0 auto; padding: clamp(4.5rem, 9vw, 8rem) 0; border-top: 1px solid var(--line); text-align: center; }
.note .orn { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.note .orn i { width: 3.5rem; height: 1px; background: var(--accent-dim); }
.note .orn b { width: 7px; height: 7px; transform: rotate(45deg); background: var(--figure); }
.note blockquote {
  max-width: 46rem;
  margin: 2.2rem auto 0;
  color: #1c1b19;
  font: italic 400 clamp(1.75rem, 3.6vw, 2.75rem)/1.28 var(--serif);
  text-wrap: balance;
}
.note p { margin: 2rem 0 0; color: var(--muted); font: 500 .66rem/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.note p a { color: var(--accent); text-decoration: none; }
.note p.orig { margin-top: 1.4rem; color: var(--soft); font: 400 1.35rem/1.5 var(--serif); letter-spacing: .12em; text-transform: none; }

/* ---------- colophon: citation, copyright */
footer.colophon {
  width: var(--wrap);
  margin: 0 auto;
  padding: 2rem 0 2.6rem;
  border-top: 1px solid var(--line-strong);
  color: var(--faint);
  font: 500 .66rem/1.5 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
}
footer.colophon a { text-decoration: none; color: var(--muted); }
footer.colophon a:hover { color: var(--figure); }
.cite { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: .6rem 1.4rem; padding-bottom: 1.6rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; }
.cite p { margin: 0; color: var(--soft); font: 400 1rem/1.5 var(--serif); overflow-wrap: anywhere; }
.cite-copy { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); padding: .45rem .7rem; font: 500 .62rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.cite-copy:hover { color: var(--figure); border-color: var(--accent); }
.colophon-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.colophon-row nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* ---------- utility */
.skip { position: absolute; left: 1rem; top: -3rem; z-index: 20; padding: .6rem .9rem; background: var(--figure); color: var(--ground); font: 600 .75rem/1 var(--sans); text-decoration: none; }
.skip:focus { top: 1rem; }

/* ---------- motion: restrained, meaningful, and only with JS */
.js .reveal, .js [data-stagger] > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal.in, .js [data-stagger].in > * { opacity: 1; transform: none; }
.js .hero-text > * { opacity: 0; transform: translateY(10px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.js .hero-text.in > * { opacity: 1; transform: none; }
.js .hero-text > :nth-child(2) { transition-delay: .12s; }
.js .hero-text > :nth-child(n+3) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .vitals.in .vital::after { animation: none; }
  .js .reveal, .js [data-stagger] > *, .js .hero-text > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- tablet */
@media (max-width: 960px) {
  .works { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- phone: designed, not shrunk */
@media (max-width: 760px) {
  body { font-size: 1.1rem; }
  .site-head { flex-direction: column; align-items: flex-start; gap: .9rem; padding: 1rem 0; }
  .brand { width: 170px; }
  .head-links { gap: .5rem 1.1rem; font-size: .64rem; }
  .page-index nav { gap: 1.25rem; padding: .75rem 0; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .page-index .who { display: none; }

  .hero { padding: 2.6rem 0 2.4rem; }
  .hero h1.title { margin: .8rem 0 1.1rem; font-size: clamp(3.2rem, 16vw, 4.8rem); }
  .dek { font-size: 1.2rem; }

  /* Vitals stack: figure left, label and note right. */
  .vitals { grid-template-columns: 1fr; }
  .vital, .vital + .vital { display: grid; grid-template-columns: 5.5rem 1fr; column-gap: 1.2rem; align-items: baseline; padding: 1.3rem 0; border-left: 0; }
  .vital + .vital { border-top: 1px solid var(--line); }
  .vital::after, .vital + .vital::after { left: 0; right: 0; }
  .vital b { grid-row: span 2; font-size: 3.2rem; }
  .vital .label { margin-top: 0; }
  .vital small { margin-top: .2rem; }

  .section { grid-template-columns: 1fr; gap: 0; padding: 3.4rem 0; }
  .rail-inner { position: static; display: flex; align-items: baseline; gap: .8rem; margin-bottom: .9rem; }
  .rail .num { margin: 0; font-size: 1rem; }
  .section h2 { margin-bottom: 1.6rem; font-size: 2.3rem; }
  .prose p:first-child::first-letter { font-size: 3.7em; }

  .catalogue .entry a { grid-template-columns: 4.5rem 1fr; gap: 1rem; }
  .catalogue .entry .glyph { height: 4.5rem; font-size: 1.5rem; }
  .catalogue .entry .go { display: none; }

  .works, .works.two { grid-template-columns: 1fr; }
  .work { min-height: 0; padding: 1.3rem 1.3rem 1.4rem; }
  .work .ghost { font-size: 4.2rem; }
  .work h3 { margin-top: 2.2rem; font-size: 1.45rem; }

  .note { padding: 3.6rem 0; }
  .cite { grid-template-columns: 1fr; }
  .cite-copy { justify-self: start; }
  .colophon-row { flex-direction: column; }
}

/* ---------- print */
@media print {
  .skip, .page-index, .work .go, .cite-copy { display: none !important; }
  .js .reveal, .js [data-stagger] > *, .js .hero-text > * { opacity: 1 !important; transform: none !important; }
  .rail-inner { position: static; }
  .section, .work, .entry { break-inside: avoid; }
}
