/* MiCyte — micyte.com
 *
 * Palette is taken from a spore print: the deposit a mushroom leaves on paper.
 * Warm brown-black substrate, spore-paper white, spore ochre, spore violet.
 * Deliberately not a neutral near-black with one bright accent — the accents
 * here are earth pigments, desaturated, and each has exactly one job:
 * ochre = place and structure, violet = the network.
 *
 * Monospace is the DISPLAY face, not a code affectation: this system's central
 * artifact is a dotted address, so the address is what gets set large. The
 * serif carries prose (a field notebook next to a machine address).
 *
 * No web fonts, no build step, no external requests — the page is self-contained.
 */

:root {
  --substrate:   #14110e;
  --raised:      #1d1915;
  --rule:        #2e2822;
  --hyphae:      #ede6d8;
  --hyphae-dim:  #9a9184;
  --ochre:       #c08a3e;
  --violet:      #9d78b4;

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 62ch;
  --gut: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--substrate);
  color: var(--hyphae);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  line-height: 1.62;
  /* Faint radial deposit, like the print itself. Sits under everything. */
  background-image: radial-gradient(60rem 40rem at 50% -10rem, #1f1a15 0%, transparent 70%);
  background-repeat: no-repeat;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ochre); color: var(--substrate);
  padding: 0.6rem 1rem; font-family: var(--sans); font-size: 0.85rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

a { color: var(--hyphae); text-decoration-color: var(--rule); text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--ochre); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }

code { font-family: var(--mono); font-size: 0.92em; }

/* ---------- top bar ---------- */
.bar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem var(--gut);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.bar__mark { text-decoration: none; color: var(--hyphae); font-weight: 700; letter-spacing: 0.14em; }
.bar__mark::before { content: "◦ "; color: var(--ochre); }
.bar__nav { display: flex; gap: clamp(0.85rem, 2.5vw, 1.75rem); }
.bar__nav a { color: var(--hyphae-dim); text-decoration: none; }
.bar__nav a:hover { color: var(--hyphae); }

/* ---------- hero: the address resolving ---------- */
.hero { padding: clamp(3.5rem, 11vh, 8rem) var(--gut) clamp(3rem, 8vh, 5.5rem); }

.eyebrow {
  margin: 0 0 1.4rem;
  font-family: var(--sans);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ochre);
}
.eyebrow--net { color: var(--violet); }

.addr {
  margin: 0;
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(1.65rem, 7.6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  word-break: break-word;
  color: var(--hyphae-dim);
}
/* Visible enough to read as ONE path, quiet enough that the segments lead.
   At rule-colour they vanish and the address reads as four separate numbers,
   which is the opposite of the point. */
.addr__dot { color: #5c5348; }

/* Each segment lights as its place resolves. Dimmed only when JS is present to
   light it again — no-JS gets the resolved state outright. */
.addr__seg { color: var(--hyphae); transition: color 520ms ease; }
.js .addr__seg { color: var(--hyphae-dim); }
.js .addr__seg.is-lit { color: var(--hyphae); }
.addr__seg.is-leaf,
.js .addr__seg.is-leaf.is-lit { color: var(--ochre); }

/* The resolved place and what it means, side by side — the hero's whole claim
   in one row. Stacked, the address left the right half of the page empty. */
.hero__resolve {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 42ch);
  gap: clamp(1.5rem, 6vw, 4rem);
  align-items: start;
  margin-top: clamp(1.75rem, 5vh, 3rem);
}

/* The indent cascade IS a hyphal branch: form and content agree. */
.branch {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: clamp(0.78rem, 1.9vw, 0.95rem);
}
.branch__row {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.28rem 0;
  transition: opacity 460ms ease, transform 460ms ease;
}
.js .branch__row { opacity: 0; transform: translateY(-0.35rem); }
.js .branch__row.is-shown { opacity: 1; transform: none; }
.branch__row[data-seg="1"] { padding-left: 1.6rem; }
.branch__row[data-seg="2"] { padding-left: 3.2rem; }
.branch__row[data-seg="3"] { padding-left: 4.8rem; }

.branch__tick {
  width: 1.15rem; height: 1px; flex: none;
  background: var(--rule);
  position: relative;
}
.branch__tick::before {
  content: ""; position: absolute; left: 0; top: -0.42rem;
  width: 1px; height: 0.42rem; background: var(--rule);
}
.branch__row[data-seg="0"] .branch__tick::before { display: none; }
.branch__label { color: var(--hyphae-dim); letter-spacing: 0.02em; }
.branch__label--leaf { color: var(--ochre); }

.hero__thesis {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  text-wrap: pretty;
  color: var(--hyphae);
}

/* ---------- bands ---------- */
.band {
  display: grid;
  grid-template-columns: minmax(0, 26rem) minmax(0, var(--measure));
  gap: clamp(1.5rem, 6vw, 5rem);
  align-items: start;
  padding: clamp(3rem, 9vh, 6rem) var(--gut);
  border-top: 1px solid var(--rule);
}
.band--net { background: var(--raised); }

.band h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  /* Without this every heading here strands its last word on its own line. */
  text-wrap: balance;
}

.prose p { margin: 0 0 1.15rem; color: #d6cfc2; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--hyphae); font-weight: 700; }

.specimen {
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--ochre);
  background: #0f0d0b;
  overflow-x: auto;
}
.specimen code { color: var(--hyphae); white-space: nowrap; }
.specimen em { color: var(--ochre); font-style: normal; }

.band--net code { color: var(--violet); }

/* ---------- actions ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--rule);
  color: var(--hyphae);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}
.btn:hover { border-color: var(--hyphae-dim); background: #191512; }
.btn--primary { background: var(--ochre); border-color: var(--ochre); color: #14110e; }
.btn--primary:hover { background: #cf9950; border-color: #cf9950; }

/* ---------- docs ---------- */
.docs { list-style: none; margin: 0; padding: 0; }
.docs li { padding: 0.95rem 0; border-bottom: 1px solid var(--rule); }
.docs li:first-child { padding-top: 0; }
.docs a {
  display: block;
  font-family: var(--mono); font-size: 0.92rem;
  text-decoration: none; color: var(--hyphae);
}
.docs a:hover { color: var(--ochre); }
.docs span { display: block; margin-top: 0.2rem; font-size: 0.92rem; color: var(--hyphae-dim); }

/* ---------- foot ---------- */
.foot {
  padding: clamp(2.5rem, 7vh, 4rem) var(--gut);
  border-top: 1px solid var(--rule);
}
.foot__lede { margin: 0 0 0.5rem; max-width: var(--measure); }
.foot__meta {
  margin: 0;
  font-family: var(--mono); font-size: 0.76rem;
  color: var(--hyphae-dim); letter-spacing: 0.02em;
}

/* ---------- narrow ---------- */
@media (max-width: 56rem) {
  .band { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .hero__resolve { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .branch__row[data-seg="1"] { padding-left: 1rem; }
  .branch__row[data-seg="2"] { padding-left: 2rem; }
  .branch__row[data-seg="3"] { padding-left: 3rem; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .js .branch__row { opacity: 1; transform: none; }
  .js .addr__seg { color: var(--hyphae); }
  .js .addr__seg.is-leaf { color: var(--ochre); }
}

/* The install line reads as an instruction, not a spec — the note sits with it
   rather than becoming another paragraph. */
.specimen__note {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--hyphae-dim);
}
