/* Geotobler — dark-mode design system aligned to BRAND_BRIEF_GEOTOBLER */
:root {
  /* brand */
  --brand: #0A1F44;
  --brand-deep: #061330;
  --accent: #4EA8FF;
  --accent-soft: rgba(78, 168, 255, 0.14);
  --accent-deep: #2C7DDB;

  /* clusters */
  --cluster-1: #FFB86B;
  --cluster-2: #48E0C8;
  --cluster-3: #E86FB7;
  --cluster-4: #C8FF6B;

  /* neutrals dark */
  --bg: #0B0E18;
  --bg-1: #13172A;
  --bg-2: #1F2540;
  --bg-3: #2A3253;

  /* text on dark */
  --text: #E7EBF4;
  --text-mute: #B9C1D9;
  --text-faint: #7B85A6;

  /* lines */
  --rule: rgba(231, 235, 244, 0.08);
  --rule-strong: rgba(231, 235, 244, 0.16);

  /* glass */
  --glass: rgba(19, 23, 42, 0.62);
  --glass-strong: rgba(19, 23, 42, 0.82);
  --glass-border: rgba(231, 235, 244, 0.10);

  /* semantic */
  --success: #4ADE80;
  --warn: #F59E0B;
  --error: #EF4444;

  /* motion */
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  line-height: 1.55;
  font-size: 17px;
}
body.has-scroll { overflow-y: auto; overflow-x: hidden; }

a { color: inherit; }
button { font-family: inherit; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-feature-settings: 'ss01';
}

/* ---------- Topographic decorative background ---------- */
.topo-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 800px 400px at 80% 20%, rgba(78, 168, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 600px 500px at 10% 90%, rgba(72, 224, 200, 0.06), transparent 60%);
  opacity: 0.9;
  z-index: 0;
}

/* ---------- HERO (map full-bleed) ---------- */
.hero { position: relative; height: 100vh; width: 100%; overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--bg); }

.intro-backdrop {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 65% 55%, transparent 25%, rgba(11, 14, 24, 0.55) 100%);
  transition: opacity 800ms var(--ease-out-expo);
}
.intro-backdrop.gone { opacity: 0; }

/* Nav — fixed glass bar */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: 60px;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: rgba(11, 14, 24, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.nav .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 18px; color: var(--text);
  letter-spacing: -0.01em;
}
.nav .brand .hex { width: 22px; height: 22px; color: var(--accent); }
.nav .links { display: flex; gap: 26px; color: var(--text-mute); }
.nav .links a { color: inherit; text-decoration: none; font-weight: 400; transition: color 150ms; }
.nav .links a:hover { color: var(--text); }
.nav .right { display: flex; align-items: center; gap: 16px; }
.nav .lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--text-faint); letter-spacing: 0.06em;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav .lang button {
  background: none; border: none; padding: 4px 6px; cursor: pointer;
  color: var(--text-faint); font: inherit; letter-spacing: inherit;
  border-radius: 4px;
  transition: color 150ms, background 150ms;
}
.nav .lang button.active { color: var(--text); font-weight: 700; background: rgba(255,255,255,0.06); }
.nav .lang button:not(.active):hover { color: var(--text); }
.nav .lang .lang-sep { color: var(--text-faint); opacity: 0.5; }
.brand-text {
  display: inline-block;
  white-space: nowrap;
  letter-spacing: inherit;
}
.brand-text strong {
  display: inline;
  color: var(--accent);
  font-weight: 900;
  font-style: normal;
  margin: 0; padding: 0;
  letter-spacing: inherit;
  line-height: inherit;
}

/* CTA buttons */
.btn-cta {
  background: var(--accent); color: var(--brand-deep);
  border: none; border-radius: 8px;
  padding: 10px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background 200ms var(--ease-out-expo), transform 150ms;
  letter-spacing: 0.01em;
}
.btn-cta:hover { background: #6BB8FF; transform: translateY(-1px); }
.btn-cta-large { padding: 14px 26px; font-size: 14px; border-radius: 10px; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 13px 22px; font-size: 13px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: border-color 200ms, color 200ms;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Hero copy overlay */
.hero-copy {
  position: absolute; top: 50%; left: 48px; transform: translateY(-50%);
  max-width: 460px; z-index: 5;
  pointer-events: none;
  padding: 26px 30px;
  background: linear-gradient(135deg, rgba(6, 19, 48, 0.94) 0%, rgba(11, 14, 24, 0.88) 100%);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 50px -10px rgba(6, 19, 48, 0.55);
}
.hero-copy * { pointer-events: auto; }
.hero-banner {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(78, 168, 255, 0.10);
  border: 1px solid rgba(78, 168, 255, 0.28);
  padding: 6px 12px; border-radius: 999px;
  text-decoration: none;
  margin-bottom: 18px;
  transition: background 200ms, border-color 200ms;
}
.hero-banner:hover { background: rgba(78, 168, 255, 0.18); border-color: var(--accent); }
.hero-banner .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(78,168,255,0.6);
  animation: dot-pulse 1.8s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(78,168,255,0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(78,168,255,0); }
}
.hero-copy .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.14em;
  color: #6BB8FF;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 700;
}
.hero-copy h1 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(36px, 4.2vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero-copy h1 .accent-verb { color: var(--accent); }
.hero-copy h1 .rotating-verb {
  color: #ffffff;
  display: inline-block;
  transition: opacity 320ms var(--ease-out-expo), transform 320ms var(--ease-out-expo);
  will-change: opacity, transform;
}
.hero-copy h1 .rotating-verb.swap {
  opacity: 0;
  transform: translateY(-6px);
}
.hero-copy p.sub {
  font-size: 17px; line-height: 1.55;
  color: #E7EBF4;
  max-width: 480px;
  margin-bottom: 24px;
  font-weight: 400;
}
.hero-copy .ghost { font-size: 16px; }
.hero-copy .actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero-copy .ghost {
  background: none; border: none;
  color: var(--text-mute); font-size: 14px; font-weight: 700;
  cursor: pointer; padding: 10px 0;
  transition: color 150ms;
}
.hero-copy .ghost:hover { color: var(--text); }

/* ── Tiny Netcomm presence inside the hero-copy box ─────────────────────── */
.hero-netcomm-mini {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  margin-bottom: 18px;
  background: rgba(78, 168, 255, 0.10);
  border: 1px solid rgba(78, 168, 255, 0.35);
  border-radius: 999px;
  text-decoration: none;
  transition: background 150ms, border-color 150ms;
  max-width: 100%;
}
.hero-netcomm-mini:hover {
  background: rgba(78, 168, 255, 0.18);
  border-color: var(--accent, #4EA8FF);
}
/* The Netcomm logo is white-on-transparent → looks great on the dark hero pill */
.hero-netcomm-mini-logo {
  display: block;
  height: 30px;
  width: auto;
  flex-shrink: 0;
}
.hero-netcomm-mini-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #B9C1D9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-netcomm-mini-meta strong { color: #ffffff; font-weight: 700; }

/* ── Netcomm presence — full-width strip directly below the hero ────────── */
.section-netcomm-strip {
  padding: 0;
  background: linear-gradient(135deg, #06182F 0%, #0A1424 100%);
  border-top: 1px solid rgba(78, 168, 255, 0.18);
  border-bottom: 1px solid rgba(78, 168, 255, 0.18);
  position: relative;
}
.section-netcomm-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(900px circle at 20% 50%, rgba(78, 168, 255, 0.12), transparent 60%);
  pointer-events: none;
}
.netcomm-strip-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.netcomm-strip-logo-wrap {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 80px;
  padding: 10px 14px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.5);
}
.netcomm-strip-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.netcomm-strip-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.netcomm-strip-eyebrow {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 18px;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.netcomm-strip-meta {
  font-size: 14px;
  color: #B9C1D9;
  line-height: 1.45;
}
.netcomm-strip-meta strong { color: #ffffff; font-weight: 700; }
.netcomm-strip-credit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  color: #6BB8FF;
  margin-top: 4px;
  text-transform: uppercase;
}
.netcomm-strip-cta {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px;
  background: var(--accent, #4EA8FF);
  color: #06182F;
  font-family: 'Lato', sans-serif;
  font-weight: 800;
  font-size: 15px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 150ms, background 150ms, box-shadow 150ms;
  box-shadow: 0 8px 22px -4px rgba(78, 168, 255, 0.45);
  white-space: nowrap;
}
.netcomm-strip-cta:hover {
  transform: translateY(-2px);
  background: #6BB8FF;
  box-shadow: 0 14px 32px -4px rgba(78, 168, 255, 0.6);
}
@media (max-width: 880px) {
  .netcomm-strip-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 20px;
  }
  .netcomm-strip-logo-wrap { width: 140px; height: 64px; padding: 8px 10px; }
  .netcomm-strip-cta { width: 100%; padding: 13px 18px; font-size: 14px; }
  .netcomm-strip-eyebrow { font-size: 16px; }
  .netcomm-strip-meta { font-size: 13px; }
}

.hero-scroll-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--text-faint); text-transform: uppercase;
  animation: bounce 2.4s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.6; }
  50% { transform: translate(-50%, 6px); opacity: 1; }
}

.skip-intro {
  position: absolute; top: 76px; right: 32px; z-index: 9;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 7px 14px; border-radius: 999px;
  font-size: 11px; color: var(--text-mute);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  transition: color 150ms, border-color 150ms;
}
.skip-intro:hover { color: var(--text); border-color: var(--accent); }

/* Replay animation pill — bottom-left of hero */
.replay-intro {
  position: absolute;
  bottom: 22px; left: 24px;
  z-index: 9;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--glass-strong);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--glass-border);
  padding: 7px 13px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--text-mute);
  cursor: pointer;
  transition: color 150ms, border-color 150ms, background 150ms;
}
.replay-intro:hover { color: var(--text); border-color: var(--accent); background: rgba(78,168,255,0.10); }
.replay-intro svg { color: var(--accent); }

/* ---------- Map controls (glass) ---------- */
.controls {
  position: absolute;
  bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 6;
  background: rgba(6, 19, 48, 0.94);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex; gap: 18px; align-items: center;
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.55);
  max-width: 92vw;
  font-size: 12px;
  opacity: 0;
  transition: opacity 500ms var(--ease-out-expo), transform 500ms var(--ease-out-expo);
}
.controls.visible { opacity: 1; transform: translate(-50%, 0); }
.controls.hidden-init { transform: translate(-50%, 16px); }

.ctrl-group { display: flex; flex-direction: column; gap: 6px; }
.ctrl-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.indicator-grid { display: grid; grid-template-columns: repeat(4, auto); gap: 4px; }
.indicator-btn {
  background: transparent; border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px; color: var(--text-mute); cursor: pointer;
  font-family: inherit; white-space: nowrap;
  transition: all 150ms var(--ease-out-expo);
}
.indicator-btn:hover { border-color: var(--rule-strong); color: var(--text); }
.indicator-btn.active { background: var(--accent); color: var(--brand-deep); border-color: var(--accent); font-weight: 700; }
.group-tabs { display: flex; gap: 4px; margin-bottom: 4px; }
.group-tab {
  background: transparent; border: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em;
  color: var(--text-faint); text-transform: uppercase;
  cursor: pointer; padding: 2px 0; margin-right: 12px;
  border-bottom: 1px solid transparent;
}
.group-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.vsep { width: 1px; height: 36px; background: var(--rule); }

.toggle-row { display: flex; gap: 6px; }
.toggle-btn {
  background: transparent; border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 11px; color: var(--text-mute); cursor: pointer;
  font-family: inherit;
  transition: all 150ms var(--ease-out-expo);
  display: flex; align-items: center; gap: 6px;
}
.toggle-btn:hover { border-color: var(--rule-strong); color: var(--text); }
.toggle-btn.active { background: var(--accent); color: var(--brand-deep); border-color: var(--accent); }

.replay-btn {
  background: transparent; border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px; color: var(--text-mute); cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: all 150ms var(--ease-out-expo);
}
.replay-btn:hover { color: var(--text); border-color: var(--accent); }

/* Tooltip */
.tooltip {
  position: absolute; z-index: 20;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px; color: var(--text);
  pointer-events: none;
  min-width: 180px;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5);
}
.tooltip .cell-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-faint); letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.tooltip .val {
  font-family: 'Lato', sans-serif;
  font-size: 22px; font-weight: 900;
  color: var(--text); line-height: 1;
  margin-bottom: 4px;
}
.tooltip .sub { font-size: 11px; color: var(--text-mute); }
.tooltip .sub .pct { color: var(--accent); font-weight: 700; }

/* Drawer */
.drawer {
  position: absolute; top: 60px; right: 0; bottom: 0;
  width: 420px; max-width: 90vw;
  background: var(--bg-1);
  border-left: 1px solid var(--rule-strong);
  z-index: 12;
  transform: translateX(100%);
  transition: transform 400ms var(--ease-out-expo);
  padding: 32px;
  overflow-y: auto;
  box-shadow: -20px 0 60px -20px rgba(0, 0, 0, 0.6);
}
.drawer.open { transform: translateX(0); }
.drawer .close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: var(--text-mute);
}
.drawer .close:hover { color: var(--text); }
.drawer .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 12px;
}
.drawer h3 {
  font-family: 'Lato', sans-serif;
  font-weight: 900; font-size: 24px;
  color: var(--text); line-height: 1.15;
  margin-bottom: 20px;
}
.drawer .cell-id-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--text-faint);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.drawer .stat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.drawer .stat-row .label { color: var(--text-mute); }
.drawer .stat-row .value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
}
.drawer .stat-row .pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  margin-left: 8px;
}

/* Viewport counter */
.viewport-counter {
  position: absolute;
  top: 76px; right: 32px;
  z-index: 7;
  background: var(--glass-strong);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 220px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 500ms var(--ease-out-expo), transform 500ms var(--ease-out-expo);
  pointer-events: none;
}
.viewport-counter.visible { opacity: 1; transform: translateY(0); }
.viewport-counter .vc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--text-faint); text-transform: uppercase;
}
.viewport-counter .vc-indicator {
  font-size: 11px; color: var(--text-mute);
  margin-top: 2px;
}
.viewport-counter .vc-value {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 38px;
  line-height: 1.0;
  color: var(--text);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  margin: 10px 0 6px;
}
.viewport-counter .vc-unit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.06em;
}

/* ---------- MCP-style markers (pins) ---------- */
.map-pin {
  cursor: pointer;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.55));
  transition: transform 0.25s ease-out;
  transform-origin: 50% 100%;
}
.map-pin.active {
  transform: scale(1.25);
  animation: pin-pulse 1.6s ease-in-out infinite;
}
@keyframes pin-pulse {
  0%, 100% { filter: drop-shadow(0 3px 6px rgba(0,0,0,0.55)); }
  50%      { filter: drop-shadow(0 3px 12px rgba(122, 166, 255, 0.9)); }
}
.map-pin-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: rgba(10, 18, 24, 0.85);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 3px 8px; border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  font-weight: 700;
}
.map-pin-label.ref { color: #66D7C5; border-color: rgba(102,215,197,0.5); }
.map-pin-label.tgt { color: #7AA6FF; border-color: rgba(122,166,255,0.5); }

/* ---------- KPI panel (MCP-style, smaller, right side) ---------- */
.kpi-panel {
  position: absolute;
  top: 76px; right: 32px;
  width: 280px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  background: rgba(6, 19, 48, 0.56);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.10);
  transition: background 700ms var(--ease-out-expo),
              backdrop-filter 700ms var(--ease-out-expo),
              border-color 700ms var(--ease-out-expo),
              opacity 400ms var(--ease-out-expo),
              transform 400ms var(--ease-out-expo);
  border-radius: 10px;
  padding: 16px 18px;
  z-index: 7;
  font-family: 'Lato', system-ui, sans-serif;
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.55);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 400ms var(--ease-out-expo), transform 400ms var(--ease-out-expo);
  pointer-events: auto;
}
.kpi-panel.visible { opacity: 1; transform: translateY(0); }
.kpi-panel:hover {
  background: rgba(6, 19, 48, 0.96);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-color: rgba(255,255,255,0.16);
}
.kpi-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.12em;
  padding: 4px 8px; border-radius: 4px;
  color: #fff; font-weight: 700;
  margin-bottom: 10px;
}
.kpi-badge.ref { background: #1A6B5E; }
.kpi-badge.tgt { background: #1A4A8C; }
.kpi-title {
  font-size: 17px; font-weight: 900;
  line-height: 1.2; letter-spacing: -0.01em;
  margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.kpi-address {
  font-size: 11px; color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
}
.kpi-score {
  font-family: 'Lato', sans-serif;
  font-size: 38px; font-weight: 900;
  line-height: 1; letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.kpi-score-bar {
  background: rgba(255,255,255,0.13);
  height: 5px; border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.kpi-score-bar > div { height: 100%; transition: width 500ms var(--ease-out-expo); }
.kpi-score-note {
  font-size: 11px; color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}
.kpi-ind-list { list-style: none; padding: 0; margin: 0 0 8px; }
.kpi-ind-list li {
  margin-bottom: 9px; font-size: 12px;
}
.kpi-ind-list .ind-name { color: rgba(255,255,255,0.65); font-size: 11px; }
.kpi-ind-list .ind-value { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.kpi-ind-list .ind-unit { color: rgba(255,255,255,0.45); font-weight: 400; font-size: 10px; }
.kpi-ind-list .ind-bar {
  margin-top: 4px;
  background: rgba(255,255,255,0.07);
  height: 3px; border-radius: 2px;
  overflow: hidden;
}
.kpi-ind-list .ind-bar > div { height: 100%; background: #7AA6FF; transition: width 500ms var(--ease-out-expo); }
.kpi-more-btn {
  display: block;
  text-align: center;
  margin-top: 8px;
  padding: 9px 12px;
  background: #4EA8FF;
  color: #061330;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms;
}
.kpi-more-btn:hover { background: #6BB8FF; }

.kpi-nav-row { display: flex; gap: 6px; margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ---------- Compact mobile tab (mirrors active KPI) ---------- */
.kpi-mini {
  display: none; /* desktop: hidden; mobile @media unhides it */
}
.kpi-nav-row button {
  flex: 1; padding: 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.13);
  color: #fff; border-radius: 5px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em;
  transition: background 150ms, border-color 150ms;
}
.kpi-nav-row button:hover { background: rgba(122,166,255,0.15); border-color: #7AA6FF; }

/* Fade-in helper */
.fade-in { opacity: 0; transform: translateY(8px); transition: opacity 900ms var(--ease-out-expo), transform 900ms var(--ease-out-expo); }
.fade-in.in { opacity: 1; transform: translateY(0); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =================================================================
   ONE-PAGER SECTIONS (below the hero)
   ================================================================= */
.section {
  position: relative;
  padding: 120px 32px;
  border-top: 1px solid var(--rule);
  overflow: hidden;
}
.section-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.section-head { max-width: 760px; margin-bottom: 64px; }
.section-head .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-block;
}
.section-head h2 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 24px;
  text-wrap: balance;
}
.section-head .lede {
  font-size: 21px; line-height: 1.55;
  color: var(--text-mute);
  font-weight: 400;
}
.section-head .lede em { color: var(--accent); font-style: normal; font-weight: 700; }

/* Hex grid decorative pattern (sostituisce i cerchi) */
.section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'><path d='M30 0 L60 17.3 L60 51.9 L30 69.3 L0 51.9 L0 17.3 Z M90 0 L120 17.3 L120 51.9 L90 69.3 L60 51.9 L60 17.3 Z M60 51.9 L90 69.3 L90 104 L60 121.3 L30 104 L30 69.3 Z' fill='none' stroke='rgba(78,168,255,0.06)' stroke-width='1'/></svg>");
  background-size: 120px 104px;
  opacity: 0.7;
  z-index: 0;
}

/* Esagono singolo grande decorativo in basso-destra */
.section-pillars::after,
.section-stack::after,
.section-data::after {
  content: ''; position: absolute;
  right: -80px; bottom: -80px;
  width: 360px; height: 312px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 86.6'><path d='M25 0 L75 0 L100 43.3 L75 86.6 L25 86.6 L0 43.3 Z' fill='none' stroke='rgba(78,168,255,0.12)' stroke-width='0.6'/></svg>");
  background-repeat: no-repeat; background-size: contain;
  pointer-events: none;
  z-index: 0;
}
.section-cases::after {
  content: ''; position: absolute;
  left: -100px; top: 80px;
  width: 280px; height: 243px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 86.6'><path d='M25 0 L75 0 L100 43.3 L75 86.6 L25 86.6 L0 43.3 Z' fill='none' stroke='rgba(78,168,255,0.10)' stroke-width='0.6'/></svg>");
  background-repeat: no-repeat; background-size: contain;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Pillars (3 cards) ---------- */
.section-pillars { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 100%); }
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 250ms, transform 250ms;
}
.pillar:hover { border-color: var(--accent); transform: translateY(-4px); }
.pillar-accent { border-color: var(--accent-soft); background: linear-gradient(180deg, var(--bg-2), rgba(78, 168, 255, 0.04)); }
.pillar-num {
  font-size: 11px; letter-spacing: 0.14em; color: var(--accent);
  margin-bottom: 18px; text-transform: uppercase;
}
.pillar h3 {
  font-family: 'Lato', sans-serif;
  font-weight: 900; font-size: 28px;
  color: var(--text); margin-bottom: 16px;
  letter-spacing: -0.015em;
}
.pillar p { color: var(--text-mute); font-size: 17px; line-height: 1.55; margin-bottom: 24px; }
.pillar-meta {
  font-size: 12px; color: var(--text-faint);
  letter-spacing: 0.04em;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

/* ---------- Settori (Industries matrix) ---------- */
.section-industries { background: var(--bg); }
.industries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.industry {
  background: var(--bg-1);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px;
  transition: border-color 200ms, background 200ms;
  display: flex; flex-direction: column; gap: 10px;
}
.industry:hover { border-color: var(--accent); background: var(--bg-2); }
.industry .ind-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 4px;
}
.industry .ind-title {
  font-weight: 900; font-size: 17px; color: var(--text);
  letter-spacing: -0.005em;
}
.industry .ind-desc { font-size: 15px; color: var(--text-mute); line-height: 1.5; }
.industry .ind-case {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--accent); text-transform: uppercase;
  padding-top: 10px; margin-top: auto;
  border-top: 1px solid var(--rule);
}

/* ---------- Casi d'uso (9 cases) ---------- */
.section-cases { background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg) 100%); }
.cases-tabs {
  display: inline-flex; gap: 4px;
  background: var(--bg-2); border: 1px solid var(--rule);
  border-radius: 10px; padding: 4px;
  margin-bottom: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cases-tab {
  background: transparent; border: none;
  color: var(--text-mute); cursor: pointer;
  padding: 8px 14px; border-radius: 7px;
  transition: all 200ms;
  font-family: inherit; font-size: inherit; letter-spacing: inherit; text-transform: inherit;
}
.cases-tab.active { background: var(--accent); color: var(--brand-deep); font-weight: 700; }
.cases-tab:not(.active):hover { color: var(--text); }

.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.case-card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 200ms, transform 200ms;
  position: relative;
}
.case-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.case-card.priority::after {
  content: 'PRIORITY';
  position: absolute; top: 14px; right: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 0.12em;
  color: var(--accent); padding: 3px 7px;
  background: var(--accent-soft);
  border-radius: 4px;
}
.case-tag {
  --tag: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tag); align-self: flex-start;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid currentColor;
}
.case-card h3 {
  font-family: 'Lato', sans-serif;
  font-weight: 900; font-size: 24px;
  color: var(--text); line-height: 1.2;
  letter-spacing: -0.01em;
}
.case-quote {
  font-style: italic; color: var(--text-mute);
  font-size: 16px; line-height: 1.5;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}
.case-body { color: var(--text-mute); font-size: 16px; line-height: 1.55; }
.case-meta {
  font-size: 11px; color: var(--text-faint);
  letter-spacing: 0.04em;
  padding-top: 14px; margin-top: auto;
  border-top: 1px solid var(--rule);
}

/* ---------- Stack & integrazioni ---------- */
.section-stack { background: var(--bg); }
.stack-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.stack-blocks { display: flex; flex-direction: column; gap: 16px; }
.stack-block {
  background: var(--bg-1);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
}
.stack-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
}
.stack-block h4 {
  font-family: 'Lato', sans-serif;
  font-weight: 900; font-size: 19px;
  color: var(--text); margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.stack-block p { font-size: 15px; color: var(--text-mute); line-height: 1.55; }
.stack-block .tag-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.stack-block .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.04em;
  color: var(--text-mute);
  padding: 3px 8px; border-radius: 4px;
  background: var(--bg-2); border: 1px solid var(--rule);
}

.stack-diagram {
  background: var(--bg-1);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px;
  position: sticky; top: 96px;
}
.stack-diagram .diag-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 20px;
}
.diag-layer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 15px;
}
.diag-layer .layer-label { font-weight: 700; color: var(--text); }
.diag-layer .layer-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.04em;
}
.diag-arrow { text-align: center; color: var(--text-faint); font-size: 14px; padding: 4px 0; }

/* ---------- Dati ---------- */
.section-data { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 100%); }
.data-inner {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 80px; align-items: start;
}
.data-text h2 { margin-bottom: 22px; }
.data-text .lede { color: var(--text-mute); font-size: 20px; line-height: 1.55; margin-bottom: 20px; }
.data-text .lede-soft { color: var(--text-faint); font-size: 17px; line-height: 1.6; }
.data-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.data-stat {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px;
}
.data-stat .ds-num {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 52px;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.data-stat .ds-label {
  font-size: 15px; color: var(--text-mute);
  line-height: 1.4;
}
.data-sources {
  grid-column: 1 / -1;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 24px;
}
.data-sources .ds-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 14px;
}
.src-list { list-style: none; display: grid; gap: 8px; font-size: 12px; color: var(--text-mute); }
.src-list li::before { content: '↳ '; color: var(--accent); }

/* ---------- CTA ---------- */
.section-cta {
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--brand) 100%);
  text-align: center;
}
.cta-inner { max-width: 760px; margin: 0 auto; }
.section-cta .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-block;
}
.section-cta h2 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 22px;
  text-wrap: balance;
}
.section-cta .lede {
  font-size: 20px; color: var(--text-mute);
  line-height: 1.55; margin-bottom: 36px;
}
.cta-row {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}

.netcomm-header {
  margin: 56px auto 18px;
  max-width: 980px;
  text-align: center;
}
.netcomm-tag {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase;
  font-weight: 700;
  padding: 7px 14px;
  border: 1px solid rgba(78, 168, 255, 0.28);
  background: rgba(78, 168, 255, 0.08);
  border-radius: 999px;
}
.netcomm-grid {
  margin: 0 auto;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
}
.netcomm-card {
  background: var(--bg-1);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.netcomm-card-invite {
  background: linear-gradient(180deg, rgba(78, 168, 255, 0.10), rgba(78, 168, 255, 0.04));
  border-color: rgba(78, 168, 255, 0.30);
}
.netcomm-card-eyebrow {
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase;
  font-weight: 700;
}
.netcomm-card-title {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 22px; line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}
.netcomm-card-body {
  color: var(--text-mute);
  font-size: 15px; line-height: 1.55;
  margin: 0;
}
.netcomm-cta {
  align-self: flex-start;
  margin-top: 10px;
}
.netcomm-talk-meta {
  list-style: none; padding: 0; margin: 6px 0 0;
  display: grid; gap: 8px;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.netcomm-talk-meta li {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 14px; color: var(--text);
}
.netcomm-talk-meta .lbl {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint); min-width: 56px;
}

@media (max-width: 720px) {
  .netcomm-grid { grid-template-columns: 1fr; }
}

.stack-block-soft {
  background: linear-gradient(180deg, var(--bg-1), rgba(78,168,255,0.04));
  border-color: rgba(78,168,255,0.20);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-deep);
  border-top: 1px solid var(--rule);
  padding: 36px 32px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.brand-mini {
  display: flex; align-items: center; gap: 8px;
  font-weight: 900; color: var(--text); font-size: 17px;
}
.brand-mini .hex-mini { color: var(--accent); font-size: 20px; }
.footer-tag { color: var(--text-faint); font-size: 13px; letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 22px; font-size: 14px; }
.footer-links a {
  color: var(--text-mute); text-decoration: none;
  transition: color 150ms;
}
.footer-links a:hover { color: var(--accent); }
.footer-meta { font-size: 11px; color: var(--text-faint); letter-spacing: 0.04em; }

/* ---------- Reveal-on-scroll ---------- */
.section { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo); }
.section.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section { padding: 80px 24px; }
  .pillars, .industries, .cases { grid-template-columns: 1fr 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .stack-diagram { position: static; }
  .data-inner { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 720px) {
  .nav { padding: 0 18px; height: 56px; }
  .nav .links { display: none; }
  .controls { flex-wrap: wrap; gap: 12px; bottom: 16px; padding: 10px 12px; }
  .indicator-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars, .industries, .cases { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Mobile hero — simplified ---------- */
@media (max-width: 720px) {
  .hero {
    height: 100vh; height: 100dvh;
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column;
  }
  #map {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    /* Garantisce che il touch verticale scrolli la pagina invece che essere catturato dalla mappa */
    touch-action: pan-y !important;
  }
  /* Anche il canvas Mapbox deve lasciar passare il pan-y sul touch */
  #map .mapboxgl-canvas-container,
  #map .mapboxgl-canvas { touch-action: pan-y !important; }

  /* Hero copy: only h1 + CTA, anchored at the bottom of the viewport
     so it acts as a "scroll-down" invitation under the dominant map */
  .hero-copy {
    position: relative;
    top: auto; left: auto; right: auto; transform: none;
    max-width: none; width: 100%;
    flex: 0 0 auto;
    padding: 16px 20px calc(env(safe-area-inset-bottom, 0px) + 18px);
    background: var(--bg);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    border: none; border-top: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
    text-align: center;
  }
  /* Hide everything except the title and the "Maggiori dettagli" CTA on mobile */
  .hero-copy .hero-netcomm-mini,
  .hero-copy p.sub,
  .hero-copy .eyebrow,
  .hero-banner { display: none !important; }

  .hero-copy h1 { font-size: 30px; line-height: 1.15; margin: 0 0 12px; }
  .hero-copy h1 br { display: none; }
  .hero-copy .actions { justify-content: center; }
  .hero-copy .ghost { font-size: 14px; padding: 6px 0; }

  /* KPI panel completamente nascosto su mobile (sostituito dalla mini-tab) */
  .kpi-panel { display: none !important; }

  /* Mini-tab attiva su mobile: stesso stile vetro scuro della kpi-panel, in formato pill.
     Absolute dentro la hero così scrolla via insieme alla mappa. Top offset = sotto il nav fisso. */
  .kpi-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 68px);
    left: 12px;
    transform: translateY(-6px);
    max-width: calc(100vw - 90px); /* lascia spazio al replay-intro in alto a destra */
    padding: 6px 10px 6px 8px;
    background: rgba(6, 19, 48, 0.56);
    backdrop-filter: blur(10px) saturate(1.3);
    -webkit-backdrop-filter: blur(10px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: #fff;
    font-family: 'Lato', system-ui, sans-serif;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.55);
    z-index: 51; /* sopra il nav fisso (z-index 50) */
    opacity: 0;
    pointer-events: none;
    transition: opacity 400ms var(--ease-out-expo), transform 400ms var(--ease-out-expo);
  }
  .kpi-mini.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .kpi-mini-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.12em;
    padding: 3px 6px;
    border-radius: 3px;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
  }
  .kpi-mini-badge.ref { background: #1A6B5E; }
  .kpi-mini-badge.tgt { background: #1A4A8C; }
  .kpi-mini-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 50vw;
  }
  .kpi-mini-score {
    font-size: 14px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    margin-left: 2px;
    flex-shrink: 0;
  }

  /* Marker labels nascoste su mobile (solo pin più piccoli) */
  .map-pin-label { display: none; }
  .map-pin svg { width: 24px; height: 34px; }

  /* Controlli secondari nascosti */
  .skip-intro,
  .hero-scroll-hint,
  .intro-backdrop { display: none !important; }

  /* Replay-intro su mobile: pill compatta in alto a destra, sotto la nav fissa (h: 56px) */
  .replay-intro {
    bottom: auto;
    top: calc(env(safe-area-inset-top, 0px) + 68px);
    right: 12px;
    left: auto;
    padding: 6px 10px;
    font-size: 10px;
    gap: 5px;
    z-index: 51; /* sopra il nav fisso (z-index 50) per non finirci sotto */
  }
  .replay-intro span { display: none; }
  .replay-intro svg { width: 14px; height: 14px; }

  /* Su mobile la mappa è non-interattiva: nascondi i controlli Mapbox */
  .mapboxgl-ctrl-top-right { display: none !important; }
}

@media (max-width: 480px) {
  .hero-copy h1 { font-size: 26px; }
  .hero-copy { padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 16px); }
  .kpi-panel { max-height: 38vh; }
}
