/* ==========================================================================
   Global Spirituality · the site's own parts. Trellis tokens only: no raw
   lengths, no raw colors. Everything else is a Trellis primitive.
   Gaps in Trellis found while building these are in TRELLIS-LEDGER.md.
   ========================================================================== */

/* ---- Top bar: brand and section links over the page (ledger 1) ---------- */
.gs-bar {
  position: fixed; inset-block-start: 0; inset-inline: 0;
  z-index: var(--z-sticky);
  padding-block: var(--sp-1);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(var(--sp-1));
}
.gs-bar-row { justify-content: space-between; }
.gs-bar .cluster { --cluster-gap: var(--sp-2); }
.gs-bar a { color: var(--text-secondary); text-decoration: none; }
.gs-bar a:hover { color: var(--text); }
.gs-bar .gs-brand { color: var(--text); }
@container (width < 48rem) { .gs-bar nav { display: none; } }

/* ---- Hero: the globe behind the words (ledger 3: .cover assumes dark media) */
.gs-hero {
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  min-block-size: round(up, 100svh, var(--u));
  padding-block: calc(var(--u) * 10) var(--sp-6);
  text-align: center;
}
.gs-hero canvas { position: absolute; inset: 0; z-index: -1; inline-size: 100%; block-size: 100%; }
.gs-hero-words { justify-items: center; pointer-events: none; }
.gs-hero-words > * { opacity: var(--gs-intro, 1); }
.gs-lede { max-inline-size: calc(var(--u) * 46); margin-inline: auto; color: var(--text-secondary); }

/* ---- Labels in mono ------------------------------------------------------ */
.gs-label { font-family: var(--font-mono); }

/* ---- Sections: one cell line between them ------------------------------- */
.gs-sec { padding-block: var(--sp-8); box-shadow: inset 0 var(--line) 0 var(--border-subtle); }

/* ---- Origin: the quote card --------------------------------------------- */
.gs-quote { --card-pad: var(--sp-3); }

/* ---- Doorways: each card carries an arch in its own color --------------- */
.gs-doors { --grid-min: calc(var(--u) * 20); --grid-gap: var(--sp-2); }
.gs-door { --card-border: color-mix(in oklab, var(--seeded) 35%, var(--border-subtle)); }
.gs-arch {
  inline-size: var(--sp-2); block-size: var(--sp-3);
  border-radius: var(--r-1) var(--r-1) var(--r-q) var(--r-q);
  background: var(--seeded);
}
.gs-door-name { color: var(--seeded-ink); }
.gs-door.cc-open { --card-border: var(--border); --surface: transparent; }
.gs-door.cc-open .gs-arch { background: transparent; box-shadow: inset 0 0 0 var(--line) var(--text-tertiary); }

/* ---- Tensions: the triangle and its eight small ones -------------------- */
.gs-tri { display: block; inline-size: 100%; block-size: auto; touch-action: none; user-select: none; }
.gs-tri[data-pointer]:focus-visible { outline: none; }
.gs-tri:focus-visible { outline: var(--line) solid var(--focus); outline-offset: var(--sp-h); border-radius: var(--r-1); }
.gs-tri text { font-family: var(--font-mono); fill: var(--text-secondary); }
.gs-tri .gs-tri-edge { stroke: var(--border-strong); fill: none; }
.gs-tri .gs-tri-pull { stroke-linecap: round; }
.gs-tri .gs-tri-point { fill: var(--bg); stroke: var(--text); cursor: grab; }
.gs-reading { min-block-size: calc(var(--u) * 12); }
.gs-minis {
  display: grid; gap: var(--sp-1);
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 10), 1fr));
}
.gs-mini {
  --state-fill: var(--text);
  display: grid; grid-template-rows: auto auto; justify-items: center; align-content: start; gap: var(--sp-h);
  padding: var(--sp-1) var(--sp-h);
  border: 0; border-radius: var(--r-1);
  background: transparent; color: var(--text-secondary);
  font: inherit; font-size: var(--fs-control-xs); line-height: 1.3; text-align: center; cursor: pointer;
}
.gs-mini[aria-pressed="true"] { color: var(--text); box-shadow: inset 0 0 0 var(--line) var(--border-strong); }
.gs-mini svg { inline-size: calc(var(--u) * 7); block-size: auto; }
.gs-mini svg .gs-tri-edge { stroke: var(--border-strong); fill: none; }
.gs-mini span { display: block; }

/* ---- Ecology ------------------------------------------------------------ */
.gs-eco { display: block; inline-size: 100%; block-size: auto; }
.gs-eco path { mix-blend-mode: multiply; }
/* growing: main.js writes each line's length as --len */
.gs-eco.cc-grow path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.gs-eco.cc-grow circle { opacity: 0; }
.gs-eco.cc-grow.cc-grown path { stroke-dashoffset: 0; transition: stroke-dashoffset calc(var(--dur-out) * 21) var(--ease-out); }
.gs-eco.cc-grow.cc-grown circle { opacity: 1; transition: opacity calc(var(--dur-out) * 4) var(--ease-out) calc(var(--dur-out) * 20); }
.gs-eco text { font-family: var(--font-mono); fill: var(--text-tertiary); }

/* ---- Groups: the questions and the Holos lockup ------------------------- */
.gs-prompts { list-style: none; margin: 0; padding: 0; counter-reset: gs-p; }
.gs-prompts li { display: grid; grid-template-columns: calc(var(--u) * 7) 1fr; align-items: baseline; }
.gs-holos { --cluster-gap: var(--sp-1); text-decoration: none; color: var(--text); }
.gs-holos holos-mark { inline-size: var(--sp-4); block-size: var(--sp-4); }
.gs-holos img { block-size: var(--sp-1h); inline-size: auto; }

/* ---- Kindred: a masonry of homepages (ledger 2) ------------------------- */
.gs-masonry { columns: calc(var(--u) * 22); column-gap: var(--sp-2); margin-inline: calc(var(--outset) * var(--u) * -1); }
.gs-masonry > * { break-inside: avoid; margin-block-end: var(--sp-2); }
.gs-kin { --card-pad: 0; overflow: hidden; text-decoration: none; color: var(--text); }
.gs-kin img { display: block; inline-size: 100%; block-size: auto; transition: transform var(--dur-out) var(--ease-out); }
.gs-kin:hover img { transform: scale(1.02); }
.gs-kin .gs-kin-body { padding: var(--sp-1) var(--sp-1h) var(--sp-1h); }

/* ---- Footer ------------------------------------------------------------- */
.gs-foot { padding-block: var(--sp-4); box-shadow: inset 0 var(--line) 0 var(--border-subtle); }
.gs-foot-row { justify-content: space-between; }

/* ---- Statement pages ---------------------------------------------------- */
.gs-statement { padding-block: calc(var(--u) * 10) var(--sp-8); }
.gs-frame-note { --surface: var(--bg-sunken); }
.gs-measure { max-inline-size: var(--prose-measure); }
.gs-how { padding-block-start: var(--sp-2); }
