/* Fracture Harmonic Recursion — field dossier (ChristCode brand) */
:root {
  --paper: #f6f1e7;
  --paper2: #efe7d6;
  --ink: #241f18;
  --ink-soft: #5b5344;
  --ink-faint: #8a8069;
  --gold: #b08428;
  --gold-pale: #e7d3a3;
  --line: #d8cdb4;
  --lane-doc: #4a6b4a;
  --lane-inf: #8a6d2f;
  --lane-hyp: #9a5b3c;
  --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 {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
/* grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background-image: radial-gradient(rgba(36,31,24,.3) 0.5px, transparent 0.5px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
  opacity: .5;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
/* masthead */
.masthead {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; }
.masthead img { height: 26px; display: block; }
.masthead .mark { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--ink-faint); text-transform: uppercase; }
/* filter bar */
.filterbar {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.filterbar .wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filterbar .lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; color: var(--ink-faint); text-transform: uppercase; margin-right: 6px; }
.fbtn {
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  padding: 6px 12px; cursor: pointer;
}
.fbtn:hover { border-color: var(--gold); }
.fbtn.active { border-color: var(--gold); color: var(--gold); background: var(--paper2); }
/* hero */
.hero { padding: 88px 0 40px; }
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: 64px; line-height: 1.05;
  letter-spacing: -.01em; margin: 18px 0 10px;
}
.hero .sub { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--ink-soft); }
.hero .lede { max-width: 640px; margin-top: 22px; font-size: 17px; }
.hero .epi { max-width: 640px; margin-top: 26px; font-size: 13.5px; color: var(--ink-soft); border-left: 2px solid var(--line); padding-left: 16px; }
/* kicker + module */
.kicker {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 14px;
}
.kicker::before {
  content: ""; display: inline-block; width: 32px; height: 1px;
  background: var(--gold); margin-right: 12px; vertical-align: middle;
}
.module { position: relative; padding: 84px 0; border-top: 1px solid var(--line); }
.module::before {
  content: attr(data-num);
  position: absolute; top: 36px; right: 0;
  font-family: var(--serif); font-size: 190px; line-height: 1;
  color: var(--gold); opacity: .08; pointer-events: none;
}
.module h2 { font-family: var(--serif); font-weight: 600; font-size: 42px; line-height: 1.1; margin-bottom: 28px; }
.module p { max-width: 700px; margin-bottom: 18px; }
.module p q, .module li q { font-family: var(--serif); font-style: italic; font-size: 17.5px; }
/* pull quote */
.pull {
  font-family: var(--serif); font-style: italic; font-size: 27px; line-height: 1.4;
  color: var(--ink); border-left: 2px solid var(--gold);
  padding: 6px 0 6px 24px; margin: 34px 0; max-width: 700px;
}
/* figures */
.fig-frame { position: relative; margin: 40px 0 12px; }
.fig-frame .tick { position: absolute; width: 14px; height: 14px; border: 0 solid var(--gold); }
.tick.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.tick.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.tick.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.tick.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }
.fig-frame img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; display: block; }
figcaption { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 10px; }
/* lane tags */
.lane-tag {
  display: inline-block; vertical-align: 2px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid; padding: 2px 7px; margin-right: 8px; white-space: nowrap;
  transition: opacity .3s ease;
}
.lane-doc { color: var(--lane-doc); border-color: var(--lane-doc); }
.lane-inf { color: var(--lane-inf); border-color: var(--lane-inf); }
.lane-hyp { color: var(--lane-hyp); border-color: var(--lane-hyp); }
.lane-tag.dim { opacity: .25; }
/* gate grid */
.gate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 40px 0 12px; }
.gate { background: var(--paper2); border: 1px solid var(--line); padding: 20px 12px; text-align: center; }
.gate b { display: block; font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--gold); line-height: 1.1; }
.gate span { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-top: 6px; }
/* step list */
.steps { max-width: 700px; margin: 24px 0; }
.steps li { list-style: none; padding: 10px 0 10px 44px; position: relative; border-bottom: 1px solid var(--line); }
.steps li::before {
  content: attr(data-step); position: absolute; left: 0; top: 10px;
  font-family: var(--serif); font-size: 22px; color: var(--gold);
}
/* octave list */
.oct { display: grid; grid-template-columns: 72px 1fr; gap: 8px; border-top: 1px solid var(--line); padding: 20px 0; }
.oct .num { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1; color: var(--gold); }
.oct h4 { font-family: var(--serif); font-weight: 600; font-size: 21px; margin-bottom: 4px; }
.oct p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.oct .note { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
/* cards (accordion) */
.card { border: 1px solid var(--line); background: var(--paper2); margin: 14px 0; }
.card-head {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 15px; color: var(--ink);
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.card-head .plus { font-family: var(--mono); color: var(--gold); font-size: 14px; }
.card-body { display: none; padding: 0 20px 20px; font-size: 14.5px; color: var(--ink-soft); }
.card-body p { margin-bottom: 12px; max-width: 660px; }
.card.open .card-body { display: block; }
/* rail */
.rail {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 100;
}
.rail a { display: block; position: relative; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink-faint); }
.rail a.active { background: var(--gold); border-color: var(--gold); }
.rail a .n {
  position: absolute; right: 16px; top: -3px; font-family: var(--mono); font-size: 9px;
  color: var(--gold); letter-spacing: .1em; opacity: 0; transition: opacity .2s;
}
.rail a.active .n { opacity: 1; }
@media (max-width: 1220px) { .rail { display: none; } }
/* cta + footer */
.cta {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); background: var(--gold-pale); border: 1px solid var(--gold);
  padding: 14px 30px; text-decoration: none; margin-top: 10px;
}
.cta:hover { background: var(--gold); color: var(--paper); }
.companions { margin-top: 30px; font-size: 14px; color: var(--ink-soft); }
.companions a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.signoff { font-family: var(--serif); font-style: italic; font-size: 24px; margin: 40px 0 8px; }
footer { border-top: 1px solid var(--line); padding: 30px 0 60px; margin-top: 60px; }
footer p { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
/* appendix */
.appendix img.photo { width: 100%; max-height: 620px; object-fit: cover; display: block; }
.openq li { list-style: none; padding: 10px 0 10px 30px; position: relative; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-soft); max-width: 700px; }
.openq li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
/* scroll reveal — hidden states gated behind html.js so no-JS never blanks content */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .module > .reveal:nth-child(2) { transition-delay: .06s; }
html.js .module > .reveal:nth-child(3) { transition-delay: .12s; }
html.js .module > .reveal:nth-child(4) { transition-delay: .18s; }
html.js .module > .reveal:nth-child(5) { transition-delay: .24s; }
html.js .module > .reveal:nth-child(6) { transition-delay: .3s; }
html.js .module > .reveal:nth-child(7) { transition-delay: .36s; }
html.js .module > .reveal:nth-child(8) { transition-delay: .42s; }
