/* ══════════════════════════════════════════
   ROADMAP — Page-Specific Styles
   Requires: global.css, header.css, footer.css, hero-section.css
   ══════════════════════════════════════════ */

/* ── Custom Properties ── */
:root {
  --bg-primary: #141212;
  --font-heading: 'Forum', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --max-width: 1400px;
}

/* ── Body & Typography Overrides ── */
body {
  background: var(--bg-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
}

/* ── Hero Overrides ──
   No background: the shared constellation atmosphere shows through,
   so the hero blends seamlessly into the matrix (like the team page). */
.hero-section {
  position: relative;
  padding-bottom: 80px;
}
/* Match the team-page hero scale */
.hero-section h1 {
  font-size: clamp(52px, 8.5vw, 132px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}
.hero-section .hero-subtitle {
  max-width: 900px;
  margin: 32px auto 0;
  font-size: clamp(18px, 2.2vw, 28px);
}

/* ── Roadmap Glow Orb ── */
.roadmap-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  background: rgba(200,169,110,0.05);
  /* Capped to viewport: at 400px fixed the orb pokes past narrow
     screens and causes page-level horizontal scroll */
  width: min(400px, 100vw);
  height: 400px;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Lift page content above the fixed constellation canvas ── */
.hero-section,
.matrix-wrapper,
#quote-slot,
#footer-slot {
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════
   MATRIX
   ══════════════════════════════════════════ */
.matrix-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 64px;
  position: relative;
}

/* Column headers */
.matrix-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 0;
  position: sticky;
  top: 72px;
  z-index: 44;
  background: #141212;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.col-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 10px;
  text-align: center;
}
.col-header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-transform: none;
  /* Match kinetic hero subtitle (EB Garamond editorial) */
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}
.col-subtitle {
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0;
}
.col-header:nth-child(1) .col-subtitle { color: #000; }
.col-header:nth-child(2) .col-subtitle { color: rgba(255,255,255,0.9); }
.col-header:nth-child(3) .col-subtitle { color: rgba(20,18,18,0.85); }

/* Engineering header */
.col-header:nth-child(1) {
  background: linear-gradient(to right, rgba(250,250,250,0.95), rgba(220,220,220,0.92));
  color: #000;
  border: 1px solid rgba(200,200,200,0.4);
}
/* Go-To-Market header (dark) */
.col-header:nth-child(2) {
  background: #262626;
  color: #FFF;
  border: 1px solid rgba(255,255,255,0.30);
}
/* Alpha Token header — solid gold (token = value accrual) */
.col-header:nth-child(3) {
  background: #C8A96E;
  color: #141212;
  border: 1px solid rgba(140,108,52,0.8);
}
.col-header svg { width: 30px; height: 30px; opacity: 0.7; flex-shrink: 0; }
.col-header:nth-child(3) svg { opacity: 1; }

/* Stroke draw-in for column header icons (skip col 3) */
.col-header:nth-child(1) svg path,
.col-header:nth-child(1) svg circle,
.col-header:nth-child(1) svg line,
.col-header:nth-child(2) svg path,
.col-header:nth-child(2) svg circle,
.col-header:nth-child(2) svg polyline,
.col-header:nth-child(2) svg line,
.col-header:nth-child(2) svg polygon,
.col-header:nth-child(2) svg ellipse {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}
.matrix-header.visible .col-header:nth-child(1) svg path,
.matrix-header.visible .col-header:nth-child(1) svg circle,
.matrix-header.visible .col-header:nth-child(1) svg line,
.matrix-header.visible .col-header:nth-child(2) svg path,
.matrix-header.visible .col-header:nth-child(2) svg circle,
.matrix-header.visible .col-header:nth-child(2) svg polyline,
.matrix-header.visible .col-header:nth-child(2) svg line,
.matrix-header.visible .col-header:nth-child(2) svg polygon,
.matrix-header.visible .col-header:nth-child(2) svg ellipse {
  stroke-dashoffset: 0;
}

/* ══════════════════════════════════════════
   PHASE ROWS
   ══════════════════════════════════════════ */
.phase-row {
  position: relative;
  padding: 36px 24px 56px;
  border-radius: 12px;
}
.phase-row:last-child {
  padding-bottom: 48px;
}

/* ══════════════════════════════════════════
   PHASE DIVIDERS
   ══════════════════════════════════════════ */
.phase-divider {
  position: sticky;
  top: 120px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 18px 32px;
  background: linear-gradient(135deg, rgb(8,8,8), rgb(0,0,0) 40%, rgb(0,0,0) 60%, rgb(4,4,4));
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 24px -4px rgba(0,0,0,0.4),
              inset 0 1px 0 rgba(255,255,255,0.06),
              inset 0 -1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
}
.phase-divider::before,
.phase-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,169,110,0.3), transparent);
  transform: scaleX(0);
  transition: transform 1s ease 0.4s;
}
.phase-divider::before { left: 0; right: 55%; transform-origin: left; }
.phase-divider::after { left: 55%; right: 0; transform-origin: right; }
.phase-divider.visible::before,
.phase-divider.visible::after { transform: scaleX(1); }
.phase-divider > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.phase-divider .phase-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.phase-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.55);
}
.phase-divider--active .phase-desc {
  color: rgba(255,255,255,0.75);
}
.phase-divider--active {
  background: linear-gradient(135deg, rgb(12,12,12), rgb(0,0,0) 40%, rgb(0,0,0) 60%, rgb(6,6,6));
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 24px -4px rgba(0,0,0,0.5),
              inset 0 1px 0 rgba(255,255,255,0.08),
              inset 0 -1px 0 rgba(255,255,255,0.04);
}
.phase-divider--active .phase-name {
  color: #E0CB9A;
}
.phase-divider--active .phase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C8A96E;
  box-shadow: 0 0 8px rgba(200,169,110,0.5);
  animation: phase-pulse 2s ease-in-out infinite;
}
@keyframes phase-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(200,169,110,0.5); }
  50% { opacity: 0.3; box-shadow: 0 0 4px rgba(200,169,110,0.2); }
}
.phase-divider.stuck { z-index: 42; }

/* Large Roman numeral watermark */
.phase-numeral {
  position: absolute;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 104px;
  font-weight: 700;
  color: rgba(255,255,255,0.08);
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 0 12px;
  background: #000;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
}
.phase-divider.visible .phase-numeral { opacity: 1; }
.phase-divider--active .phase-numeral { color: rgba(255,255,255,0.14); }
/* Phases I–II: faded gold watermark (done / in progress); III–IV keep gray above */
.phase-section:has(#phase1) .phase-numeral {
  color: rgba(200, 169, 110, 0.10);
}
.phase-section:has(#phase2) .phase-numeral {
  color: rgba(200, 169, 110, 0.16);
}
.phase-section:has(#phase1) .phase-name {
  color: rgba(200, 169, 110, 0.42);
}
.phase-section:has(#phase1) .phase-desc {
  color: rgba(200, 169, 110, 0.30);
}
.phase-section:has(#phase1) .phase-icon {
  opacity: 1;
}
.phase-section:has(#phase2) .phase-name {
  color: #E0CB9A;
}
.phase-section:has(#phase2) .phase-desc {
  color: rgba(200, 169, 110, 0.72);
}

/* Phase icon — stroke draws in on scroll reveal */
.phase-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.45;
}
.phase-divider--active .phase-icon { opacity: 0.8; }
.phase-icon path,
.phase-icon circle,
.phase-icon polyline,
.phase-icon line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.6s;
}
.phase-divider.visible .phase-icon path,
.phase-divider.visible .phase-icon circle,
.phase-divider.visible .phase-icon polyline,
.phase-divider.visible .phase-icon line {
  stroke-dashoffset: 0;
}

/* ══════════════════════════════════════════
   PHASE CONTENT GRID
   ══════════════════════════════════════════ */
.phase-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 84px 48px;
  position: relative;
  padding: 28px 0;
  align-items: start;
  justify-items: center;
}
/* Particle constellation canvas */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Vertical gridlines between columns */
.phase-content::before,
.phase-content::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
  z-index: 1;
}
.phase-content::before {
  left: calc((100% - 96px) / 3 + 24px);
}
.phase-content::after {
  left: calc(2 * (100% - 96px) / 3 + 72px);
}

/* ── GTM Infographic (libra scale) ── */
.gtm-infographic {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 320px; height: 320px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
}

/* ── Engineering Timeline ── */
.timeline-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

/* ══════════════════════════════════════════
   GRID ITEMS (accent-bar micro-cards)
   ══════════════════════════════════════════ */
.gi {
  padding: 14px 18px;
  font-size: 14px; line-height: 1.55;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s, background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s, filter 0.3s;
  cursor: default;
  position: relative;
  z-index: 2;
}
/* Engineering column */
.gi[style*="grid-column:1"] {
  background: linear-gradient(to right, rgba(250,250,250,1), rgba(220,220,220,0.95));
  color: #000;
  border: 1px solid rgba(200,200,200,0.4);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
/* Go-To-Market column (dark) */
.gi[style*="grid-column:2"] {
  background: #262626;
  color: #FFF;
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow: 0 0 12px rgba(255,255,255,0.04);
}
/* Alpha Token column (gold) */
.gi[style*="grid-column:3"] {
  background: #C8A96E;
  color: #141212;
  border: 1px solid rgba(140,108,52,0.6);
  box-shadow: 0 0 12px rgba(200,169,110,0.10);
}
/* Hover states */
.gi:hover { z-index: 46; }
.gi[style*="grid-column:1"]:hover {
  background: linear-gradient(to right, rgba(255,255,255,1), rgba(230,230,230,1));
  border-color: rgba(190,190,190,0.5);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.gi[style*="grid-column:2"]:hover {
  background: #303030;
  border-color: rgba(255,255,255,0.40);
  box-shadow: 0 0 20px rgba(255,255,255,0.08);
  transform: translateY(-1px);
}
.gi[style*="grid-column:3"]:hover {
  /* No background swap: the shimmer gradient stays, filter brightens */
  filter: brightness(1.05);
  border-color: rgba(140,108,52,0.8);
  box-shadow: 0 0 20px rgba(200,169,110,0.22);
  transform: translateY(-1px);
}
.gi--empty {
  display: none;
}

/* ── Card Tiers ── */
.gi--high {
  padding: 20px 24px;
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 12px;
}
.gi--high[style*="grid-column:1"] {
  background: linear-gradient(to right, rgba(255,255,255,1), rgba(225,225,225,1));
  border: 1.5px solid rgba(195,195,195,0.5);
  box-shadow:
    0 4px 16px rgba(0,0,0,0.10),
    0 8px 32px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.8);
}
.gi--high[style*="grid-column:2"] {
  background: #2B2B2B;
  border: 1.5px solid rgba(255,255,255,0.40);
  box-shadow:
    0 0 24px rgba(255,255,255,0.08),
    0 0 60px rgba(255,255,255,0.04);
}
.gi--high[style*="grid-column:3"] {
  background: #D2B67F;
  border: 1.5px solid rgba(140,108,52,0.85);
  box-shadow:
    0 0 24px rgba(200,169,110,0.25),
    0 0 60px rgba(200,169,110,0.10);
}
.gi--high::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  pointer-events: none;
  z-index: -1;
}
.gi--high[style*="grid-column:1"]::before {
  background: linear-gradient(to right, rgba(255,255,255,0.35), transparent 70%);
}
.gi--high[style*="grid-column:2"]::before {
  background: none;
}
.gi--high[style*="grid-column:3"]::before {
  background: none;
}
/* High card hover states */
.gi--high[style*="grid-column:1"]:hover {
  background: linear-gradient(to right, rgba(255,255,255,1), rgba(235,235,235,1));
  border-color: rgba(185,185,185,0.6);
  box-shadow:
    0 6px 20px rgba(0,0,0,0.12),
    0 12px 40px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,1);
  transform: translateY(-2px);
}
.gi--high[style*="grid-column:2"]:hover {
  background: #343434;
  border-color: rgba(255,255,255,0.50);
  box-shadow:
    0 0 30px rgba(255,255,255,0.12),
    0 0 70px rgba(255,255,255,0.06);
  transform: translateY(-2px);
}
.gi--high[style*="grid-column:3"]:hover {
  /* No background swap: the shimmer gradient stays, filter brightens */
  filter: brightness(1.07);
  border-color: rgba(140,108,52,1);
  box-shadow:
    0 0 30px rgba(200,169,110,0.35),
    0 0 70px rgba(200,169,110,0.15);
  transform: translateY(-2px);
}

.gi--minor {
  padding: 10px 15px;
  font-size: 14px;
}
.gi--minor[style*="grid-column:1"] {
  background: linear-gradient(to right, rgba(245,245,245,0.92), rgba(215,215,215,0.88));
  border-color: rgba(195,195,195,0.35);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.gi--minor[style*="grid-column:2"] {
  background: #202020;
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 8px rgba(255,255,255,0.02);
}
.gi--minor[style*="grid-column:3"] {
  background: #BDA067;
  border-color: rgba(140,108,52,0.55);
  box-shadow: 0 0 8px rgba(200,169,110,0.06);
}

/* ══════════════════════════════════════════
   ALPHA TOKEN GOLD SHIMMER
   Same gradient sweep as the hero "Aurelius" keyword, applied as a
   background to the column header and every Alpha Token card. Placed
   after the tier rules so it wins their background declarations; hover
   states brighten via filter instead of swapping backgrounds so the
   shimmer never stops.
   ══════════════════════════════════════════ */
@keyframes alphaShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.col-header:nth-child(3),
.gi[style*="grid-column:3"] {
  background: linear-gradient(105deg, #E0CB9A 20%, #AE8C4A 40%, #F6EBCF 60%, #E0CB9A 80%);
  background-size: 200% auto;
  animation: alphaShimmer 7s linear 1.6s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .col-header:nth-child(3),
  .gi[style*="grid-column:3"] {
    animation: none;
  }
}

/* ══════════════════════════════════════════
   CHAIN HIGHLIGHTING & DEPENDENCY RAILS
   ══════════════════════════════════════════ */
.matrix-wrapper.chain-active .gi { opacity: 0.15; }

.matrix-wrapper.chain-active .gi.hl-source {
  opacity: 1 !important;
  transform: scale(1.02);
  filter: brightness(1.15) saturate(1.1);
  box-shadow: 0 0 32px rgba(255,255,255,0.25), 0 0 64px rgba(255,255,255,0.15);
  border-width: 2px;
}
.matrix-wrapper.chain-active .gi.hl-source[style*="grid-column:1"] {
  box-shadow: 0 0 32px rgba(0,0,0,0.3), 0 4px 20px rgba(0,0,0,0.2);
}
.matrix-wrapper.chain-active .gi.hl-source[style*="grid-column:2"] {
  box-shadow: 0 0 40px rgba(255,255,255,0.4), 0 0 80px rgba(255,255,255,0.2);
}
.matrix-wrapper.chain-active .gi.hl-source[style*="grid-column:3"] {
  box-shadow: 0 0 40px rgba(200,169,110,0.5), 0 0 80px rgba(200,169,110,0.25);
}

@keyframes breathe-engineering {
  0%, 100% { box-shadow: 0 0 16px rgba(0,0,0,0.15); border-width: 1.5px; }
  50% { box-shadow: 0 0 28px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.15); border-width: 2px; }
}
@keyframes breathe-gtm {
  0%, 100% { box-shadow: 0 0 20px rgba(255,255,255,0.2); border-width: 1.5px; }
  50% { box-shadow: 0 0 36px rgba(255,255,255,0.35), 0 0 60px rgba(255,255,255,0.2); border-width: 2px; }
}
@keyframes breathe-alpha {
  0%, 100% { box-shadow: 0 0 20px rgba(200,169,110,0.25); border-width: 1.5px; }
  50% { box-shadow: 0 0 36px rgba(200,169,110,0.45), 0 0 60px rgba(200,169,110,0.25); border-width: 2px; }
}

.matrix-wrapper.chain-active .gi.hl {
  opacity: 1 !important;
  filter: brightness(1.08);
}
.matrix-wrapper.chain-active .gi.hl[style*="grid-column:1"] {
  animation: breathe-engineering 2.4s ease-in-out infinite;
}
.matrix-wrapper.chain-active .gi.hl[style*="grid-column:2"] {
  animation: breathe-gtm 2.4s ease-in-out infinite;
}
.matrix-wrapper.chain-active .gi.hl[style*="grid-column:3"] {
  /* Shimmer kept in the list so it continues through the highlight */
  animation: breathe-alpha 2.4s ease-in-out infinite, alphaShimmer 7s linear 1.6s infinite;
}
.matrix-wrapper.chain-active .gi.hl:nth-child(odd) {
  animation-delay: 0.3s;
}
.matrix-wrapper.chain-active .gi--empty { opacity: 0; }
.matrix-wrapper.chain-active .gi.below-active { opacity: 0.05; }

.dep-rail { transition: stroke 0.3s, stroke-width 0.3s; }
.dep-rail.dep-active {
  stroke: rgba(150,150,150,0.5) !important;
  stroke-width: 2.5 !important;
}

/* ══════════════════════════════════════════
   TOOLTIPS
   ══════════════════════════════════════════ */
.tooltip {
  position: absolute;
  z-index: 60;
  max-width: 320px;
  min-width: 200px;
  padding: 16px 20px;
  border-radius: 10px;
  backdrop-filter: blur(14px);
  font-family: var(--font-body);
  pointer-events: auto;
  opacity: 0;
  transform: translate(4px, -4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  visibility: hidden;
}
.tooltip.tooltip--visible {
  opacity: 1;
  transform: translate(0, 0);
  visibility: visible;
}
.tooltip-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.tooltip-body {
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.85;
}
.tooltip-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.tooltip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.tooltip-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Column 1 — Engineering tooltip (light) */
.tooltip--col1 {
  background: rgba(245,245,245,0.97);
  color: #000;
  border: 1px solid rgba(200,200,200,0.5);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 1px rgba(0,0,0,0.1);
}
.tooltip--col1 .tooltip-body { color: #333; }
.tooltip--col1 .tooltip-btn {
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.12);
  color: #111;
}
.tooltip--col1 .tooltip-btn:hover {
  background: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.2);
}

/* Column 2 — GTM tooltip (dark) */
.tooltip--col2 {
  background: rgba(18,18,18,0.97);
  color: #FFF;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 12px rgba(255,255,255,0.03);
}
.tooltip--col2 .tooltip-body { color: rgba(255,255,255,0.75); }
.tooltip--col2 .tooltip-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #FFF;
}
.tooltip--col2 .tooltip-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.3);
}

/* Column 3 — Alpha Token tooltip (gold) */
.tooltip--col3 {
  background: rgba(236,222,192,0.98);
  color: #141212;
  border: 1px solid rgba(174,140,74,0.6);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 0 12px rgba(200,169,110,0.15);
}
.tooltip--col3 .tooltip-body { color: rgba(20,18,18,0.8); }
.tooltip--col3 .tooltip-btn {
  background: rgba(20,18,18,0.08);
  border: 1px solid rgba(20,18,18,0.2);
  color: #141212;
}
.tooltip--col3 .tooltip-btn:hover {
  background: rgba(20,18,18,0.14);
  border-color: rgba(20,18,18,0.35);
}

/* ══════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Phase rows fade without translating: their card rects anchor the
   timeline rails, which are drawn once from final layout positions */
.phase-row.reveal {
  transform: none;
}

/* Per-card staggered reveal (build-up sequence and small-screen scroll
   reveal). Fade + blur only — no transforms, so the rails (drawn once
   from card positions) stay aligned. !important beats the chain-highlight
   opacity rules so hovering a revealed card never flashes hidden ones;
   pointer-events off so invisible cards aren't hoverable. */
.gi.gi-reveal {
  opacity: 0 !important;
  filter: blur(8px);
  pointer-events: none;
}
/* Directional wipe: each card unveils from the edge its connector
   arrives at — engineering cards (col 1) from the top where the rail
   lands, GTM and Alpha cards (cols 2/3) from the left where the
   dependency rails arrive. clip-path never affects layout rects, so
   the rails (measured from card positions) stay aligned. */
.gi.gi-reveal[style*="grid-column:1"] { clip-path: inset(0 0 94% 0); }
.gi.gi-reveal[style*="grid-column:2"],
.gi.gi-reveal[style*="grid-column:3"] { clip-path: inset(0 94% 0 0); }
/* Pre-paint hide: an inline head script stamps .seq-preload on <html>
   before the stylesheets load, so cards are hidden from the very first
   paint (the browser can paint before the end-of-body JS adds
   .gi-reveal, which otherwise reads as cards fading away on load).
   roadmap.js removes the class after taking over per-card state. */
html.seq-preload .gi:not(.gi--empty) {
  opacity: 0 !important;
  filter: blur(8px);
  pointer-events: none;
  transition: none !important;
}
.gi.gi-revealing {
  clip-path: inset(0);
  transition: opacity 0.65s cubic-bezier(.16, 1, .3, 1),
              filter 1.1s cubic-bezier(.16, 1, .3, 1),
              clip-path 0.9s cubic-bezier(.22, 1, .36, 1);
}

/* One-shot ignition: a soft gold halo blooms and fades as a card
   lands. Runs on a pseudo-element so the card's own shadows and the
   hover/highlight styles are untouched. */
.gi:not(.gi--empty)::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 26px rgba(200, 169, 110, 0.45), 0 0 8px rgba(200, 169, 110, 0.3);
}
.gi.gi-revealing:not(.gi-reveal)::after {
  animation: gi-ignite 0.95s ease-out 0.15s 1;
}
@keyframes gi-ignite {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

/* Rails reveal with their phase's cards. The stroke transitions are
   repeated here because this rule out-specifies .dep-rail's own
   transition (chain-highlight stroke changes must stay smooth). */
.timeline-svg [data-rail-phase] {
  transition: opacity 1s cubic-bezier(.16, 1, .3, 1), stroke 0.3s, stroke-width 0.3s;
}
/* !important: the "you are here" pulse ring animates its opacity via
   SMIL, and SMIL-animated attributes override normal CSS declarations,
   so without it the ring shows through before its step fires */
.timeline-svg .rail-pending {
  opacity: 0 !important;
}

/* Vertical timeline segments draw downward via dashoffset instead of
   fading, so the engineering line extends continuously card to card */
.timeline-svg .rail-v {
  transition: stroke-dashoffset 1s cubic-bezier(.4, 0, .2, 1), stroke 0.3s, stroke-width 0.3s;
}

/* ══════════════════════════════════════════
   SCROLL-LOCKED PHASE BUILD-UP (team-page pattern)
   JS adds .phase-section--seq per phase on first load: the section
   becomes a tall scroll runway (height set inline), .phase-sticky pins
   below the sticky column headers (--seq-top set by JS), and scroll
   progress steps through the phase's cards and rails one by one.
   When a phase completes its runway collapses and these wrappers go
   inert, restoring free scroll and the divider's own stickiness.
   ══════════════════════════════════════════ */
.phase-sticky { position: relative; }
.phase-pan { position: relative; }

@media (min-width: 541px) {
  .phase-section--seq .phase-sticky {
    position: sticky;
    top: var(--seq-top, 138px);
    /* Sticky boxes always form a stacking context; left at z-auto it
       paints BELOW the global #timelineSvg (z 3), trapping the
       divider's z 40 underneath the cross-phase rail. Lift the whole
       pinned context above the svg so the divider covers rail ends. */
    z-index: 4;
  }
  /* While the whole phase is pinned, the divider must not re-stick
     inside the (overflow-clipped) wrapper — it would slide down over
     the cards. The wrapper already pins at the divider's stick offset.
     !important beats the inline top set by computeDividerTop. */
  .phase-section--seq .phase-divider {
    position: relative;
    top: 0 !important;
  }
  /* Tall phases: clip the pinned window and pan rows up under the
     divider as later rows populate */
  .phase-section--seq .phase-sticky--clip { overflow: hidden; }
  .phase-section--seq .phase-pan {
    transition: transform 0.7s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
  }
}
.phase-pan--measure { transition: none !important; }

/* Sequence rails step in faster than the ambient 1s reveals so the
   card → line → card cadence reads under scroll control */
.phase-svg [data-rail-phase] {
  transition: opacity 0.45s ease, stroke 0.3s, stroke-width 0.3s;
}
.phase-svg .rail-v {
  transition: stroke-dashoffset 0.55s cubic-bezier(.4, 0, .2, 1), stroke 0.3s, stroke-width 0.3s;
}
/* Dep-rail reveal masks: the solid mask stroke draws source → target,
   unveiling the dashed path beneath it like the vertical rails */
.phase-svg .dep-mask-path {
  transition: stroke-dashoffset 0.7s cubic-bezier(.4, 0, .2, 1);
}

/* ══════════════════════════════════════════
   RESPONSIVE — Small (≤540px)
   Horizontal-scroll: keep the 3-column grid,
   let the matrix area scroll sideways.
   ══════════════════════════════════════════ */
@media (max-width: 540px) {
  .matrix-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .matrix-header {
    min-width: 880px;
    position: relative;
    top: auto;
    margin-bottom: 0;
  }

  .phase-section {
    min-width: 880px;
  }

  .phase-divider {
    position: relative;
    top: auto !important;
  }

  .phase-numeral { display: none; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — Medium (541px–900px)
   ══════════════════════════════════════════ */
@media (min-width: 541px) and (max-width: 900px) {
  .matrix-header { grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding: 12px 16px; margin-bottom: 0; top: 48px; }
  .phase-row { padding: 20px 16px 24px; }
  .phase-row:last-child { padding-bottom: 20px; }
  .phase-divider { padding: 12px 16px; top: 118px; }
  .phase-numeral { font-size: 52px; right: 6%; }
  .phase-desc { display: none; }
  .col-subtitle { display: none; }
  .phase-content { gap: 24px 20px; }
  .phase-content::before { left: calc((100% - 40px) / 3 + 10px); }
  .phase-content::after { left: calc(2 * (100% - 40px) / 3 + 30px); }
  .col-header { padding: 10px 10px; gap: 4px; }
  .col-header-text { font-size: 15px; }
  .col-subtitle { font-size: 13px; }
  .col-header svg { width: 22px; height: 22px; }
  .gi { font-size: 12px; padding: 11px 13px; border-radius: 8px; }
}
