:root {
  --ink: #100d0a;
  --ink-2: #1a150e;
  --paper: #efe6d3;
  --paper-dim: #9c8f76;
  --brass: #d3ac74;
  --brass-dim: #7c6842;
  --oxblood: #a8452f;
  --line: rgba(239, 230, 211, 0.14);
  --line-strong: rgba(239, 230, 211, 0.3);
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--brass); color: var(--ink); }

a { color: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ambient grain, purely decorative */
.grain {
  position: fixed;
  inset: -10%;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* spotlight cursor, fine pointer only */
.spotlight {
  position: fixed;
  top: 0; left: 0;
  width: 480px; height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 172, 116, 0.16) 0%, rgba(211, 172, 116, 0) 70%);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

.spotlight.is-active { opacity: 1; }
.spotlight.is-hot { background: radial-gradient(circle, rgba(211, 172, 116, 0.3) 0%, rgba(211, 172, 116, 0) 68%); }

@media (hover: none), (pointer: coarse) {
  .spotlight { display: none; }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 28px 0;
}

.hero__inner {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.hero__eyebrow {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--brass);
}

.hero__title {
  margin: 0 0 26px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 480;
  font-size: clamp(64px, 13vw, 156px);
  line-height: 0.88;
  letter-spacing: -0.015em;
  color: var(--paper);
}

.hero__title .mask { display: block; overflow: hidden; }
.hero__title .line { display: block; }

.hero__lede {
  max-width: 46ch;
  margin: 0;
  font-size: 18px;
  color: var(--paper-dim);
}

.marquee {
  margin-top: clamp(48px, 8vw, 96px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee__track {
  display: inline-flex;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: clamp(16px, 2.6vw, 22px);
  letter-spacing: 0.01em;
  color: var(--brass-dim);
  will-change: transform;
}

.scrollcue {
  position: absolute;
  left: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
}

.scrollcue span {
  width: 1px;
  height: 30px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}

.scrollcue span::after {
  content: '';
  position: absolute;
  left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--brass);
  animation: cue-drop 1.8s ease-in-out infinite;
}

@keyframes cue-drop {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ---------------------------------------------------------- transition */

.transition {
  position: relative;
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 28px;
  overflow: hidden;
}

.transition__count {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 380;
  font-size: clamp(96px, 26vw, 340px);
  line-height: 0.85;
  color: var(--paper);
}

.transition__rule {
  width: min(60vw, 420px);
  height: 1px;
  margin: 14px 0 18px;
  background: var(--brass);
  transform-origin: center;
}

.transition__label {
  margin: 0;
  font-size: 14px;
  color: var(--paper-dim);
}

/* ------------------------------------------------------------ controls */

.directory { max-width: 980px; margin: 0 auto; padding: 0 28px 40px; }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.search { flex: 1 1 240px; min-width: 200px; }

.search input {
  width: 100%;
  padding: 12px 4px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}

.search input::placeholder { color: var(--paper-dim); }
.search input:focus { border-bottom-color: var(--brass); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }

.filter {
  padding: 9px 16px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--paper-dim);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.filter:hover { border-color: var(--brass); color: var(--paper); }

.filter[aria-pressed="true"] {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--ink);
}

.count {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--paper-dim);
}

/* -------------------------------------------------------------- ledger */

.ledger { list-style: none; margin: 0; padding: 0; }

.row {
  border-bottom: 1px solid var(--line);
  transition: grid-template-rows 0.35s ease, max-height 0.35s ease, margin 0.35s ease;
  max-height: 260px;
}

.row.is-filtered-out {
  opacity: 0 !important;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  border-bottom-color: transparent;
}

.row a {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  column-gap: 20px;
  align-items: baseline;
  padding: 22px 10px;
  text-decoration: none;
  position: relative;
}

.row a::before {
  content: '';
  position: absolute;
  left: -18px; top: 0; bottom: 0;
  width: 3px;
  background: var(--brass);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}

.row a:hover::before,
.row a:focus-visible::before { transform: scaleY(1); }

.row a:hover .row__name,
.row a:focus-visible .row__name { color: var(--brass); }

.row__number {
  font-size: 13px;
  color: var(--paper-dim);
  font-variant-numeric: tabular-nums;
  padding-top: 6px;
}

.row__name {
  grid-column: 2;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 460;
  color: var(--paper);
  transition: color 0.2s ease;
}

.row__role {
  grid-column: 2;
  margin-top: 4px;
  font-size: 14px;
  color: var(--paper-dim);
}

.row__dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--brass);
  vertical-align: middle;
}

.row--trade .row__dot { background: var(--oxblood); }

.row__location {
  grid-column: 3;
  font-size: 14px;
  color: var(--paper-dim);
  white-space: nowrap;
  padding-top: 6px;
}

.row__idea {
  grid-column: 2 / 4;
  margin-top: 10px;
  max-width: 62ch;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  color: var(--paper-dim);
}

.empty {
  padding: 40px 0;
  color: var(--paper-dim);
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
}

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

.colophon {
  max-width: 980px;
  margin: 40px auto 0;
  padding: 40px 28px 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.colophon__ghost {
  margin: 0 0 30px;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 340;
  font-size: clamp(72px, 16vw, 220px);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
}

.colophon__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 40px;
}

.colophon__note {
  max-width: 60ch;
  margin: 0;
  font-size: 13px;
  color: var(--paper-dim);
}

.support {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.support__label {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--paper);
}

.support__coffee {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.support__coffee:hover,
.support__coffee:focus-visible { border-color: var(--brass); background: rgba(211, 172, 116, 0.08); }

.support__qr {
  width: 52px; height: 52px;
  flex: none;
  border-radius: 10px;
  background: var(--paper);
  padding: 4px;
  display: block;
}

.support__qr svg { display: block; width: 100%; height: 100%; }

.support__text {
  font-size: 14px;
  color: var(--paper);
  line-height: 1.3;
}

.support__text small { color: var(--paper-dim); font-size: 12px; }

.support__instagram {
  font-size: 13px;
  color: var(--paper-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.support__instagram:hover,
.support__instagram:focus-visible { color: var(--brass); border-color: var(--brass); }

.colophon__copyright {
  margin: 0;
  padding: 20px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--paper-dim);
}

@media (max-width: 640px) {
  .row a { grid-template-columns: 34px 1fr; }
  .row__location { grid-column: 2; padding-top: 0; }
  .row__idea { grid-column: 1 / -1; }
  .colophon__grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .scrollcue span::after { animation: none; top: 0; height: 40%; }
  .row.is-filtered-out { display: none; }
}
