/* ============================================
   FLEET MAP — scroll-driven canvas hero
   ============================================ */

.map-section {
  --bg: #050b18;
  --map-bg: #0a1628;
  --road: #13284c;
  --block: #1a3866;
  --teal: #4ee0c7;
  --blue: #5dd6ff;
  --gold: #ffc857;
  --green: #2ee06b;
  --text: #e6efff;
  --text-dim: #93a8c8;
  --text-faint: #5a719a;
  --border: rgba(120, 160, 220, 0.15);
  --border-strong: rgba(120, 180, 255, 0.32);
  --card-bg: rgba(8, 18, 36, 0.72);

  height: 290vh;
  position: relative;
}

.sticky-wrap {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--map-bg);
}

#mapCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Scroll-driven canvas blur — atmospheric at the top of the hero, sharp by p=0.18.
   Skipped on mobile (filter: blur on a full-viewport canvas is heavy on phones)
   and when the user prefers reduced motion. JS sets --canvas-blur on the canvas
   each frame; on excluded environments the property is set but unused. */
@media (prefers-reduced-motion: no-preference) and (min-width: 721px) {
  #mapCanvas {
    filter: blur(var(--canvas-blur, 0px));
  }
}

.sticky-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 110% 90% at 50% 50%, transparent 50%, rgba(5, 11, 24, 0.85) 100%);
  z-index: 3;
}

/* ---------- UI overlay ---------- */
.ui-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  font-family: 'Outfit', -apple-system, sans-serif;
}
.ui-layer > * { pointer-events: auto; }

.status-pill {
  position: absolute;
  top: 28px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text);
}
.status-pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46, 224, 107, 0.5), 0 0 12px var(--green);
  animation: pulseGreen 1.8s ease-out infinite;
}
@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(46, 224, 107, 0.55), 0 0 12px var(--green); }
  70%  { box-shadow: 0 0 0 9px rgba(46, 224, 107, 0),    0 0 12px var(--green); }
  100% { box-shadow: 0 0 0 0 rgba(46, 224, 107, 0),      0 0 12px var(--green); }
}

.pickup-card,
.fleet-card {
  position: absolute;
  padding: 16px 18px;
  background: var(--card-bg);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(.42,0,.2,1);
  box-shadow: 0 18px 60px -20px rgba(0, 0, 0, 0.6);
}
.pickup-card { bottom: 36px; left: 28px; width: 280px; }
.fleet-card  { bottom: 36px; right: 28px; width: 320px; padding: 18px 20px; }
.pickup-card.show, .fleet-card.show { opacity: 1; transform: translateY(0); }

.map-section .card-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
  font-weight: 600;
}
.fleet-card .card-eyebrow { color: var(--gold); }
.map-section .card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.005em;
  color: var(--text);
}
.card-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
}
.card-row .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
  flex-shrink: 0;
}

.fleet-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.fleet-stats .stat .value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--navy);
}
.fleet-stats .stat .value.gold { color: var(--gold); }
.fleet-stats .stat .label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5a6b8a;
  margin-top: 6px;
  font-weight: 500;
}
.fleet-eta {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}
.fleet-eta .gold { color: var(--gold); font-weight: 700; letter-spacing: 0.12em; }

/* ---------- Hero overlay on frame 1 ----------
   Anchored by top edge (translate Y = 0 baseline), so `top` is the actual
   y of the element's top edge — not its midpoint. */
.hero-overlay {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 5;
  width: min(800px, 92%);
  text-align: center;
  will-change: opacity, transform;
}

/* Soft elliptical scrim — uses `ellipse closest-side` so the gradient ends
   exactly at the inscribed ellipse and the rectangle's corners + side bands
   are transparent. Result: no visible box edges, just a soft dark blob. */
.hero-overlay-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse closest-side at center,
    rgba(5, 11, 24, 0.45) 0%,
    rgba(5, 11, 24, 0.35) 35%,
    rgba(5, 11, 24, 0.18) 70%,
    rgba(5, 11, 24, 0) 100%);
  pointer-events: none;
  z-index: -1;
}


/* ---------- Tagline bridge into next section ---------- */
.tagline-bridge {
  background: var(--navy);
  text-align: center;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .status-pill { top: 14px; left: 14px; padding: 7px 13px 7px 11px; font-size: 9.5px; gap: 8px; letter-spacing: 0.18em; }
  .pickup-card, .fleet-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    padding: 13px 15px;
  }
  .map-section .card-title { font-size: 14.5px; margin-bottom: 9px; }
  .card-row { font-size: 12px; }
  .map-section .card-eyebrow { font-size: 9.5px; margin-bottom: 6px; letter-spacing: 0.18em; }
  .fleet-stats .stat .value { font-size: 22px; }
  .fleet-stats .stat .label { font-size: 9px; margin-top: 4px; }
  .fleet-stats { gap: 10px; margin-bottom: 11px; }
  .fleet-eta { font-size: 10px; padding-top: 10px; }

  .hero-overlay { top: 14%; width: min(560px, 90%); }

  /* Canvas blur is disabled on phones — lean harder on the scrim. */
  .hero-overlay-scrim {
    background: radial-gradient(ellipse closest-side at center,
      rgba(5, 11, 24, 0.60) 0%,
      rgba(5, 11, 24, 0.48) 35%,
      rgba(5, 11, 24, 0.25) 70%,
      rgba(5, 11, 24, 0) 100%);
  }
}

