/* ============ The Golden Thread · Thompson Spencer for SkyCity ============ */

:root {
  --ink: #0b0a08;
  --ink-2: #141210;
  --paper: #ede8db;
  --paper-dim: #b9b2a2;
  --gold: #d8b94d;
  --gold-hi: #f4e3a1;
  --gold-deep: #8a6b2f;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Inter", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.loader-line {
  width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent);
  animation: loaderGrow 0.9s ease forwards;
}
@keyframes loaderGrow { to { width: 42vw; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 38px;
  mix-blend-mode: difference;
}
.ts-logo { height: 12px; width: auto; aspect-ratio: 196.83 / 11.9; fill: var(--paper); opacity: 0.95; }
.cic {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--paper-dim);
}

/* ---------- Rail nav ---------- */
.rail {
  position: fixed; right: 30px; top: 50%; transform: translateY(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 26px;
  align-items: center;
}
.rail-track {
  position: absolute; top: -12px; bottom: -12px; width: 1px;
  background: rgba(237,232,219,0.12);
}
.rail-fill {
  width: 100%; height: 0%;
  background: linear-gradient(var(--gold-hi), var(--gold));
  box-shadow: 0 0 8px rgba(216,185,77,0.7);
}
.rail-dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(237,232,219,0.25); text-decoration: none;
  transition: background 0.3s, box-shadow 0.3s;
}
.rail-dot span {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--paper-dim); opacity: 0; transition: opacity 0.3s;
  white-space: nowrap;
}
.rail-dot:hover span, .rail-dot.active span { opacity: 1; }
.rail-dot.active { background: var(--gold); box-shadow: 0 0 10px rgba(216,185,77,0.8); }

/* ---------- Thread layers ---------- */
#thread {
  position: absolute; top: 0; left: 0; z-index: 5;
  pointer-events: none; overflow: visible;
}
#sparkles {
  position: fixed; inset: 0; z-index: 6; pointer-events: none;
}

/* Thread node markers (invisible anchors) */
.tn { position: absolute; width: 1px; height: 1px; visibility: hidden; }

/* Readability scrims: invisible against the flat ink background,
   they sit between the thread and the text so the gold dims under copy */
#scrims { position: absolute; top: 0; left: 0; width: 100%; z-index: 7; pointer-events: none; }
.scrim { position: absolute; background: rgba(11,10,8,0.68); border-radius: 30px; filter: blur(16px); }

/* Soft halo so copy holds contrast where the thread still crosses */
main p, main li, main h2, .ch-tag, footer p {
  text-shadow: 0 1px 3px rgba(11,10,8,0.9), 0 0 14px rgba(11,10,8,0.8);
}

/* ---------- Shared type ---------- */
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 clamp(22px, 5vw, 60px); position: relative; z-index: 10; }
section { position: relative; }

.eyebrow {
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 26px; font-weight: 500;
}
h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  max-width: 18ch;
}
.body-l {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--paper-dim);
  max-width: 58ch;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 1; filter: blur(70px) saturate(0.4); opacity: 0.55; }
.blob { position: absolute; border-radius: 50%; }
.b1 { width: 55vw; height: 55vw; left: -12vw; top: -18vw; background: radial-gradient(circle, #2e2b26, transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 48vw; height: 48vw; right: -14vw; top: 12vh; background: radial-gradient(circle, #26221c, transparent 65%); animation: drift2 32s ease-in-out infinite alternate; }
.b3 { width: 40vw; height: 40vw; left: 22vw; bottom: -22vh; background: radial-gradient(circle, #35301f, transparent 60%); animation: drift1 38s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(9vw, 6vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-7vw, -5vh) scale(0.9); } }

.hero-inner { position: relative; z-index: 10; padding: 0 20px; }
.hero-eyebrow { margin-bottom: 5vh; }
.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(52px, 11vw, 148px);
  line-height: 0.98;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.hero-title .ht-line { display: inline-block; }
.hero-flourish { width: min(680px, 82vw); margin: 3.2vh auto 0; display: block; overflow: visible; }
.hero-sub { margin-top: 3.6vh; color: var(--paper-dim); font-size: clamp(15px, 1.6vw, 18px); }
.sc-inline { color: var(--gold-hi); }
.hero-pmm {
  margin-top: 4.5vh; display: flex; gap: 18px; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold);
}
.hero-pmm i { width: 42px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-deep), transparent); }

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 10; text-align: center;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--paper-dim);
}
.cue-line {
  width: 1px; height: 54px; margin: 12px auto 0;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 40% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1) translateY(16px); opacity: 0; } }

/* ---------- Tension ---------- */
.tension { padding: 22vh 0 20vh; }
.strands-wrap { position: relative; margin: 9vh 0 7vh; }
.strands { width: 100%; height: clamp(200px, 34vw, 330px); display: block; overflow: visible; }
.strand {
  fill: none; stroke: var(--gold); stroke-width: 1.4;
  stroke-opacity: 0.75;
}
.markets {
  list-style: none;
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  pointer-events: none;
}
.markets li {
  font-family: var(--serif); font-size: clamp(15px, 2vw, 22px);
  color: var(--paper);
  background: rgba(11,10,8,0.72);
  border: 1px solid rgba(216,185,77,0.28);
  padding: 6px 18px; border-radius: 40px;
  width: max-content;
  backdrop-filter: blur(4px);
}
.tension-copy { margin-top: 4vh; }

/* ---------- Chapters ---------- */
.chapter { padding: 24vh 0 22vh; }
.ch-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; margin-bottom: 5vh; }
.ch-num {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(20px, 2.4vw, 30px); color: var(--gold);
}
.ch-title {
  font-family: var(--serif); font-weight: 300; text-transform: uppercase;
  font-size: clamp(58px, 9vw, 120px); line-height: 0.95; letter-spacing: 0.02em;
}
.ch-tag {
  flex-basis: 100%;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(18px, 2.2vw, 26px); color: var(--gold-hi);
}
.ch-intro { margin-bottom: 9vh; }

/* Play steps */
.steps {
  list-style: none;
  border-left: 1px solid rgba(216,185,77,0.25);
  margin-left: 6px;
  max-width: 640px;
}
.steps li {
  position: relative;
  padding: 0 0 34px 34px;
  color: var(--paper-dim);
  font-size: clamp(14px, 1.5vw, 16.5px);
}
.steps li::before {
  content: "";
  position: absolute; left: -5px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink);
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 0 rgba(216,185,77,0);
}
.steps li em {
  display: block;
  font-family: var(--serif); font-style: normal;
  font-size: clamp(18px, 2vw, 23px);
  color: var(--paper); margin-bottom: 2px;
}

/* SkyCity callout */
.sc-callout {
  margin-top: 10vh;
  border: 1px solid rgba(216,185,77,0.3);
  background: linear-gradient(135deg, rgba(216,185,77,0.07), rgba(216,185,77,0.015) 55%);
  border-radius: 4px;
  padding: clamp(24px, 3.4vw, 42px);
  display: flex; gap: clamp(18px, 3vw, 36px); align-items: center;
  max-width: 820px;
}
.sc-mark { flex: 0 0 auto; width: clamp(70px, 8vw, 104px); height: auto; fill: var(--gold); opacity: 0.95; }
.sc-callout p { color: var(--paper-dim); font-size: clamp(14.5px, 1.5vw, 17px); }
.sc-callout strong { color: var(--paper); font-weight: 500; }

/* Make: four I's */
.fourI { position: relative; max-width: 800px; margin: 0 auto 10vh; min-height: 460px; }
.fourI-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ilink { fill: none; stroke: var(--gold); stroke-opacity: 0.35; stroke-width: 1; }
.inode {
  position: absolute; width: min(230px, 44vw);
  text-align: center; transform: translate(-50%, -50%);
}
.inode h3 {
  font-family: var(--serif); font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: clamp(16px, 1.9vw, 21px);
  color: var(--gold-hi); margin-bottom: 6px;
}
.inode h3::after {
  content: ""; display: block; width: 26px; height: 1px; margin: 10px auto 0;
  background: var(--gold-deep);
}
.inode p { font-size: 13.5px; color: var(--paper-dim); margin-top: 8px; }
.n1 { left: 50%; top: 12%; }
.n2 { left: 22%; top: 52%; }
.n3 { left: 78%; top: 52%; }
.n4 { left: 50%; top: 88%; }

/* Prism: one idea, an ecosystem of channels, a non-linear journey */
.prism { margin: 0 0 12vh; }
.prism-stage { position: relative; aspect-ratio: 1000 / 560; margin: 4vh 0 3vh; }
.prism-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spoke { fill: none; stroke: var(--gold); stroke-opacity: 0.22; stroke-width: 1; }
.jseg { fill: none; stroke: var(--gold-hi); stroke-opacity: 0.85; stroke-width: 1.6; stroke-dasharray: 5 7; stroke-linecap: round; }
.jspark { fill: #f7ecc4; filter: drop-shadow(0 0 6px rgba(244,227,161,0.95)); }
.pnode { fill: var(--ink); stroke: var(--gold-hi); stroke-width: 1.6; filter: drop-shadow(0 0 6px rgba(216,185,77,0.8)); }
.pnode-label {
  position: absolute; left: 50%; top: 47.8%; transform: translate(-50%, 16px);
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  white-space: nowrap;
}
.pchip {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: clamp(11px, 1.5vw, 17px);
  color: var(--paper);
  background: rgba(11,10,8,0.72);
  border: 1px solid rgba(216,185,77,0.28);
  padding: 4px 12px; border-radius: 40px;
  white-space: nowrap;
}
.pchip svg {
  width: clamp(11px, 1.4vw, 15px); height: clamp(11px, 1.4vw, 15px);
  fill: none; stroke: var(--gold-hi); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto;
}
.prism-copy { color: var(--paper-dim); font-size: clamp(13px, 1.4vw, 15.5px); max-width: 58ch; }
@media (max-width: 600px) {
  .pchip { padding: 3px 8px; gap: 5px; }
  .pnode-label { display: none; }
}

/* 70/20/10 */
.alloc { max-width: 680px; }
.alloc-title { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2.4vw, 27px); margin-bottom: 4vh; }
.bars { display: flex; flex-direction: column; gap: 22px; }
.bar { position: relative; height: 46px; }
.bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, rgba(138,107,47,0.55), rgba(216,185,77,0.85));
  border-radius: 2px;
}
.bar[data-w="20"] .bar-fill { opacity: 0.65; }
.bar[data-w="10"] .bar-fill { opacity: 0.45; }
.bar-num {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: 21px; color: var(--ink);
  font-weight: 500; z-index: 2; mix-blend-mode: normal; color: #0b0a08;
}
.bar-label {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-dim);
  white-space: nowrap;
}
.alloc-note { margin-top: 3.4vh; color: var(--paper-dim); font-size: 15px; max-width: 52ch; }

/* Move */
.disciplines { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.6vw, 34px); margin-bottom: 10vh; }
.disc {
  border-top: 1px solid rgba(216,185,77,0.35);
  padding-top: 20px;
}
.disc-k {
  display: block; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.disc p { font-size: 14.5px; color: var(--paper-dim); }

.loop-wrap { max-width: 700px; margin: 0 auto 4vh; text-align: center; }
.loop { width: 100%; overflow: visible; }
#loop-path { stroke: var(--gold); stroke-width: 1.6; stroke-opacity: 0.8; }
.loop-label { fill: var(--gold-hi); font-family: var(--serif); font-style: italic; font-size: 19px; }
.loop-arrow { fill: var(--gold); }
.loop-copy { color: var(--paper-dim); font-size: 15px; margin-top: 2vh; }

/* ---------- Close ---------- */
.close { padding: 26vh 0 10vh; text-align: center; }
.close-title { margin: 0 auto; }
.close-copy { margin: 5vh auto 8vh; }
.close-markets {
  position: static; flex-direction: row; justify-content: center; gap: 14px; flex-wrap: wrap;
  display: flex; list-style: none;
}
.lockup {
  display: flex; align-items: center; justify-content: center; gap: clamp(22px, 4vw, 46px);
  margin: 38vh 0 54vh;
}
.lock-ts { height: clamp(40px, 6vw, 64px); width: auto; aspect-ratio: 272.02 / 66; fill: var(--paper); }
.lock-sc { height: clamp(44px, 6.6vw, 72px); width: auto; fill: var(--paper); }
footer p { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(185,178,162,0.55); padding-bottom: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .rail { display: none; }
  .desk-only { display: none; }
  .disciplines { grid-template-columns: 1fr; }
  .fourI { min-height: 560px; }
  .sc-callout { flex-direction: column; align-items: flex-start; }
  .markets li { font-size: 13px; padding: 4px 12px; }
  .site-header { padding: 20px 22px; }
}

@media (max-height: 620px) {
  .scroll-cue { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .blob, .cue-line, .loader-line { animation: none !important; }
  #thread, #sparkles { display: none; }
  #loader { display: none; }
}
