/* ============================================================ *
 * Divergent Kind — Coherence Journey
 * Scroll-driven experience. Ink field, cream type, single ember
 * "signal". Motion settles; it never dazzles.
 *
 * Default (no .cj-js / reduced-motion) = a clean, readable,
 * semantic article. The .cj-js rules layer the enhancement on.
 * ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

@font-face {
  font-family: 'Anton';
  src: url('fonts/Anton-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Canva Sans';
  src: url('fonts/CanvaSans-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --canvas: #E8D3AD;
  --cream:  #E8D3AD;
  --ink:    #111111;
  --ink-soft: #181614;
  --ember:  #E97821;
  --ember-soft: #E59A17;
  --slate:  #2F3C46;

  --cream-85: rgba(232,211,173,0.85);
  --cream-70: rgba(232,211,173,0.70);
  --cream-55: rgba(232,211,173,0.55);
  --cream-35: rgba(232,211,173,0.35);
  --cream-18: rgba(232,211,173,0.18);

  --font-display: 'Anton', 'Sora', Impact, system-ui, sans-serif;
  --font-body: 'Canva Sans', 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --track-eyebrow: 0.16em;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
::selection { background: var(--ember); color: var(--ink); }

/* ─── Persistent signal field ───────────────────────────── */
.cj-field {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; display: block;
}
/* with JS off there is no canvas drawing — keep page on solid ink */

/* ─── Top bar + progress rail ───────────────────────────── */
.cj-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 34px;
  pointer-events: none;
}
.cj-brand {
  display: inline-flex; align-items: center; gap: 11px; pointer-events: auto;
}
.cj-brand svg { width: 26px; height: 26px; display: block; }
.cj-brand b {
  font-family: var(--font-display); font-weight: 400; font-size: 15px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream);
}
.cj-prog { display: flex; gap: 7px; align-items: center; }
.cj-prog span {
  width: 22px; height: 3px; background: var(--cream-18);
  transition: background-color .5s ease;
}
.cj-prog span.is-on { background: var(--ember); }
.cj-prog span.is-past { background: var(--cream-55); }
@media (max-width: 720px) {
  .cj-topbar { padding: 16px 20px; }
  .cj-prog span { width: 14px; }
}

.cj-skip {
  position: fixed; left: -9999px; top: 0; z-index: 60;
  background: var(--ember); color: var(--ink); padding: 12px 18px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
}
.cj-skip:focus { left: 14px; top: 14px; }

/* ─── Stage / scene scaffolding ─────────────────────────── */
.cj-stage { position: relative; z-index: 1; }
.cj-article { position: relative; }

.cj-scene {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 34px;
}
.cj-pin { width: 100%; display: flex; align-items: center; justify-content: center; }

.cj-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; }
.cj-inner--center { text-align: center; max-width: 980px; }
.cj-inner--wide { max-width: 1240px; }

@media (max-width: 720px) { .cj-scene { padding: 96px 22px; } }

/* ─── Type atoms ────────────────────────────────────────── */
.cj-eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--ember);
  margin: 0 0 28px;
}
.cj-kicker {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--cream-55); margin: 0 0 26px;
}
.cj-kicker::before { content: ""; }
.cj-h1 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  line-height: 0.92; letter-spacing: 0.006em; color: var(--cream); margin: 0;
  font-size: clamp(40px, 6.2vw, 92px); max-width: 16em;
  text-wrap: balance;
}
.cj-inner--center .cj-h1 { margin-left: auto; margin-right: auto; }
.cj-h2 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  line-height: 0.96; letter-spacing: 0.006em; color: var(--cream); margin: 0;
  font-size: clamp(30px, 4.2vw, 60px);
}
.cj-h2--center { text-align: center; margin: 0 auto; }
.cj-h1 em, .cj-h2 em { font-style: normal; color: var(--ember); }

.cj-sub {
  font-family: var(--font-body); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6;
  color: var(--cream-85); margin: 30px 0 0; max-width: 40em;
}
.cj-inner--center .cj-sub, .cj-sub--center { margin-left: auto; margin-right: auto; text-align: center; }
.cj-body {
  font-size: clamp(16px, 1.3vw, 19px); line-height: 1.66; color: var(--cream-70); margin: 0;
}
.cj-body--bright { color: var(--cream); }

/* ─── Scroll cue ────────────────────────────────────────── */
.cj-cue {
  margin-top: 56px; display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream-55);
}
.cj-cue i {
  width: 1px; height: 46px; background: linear-gradient(var(--cream-55), transparent);
  position: relative;
}
.cj-smooth .cj-cue i::after {
  content: ""; position: absolute; top: 0; left: -1px; width: 3px; height: 12px; background: var(--ember);
  animation: cj-drop 2.4s cubic-bezier(.16,1,.3,1) infinite;
}
@keyframes cj-drop { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }

/* ─── Scene 1: lines ────────────────────────────────────── */
.cj-lines { display: flex; flex-direction: column; gap: 22px; max-width: 18em; }
.cj-line {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(28px, 3.6vw, 54px); line-height: 1.0; letter-spacing: 0.008em; color: var(--cream); margin: 0;
}
.cj-line--lg { font-size: clamp(30px, 4vw, 56px); margin-bottom: 18px; }
.cj-line--accent { color: var(--ember); }

/* ─── Scene 2: split + meters ───────────────────────────── */
.cj-inner--split {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center;
}
@media (max-width: 900px) { .cj-inner--split { grid-template-columns: 1fr; gap: 40px; } }
.cj-meters { display: flex; flex-direction: column; gap: 20px; }
.cj-meter { display: grid; grid-template-columns: 1fr; gap: 10px; }
.cj-meter-l {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-70);
}
.cj-meter-track {
  position: relative; height: 10px; border: 1.5px solid var(--cream-35); background: transparent;
}
.cj-meter-track i {
  position: absolute; inset: 0; width: 8%; background: var(--ember);
  transition: width 1.1s cubic-bezier(.16,1,.3,1);
}

/* ─── Scene 3: participant ──────────────────────────────── */
.cj-twocol {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; max-width: 60em;
}
@media (max-width: 760px) { .cj-twocol { grid-template-columns: 1fr; gap: 22px; } }
.cj-scene--tall .cj-h2 { max-width: 14em; }

/* ─── Scene 4: interactive lab ──────────────────────────── */
.cj-int-head { max-width: 30em; margin-bottom: 44px; }
.cj-int-head .cj-h2 { margin-top: 16px; }

.cj-lab {
  border: 2px solid var(--cream-35); background: rgba(17,17,17,0.62);
  backdrop-filter: blur(6px);
}
.cj-control { padding: 30px 34px 34px; border-bottom: 2px solid var(--cream-18); }
.cj-control-l {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-55); margin: 0 0 20px;
}
.cj-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--cream-35);
  outline: none; cursor: pointer; margin: 0;
}
.cj-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ember); border: 2px solid var(--ink); cursor: grab;
  box-shadow: 0 0 0 4px rgba(233,120,33,0.18);
}
.cj-range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--ember); border: 2px solid var(--ink); cursor: grab;
}
.cj-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(233,120,33,0.45); }
.cj-ticks {
  list-style: none; display: flex; justify-content: space-between; margin: 16px 0 0; padding: 0;
}
.cj-ticks li {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cream-35); transition: color .3s ease; flex: 1; text-align: center;
}
.cj-ticks li:first-child { text-align: left; }
.cj-ticks li:last-child { text-align: right; }
.cj-ticks li.is-on { color: var(--ember); }

.cj-lab-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; }
@media (max-width: 860px) { .cj-lab-grid { grid-template-columns: 1fr; } }

.cj-message { padding: 32px 34px; border-right: 2px solid var(--cream-18); }
@media (max-width: 860px) { .cj-message { border-right: 0; border-bottom: 2px solid var(--cream-18); } }
.cj-msg-tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-55); margin: 0 0 12px;
}
.cj-msg-source {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.04; letter-spacing: 0.01em; color: var(--cream-55);
}
.cj-msg-arrow {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-35); margin: 22px 0;
}
.cj-msg-landed { border-left: 4px solid var(--ember); padding-left: 20px; min-height: 150px; }
.cj-msg-to {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ember); margin: 0 0 14px;
}
.cj-msg-body { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.62; color: var(--cream); }
.cj-smooth .cj-msg-to, .cj-smooth .cj-msg-body { transition: opacity .28s ease, transform .28s ease; }
.cj-smooth .cj-message.is-swapping .cj-msg-to,
.cj-smooth .cj-message.is-swapping .cj-msg-body { opacity: 0; transform: translateY(6px); }

.cj-lens { padding: 26px 30px; display: flex; flex-direction: column; gap: 4px; }
.cj-lens-h {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-55); margin: 0 0 14px;
}
.cj-dim {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  border-top: 1px solid var(--cream-18); padding: 14px 0; cursor: pointer; color: inherit; font-family: inherit;
}
.cj-dim:first-of-type { border-top: 0; }
.cj-dim-row { display: flex; align-items: center; gap: 16px; }
.cj-dim-l {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 18px;
  letter-spacing: 0.01em; color: var(--cream); flex: 0 0 auto; min-width: 8.4em;
}
.cj-dim-track { position: relative; flex: 1; height: 8px; border: 1.5px solid var(--cream-35); }
.cj-dim-track i {
  position: absolute; inset: 0; width: 8%; background: var(--ember);
  transition: width 1s cubic-bezier(.16,1,.3,1);
}
.cj-dim.is-key .cj-dim-track i { animation: cj-pulse 1.6s ease-in-out infinite; }
.cj-dim.is-key .cj-dim-l { color: var(--ember); }
@keyframes cj-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.cj-dim-q {
  display: block; font-size: 13px; line-height: 1.5; color: var(--cream-55); margin-top: 0;
  max-height: 0; overflow: hidden; opacity: 0; transition: max-height .35s ease, opacity .35s ease, margin-top .35s ease;
}
.cj-dim:hover .cj-dim-q, .cj-dim:focus-visible .cj-dim-q, .cj-dim.is-open .cj-dim-q {
  max-height: 5em; opacity: 1; margin-top: 10px;
}
.cj-dim:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.cj-lab-foot {
  padding: 22px 34px; border-top: 2px solid var(--cream-18);
  font-family: var(--font-body); font-size: clamp(15px,1.3vw,18px); line-height: 1.5; color: var(--cream-85);
}

/* Static fallback: reveal dimension questions inline so nothing is hidden
   when the animation timeline isn't running (no JS / no cj-smooth). */
html:not(.cj-smooth) .cj-dim-q { max-height: none; opacity: 1; margin-top: 10px; }

/* ─── Scene 5: scales ───────────────────────────────────── */
.cj-scales {
  list-style: none; margin: 44px auto 36px; padding: 0; display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center; gap: 12px 14px; max-width: 70em;
}
.cj-scales li {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(16px, 1.7vw, 24px);
  letter-spacing: 0.02em; color: var(--cream-85); border: 2px solid var(--cream-35); padding: 12px 18px;
  transition: color .5s ease, border-color .5s ease, background-color .5s ease;
}
.cj-smooth .cj-scales li { color: var(--cream-35); border-color: var(--cream-18); }
.cj-scales li.is-lit { color: var(--ink); background: var(--ember); border-color: var(--ember); }
.cj-scales li.is-passed { color: var(--cream-85); border-color: var(--cream-35); }

/* ─── Scene 6: waypoints ────────────────────────────────── */
.cj-waypoints {
  list-style: none; margin: 48px auto 36px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; max-width: 64em; counter-reset: w;
}
@media (max-width: 720px) { .cj-waypoints { grid-template-columns: 1fr; } }
.cj-waypoints li {
  border: 2px solid var(--cream-35); padding: 26px 24px; text-align: left;
  transition: border-color .6s ease, background-color .6s ease;
}
.cj-smooth .cj-waypoints li { border-color: var(--cream-18); }
.cj-waypoints li.is-lit { border-color: var(--ember); background: rgba(233,120,33,0.08); }
.cj-way-n {
  display: block; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 26px;
  letter-spacing: 0.01em; color: var(--cream); margin-bottom: 12px;
}
.cj-waypoints li.is-lit .cj-way-n { color: var(--ember); }
.cj-way-d { display: block; font-size: 14px; line-height: 1.55; color: var(--cream-70); }

/* ─── Scene 7: invitation ───────────────────────────────── */
.cj-scene--invite { min-height: 100vh; }
.cj-cta-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 40px; }
.cj-btn {
  display: inline-flex; align-items: center; gap: 10px; border: 2px solid var(--ember);
  padding: 16px 30px; font-family: var(--font-display); font-weight: 400; font-size: 15px;
  letter-spacing: 0.13em; text-transform: uppercase;
  transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.cj-btn--ember { background: var(--ember); color: var(--ink); box-shadow: 6px 6px 0 0 rgba(232,211,173,0.9); }
.cj-btn--ember:hover { transform: translate(-2px,-2px); box-shadow: 9px 9px 0 0 rgba(232,211,173,0.9); }
.cj-btn--ghost { background: transparent; color: var(--cream); border-color: var(--cream-35); box-shadow: none; }
.cj-btn--ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.cj-boundary {
  margin: 44px auto 0; max-width: 44em; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream-55);
}

/* ─── Footer ────────────────────────────────────────────── */
.cj-foot { position: relative; z-index: 1; background: #0c0b0a; border-top: 2px solid var(--cream-18); padding: 56px 34px 44px; }
.cj-foot-in { max-width: var(--maxw); margin: 0 auto; }
.cj-brand--foot { margin-bottom: 26px; }
.cj-brand--foot b { color: var(--cream); }
.cj-foot-watermark { font-size: 11.5px; line-height: 1.7; color: var(--cream-35); max-width: 78em; }
.cj-foot-watermark .tm { color: var(--cream-55); }
.cj-foot-meta {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--cream-18); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--cream-35);
}

/* ============================================================ *
 * ENHANCEMENT LAYER — active only once the JS probe confirms the
 * CSS animation timeline is actually ticking (html.cj-smooth).
 * Until then (and with JS off) the page is the static article.
 * ============================================================ */
.cj-smooth .cj-scene--tall { min-height: 230vh; }
.cj-smooth .cj-scene--interactive { min-height: 200vh; }
.cj-smooth .cj-scene--tall .cj-pin,
.cj-smooth .cj-scene--interactive .cj-pin {
  position: sticky; top: 0; height: 100vh; padding: 110px 0;
}

/* reveal + step staging */
.cj-smooth .cj-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.cj-smooth .cj-reveal.in { opacity: 1; transform: none; }

.cj-smooth .cj-line[data-step],
.cj-smooth .cj-body[data-step] {
  opacity: 0.18; transform: translateY(8px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1), color .7s ease;
}
.cj-smooth .cj-line.is-active[data-step],
.cj-smooth .cj-body.is-active[data-step] { opacity: 1; transform: none; }

.cj-smooth .cj-scales li, .cj-smooth .cj-waypoints li { will-change: border-color, background-color, color; }

/* ─── Reduced motion: never enhance; hide the field, stay static ─ */
@media (prefers-reduced-motion: reduce) {
  .cj-field { display: none; }
  body { background: var(--ink); }
}
