/* ============================================================
   RCCE — Signature components
   #2 Re-Forge  ·  #3 Loom Graph  ·  #4 Frontier Ridge  ·  Proof
   ============================================================ */

/* ============================================================
   #2 · THE RE-FORGE — scroll-scrubbed then→now transformation
   ============================================================ */
.reforge-stage { position: relative; max-width: 980px; margin-inline: auto; padding-left: 18px; }
.reforge-legend {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-4);
  margin-bottom: var(--space-5); padding: 0 4px;
}
.leg-then { text-align: right; font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--stone-400); }
.leg-now  { text-align: left;  font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--arcane-400); }
.leg-thread { width: 60px; height: 2px; background: repeating-linear-gradient(90deg, var(--arcane-500) 0 4px, transparent 4px 9px); box-shadow: 0 0 8px rgba(61,166,245,.6); }

.reforge-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rf-row {
  display: grid; grid-template-columns: 110px 1fr 64px 1fr; align-items: center; gap: var(--space-4);
  padding: 14px 18px; border-radius: var(--radius-2);
  background: linear-gradient(90deg, rgba(20,23,42,.4), rgba(14,16,36,.2));
  border: 1px solid var(--stone-700);
  position: relative;
}
.rf-key {
  font-family: var(--font-display-chiseled); font-weight: 700; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brass-500);
}
.rf-then {
  text-align: right; font-size: 14px; color: var(--stone-400);
  filter: grayscale(1) brightness(.85); transition: filter .5s var(--ease-out), opacity .5s;
}
.rf-then small { display: block; font-size: 11px; color: var(--stone-500); margin-top: 2px; }
.rf-now {
  display: flex; flex-direction: column; gap: 2px;
  opacity: .25; transform: translateX(-8px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.rf-now b { font-size: 15px; font-weight: 700; color: var(--stone-300); transition: color .55s var(--ease-out), text-shadow .55s; }
.rf-now small { font-size: 12px; color: var(--stone-500); transition: color .55s; }

/* the connector arc (then → now) */
.rf-arc { position: relative; height: 2px; }
.rf-arc::before {
  content: ""; position: absolute; inset: 0 6px;
  background: repeating-linear-gradient(90deg, var(--stone-500) 0 3px, transparent 3px 8px);
  transition: background .5s var(--ease-out);
}
.rf-arc::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 7px; height: 7px;
  border-radius: 50%; background: var(--stone-500); transform: translateY(-50%) scale(.7);
  transition: background .5s, box-shadow .5s, transform .5s;
}

/* lit state — applied progressively by reforge.js */
.rf-row.lit {
  border-color: var(--arcane-800);
  background: linear-gradient(90deg, rgba(20,23,42,.35), rgba(17,38,79,.4));
  box-shadow: 0 0 0 1px rgba(61,166,245,.18), 0 0 28px rgba(61,166,245,.1);
}
.rf-row.lit .rf-then { filter: grayscale(1) brightness(.7); opacity: .5; }
.rf-row.lit .rf-now { opacity: 1; transform: none; }
.rf-row.lit .rf-now b { color: var(--arcane-200); text-shadow: 0 0 18px rgba(61,166,245,.5); }
.rf-row.lit .rf-now small { color: var(--arcane-300); }
.rf-row.lit .rf-arc::before { background: repeating-linear-gradient(90deg, var(--arcane-500) 0 4px, transparent 4px 9px); }
.rf-row.lit .rf-arc::after { background: var(--arcane-400); box-shadow: 0 0 12px rgba(61,166,245,.9); transform: translateY(-50%) scale(1); }

/* vertical progress meter on the left edge */
.reforge-meter {
  position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
  background: rgba(201,164,74,.16); border-radius: 2px; overflow: hidden;
}
.rf-meter-fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 0%;
  background: linear-gradient(180deg, var(--arcane-400), var(--arcane-700));
  box-shadow: 0 0 12px rgba(61,166,245,.8);
}

@media (max-width: 720px){
  .rf-row { grid-template-columns: 1fr; gap: 6px; text-align: left; }
  .rf-then { text-align: left; }
  .rf-arc { display: none; }
  .reforge-legend { display: none; }
  .rf-now { transform: none; }
}

/* ============================================================
   #3 · THE LOOM GRAPH — buildable systems as connected threads
   ============================================================ */
.loom {
  position: relative;
  display: grid; grid-template-columns: 1fr 320px; gap: var(--space-6);
  align-items: stretch;
  margin-top: var(--space-4);
}
.loom-stagewrap { position: relative; }
.loom-threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.loom-thread-line { stroke: var(--arcane-800); stroke-width: 1.4; fill: none; opacity: .35; transition: stroke .3s, opacity .3s, stroke-width .3s; }
.loom-thread-line.hot { stroke: var(--arcane-400); opacity: 1; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(61,166,245,.8)); stroke-dasharray: 5 6; animation: threadFlow 1.1s linear infinite; }
@keyframes threadFlow { to { stroke-dashoffset: -22; } }

.loom-nodes {
  position: relative; z-index: 2; min-height: 540px;
  border: 1px solid var(--stone-700); border-radius: var(--radius-3);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(43,120,199,.1), transparent 60%),
    linear-gradient(180deg, rgba(14,16,36,.5), rgba(8,9,15,.4));
  overflow: hidden;
}
.loom-nodes::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(201,164,74,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(201,164,74,.05) 1px, transparent 1px);
  background-size: 38px 38px;
}
.loom-node {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 6px; z-index: 3;
  transition: transform .25s var(--ease-out);
}
.loom-node-core {
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 12px; position: relative;
  background: linear-gradient(180deg, #2a3150, #141a30);
  border: 1px solid var(--stone-500);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -2px 0 rgba(0,0,0,.5), 0 3px 8px rgba(0,0,0,.5);
  color: var(--arcane-300);
  transition: border-color .25s, box-shadow .25s, color .25s, background .25s;
}
.loom-node-core svg { width: 26px; height: 26px; }
.loom-node-label {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--fg-dim); white-space: nowrap; transition: color .25s; text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.loom-node[data-core="true"] .loom-node-core {
  background: linear-gradient(180deg, #c9a44a, #7a5821); border-color: var(--brass-800); color: var(--ink-900);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 1px var(--brass-700), 0 0 18px rgba(201,164,74,.4);
}
.loom-node[data-core="true"] .loom-node-label { color: var(--brass-300); }
.loom-node:hover { transform: translate(-50%, -50%) scale(1.06); }
.loom-node.active .loom-node-core, .loom-node:hover .loom-node-core {
  border-color: var(--arcane-400); color: var(--arcane-100);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px var(--arcane-500), 0 0 22px rgba(61,166,245,.6);
}
.loom-node.active .loom-node-label, .loom-node:hover .loom-node-label { color: var(--arcane-100); }
.loom-node[data-core="true"].active .loom-node-core, .loom-node[data-core="true"]:hover .loom-node-core {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 1px var(--brass-400), 0 0 26px rgba(201,164,74,.7);
}
.loom-node.dim { opacity: .28; filter: saturate(.5); }

/* readout panel — in-world slab */
.loom-readout {
  align-self: stretch; padding: var(--space-6);
  background: rgba(20,23,42,.92); backdrop-filter: blur(8px);
  border: 1px solid var(--brass-700); border-radius: var(--radius-2);
  box-shadow: inset 0 0 0 1px rgba(201,164,74,.16), 0 6px 24px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
}
.readout-hint { color: var(--fg-dim); font-style: italic; font-family: var(--font-serif); font-size: 18px; margin: auto; text-align: center; }
.readout-eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brass-500); margin: 0 0 6px; }
.readout-title { font-family: var(--font-display-chiseled); font-weight: 700; font-size: 22px; letter-spacing: .03em; text-transform: uppercase; color: var(--parchment-100); margin: 0 0 12px; }
.readout-desc { font-size: 14px; line-height: 1.6; color: var(--parchment-200); margin: 0 0 16px; }
.readout-links { margin-top: auto; }
.readout-links-h { font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-dim); margin: 0 0 8px; }
.readout-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.readout-chip {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--arcane-200); background: rgba(61,166,245,.12);
  border: 1px solid var(--arcane-700); border-radius: var(--radius-pill); padding: 4px 11px;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.readout-chip:hover { background: rgba(61,166,245,.25); border-color: var(--arcane-500); color: #fff; }
.loom-foot { text-align: center; max-width: 760px; margin: var(--space-10) auto 0; color: var(--fg-muted); font-size: var(--type-md); }
.loom-foot b { color: var(--arcane-300); }

@media (max-width: 900px){
  .loom { grid-template-columns: 1fr; }
  .loom-nodes { min-height: 460px; }
  .loom-readout { min-height: 160px; }
}
@media (max-width: 560px){
  .loom-node-core { width: 44px; height: 44px; }
  .loom-node-core svg { width: 21px; height: 21px; }
  .loom-node-label { font-size: 9.5px; }
}

/* ============================================================
   #4 · THE FRONTIER RIDGE — platform maturity as terrain
   ============================================================ */
.ridge { margin: 0 0 var(--space-20); }
.ridge-cap {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brass-500); text-align: center; margin-bottom: var(--space-4);
}
.ridge-scene {
  position: relative; height: 360px; max-width: 1100px; margin-inline: auto;
  border-bottom: 1px solid var(--stone-600);
}
.ridge-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ridge-ground { fill: url(#gStable); stroke: var(--arcane-500); stroke-width: 2; filter: drop-shadow(0 0 14px rgba(61,166,245,.4)); }
.ridge-bridge { fill: none; stroke: var(--brass-500); stroke-width: 3; stroke-dasharray: 10 9; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(201,164,74,.5)); animation: bridgeBuild 3s var(--ease-soft) infinite; }
@keyframes bridgeBuild { to { stroke-dashoffset: -38; } }
.ridge-peak { fill: rgba(58,55,54,.25); stroke: var(--stone-400); stroke-width: 1.5; stroke-dasharray: 4 5; }

.ridge-markers { position: absolute; inset: 0; }
.ridge-pin {
  position: absolute; transform: translate(-50%, 0);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.pin-stable  { left: 15%; top: 30%; }
.pin-alpha   { left: 47%; top: 44%; }
.pin-horizon { left: 84%; top: 20%; }
.ridge-pin::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: var(--stone-700); border: 2px solid var(--stone-400);
  transition: all .3s var(--ease-out);
}
.pin-stable::after { background: var(--arcane-500); border-color: var(--arcane-300); box-shadow: 0 0 0 4px rgba(61,166,245,.2), 0 0 16px rgba(61,166,245,.7); }
.pin-alpha::after { background: var(--brass-500); border-color: var(--brass-300); box-shadow: 0 0 0 4px rgba(201,164,74,.18), 0 0 14px rgba(201,164,74,.6); }
.pin-horizon::after { background: var(--stone-700); border-color: var(--stone-400); border-style: dashed; }
.pin-flag {
  font-family: var(--font-display-chiseled); font-weight: 700; font-size: 13px; letter-spacing: .04em;
  color: var(--parchment-100); text-shadow: 0 1px 4px rgba(0,0,0,.9); white-space: nowrap;
}
.pin-tag {
  font-family: var(--font-sans); font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid;
}
.tag-stable { color: var(--arcane-200); background: rgba(61,166,245,.15); border-color: var(--arcane-700); }
.tag-alpha { color: var(--brass-200); background: rgba(201,164,74,.15); border-color: var(--brass-700); }
.tag-horizon { color: var(--stone-200); background: rgba(79,75,72,.2); border-color: var(--stone-500); }
.ridge-pin.is-open { filter: brightness(1.15); }
.ridge-pin.is-open::after { transform: scale(1.25); }

.ridge-detail {
  max-width: 680px; margin: var(--space-8) auto 0; min-height: 64px;
  text-align: center;
}
.ridge-detail p { font-size: var(--type-lg); line-height: 1.55; color: var(--parchment-200); margin: 0; }
.ridge-detail b { color: var(--parchment-100); }

@media (max-width: 720px){
  .ridge-scene { height: 260px; }
  .pin-flag { font-size: 11px; }
  .ridge-detail p { font-size: var(--type-md); }
}

/* ============================================================
   PROOF — engineering culture, movement made visible
   ============================================================ */
.proof { max-width: 880px; margin-inline: auto; }
.proof-head { text-align: center; color: var(--brass-400); margin-bottom: var(--space-8); }
.proof-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.proof-item {
  display: grid; grid-template-columns: 92px 1fr; align-items: start; gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(90deg, rgba(20,23,42,.5), rgba(14,16,36,.25));
  border: 1px solid var(--stone-700); border-left: 2px solid var(--arcane-700);
  border-radius: var(--radius-2);
  transition: border-color .3s, transform .3s;
}
.proof-item:hover { border-left-color: var(--arcane-400); transform: translateX(4px); }
.proof-item div { font-size: 14.5px; line-height: 1.55; color: var(--parchment-200); }
.proof-item b { color: var(--parchment-100); }
.proof-tick {
  font-family: var(--font-sans); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 0; text-align: center; border-radius: var(--radius-1);
  border: 1px solid; align-self: start;
}
.proof-tick[data-status="new"]      { color: var(--arcane-200); background: rgba(61,166,245,.14); border-color: var(--arcane-700); }
.proof-tick[data-status="ongoing"]  { color: #9ce39e; background: rgba(76,174,79,.13); border-color: #2d6c30; }
.proof-tick[data-status="hardened"] { color: var(--brass-200); background: rgba(201,164,74,.14); border-color: var(--brass-700); }
.proof-tick[data-status="open"]     { color: var(--xp-violet); background: rgba(122,78,201,.16); border-color: #4a2f80; }

@media (max-width: 560px){
  .proof-item { grid-template-columns: 1fr; gap: var(--space-2); }
  .proof-tick { justify-self: start; padding: 4px 12px; }
}

/* ============================================================
   WORLDS — real-world evidence (screenshots from a built game)
   Shown through the game's own in-world window chrome:
   stone panel + brass double-border, chamfered corners.
   ============================================================ */
.worlds { margin-top: var(--space-20); }
.worlds-head { max-width: 760px; margin: 0 auto var(--space-10); text-align: center; }
.worlds-title {
  font-family: var(--font-display-ornate); font-weight: 400;
  font-size: clamp(28px, 4.6vw, var(--type-4xl)); line-height: 1.05;
  letter-spacing: var(--track-tight); text-transform: none;
  color: var(--parchment-100); margin: var(--space-2) 0 var(--space-4);
  text-shadow: 0 2px 0 rgba(0,0,0,.7), 0 8px 28px rgba(0,0,0,.55);
}
.worlds-intro { color: var(--fg-muted); font-size: var(--type-lg); }

/* the in-world window frame — matches the client's stone+brass chrome */
.ingame-frame {
  position: relative; padding: 7px;
  background:
    linear-gradient(180deg, #2a2f44, #14172a) padding-box,
    linear-gradient(180deg, var(--brass-500), var(--brass-800)) border-box;
  border: 2px solid transparent; border-radius: var(--radius-2);
  box-shadow:
    inset 0 0 0 1px rgba(201,164,74,.25),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 2px 0 rgba(0,0,0,.7), 0 14px 34px rgba(0,0,0,.55);
}
.ingame-frame img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-1);
  image-rendering: auto;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6);
}

/* world map — the high-res centerpiece */
.world-map { margin: 0 auto var(--space-12); max-width: 920px; }
.world-map figcaption {
  margin-top: var(--space-4); text-align: center;
  font-family: var(--font-serif); font-style: italic; font-size: var(--type-lg);
  color: var(--parchment-200);
}
.map-pin { color: var(--brass-500); font-style: normal; font-size: .7em; margin-right: 6px; filter: drop-shadow(0 0 6px rgba(201,164,74,.5)); }

/* three in-game plates — near native resolution, no ugly upscaling */
.world-plates {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1180px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6);
}
.world-plate { display: flex; flex-direction: column; }
.world-plate .ingame-frame { transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.world-plate:hover .ingame-frame {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px rgba(201,164,74,.35), 0 2px 0 rgba(0,0,0,.7), 0 18px 40px rgba(0,0,0,.6), 0 0 26px rgba(201,164,74,.16);
}
.plate-tag {
  align-self: start; margin-top: var(--space-4);
  font-family: var(--font-display-chiseled); font-weight: 700;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-200);
  padding: 4px 12px; border: 1px solid var(--brass-700); border-radius: var(--radius-pill);
  background: rgba(201,164,74,.1);
}
.plate-cap { margin: var(--space-3) 0 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-dim); }
.plate-cap b { color: var(--parchment-100); font-weight: 600; }

.worlds-credit {
  margin: var(--space-12) auto 0; text-align: center; max-width: 640px;
  font-size: var(--type-xs); color: var(--fg-dim); letter-spacing: .02em;
}
.worlds-credit a { color: var(--brass-300); border-bottom-color: var(--brass-700); }
.worlds-credit a:hover { color: var(--brass-200); }

@media (max-width: 820px){
  .world-plates { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .world-plates .world-plate:last-child { grid-column: 1 / -1; max-width: 360px; margin-inline: auto; }
}
@media (max-width: 480px){
  .world-plates { grid-template-columns: 1fr; }
  .world-plates .world-plate:last-child { max-width: none; }
}
