/* ============================================================
   OCCULT-PROOF FIELD DOSSIER — ChristCode field-dossier aesthetic
   (paper / gold / Cormorant — the house dossier look, not Singulariti dark)
   ============================================================ */

:root {
  --paper:      #f6f1e7;
  --paper-2:    #efe7d6;
  --ink:        #241f18;
  --ink-soft:   #5b5344;
  --ink-faint:  #8a8069;
  --gold:       #b08428;
  --gold-pale:  #e7d3a3;
  --line:       #d8cdb4;
  --lane-doc:   #4a6b4a;   /* DOCUMENTED RECORD  */
  --lane-inf:   #8a6d2f;   /* ENGINEERING INFERENCE / CORROBORATED */
  --lane-hyp:   #9a5b3c;   /* WORKING HYPOTHESIS / SPECULATIVE */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1120px;
}

* { 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: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fixed grain overlay — 0.5px dot grid / 4px, multiply, opacity .5 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(var(--ink) 0.5px, transparent 0.6px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
  opacity: .05;
}

/* ---------------- Typography ---------------- */
h1, h2, h3, h4, .serif { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); line-height: 1.04; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.08; }
h3 { font-size: 1.5rem; line-height: 1.2; }
p  { color: var(--ink-soft); }
a  { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-pale); }
a:hover { border-bottom-color: var(--gold); }
strong, b { color: var(--ink); font-weight: 500; }
em { font-style: italic; color: var(--ink); }

.mono, .kicker, .figcap, .tag, .num, .rail-label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
}

/* ---------------- Masthead ---------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(20px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.masthead .mark { display: flex; align-items: center; gap: 12px; }
.masthead .mark img { height: 34px; width: auto; }
.masthead .wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: .02em;
  color: var(--ink);
}
.masthead .wordmark span { color: var(--gold); }
.masthead nav { display: flex; gap: 22px; }
.masthead nav a {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10.5px;
  color: var(--ink-soft);
  border: none;
}
.masthead nav a:hover { color: var(--gold); }
@media (max-width: 720px) { .masthead nav { display: none; } }

/* ---------------- Layout ---------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* Hero */
.hero {
  position: relative;
  padding: clamp(72px, 12vw, 140px) 0 clamp(48px, 8vw, 96px);
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.hero .kicker { color: var(--gold); margin-bottom: 22px; display: block; }
.hero h1 { max-width: 16ch; }
.hero .sub {
  margin-top: 26px;
  max-width: 60ch;
  font-size: 1.12rem;
  color: var(--ink-soft);
}
.hero .byline {
  margin-top: 34px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  color: var(--ink-faint);
}
.hero-figure { margin-top: clamp(40px, 6vw, 72px); }

/* ---------------- Module (slide) ---------------- */
.module {
  position: relative;
  padding: clamp(64px, 10vw, 120px) 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.module::before {
  content: attr(data-num);
  position: absolute;
  top: clamp(20px, 4vw, 48px);
  right: clamp(16px, 3vw, 40px);
  font-family: var(--serif);
  font-size: clamp(6rem, 18vw, 16rem);
  line-height: 1;
  color: var(--gold);
  opacity: .08;
  pointer-events: none;
  z-index: 0;
}
.module .wrap { position: relative; z-index: 1; }

.module .kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  margin-bottom: 18px;
}
.module .kicker::after {
  content: "";
  width: 64px;
  height: 1px;
  background: var(--line);
}
.module h2 { max-width: 20ch; margin-bottom: 8px; }
.module .lede {
  margin-top: 20px;
  max-width: 64ch;
  font-size: 1.14rem;
  color: var(--ink-soft);
}

/* Prose */
.prose { margin-top: clamp(28px, 5vw, 48px); max-width: 70ch; }
.prose p { margin-bottom: 20px; }
.prose p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 3.2rem;
  float: left;
  line-height: .8;
  padding-right: 10px;
  color: var(--gold);
}

/* Pull-quote */
.pullquote {
  margin: clamp(36px, 6vw, 64px) 0;
  padding-left: 28px;
  border-left: 3px solid var(--gold);
  max-width: 60ch;
}
.pullquote .q {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.28;
  color: var(--ink);
  font-style: italic;
}
.pullquote .attrib {
  margin-top: 16px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10.5px;
  color: var(--ink-faint);
}

/* Figure */
.figure {
  position: relative;
  margin: clamp(40px, 6vw, 72px) 0;
  width: 100%;
}
.figure .frame {
  position: relative;
  aspect-ratio: 21 / 9;
  width: 100%;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.figure .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* gold corner ticks */
.figure .frame::before,
.figure .frame::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 1.5px solid var(--gold);
  z-index: 2;
}
.figure .frame::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.figure .frame::after  { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.figure .figcap {
  margin-top: 12px;
  color: var(--ink-faint);
}

/* ---------------- Lane tags + filters ---------------- */
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.4;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid transparent;
}
.tag-doc { color: var(--lane-doc); background: color-mix(in srgb, var(--lane-doc) 12%, transparent); border-color: color-mix(in srgb, var(--lane-doc) 35%, transparent); }
.tag-inf { color: var(--lane-inf); background: color-mix(in srgb, var(--lane-inf) 12%, transparent); border-color: color-mix(in srgb, var(--lane-inf) 35%, transparent); }
.tag-hyp { color: var(--lane-hyp); background: color-mix(in srgb, var(--lane-hyp) 12%, transparent); border-color: color-mix(in srgb, var(--lane-hyp) 35%, transparent); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 clamp(28px, 5vw, 48px);
}
.filters button {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10.5px;
  padding: 8px 16px;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s ease;
}
.filters button:hover { border-color: var(--gold); color: var(--gold); }
.filters button.active { background: var(--gold); color: var(--paper); border-color: var(--gold); }

/* Claim cards (findings) */
.findings { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: clamp(28px, 5vw, 48px); }
.finding {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.finding:hover { transform: translateY(-4px); box-shadow: 0 14px 40px -18px rgba(36,31,24,.35); }
.finding .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.finding h4 { font-size: 1.3rem; }
.finding .grade {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.finding p { font-size: .98rem; margin-bottom: 12px; }
.finding .src { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--gold); word-break: break-word; }
.finding.hidden, .prose-block.hidden, .pullquote.hidden { display: none; }

/* ---------------- Practice-card accordion ---------------- */
.acc { margin-top: clamp(36px, 6vw, 60px); }
.acc .acc-head {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 18px;
}
.acc-item { border-top: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 1px solid var(--line); }
.acc-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
}
.acc-q .plus { font-family: var(--mono); font-size: 20px; color: var(--gold); transition: transform .3s ease; flex-shrink: 0; }
.acc-item.open .acc-q .plus { transform: rotate(45deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.acc-a .inner { padding: 0 0 24px; max-width: 70ch; }
.acc-a p { margin-bottom: 14px; }

/* ---------------- Stats / numbers are the jewelry ---------------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  margin: clamp(36px, 6vw, 60px) 0;
}
.stat .n { font-family: var(--serif); font-size: clamp(2.5rem, 6vw, 3.4rem); line-height: 1; color: var(--gold); }
.stat .l { margin-top: 10px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; color: var(--ink-faint); }

/* ---------------- Dot rail (right) ---------------- */
.rail {
  position: fixed;
  right: clamp(14px, 2.5vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rail a {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  position: relative;
  transition: background .3s ease;
  display: block;
}
.rail a.active { background: var(--gold); }
.rail a .rail-label {
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.rail a.active .rail-label { opacity: 1; color: var(--gold); }
@media (max-width: 1220px) { .rail { display: none; } }

/* ---------------- Footer ---------------- */
footer {
  padding: clamp(56px, 9vw, 96px) 0;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
footer .close {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  max-width: 24ch;
  color: var(--ink);
}
footer .close em { color: var(--gold); }
footer .cta {
  display: inline-block;
  margin-top: 30px;
  padding: 16px 34px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  border-radius: 4px;
  transition: background .25s ease;
}
footer .cta:hover { background: var(--gold); color: var(--ink); }
footer .footmeta {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  color: var(--ink-faint);
}
footer .footmeta img { height: 26px; }

/* ---------------- Reveal (gated behind html.js) ---------------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .acc-a { transition: none; }
}

/* ---------------- Utility: hide on print / small ---------------- */
@media (max-width: 640px) {
  .prose p:first-child::first-letter { font-size: 2.6rem; }
}
