/* ============================================================
   ThinkSystems.io — Hero v2 "Navigate the Field"
   Think ↑ · Trade → · Cypher ↓
   ============================================================ */
@import url('assets/tokens.css');

/* Self-hosted Playfair Display italic 900 — the Trading$yphers wordmark font.
   Bundled locally so it NEVER depends on Google Fonts loading (was falling back). */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 900;
  font-display: block;
  src: url('fonts/PlayfairDisplay-Italic900.ttf') format('truetype');
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: 'Inter', 'Noto Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Virtual scroll track — the journey length */
.scroll-spacer { height: 560vh; }

/* ============================================================
   STAGE — fixed viewport, everything renders here
   ============================================================ */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg-void);
}

/* ============================================================
   ENVIRONMENTS (destinations)
   ============================================================ */
.env {
  position: absolute;
  inset: 0;
  visibility: hidden;
  will-change: transform, opacity;
}
.env.on { visibility: visible; }

/* ---------- ENV THINK — Rosa dos Pensamentos ----------
   v2.8 — FULL interactive port from references/rosa-pensamentos-plant.html.
   Standalone flow colours are kept LOCAL to #env-think so nothing bleeds
   into hero globals; the reduced scroll-only rosa is superseded here. */
#env-think {
  background: radial-gradient(ellipse at 50% 30%, #0a0a15 0%, #050510 100%);
  /* standalone palette, scoped */
  --tmd-color: #0fb5a8;   /* dark aqua */
  --dmt-color: #b5304f;   /* wine */
  --rosa-sound-c: #9b59b6;
  --rosa-light-c: #f4d03f;
  --aether-ae: #e67e22;
  --aether-ther: #8e44ad;
  --rosa-glass-bg: rgba(15,15,25,0.6);
  --rosa-glass-border: rgba(255,255,255,0.08);
}
#plant-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* interactive light background (rosa.js toggles .active — Luz hover / DMT flow) */
.think-lightbg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: radial-gradient(ellipse at 50% 8%,
    rgba(244,208,63,0.5) 0%,
    rgba(244,208,63,0.15) 25%,
    transparent 50%);
}
.think-lightbg.active { opacity: 1; }

/* interactive sound ripples (rosa.js toggles .active — Som hover) */
.think-soundbg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.think-soundbg.active { opacity: 1; }
.think-soundbg .think-ripple {
  position: absolute;
  top: 73%; left: 50%; /* anchored near the Som node */
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--rosa-sound-c);
  opacity: 0;
  animation: rippleExpand 2s ease-out infinite;
}
.think-soundbg .think-ripple:nth-child(1) { animation-delay: 0s; }
.think-soundbg .think-ripple:nth-child(2) { animation-delay: 0.5s; }
.think-soundbg .think-ripple:nth-child(3) { animation-delay: 1s; }
.think-soundbg .think-ripple:nth-child(4) { animation-delay: 1.5s; }

.rosa-diagram {
  position: absolute;
  top: 17%; left: 50%; /* pulled down (operator 2026-07-15): clear of the site nav + THINK?SYS title */
  transform: translateX(-50%);
  width: min(540px, 80vw);
  height: min(58vh, 540px);
}
.rosa-node {
  position: absolute;
  width: 76px; height: 76px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  background: rgba(15,15,25,0.6);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255,255,255,0.1);
  opacity: 0;
  z-index: 20;
  cursor: pointer;
  transition: opacity 0.4s ease, box-shadow 0.5s ease, transform 0.5s cubic-bezier(0.175,0.885,0.32,1.275);
}
.rosa-node .sym { font-size: 1.3rem; margin-bottom: 2px; transition: all 0.3s ease; }
.rosa-node .nm {
  font-family: 'Barlow', sans-serif;
  font-size: 0.55rem; letter-spacing: 0.16em;
  text-transform: uppercase; opacity: 0.8;
}
/* hover lift (keeps the centring translate) */
#env-think .rosa-node:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 0 40px rgba(255,255,255,0.25);
}
#env-think .rosa-node[data-element="light"]:hover {
  box-shadow: 0 0 60px rgba(244,208,63,0.9), 0 0 100px rgba(244,208,63,0.9);
}
#env-think .rosa-node[data-element="sound"]:hover {
  box-shadow: 0 0 50px rgba(155,89,182,0.8), 0 0 80px rgba(155,89,182,0.8);
}

/* node-order badges — shown per active flow */
#env-think .node-order {
  position: absolute;
  top: -4px; right: -4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--rosa-glass-bg);
  border: 2px solid;
  font-size: 0.62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#env-think .node-order.tmd { border-color: var(--tmd-color); color: var(--tmd-color); }
#env-think .node-order.dmt { border-color: var(--dmt-color); color: var(--dmt-color); }
#rosa-diagram.tmd-mode .node-order.tmd,
#rosa-diagram.dmt-mode .node-order.dmt { opacity: 1; }

.rosa-aether {
  width: 96px; height: 96px;
  border-color: rgba(230,126,34,0.5);
  background: rgba(230,126,34,0.08);
  z-index: 15;
}
.rosa-aether .sym { color: #e67e22; text-shadow: 0 0 22px rgba(230,126,34,0.8); font-size: 1.7rem; transition: all 0.5s ease; }
.rosa-aether .nm { font-family: 'Cinzel', 'Barlow', serif; color: var(--gold-apex); }
/* ÆTHER dual-nature spin ring (AE orange + THER purple + DMT magenta) */
.rosa-aether::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--aether-ae) 0deg,
    var(--aether-ther) 120deg,
    var(--dmt-color) 240deg,
    var(--aether-ae) 360deg);
  z-index: -1;
  opacity: 0.35;
  animation: aetherSpin 25s linear infinite;
}
/* ÆTHER colour-shift by flow */
#rosa-diagram.tmd-mode .rosa-aether {
  border-color: var(--aether-ae);
  box-shadow: 0 0 40px rgba(230,126,34,0.2);
}
#rosa-diagram.dmt-mode .rosa-aether {
  border-color: var(--dmt-color);
  background: rgba(181,48,79,0.12);
  box-shadow: 0 0 40px rgba(181,48,79,0.3);
}
#rosa-diagram.dmt-mode .rosa-aether::before { opacity: 0.5; }
#rosa-diagram.dmt-mode .rosa-aether .sym {
  color: var(--dmt-color);
  text-shadow: 0 0 25px rgba(181,48,79,0.85);
}
@keyframes aetherSpin { to { transform: rotate(360deg); } }

/* VE geometry (operator 2026-07-16): TMD shows only the SQUARE; DMT shows only the
   DIAMOND, drawn as a DOUBLE PYRAMID (diamond + horizontal equator = two triangles). */
#env-think .ve-geometry {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 55%; height: 55%;
  pointer-events: none;
  z-index: 3;
}
/* no opacity transition — in this scroll-engine env a transition on the animated
   property is silently defeated (computed value sticks); toggle instantly instead. */
#env-think .ve-square, #env-think .ve-diamond { opacity: 0; }
#rosa-diagram.tmd-mode .ve-square { opacity: 1; }
#rosa-diagram.dmt-mode .ve-diamond { opacity: 1; }
#env-think .ve-square {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(212,175,55,0.18);
}
#env-think .ve-diamond {
  position: absolute; top: 50%; left: 50%;
  width: 70%; height: 70%;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid rgba(212,175,55,0.3);
}

.rosa-logo {
  position: absolute;
  top: 9%; left: 50%; /* below the fixed site nav (was 4.5%, colliding) */
  transform: translate(-50%, 0);
  font-family: 'Cinzel', 'Fredericka the Great', serif;
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #444;
  white-space: nowrap;
  z-index: 25;
  opacity: 0;
}
.rosa-logo .q { color: var(--gold-apex); text-shadow: 0 0 26px var(--gold-apex); transition: all 0.5s ease; }
.rosa-logo .q.question   { color: var(--tmd-color); text-shadow: 0 0 30px var(--tmd-color); }
.rosa-logo .q.exclamation{ color: var(--dmt-color); text-shadow: 0 0 30px var(--dmt-color); }

/* FLOW TOGGLE */
/* Flow toggle split to the SIDES (operator 2026-07-16): TMD flanks left, DMT flanks right,
   clearing the center (LUZ node + THINK?SYS title). The empty middle stays click-through. */
.rosa-flow {
  position: absolute;
  top: 42%; left: 50%;
  transform: translateX(-50%);
  width: min(600px, 90vw);
  display: flex; justify-content: space-between; align-items: center;
  z-index: 30;
  pointer-events: none;
}
/* Boxless flow controls (operator 2026-07-16): a chevron ‹ left of TMD, › right of DMT.
   No background/border — just the chevron + label, lit in the flow colour when active. */
.rosa-flowbtn {
  pointer-events: auto;
  background: none; border: none; padding: 4px 2px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  display: flex; align-items: center; gap: 22px;   /* chevron sits right next to the text */
  transition: color 0.35s ease;
}
.rosa-flowbtn .fcontent {
  display: flex; flex-direction: column; align-items: center; text-align: center;  /* text centred */
  font-family: 'Barlow', sans-serif; font-weight: 600; letter-spacing: 0.12em; line-height: 1.15;
}
.rosa-flowbtn .fi { font-size: 1.25rem; margin-bottom: 1px; }
.rosa-flowbtn .fn { font-size: 0.85rem; }
.rosa-flowbtn .fd { font-size: 0.55rem; opacity: 0.6; letter-spacing: 0.06em; }
/* CSS-drawn chevron (inherits button colour), bigger. Left button = ‹ , right button = › */
.rosa-flowbtn .fchev {
  width: 34px; height: 34px; flex-shrink: 0;
  border-style: solid; border-color: currentColor;
  border-width: 0 0 3.5px 3.5px;      /* bottom + left → ‹ */
  transform: rotate(45deg);
  opacity: 0.6; transition: opacity 0.35s ease, filter 0.35s ease;
}
#dmt-btn .fchev { border-width: 3.5px 3.5px 0 0; }  /* top + right → › */
.rosa-flowbtn:hover { color: rgba(255,255,255,0.8); }
.rosa-flowbtn:hover .fchev { opacity: 0.9; }
/* active — no box, chevron + label glow in the flow colour */
.rosa-flowbtn.active-tmd, .rosa-flowbtn.active-tmd:hover { color: var(--tmd-color); }
.rosa-flowbtn.active-tmd .fchev { opacity: 1; filter: drop-shadow(0 0 8px rgba(15,181,168,0.8)); }
.rosa-flowbtn.active-dmt, .rosa-flowbtn.active-dmt:hover { color: var(--dmt-color); }
.rosa-flowbtn.active-dmt .fchev { opacity: 1; filter: drop-shadow(0 0 8px rgba(181,48,79,0.8)); }

/* INFO PANEL */
.rosa-info {
  position: absolute;
  bottom: 4%; left: 50%;
  transform: translateX(-50%) translateY(20px);
  max-width: 420px; width: 90%;
  background: var(--rosa-glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--rosa-glass-border);
  border-radius: 14px;
  padding: 16px 20px;
  z-index: 100;
  opacity: 0; visibility: hidden;
  transition: all 0.4s ease;
}
.rosa-info.visible {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.rosa-info-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.rosa-info-title { font-family: 'Cinzel', serif; font-size: 1rem; color: var(--gold-apex); }
.rosa-info-close {
  background: none; border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.3rem; cursor: pointer;
}
.rosa-info-body { font-size: 0.8rem; line-height: 1.6; color: rgba(255,255,255,0.8); }
.rosa-info-body strong { color: var(--aether-ae); }

/* v2.1 — ambient light + sound ripple background (scroll-reveal; journeys.js
   drives inline opacity). Kept for the env fade-in. */
.rosa-light {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 6%,
    rgba(244,208,63,0.4) 0%,
    rgba(244,208,63,0.12) 25%,
    transparent 52%);
  will-change: opacity;
}
.rosa-sound {
  position: absolute;
  top: 97%; left: 50%; /* anchored on the Som node */
  width: 0; height: 0;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}
.rosa-sound .sound-ripple {
  position: absolute; top: 0; left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid #9b59b6;
  opacity: 0;
  animation: rippleExpand 2s ease-out infinite;
}
.rosa-sound .sound-ripple:nth-child(1) { animation-delay: 0s; }
.rosa-sound .sound-ripple:nth-child(2) { animation-delay: 0.5s; }
.rosa-sound .sound-ripple:nth-child(3) { animation-delay: 1s; }
.rosa-sound .sound-ripple:nth-child(4) { animation-delay: 1.5s; }
@keyframes rippleExpand {
  0%   { width: 20px;  height: 20px;  opacity: 0.7; }
  100% { width: 300px; height: 300px; opacity: 0; }
}

/* ---------- ENV TRADE — APHEX Office ---------- */
#env-trade { background: #06060c; }
.office-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
}
.office-wrap img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
.office-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(4,4,10,0.55) 0%, rgba(4,4,10,0.15) 30%, rgba(4,4,10,0.2) 62%, rgba(4,4,10,0.86) 100%),
    radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(4,4,10,0.5) 100%);
}

/* ---------- ENV CYPHER — VORTHEX tunnel + signal deck ---------- */
#env-cypher { background: #05050d; }
#tunnel-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cypher-shade {
  position: absolute; inset: 0;
  z-index: 4; /* above the tunnel canvas, below .division (z 6) */
  background:
    linear-gradient(180deg, rgba(4,4,12,0.6) 0%, rgba(4,4,12,0.3) 34%, rgba(4,4,12,0.45) 62%, rgba(4,4,12,0.9) 100%),
    radial-gradient(ellipse at 50% 42%, transparent 30%, rgba(4,4,12,0.65) 100%);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* ============================================================
   HERO LAYER (ported from Hero v1.15)
   ============================================================ */
#hero-layer {
  position: absolute; inset: 0;
  z-index: 10;
  will-change: transform, opacity;
}
#hero-bgs { position: absolute; inset: 0; will-change: transform, opacity; }

.bg-layer { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1); }
.bg-layer.active { opacity: 1; }

.bg-think {
  background:
    radial-gradient(ellipse at 65% 50%, rgba(139,150,150,0.05) 0%, transparent 55%),
    linear-gradient(180deg, #0d0d1a 0%, #08080f 100%);
}
.bg-think::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(45deg, rgba(233,30,99,0.05) 0px, rgba(233,30,99,0.05) 1px, transparent 1px, transparent 96px),
    linear-gradient(-45deg, rgba(233,30,99,0.05) 0px, rgba(233,30,99,0.05) 1px, transparent 1px, transparent 96px);
  mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
}
.bg-think::after {
  content: '';
  position: absolute; top: 50%; left: 0; right: 0; height: 1px;
  background-image: repeating-linear-gradient(to right, var(--spec-H) 0, var(--spec-H) 14px, transparent 14px, transparent 28px);
  opacity: 0.45;
}

/* Trade bg — also replicated on shards */
.bg-trade, .shard {
  background:
    linear-gradient(to right, rgba(65,105,225,0.07) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(to bottom, rgba(65,105,225,0.07) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(180deg, rgba(13,13,26,1) 0%, rgba(13,16,40,1) 35%, rgba(10,18,60,1) 70%, rgba(4,8,52,1) 100%);
}
.bg-trade::after {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 32px; width: 1px;
  background-image: repeating-linear-gradient(to bottom, rgba(65,105,225,0.4) 0, rgba(65,105,225,0.4) 2px, transparent 2px, transparent 36px);
}

.bg-cypher { background: var(--bg-void); }
#vorthex-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Cubes (Think) */
.cubes-container {
  position: absolute; inset: 0;
  perspective: 1400px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.9s ease;
  z-index: 2;
  will-change: transform, opacity;
}
.cubes-container.active { opacity: 1; }
.cube { position: absolute; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(0.4,0,0.2,1); }
.cube-face { position: absolute; border: 1px solid rgba(139,150,150,0.16); }

/* Scan overlay (Trade) */
.scan-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
  z-index: 3;
}
.scan-overlay.active { opacity: 1; }
.ctr-reticle {
  position: absolute;
  width: 120px; height: 120px;
  top: 50%; left: 60%;
  transform: translate(-50%, -50%);
  will-change: top, left, transform;
}
.ctr-line { position: absolute; background: rgba(0,255,255,0.55); }
.ctr-v { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
.ctr-h { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.ctr-tip { position: absolute; background: var(--ctr-active); width: 8px; height: 1px; }
.ctr-tip.t { top: 0; left: 50%; transform: translateX(-50%) rotate(90deg); }
.ctr-tip.b { bottom: 0; left: 50%; transform: translateX(-50%) rotate(90deg); }
.ctr-tip.l { left: 0; top: 50%; transform: translateY(-50%); }
.ctr-tip.r { right: 0; top: 50%; transform: translateY(-50%); }
@keyframes scanPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}
.scan-overlay.active .ctr-reticle { animation: scanPulse 3.2s ease-in-out infinite; }
.scan-overlay.locked .ctr-reticle { animation: none; opacity: 1; }
.scan-overlay.locked .ctr-line { background: rgba(0,255,255,0.95); box-shadow: 0 0 8px rgba(0,255,255,0.8); }
.snp-tag {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 4px 10px;
  background: var(--snp-bg);
  color: var(--snp-text);
  font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 11px; letter-spacing: 0.18em;
  border: 1px solid var(--snp-border);
  display: flex; align-items: center; gap: 8px;
}
.snp-tag .val { font-family: 'JetBrains Mono', monospace; color: var(--blue-snp); font-weight: 500; }

/* ============================================================
   SHATTER FX (Trade journey)
   ============================================================ */
#shatter {
  position: absolute; inset: 0;
  z-index: 4;
  pointer-events: none;
  display: none;
}
#shatter.on { display: block; }
.shard {
  position: absolute; inset: 0;
  will-change: transform, opacity;
}
#crack-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
#crack-svg line, #crack-svg polyline {
  stroke: rgba(210,245,255,0.85);
  stroke-width: 1.2;
  fill: none;
  filter: drop-shadow(0 0 3px rgba(0,255,255,0.6));
}
#flash {
  position: absolute; inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(circle at var(--fx, 60%) var(--fy, 50%), rgba(255,255,255,0.95) 0%, rgba(190,235,255,0.5) 18%, transparent 55%);
  opacity: 0;
}

/* ============================================================
   HERO UI (word triad, descriptions)
   ============================================================ */
#hero-ui {
  position: absolute; inset: 0;
  z-index: 10;
  will-change: transform, opacity;
}
.main {
  position: relative;
  width: 100%; height: 100%;
  padding: 110px 64px 120px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 32px;
}
.stage-words {
  position: relative;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding-left: 40px;
}
.word-triad { display: flex; flex-direction: column; align-items: flex-end; }
.word {
  display: flex; align-items: center; gap: 26px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.4s ease;
  padding: 6px 0;
}
.word:hover, .word.active { opacity: 1; }
.word-text {
  font-family: 'Fredericka the Great', serif;
  font-weight: 400; letter-spacing: 0.005em; line-height: 0.9;
  transition: text-shadow 0.4s ease;
}
.word-think .word-text { font-size: 92px; color: var(--text-primary); }
.word-trade .word-text { font-size: 74px; color: #FF7A2A; }
.word-cypher .word-text { font-size: 120px; color: var(--blue-bravo); }
.word.active .word-text { text-shadow: 0 0 44px var(--glow); }
.word-think  { --glow: rgba(255,255,255,0.45); }
.word-trade  { --glow: rgba(255,122,42,0.55); }
.word-cypher { --glow: rgba(30,111,255,0.6); }
.word-dot {
  width: 18px; height: 18px; flex-shrink: 0;
  transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
  background: var(--dot-rest);
}
.word.active .word-dot, .word:hover .word-dot {
  transform: rotate(45deg);
  background: var(--dot-on);
  box-shadow: 0 0 18px var(--dot-glow), 0 0 40px var(--dot-glow-dim);
}
.dot-white { --dot-rest: #2a2d28; --dot-on: var(--text-primary); --dot-glow: rgba(255,255,255,0.7); --dot-glow-dim: rgba(255,255,255,0.3); }
.dot-blue  { --dot-rest: #2a1808; --dot-on: #FF7A2A;             --dot-glow: rgba(255,122,42,0.8); --dot-glow-dim: rgba(255,122,42,0.4); }
.dot-gold  { --dot-rest: #0a1330; --dot-on: var(--blue-bravo);   --dot-glow: rgba(30,111,255,0.8); --dot-glow-dim: rgba(30,111,255,0.4); }

.footer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: end;
}
/* Logo aligns relative to the brief BELOW it (think left · trade right · cypher center),
   so the title's box matches the body's box width. */
.description { max-width: 600px; display: flex; flex-direction: column; align-items: flex-start; }
.desc-eyebrow {
  font-family: 'Barlow', sans-serif;
  font-weight: 500; font-size: 10.5px; letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
  align-self: center; text-align: center;
  transition: color 0.5s ease;
}
.desc-title {
  font-family: 'Barlow', sans-serif;
  font-weight: 800; font-size: 34px; letter-spacing: 0.005em;
  color: var(--text-primary);
  margin-bottom: 16px;
  transition: color 0.5s ease;
  /* first stance: the .description block stays LEFT (operator 2026-07-15); only the
     LOGOTYPE aligns per brand relative to its brief — think left / trade right / cypher center */
  align-self: stretch; text-align: left;
}
/* Justify keyed to the LOGO shown (set by setDescription), NOT the selected background,
   so hover-previewing Trade shows APEX right even while Think is selected. */
#desc-title[data-logo="trade"] { text-align: right; }
#desc-title[data-logo="cypher"] { text-align: center; }
.desc-body {
  font-family: 'Inter', sans-serif;
  font-weight: 400; font-size: 15px; line-height: 1.75;
  color: rgba(255,255,255,0.72);
  align-self: stretch; text-align: left; /* body fills the description box; title right-aligns to this same edge */
}
.desc-body em { font-style: normal; font-weight: 500; color: var(--accent, var(--gold-apex)); }

#connection-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 11;
  transition: opacity 0.4s ease;
}

/* DC rail (Cypher) */
.dc-rail {
  position: absolute;
  top: 50%; right: 40px;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 8;
  pointer-events: none;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(13,13,26,0.55), rgba(13,13,26,0.85));
  border: 1px solid rgba(255,215,0,0.12);
  backdrop-filter: blur(10px);
}
.dc-rail.active { opacity: 1; }
.dc-agent { display: grid; grid-template-columns: 22px 64px 64px; gap: 8px; align-items: center; font-size: 11px; }
.dc-agent .sym { font-family: 'Noto Sans', sans-serif; font-size: 17px; text-align: center; line-height: 1; }
.dc-agent .lbl { font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; }
.dc-agent .px { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.55); text-align: right; }

/* ============================================================
   PERSISTENT CHROME
   ============================================================ */
#site-chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 30px 64px 0;
  pointer-events: none;
}
#site-chrome > * { pointer-events: auto; }
.site-nav { display: flex; align-items: center; justify-content: center; }
.site-nav a {
  font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 10px; letter-spacing: 0.22em;
  color: rgba(255,255,255,0.42);
  text-decoration: none; text-transform: uppercase;
  padding: 6px 12px;
  transition: color 200ms ease;
  white-space: nowrap;
}
.site-nav a:hover { color: rgba(255,255,255,0.9); }
.nav-sep { width: 1px; height: 10px; background: rgba(255,255,255,0.1); }
.nav-cta {
  color: #FFD700 !important;
  border: 1px solid rgba(255,215,0,0.35);
  box-shadow: 0 0 10px rgba(255,215,0,0.1);
}
.nav-cta:hover { background: rgba(255,215,0,0.06); border-color: rgba(255,215,0,0.6); box-shadow: 0 0 18px rgba(255,215,0,0.22); }
/* NOTE: no transition on transform here — in this scroll-engine env a transition on the
   animated property silently defeats it (computes to identity). setBrandMark sets it instant. */
.brand-mark { justify-self: end; display: flex; align-items: center; gap: 16px; }
.brand-dot { width: 18px; height: 18px; transform: rotate(45deg); transition: all 0.6s cubic-bezier(0.4,0,0.2,1); }
.brand-text {
  font-family: 'Fredericka the Great', serif;
  font-size: 44px;
  letter-spacing: 0.015em; line-height: 1; white-space: nowrap;
  transition: color 0.5s ease, text-shadow 0.5s ease;
  color: var(--text-primary);
  text-shadow: 0 0 30px rgba(255,255,255,0.3);
}

/* FM strip */
.fm-strip {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  display: flex;
  z-index: 45;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.04);
}
.fm-cell {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-right: 1px solid rgba(255,255,255,0.04);
  font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 9px; letter-spacing: 0.25em;
  color: rgba(255,255,255,0.2);
  transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
}
.fm-cell:last-child { border-right: none; }
.fm-cell .swatch { width: 6px; height: 6px; background: var(--zone-color); opacity: 0.4; transition: opacity 0.5s ease; }
.fm-cell.lit { color: var(--zone-color); background: var(--zone-bg, transparent); }
.fm-cell.lit .swatch { opacity: 1; box-shadow: 0 0 8px var(--zone-color); }

/* Compass HUD */
#compass {
  position: absolute;
  right: 28px; bottom: 48px;
  z-index: 46;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
#compass-ring {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at center, rgba(13,13,26,0.9) 58%, transparent 59%),
    conic-gradient(var(--ring-c, #fff) calc(var(--ring-p, 0) * 1turn), rgba(255,255,255,0.08) 0);
  border: 1px solid rgba(255,255,255,0.08);
}
#compass-arrow {
  font-size: 19px;
  color: var(--ring-c, #fff);
  text-shadow: 0 0 12px var(--ring-c, #fff);
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
#compass-label {
  font-family: 'Barlow', sans-serif;
  font-size: 8.5px; font-weight: 600; letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* Axis hint */
#axis-hint {
  position: absolute;
  bottom: 52px; left: 50%;
  transform: translateX(-50%);
  z-index: 46;
  font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 10px; letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(13,13,26,0.6);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  transition: opacity 0.5s ease;
}

/* ============================================================
   DIVISION CONTENT PANELS
   ============================================================ */
.division {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: flex-start;
  padding: 100px 64px 72px;
  pointer-events: none;
  will-change: transform, opacity;
  opacity: 0;
}
.division > * { pointer-events: auto; }
.div-eyebrow {
  font-family: 'Barlow', sans-serif;
  font-weight: 600; font-size: 10.5px; letter-spacing: 0.34em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.div-title {
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
  margin-bottom: 16px;
}
.div-body {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px; line-height: 1.7;
  color: rgba(255,255,255,0.72);
  max-width: 520px;
  margin-bottom: 26px;
}
.div-body em { font-style: normal; font-weight: 500; }
.div-cards { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.div-card {
  width: 230px;
  padding: 16px 18px;
  background: rgba(13,13,26,0.66);
  border: 1px solid rgba(255,255,255,0.09);
  border-top: 2px solid var(--card-accent, var(--gold-apex));
  backdrop-filter: blur(12px);
}
.div-card h4 {
  font-family: 'Barlow', sans-serif;
  font-weight: 700; font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--card-accent, var(--gold-apex));
  margin-bottom: 7px;
  display: flex; align-items: center; gap: 8px;
}
.div-card h4 .tag {
  margin-left: auto;
  font-size: 8px; letter-spacing: 0.2em;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.85;
}
.div-card p { font-size: 12px; line-height: 1.6; color: rgba(255,255,255,0.62); }
a.div-card { text-decoration: none; display: block; color: inherit; cursor: pointer; }
a.div-card:hover { border-color: var(--card-accent, var(--gold-apex)); box-shadow: 0 0 22px rgba(0,255,21,0.12); }
.div-card .card-more {
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: rgba(255,215,0,0.65);
}
.div-stats {
  display: flex; gap: 34px;
  margin-bottom: 26px;
  font-family: 'Barlow', sans-serif;
}
.div-stat .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 21px;
  color: var(--stat-c, var(--gold-apex));
  text-shadow: 0 0 16px var(--stat-c, var(--gold-apex));
}
.div-stat .l {
  font-size: 8.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 3px;
}
.div-cta {
  font-family: 'Barlow', sans-serif;
  font-weight: 700; font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cta-c, var(--gold-apex));
  border: 1px solid var(--cta-c, var(--gold-apex));
  padding: 14px 26px;
  background: rgba(13,13,26,0.55);
  transition: all 0.3s ease;
}
.div-cta:hover { background: var(--cta-c, var(--gold-apex)); color: #0d0d1a; box-shadow: 0 0 30px var(--cta-c, var(--gold-apex)); }
.div-foot {
  margin-top: 26px;
  font-family: 'Fredericka the Great', serif;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
}
.div-foot b { color: rgba(255,255,255,0.6); font-weight: 400; }

/* per-division accents */
#div-think  { --card-accent: #cfd6dd; --stat-c: #ffffff; --cta-c: #ffffff; }
#div-think .div-eyebrow { color: rgba(255,255,255,0.5); }
#div-think .div-title { color: #fff; font-family: 'Fredericka the Great', serif; font-weight: 400; }
#div-trade  { --card-accent: var(--gold-trigger); --stat-c: var(--gold-apex); --cta-c: var(--gold-trigger); }
#div-trade .div-eyebrow { color: rgba(255,176,122,0.75); }
#div-cypher { --card-accent: var(--blue-bravo); --stat-c: var(--blue-bravo); --cta-c: var(--blue-bravo); }
#div-cypher .div-eyebrow { color: rgba(135,206,250,0.7); }
#div-cypher .div-title { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 900; }

/* v2.1.3 — Trading$yphers lockup: BYTE-FAITHFUL to the standalone
   "Trading Syphers Logotype.html" (T$ Design System). Shared by BOTH stances
   (first: #desc-title · second: #div-cypher .div-title). Values copied verbatim
   from the source file — same wordmark clamp, same stream widths, same gradients. */
.ts-lockup {
  display: inline-flex; flex-direction: column; /* inline-flex → obeys the parent's text-align */
  align-items: center; justify-content: center;
  padding: 8px 0;
}
/* First stance (#desc-title): a compact header-sized lockup, not the full 84px hero size */
#desc-title .ts-lockup .wordmark { font-size: clamp(30px, 4.4vw, 50px); }
#desc-title .ts-lockup .stream-line { width: 380px; }
#desc-title .ts-lockup .s-orange { width: 250px; }
#desc-title .ts-lockup .s-red { width: 130px; }
.ts-lockup .stream-line {
  display: block;
  width: 660px; max-width: calc(100% - 40px);
  height: 2.5px; border-radius: 2px;
  pointer-events: none;
}
.ts-lockup .s-orange {
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,140,0,0.5) 8%,
    #FFB058 38%, #FF6600 62%, rgba(255,140,0,0.5) 92%, transparent 100%);
  box-shadow: 0 0 12px rgba(255,140,0,0.5), 0 0 28px rgba(255,102,0,0.2);
  width: 440px;
  margin-bottom: 7px;
}
.ts-lockup .s-green {
  background: linear-gradient(90deg,
    transparent 0%, rgba(18,87,20,0.5) 8%,
    #39C55A 38%, #00ff15 62%, rgba(57,197,90,0.5) 92%, transparent 100%);
  box-shadow: 0 0 10px rgba(57,197,90,0.5), 0 0 24px rgba(0,255,21,0.18);
  margin-bottom: 5px;
}
.ts-lockup .s-navy {
  background: linear-gradient(90deg,
    transparent 0%, rgba(0,0,128,0.5) 8%,
    #4169E1 38%, #0022FF 62%, rgba(0,0,128,0.5) 92%, transparent 100%);
  box-shadow: 0 0 12px rgba(0,34,255,0.55), 0 0 28px rgba(65,105,225,0.25);
  margin-top: 5px;
}
.ts-lockup .s-red {
  background: linear-gradient(90deg,
    transparent 0%, #8B0000 8%,
    #FF2222 38%, #FF4500 62%, #8B0000 92%, transparent 100%);
  box-shadow: 0 0 10px rgba(255,34,34,0.5), 0 0 26px rgba(139,0,0,0.25);
  width: 220px;
  margin-top: 7px;
}
.ts-lockup .wordmark {
  display: block;
  /* Georgia fallback (NOT Fredericka) so a Playfair load-fail never renders the sketchy font */
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-style: italic; font-weight: 900;
  font-size: clamp(44px, 11vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.005em; white-space: nowrap;
  text-align: center; overflow: visible;
  color: initial; /* neutralize the h2/.div-title inherited color so the gradients clip */
}
.ts-lockup .w-T {
  -webkit-text-fill-color: #FF7A2A; color: #FF7A2A;
  -webkit-text-stroke: 1.5px #FF9A5A;
  text-shadow: 0 0 1px #FF7A2A, 0 0 18px rgba(255,122,42,0.6), 0 0 44px rgba(255,122,42,0.25);
}
.ts-lockup .w-rest,
.ts-lockup .w-rest2 {
  background: linear-gradient(180deg,
    #ffffff 0%, #f6faff 18%, #b9c4d6 42%, #ffffff 62%, #d0d8e8 82%, #8c98ac 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.4));
}
.ts-lockup .w-S {
  background: linear-gradient(180deg, #87CEEB 0%, #4169E1 50%, #0022FF 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 22px rgba(0,34,255,0.6), 0 0 46px rgba(65,105,225,0.3);
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.6)) drop-shadow(0 0 8px rgba(0,34,255,0.5));
  display: inline-block; padding: 0 0.08em; margin: 0 0.03em;
}

/* signal deck variations */
#div-cypher .div-card { border-top-width: 2px; }
#div-cypher .sig-dir { display: flex; gap: 10px; margin: 6px 0 8px; }
#div-cypher .sig-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 2px;
}
#div-cypher .sig-up { background: rgba(0,255,21,0.12); color: var(--green-tmd); border: 1px solid rgba(0,255,21,0.4); }
#div-cypher .sig-dn { background: rgba(255,34,34,0.1); color: var(--red-median); border: 1px solid rgba(255,34,34,0.4); }

/* ============================================================
   v2.1 STANCE ALIGNMENT — per-brand vectors
   think = left (base defaults) · trade = right · cypher = center
   ============================================================ */
/* second stance (divisions) — ID-scoped, .division base untouched */
#div-trade { align-items: flex-end; text-align: right; justify-content: center; } /* right + y-axis centered (operator photo 2026-07-15) */
#div-trade .div-cards, #div-trade .div-stats,
#div-trade .div-cta, #div-trade .div-foot { justify-content: flex-end; }
#div-cypher { align-items: center; text-align: center; }
#div-cypher .div-cards, #div-cypher .div-stats,
#div-cypher .div-cta, #div-cypher .div-foot { justify-content: center; }

/* first stance (hero, pre-cinematic): ALWAYS left — identical for think/trade/cypher
   (operator 2026-07-15: vectorial justification applies ONLY to the second stance,
   after the transition; no per-brand first-stance rules). */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
  .word-think .word-text { font-size: 70px; }
  .word-trade .word-text { font-size: 56px; }
  .word-cypher .word-text { font-size: 92px; }
  .brand-text { font-size: 34px; }
  .main { padding: 100px 40px 110px; }
  #site-chrome { padding: 24px 40px 0; }
  .division { padding: 90px 40px 64px; }
  .dc-rail { right: 24px; padding: 12px 14px; }
}
@media (max-width: 900px) {
  .word-think .word-text { font-size: 52px; }
  .word-trade .word-text { font-size: 42px; }
  .word-cypher .word-text { font-size: 68px; }
  .brand-text { font-size: 26px; }
  .site-nav { display: none; }
  .dc-rail { display: none; }
  .footer-row { grid-template-columns: 1fr; gap: 16px; }
  .div-cards { flex-direction: column; gap: 8px; margin-bottom: 14px; }
  .div-card { width: 100%; max-width: 360px; padding: 10px 14px; }
  .div-card p { font-size: 11px; }
  .div-title { font-size: clamp(26px, 7vw, 34px); margin-bottom: 10px; }
  .div-body { font-size: 12.5px; margin-bottom: 14px; }
  .div-stats { gap: 22px; margin-bottom: 16px; }
  .div-stat .n { font-size: 16px; }
  .div-foot { margin-top: 14px; font-size: 11px; }
  .division { justify-content: flex-end; padding-bottom: 64px; }
  #axis-hint { bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .scan-overlay.active .ctr-reticle { animation: none; }
  .rosa-sound .sound-ripple { animation: none; }
  .think-soundbg .think-ripple { animation: none; }
  .rosa-aether::before { animation: none; }
}
