/* ========================================
   DATA ECONOMY — Design System
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  --color-bg: #0a0e1a;
  --color-bg-secondary: #111827;
  --color-bg-tertiary: #1a2235;
  --color-bg-card: #151c2e;
  --color-bg-card-hover: #1c2540;
  --color-surface: rgba(255, 255, 255, 0.03);
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(99, 179, 237, 0.3);
  --color-text-primary: #f0f4f8;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-accent: #3b82f6;
  --color-accent-light: #60a5fa;
  --color-accent-glow: rgba(59, 130, 246, 0.15);
  --color-cyan: #06b6d4;
  --color-cyan-glow: rgba(6, 182, 212, 0.15);
  --color-emerald: #10b981;
  --color-emerald-glow: rgba(16, 185, 129, 0.15);
  --color-violet: #8b5cf6;
  --color-violet-glow: rgba(139, 92, 246, 0.15);
  --color-amber: #f59e0b;
  --color-amber-glow: rgba(245, 158, 11, 0.15);
  --gradient-primary: linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-hero: linear-gradient(180deg, #0a0e1a 0%, #111827 100%);
  --gradient-card: linear-gradient(145deg, var(--color-bg-card), var(--color-bg-tertiary));
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-cyan); }

img, svg { max-width: 100%; display: block; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  max-width: 72ch;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-light);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
  position: relative;
}

/* --- Grid Background Pattern --- */
.grid-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.grid-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.06) 0%, transparent 60%);
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 24px;
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}

.nav.scrolled {
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-primary);
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-logo span {
  opacity: 0.5;
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-primary);
  background: var(--color-surface);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 18px; right: 18px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Floating Orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.hero-orb--blue {
  width: 500px; height: 500px;
  background: rgba(59, 130, 246, 0.08);
  top: -100px; right: -100px;
  animation: float 20s ease-in-out infinite;
}

.hero-orb--cyan {
  width: 400px; height: 400px;
  background: rgba(6, 182, 212, 0.06);
  bottom: -100px; left: 10%;
  animation: float 25s ease-in-out infinite reverse;
}

.hero-orb--violet {
  width: 350px; height: 350px;
  background: rgba(139, 92, 246, 0.06);
  top: 30%; right: 20%;
  animation: float 18s ease-in-out infinite 3s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Hero Graphic */
.hero-graphic {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 560px;
  height: 560px;
  z-index: 1;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
  color: #fff;
}

.btn-secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card-hover);
  color: var(--color-text-primary);
}

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 36px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), transparent);
  pointer-events: none;
}

.card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}

.card-icon--blue { background: var(--color-accent-glow); }
.card-icon--cyan { background: var(--color-cyan-glow); }
.card-icon--emerald { background: var(--color-emerald-glow); }
.card-icon--violet { background: var(--color-violet-glow); }
.card-icon--amber { background: var(--color-amber-glow); }

.card h3 { margin-bottom: 12px; }
.card p { font-size: 0.9375rem; }

/* Card Grid */
.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ========================================
   STATS
   ======================================== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ========================================
   SECTIONS — Shared Patterns
   ======================================== */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-header p {
  margin: 16px auto 0;
}

/* Feature Row (alternating) */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 60px 0;
}

.feature-row:nth-child(even) .feature-visual {
  order: -1;
}

.feature-text h3 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.feature-text p {
  margin-bottom: 24px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

/* Visual Placeholder */
.feature-visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* ========================================
   TIMELINE
   ======================================== */
.timeline {
  position: relative;
  padding-left: 48px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-accent), var(--color-cyan), var(--color-emerald));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -41px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-bg), 0 0 0 6px var(--color-accent);
}

.timeline-year {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.timeline-item h4 { margin-bottom: 8px; }
.timeline-item p { font-size: 0.9375rem; }

/* ========================================
   DATA VIZ — Bar Chart
   ======================================== */
.chart-container {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 260px;
  padding-top: 20px;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 6px 6px 0 0;
  background: var(--gradient-primary);
  position: relative;
  min-height: 4px;
  transition: height 1s ease;
}

.chart-bar::after {
  content: attr(data-value);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent-light);
  white-space: nowrap;
}

.chart-label {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ========================================
   TABLES
   ======================================== */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-table th {
  padding: 16px 24px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--color-border);
}

.data-table td {
  padding: 16px 24px;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

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

.data-table tr:hover td {
  background: rgba(255,255,255,0.015);
}

.table-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.table-badge--green {
  background: var(--color-emerald-glow);
  color: var(--color-emerald);
}

.table-badge--blue {
  background: var(--color-accent-glow);
  color: var(--color-accent-light);
}

.table-badge--amber {
  background: var(--color-amber-glow);
  color: var(--color-amber);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  font-size: 0.9375rem;
  margin-top: 16px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.footer-col a:hover { color: var(--color-text-primary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Pulse dot */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-emerald);
  animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   CUSTOM SVG GRAPHICS
   ======================================== */

/* Network Constellation */
.constellation {
  position: relative;
  width: 100%;
  height: 100%;
}

.constellation svg {
  width: 100%;
  height: 100%;
}

/* Data Flow Graphic */
.data-flow-graphic {
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--color-accent-glow) 0%, transparent 70%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated Ring */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes dash-move {
  to { stroke-dashoffset: -60; }
}

/* ========================================
   PAGE-SPECIFIC STYLES
   ======================================== */

/* Ecosystem Page */
.ecosystem-map {
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--gradient-card);
  overflow: hidden;
  position: relative;
}

.player-card {
  padding: 28px;
}

.player-card .player-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
}

.player-card .player-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* Insights Page */
.insight-hero-number {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.trend-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.trend-number {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: var(--color-bg-tertiary);
  -webkit-text-stroke: 1px var(--color-accent);
  min-width: 60px;
}

/* Resources Page */
.resource-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.resource-card .resource-type {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  display: inline-block;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  padding: 24px;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-smooth);
}

.tool-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.tool-card h4 {
  margin-bottom: 8px;
}

.tool-card p {
  font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero-graphic { display: none; }
  .feature-row { gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  section { padding: 60px 0; }
  
  .nav-links { 
    display: none;
    position: absolute;
    top: 72px; left: 0;
    width: 100%;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    padding: 16px;
    flex-direction: column;
    border-bottom: 1px solid var(--color-border);
  }
  
  .nav-links.open { display: flex; }
  
  .nav-toggle { display: flex; }
  
  .card-grid--2,
  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }
  
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 32px;
    gap: 24px;
  }
  
  .feature-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .feature-row:nth-child(even) .feature-visual {
    order: 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .chart-bars { gap: 8px; }
}

/* ========================================
   UTILITY
   ======================================== */
.mb-0 { margin-bottom: 0; }
.mt-8 { margin-top: 32px; }
.mt-16 { margin-top: 64px; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin: 80px 0;
}

/* Glow line */
.glow-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-cyan), transparent);
  opacity: 0.3;
}
