/* Live tracking demo restored from the last published Rasheed Rides site (git 46a8fb6083, rasheedrides/website/static/rides-hero.css lines 66-412).
 * Variable bridge: the old stylesheet names mapped onto this site's engine tokens. */
.route-visual { --line: var(--rasrouting-theme-line); --line-strong: var(--rasrouting-theme-line-strong); --text: var(--rasrouting-theme-ink-strong); --text-soft: var(--rasrouting-theme-ink-soft); --muted: var(--rasrouting-theme-ink-soft); --accent: var(--rasrouting-theme-accent-base); --accent-ink: var(--rasrouting-theme-accent-ink); --on-accent: var(--rasrouting-theme-on-accent); --ok: #3ddc84; --hero-hairline: var(--rasrouting-theme-line); --sh-2: 0 18px 40px rgba(0,0,0,.18); }
.route-visual {
  min-height: 560px;
  height: 560px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2, 12px);
  background:
    radial-gradient(circle at 78% 16%, rgba(239, 62, 74, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(239, 62, 74, 0.14), transparent 42%),
    linear-gradient(45deg, rgba(241, 195, 109, 0.09), transparent 48%),
    var(--hero-visual-bg);
  box-shadow: var(--sh-2, 0 12px 32px rgba(0, 0, 0, 0.4));
  position: relative;
  overflow: hidden;
  isolation: isolate;
  contain: layout style paint;
}

.route-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--hero-grid-1) 1px, transparent 1px),
    linear-gradient(0deg, var(--hero-grid-2) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.hero-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: transparent;
}

.hero-map.leaflet-container {
  background: transparent;
}

.hero-map-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 16%, var(--hero-fallback-radial), transparent 35%),
    linear-gradient(140deg, var(--hero-fallback-bg-1), var(--hero-fallback-bg-2));
}

.hero-map-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--hero-fallback-grid-1) 1px, transparent 1px),
    linear-gradient(0deg, var(--hero-fallback-grid-2) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(145deg, #000, transparent 78%);
}

.hero-map-fallback svg {
  position: absolute;
  inset: 6% 3% 4%;
  width: 94%;
  height: 90%;
  opacity: 0.86;
}

.hero-map-glow {
  position: absolute;
  top: -12%;
  right: -8%;
  width: 48%;
  height: 54%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 62, 74, 0.3), transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.hero-story-status {
  position: absolute;
  top: var(--sp-4, 16px);
  left: var(--sp-4, 16px);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2, 8px);
  border: 1px solid rgba(61, 220, 132, 0.34);
  border-radius: var(--r-pill, 9999px);
  background: var(--hero-status-bg);
  padding: 8px 12px;
  color: var(--text-soft, #d9e0ea);
  font-size: var(--fs-1, 0.8125rem);
  font-weight: var(--weight-semibold, 600);
  box-shadow: var(--sh-2, 0 8px 24px rgba(0, 0, 0, 0.4));
  pointer-events: none;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok, #3ddc84);
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: rasrouting-livepulse 1.8s ease-out infinite;
}

@keyframes rasrouting-livepulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

.showcase-route.route-active-base {
  filter: drop-shadow(0 0 5px rgba(255, 89, 100, 0.72));
}

.showcase-route.route-active-flow,
.phone-route.route-active-flow {
  animation: rasrouting-route-flow 900ms linear infinite;
  filter: drop-shadow(0 0 4px rgba(255, 217, 220, 0.72));
  pointer-events: none;
}

@keyframes rasrouting-route-flow {
  to { stroke-dashoffset: -28; }
}

.showcase-driver-marker {
  border: 0;
  background: transparent;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.5));
  transition: transform 110ms linear;
  will-change: transform;
}

.showcase-driver-marker span {
  position: relative;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 3px solid var(--hero-marker-border);
  border-radius: 50%;
  background: #3ddc84;
  box-shadow:
    0 0 0 2px rgba(61, 220, 132, 0.28),
    0 0 18px rgba(61, 220, 132, 0.58);
}

.showcase-driver-marker span::after {
  content: "";
  width: 5px;
  height: 7px;
  border-radius: 2px;
  background: var(--hero-marker-arrow);
  box-shadow: 0 -3px 0 -1px rgba(255, 255, 255, 0.7);
}

/* App phone preview within hero */
.app-phone {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 230px;
  z-index: 4;
  padding: 9px;
  border-radius: 30px;
  background: var(--hero-phone-bg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--hero-phone-shadow);
  transform: rotate(-3deg);
}

.app-phone-notch {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: var(--hero-notch-bg);
  z-index: 1;
}

.app-phone-screen {
  border-radius: 22px;
  background: var(--bg-soft, #111722);
  overflow: hidden;
  border: 1px solid var(--hero-hairline);
}

.app-phone-head {
  display: flex;
  align-items: center;
  padding: 16px 12px 9px;
}

.app-phone-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: var(--weight-bold, 700);
  color: var(--text, #f6f8fb);
}

.app-phone-logo {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent-ink, #cc2c39);
  color: var(--on-accent, #ffffff);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
}

.app-phone-map {
  height: 112px;
  margin: 0 10px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(239, 62, 74, 0.12), transparent 60%), var(--hero-phone-map-bg);
  border: 1px solid var(--hero-hairline);
}

.app-phone-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface-2, #1d2532);
  border: 1px solid var(--line);
  opacity: 0.62;
  transform: translateX(0);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.app-phone-card.is-active {
  border-color: rgba(61, 220, 132, 0.48);
  background: var(--hero-card-active-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24), inset 3px 0 0 #3ddc84;
  opacity: 1;
  transform: translateX(-3px);
}

.app-phone-card.is-complete {
  opacity: 0.78;
}

.app-phone-card.is-future {
  opacity: 0.52;
}

.app-phone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted, #9aa7b8);
  flex: none;
}

.app-phone-card[data-showcase-stage="pickup"] .app-phone-dot { background: #3ddc84; }
.app-phone-card[data-showcase-stage="stop"] .app-phone-dot { background: #f1c36d; }
.app-phone-card[data-showcase-stage="dropoff"] .app-phone-dot { background: #ef3e4a; }

.app-phone-text {
  flex: 1;
  min-width: 0;
  display: grid;
}

.app-phone-text b {
  font-size: 11px;
  font-weight: var(--weight-bold, 700);
  color: var(--text, #f6f8fb);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-phone-text span {
  font-size: 10px;
  color: var(--muted, #9aa7b8);
}

.app-phone-eta {
  font-size: 11px;
  font-weight: var(--weight-bold, 700);
  color: var(--ok, #3ddc84);
  font-variant-numeric: tabular-nums;
}

.app-phone-cta {
  display: block;
  text-align: center;
  margin: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--accent-ink, #cc2c39);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: var(--weight-bold, 700);
  text-decoration: none;
}

/* Reduced motion / Static fallback rules (#75) */
@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none;
    box-shadow: none;
  }

  .showcase-route.route-active-flow,
  .phone-route.route-active-flow {
    animation: none;
    stroke-dashoffset: -12;
  }

  .showcase-driver-marker {
    transition: none;
  }

  .app-phone-card {
    transition: none;
  }

  .hero-map-glow {
    opacity: 0.85;
  }
}

/* Site fit (PM 10-14): the phone is always a dark device, so its text keeps the old light ink in both themes;
 * the map credit sits on the page surface with the page ink so it stays readable in light and dark. */
.route-visual .app-phone { --text: #f6f8fb; --text-soft: #c9d2de; --muted: #b3bdca; }
.route-visual .leaflet-control-attribution { background: var(--rasrouting-theme-surface); color: var(--rasrouting-theme-ink); }
.route-visual .leaflet-control-attribution a { color: var(--rasrouting-theme-accent-ink); }
/* Dark mode tile filter: shared with the coverage map, now one rule in assets/rd.css. */
/* The "Demo trip" pill sits on the page surface so map labels never show through it. */
.route-visual .hero-story-status { background: var(--rasrouting-theme-surface); color: var(--rasrouting-theme-ink-strong); }
/* Phones (walk 930af7760c): the phone mockup no longer sits over the map. The map keeps the top 340px, so its Pickup / Stop / Drop-off
 * labels stay readable at 360 to 430px, and the mockup sits below it. */
@media (max-width: 640px) {
  .route-visual { height: auto; min-height: 0; padding-bottom: 20px; }
  .route-visual .hero-map, .route-visual .hero-map-fallback, .route-visual .map-fallback { bottom: auto; height: 340px; }
  .route-visual .app-phone { position: relative; right: auto; bottom: auto; margin: 356px auto 0; transform: none; }
}
