/* ============================================================
   Z NATION TRANSPORT — US FREIGHT ROUTES MAP
   Shared by homepage, about, and contact map sections.
   Routes draw on scroll (.znt-map--in added by routes-map.js).
   ============================================================ */

.znt-map {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--inner-top-light);
  padding: var(--space-5);
  overflow: hidden;
}

.znt-map__svg { width: 100%; height: auto; display: block; }

.znt-map__grid line { stroke: #a7b2bd; stroke-width: 0.3; opacity: 0.07; }

.znt-map__outline {
  stroke: #a7b2bd;
  stroke-width: 1;
  opacity: 0.28;
  fill: rgba(167, 178, 189, 0.03);
}

/* routes: drawn via pathLength=1 + dashoffset transition */
.znt-map__route {
  stroke: #3fd0c9;
  stroke-width: 1.3;
  opacity: 0.55;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s var(--ease-out, ease-out);
}
.znt-map__route--amber { stroke: #f5a623; }
.znt-map--in .znt-map__route { stroke-dashoffset: 0; }

.znt-map__node {
  fill: #3fd0c9;
  opacity: 0;
  transition: opacity 0.5s ease-out;
  filter: drop-shadow(0 0 4px rgba(63, 208, 201, 0.8));
}
.znt-map--in .znt-map__node { opacity: 1; }

.znt-map__label {
  fill: #a7b2bd;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}
.znt-map--in .znt-map__label { opacity: 0.9; }

/* Atlanta hub */
.znt-map__hub-dot { fill: var(--accent); }
.znt-map__hub-pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0.5;
  transform-origin: 707.1px 364.4px;
}
.znt-map--in .znt-map__hub-pulse { animation: znt-hub-pulse 2.6s ease-out infinite; }
@keyframes znt-hub-pulse {
  0%   { transform: scale(0.6); opacity: 0.7; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.znt-map__hub-label {
  fill: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

/* moving freight dots (SMIL, started by JS when in view) */
.znt-map__truck {
  fill: #fff;
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.9));
  transition: opacity 0.6s ease 1.2s;
}
.znt-map--in.znt-map--motion .znt-map__truck { opacity: 0.9; }

/* legend */
.znt-map__legend {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}
.znt-map__legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.znt-map__legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.znt-map__legend-swatch--hub { background: var(--accent); height: 8px; width: 8px; border-radius: 50%; }
.znt-map__legend-swatch--lane { background: #3fd0c9; }
.znt-map__legend-swatch--longhaul { background: #f5a623; }

/* ── Map sections (page wrappers) ───────────────────────────── */
.znt-map-section__inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-10);
  align-items: center;
}
.znt-map-section__inner > * { min-width: 0; }
.znt-map-section__inner--reverse { grid-template-columns: 1.15fr 0.85fr; }
.znt-map-section--full .znt-map { max-width: 980px; margin-inline: auto; }
.znt-map-section--full .znt-sec-header { margin-bottom: var(--space-8); }

.znt-map-section__cta {
  text-align: center;
  margin-top: var(--space-8);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .znt-map-section__inner,
  .znt-map-section__inner--reverse { grid-template-columns: 1fr; gap: var(--space-8); }
  .znt-map-section__inner--reverse .znt-map { order: 1; }
}

@media (max-width: 640px) {
  /* declutter: hide secondary routes, nodes, and labels */
  .znt-map__secondary { display: none; }
  .znt-map__label { font-size: 14px; }
  .znt-map__hub-label { font-size: 16px; }
  .znt-map { padding: var(--space-3); }
}

@media (prefers-reduced-motion: reduce) {
  .znt-map__route { stroke-dashoffset: 0; transition: none; }
  .znt-map__node,
  .znt-map__label { opacity: 1; transition: none; }
  .znt-map--in .znt-map__hub-pulse { animation: none; opacity: 0.35; }
  .znt-map__truck { display: none; }
}
