/* ================================================================
   SINGULARITY RACE — Main Stylesheet
   Aesthetic: Mission Control Cosmograph
   Fonts: Bebas Neue (display) · IBM Plex Mono (data) · DM Sans (body)
   ================================================================ */

:root {
  --bg-void:       #020208;
  --bg-deep:       #050510;
  --bg-space:      #0a0a1a;
  --bg-card:       rgba(8, 10, 26, 0.88);
  --bg-card-hover: rgba(12, 15, 35, 0.92);

  --blue:          #00e5cc;
  --blue-dim:      rgba(0, 229, 204, 0.35);
  --blue-glow:     rgba(0, 229, 204, 0.12);
  --blue-faint:    rgba(0, 229, 204, 0.05);

  --green:         #00ff88;
  --green-dim:     rgba(0, 255, 136, 0.25);
  --green-glow:    rgba(0, 255, 136, 0.08);

  --gold:          #c4a265;
  --gold-dim:      rgba(196, 162, 101, 0.3);
  --gold-glow:     rgba(196, 162, 101, 0.06);

  --orange:        #ff9a3c;
  --orange-dim:    rgba(255, 154, 60, 0.25);

  --muted-border:  rgba(255, 255, 255, 0.06);
  --muted-text:    #4a5068;
  --dim-text:      #6a7080;
  --body-text:     #8890a8;
  --primary-text:  #dde2f0;

  --completed:     #5a7090;
  --completed-dim: rgba(90, 112, 144, 0.2);

  --font-display:  'Bebas Neue', 'Arial Narrow', 'Impact', sans-serif;
  --font-mono:     'IBM Plex Mono', 'Menlo', 'Consolas', 'Courier New', monospace;
  --font-body:     'DM Sans', 'Inter', 'system-ui', sans-serif;

  --nav-h:         60px;
  --spine-x:       72px;
  --card-pad:      36px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; color-scheme: dark; }
body {
  background: var(--bg-void);
  color: var(--primary-text);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ================================================================
   BACKGROUND LAYERS
   ================================================================ */

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-gradient {
  background:
    radial-gradient(ellipse 60% 40% at 15% 55%, rgba(0,229,204,0.025) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 45%, rgba(80,0,180,0.025) 0%, transparent 70%),
    var(--bg-void);
}

.scanlines {
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px
  );
  opacity: 0.6;
  z-index: 1;
}

/* ================================================================
   STICKY NAVIGATION
   ================================================================ */

.mission-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  background: rgba(2, 2, 8, 0.94);
  border-bottom: 1px solid rgba(0, 229, 204, 0.08);
  backdrop-filter: blur(24px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 200px;
}

.nav-sigil {
  font-size: 20px;
  color: var(--blue);
  line-height: 1;
  opacity: 0.8;
}

.nav-wordmark {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--dim-text);
  white-space: nowrap;
}

/* Timeline bar */
.nav-bar {
  flex: 1;
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}

.nav-track {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  /* Full gradient always visible as a dim guide */
  background: linear-gradient(90deg,
    rgba(0,229,204,0.22)  0%,
    rgba(0,229,204,0.22)  25%,
    rgba(0,255,136,0.22)  37.5%,
    rgba(255,154,60,0.22) 50%,
    rgba(255,154,60,0.22) 87.5%,
    rgba(196,162,101,0.22) 100%
  );
}

.nav-fill {
  height: 1px;
  width: 0%;
  /* Same gradient — background-size is stretched via JS so stops align with dots */
  background: linear-gradient(90deg,
    var(--blue)   0%,
    var(--blue)   25%,
    var(--green)  37.5%,
    var(--orange) 50%,
    var(--orange) 87.5%,
    var(--gold)   100%
  );
  background-size: 10000% 100%; /* overridden by JS once scroll starts */
  background-repeat: no-repeat;
  background-position: 0 0;
  box-shadow: 0 0 5px rgba(255,255,255,0.3);
  transition: width 0.12s linear;
}

.nav-nodes {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 0 6px;
  position: relative;
}
.nav-node:hover { transform: translateY(-2px); }

.nav-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.08);
  background: var(--bg-void);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  color: var(--muted-text);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.nav-node.completed .nav-dot {
  border-color: var(--blue-dim);
  color: var(--blue);
}
.nav-node.active .nav-dot {
  border-color: var(--green);
  color: var(--green);
  background: var(--bg-void);
  box-shadow: inset 0 0 0 22px rgba(0,255,136,0.1), 0 0 14px rgba(0,255,136,0.4);
}
.nav-node.active .nav-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,136,0.25);
  animation: ring-expand 2s ease-out infinite;
}
.nav-node.approaching .nav-dot,
.nav-node.upcoming .nav-dot {
  border-color: rgba(255,154,60,0.5);
  color: var(--orange);
}
.nav-node.destination .nav-dot {
  border-color: rgba(196,162,101,0.5);
  color: var(--gold);
  background: var(--bg-void);
  box-shadow: inset 0 0 0 22px rgba(196,162,101,0.06);
}

.nav-node-tip {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  color: transparent;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav-node.active .nav-node-tip {
  color: var(--green);
}

/* Status indicator */
.nav-live {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  min-width: 150px;
  justify-content: flex-end;
}
.live-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: dot-blink 1.6s ease-in-out infinite;
}
.live-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--green);
}

.nav-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  outline: none;
  color: var(--body-text);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  padding: 5px 11px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.nav-share-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--primary-text);
}
.nav-share-btn:active {
  background: rgba(255, 255, 255, 0.03);
}
.nav-share-btn.share-copied {
  background: rgba(0, 255, 136, 0.06);
  border-color: rgba(0, 255, 136, 0.25);
  color: var(--green);
}

.share-wrap {
  position: relative;
  flex-shrink: 0;
}

.share-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: rgba(8, 10, 26, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  padding: 4px;
  display: none;
  z-index: 300;
}
.share-wrap.share-open .share-menu {
  display: block;
  animation: share-drop 0.15s ease-out;
}
@keyframes share-drop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--body-text);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 12px;
  text-align: left;
  transition: background 0.1s, color 0.1s;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.share-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--primary-text);
}
.share-item svg {
  flex-shrink: 0;
  opacity: 0.5;
}
.share-item:hover svg {
  opacity: 0.8;
}

/* ================================================================
   HERO
   ================================================================ */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 32px;
  max-width: 1000px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--dim-text);
  margin-bottom: 28px;
}
.eyebrow-rule {
  flex: 0 0 48px;
  height: 1px;
}
.eyebrow-rule.left  { background: linear-gradient(90deg, transparent, var(--blue-dim)); }
.eyebrow-rule.right { background: linear-gradient(90deg, var(--blue-dim), transparent); }

.hero-title {
  line-height: 0.88;
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}
.t-road {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 150px);
  background: linear-gradient(
    135deg,
    #8a9ab8 0%,  #8a9ab8 18%,
    #b8c4d8 28%, #dde2f0 38%,
    #eef0f7 44%, #ffffff 50%,
    #eef0f7 56%, #dde2f0 62%,
    #b8c4d8 72%, #8a9ab8 82%,
    #8a9ab8 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 400% 100%;
  background-repeat: no-repeat;
  animation: shimmer-gold 9s linear infinite;
}
.t-to {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 68px);
  letter-spacing: 0.35em;
  background: linear-gradient(
    135deg,
    #006b60 0%,  #006b60 18%,
    #00a898 28%, #00e5cc 38%,
    #66f5e6 44%, #ffffff 50%,
    #66f5e6 56%, #00e5cc 62%,
    #00a898 72%, #006b60 82%,
    #006b60 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 400% 100%;
  background-repeat: no-repeat;
  animation: shimmer-gold 9s linear infinite;
}
.t-singularity {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 150px);
  background: linear-gradient(
    135deg,
    #006b60 0%,  #006b60 18%,
    #00a898 28%, #00e5cc 38%,
    #aaf5ec 44%, #ffffff 50%,
    #aaf5ec 56%, #00e5cc 62%,
    #00a898 72%, #006b60 82%,
    #006b60 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 400% 100%;
  background-repeat: no-repeat;
  animation: shimmer-gold 9s linear infinite;
}

.hero-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--body-text);
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}
.blink {
  color: var(--blue);
  animation: cursor-blink 1s step-end infinite;
}

.hero-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--blue);
  padding: 7px 18px;
  border: 1px solid var(--blue-dim);
  border-radius: 6px;
  background: var(--blue-faint);
}
.indicator-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  animation: dot-blink 1.5s ease-in-out infinite;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--blue);
}
.scroll-chevron {
  font-size: 20px;
  animation: chevron-bounce 2s ease-in-out infinite;
}

/* ================================================================
   MAIN TIMELINE CONTAINER
   ================================================================ */

.timeline-wrap {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  padding-bottom: 0;
}

/* Vertical spine */
.spine {
  position: absolute;
  left: var(--spine-x);
  top: 0; bottom: 0;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255,255,255,0.18) 4%,
    rgba(255,255,255,0.12) 92%,
    transparent 100%
  );
  z-index: 0;
}

/* ================================================================
   PHASE SECTIONS (phases 1–4)
   ================================================================ */

.phase-wrap {
  position: relative;
  padding: 48px 48px 96px calc(var(--spine-x) + 52px);
  /* opacity/transform managed by GSAP — default is visible */
}

/* Large gap below section 05 so user fully reads it before horizontal gallery */
#seqPhases {
  padding-bottom: 220px;
}

/* decorative giant phase number — hidden */
.phase-ghost-num {
  display: none;
}

/* spine connector dot */
.spine-dot {
  position: absolute;
  left: calc(var(--spine-x) - 7px);
  top: 66px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: var(--bg-void);
  z-index: 3;
}
.spine-dot::before {
  content: '';
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 1px;
  background: rgba(255,255,255,0.12);
}

.phase-wrap.completed .spine-dot  { border-color: var(--blue-dim); }
.phase-wrap.active-phase .spine-dot {
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(0,255,136,0.45);
}
.phase-wrap.active-phase .spine-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,136,0.2);
  animation: ring-expand 2s ease-out infinite;
}
.phase-wrap.approaching .spine-dot { border-color: rgba(255,154,60,0.45); }

/* YOU ARE HERE banner */
.you-are-here {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--green);
  padding: 5px 14px;
  border: 1px solid rgba(0,255,136,0.35);
  border-radius: 6px;
  background: var(--green-glow);
  margin-bottom: 16px;
  animation: yah-glow 3s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
.yah-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: dot-blink 1.4s ease-in-out infinite;
}

/* ---- Phase Card ---- */
.phase-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 128px 1fr;
  grid-template-areas:
    "meta body"
    "meta stocks";
  gap: 0;
  background: var(--bg-card);
  border: none;
  border-radius: 16px;
}
/* Liquid glass border — ::after floats above all column backgrounds */
.phase-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.10) 35%,
    rgba(255,255,255,0.02) 60%,
    rgba(255,255,255,0.12) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
}

.phase-wrap.completed .phase-card { opacity: 1; }
.phase-wrap.completed .phase-card::after {
  background: linear-gradient(
    135deg,
    rgba(90,112,144,0.55) 0%,
    rgba(90,112,144,0.12) 35%,
    rgba(90,112,144,0.02) 60%,
    rgba(90,112,144,0.15) 100%
  );
}
.phase-wrap.active-phase .phase-card {
  box-shadow: 0 0 60px rgba(0,255,136,0.04), inset 0 0 60px rgba(0,255,136,0.015);
}
.phase-wrap.active-phase .phase-card::after {
  background: linear-gradient(
    135deg,
    rgba(0,255,136,0.55) 0%,
    rgba(0,255,136,0.12) 35%,
    rgba(0,255,136,0.02) 60%,
    rgba(0,255,136,0.15) 100%
  );
}
.phase-wrap.approaching .phase-card { opacity: 1; }
.phase-wrap.approaching .phase-card::after {
  background: linear-gradient(
    135deg,
    rgba(255,154,60,0.55) 0%,
    rgba(255,154,60,0.12) 35%,
    rgba(255,154,60,0.02) 60%,
    rgba(255,154,60,0.15) 100%
  );
}
.phase-wrap.upcoming .phase-card { opacity: 1; }
.phase-wrap.upcoming .phase-card::after {
  background: linear-gradient(
    135deg,
    rgba(255,154,60,0.55) 0%,
    rgba(255,154,60,0.12) 35%,
    rgba(255,154,60,0.02) 60%,
    rgba(255,154,60,0.15) 100%
  );
}

/* Left meta column */
.phase-meta {
  grid-area: meta;
  padding: var(--card-pad) 20px;
  border-right: 1px solid var(--muted-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  background: rgba(0,0,0,0.15);
  border-radius: 16px 0 0 16px;
}
.phase-num {
  font-family: var(--font-display);
  font-size: 62px;
  line-height: 1;
  color: var(--blue);
  opacity: 0.7;
}
.phase-wrap.completed   .phase-num { color: var(--completed); }
.phase-wrap.active-phase .phase-num { color: var(--green); opacity: 1; text-shadow: 0 0 24px rgba(0,255,136,0.35); }
.phase-wrap.approaching .phase-num { color: var(--orange); opacity: 0.8; }
.phase-wrap.upcoming    .phase-num { color: #3a3a5a; opacity: 1; }

.phase-period {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--dim-text);
  padding: 3px 7px;
  border: 1px solid var(--muted-border);
  border-radius: 2px;
  width: fit-content;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 2px;
  width: fit-content;
}
.status-pill.completed  { color: var(--completed); background: var(--completed-dim); border: 1px solid rgba(90,112,144,0.3); }
.status-pill.active     { color: var(--green); background: rgba(0,255,136,0.07); border: 1px solid rgba(0,255,136,0.3); }
.status-pill.approaching{ color: var(--orange); background: rgba(255,154,60,0.07); border: 1px solid rgba(255,154,60,0.3); }
.status-pill.upcoming   { color: var(--muted-text); background: rgba(40,40,70,0.3); border: 1px solid rgba(60,60,90,0.4); }
.status-pill.destination{ color: var(--gold); background: var(--gold-glow); border: 1px solid rgba(196,162,101,0.3); }

/* Center content column */
.phase-body {
  grid-area: body;
  padding: var(--card-pad) 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-bottom: 1px solid var(--muted-border);
}

.phase-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--primary-text);
}
.phase-wrap.completed    .phase-title { color: var(--body-text); }
.phase-wrap.active-phase .phase-title { color: #ffffff; }
.phase-wrap.approaching  .phase-title { color: #ffffff; }
.phase-wrap.upcoming     .phase-title { color: #ffffff; }

.phase-trigger {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
  color: var(--blue);
  letter-spacing: 0.03em;
  padding: 8px 12px;
  border-left: 2px solid var(--blue);
  background: var(--blue-faint);
}
.phase-wrap.active-phase .phase-trigger {
  border-left-color: var(--green);
  color: rgba(0,255,136,0.75);
  background: var(--green-glow);
}
.phase-wrap.approaching .phase-trigger {
  border-left-color: var(--orange);
  color: rgba(255,154,60,0.8);
  background: rgba(255,154,60,0.04);
}
.phase-wrap.upcoming .phase-trigger {
  border-left-color: var(--orange);
  color: rgba(255,154,60,0.8);
  background: rgba(255,154,60,0.04);
}

.phase-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--body-text);
  font-weight: 300;
}
.phase-wrap.upcoming .phase-desc { color: var(--muted-text); }

.industry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.ind-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
  padding: 2px 7px;
  border: 1px solid rgba(0,229,204,0.22);
  border-radius: 2px;
  background: var(--blue-faint);
}

.phase-wrap.active-phase .ind-tag {
  color: var(--green);
  border-color: rgba(0,255,136,0.3);
  background: rgba(0,255,136,0.04);
}
.phase-wrap.active-phase .ind-tag:hover {
  background: rgba(0,255,136,0.1);
  border-color: rgba(0,255,136,0.55);
  box-shadow: 0 0 8px rgba(0,255,136,0.15);
}
.phase-wrap.approaching .ind-tag,
.phase-wrap.upcoming .ind-tag {
  color: var(--orange);
  border-color: rgba(255,154,60,0.3);
  background: rgba(255,154,60,0.05);
}
.phase-wrap.approaching .ind-tag:hover,
.phase-wrap.upcoming .ind-tag:hover {
  background: rgba(255,154,60,0.12);
  border-color: rgba(255,154,60,0.55);
  box-shadow: 0 0 8px rgba(255,154,60,0.15);
}

.phase-note {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px dashed rgba(196,162,101,0.2);
  padding: 6px 10px;
  border-radius: 2px;
  line-height: 1.5;
}
/* Phase-note color follows section theme */
.phase-wrap.completed .phase-note {
  color: var(--blue);
  background: var(--blue-faint);
  border-color: rgba(0,229,204,0.2);
}
.phase-wrap.active-phase .phase-note {
  color: rgba(0,255,136,0.8);
  background: var(--green-glow);
  border-color: rgba(0,255,136,0.2);
}
.phase-wrap.approaching .phase-note,
.phase-wrap.upcoming .phase-note {
  color: var(--orange);
  background: rgba(255,154,60,0.04);
  border-color: rgba(255,154,60,0.22);
}

/* Right stocks column */
.phase-stocks {
  grid-area: stocks;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0,0,0,0.1);
  border-radius: 0 0 16px 0;
}

.stocks-header {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--dim-text);
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.stock-card {
  background: rgba(255,255,255,0.015);
  border: none;
  border-radius: 10px;
  padding: 9px 10px;
  position: relative;
  transition: background 0.3s, box-shadow 0.3s;
  cursor: default;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
/* Liquid glass border — gradient only on the 1px rim */
.stock-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.10) 35%,
    rgba(255,255,255,0.02) 60%,
    rgba(255,255,255,0.12) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  transition: background 0.3s;
  z-index: 1;
}
.stock-card > * { position: relative; z-index: 2; }
.stock-card:hover {
  background: rgba(0,229,204,0.04);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35), 0 0 16px rgba(0,229,204,0.06);
}
.stock-card:hover::before {
  background: linear-gradient(
    135deg,
    rgba(0,229,204,0.9) 0%,
    rgba(0,229,204,0.30) 35%,
    rgba(0,229,204,0.05) 60%,
    rgba(0,229,204,0.22) 100%
  );
}
.stock-card.live {
  background: rgba(0,255,136,0.025);
  animation: live-pulse 3s ease-in-out infinite;
}
.stock-card.live::before {
  background: linear-gradient(
    135deg,
    rgba(0,255,136,0.55) 0%,
    rgba(0,255,136,0.14) 35%,
    rgba(0,255,136,0.03) 60%,
    rgba(0,255,136,0.18) 100%
  );
}
/* Orange hover for approaching/upcoming section cards */
.phase-wrap.approaching .stock-card:hover,
.phase-wrap.upcoming .stock-card:hover {
  background: rgba(255,154,60,0.04);
  box-shadow: 0 6px 22px rgba(0,0,0,0.35), 0 0 16px rgba(255,154,60,0.06);
}
.phase-wrap.approaching .stock-card:hover::before,
.phase-wrap.upcoming .stock-card:hover::before {
  background: linear-gradient(
    135deg,
    rgba(255,154,60,0.9) 0%,
    rgba(255,154,60,0.30) 35%,
    rgba(255,154,60,0.05) 60%,
    rgba(255,154,60,0.22) 100%
  );
}

.stock-card.live:hover {
  background: rgba(0,255,136,0.05);
}
.stock-card.live:hover::before {
  background: linear-gradient(
    135deg,
    rgba(0,255,136,0.85) 0%,
    rgba(0,255,136,0.25) 35%,
    rgba(0,255,136,0.05) 60%,
    rgba(0,255,136,0.22) 100%
  );
}

.live-badge {
  position: absolute;
  top: 5px; right: 5px;
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green);
  padding: 1px 4px;
  border: 1px solid rgba(0,255,136,0.35);
  border-radius: 1px;
  background: rgba(0,255,136,0.07);
}

/* ================================================================
   TWEET BADGE — X mention attribution on stock cards
   ================================================================ */

.tweet-badge {
  position: absolute;
  bottom: 7px;
  right: 7px;
  z-index: 10;
  cursor: pointer;
  user-select: none;
}

.tb-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  display: block;
  background: #1a1a2e;
  object-fit: cover;
  transition: border-color 0.15s, transform 0.15s;
}
.tweet-badge:hover .tb-avatar {
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

.tb-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  background: var(--blue);
  color: #020208;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  padding: 0 3px;
  pointer-events: none;
}

/* ── Dropdown ──────────────────────────────────────────────── */
.tb-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  width: 280px;
  background: rgba(8, 10, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  z-index: 400;
}
.tweet-badge.tb-open .tb-dropdown {
  display: block;
  animation: tb-drop 0.14s ease-out;
}
@keyframes tb-drop {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tb-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--body-text);
  font-family: var(--font-mono);
  font-size: 9px;
}
.tb-username {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.tb-username:hover { text-decoration: underline; }
.tb-mentioned { color: var(--dim-text); }

.tb-tweet {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: background 0.1s;
}
.tb-tweet:last-child { border-bottom: none; }
.tb-tweet:hover { background: rgba(255, 255, 255, 0.04); }

.tb-text {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  color: var(--primary-text);
  margin: 0 0 6px;
  word-break: break-word;
}

.tb-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tb-date {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dim-text);
}
.tb-cta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--blue);
  opacity: 0.7;
}
.tb-tweet:hover .tb-cta { opacity: 1; }

/* ── Flip dropdown upward if card is near bottom of viewport ── */
.tweet-badge.tb-flip .tb-dropdown {
  bottom: auto;
  top: calc(100% + 6px);
}

/* ================================================================
   STOCK TICKER
   ================================================================ */

.stock-ticker {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-text);
  line-height: 1.1;
  margin-bottom: 2px;
}
.stock-card.live .stock-ticker { color: var(--green); }

.stock-company {
  font-size: 10px;
  color: var(--dim-text);
  margin-bottom: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 300;
}
.stock-thesis {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--body-text);
  line-height: 1.6;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stock-card.live .stock-thesis { color: rgba(0,255,136,0.65); }

.live-price {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.live-ytd {
  display: block;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
}
.live-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  color: var(--muted-text);
  margin-top: 3px;
}
/* YTD colour tiers — magnitude-based */
.live-price.gain-legendary .live-ytd { color: #c4a265; text-shadow: 0 0 22px rgba(196,162,101,0.5); }
.live-price.gain-strong    .live-ytd { color: #00ff88; text-shadow: 0 0 18px rgba(0,255,136,0.45); }
.live-price.gain-mild      .live-ytd { color: #00e5cc; text-shadow: 0 0 14px rgba(0,229,204,0.35); }
.live-price.neutral        .live-ytd { color: var(--body-text); }
.live-price.loss-mild      .live-ytd { color: #ff9a3c; text-shadow: 0 0 14px rgba(255,154,60,0.35); }
.live-price.loss-strong    .live-ytd { color: #ff5555; text-shadow: 0 0 14px rgba(255,85,85,0.35); }

.etf-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.etf-row { display: flex; flex-wrap: wrap; gap: 6px; }
.etf-chip {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
  padding: 2px 6px;
  border: 1px solid rgba(0,212,255,0.22);
  border-radius: 2px;
  background: var(--blue-faint);
}

/* ================================================================
   PARALLEL TRACKS SECTION
   ================================================================ */

/* ================================================================
   HORIZONTAL SCROLL GALLERY (intro + phases 6–8)
   ================================================================ */

.horiz-section {
  position: relative;
  /* height set dynamically by JS */
}

.horiz-sticky {
  /* No CSS sticky — GSAP ScrollTrigger handles all pinning */
  height: 100vh;
  overflow: hidden;
  /* background-attachment: fixed paints the gradient at viewport coords,
     matching the global .bg-gradient layer exactly, while the solid
     var(--bg-void) base still blocks scrolling content beneath */
  background:
    radial-gradient(ellipse 60% 40% at 15% 55%, rgba(0,229,204,0.025) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 45%, rgba(80,0,180,0.025) 0%, transparent 70%),
    var(--bg-void);
  background-attachment: fixed;
  width: 100%;
  /* z-index toggled by JS (onEnter/onLeave) — only active while GSAP pin is live */
}

.horiz-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

/* Every slide is exactly one viewport wide */
.horiz-panel {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* Override GSAP initial state set by .phase-wrap */
  opacity: 1 !important;
  transform: none !important;
}

/* ---- Intro slide — transparent so starfield shows through ---- */
.horiz-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.horiz-intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  will-change: opacity, transform;
}
.horiz-intro-icon {
  font-size: 11px;
  letter-spacing: 8px;
  color: var(--orange);
  opacity: 0.6;
  font-family: var(--font-mono);
}
.horiz-intro-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 72px);
  letter-spacing: 0.22em;
  color: var(--primary-text);
  margin: 0;
}
.horiz-intro-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--dim-text);
  margin: 0;
}

/* ---- Phase content panels (06 07 08) — same card sizing as section 05 ---- */
/* Panel padding mirrors .phase-wrap but replaces the spine left-offset with
   a simple 48px left pad, and lifts the top by nav height so content
   clears the fixed nav bar when the panel is pinned. */
.horiz-panel.phase-wrap {
  padding: var(--nav-h) 48px 0 48px;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.horiz-panel .phase-card {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  /* Panel has overflow-y:auto so tall cards scroll inside the panel */
}

/* Convergence lines */
.parallel-converge {
  display: none;
}
.conv-lines {
  display: flex;
  gap: 200px;
  position: relative;
}
.conv-lines::before, .conv-lines::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, rgba(0,229,204,0.2), transparent);
}
.conv-lines .conv-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, rgba(0,229,204,0.2), transparent);
}
.conv-point {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--blue-dim);
  letter-spacing: 0.1em;
}

/* ================================================================
   SINGULARITY SECTION
   ================================================================ */

.singularity-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  /* margin-top set dynamically by JS (positionSingularity) to clear the
     GSAP pin spacer which extends ~100vh past horizSection */
}

.singularity-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.singularity-halo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  border-radius: 50%;
  background: none;
  pointer-events: none;
}

.singularity-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 32px;
  max-width: 700px;
}

.sing-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(196,162,101,0.45);
  margin-bottom: 20px;
}
.sing-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 108px);
  letter-spacing: 0.1em;
  line-height: 1;
  background: linear-gradient(
    135deg,
    #6a4e22 0%,  #6a4e22 18%,
    #9e7e44 28%, #c4a265 38%,
    #e8d5a8 44%, #fdf8ef 50%,
    #e8d5a8 56%, #c4a265 62%,
    #9e7e44 72%, #6a4e22 82%,
    #6a4e22 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 400% 100%;
  background-repeat: no-repeat;
  animation: shimmer-gold 9s linear infinite;
  margin-bottom: 12px;
}
.sing-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 10px;
}
.sing-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(196,162,101,0.35);
  margin-bottom: 36px;
}
.sing-desc {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  line-height: 1.85;
  margin-bottom: 36px;
}
.sing-trigger {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  line-height: 1.6;
  padding: 12px 20px;
  border: 1px solid rgba(255,224,102,0.35);
  border-radius: 6px;
  background: rgba(255,224,102,0.04);
  max-width: 520px;
  margin: 0 auto;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ================================================================
   CONNECT / FEEDBACK BUTTON — fixed bottom-right
   ================================================================ */

.connect-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--dim-text);
  background: rgba(2, 2, 8, 0.88);
  border: 1px solid rgba(0, 229, 204, 0.14);
  border-radius: 4px;
  text-decoration: none;
  backdrop-filter: blur(16px);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.connect-btn svg {
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.connect-btn:hover {
  color: var(--blue);
  border-color: rgba(0, 229, 204, 0.45);
  box-shadow: 0 0 18px rgba(0, 229, 204, 0.12);
  transform: translateY(-2px);
}
.connect-btn:hover svg { opacity: 1; }

@media (max-width: 720px) {
  .connect-btn { bottom: 16px; right: 16px; padding: 9px 14px; }
  .connect-btn span { display: none; }
}

@media (max-width: 1080px) {
  :root { --spine-x: 36px; }
  .phase-wrap { padding: 40px 32px 40px calc(var(--spine-x) + 44px); }
  .stock-grid { grid-template-columns: repeat(2, 1fr); }
  .horiz-panel { padding: 72px 24px 40px 24px; }
}

@media (max-width: 720px) {
  :root { --spine-x: 20px; }
  .phase-wrap { padding: 28px 16px 28px calc(var(--spine-x) + 28px); }
  .phase-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "meta"
      "body"
      "stocks";
  }
  .phase-meta { border-right: none; border-bottom: 1px solid var(--muted-border); border-radius: 16px 16px 0 0; }
  .phase-body  { border-bottom: 1px solid var(--muted-border); }
  .phase-stocks { border-radius: 0 0 16px 16px; }
  .stock-grid { grid-template-columns: 1fr 1fr; }
  .nav-live { display: none; }
  .nav-brand { min-width: auto; }
  .nav-share-btn .share-label { display: none; }
  .nav-share-btn { padding: 5px 8px; }
  .t-road, .t-singularity { font-size: clamp(54px, 14vw, 110px); }
  .hero-sub { font-size: 13px; }
}
