/* THE CODE, RENDERED — ChristCode field dossier (The Resonant Body pattern)
   Extra-high contrast for readability (Sean, 2026-10-25). */

:root {
  --paper: #f6f1e7;
  --paper-2: #efe7d6;
  --ink: #241f18;
  --ink-soft: #5b5344;
  --ink-faint: #8a8069;
  --gold: #b08428;
  --gold-deep: #8a6d2f;
  --gold-pale: #e7d3a3;
  --line: #d8cdb4;
  --lane-doc: #4a6b4a;
  --lane-inf: #8a6d2f;
  --lane-hyp: #9a5b3c;
  /* ChristCode epistemic-lane tokens (style-gate required names) */
  --doc: #4a6b4a;   /* documented record */
  --inf: #8a6d2f;   /* engineering inference */
  --hyp: #9a5b3c;   /* working hypothesis */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  padding-top: 5rem;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Subtle paper grain — never reduces text contrast (dots are faint). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(36, 31, 24, 0.06) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Masthead ---------- */
.masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1.5rem;
  background: rgba(246, 241, 231, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead-mark { display: block; line-height: 0; }
.masthead-mark img { width: 38px; height: 38px; border-radius: 50%; }
.masthead-text { display: flex; flex-direction: column; line-height: 1.2; }
.masthead-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.masthead-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ---------- Dot rail ---------- */
.dot-rail {
  position: fixed;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.dot-rail a {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line);
  display: block;
  position: relative;
  transition: background 0.25s ease, transform 0.25s ease;
}
.dot-rail a.active { background: var(--gold-deep); transform: scale(1.5); }
.dot-rail a span {
  position: absolute;
  right: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.dot-rail a.active span { opacity: 1; color: var(--gold-deep); }
@media (max-width: 1220px) { .dot-rail { display: none; } }

/* ---------- Hero ---------- */
.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 2;
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 600;
  line-height: 1.02;
  color: var(--ink);
  letter-spacing: 0.01em;
  max-width: 16ch;
}
.hero-sub {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 2rem 0 2.5rem;
}
.hero-cta { margin-bottom: 3rem; }
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 1rem 2rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.stat-num {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--gold-deep);
  line-height: 1;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ---------- Lane filter ---------- */
.lane-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 5rem;
  z-index: 50;
}
.lane-filter-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-right: 0.5rem;
}
.lane-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lane-btn:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.lane-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Module ---------- */
.module {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  border-bottom: 1px solid var(--line);
}
.module::before {
  content: attr(data-num);
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--serif);
  font-size: 11rem;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.1;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}
.module-kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}
.kicker-rule { flex: 0 0 3rem; height: 1px; background: var(--gold-deep); }
.kicker-text {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.module-title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  max-width: 20ch;
}

/* Figure — 21:9, gold corner ticks, mono caption */
.module-figure {
  position: relative;
  margin: 0 0 2.25rem;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
}
.module-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.module-figure::before,
.module-figure::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 2px solid var(--gold);
  z-index: 3;
}
.module-figure::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.module-figure::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.figure-caption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--paper);
  background: rgba(36, 31, 24, 0.72);
  padding: 0.35rem 0.6rem;
  z-index: 4;
  text-transform: uppercase;
}

/* Prose — 18px, near-black ink on parchment (13:1 contrast) */
.module-prose {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--ink);
  max-width: 66ch;
  position: relative;
  z-index: 2;
}
.module-prose p { margin: 0 0 1.35rem; }
.module-prose em { font-style: italic; color: var(--ink-soft); }
.module-prose strong { font-weight: 600; color: var(--ink); }

/* Lane tag — high-contrast color block, white text */
.lane-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  margin-right: 0.55rem;
  color: #fff;
  vertical-align: 0.12em;
}
.lane-doc { background: var(--lane-doc); }
.lane-inf { background: var(--lane-inf); }
.lane-hyp { background: var(--lane-hyp); }

/* Pull-quote — dark gold for contrast, serif italic */
.pull-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-style: italic;
  font-weight: 500;
  color: var(--gold-deep);
  line-height: 1.4;
  margin: 2.25rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--gold);
  max-width: 26ch;
}

/* Practice card — accordion */
.practice-card {
  margin: 2.25rem 0;
  border: 1px solid var(--line);
  background: var(--paper-2);
}
.practice-toggle {
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.practice-toggle::after { content: "+"; font-size: 1.25rem; color: var(--gold-deep); transition: transform 0.3s ease; }
.practice-toggle[aria-expanded="true"]::after { transform: rotate(45deg); }
.practice-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}
.practice-body.open { max-height: 600px; }
.practice-steps {
  list-style: none;
  padding: 0 1.5rem 1.25rem;
}
.practice-steps li {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.practice-steps li:last-child { border-bottom: none; }
.practice-steps strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-deep);
  margin-right: 0.5rem;
}
.practice-note {
  padding: 0 1.5rem 1.25rem;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* Landing signoff */
.landing-signoff {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-style: italic;
  font-weight: 500;
  color: var(--gold-deep);
  margin-top: 2rem;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 5rem 1.5rem;
  position: relative;
  z-index: 2;
}
.footer-signoff {
  font-family: var(--serif);
  font-size: 2rem;
  font-style: italic;
  font-weight: 500;
  color: var(--gold-deep);
  margin-bottom: 2rem;
}
.footer-cta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 1rem 2rem;
  text-decoration: none;
  transition: background 0.25s ease;
}
.footer-cta:hover { background: var(--gold-deep); }
.footer-note {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-top: 2.5rem;
}

/* ---------- Scroll reveal (gated behind html.js — no-JS never blanks) ----------
   Slide-up only (no opacity fade): the text is always rendered at opacity 1, so a
   headless render_qa text capture can never catch it mid-fade. The slide still
   animates in as each module enters the viewport. */
html.js .module,
html.js .hero { transform: translateY(2.5rem); transition: transform 0.6s ease; }
html.js .module.in,
html.js .hero.in { transform: none; }

/* Lane filter: hide non-matching modules */
.module.hidden { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 1.0625rem; }
  .module { padding: 3.5rem 1.25rem 3rem; }
  .module::before { font-size: 7rem; }
  .hero-stats { gap: 1.5rem; }
  .module-prose { max-width: 100%; }
  .pull-quote { max-width: 100%; }
}
