/* ----------------------------------------------------------------------- */
/*  Datos Colombia · Estilo editorial con guiños a la bandera tricolor      */
/* ----------------------------------------------------------------------- */

:root {
  --bg:        #0b1020;
  --bg-2:      #0f1530;
  --surface:   #141a36;
  --surface-2: #1b2244;
  --border:    rgba(255, 255, 255, 0.08);
  --text:      #e8ecf6;
  --muted:     #8a93b3;

  --yellow:    #ffd23f;
  --blue:      #2563eb;
  --red:       #ef4444;

  --grad-1: linear-gradient(135deg, #ffd23f 0%, #ffb000 100%);
  --grad-2: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --grad-3: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  --grad-hero: radial-gradient(1200px 600px at 80% -10%, rgba(255, 210, 63, 0.18), transparent 60%),
               radial-gradient(900px 500px at 0% 10%, rgba(37, 99, 235, 0.20), transparent 55%),
               radial-gradient(700px 500px at 50% 120%, rgba(239, 68, 68, 0.18), transparent 60%);

  --radius: 18px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 30px 60px -30px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Subtle film grain over everything */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5; mix-blend-mode: overlay;
}

/* ----------------------------- Hero ------------------------------------ */
.hero {
  position: relative;
  background: var(--grad-hero), var(--bg);
  padding-bottom: 90px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 24px 32px;
  position: relative; z-index: 3;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: -0.01em; font-size: 17px;
}
.brand strong { font-weight: 800; }
.flag {
  display: inline-flex; flex-direction: column;
  width: 28px; height: 18px; border-radius: 4px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.flag span:nth-child(1) { background: var(--yellow); height: 9px; }
.flag span:nth-child(2) { background: var(--blue); height: 4.5px; }
.flag span:nth-child(3) { background: var(--red); height: 4.5px; }

.nav-links {
  display: flex; gap: 28px; list-style: none; margin: 0; padding: 0;
  font-size: 14px; color: var(--muted);
}
.nav-links a:hover { color: var(--text); }

.hero-content {
  max-width: 1200px; margin: 0 auto; padding: 60px 32px 0;
  position: relative; z-index: 2;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px;
  color: var(--muted); margin: 0 0 20px;
}

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 17ch;
}
h1 .num { font-variant-numeric: tabular-nums; color: var(--yellow); }
h1 .hl {
  background: var(--grad-1); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}

.lede {
  max-width: 70ch; font-size: 19px; color: #c9d0e6; margin: 0 0 56px;
}
.lede strong { color: var(--text); }

/* KPIs */
.kpis, .bog-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 8px;
}
.bog-kpis { grid-template-columns: repeat(3, 1fr); margin-bottom: 32px; }

.kpis article, .bog-kpis article {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  backdrop-filter: blur(6px);
}
.kpi-num {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1;
  background: var(--grad-1);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bog-kpis .kpi-num { background: var(--grad-2); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bog-kpis article:nth-child(3) .kpi-num { background: var(--grad-3); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.kpi-label {
  margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.4;
}
.kpi-anio { color: var(--text); font-weight: 600; }

/* ----------------------------- Sections -------------------------------- */
main { position: relative; z-index: 2; }

.section {
  max-width: 1200px; margin: 0 auto;
  padding: 110px 32px;
  position: relative;
}
.section.alt {
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015) 30%, transparent);
  max-width: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section.alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section.alt > .grid-2,
.section.alt > .card { padding-left: 32px; padding-right: 32px; }
.section.alt > .section-head { padding-left: 32px; padding-right: 32px; }
.section.alt > .card { padding-left: 28px; padding-right: 28px; }

.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.kicker { font-size: 17px; color: #c9d0e6; max-width: 70ch; margin: 0; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 21px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.card .muted { color: var(--muted); font-size: 14px; }
.card p.muted { margin: 0 0 18px; }

.chart-lg canvas { height: 380px !important; }
.card canvas { height: 280px !important; margin-top: 10px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.year-label::before { content: "· "; }

.chart-toggle {
  display: inline-flex; gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin: 8px 0 4px;
}
.chart-toggle button {
  appearance: none; border: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.chart-toggle button:hover { color: var(--text); }
.chart-toggle button.active {
  background: var(--grad-1); color: #1a1300;
}

/* Prose */
.prose { padding: 36px 40px; }
.prose p { color: #c9d0e6; max-width: 70ch; }
.prose strong { color: var(--text); }
.prose em { color: var(--yellow); font-style: normal; }
.meta {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  border-top: 1px solid var(--border); padding-top: 24px;
}
.meta li { display: flex; flex-direction: column; gap: 4px; }
.meta span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.meta strong { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; }

footer {
  border-top: 1px solid var(--border);
  padding: 30px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.heart { color: var(--red); }
.muted { color: var(--muted); }

/* ----------------------------- Explorer -------------------------------- */
.explorer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.explorer-controls {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.control {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.control select {
  appearance: none;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 36px 10px 14px;
  font: 500 14px 'Inter', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%238a93b3' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  min-width: 180px;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.control select:hover { border-color: rgba(255,255,255,0.18); }
.control select:focus { outline: 2px solid var(--yellow); outline-offset: 2px; }

.control-btn {
  align-self: flex-end;
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 10px;
  font: 500 14px 'Inter', sans-serif;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 80ms ease;
}
.control-btn:hover { border-color: rgba(255,255,255,0.18); }
.control-btn:active { transform: translateY(1px); }
.control-btn[aria-pressed="true"] {
  background: var(--grad-1); color: #1a1300; border-color: transparent;
}
.play-icon {
  width: 0; height: 0;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-left: 2px;
  transition: all 120ms ease;
}
.control-btn[aria-pressed="true"] .play-icon {
  width: 9px; height: 10px;
  border: 0;
  background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
  margin-left: 0;
}

.explorer-summary {
  margin-left: auto;
  font-size: 13px; color: var(--muted);
  text-align: right; line-height: 1.4;
}
.explorer-summary strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 24px; font-weight: 700;
  background: var(--grad-1); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}

/* ---- Heat map (full-bleed, viewport height) ---- */
.section--full {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.map-fullscreen {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;        /* mobile-aware: ignora URL bar dinámica de iOS/Android */
  background: #0a0d1a;
  overflow: hidden;
}

.map-container {
  width: 100%;
  height: 100%;
  background: #0a0d1a;
}

.map-overlay {
  position: absolute;
  top: 28px; left: 28px; right: 28px;
  z-index: 500;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.map-overlay-head {
  max-width: 540px;
  background: linear-gradient(135deg, rgba(11, 16, 32, 0.88), rgba(20, 26, 54, 0.78));
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}
.map-overlay-head .eyebrow { margin-bottom: 12px; }
.map-overlay-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 10px;
}
.map-overlay-head .kicker {
  font-size: 14.5px; line-height: 1.5; margin: 0;
  color: #c9d0e6;
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 14px 18px;
  pointer-events: auto;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
}

.map-summary {
  font-size: 13px; color: var(--muted);
  line-height: 1.35;
  text-align: right;
  min-width: 200px;
}
.map-summary strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--grad-1); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

/* Match Leaflet UI to dark theme */
.leaflet-container {
  background: #0a0d1a;
  font-family: 'Inter', system-ui, sans-serif;
  outline: none;
}
.leaflet-control-zoom a,
.leaflet-control-zoom a:hover {
  background: rgba(20, 26, 54, 0.85);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.leaflet-control-zoom a:hover { background: rgba(30, 38, 76, 0.9); }
.leaflet-control-attribution {
  background: rgba(11, 16, 32, 0.7) !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  backdrop-filter: blur(6px);
}
.leaflet-control-attribution a { color: var(--muted) !important; }

.leaflet-tooltip.city-tooltip {
  background: #0b1020;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.leaflet-tooltip.city-tooltip::before { display: none; }
.leaflet-tooltip.city-tooltip strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.leaflet-tooltip.city-tooltip span { color: var(--muted); font-size: 12px; }

.map-legend {
  position: absolute;
  bottom: 24px; left: 28px;
  background: rgba(11, 16, 32, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 9px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  z-index: 500;
  pointer-events: none;
}
.legend-grad {
  width: 140px; height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    #1d4ed8 0%, #3b82f6 25%, #22c55e 45%, #ffd23f 70%, #f97316 85%, #ef4444 100%);
  box-shadow: 0 0 12px rgba(255, 210, 63, 0.3);
}
.legend-label { letter-spacing: 0.14em; }



/* ---- Hub (landing page) ---- */
.hub .hero { padding-bottom: 70px; }
.hub-hero h1 .hl {
  background: linear-gradient(135deg, #ffd23f 0%, #3b82f6 50%, #ef4444 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.back-link {
  color: var(--muted);
  text-decoration: none;
  margin-right: 6px;
  transition: color 120ms ease;
}
.back-link:hover { color: var(--text); }

/* Hero variant: seguridad usa rojo en vez de amarillo */
.hero--seguridad {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(239, 68, 68, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(249, 115, 22, 0.18), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(255, 210, 63, 0.12), transparent 60%),
    var(--bg);
}
.hl--red {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hl--green {
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero variant: Censo */
.hero--censo {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(34, 197, 94, 0.18), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(6, 182, 212, 0.15), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(59, 130, 246, 0.12), transparent 60%),
    var(--bg);
}

.cs-kpis .kpi-num {
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legend-grad--green {
  background: linear-gradient(90deg,
    #1d4ed8 0%, #06b6d4 30%, #22c55e 55%, #ffd23f 80%, #f97316 100%);
}

/* Topic gallery */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}
.topic-card {
  position: relative;
  display: block;
  border-radius: 22px;
  padding: 36px 36px 32px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1.05),
              border-color 220ms ease,
              box-shadow 220ms ease;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}
.topic-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.topic-card-bg {
  position: absolute; inset: 0;
  z-index: -1;
  opacity: 0.55;
  transition: opacity 220ms ease;
}
.topic-card:hover .topic-card-bg { opacity: 0.8; }

.topic-card-icon {
  position: absolute;
  top: 22px; right: 24px;
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.35));
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1.4);
  pointer-events: none;
}
.topic-card:hover .topic-card-icon {
  transform: scale(1.15) rotate(-6deg);
}
.topic-card--educacion .topic-card-bg {
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(255, 210, 63, 0.18), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(59, 130, 246, 0.15), transparent 60%);
}
.topic-card--seguridad .topic-card-bg {
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(239, 68, 68, 0.20), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(249, 115, 22, 0.18), transparent 60%);
}
.topic-card--censo .topic-card-bg {
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(34, 197, 94, 0.20), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(6, 182, 212, 0.18), transparent 60%);
}
.topic-card--censo .topic-num {
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topic-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.topic-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0 0 4px;
}
.topic-num {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 6px 0 -4px;
}
.topic-card--educacion .topic-num {
  background: linear-gradient(135deg, #ffd23f 0%, #ffb000 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topic-card--seguridad .topic-num {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topic-num-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
}
.topic-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.topic-desc {
  font-size: 15px;
  line-height: 1.55;
  color: #c9d0e6;
  margin: 6px 0 18px;
}
.topic-cta {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  align-self: flex-start;
  padding: 8px 0;
  position: relative;
  transition: padding 200ms ease;
}
.topic-cta::after {
  content: '';
  position: absolute;
  left: 0; bottom: 4px;
  width: 100%; height: 1px;
  background: currentColor;
  opacity: 0.3;
  transition: opacity 200ms ease;
}
.topic-card:hover .topic-cta { padding-left: 6px; }
.topic-card:hover .topic-cta::after { opacity: 0.7; }
.topic-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 0;
  letter-spacing: 0.04em;
}

/* Próximamente (coming soon) */
.section--soon {
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.015) 50%, transparent 100%);
}
.soon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.soon-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 180ms ease, border-color 180ms ease;
}
.soon-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
}
.soon-emoji {
  font-size: 28px;
  margin: 0 0 4px;
  line-height: 1;
}
.soon-card h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0;
}
.soon-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

/* ---- Sección "Foco" (deep-dive) ---- */
.section--focus {
  background:
    radial-gradient(900px 300px at 100% 0%, rgba(168, 85, 247, 0.12), transparent 60%),
    radial-gradient(700px 240px at 0% 100%, rgba(239, 68, 68, 0.10), transparent 60%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.vg-kpis .kpi-num {
  font-size: clamp(20px, 2.4vw, 28px);
  background: linear-gradient(135deg, #a855f7 0%, #ef4444 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Sub-mapa Bogotá (delitos por localidad) ---- */
.del-map-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
  background: #0a0d1a;
  border: 1px solid var(--border);
}
.del-map {
  width: 100%;
  height: 520px;
}
.del-kpis .kpi-num {
  font-size: clamp(20px, 2.5vw, 30px);
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.del-kpis article:nth-child(3) .kpi-num {
  font-size: clamp(15px, 2vw, 22px);
  letter-spacing: -0.005em;
}

/* ----------------------------- Responsive ------------------------------ */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav { padding: 14px 18px; }
  .brand { font-size: 16px; }

  /* Topic gallery: 1 col en mobile */
  .topic-grid { grid-template-columns: 1fr; gap: 16px; }
  .topic-card { padding: 26px 22px; }
  .topic-num  { font-size: clamp(40px, 14vw, 64px); }

  .soon-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .soon-card { padding: 16px 14px; }

  /* Hero — tipografía y espacios más justos */
  .hero { padding-bottom: 50px; }
  .hero-content { padding: 32px 18px 0; }
  h1 {
    font-size: clamp(32px, 9vw, 56px);
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
  }
  .lede { font-size: 16px; line-height: 1.5; margin-bottom: 36px; }
  .eyebrow { font-size: 11px; letter-spacing: 0.16em; margin-bottom: 14px; }

  /* KPIs hero (4 → 2x2) */
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpis article { padding: 16px 14px; }

  /* KPIs Bogotá: 3 chips compactos en una sola fila para no devorar scroll */
  .bog-kpis {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 22px;
  }
  .bog-kpis article {
    padding: 12px 10px;
    text-align: center;
  }
  .bog-kpis .kpi-num   { font-size: 20px; line-height: 1; }
  .bog-kpis .kpi-label { font-size: 11px; line-height: 1.25; margin-top: 6px; }
  .bog-kpis .kpi-anio  { display: block; }

  .kpi-num   { font-size: 26px; }
  .kpi-label { font-size: 12px; }

  /* Layouts */
  .grid-2 { grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
  .meta { grid-template-columns: 1fr; gap: 10px; }

  /* Sections + cards */
  .section { padding: 56px 18px; }
  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: clamp(24px, 6.4vw, 36px); }
  .section.alt > .grid-2,
  .section.alt > .card,
  .section.alt > .section-head { padding-left: 18px; padding-right: 18px; }
  .card { padding: 18px; }
  .card h3 { font-size: 18px; }

  /* Defaults — sobrescritos abajo por gráfica según su tipo */
  .chart-lg canvas { height: 300px !important; }
  .card canvas { height: 230px !important; }

  /* Series temporales: anchas, no altas */
  #chartTotales,
  #chartGenero,
  #chartSector,
  #chartBogVsRest    { height: 230px !important; }

  /* Rankings horizontales (10–15 ítems): necesitan altura para que no se aplaste */
  #chartDeptos       { height: 380px !important; }
  #chartNbc,
  #chartIes          { height: 380px !important; }
  #chartBogNbc,
  #chartBogIes       { height: 320px !important; }

  /* Donas: cuadradas */
  #chartMetodologia,
  #chartNivel        { height: 260px !important; }

  /* Seguridad / delitos */
  #chartDelTotales,
  #chartDelEvol      { height: 250px !important; }
  #chartDelTipos     { height: 280px !important; }
  #chartDelLoc       { height: 380px !important; }
  .del-map           { height: 380px !important; }

  /* Foco VI/DS */
  #chartVgTendencia,
  #chartVgShare      { height: 240px !important; }
  #chartVgTop,
  #chartVgSplit      { height: 320px !important; }

  /* Censo */
  #censoTopDeptos    { height: 380px !important; }
  #censoPiramide     { height: 420px !important; }
  #censoEtnia,
  #censoUrbanoRural  { height: 260px !important; }
  #censoEducacion    { height: 260px !important; }

  /* Prose card */
  .prose { padding: 22px 20px; }
  .meta strong { font-size: 18px; }

  /* Hero KPI numbers — smaller serifs */
  h1 .num { font-size: 0.92em; }

  /* Map: overlay compacto, controles en una sola fila si caben */
  .map-overlay {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
  }
  .map-overlay-head {
    padding: 14px 16px;
    border-radius: 12px;
    max-width: none;
  }
  .map-overlay-head h2 { font-size: 19px; line-height: 1.15; margin-bottom: 6px; }
  .map-overlay-head .kicker { font-size: 13px; line-height: 1.4; }
  .map-overlay-head .eyebrow { margin-bottom: 8px; font-size: 10px; }
  .map-controls {
    padding: 10px 12px;
    border-radius: 12px;
    width: 100%;
    gap: 10px;
  }
  .map-summary {
    margin-left: 0;
    text-align: left;
    width: 100%;
    min-width: 0;
    font-size: 12px;
  }
  .map-summary strong { font-size: 18px; }
  .map-legend {
    bottom: 12px; left: 12px;
    padding: 7px 12px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .legend-grad { width: 90px; height: 6px; }

  /* Touch targets ≥ 44px en selects/botones */
  .control select,
  .control-btn,
  .chart-toggle button {
    min-height: 44px;
  }
  .control select { padding: 10px 36px 10px 14px; font-size: 14px; }

  /* Footer */
  footer { padding: 24px 20px; font-size: 12px; }
}

/* Teléfonos pequeños (<480px) */
@media (max-width: 480px) {
  h1 { font-size: clamp(28px, 11vw, 44px); }
  .soon-grid { grid-template-columns: 1fr; }
  .lede { font-size: 15px; }

  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-num { font-size: 22px; }

  .section { padding: 48px 16px; }
  .section.alt > .grid-2,
  .section.alt > .card,
  .section.alt > .section-head { padding-left: 16px; padding-right: 16px; }

  /* Map: ocultar el kicker en móvil pequeño para dejar más mapa visible */
  .map-overlay-head .kicker { display: none; }
  .map-overlay-head h2 { font-size: 17px; margin-bottom: 0; }
  .map-overlay-head { padding: 12px 14px; }
  .map-overlay { top: 10px; left: 10px; right: 10px; gap: 8px; }

  .leaflet-control-zoom { margin-right: 10px !important; margin-top: 10px !important; }

  /* Pantallas <480 px: aún más justo, sin perder rankings */
  #chartTotales,
  #chartGenero,
  #chartSector,
  #chartBogVsRest    { height: 210px !important; }

  #chartDeptos       { height: 360px !important; }
  #chartNbc,
  #chartIes          { height: 360px !important; }
  #chartBogNbc,
  #chartBogIes       { height: 300px !important; }

  #chartMetodologia,
  #chartNivel        { height: 240px !important; }
}
