/* Belief Loop Mapping — ChristCode field dossier system */
:root {
  --paper: #f6f1e7;
  --paper-2: #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", -apple-system, sans-serif;
  --mono: "JetBrains Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold-pale); color: var(--ink); }

/* grain */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background-image: radial-gradient(rgba(36,31,24,.55) .5px, transparent .5px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
  opacity: .5;
}

/* masthead */
.masthead {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(246,241,231,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.masthead-brand img { height: 26px; display: block; }
.masthead-side { display: flex; align-items: center; gap: 16px; }
.masthead-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  color: var(--ink-soft); white-space: nowrap;
}
@media (max-width: 680px) { .masthead-tag { display: none; } }
.btn-ghost {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 0;
  padding: 7px 14px; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* modules */
.module { position: relative; padding: 110px 0 90px; border-bottom: 1px solid var(--line); }
.module:nth-child(even) { background: var(--paper-2); }
.module::before {
  content: attr(data-num);
  position: absolute; top: 24px; right: 20px;
  font-family: var(--serif); font-size: clamp(90px, 14vw, 170px);
  color: var(--gold); opacity: .08; line-height: 1;
  pointer-events: none; user-select: none;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }

.kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.kicker-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .26em;
  color: var(--gold); white-space: nowrap;
}
.kicker-rule { flex: 1; height: 1px; background: var(--line); }

h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 6.4vw, 68px); line-height: 1.08;
  margin: 0 0 28px; letter-spacing: -.01em;
}
h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12;
  margin: 0 0 24px; letter-spacing: -.01em;
}
p { margin: 0 0 20px; }
.lead { font-size: 20px; color: var(--ink-soft); }
a { color: var(--ink); }
a.ext-link { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
kbd {
  font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px;
  background: var(--paper);
}

/* figures */
.figure {
  margin: 44px 0; position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
}
.figure::before, .figure::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border-color: var(--gold); border-style: solid;
}
.figure::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.figure::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.figure img {
  width: 100%; aspect-ratio: 21 / 9; object-fit: cover; display: block;
}
.figure figcaption {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  color: var(--ink-faint); padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.pull {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(22px, 3vw, 30px); line-height: 1.4;
  color: var(--ink);
  border-left: 2px solid var(--gold);
  padding: 6px 0 6px 26px; margin: 40px 0;
}

/* lane tags */
.lane-tag {
  display: inline-block; vertical-align: baseline;
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
  padding: 2px 7px; margin-right: 8px;
  color: var(--paper); white-space: nowrap;
  transform: translateY(-2px);
}
.lane-doc { background: var(--lane-doc); }
.lane-inf { background: var(--lane-inf); }
.lane-hyp { background: var(--lane-hyp); }

/* doors */
.doors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 36px 0; }
@media (max-width: 680px) { .doors { grid-template-columns: 1fr; } }
.door {
  text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line);
  padding: 20px 22px;
  font-family: var(--sans);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
}
.door:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 24px -18px rgba(36,31,24,.5); }
.door[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-pale); }
.door-title { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.25; display: block; margin-bottom: 8px; }
.door-hook { font-size: 14px; color: var(--ink-soft); display: block; line-height: 1.55; }
.door-idx { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--gold); display: block; margin-bottom: 10px; }

/* loop view */
.loop-view { margin: 40px 0 10px; }
.loop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.loop-door-name { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.2; }
.loop-actions { display: flex; gap: 10px; }
.btn-trace {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  padding: 9px 16px; cursor: pointer;
}
.btn-trace:hover { background: var(--gold); border-color: var(--gold); }
.btn-trace:disabled { opacity: .45; cursor: default; }

.loop-node {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  margin-bottom: 6px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.loop-node.shown { opacity: 1; transform: none; }
.loop-node::before {
  content: ""; position: absolute; left: 34px; top: -6px; width: 2px; height: 12px;
  background: var(--line);
}
.loop-node:first-child::before { display: none; }
.loop-node.active { border-color: var(--gold); }
.loop-node .node-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; cursor: pointer;
}
.node-step { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--gold); min-width: 26px; }
.node-label { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; color: var(--ink-soft); flex: 1; }
.node-chevron { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); transition: transform .25s; }
.loop-node.open .node-chevron { transform: rotate(45deg); }
.node-body {
  display: none; padding: 0 20px 22px 60px;
  font-size: 16px; color: var(--ink-soft);
}
.loop-node.open .node-body { display: block; }
.node-body .sub { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--gold); margin: 14px 0 6px; }
.node-body p { margin-bottom: 12px; }
.node-body .alt { border-left: 2px solid var(--line); padding-left: 16px; color: var(--ink-faint); font-style: italic; }

/* modes */
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 36px 0; }
@media (max-width: 680px) { .modes { grid-template-columns: 1fr; } }
.mode {
  text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line);
  padding: 20px 22px; font-family: var(--sans);
  transition: border-color .2s;
}
.mode:hover { border-color: var(--gold); }
.mode[aria-expanded="true"] { border-color: var(--gold); background: var(--paper-2); }
.mode-title { font-family: var(--serif); font-weight: 600; font-size: 22px; display: block; margin-bottom: 6px; }
.mode-shape { font-size: 14px; color: var(--ink-soft); display: block; margin-bottom: 10px; }
.mode-more { display: none; font-size: 15px; color: var(--ink-soft); margin-top: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.mode[aria-expanded="true"] .mode-more { display: block; }
.mode-decides { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); display: block; margin-top: 12px; }

/* case */
.case { border: 1px solid var(--line); background: var(--paper); margin: 48px 0; }
.case-head { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.case-file { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--gold); }
.case-title { font-family: var(--serif); font-weight: 600; font-size: 22px; flex: 1; }
.case-quote { padding: 26px 26px 10px; margin: 0; }
.case-quote p { font-family: var(--serif); font-size: 21px; line-height: 1.55; color: var(--ink); margin-bottom: 18px; }
.case-quote cite { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--ink-faint); font-style: normal; }

/* body lab */
.body-lab { display: grid; grid-template-columns: 300px 1fr; gap: 28px; margin: 44px 0; align-items: start; }
@media (max-width: 680px) { .body-lab { grid-template-columns: 1fr; } }
.body-svg-wrap {
  background: var(--paper); border: 1px solid var(--line);
  padding: 18px; color: var(--ink-soft);
  position: sticky; top: 90px;
}
@media (max-width: 680px) { .body-svg-wrap { position: static; max-width: 280px; margin: 0 auto; } }
#body-svg { width: 100%; height: auto; display: block; }
.figure-line { color: var(--ink-faint); }
.body-region { cursor: pointer; }
.body-region circle, .body-region ellipse {
  fill: rgba(176,132,40,.07);
  stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 4 4;
  transition: fill .25s;
}
.body-region:hover circle, .body-region:hover ellipse { fill: rgba(176,132,40,.18); }
.body-region.active circle, .body-region.active ellipse {
  fill: rgba(176,132,40,.3); stroke: var(--gold); stroke-dasharray: none;
  animation: region-pulse 2.4s ease-in-out infinite;
}
@keyframes region-pulse {
  0%, 100% { fill: rgba(176,132,40,.18); }
  50% { fill: rgba(176,132,40,.4); }
}
.body-region-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
  fill: var(--ink-soft);
}
.region-panel {
  border: 1px solid var(--line); background: var(--paper);
  padding: 24px 26px; min-height: 220px;
}
.region-panel-hint { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--gold); }
.region-title { font-family: var(--serif); font-weight: 600; font-size: 26px; margin-bottom: 10px; }
.region-text { font-size: 16px; color: var(--ink-soft); }
.region-doors { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-faint); }

/* hold */
.hold { display: grid; grid-template-columns: 320px 1fr; gap: 32px; margin: 48px 0; align-items: center; }
@media (max-width: 680px) { .hold { grid-template-columns: 1fr; } .hold-stage { margin: 0 auto; } }
.hold-stage { position: relative; width: 280px; height: 280px; margin: 0 auto; }
.hold-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--gold); opacity: 0;
  transform: scale(.6);
}
.hold-ring.breathing { opacity: .8; animation: none; }
.hold-circle {
  position: absolute; inset: 40px; border-radius: 50%;
  background: var(--ink); border: none; cursor: pointer;
  color: var(--paper);
  font-family: var(--mono); font-size: 12px; letter-spacing: .3em;
  display: flex; align-items: center; justify-content: center;
  transition: background .3s;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.hold-circle.holding { background: var(--gold); color: var(--ink); }
.hold-circle-label { pointer-events: none; }
.hold-copy { min-width: 0; }
.hold-door { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--gold); margin-bottom: 14px; }
.hold-statement { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.5; margin-bottom: 18px; }
.hold-status { font-size: 14px; color: var(--ink-faint); }
.hold-stamp {
  display: inline-block; margin-top: 18px;
  font-family: var(--mono); font-size: 14px; letter-spacing: .3em;
  color: var(--gold); border: 2px solid var(--gold);
  padding: 10px 18px;
  animation: stamp-in .5s ease;
}
@keyframes stamp-in {
  0% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.hold-note { margin-top: 16px; font-family: var(--serif); font-size: 19px; font-style: italic; }

/* beats */
.beats { list-style: none; margin: 36px 0; padding: 0; counter-reset: beat; }
.beats li {
  counter-increment: beat;
  display: flex; gap: 18px; align-items: baseline;
  border-top: 1px solid var(--line);
  padding: 18px 4px;
}
.beats li:last-child { border-bottom: 1px solid var(--line); }
.beats li::before {
  content: "0" counter(beat);
  font-family: var(--serif); font-size: 26px; color: var(--gold); min-width: 44px;
}
.beat-min { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--ink-faint); min-width: 56px; }

/* cta */
.cta-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 40px 0; }
@media (max-width: 680px) { .cta-row { grid-template-columns: 1fr; } }
.cta-card {
  display: block; border: 1px solid var(--line); background: var(--paper);
  padding: 22px; text-decoration: none; color: var(--ink);
  transition: border-color .2s, transform .2s;
}
.cta-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.cta-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; color: var(--gold); display: block; margin-bottom: 10px; }
.cta-title { font-family: var(--serif); font-weight: 600; font-size: 22px; display: block; margin-bottom: 8px; line-height: 1.2; }
.cta-sub { font-size: 14px; color: var(--ink-soft); display: block; line-height: 1.5; }

.signoff {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 30px; text-align: center; margin: 64px 0 8px;
}

/* footer */
.site-foot {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--ink-faint);
}
.foot-note { max-width: 520px; line-height: 1.6; letter-spacing: .04em; }

/* rail */
.rail { position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1220px) { .rail { display: none; } }
.rail-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line); position: relative; cursor: pointer;
  transition: background .3s;
}
.rail-dot.active { background: var(--gold); }
.rail-dot .rail-num {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  color: var(--gold); opacity: 0; transition: opacity .3s; white-space: nowrap;
}
.rail-dot.active .rail-num { opacity: 1; }

/* reveal */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal.in .stagger-1 { transition-delay: .08s; }
html.js .reveal.in .stagger-2 { transition-delay: .16s; }
html.js .reveal.in .stagger-3 { transition-delay: .24s; }

.nojs-note { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); border: 1px dashed var(--line); padding: 12px 16px; }

/* present mode */
.present {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: flex; flex-direction: column;
}
.present[hidden] { display: none; }
.present-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--line);
}
.present-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .26em; color: var(--gold); }
.present-count { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--ink-faint); }
.present-body {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 8vw;
}
.present-step-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .26em; color: var(--gold); margin-bottom: 22px; }
.present-step-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 5.6vw, 64px); line-height: 1.12; margin-bottom: 26px;
}
.present-step-body { font-size: clamp(17px, 1.8vw, 21px); color: var(--ink-soft); max-width: 760px; }
.present-step-body p { margin-bottom: 16px; }
.present-step-body .present-door-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; }
@media (max-width: 680px) { .present-step-body .present-door-list { grid-template-columns: 1fr; } }
.present-door {
  text-align: left; background: var(--paper); border: 1px solid var(--line);
  padding: 16px 18px; cursor: pointer; font-family: var(--sans); font-size: 16px;
  font-family: var(--serif); font-weight: 600; font-size: 19px;
}
.present-door:hover { border-color: var(--gold); }
.present-notes {
  border-top: 1px solid var(--line);
  padding: 16px 28px 22px;
  background: var(--paper-2);
}
.present-notes-label { font-family: var(--mono); font-size: 9px; letter-spacing: .26em; color: var(--gold); display: block; margin-bottom: 8px; }
.present-notes-text { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.5; color: var(--ink); margin: 0; }
