/* ============================================================
   DISRUPTIS - Global Trade Disruption Monitor
   Dark theme only. Bloomberg meets modern SaaS.
   ============================================================ */

/* --- CSS Variables --- */
:root {
  /* Backgrounds - monochrome, #181818 base with white layered on top */
  --bg-primary: #111111;
  --bg-secondary: #181818;
  --bg-card: #1e1e1e;
  --bg-elevated: #262626;

  /* Borders */
  --border: #2a2a2a;
  --border-bright: #383838;

  /* Text */
  --text-primary: #eeeeee;
  --text-secondary: #a0a0a0;
  --text-muted: #717171;

  /* Accent - Brand Green */
  --green: #15EE76;
  --green-dim: rgba(21, 238, 118, 0.12);

  /* Severity Scale */
  --severity-critical: #ff3344;
  --severity-high: #ff8833;
  --severity-minor: #ffbb33;
  --severity-positive: #15EE76;
  --severity-major-pos: #00ffaa;
  --info: #22aadd;

  /* Fonts */
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'DM Sans', sans-serif;

  /* Layout */
  --ticker-height: 32px;
  --nav-height: 56px;
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sm {
  font-size: 13px;
  padding: 7px 16px;
}

.btn-lg {
  font-size: 15px;
  padding: 11px 24px;
}

.btn-primary {
  background: var(--green);
  color: #111111;
  border: 1px solid var(--green);
}

.btn-primary:hover {
  background: #00ff88;
  box-shadow: 0 0 20px rgba(21, 238, 118, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn-full {
  width: 100%;
}

/* --- Pulse Dot --- */
.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.pulse-dot-sm {
  width: 6px;
  height: 6px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(21, 238, 118, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(21, 238, 118, 0); }
}

/* ============================================================
   TICKER BAR
   ============================================================ */
.ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--ticker-height);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 90s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 16px;
  flex-shrink: 0;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ticker-dot-red { background: var(--severity-critical); }
.ticker-dot-orange { background: var(--severity-high); }
.ticker-dot-green { background: var(--severity-positive); }

.ticker-tag {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 999;
  background: rgba(24, 24, 24, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 13px;
  color: var(--text-primary);
  transition: color 0.2s;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.2s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 20px;
  background: rgba(24, 24, 24, 0.95);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile .nav-link {
  padding: 8px 0;
  font-size: 15px;
}

.nav-mobile-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.nav-mobile-actions .btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 15px;
  text-align: center;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-height) + 100px);
  padding-bottom: 40px;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(21, 238, 118, 0.2);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: 68px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-title-line1 {
  display: block;
  color: var(--text-primary);
}

.hero-title-line2 {
  display: block;
  color: var(--green);
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 28px;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
}

.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

/* ============================================================
   MAP SECTION
   ============================================================ */
.map-section {
  padding: 40px 24px 80px;
}

.map-container {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.map-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.map-toolbar-title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.map-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-filter {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s;
  cursor: pointer;
}

.map-filter:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
}

.map-filter.active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.map-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(21, 238, 118, 0.2);
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
  flex-shrink: 0;
}

.map-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(21, 238, 118, 0.6); }
  50% { opacity: 0.5; box-shadow: 0 0 0 5px rgba(21, 238, 118, 0); }
}

.map-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.map-canvas-wrapper {
  position: relative;
  height: 680px;
}

.map-canvas {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
}

/* Leaflet overrides */
.leaflet-container {
  background: var(--bg-primary) !important;
  font-family: var(--font-mono) !important;
}

.leaflet-control-attribution {
  background: rgba(17, 17, 17, 0.85) !important;
  color: var(--text-muted) !important;
  font-size: 9px !important;
}

.leaflet-control-attribution a {
  color: var(--text-muted) !important;
}

.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

/* Map markers */
.map-marker {
  border-radius: 50%;
  opacity: 0.9;
  transition: opacity 0.3s, transform 0.3s;
}

.map-marker.hidden {
  opacity: 0 !important;
  transform: scale(0) !important;
  pointer-events: none;
}

.map-marker-pulse {
  animation: marker-pulse 2.5s ease-out infinite;
}

@keyframes marker-pulse {
  0% { box-shadow: 0 0 0 0 currentColor; }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Map tooltips */
/* Map popups (click to open, stay open) */
.map-popup .leaflet-popup-content-wrapper {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: 8px !important;
  font-family: var(--font-sans) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
}

.map-popup .leaflet-popup-content {
  margin: 12px 14px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.map-popup .leaflet-popup-tip {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-bright) !important;
  box-shadow: none !important;
}

.map-popup .leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 18px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 4px !important;
}

.map-popup .leaflet-popup-close-button:hover {
  color: var(--text-primary) !important;
}

/* Legacy tooltip (keep for backward compat) */
.map-tooltip {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-bright) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  font-family: var(--font-sans) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  max-width: 300px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

.map-tooltip::before {
  border-top-color: var(--border-bright) !important;
}

.leaflet-tooltip-top::before {
  border-top-color: var(--border-bright) !important;
}

.leaflet-tooltip-bottom::before {
  border-bottom-color: var(--border-bright) !important;
}

.tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tooltip-severity {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1;
}

.tooltip-country {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.tooltip-summary {
  font-weight: 600;
  font-size: 12.5px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.tooltip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.tooltip-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
}

.tooltip-routes {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  margin-top: 4px;
}

/* Map side panel */
.map-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 300px;
  max-width: 300px;
  background: rgba(24, 24, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid var(--border);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 500;
}

.map-panel-section {
  padding: 20px 16px;
  overflow: hidden;
}

.map-panel-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
}

.map-panel-divider {
  height: 1px;
  background: var(--border);
}

.risk-index {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risk-index-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.risk-index-score {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.risk-index-arrow {
  color: var(--severity-critical);
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}

.risk-index-arrow--up {
  transform: rotate(0deg);
}

.risk-index-arrow--down {
  transform: rotate(180deg);
}

/* Elevated Risk chip */
.risk-index-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}

.risk-index-chip--elevated {
  background: rgba(255, 136, 51, 0.12);
  border: 1px solid rgba(255, 136, 51, 0.25);
  color: #ffffff;
}

.risk-index-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--severity-high);
  flex-shrink: 0;
}

/* Sparkline row */
.risk-index-sparkline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#riskSparkline {
  display: block;
}

.risk-index-change {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
}

.disruption-list {
  width: 100%;
  overflow: hidden;
}

/* Disruption list items */
.disruption-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  overflow: hidden;
}

.disruption-item:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.02);
}

.disruption-item-header {
  margin-bottom: 4px;
  line-height: 1.1;
}

.disruption-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
  flex-shrink: 0;
}

.disruption-item-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  display: inline;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.disruption-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.disruption-item-desc {
  font-size: 10px;
  color: var(--text-secondary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.disruption-item-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ============================================================
   SECTIONS - Common
   ============================================================ */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 6px;
  text-align: center;
}

.section-title {
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.65;
}

/* ============================================================
   FEATURES GRID
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--green-dim);
  color: var(--green);
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   USE CASES
   ============================================================ */
.usecases-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.usecase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.usecase-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.usecase-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--green-dim);
  color: var(--green);
}

.usecase-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.usecase-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   DATA PREVIEW
   ============================================================ */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.data-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.data-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.data-card-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.data-card-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--green-dim);
  color: var(--green);
}

.data-card-body {
  padding: 16px;
}

/* Code block */
.code-block {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
  overflow-x: auto;
}

.code-key { color: #ffffff; }
.code-string { color: var(--green); }
.code-number { color: var(--severity-high); }

/* Schema table */
.schema-table {
  width: 100%;
  border-collapse: collapse;
}

.schema-table tr {
  border-bottom: 1px solid var(--border);
}

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

.schema-table td {
  padding: 9px 0;
  font-size: 12px;
  vertical-align: top;
}

.schema-field {
  font-family: var(--font-mono);
  color: var(--green);
  width: 140px;
  padding-right: 16px;
  font-size: 11.5px;
}

.schema-desc {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 0 24px 80px;
}

.cta-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 120px;
  background: radial-gradient(ellipse, rgba(21, 238, 118, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  letter-spacing: -0.02em;
}

.cta-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
  position: relative;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  position: relative;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px calc(24px + var(--ticker-height));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 440px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 24px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--green);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5L6 8L9 5' stroke='%234a5268' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.modal-form .btn {
  margin-top: 8px;
}

.modal-success {
  text-align: center;
  padding: 20px 0;
}

.modal-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-dim);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 16px;
}

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

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

.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }
.anim-delay-5 { transition-delay: 0.5s; }

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

/* Tablet */
@media (max-width: 1200px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

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

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

  .map-canvas-wrapper {
    height: auto;
  }

  .map-canvas {
    height: 500px;
  }

  .map-container {
    overflow: visible;
  }

  .map-panel {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--border);
    backdrop-filter: none;
    background: var(--bg-secondary);
    overflow: visible;
  }

  .map-panel .map-panel-divider,
  .map-panel .map-panel-section:last-child {
    display: none;
  }

  .hero-title {
    font-size: 54px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero {
    padding-top: calc(var(--nav-height) + 60px);
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 14.5px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero-ctas .btn {
    width: 100%;
    max-width: 280px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .usecases-grid {
    grid-template-columns: 1fr;
  }

  .data-grid {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    height: 350px;
  }

  .risk-index-score {
    font-size: 36px;
  }

  .map-filters {
    display: none;
  }

  .nav-actions {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .cta-card {
    padding: 40px 24px;
  }

  .cta-title {
    font-size: 24px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    font-size: 26px;
  }

  .code-block {
    font-size: 11px;
  }

  .modal {
    padding: 28px 24px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .ticker {
    display: none;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 40px);
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-stat-value {
    font-size: 22px;
  }

  .map-toolbar-title {
    font-size: 10px;
  }
}

/* ============================================================
   TRADE ROUTE LINES (Leaflet polyline styling via CSS)
   ============================================================ */
.trade-route-line {
  stroke: var(--info);
  stroke-opacity: 0.08;
  stroke-dasharray: 8 6;
}


/* ============================================================
   LEGAL PAGES (Privacy, Terms, Contact)
   ============================================================ */
.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.legal-nav-brand {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.legal-nav-back {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-nav-back:hover {
  color: var(--text-primary);
}

.legal-page {
  min-height: calc(100vh - 120px);
  padding: 60px 40px 80px;
}

.legal-container {
  max-width: 680px;
  margin: 0 auto;
}

.legal-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  background: var(--green-dim);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 600;
}

.legal-title {
  font-family: var(--font-sans);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.legal-section {
  margin-bottom: 36px;
}

.legal-section h2 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.legal-section h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  margin-top: 20px;
}

.legal-section p {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.legal-section ul li {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  margin-bottom: 4px;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.6;
}

.legal-contact {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--green) !important;
  font-weight: 500;
}

.legal-link {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid rgba(21, 238, 118, 0.3);
  transition: border-color 0.2s;
}

.legal-link:hover {
  border-color: var(--green);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

.contact-form textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  resize: vertical;
  min-height: 120px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-success {
  text-align: center;
  padding: 40px 0;
}

/* Methodology page */
.methodology-container {
  max-width: 720px;
}

.method-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 48px;
  border-left: 2px solid var(--border);
  padding-left: 28px;
  margin-left: 12px;
}

.method-step {
  position: relative;
  padding-bottom: 32px;
}

.method-step:last-child {
  padding-bottom: 0;
}

.method-step::before {
  content: '';
  position: absolute;
  left: -35px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--green);
}

.method-step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.method-step h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.method-step p {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Severity scale */
.severity-scale {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.severity-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.severity-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  min-width: 40px;
  flex-shrink: 0;
}

.severity-neg .severity-label {
  color: var(--severity-critical);
}

.severity-pos .severity-label {
  color: var(--green);
}

.severity-desc {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Method tags */
.method-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.method-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(21, 238, 118, 0.15);
}

@media (max-width: 768px) {
  .legal-nav {
    padding: 14px 20px;
  }

  .legal-page {
    padding: 40px 20px 60px;
  }

  .legal-title {
    font-size: 28px;
  }
}
