/* ————————————————————————————————————————————————
   Life Surge × OfferStream OS · private executive briefing
   Concept: one unbroken thread of warm light.
   People and relationships are warm gold. Systems are cool blue.
   Deep navy stage, arena light from above, bright white type.
   The scroll itself is the argument: one continuous line.
   ———————————————————————————————————————————————— */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-italic-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #050910;
  --ink-2: #0a1322;
  --panel: #0c1626;
  --white: #f7f4ec;
  --dim: #aab5c9;
  --faint: #8494b6;
  --hair: rgba(141, 153, 175, .16);
  --gold: #dfa93f;
  --gold-hi: #f3d283;
  --gold-glow: rgba(223, 169, 63, .5);
  --blue: #5f83b8;
  --blue-dim: #33455f;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; background: var(--ink); }

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}
body.locked { overflow: hidden; }

::selection { background: rgba(223, 169, 63, .3); }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 5px;
}

/* film grain */
#grain {
  position: fixed; inset: 0;
  opacity: .05;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 60;
}

/* ————— shared vocabulary ————— */

.display {
  font-family: var(--display);
  font-weight: 350;
  line-height: 1.14;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.display em, .warmline {
  font-style: italic;
  font-weight: 420;
  color: var(--gold);
}
.whisper {
  font-family: var(--display);
  font-style: italic;
  font-weight: 340;
  color: var(--dim);
  text-wrap: balance;
}

.microlabel {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dim);
}
.microlabel.gold { color: var(--gold); }
.microlabel.dim { color: var(--faint); }
.microlabel.center { text-align: center; display: block; }

.act { position: relative; padding: 11rem 1.5rem; }
.act-marker {
  display: block;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4.5rem;
}

.sect-h {
  text-align: center;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  max-width: 52rem;
  margin: 0 auto;
}
.sect-intro {
  max-width: 38rem;
  margin: 2.4rem auto 0;
  text-align: center;
  color: var(--dim);
  font-size: 1.05rem;
}
.sect-intro em { color: var(--gold); font-style: italic; }

.cinema {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.blackout {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  text-align: center;
}
.blackout .b1 { font-size: clamp(1.8rem, 4.4vw, 3.3rem); color: var(--dim); }
.blackout .b2 { font-size: clamp(2rem, 5.2vw, 4rem); }
.blackout-sub {
  margin-top: 2.2rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 340;
  color: var(--dim);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.9;
}

.transition-quote {
  margin: 10rem auto 0;
  max-width: 48rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.transition-quote .t1 { font-size: clamp(1.6rem, 3.6vw, 2.7rem); color: var(--dim); }
.transition-quote .t2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); }

/* slow cinematic reveal: fade + focus pull, no bounce */
.reveal {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 1.5s ease, filter 1.5s ease;
}
.reveal.lit { opacity: 1; filter: blur(0); }

/* ————— scroll progress + chapters ————— */

#progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 55;
  background: transparent;
}
#progressBar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transform-origin: left;
  transform: scaleX(0);
  box-shadow: 0 0 10px var(--gold-glow);
}

#chapters {
  position: fixed;
  right: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  align-items: flex-end;
}
#chapters a {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color .4s ease;
}
#chapters a .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--faint);
  transition: background .4s ease, box-shadow .4s ease;
}
#chapters a .lbl { opacity: 0; transition: opacity .4s ease; }
#chapters:hover a .lbl { opacity: 1; }
#chapters a.active { color: var(--gold); }
#chapters a.active .lbl { opacity: 1; }
#chapters a.active .dot { background: var(--gold); box-shadow: 0 0 8px var(--gold-glow); }

/* ————— the master thread ————— */

#thread {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
#thread .thread-glow { fill: none; stroke: var(--gold); stroke-width: 7; opacity: .06; }
#thread .thread-core {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.3;
  opacity: .75;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

main { position: relative; z-index: 2; }

/* ————— gate ————— */

#gate {
  position: fixed; inset: 0;
  z-index: 100;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(223, 169, 63, .08), transparent 70%),
    var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  transition: opacity 1.4s ease;
}
#gate.leaving { opacity: 0; pointer-events: none; }
.gate-inner { max-width: 46rem; }
.gate-head {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin: 2.2rem 0 1.8rem;
}
.gate-support { color: var(--dim); max-width: 30rem; margin: 0 auto; }
.gate-mark { margin-top: 2.6rem; }
#gateForm {
  margin-top: 3.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
#gateCode {
  background: none;
  border: none;
  border-bottom: 1px solid var(--faint);
  color: var(--white);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .5em;
  text-transform: uppercase;
  text-align: center;
  padding: .6rem 0;
  width: 15rem;
}
#gateCode::placeholder { color: var(--faint); letter-spacing: .3em; }
#gateCode:focus-visible { outline: none; border-bottom-color: var(--gold); }
#gateEnter {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(223, 169, 63, .5);
  padding: 1.05rem 2.4rem;
  transition: background .5s ease, color .5s ease, box-shadow .5s ease;
}
#gateEnter:hover, #gateEnter:focus-visible {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 0 50px rgba(223, 169, 63, .3);
}
.gate-error {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
  min-height: 1.2em;
}

/* ————— 01 · hero ————— */

#s1 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem;
  overflow: hidden;
  background: radial-gradient(55% 40% at 50% 0%, rgba(223, 169, 63, .07), transparent 70%);
}
#gatherCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-topline {
  position: absolute;
  top: 2rem; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  align-items: center;
  z-index: 3;
}
.hero-copy { position: relative; z-index: 2; max-width: 62rem; }
#heroLabel { display: block; margin-bottom: 2.6rem; }
.hero-l1, .hero-l2 {
  display: block;
  font-family: var(--display);
  letter-spacing: -.015em;
  text-wrap: balance;
  font-size: clamp(2.3rem, 6.4vw, 5.2rem);
  line-height: 1.1;
}
.hero-l1 { font-weight: 330; color: var(--dim); }
.hero-l2 {
  font-weight: 440;
  font-style: italic;
  color: var(--gold);
  margin-top: 1rem;
  text-shadow: 0 0 60px rgba(223, 169, 63, .3);
}
.hero-sub {
  margin: 3rem auto 0;
  max-width: 40rem;
  font-family: var(--display);
  font-weight: 340;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--dim);
  line-height: 1.85;
}
.hero-next {
  margin: 2.6rem auto 0;
  max-width: 36rem;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  line-height: 1.9;
  color: var(--white);
}
.hero-next em { color: var(--gold); font-family: var(--display); font-weight: 400; }
.hero-stage { opacity: 0; transition: opacity 2s ease; }
.hero-stage.lit { opacity: 1; }

.continue {
  margin-top: 3.6rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
}
.continue::after {
  content: '';
  width: 1px; height: 44px;
  background: linear-gradient(var(--gold), transparent);
  animation: drip 2.6s ease-in-out infinite;
}
@keyframes drip {
  0%, 100% { transform: scaleY(.5); transform-origin: top; opacity: .4; }
  50% { transform: scaleY(1); opacity: 1; }
}
.continue:hover, .continue:focus-visible { color: var(--gold-hi); }

/* ————— 02 · what Life Surge has built ————— */

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 62rem;
  margin: 6rem auto 0;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.pillar {
  background: var(--ink);
  padding: 3.2rem 1.4rem 3rem;
  text-align: center;
}
.pillar .pw {
  font-family: var(--display);
  font-weight: 430;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
}
.pillar .pm {
  display: block;
  margin-top: 1rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 340;
  color: var(--gold);
  font-size: .98rem;
}
.foundation {
  max-width: 62rem;
  margin: 0 auto;
  height: 2.4rem;
  display: flex;
  align-items: center;
}
.foundation span {
  display: block;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold) 12%, var(--gold) 88%, transparent);
  box-shadow: 0 0 12px var(--gold-glow);
  transform: scaleX(0);
  transition: transform 2.2s ease;
}
.foundation.lit span { transform: scaleX(1); }
.foundation-caption {
  text-align: center;
  margin-top: .6rem;
  font-family: var(--display);
  font-style: italic;
  color: var(--dim);
}

.tiers {
  max-width: 62rem;
  margin: 7rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5rem;
}
.tier .microlabel { display: block; margin-bottom: 1rem; }
.tier .tt {
  font-family: var(--display);
  font-weight: 430;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tier .ts {
  display: block;
  margin: .5rem 0 1.6rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 350;
  color: var(--gold);
  font-size: 1.02rem;
}
.tier ul { list-style: none; }
.tier li {
  font-size: .96rem;
  color: var(--dim);
  padding: .42rem 0;
  border-top: 1px solid var(--hair);
}
.tier li:first-child { border-top: none; }

/* ————— 03 · journey ————— */

.journey-steps {
  position: relative;
  max-width: 34rem;
  margin: 7rem auto 0;
  list-style: none;
}
.jphase {
  margin: 4.5rem 0 1.6rem;
  display: grid;
  grid-template-columns: 5rem 2rem 1fr;
  align-items: center;
}
.jphase .plabel {
  grid-column: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  padding-left: 1.4rem;
}
.jstep {
  position: relative;
  display: grid;
  grid-template-columns: 5rem 2rem 1fr;
  align-items: center;
  min-height: 4.6rem;
}
.jstep .idx {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--faint);
  text-align: right;
  padding-right: 1.2rem;
}
.jstep .node {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
  justify-self: center;
}
.jstep .label {
  font-family: var(--display);
  font-weight: 370;
  font-size: clamp(1.05rem, 2.1vw, 1.3rem);
  padding-left: 1.4rem;
}
.jstep:last-child .label { font-style: italic; color: var(--gold); }

/* ————— 04 · executive questions ————— */

.execqs {
  list-style: none;
  max-width: 42rem;
  margin: 4.5rem auto 0;
  text-align: left;
}
.execqs li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .4rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--hair);
  font-family: var(--display);
  font-weight: 350;
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  line-height: 1.65;
}
.execqs li::before {
  content: '?';
  font-style: italic;
  color: var(--gold);
  font-weight: 430;
}
.execq-close { margin-top: 4rem; font-size: clamp(1.1rem, 2.2vw, 1.45rem); }

/* ————— sticky stages (05, 06) ————— */

.stage-wrap { position: relative; background: var(--ink); z-index: 3; }
#fracture-wrap { height: 360vh; }
#connect-wrap { height: 330vh; }

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.stage-head {
  position: absolute;
  top: 9vh; left: 0; right: 0;
  text-align: center;
  padding: 0 1.5rem;
  z-index: 4;
}
.stage-head .q {
  font-size: clamp(1.5rem, 3.3vw, 2.6rem);
  transition: opacity 1s ease;
}
.stage-head .verdict {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 0 1.5rem;
  font-size: clamp(1.4rem, 3.1vw, 2.4rem);
  opacity: 0;
  transition: opacity 1s ease;
}
.stage-head .verdict small {
  display: block;
  margin-top: .6em;
  font-size: .82em;
  font-style: italic;
  color: var(--gold);
}
.stage-caption {
  position: absolute;
  left: 0; right: 0;
  bottom: 6vh;
  text-align: center;
  padding: 0 1.5rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(.98rem, 1.9vw, 1.2rem);
  color: var(--dim);
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 4;
}

#tangleSvg, #connectSvg { position: absolute; inset: 0; width: 100%; height: 100%; }

.person-node {
  position: absolute;
  left: 50%; top: 52%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  z-index: 3;
  transition: opacity .8s ease;
}
.person-node .person-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 26px rgba(243, 210, 131, .9);
}

.syschip {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue-dim);
  background: rgba(5, 9, 16, .86);
  padding: .45rem .8rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .7s ease;
  z-index: 3;
}
.syschip.on { opacity: 1; }

.tangle-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1;
  opacity: 0;
  vector-effect: non-scaling-stroke;
  transition: opacity .7s ease;
}
.tangle-line.on { opacity: .3; }

/* ————— 06 · connect stage ————— */

.connect-line1, .connect-line2 {
  position: absolute;
  left: 0; right: 0;
  top: 44%;
  transform: translateY(-50%);
  text-align: center;
  padding: 0 1.5rem;
  font-size: clamp(1.7rem, 4.2vw, 3.2rem);
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 4;
}
.connect-line2 { color: var(--gold); font-style: italic; font-weight: 430; }

.connect-viz { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.connect-viz.on { opacity: 1; }
.connect-key {
  position: absolute;
  top: 10vh; left: 0; right: 0;
  text-align: center;
  padding: 0 1.5rem;
  font-size: clamp(1.3rem, 2.9vw, 2.2rem);
  z-index: 4;
}
.connect-chips {
  position: absolute;
  top: 26vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(66rem, 94vw);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
  z-index: 3;
}
.connect-chips .syschip { position: static; transform: none; opacity: .8; }

#connectSvg .drop {
  fill: none;
  stroke: var(--blue-dim);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity .5s ease, stroke .5s ease;
}
#connectSvg .drop.warm { stroke: var(--gold); opacity: .55; }
#connectSvg .rail {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}
#connectSvg .junction { fill: var(--gold); opacity: 0; transition: opacity .5s ease; }
#connectSvg .junction.warm { opacity: 1; }

.rail-label {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  z-index: 4;
  color: var(--gold);
  opacity: 0;
  transition: opacity 1s ease;
}
.rail-label.on { opacity: 1; }

.connect-caption {
  position: absolute;
  left: 0; right: 0;
  bottom: 5vh;
  text-align: center;
  padding: 0 1.5rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  color: var(--dim);
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 4;
}

/* ————— 07 · Sarah ————— */

.nameplate { text-align: center; margin: 3rem auto 5.5rem; }
.nameplate .name {
  font-weight: 440;
  font-size: clamp(2.6rem, 7.5vw, 5.2rem);
  color: var(--gold);
  text-shadow: 0 0 80px rgba(223, 169, 63, .3);
}
.sarah-facts {
  list-style: none;
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 2rem;
}
.sarah-facts li {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.ptimeline {
  list-style: none;
  position: relative;
  max-width: 38rem;
  margin: 0 auto;
}
.pt-entry {
  display: grid;
  grid-template-columns: 7.5rem 2rem 1fr;
  align-items: baseline;
  padding: 1.5rem 0;
}
.pt-entry .marker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: right;
  padding-right: 1.2rem;
}
.pt-entry .node {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
  justify-self: center;
  align-self: center;
}
.pt-entry .event {
  padding-left: 1.3rem;
}
.pt-entry .event p {
  font-family: var(--display);
  font-weight: 360;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
}
.pt-entry .event p + p { margin-top: .4rem; color: var(--dim); }

.profile-card {
  max-width: 44rem;
  margin: 7rem auto 0;
  border: 1px solid rgba(223, 169, 63, .3);
  padding: 2.6rem 2.8rem;
  background: linear-gradient(180deg, rgba(223, 169, 63, .05), transparent);
}
.profile-card ul {
  list-style: none;
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .55rem 2rem;
}
.profile-card li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  padding-left: 1.1rem;
  position: relative;
}
.profile-card li::before {
  content: '';
  position: absolute;
  left: 0; top: .55em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

/* ————— 08 · personalization ————— */

.phase-grid {
  max-width: 62rem;
  margin: 6rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.phase {
  background: var(--ink);
  padding: 2.2rem 1.6rem;
}
.phase .microlabel { display: block; margin-bottom: 1.4rem; color: var(--gold); }
.phase ul { list-style: none; }
.phase li {
  font-size: .92rem;
  color: var(--dim);
  padding: .34rem 0;
}

/* ————— 09 · relationship graph ————— */

.graph-wrap {
  max-width: 66rem;
  margin: 5rem auto 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.graph {
  position: relative;
  aspect-ratio: 1 / .92;
  min-height: 380px;
}
#graphSvg { position: absolute; inset: 0; width: 100%; height: 100%; }
#graphSvg line {
  stroke: var(--faint);
  stroke-width: 1;
  opacity: .5;
  transition: stroke .5s ease, opacity .5s ease;
}
#graphSvg line.hot {
  stroke: var(--gold);
  opacity: .9;
  filter: drop-shadow(0 0 5px var(--gold-glow));
}
.graph-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 9.5rem; height: 9.5rem;
  border-radius: 50%;
  border: 1px solid rgba(223, 169, 63, .55);
  background: radial-gradient(circle, rgba(223, 169, 63, .12), rgba(5, 9, 16, .9) 70%);
  box-shadow: 0 0 50px rgba(223, 169, 63, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
}
.graph-center .display {
  font-size: 1.15rem;
  font-weight: 430;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gnode {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--hair);
  background: rgba(5, 9, 16, .85);
  padding: .4rem .65rem;
  white-space: nowrap;
  transition: color .4s ease, border-color .4s ease, box-shadow .4s ease;
  z-index: 3;
}
.gnode:hover { color: var(--white); border-color: var(--dim); }
.gnode.sel {
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(223, 169, 63, .25);
}
.graph-panel {
  border-left: 1px solid var(--hair);
  padding-left: 2.2rem;
  min-height: 20rem;
}
.graph-panel ul { list-style: none; margin-top: 1.6rem; }
.graph-panel li {
  font-family: var(--display);
  font-weight: 350;
  font-size: 1.02rem;
  color: var(--white);
  padding: .5rem 0;
  border-top: 1px solid var(--hair);
  opacity: 0;
  transition: opacity .6s ease;
}
.graph-panel li.lit { opacity: 1; }
.graph-panel li:first-child { border-top: none; }
#graphPanelTitle { font-size: 13px; }

/* ————— 10 · AI console ————— */

.console-shell { max-width: 46rem; margin: 5rem auto 0; }
.console-cats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
  margin-bottom: 2rem;
}
.console-cats button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--faint);
  padding: .4rem 0;
  border-bottom: 1px solid transparent;
  transition: color .4s ease, border-color .4s ease;
}
.console-cats button:hover { color: var(--dim); }
.console-cats button.sel { color: var(--gold); border-bottom-color: var(--gold); }

.console-qs {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 3rem;
}
.console-qs button {
  text-align: left;
  font-family: var(--display);
  font-weight: 350;
  font-size: 1.02rem;
  color: var(--dim);
  padding: .55rem .9rem;
  border: 1px solid transparent;
  transition: color .4s ease, border-color .4s ease;
}
.console-qs button:hover { color: var(--white); border-color: var(--hair); }
.console-qs button.sel { color: var(--gold); border-color: rgba(223, 169, 63, .35); }

.console { min-height: 15rem; }
.console .prompt {
  font-family: var(--mono);
  font-size: clamp(.92rem, 1.8vw, 1.1rem);
  letter-spacing: .04em;
  color: var(--gold);
  min-height: 3em;
}
.console .prompt::before { content: '›  '; color: var(--faint); }
.console .caret {
  display: inline-block;
  width: .55em; height: 1.1em;
  background: var(--gold);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.answer-tag {
  display: block;
  margin: 1.8rem 0 .9rem;
  opacity: 0;
  transition: opacity .8s ease;
}
.answer-tag.lit { opacity: 1; }
.console .answer {
  padding-left: 1.6rem;
  border-left: 1px solid rgba(223, 169, 63, .35);
  font-family: var(--display);
  font-weight: 350;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.8;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.console .answer.lit { opacity: 1; }

/* ————— 11 · scorecards ————— */

.dual-head { text-align: center; margin-bottom: 5rem; }
.dual-head .p1 { font-size: clamp(1.9rem, 4.6vw, 3.5rem); color: var(--dim); }
.dual-head .p2 { font-size: clamp(2rem, 5vw, 3.8rem); margin-top: .8rem; }

.scorecards {
  max-width: 62rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.scorecard { border: 1px solid var(--hair); padding: 2.6rem 2.6rem 2.2rem; }
.scorecard.business { border-color: var(--blue-dim); }
.scorecard.kingdom {
  border-color: rgba(223, 169, 63, .35);
  background: linear-gradient(180deg, rgba(223, 169, 63, .04), transparent);
}
.scorecard .microlabel { display: block; margin-bottom: 1.6rem; }
.scorecard.business .microlabel { color: var(--blue); }
.scorecard.kingdom .microlabel { color: var(--gold); }
.scorecard ul { list-style: none; }
.scorecard.business li {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  padding: .48rem 0;
  border-top: 1px solid var(--hair);
}
.scorecard.kingdom li {
  font-family: var(--display);
  font-style: italic;
  font-weight: 360;
  font-size: 1.05rem;
  color: var(--white);
  padding: .44rem 0;
  border-top: 1px solid rgba(223, 169, 63, .14);
}
.scorecard li:first-child { border-top: none !important; }
.score-note {
  text-align: center;
  margin-top: 2.6rem;
  font-size: .95rem;
  color: var(--dim);
}

/* ————— 12 · modules ————— */

.modules {
  max-width: 66rem;
  margin: 6rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.module { background: var(--ink); padding: 2.4rem 2rem; }
.module .mo {
  font-family: var(--display);
  font-weight: 420;
  font-size: 1.25rem;
  line-height: 1.3;
}
.module .mp {
  display: block;
  margin: .7rem 0 1.5rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
.module ul { list-style: none; }
.module li {
  font-size: .9rem;
  color: var(--dim);
  padding: .28rem 0;
}
.os-bar {
  max-width: 66rem;
  margin: 1px auto 0;
  border: 1px solid rgba(223, 169, 63, .5);
  background: linear-gradient(180deg, rgba(223, 169, 63, .08), rgba(223, 169, 63, .02));
  box-shadow: 0 0 50px rgba(223, 169, 63, .12);
  padding: 1.9rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
}
.os-bar .display { font-size: 1.4rem; font-weight: 440; color: var(--gold); }

/* ————— 13 · future-state rail ————— */

.rail-scroll {
  margin: 5.5rem auto 0;
  max-width: 74rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 1rem;
}
.rail-scroll::-webkit-scrollbar { height: 4px; }
.rail-scroll::-webkit-scrollbar-thumb { background: var(--faint); }
.rail-inner {
  position: relative;
  height: 15rem;
  width: max-content;
  padding: 0 4rem;
}
#railSvg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rail-steps { position: relative; height: 100%; display: flex; align-items: center; }
.rail-step {
  position: relative;
  width: 8.2rem;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rail-step .rdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}
.rail-step .rlbl {
  position: absolute;
  top: 50%;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.rail-step:nth-child(odd) .rlbl { transform: translateY(-3.1rem); }
.rail-step:nth-child(even) .rlbl { transform: translateY(1.7rem); }
.rail-os {
  position: absolute;
  left: 4rem; right: 4rem;
  bottom: .4rem;
  text-align: center;
  border-top: 1px solid rgba(223, 169, 63, .4);
  padding-top: .7rem;
  color: var(--gold);
}

/* ————— 14 · outcomes ————— */

.outcomes {
  max-width: 62rem;
  margin: 6rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.outcome { background: var(--ink); padding: 2.8rem 2.2rem; }
.outcome .ot {
  font-family: var(--display);
  font-weight: 430;
  font-size: 1.35rem;
  color: var(--gold);
}
.outcome p { margin-top: .9rem; font-size: .95rem; color: var(--dim); }

/* ————— 15 · the big idea ————— */

#s15 { gap: 0; }
.final-h { max-width: 58rem; }
.final-h .fl1 {
  display: block;
  font-size: clamp(1.9rem, 4.8vw, 3.7rem);
  color: var(--dim);
}
.final-h .fl2 {
  display: block;
  margin-top: .7em;
  font-size: clamp(2rem, 5.2vw, 4rem);
  font-style: italic;
  font-weight: 440;
  color: var(--gold);
  text-shadow: 0 0 70px rgba(223, 169, 63, .28);
}
.final-sub {
  max-width: 36rem;
  margin: 3rem auto 0;
  font-size: 1.05rem;
  color: var(--dim);
  line-height: 2;
}
.final-couplet { margin-top: 6rem; display: flex; flex-direction: column; gap: 1rem; }
.final-couplet .b1 { font-size: clamp(1.5rem, 3.4vw, 2.5rem); color: var(--dim); }
.final-couplet .b2 { font-size: clamp(1.7rem, 3.8vw, 2.9rem); }

.cta-row {
  margin-top: 4.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}
.cta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.25rem 2.2rem;
  border: 1px solid var(--faint);
  color: var(--dim);
  transition: all .5s ease;
}
.cta.primary { border-color: rgba(223, 169, 63, .55); color: var(--gold); }
.cta:hover, .cta:focus-visible {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 0 60px rgba(223, 169, 63, .3);
}

/* ————— letter ————— */

#note { padding-top: 4rem; }
.letter {
  max-width: 38rem;
  margin: 0 auto;
  border-top: 1px solid rgba(223, 169, 63, .35);
  padding-top: 3.5rem;
}
.letter p + p { margin-top: 1.3rem; }
#noteBody p {
  font-family: var(--display);
  font-weight: 350;
  font-size: 1.12rem;
  line-height: 1.9;
  margin-top: 1.3rem;
}
.letter-sig {
  margin-top: 2.8rem;
  font-style: italic;
  font-weight: 440;
  font-size: 1.7rem;
  color: var(--gold);
}
#noteSigLines { margin-top: .6rem; line-height: 2; letter-spacing: .22em; }

/* ————— discussion ————— */

#discussion { padding-top: 3rem; padding-bottom: 8rem; }
.disc-toggle {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  align-items: center;
  text-align: center;
  margin: 0 auto;
  padding: 2.6rem 3rem;
  border: 1px solid var(--hair);
  max-width: 40rem;
  width: 100%;
  transition: border-color .5s ease;
}
.disc-toggle:hover { border-color: rgba(223, 169, 63, .4); }
.disc-title { font-size: clamp(1.3rem, 2.8vw, 1.9rem); }
.disc-body {
  list-style: none;
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 0;
  counter-reset: dq;
}
.disc-body li {
  counter-increment: dq;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  padding: 1rem 0;
  border-top: 1px solid var(--hair);
  font-family: var(--display);
  font-weight: 350;
  font-size: 1.08rem;
  line-height: 1.7;
}
.disc-body li::before {
  content: counter(dq, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--gold);
  padding-top: .45em;
}

/* ————— footer ————— */

footer {
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  border-top: 1px solid var(--hair);
}
.foot-disclaimer {
  max-width: 40rem;
  margin: 1.6rem auto 0;
  font-size: .88rem;
  color: var(--dim);
  line-height: 1.8;
}

/* ————— presentation HUD ————— */

#hud[hidden], #hudList[hidden], #notesCard[hidden] { display: none !important; }

#hud {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: .3rem;
}
#hud button {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--dim);
  border: 1px solid var(--hair);
  background: rgba(5, 9, 16, .85);
  padding: .55rem .85rem;
  transition: color .3s ease, border-color .3s ease;
}
#hud button:hover { color: var(--gold); border-color: rgba(223, 169, 63, .4); }
#hudHint {
  position: fixed;
  right: 1.4rem;
  bottom: 4.4rem;
  letter-spacing: .14em;
  font-size: 9px;
  opacity: .6;
}
#hudList {
  position: fixed;
  right: 1.4rem;
  bottom: 4.4rem;
  background: rgba(5, 9, 16, .96);
  border: 1px solid var(--hair);
  padding: 1rem 0;
  max-height: 70vh;
  overflow-y: auto;
  min-width: 17rem;
}
#hudList button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: .45rem 1.2rem;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
#hudList button.cur { color: var(--gold); }

/* ————— speaker notes ————— */

#notesCard {
  position: fixed;
  left: 1.4rem;
  bottom: 1.4rem;
  z-index: 70;
  max-width: 22rem;
  background: rgba(5, 9, 16, .95);
  border: 1px solid rgba(223, 169, 63, .35);
  padding: 1.3rem 1.5rem;
}
#notesText {
  margin-top: .7rem;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--white);
}

/* ————— responsive ————— */

@media (max-width: 980px) {
  .tiers { grid-template-columns: 1fr; gap: 3rem; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .phase-grid { grid-template-columns: repeat(2, 1fr); }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .outcomes { grid-template-columns: repeat(2, 1fr); }
  .graph-wrap { grid-template-columns: 1fr; }
  .graph-panel { border-left: none; border-top: 1px solid var(--hair); padding: 2rem 0 0; min-height: 0; }
  .scorecards { grid-template-columns: 1fr; }
  #chapters .lbl { display: none; }
}

@media (max-width: 640px) {
  .act { padding: 7rem 1.2rem; }
  .pillars, .phase-grid, .modules, .outcomes { grid-template-columns: 1fr; }
  .jphase, .jstep { grid-template-columns: 3rem 1.6rem 1fr; }
  .pt-entry { grid-template-columns: 5rem 1.6rem 1fr; }
  .profile-card { padding: 1.8rem 1.4rem; }
  .profile-card ul { grid-template-columns: 1fr; }
  .syschip { font-size: 9px; padding: .32rem .5rem; letter-spacing: .08em; }
  .stage-caption {
    background: rgba(5, 9, 16, .9);
    padding: .6rem 1rem;
    bottom: 3vh;
  }
  .hero-topline { padding: 0 1rem; }
  .hero-topline .microlabel { letter-spacing: .18em; font-size: 9px; }
  #chapters { right: .7rem; }
  #hudHint { display: none; }
  #notesCard { max-width: calc(100vw - 2.8rem); }
  #thread .thread-core { opacity: .45; }
}

/* ————— reduced motion: sticky stages become plain stacked sections ————— */

body.rm #fracture-wrap, body.rm #connect-wrap { height: auto; }
body.rm .stage { position: static; height: auto; padding: 6rem 1.5rem; overflow: visible; }
body.rm .stage-head { position: static; margin-bottom: 3rem; }
body.rm .stage-head .verdict { position: static; opacity: 1; margin-top: 2rem; }
body.rm .stage-head .q { opacity: 1; }
body.rm .stage-caption, body.rm .connect-caption { position: static; opacity: 1; margin-top: 2.5rem; }
body.rm #tangleSvg, body.rm #connectSvg { display: none; }
body.rm .person-node { position: static; transform: none; margin: 0 auto 2rem; }
body.rm .syschip { position: static; transform: none; display: inline-block; margin: .25rem; opacity: 1; }
body.rm #chipField { text-align: center; }
body.rm .connect-line1, body.rm .connect-line2 {
  position: static; transform: none; opacity: 1; margin: 2rem auto;
}
body.rm .connect-viz { position: static; opacity: 1; }
body.rm .connect-key { position: static; margin: 2rem auto; }
body.rm .connect-chips { position: static; transform: none; width: auto; margin: 2rem auto; }
body.rm .rail-label { position: static; opacity: 1; margin-top: 1rem; }
body.rm #thread { display: none; }
body.rm #gatherCanvas { opacity: .35; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal, .hero-stage, .foundation span,
  .answer-tag, .console .answer, .graph-panel li {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
