/* ==========================================================================
   Master Stylesheet for Enterprise Blueprint (FinTech Gold & Sovereign Crypto)
   ========================================================================== */

:root {
  --bg-main: #060911;
  --bg-card: #0d1322;
  --bg-card-hover: #131c31;
  --bg-card-alt: #0a0e1a;
  
  /* Brand Palettes */
  --gold-primary: #d4af37;
  --gold-light: #fef08a;
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d4af37 50%, #fef08a 100%);
  
  --cyan-web3: #00f2fe;
  --cyan-light: #67e8f9;
  --cyan-gradient: linear-gradient(135deg, #0284c7 0%, #00f2fe 50%, #a5f3fc 100%);
  
  --emerald-accent: #10b981;
  --emerald-light: #6ee7b7;
  --ruby-accent: #ef4444;
  --ruby-light: #fca5a5;
  --blue-accent: #3b82f6;
  --purple-defi: #8b5cf6;
  --purple-light: #d8b4fe;
  
  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Borders & Shadows */
  --border-color: rgba(212, 175, 55, 0.25);
  --border-cyan: rgba(0, 242, 254, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-gold: 0 10px 30px -10px rgba(212, 175, 55, 0.3);
  --shadow-cyan: 0 10px 30px -10px rgba(0, 242, 254, 0.3);
  --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 90px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* Layout Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Project Switcher Bar */
.phase-switcher-bar {
  background: #060911;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 0;
  font-size: 0.85rem;
}
.phase-switcher-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.phase-switcher-pills {
  display: flex;
  gap: 10px;
  align-items: center;
}
.phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}
.phase-pill.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(245, 158, 11, 0.25) 100%);
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}
.phase-pill.active-cyan {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(14, 165, 233, 0.25) 100%);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}
.phase-pill.inactive {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.phase-pill.inactive:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border-color: var(--gold-primary);
}

/* Header */
header.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 17, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gold-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #000;
  font-size: 1.15rem;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}
.brand-icon.cyan-icon {
  background: var(--cyan-gradient);
  color: #030712;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.brand-title span {
  color: var(--gold-primary);
}
.brand-title span.cyan-text {
  background: var(--cyan-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold-primary);
}
.nav-links a.cyan-hover:hover {
  color: var(--cyan-web3);
}

.badge-status {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-color);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-action-outline {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-action-outline:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Hero Section */
.hero {
  padding: 70px 0 50px 0;
  text-align: center;
  position: relative;
}

.hero-tag, .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.hero-badge.cyan-badge {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.35);
  color: var(--cyan-light);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-primary);
  animation: pulseAnim 2s infinite;
}
.pulse.cyan-pulse {
  background: var(--cyan-web3);
  box-shadow: 0 0 10px var(--cyan-web3);
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero h1, h1.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.gold-gradient-text, .gold-accent {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cyan-gradient-text, .gradient-text {
  background: var(--cyan-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 880px;
  margin: 0 auto 36px auto;
  font-weight: 400;
  line-height: 1.7;
}

/* Metrics Grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 35px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-primary);
}
.metric-card.cyan-edge::after {
  background: var(--cyan-web3);
}

.metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}

.metric-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Sections */
section {
  padding: 70px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
  margin-bottom: 45px;
}

.section-num {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.section-num.cyan-num {
  color: var(--cyan-light);
}

.section-title {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 860px;
  line-height: 1.6;
}

/* Reality Alert Box */
.alert-reality {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(13, 19, 34, 0.95) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 35px;
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.alert-header h3 {
  color: #fca5a5;
  font-size: 1.25rem;
  font-weight: 800;
}

.alert-content {
  color: #e2e8f0;
  font-size: 0.96rem;
  line-height: 1.7;
}

/* Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Feature & Card Elements */
.card, .feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 28px;
  transition: all 0.25s ease;
  position: relative;
}

.card:hover, .feature-card:hover {
  border-color: var(--border-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 25px rgba(212, 175, 55, 0.15);
}
.feature-card.cyan-hover:hover {
  border-color: var(--border-cyan);
  box-shadow: var(--shadow-card), 0 0 25px rgba(0, 242, 254, 0.15);
}

.card-icon, .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
}
.feature-icon.cyan-icon {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.25);
  color: var(--cyan-light);
}
.feature-icon.purple-icon {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  color: #d8b4fe;
}

.card-title, .feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.card-text, .feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.card-list {
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.card-list li {
  margin-bottom: 10px;
  padding-left: 18px;
  position: relative;
}
.card-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold-primary);
  font-weight: bold;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
.tag-pill.gold {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
}
.tag-pill.cyan {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--cyan-light);
}

/* Diagram Containers */
.diagram-container {
  background: #090e1a;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 16px;
  padding: 24px;
  margin: 30px 0;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}
.diagram-container.cyan-border {
  border-color: rgba(0, 242, 254, 0.25);
}

.diagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 12px;
}

.diagram-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.diagram-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.zoom-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  background: #111827;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-zoom {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-zoom:hover {
  background: var(--gold-primary);
  color: #000;
}

.zoom-indicator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--gold-light);
  padding: 0 6px;
}

.diagram-badge {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  text-transform: uppercase;
}
.diagram-badge.cyan-badge {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--cyan-web3);
  color: var(--cyan-light);
}

.diagram-viewport {
  width: 100%;
  overflow-x: auto;
  padding: 10px 0;
}

.diagram-svg-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  transform-origin: top left;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Fullscreen */
.diagram-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  flex-direction: column;
}
.diagram-modal.open {
  display: flex;
}
.modal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #090e1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-body {
  flex: 1;
  overflow: auto;
  padding: 30px;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 30px 0;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

th {
  background: #0b111e;
  padding: 18px 22px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.6px;
}

td {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

.highlight-red {
  color: #f87171;
  background: rgba(239, 68, 68, 0.06);
}
.highlight-green {
  color: #4ade80;
  background: rgba(16, 185, 129, 0.08);
  font-weight: 600;
}

/* Timelines */
.timeline {
  position: relative;
  margin-top: 30px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-primary) 0%, var(--emerald-accent) 50%, var(--purple-defi) 100%);
}
.timeline.cyan-line::before {
  background: linear-gradient(180deg, var(--cyan-web3) 0%, var(--purple-defi) 50%, var(--gold-primary) 100%);
}

.timeline-item {
  position: relative;
  padding-left: 65px;
  margin-bottom: 30px;
}

.timeline-node {
  position: absolute;
  left: 10px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0b111e;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-light);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}
.timeline-node.cyan-node {
  border-color: var(--cyan-web3);
  color: var(--cyan-light);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

.timeline-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 22px;
  transition: border-color 0.2s;
}
.timeline-box:hover {
  border-color: var(--border-color);
}

.timeline-box-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-tag {
  font-size: 0.74rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
}
.timeline-tag.cyan-tag {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--cyan-light);
}

.timeline-content {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Budget & Team Grid */
.budget-grid, .roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 25px;
}

.budget-card, .role-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 26px;
  position: relative;
}

.budget-role, .role-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.budget-skills, .role-skills {
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-light);
  margin-bottom: 14px;
}
.budget-skills.cyan-skill {
  color: var(--cyan-light);
}

.budget-desc, .role-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 35px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 50px;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .metric-grid, .grid-3, .budget-grid, .roles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero h1, h1.hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 640px) {
  .metric-grid, .grid-3, .budget-grid, .roles-grid {
    grid-template-columns: 1fr;
  }
  .hero h1, h1.hero-title {
    font-size: 1.8rem;
  }
  .nav-links {
    display: none;
  }
}

/* Print Stylesheet for Formal PDF Proposals */
@media print {
  body {
    background-color: #fff !important;
    color: #000 !important;
  }
  header.sticky-header, .phase-switcher-bar, .btn-action-outline, .zoom-toolbar {
    display: none !important;
  }
  .metric-card, .card, .feature-card, .diagram-container, .timeline-box, .budget-card, .role-card {
    border: 1px solid #ccc !important;
    background: #fdfdfd !important;
    color: #000 !important;
    break-inside: avoid;
  }
  img {
    max-width: 100% !important;
  }
}
