/* ============================================================
   THE HUMAN COLLECTIVE — monochrome "typewriter" theme
   Palette: typing paper, ribbon ink, and the grays between.
   ============================================================ */

:root {
  --paper: #F4F2ED;
  --paper-deep: #E4E1DA;
  --ink: #191817;
  --ink-soft: #55524C;
  --carbon: #3A3835;
  --line: rgba(25, 24, 23, 0.18);

  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --body: "Lora", Georgia, serif;
  --mono: "Space Mono", monospace;

  --max: 1140px;
  --narrow: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Live bar ---------- */
.livebar {
  background: var(--ink);
  color: var(--paper);
  padding: 9px 24px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.livebar .dot, .dot-inline {
  display: inline-block;
  width: 9px; height: 9px; border-radius: 50%; background: var(--paper);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.livebar a { color: var(--paper); text-underline-offset: 3px; }

/* ---------- Header ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
  position: sticky; top: 0; z-index: 10;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: var(--max); margin: 0 auto;
}
.nav .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.nav ul { display: flex; gap: 26px; list-style: none; align-items: center; }
.nav ul a {
  color: var(--ink-soft); text-decoration: none;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.nav ul a:hover { color: var(--ink); }
.nav .nav-btn { padding: 10px 18px; }

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  transition: background 150ms ease, color 150ms ease;
  cursor: pointer;
  background: none;
}
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--carbon); }
.btn.ghost { color: var(--ink); }
.btn.ghost:hover { background: rgba(25, 24, 23, 0.07); }

/* ---------- Hero + triptych ---------- */
.hero { padding: 48px 24px 30px; max-width: var(--max); margin: 0 auto; }
.hero h1 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
@media (min-width: 880px) {
  .hero h1 { white-space: nowrap; }
}
.hero p.lede {
  margin-top: 20px; font-size: 1.2rem; color: var(--ink-soft); max-width: 54ch;
}

.triptych {
  max-width: var(--max);
  margin: 34px auto 0;
  padding: 0 24px 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.door {
  position: relative;
  min-height: 294px;
  border-radius: 14px;
  padding: 26px;
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none;
  overflow: hidden;
  transition: transform 200ms ease, border-width 150ms ease;
  background: #FFFFFF;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.door:hover { transform: translateY(-6px); border-width: 3px; }
.door h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 10px 0 8px;
  color: var(--ink);
}
.door p { font-size: 0.98rem; max-width: 30ch; color: var(--ink); }
.door .mono { color: var(--ink-soft); opacity: 1; }

/* ---------- Sections ---------- */
section { padding: 76px 0; border-top: 1px solid var(--line); }
section h2.head, .listing h2.head {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  letter-spacing: -0.01em;
  margin: 10px 0 36px;
}
.eyebrow { color: var(--ink-soft); text-decoration: none; display: inline-block; }

/* ---------- Work grids ---------- */
.works {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.work {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #FAF8F4;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex; flex-direction: column;
  transition: transform 180ms ease;
}
.work:hover { transform: translateY(-4px); }
.work .thumb {
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  overflow: hidden;
}
.work .thumb img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.work .meta { padding: 18px 20px 22px; }
.work .meta h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 6px 0 4px; }
.work .meta .artist { color: var(--ink-soft); font-size: 0.95rem; font-style: italic; }

/* ---------- Live section (home) ---------- */
.live-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 44px; align-items: start; }
.player {
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  text-align: center; padding: 20px;
  text-decoration: none;
}
.live-grid p { color: var(--ink-soft); margin-bottom: 22px; max-width: 46ch; }

/* Live page — make embedded players fill the width */
.live-content .kg-embed-card iframe,
.live-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 3px;
}

/* ---------- Membership ---------- */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 820px; }
.tier {
  border: 1px solid var(--line); border-radius: 3px; padding: 34px 30px;
  background: #FAF8F4;
}
.tier.supporter { border: 2px solid var(--ink); }
.tier h3 { font-family: var(--display); font-weight: 650; font-size: 1.4rem; margin: 8px 0 4px; }
.tier .price { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 18px; }
.tier p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 24px; }

/* ---------- Artists ---------- */
.artist-note { color: var(--ink-soft); max-width: 60ch; margin-bottom: 26px; }
.artist-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 8px;
}
.artist-card {
  text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 3px; background: #FAF8F4;
  padding: 20px;
  transition: transform 180ms ease;
}
.artist-card:hover { transform: translateY(-4px); }
.artist-card .portrait {
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  background: var(--paper-deep);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.artist-card .portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.artist-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin-bottom: 4px; }
.artist-card p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

.artist-header {
  display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center;
  margin-bottom: 48px;
}
.artist-header .portrait.large {
  aspect-ratio: 1 / 1; border-radius: 2px; background: var(--paper-deep);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.artist-header .portrait.large img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.artist-links { margin-top: 8px; }

/* ---------- Listing pages ---------- */
.listing { padding: 64px 0 84px; border-top: 0; }

/* ---------- Posts / articles ---------- */
.post { padding: 64px 0 84px; }
.post-header { padding-top: 8px; padding-bottom: 34px; }
.post-header h1 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 12px 0 14px;
}
.post-header .lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 54ch; }
.byline {
  margin-top: 20px;
  display: flex; gap: 20px; align-items: baseline;
  color: var(--ink-soft); font-size: 1rem;
}
.figure, figure.feature { margin: 0 auto 44px; }
figure.feature img { width: 100%; border-radius: 3px; }
figure.feature figcaption {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin-top: 10px;
}

.post-content > * + * { margin-top: 1.4em; }
.post-content h2, .post-content h3 {
  font-family: var(--display); font-weight: 650; letter-spacing: -0.01em;
  margin-top: 2em;
}
.post-content h2 { font-size: 1.7rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content img { max-width: 100%; border-radius: 3px; }
.post-content blockquote {
  border-left: 3px solid var(--ink);
  padding-left: 22px;
  font-style: italic;
  color: var(--ink-soft);
}
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.post-content pre {
  font-family: var(--mono); font-size: 0.9rem;
  background: var(--paper-deep); border: 1px solid var(--line); border-radius: 3px;
  padding: 18px; overflow-x: auto;
}
.post-content ul, .post-content ol { padding-left: 1.4em; }

.post-footer { margin-top: 56px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Ghost editor width cards — required for gscan */
.kg-width-wide { max-width: var(--max); margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: none; width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }
.kg-card + .kg-card { margin-top: 1.4em; }
.kg-image { max-width: 100%; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 10px; }
.kg-gallery-row { display: flex; gap: 10px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }

/* ---------- Pagination ---------- */
.pagination {
  margin-top: 52px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.pagination a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.pagination .page-number { color: var(--ink-soft); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 24px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
footer .mono { color: var(--ink); display: block; margin-bottom: 10px; }

/* ---------- Ghost portal notice ---------- */
.gh-post-upgrade-cta, .gh-content-gate {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .triptych { grid-template-columns: 1fr; }
  .door { min-height: 240px; }
  .works { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .artist-grid { grid-template-columns: repeat(2, 1fr); }
  .artist-header { grid-template-columns: 1fr; }
  .artist-header .portrait.large { max-width: 220px; }
  .nav ul { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 520px) {
  .artist-grid { grid-template-columns: 1fr; }
}

/* Room header links (e.g. Amazon books button in Writing) */
.room-links { margin: -6px 0 34px; }
.room-links .btn.ghost {
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 24, 23, 0.06);
}
.room-links .btn.ghost:hover { background: #fff; border-color: var(--ink); box-shadow: 0 2px 5px rgba(25, 24, 23, 0.12); }
