/* ============================================================
   CANOPY — the main theme for the Greenman Collective
   Night in a wood: moss, lichen and one amber light. The spiral
   returns as tree rings and contour lines (assets/js/canopy.js).
   System fonts only; nothing is loaded from elsewhere.
   ============================================================ */

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

:root {
  --night:   #0d1611;
  --night-2: #132019;
  --lichen:  #dfe6d2;
  --body:    #b9c4ad;
  --moss:    #9bb886;
  --fern:    #5f7f55;
  --bark:    #7d8876;
  --amber:   #d9a54c;
  --rule:    #22342a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

html { font-size: 19px; }
body {
  background: var(--night); color: var(--lichen);
  font-family: var(--serif); line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; }
.sc { font-variant: small-caps; letter-spacing: 0.08em; text-transform: lowercase; }
.mono { font-family: var(--mono); }
.place { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; color: var(--bark); }
.place b { color: var(--amber); font-weight: 400; }

/* ── masthead ── */
.masthead { max-width: 1100px; margin: 0 auto; width: 100%; padding: 2rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.mark { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.mark svg { width: 34px; height: 34px; flex: none; }
.mark span { font-size: 1.05rem; white-space: nowrap; }
.mark em { font-style: italic; color: var(--moss); }
.masthead nav { display: flex; gap: 1.6rem; font-size: 0.95rem; color: var(--bark); }
.masthead nav a { text-decoration: none; }
.masthead nav a:hover { color: var(--amber); }
.masthead nav a[aria-current="page"] { color: var(--lichen); }

/* ── hero (home and work pages) ── */
.hero { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 4rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.hero canvas, .hero .cover { width: 100%; aspect-ratio: 1; display: block; }
.hero .cover { border-radius: 50%; object-fit: cover; }
.hero .place { margin-bottom: 1.2rem; }
.hero h1 { font-weight: 400; font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.015em; margin-bottom: 0.4rem; }
.hero .sub { font-style: italic; color: var(--moss); font-size: 1.2rem; margin-bottom: 1.6rem; }
.hero .lede { color: var(--body); max-width: 28em; }
.listen {
  display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 2rem;
  padding: 0.6rem 1.2rem; border: 1px solid var(--fern); border-radius: 999px;
  text-decoration: none; font-size: 0.9rem; transition: border-color 0.3s, color 0.3s;
}
.listen:hover { border-color: var(--amber); color: var(--amber); }
.listen:has(i) { padding-left: 0.7rem; }
.listen i { width: 26px; height: 26px; border-radius: 50%; background: var(--amber); display: grid; place-items: center; }
.listen i::after { content: ""; border-left: 8px solid var(--night); border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 2px; }

/* ── contour band between sections (paths drawn by canopy.js) ── */
.contour { display: block; width: 100%; height: 90px; }
.contour path { fill: none; stroke: var(--rule); stroke-width: 1; }

/* ── sections ── */
section, .page { max-width: 720px; margin: 0 auto; padding: 4rem 1.5rem; }
h2.section { font-weight: 400; font-size: 0.95rem; color: var(--moss); margin-bottom: 2rem; display: flex; align-items: center; gap: 0.8rem; }
h2.section::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.more { margin-top: 1.6rem; font-size: 0.9rem; color: var(--bark); }
.more a { text-decoration: none; border-bottom: 1px solid var(--fern); }
.more a:hover { color: var(--amber); border-color: var(--amber); }
.empty { color: var(--bark); font-style: italic; }

/* pieces: numbered in lower roman */
.pieces { list-style: none; counter-reset: p; }
.pieces li { display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 0.2rem 0.8rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.pieces li::before { counter-increment: p; content: counter(p, lower-roman) "."; color: var(--fern); font-style: italic; }
.pieces .t { font-size: 1.15rem; }
.pieces .t small { display: block; font-size: 0.8rem; color: var(--bark); font-style: italic; }
.pieces .d { font-family: var(--mono); font-size: 0.7rem; color: var(--bark); }
.pieces li.soon .t { color: var(--bark); }
.pieces audio { grid-column: 2 / -1; width: 100%; max-width: 420px; height: 36px; margin-top: 0.4rem; }

/* works list */
.works { list-style: none; }
.works li { display: grid; grid-template-columns: 7rem 1fr; gap: 1.6rem; align-items: center; padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.works img { width: 7rem; aspect-ratio: 1; border-radius: 50%; object-fit: cover; display: block; }
.works h3 { font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.works h3 a { text-decoration: none; }
.works h3 a:hover { color: var(--amber); }
.works p { color: var(--body); font-size: 0.95rem; }
.works p.place { color: var(--bark); font-size: 0.64rem; margin-bottom: 0.2rem; }

/* field notes list */
.notes article { padding: 1.4rem 0; }
.notes article + article { border-top: 1px dashed var(--rule); }
.notes .place { margin-bottom: 0.3rem; }
.notes h3 { font-weight: 400; font-size: 1.45rem; line-height: 1.25; }
.notes h3 a { text-decoration: none; }
.notes h3 a:hover { color: var(--amber); }
.notes .summary { color: var(--body); font-size: 0.95rem; margin-top: 0.3rem; }

/* practices */
.practices { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem 2.6rem; }
.practices h4 { font-weight: 400; font-style: italic; font-size: 1.15rem; color: var(--lichen); }
.practices p { color: var(--bark); font-size: 0.9rem; }
blockquote.epigraph { margin: 3rem 0 0; padding-left: 1.2rem; border-left: 2px solid var(--amber); font-style: italic; color: var(--body); }

/* ── long-form text: notes, pages, work descriptions ── */
.page-head { margin-bottom: 2.4rem; }
.page-head .place { margin-bottom: 0.6rem; }
.page-head h1 { font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.01em; }
.page-head .sub { font-style: italic; color: var(--moss); font-size: 1.15rem; margin-top: 0.5rem; }

.prose { color: var(--body); }
.prose > * + * { margin-top: 1.2rem; }
.prose h2, .prose h3 { color: var(--lichen); font-weight: 400; line-height: 1.3; margin-top: 2.4rem; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.2rem; font-style: italic; }
.prose a { color: var(--moss); text-underline-offset: 3px; }
.prose a:hover { color: var(--amber); }
.prose strong { color: var(--lichen); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4rem; }
.prose blockquote { padding-left: 1.2rem; border-left: 2px solid var(--amber); font-style: italic; }
.prose hr { border: 0; height: 1px; background: var(--rule); margin: 2.4rem 0; }
.prose img { display: block; margin: 2rem auto; }
.prose figure figcaption { font-family: var(--mono); font-size: 0.64rem; color: var(--bark); text-align: center; margin-top: 0.6rem; }
.prose code { font-family: var(--mono); font-size: 0.85em; color: var(--lichen); background: var(--night-2); padding: 0.1em 0.35em; border-radius: 3px; }
.prose pre { background: var(--night-2); padding: 1rem 1.2rem; overflow-x: auto; border-radius: 4px; font-size: 0.8rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.prose th, .prose td { text-align: left; padding: 0.5rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--rule); }

/* previous / next */
.pager { display: flex; justify-content: space-between; gap: 2rem; margin-top: 4rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.pager a { text-decoration: none; max-width: 48%; }
.pager a:hover { color: var(--amber); }
.pager .place { display: block; margin-bottom: 0.2rem; }
.pager .next { text-align: right; margin-left: auto; }

footer.site { max-width: 1100px; width: 100%; margin: 0 auto; padding: 2rem 1.5rem 3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--bark); font-size: 0.85rem; border-top: 1px solid var(--rule); }
footer.site a { text-decoration: none; }
footer.site a:hover { color: var(--amber); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .practices { grid-template-columns: 1fr; }
  .masthead { flex-direction: column; align-items: flex-start; }
  .masthead nav { gap: 1.2rem; font-size: 0.85rem; flex-wrap: wrap; }
  .works li { grid-template-columns: 4.5rem 1fr; gap: 1rem; }
  .works img { width: 4.5rem; }
}
