/* Directed Growth Systems.
   A shrine assembled from fragments: the loudness lives in the pictures, the
   text column stays a quiet place to read. Night first, violet, lilac-white
   glow. The taste is dgs/visual.md (rewritten 2026-10-19 around parafaith);
   web/design_rules.json is the machine copy and fails the build on a
   gradient outside .ambient, glow on body text, motion that reduced-motion
   does not cancel, a fifth family, a radius or an emoji.

   Every colour in this file lives in the generated block below. Everywhere
   else says var(--name), which is what stops a third colour entering without
   first entering web/design_tokens.json where it would need bounds. */

/* TOKENS:BEGIN v2 week 0 - generated by web/design.py from web/design_tokens.json.
   Do not edit by hand. `python3.11 web/design.py render` rewrites it,
   and `check` fails the build if it is stale. */
:root {
  --paper: #0d0b14;
  --ink: #ece8f4;
  --quiet: #9c96ad;
  --accent: #7b5ce6;
  --glow: #e6dcff;
  --rule: rgba(236, 232, 244, 0.16);
  --rule-faint: rgba(236, 232, 244, 0.08);
  --fill: rgba(236, 232, 244, 0.05);
  --accent-soft: rgba(123, 92, 230, 0.42);
  --glow-soft: rgba(230, 220, 255, 0.55);

  --body-size: 19px;
  --body-leading: 1.58;
  --lead-size: 1.25rem;
  --label-size: 0.6875rem;
  --label-tracking: 0.14em;
  --wordmark-tracking: 0.2em;
  --display-tracking: -0.015em;
  --quatrain-leading: 1.07;
  --measure: 34rem;
  --side: 8rem;
  --gap: 2.5rem;
  --break: 14rem;
  --shell: 68rem;
  --section-gap: 3.4rem;
  --inset-width: 16rem;
  --inset-out: 8rem;
  --tone: 0.35;
  --tone-contrast: 1.08;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --paper: #f2eef6;
    --ink: #16141c;
    --quiet: #5e5a68;
    --accent: #5a3fc4;
    --glow: #7b5ce6;
    --rule: rgba(22, 20, 28, 0.16);
    --rule-faint: rgba(22, 20, 28, 0.08);
    --fill: rgba(22, 20, 28, 0.05);
    --accent-soft: rgba(90, 63, 196, 0.42);
    --glow-soft: rgba(123, 92, 230, 0.55);
  }
}

:root[data-theme="light"] {
  --paper: #f2eef6;
  --ink: #16141c;
  --quiet: #5e5a68;
  --accent: #5a3fc4;
  --glow: #7b5ce6;
  --rule: rgba(22, 20, 28, 0.16);
  --rule-faint: rgba(22, 20, 28, 0.08);
  --fill: rgba(22, 20, 28, 0.05);
  --accent-soft: rgba(90, 63, 196, 0.42);
  --glow-soft: rgba(123, 92, 230, 0.55);
}
/* TOKENS:END */

@font-face {
  font-family: "Ortica Angular";
  src: url("/fonts/orticaangular-bold-latin.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Ortica Linear";
  src: url("/fonts/orticalinear-light-latin.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-var-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-italic-var-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Grenze Gotisch";
  src: url("/fonts/grenzegotisch-var-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/pixelifysans-var-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --display: "Ortica Linear", Georgia, serif;
  --angular: "Ortica Angular", Georgia, serif;
  --text: "Source Serif 4", Georgia, serif;
  --gothic: "Grenze Gotisch", Georgia, serif;
  --pixel: "Pixelify Sans", monospace;
  --micro: 0.8125rem;
  /* Not a colour, so it lives here and not in the token block: a found
     photograph (the fallback figure) is dimmed on the night ground. */
  --tone-brightness: 0.78;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --tone-brightness: 1; }
}
:root[data-theme="light"] { --tone-brightness: 1; }

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-color: var(--accent);
  text-underline-offset: 0.18em; }
a:hover { color: var(--glow); }
img { display: block; width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; margin: 0;
  letter-spacing: var(--display-tracking); }

.skip-link {
  position: absolute; left: 0.75rem; top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 0.9rem; font-size: var(--micro); z-index: 100;
}
.skip-link:focus { top: 0.4rem; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }

/* ---- the strip: the sigil, then the nav at reading size ---------------- */

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.6rem;
  padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--rule);
}
/* The wordmark is a sigil: blackletter, lit from behind. Never below 32 px
   (the canon's floor for Grenze Gotisch); the mark is Jack's, 2026-10-12. */
.brand {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--gothic); font-weight: 500; font-size: 2rem;
  line-height: 1.1; letter-spacing: 0; text-transform: none;
  color: var(--glow); text-decoration: none; margin-right: 0.6rem;
}
.brand:hover { color: var(--glow); }
.sigil { text-shadow: 0 0 0.45em var(--glow-soft), 0 0 1.4em var(--accent-soft); }
.brand-mark { height: 1.1em; width: auto; flex: none;
  fill: none; stroke: currentColor; stroke-width: 26.12;
  stroke-linecap: round; stroke-miterlimit: 10;
  filter: drop-shadow(0 0 0.35em var(--glow-soft)); }
.site-nav ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.site-nav a { font-family: var(--display); font-size: 1.05rem;
  color: var(--quiet); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

/* ---- quiet: the front page --------------------------------------------- */

/* One collage, one line, three ways in. The ambient glow is the page's one
   gradient: it breathes behind the picture (12 s, opacity only) and stands
   still when the viewer asks for less motion. */
.one { position: relative; overflow: hidden;
  padding: 2.2rem 0.75rem 0; border-bottom: 1px solid var(--rule); }
.ambient {
  position: absolute; left: -12%; right: -12%; top: 0; bottom: 0;
  background: radial-gradient(ellipse closest-side at 50% 46%, var(--accent-soft), transparent);
  opacity: 0.8; pointer-events: none; z-index: 0;
  animation: breathe 12s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.95; }
}
.one .plate, .one figcaption { position: relative; z-index: 1; }
.plate { max-width: 52rem; margin: 0 auto; }
.plate a { display: block; }
.plate img { height: auto; max-height: 72vh; object-fit: cover; }
.one figcaption { max-width: 52rem; margin: 0 auto; padding: 0.7rem 0 1rem;
  font-size: var(--micro); color: var(--quiet); }
.fig { font-family: var(--pixel); font-size: var(--micro); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--quiet); margin-right: 0.8rem; }
/* The invitation line: Source Serif 4 italic, lowercase, glowing. */
.invite { font-family: var(--text); font-style: italic; font-weight: 400;
  text-transform: lowercase; font-size: 1.35rem; line-height: 1.3;
  color: var(--glow);
  text-shadow: 0 0 0.6em var(--glow-soft), 0 0 1.6em var(--accent-soft); }

.shot { position: relative; display: block; }
.shot img { filter: grayscale(1) contrast(var(--tone-contrast))
  brightness(var(--tone-brightness)); height: 54vh; min-height: 17rem;
  object-fit: cover; object-position: 50% 22%; }
.shot::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  mix-blend-mode: color; opacity: var(--tone); pointer-events: none;
}

.calm { padding: 3rem 0.75rem 2.4rem; max-width: 36rem; }
.calm h1 { font-family: var(--gothic); font-weight: 500;
  font-size: clamp(2.6rem, 7.5vw, 4.6rem); line-height: 1.02;
  margin: 0 0 1.1rem; letter-spacing: 0; color: var(--glow);
  text-shadow: 0 0 0.5em var(--glow-soft), 0 0 1.5em var(--accent-soft); }
.calm p { color: var(--quiet); max-width: 28rem; }

.ways { border-top: 1px solid var(--rule); }
.way {
  display: grid; grid-template-columns: 1fr auto; gap: 0 1.5rem;
  align-items: baseline; padding: 1.5rem 0.75rem;
  border-bottom: 1px solid var(--rule); text-decoration: none;
}
.way .n { font-family: var(--display); font-weight: 300; font-size: 1.9rem;
  line-height: 1.1; }
.way .c { font-family: var(--angular); font-size: var(--micro); color: var(--quiet);
  text-align: right; white-space: nowrap; }
.way .u { grid-column: 1; font-size: var(--micro); color: var(--quiet);
  margin-top: 0.25rem; max-width: 30rem; }
.way:hover .n { color: var(--glow); }
.way[aria-disabled] .n { color: var(--quiet); }

/* ---- density: the index pages ------------------------------------------- */

.index-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: 1.1rem 0.75rem 0.5rem;
  font-size: var(--micro); color: var(--quiet);
}
.index-head b { font-weight: 400; color: var(--ink); }
.index-head h1 { font-size: inherit; font-family: var(--text); font-weight: 400;
  color: var(--ink); letter-spacing: 0; display: inline; }

.corpus { columns: 2; column-gap: 0; border-bottom: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: 3.4rem 1fr; gap: 0 0.7rem;
  align-items: baseline; padding: 0.3rem 0.75rem;
  border-top: 1px solid var(--rule-faint); text-decoration: none;
  break-inside: avoid;
}
.row .d { font-family: var(--angular); font-size: 0.75rem; color: var(--quiet);
  white-space: nowrap; }
.row .t { font-size: 1rem; line-height: 1.25; }
.row .s { display: none; }
.row:hover { background: var(--fill); }
.row:hover .t { color: var(--glow); }

.terms {
  padding: 0.6rem 0.75rem 1.2rem; border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 0.1rem 0.9rem;
}
.term { font-family: var(--display); font-weight: 300; font-size: 1.22rem;
  line-height: 1.3; text-decoration: none; color: var(--ink); }
.term:hover { color: var(--glow); }

.pager-nav { display: flex; gap: 1.2rem; padding: 0.9rem 0.75rem;
  font-size: var(--micro); border-bottom: 1px solid var(--rule); }

/* ---- a piece: the column is unchanged in measure and stillness ---------- */

.piece { padding: 2.6rem 0.75rem 3rem; max-width: var(--measure); }
.piece h1 { font-family: var(--gothic); font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.08; letter-spacing: 0;
  margin-bottom: 0.8rem; color: var(--glow);
  text-shadow: 0 0 0.5em var(--glow-soft), 0 0 1.5em var(--accent-soft); }
.piece h2 { font-size: 1.4rem; line-height: 1.25; margin: 2rem 0 0.6rem;
  clear: both; }
.piece h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }
.dateline { color: var(--quiet); font-size: var(--micro); margin-bottom: 1.8rem; }
.piece blockquote { margin: 1.6rem 0; padding-left: 1rem;
  border-left: 1px solid var(--accent); font-style: italic; color: var(--quiet); }
.piece hr { clear: both; border: 0; border-top: 1px solid var(--rule);
  margin: 2.4rem 0; }
.piece ul, .piece ol { padding-left: 1.2rem; }

.lexicon { margin: -0.6rem 0 1.6rem; padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule); font-size: var(--micro);
  color: var(--quiet); }

.apparatus { padding: 0 0.75rem 2.4rem; max-width: var(--measure);
  font-size: var(--micro); color: var(--quiet); }
.apparatus b { font-weight: 400; color: var(--ink); }
.apparatus p { margin: 0 0 0.5em; }

.pager { display: flex; justify-content: space-between; gap: 2rem;
  border-top: 1px solid var(--ink); margin: 0 0.75rem; padding: 0.6rem 0 2.5rem; }
.pager a { text-decoration: none; max-width: 48%; }
.pager .lbl { display: block; font-size: var(--micro); color: var(--quiet); }
.pager .t { font-family: var(--display); font-size: 1.05rem; }
.pager a:hover .t { color: var(--glow); }

/* ---- colophon ------------------------------------------------------------ */

.site-footer {
  padding: 1.6rem 0.75rem 3rem; font-size: var(--micro); color: var(--quiet);
  border-top: 1px solid var(--ink); max-width: 42rem;
}
.site-footer p { margin: 0 0 0.7em; }

@media (min-width: 62rem) {
  .corpus { columns: 3; }
  .row .s { display: block; grid-column: 2; font-size: 0.75rem;
    color: var(--quiet); line-height: 1.25; margin-top: 0.05rem; }
}
@media (max-width: 40rem) {
  .corpus { columns: 1; }
  .shot img { height: 42vh; }
  .plate img { max-height: 60vh; }
}

/* Invariant 3: nothing moves when the viewer asks for less. */
@media (prefers-reduced-motion: reduce) {
  .ambient { animation: none; opacity: 0.7; }
}
