/* =========================================================================
   Humanity Systems — Master Stylesheet
   Neuron palette: warm body, cool signal. Linear/Vercel structure.
   All design tokens (colors, type, spacing) live in :root.
   To re-skin the site, edit the :root block. Nothing else should need to change.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------------------- */
:root {
  /* ---------------------------------------------------------------------
     NEURON / PARCHMENT palette — light substrate, cool signal.
     The body is paper. The signal is electric.
     Cream-leaning neutrals (parchment, ink) carry the page;
     a saturated mid-cyan accent carries every moment of signal.
     --------------------------------------------------------------------- */

  /* Substrate: cream-leaning whites and warm grays */
  --color-bg:           #f4ede0;   /* parchment, warm cream */
  --color-bg-elevated:  #ebe2cf;   /* raised surfaces — cards, header */
  --color-bg-subtle:    #ebe4d3;   /* alternating sections, very subtle */
  --color-bg-strong:    #1a1612;   /* deepest contrast — section--ink stays dark */

  --color-border:        #d8caa8;  /* hairlines, warm parchment edge */
  --color-border-strong: #b8a884;
  --color-border-bright: rgba(26, 22, 18, 0.10);

  --color-text:          #1a1612;  /* near-black ink, warm */
  --color-text-secondary:#5a544c;  /* mid-tone slate — body */
  --color-text-muted:    #8a8275;  /* captions, meta */

  /* Signal: saturated mid-cyan — drops in brightness so it punches against light */
  --color-accent:        #1f7a9b;  /* deepened from #8ce0ff for light substrate */
  --color-accent-bright: #1a6b89;  /* hover/focus — slightly deeper */
  --color-accent-subtle: rgba(31, 122, 155, 0.08);
  --color-accent-glow:   rgba(31, 122, 155, 0.14);

  /* ---- Legacy aliases ----
     Editorial-era token names mapped to the parchment system so existing
     markup keeps working without a rewrite. Do not use these in new code. */
  --color-bg-warm:        var(--color-bg-subtle);
  --color-ink:            var(--color-text);
  --color-ink-soft:       var(--color-text-secondary);
  --color-ink-muted:      var(--color-text-muted);
  --color-rule:           var(--color-border);
  --color-accent-warm:    var(--color-accent);
  --color-accent-deep:    var(--color-bg-strong);

  /* Typography */
  --font-display: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', 'JetBrains Mono', 'SF Mono', 'Courier New', monospace;

  /* Type scale */
  --size-display: clamp(2.75rem, 6vw, 5.5rem);
  --size-h1:      clamp(2.125rem, 4vw, 3.5rem);
  --size-h2:      clamp(1.625rem, 2.8vw, 2.25rem);
  --size-h3:      clamp(1.1875rem, 1.6vw, 1.375rem);
  --size-lead:    clamp(1.0625rem, 1.4vw, 1.1875rem);
  --size-body:    1rem;
  --size-small:   0.875rem;
  --size-caption: 0.75rem;

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.75rem;
  --space-lg:  3.5rem;
  --space-xl:  5.5rem;
  --space-2xl: 8rem;

  /* Layout */
  --measure-narrow: 38rem;
  --measure-wide:   72rem;
  --measure-broad:  88rem;

  /* Effects */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px var(--color-accent-glow);
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--color-bg);
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "ss01", "cv11";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

/* Selection — accent on dark */
::selection { background: var(--color-accent); color: var(--color-bg); }

/* -------------------------------------------------------------------------
   3. TYPOGRAPHY
   ------------------------------------------------------------------------- */
.display, .display * {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

h1 { font-size: var(--size-h1); line-height: 1.05; letter-spacing: -0.04em; }
h2 { font-size: var(--size-h2); line-height: 1.1;  letter-spacing: -0.03em; }
h3 { font-size: var(--size-h3); line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; }
h4 { letter-spacing: -0.01em; font-weight: 600; }

p { margin: 0 0 1.1em; }
em { font-style: normal; color: var(--color-accent); }   /* Replace italics with accent color */

.lead {
  font-family: var(--font-body);
  font-size: var(--size-lead);
  line-height: 1.55;
  color: var(--color-text-secondary);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
  margin: 0 0 var(--space-md);
}

.eyebrow--accent { color: var(--color-accent); }

.caption {
  font-size: var(--size-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

blockquote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--size-h3);
  line-height: 1.4;
  margin: var(--space-md) 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-accent);
  color: var(--color-text);
  letter-spacing: -0.015em;
}

blockquote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--size-small);
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

/* Pull quote — large, declarative typography for the home page bridge moment.
   Used in section--snug between thesis preview and product. */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--color-text);
  max-width: 48ch;
  margin: 0 auto;
  text-align: center;
  text-wrap: balance;
}

/* The example block beneath a pull quote. Quieter, narrower, italicized —
   a felt-true moment that grounds the abstract claim above. The blockquote
   inside picks up the global blockquote rule (cyan left rule, display font). */
.pull-quote__example {
  margin: var(--space-lg) auto 0;
  max-width: 38rem;
}

.pull-quote__example blockquote {
  font-family: var(--font-body);
  font-size: var(--size-lead);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--color-text-secondary);
}

.pull-quote__example blockquote p {
  margin: 0 0 0.8em;
}
.pull-quote__example blockquote p:last-child { margin-bottom: 0; }

/* The two dialogue lines — the messages the couple sent each other.
   Slightly dimmer, kept italic (inherits from the blockquote rule), unchanged weight.
   Reads as transcript. */
.pull-quote__example-line {
  color: var(--color-text-secondary);
}

/* The closing gloss — the authorial line that names what was missed.
   Roman (not italic), slightly heavier, in primary text color, with a small
   visual gap above to separate it from the transcript above. */
.pull-quote__example-gloss {
  font-style: normal;
  color: var(--color-text);
  margin-top: 1.2em !important;
}

/* Drop cap — disabled in tech aesthetic, just a neutral first paragraph */
.dropcap::first-letter {
  font-family: inherit;
  font-size: inherit;
  float: none;
  padding: 0;
  font-weight: inherit;
  letter-spacing: inherit;
  color: inherit;
}

/* Inline mono accents */
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.4em;
  color: var(--color-text);
}

/* -------------------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------------------- */
.wrap {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.wrap--narrow { max-width: var(--measure-narrow); }
.wrap--broad  { max-width: var(--measure-broad); }

.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section--snug { padding: var(--space-xl) 0; }

/* When a snug section directly follows the hero, the two stacked large gaps
   create dead space (hero bottom-padding + section top-padding). Pull them
   together so the post-hero beat feels like a continuation rather than a
   separate section. */
.hero + .section--snug {
  padding-top: var(--space-md);
}
.hero:has(+ .section--snug) {
  padding-bottom: var(--space-md);
}

/* "Warm" alternating sections — in dark mode these are subtler-not-warmer */
.section--warm {
  background: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* "Ink" feature block — was darkest-on-light; now becomes accent-bordered raised surface */
.section--ink {
  background:
    radial-gradient(ellipse at top, rgba(140, 224, 255, 0.10) 0%, transparent 60%),
    var(--color-bg-strong);
  color: #f0ebe2;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.section--ink::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--color-bg-strong) 100%);
  pointer-events: none;
  opacity: 0.4;
}
.section--ink > * { position: relative; z-index: 1; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #f0ebe2; }
.section--ink p { color: #b8b0a4; }
.section--ink .lead { color: #c8c0b4; }
.section--ink .eyebrow { color: #8ce0ff; }
.section--ink strong { color: #f0ebe2; }
.section--ink a { color: #8ce0ff; border-bottom-color: rgba(140, 224, 255, 0.3); }

.divider {
  width: 32px;
  height: 1px;
  background: var(--color-accent);
  margin: 0 0 var(--space-md);
  border: 0;
}

.divider--center { margin-left: auto; margin-right: auto; }

/* -------------------------------------------------------------------------
   5. HEADER
   ------------------------------------------------------------------------- */
.site-header {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(244, 237, 224, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  z-index: 50;
}

.site-header__inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.55em;
  line-height: 1;
}

.brand__mark {
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  display: inline-block;
  border-radius: 1px;
  align-self: center;
  box-shadow: 0 0 12px var(--color-accent-glow);
}

.brand__tm {
  font-size: 0.5em;
  vertical-align: super;
  margin-left: 0.15em;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--color-text-muted);
}
.brand__tm--footer { color: rgba(26, 22, 18, 0.4); }

.nav { display: flex; gap: 1.75rem; align-items: center; }

.nav a {
  font-size: var(--size-small);
  letter-spacing: -0.005em;
  color: var(--color-text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav a:hover { color: var(--color-text); }

.nav a.is-active {
  color: var(--color-text);
}

@media (max-width: 720px) {
  .nav { gap: 1rem; }
  .nav a:not(.nav__cta) { display: none; }
}

.nav__cta {
  padding: 0.5em 1em;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-size: var(--size-small);
  color: var(--color-text);
  transition: all var(--transition);
  background: var(--color-bg-elevated);
}
.nav__cta:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* -------------------------------------------------------------------------
   6. HERO
   ------------------------------------------------------------------------- */
.hero {
  padding: var(--space-xl) 0 var(--space-md);
  position: relative;
  overflow: hidden;
}

/* Ambient glow behind hero content — Linear/Vercel signature */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse at center, var(--color-accent-subtle) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  max-width: var(--measure-broad);
  margin: 0 auto;
  padding: 0 var(--space-md);
  position: relative;
  z-index: 1;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--size-display);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 var(--space-md);
  max-width: 22ch;
  color: var(--color-text);
  /* Balance line lengths automatically; falls back gracefully where unsupported */
  text-wrap: balance;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent-bright) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.hero__lead {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: var(--size-lead);
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 50ch;
  margin: var(--space-sm) 0 var(--space-md);
  letter-spacing: -0.005em;
}

.hero__lead p { margin: 0 0 0.55em; }
.hero__lead p:last-child { margin-bottom: 0; color: var(--color-text); }

.hero__meta {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: var(--size-small);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.hero__meta strong { color: var(--color-text); font-weight: 500; }

.hero__creed {
  margin-top: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.hero__creed-rule {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--color-accent);
  flex-shrink: 0;
}
.hero__creed-text {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.hero__creed-text > span:not(:last-child)::after {
  content: '·';
  color: var(--color-text-muted);
  margin-left: var(--space-md);
}

/* -------------------------------------------------------------------------
   7. PAGE HEADER (interior pages)
   ------------------------------------------------------------------------- */
.page-header {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--color-accent-subtle) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.page-header > * { position: relative; z-index: 1; }

.page-header__title {
  font-family: var(--font-display);
  font-size: var(--size-h1);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 var(--space-md);
  max-width: 30ch;
  color: var(--color-text);
  /* Balance line lengths automatically; falls back gracefully where unsupported */
  text-wrap: balance;
}

.page-header__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent-bright) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.page-header__lead {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: var(--size-lead);
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: 56ch;
  letter-spacing: -0.005em;
}

/* -------------------------------------------------------------------------
   8. PROSE
   ------------------------------------------------------------------------- */
.prose {
  max-width: var(--measure-narrow);
  font-size: var(--size-body);
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.prose p { margin: 0 0 1.4em; }
.prose p:last-child { margin-bottom: 0; }

.prose h2 {
  margin: 2.2em 0 0.6em;
  color: var(--color-text);
}

.prose h3 {
  margin: 1.8em 0 0.5em;
  color: var(--color-text);
}

.prose strong { color: var(--color-text); font-weight: 600; }

.prose a {
  color: var(--color-accent-bright);
  border-bottom: 1px solid var(--color-border-strong);
  transition: border-color var(--transition);
}
.prose a:hover { border-color: var(--color-accent); }

/* -------------------------------------------------------------------------
   9. TWO-COLUMN
   ------------------------------------------------------------------------- */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 800px) {
  .cols-2 { grid-template-columns: 1fr; gap: var(--space-md); }
}

.cols-2__label {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-top: 0.5em;
  position: sticky;
  top: 5rem;
}

/* -------------------------------------------------------------------------
   10. NUMBERED LIST / FACT ROWS
   ------------------------------------------------------------------------- */
.numbered-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: nlist;
}

.numbered-list > li {
  counter-increment: nlist;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: var(--space-md);
  align-items: start;
  transition: background var(--transition);
}

/* Keep all real content (h3, p, ul, etc.) in the wide right column.
   The ::before pseudo (the number) takes column 1; everything else stacks in column 2. */
.numbered-list > li > * {
  grid-column: 2;
}

.numbered-list > li:last-child { border-bottom: 1px solid var(--color-border); }

.numbered-list > li::before {
  content: counter(nlist, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--size-small);
  color: var(--color-accent);
  letter-spacing: 0.05em;
  padding-top: 0.3em;
  font-weight: 500;
}

.numbered-list h3 {
  font-style: normal;
  font-size: var(--size-h3);
  margin: 0 0 0.4em;
  color: var(--color-text);
}

.numbered-list p {
  font-size: var(--size-body);
  color: var(--color-text-secondary);
  margin: 0;
}

@media (max-width: 600px) {
  .numbered-list > li {
    grid-template-columns: 3rem 1fr;
    gap: var(--space-sm);
  }
}

/* -------------------------------------------------------------------------
   10b. SECTION NAV — in-page wayfinding for long pages
   ------------------------------------------------------------------------- */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
  /* Subtle backdrop in case future pages use a transparent header above this strip */
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
}

.section-nav__label {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem;
}

.section-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.section-nav__list a {
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.section-nav__list a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* Give anchored sections breathing room beneath the sticky nav strip */
.section[id] {
  scroll-margin-top: 6rem;
}

@media (max-width: 600px) {
  .section-nav { padding: var(--space-xs) 0; }
  .section-nav__list { gap: 0.3rem 0.9rem; }
  .section-nav__list a { font-size: var(--size-caption); }
}

/* -------------------------------------------------------------------------
   11. PRINCIPLES
   ------------------------------------------------------------------------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: var(--space-lg) 0;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 800px) {
  .principles { grid-template-columns: 1fr; }
}

.principle {
  background: var(--color-bg-elevated);
  padding: var(--space-md);
  position: relative;
  transition: background var(--transition);
}
.principle:hover { background: var(--color-bg-subtle); }

.principle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}

.principle__name {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  line-height: 1.15;
  margin: var(--space-sm) 0 var(--space-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.principle__body {
  font-size: var(--size-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* -------------------------------------------------------------------------
   12. ARCHITECTURE GRID
   ------------------------------------------------------------------------- */
.arch {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: var(--space-lg) 0;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.arch__col {
  padding: var(--space-md) var(--space-sm);
  background: var(--color-bg-elevated);
  position: relative;
  transition: background var(--transition);
}
.arch__col:hover { background: var(--color-bg-subtle); }

.arch__num {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.arch__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.arch__desc {
  font-size: var(--size-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 800px) {
  .arch { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   12b. SYSTEM FLOW DIAGRAM
   ------------------------------------------------------------------------- */
.sysflow {
  background: var(--color-bg-strong);
  color: var(--color-text);
  padding: var(--space-2xl) 0 var(--space-xl);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.sysflow::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--color-accent-subtle) 0%, transparent 65%);
  pointer-events: none;
}
.sysflow > * { position: relative; }

.sysflow__head {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.sysflow__head .eyebrow {
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.sysflow__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700;
  color: #f0ebe2;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0;
}

.sysflow__diagram {
  width: 100%;
  margin: var(--space-md) 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.sysflow__diagram svg {
  width: 100%;
  height: auto;
  min-width: 980px;
  display: block;
}

.sysflow__legend {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d8caa8;
}

.sysflow__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.sysflow__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

@media (max-width: 720px) {
  .sysflow { padding: var(--space-xl) 0; }
  .sysflow__diagram::after {
    content: '← scroll →';
    display: block;
    text-align: center;
    font-size: var(--size-caption);
    letter-spacing: 0.15em;
    color: #b8a884;
    margin-top: var(--space-sm);
  }
}

/* -------------------------------------------------------------------------
   13. VALUE FLOW (governance page)
   ------------------------------------------------------------------------- */
.value-flow__head { text-align: center; margin-bottom: var(--space-lg); }
.value-flow__title {
  font-family: var(--font-display);
  font-size: var(--size-h2);
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 auto var(--space-md);
  max-width: 24ch;
  line-height: 1.1;
}
.value-flow__sub {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Structural ordering of the four parties — replaces the percentage chart.
   Models the fact-row visual pattern: mono caps label, name, descriptive note. */
.value-flow__order {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) auto 0;
  max-width: 56rem;
  border-top: 1px solid var(--color-border);
}
.value-flow__order > li {
  display: grid;
  grid-template-columns: 11rem 14rem 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}
.value-flow__order-label {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.value-flow__order-name {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text);
  line-height: 1.2;
}
.value-flow__order-note {
  font-size: var(--size-body);
  color: var(--color-text-secondary);
  line-height: 1.5;
}
@media (max-width: 700px) {
  .value-flow__order > li {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* -------------------------------------------------------------------------
   14. FACT ROWS (compact data presentation)
   ------------------------------------------------------------------------- */
.fact-row {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}
.fact-row:last-child { border-bottom: 0; }
.fact-row__label {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.fact-row__value {
  font-size: var(--size-body);
  color: var(--color-text);
  margin: 0;
}
@media (max-width: 600px) {
  .fact-row { grid-template-columns: 1fr; gap: var(--space-xs); }
}

/* -------------------------------------------------------------------------
   15. BUTTONS / LINKS
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.25em;
  font-family: var(--font-body);
  font-size: var(--size-small);
  letter-spacing: -0.005em;
  text-transform: none;
  font-weight: 500;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: pointer;
  background: var(--color-bg-elevated);
  color: var(--color-text);
}
.btn:hover {
  border-color: var(--color-text-secondary);
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}
.btn--primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn--ghost:hover {
  background: var(--color-bg-elevated);
  border-color: var(--color-text-secondary);
  color: var(--color-text);
}

.btn--on-dark {
  background: transparent;
  color: #f0ebe2;
  border-color: rgba(240, 235, 226, 0.20);
}
.btn--on-dark:hover {
  background: #f0ebe2;
  color: #1a1612;
  border-color: #f0ebe2;
}

.btn-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--color-accent-bright);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: all var(--transition);
}

.link-arrow:hover {
  color: var(--color-accent-bright);
  border-bottom-color: var(--color-accent);
}

.link-arrow::after {
  content: '→';
  display: inline-block;
  transition: transform var(--transition);
}
.link-arrow:hover::after { transform: translateX(2px); }

/* -------------------------------------------------------------------------
   16. CODE BLOCKS
   ------------------------------------------------------------------------- */
pre {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  font-family: var(--font-mono);
  font-size: var(--size-small);
  line-height: 1.6;
  color: var(--color-text);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* -------------------------------------------------------------------------
   17. ANIMATIONS
   ------------------------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeIn 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in.delay-1 { animation-delay: 80ms; }
.fade-in.delay-2 { animation-delay: 180ms; }
.fade-in.delay-3 { animation-delay: 280ms; }
.fade-in.delay-4 { animation-delay: 380ms; }
.fade-in.delay-5 { animation-delay: 480ms; }

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* -------------------------------------------------------------------------
   18. WRITING / ITEM LISTS
   ------------------------------------------------------------------------- */
.writing-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: var(--space-md);
  align-items: baseline;
  transition: background var(--transition);
}
.writing-item:last-child { border-bottom: 0; }

.writing-item__date {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.writing-item__title {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
  color: var(--color-text);
}

.writing-item__excerpt {
  color: var(--color-text-secondary);
  margin: 0 0 0.75em;
  line-height: 1.55;
}

.writing-item__cta {
  font-size: var(--size-small);
  color: var(--color-accent-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.writing-item__cta::after { content: '→'; transition: transform var(--transition); }
.writing-item__cta:hover::after { transform: translateX(2px); }

@media (max-width: 700px) {
  .writing-item { grid-template-columns: 1fr; gap: var(--space-xs); }
}

/* -------------------------------------------------------------------------
   19. CARDS (general purpose)
   ------------------------------------------------------------------------- */
.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}

/* -------------------------------------------------------------------------
   20. FOOTER
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-bg);
  color: var(--color-text);
  padding: var(--space-xl) 0 var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.site-footer__inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.site-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (max-width: 800px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
}
@media (max-width: 500px) {
  .site-footer__top { grid-template-columns: 1fr; }
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}

.site-footer__creed {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0;
}

.site-footer h4 {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
  margin: 0 0 var(--space-sm);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
}

.site-footer a {
  color: var(--color-text-secondary);
  font-size: var(--size-small);
  transition: color var(--transition);
}
.site-footer a:hover { color: var(--color-text); }

.site-footer__trademarks {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  font-size: var(--size-caption);
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* -------------------------------------------------------------------------
   21. PAGE-SPECIFIC: PUBLIC DOMAIN DEDICATION
   ------------------------------------------------------------------------- */
.dedication-seals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin: var(--space-md) 0;
}
.seal {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  padding: 0.5em 0.85em;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg-elevated);
}

.dedication-date {
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

.permissions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.permissions-list li {
  padding: 0.85em 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--size-body);
  color: var(--color-text-secondary);
  position: relative;
  padding-left: 1.6em;
  line-height: 1.5;
}
.permissions-list li:last-child { border-bottom: 0; }
.permissions-list li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-weight: 500;
}

.attribution-block {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-left: 2px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  font-family: var(--font-mono);
  font-size: var(--size-small);
  line-height: 1.7;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.prose.warranty p {
  font-family: var(--font-mono);
  font-size: var(--size-small);
  line-height: 1.75;
  color: var(--color-text-secondary);
}
.prose.warranty strong {
  color: var(--color-text);
  font-weight: 500;
}

/* -------------------------------------------------------------------------
   22. NERVOUS SYSTEM VISUALIZATIONS
   Three SVG visualizations animating the "nervous system for AI" metaphor.
   All animation is done with SMIL <animate> and <animateMotion> inside the
   SVG markup itself — the most cross-browser-reliable way to animate SVG
   coordinates. The CSS here only handles layout and reduced-motion.
   ------------------------------------------------------------------------- */

/* Bright accent for active-conduction moments only.
   Static UI continues to use --color-accent (the deep cyan).
   This bright variant is restricted to traveling pulses. */
:root {
  --color-signal-bright: #4cb8d8;
}

/* Wraps the visualization SVG plus its caption row. Used by all three. */
.conduction-line,
.reflex-arc,
.tract-bundle {
  margin: var(--space-md) 0;
}

.conduction-line__caption {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Respect reduced-motion: SMIL animations don't honor prefers-reduced-motion
   automatically. We previously set display:none on .nerve-pulse here, but
   that was too aggressive — some browsers report reduce=true under conditions
   like Low Power Mode, hiding the pulses entirely. The animations are small
   and unlikely to trigger vestibular issues; leaving them on for everyone. */
