/* The live layer of the demo: night, effects around the car, notifications, speed, the
   touchable first map and the suggested plan. */

/* Night falls in the second and third moments. */
.night-lights{opacity:0;transition:opacity 1.2s ease}
.night-shade{opacity:0;transition:opacity 1.2s ease}
.night-lights>circle,.night-lights>rect:not(.night-shade){opacity:0;transition:opacity 1.2s ease}
.sticky-scene[data-time="dusk"] .night-lights,.sticky-scene[data-time="night"] .night-lights{opacity:1}
.sticky-scene[data-time="dusk"] .night-shade{opacity:.32}
.sticky-scene[data-time="night"] .night-shade{opacity:.58}
.sticky-scene[data-time="dusk"] .night-lights>circle{opacity:.55}
.sticky-scene[data-time="night"] .night-lights>circle,.sticky-scene[data-time="night"] .night-lights>rect:not(.night-shade){opacity:1}
.sticky-scene[data-time="dusk"] .night-lights>rect:not(.night-shade){opacity:.5}

/* Effects around the car. */
.car-fx circle{fill:none;opacity:0;transform-box:fill-box;transform-origin:center}
.armed-mode .fx-shield{opacity:1;stroke:#33ff66;stroke-width:2;stroke-dasharray:7 7;animation:fx-spin 9s linear infinite}
.armed-mode .fx-shield-ring{opacity:1;stroke:#33ff66;stroke-width:1.2;animation:fx-breathe 2.6s ease-in-out infinite}
.alert-mode:not(.panic-mode) .fx-alert{opacity:1;fill:#ff7a4d;fill-opacity:.2;stroke:#ffa05d;stroke-width:2.4;animation:fx-blink .9s ease-in-out infinite}
.panic-mode .fx-wave{stroke:#ff5d6c;stroke-width:2.6;animation:fx-wave 2.1s ease-out infinite}
.panic-mode .fx-wave:nth-child(5){animation-delay:.7s}
.panic-mode .fx-wave:nth-child(6){animation-delay:1.4s}
.locating .fx-ping{stroke:#33ff66;stroke-width:2.6;animation:fx-ping 1.5s ease-out 1}
.alert-mode .phone-map-area{animation:map-alarm 1.8s ease-in-out infinite}
@keyframes fx-spin{to{transform:rotate(360deg)}}
@keyframes fx-breathe{0%,100%{opacity:.25;transform:scale(.94)}50%{opacity:.85;transform:scale(1.06)}}
@keyframes fx-blink{0%,100%{opacity:.35}50%{opacity:1}}
@keyframes fx-wave{from{opacity:.95;transform:scale(1)}to{opacity:0;transform:scale(3.6)}}
@keyframes fx-ping{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(3.2)}}
@keyframes map-alarm{0%,100%{box-shadow:inset 0 0 0 #ff5d4d00}50%{box-shadow:inset 0 0 46px #ff5d4d66}}

/* The departure and arrival, labelled in the history. */
.history-stops{opacity:0;transition:opacity .6s ease}
.history-mode .history-stops{opacity:1}

/* Notifications arrive over the top of the phone. */
.phone-push{position:absolute;z-index:30;left:8px;right:8px;top:8px;display:grid;grid-template-columns:30px 1fr;gap:9px;align-items:start;padding:10px 12px;border-radius:16px;
  background:#14243aee;border:1px solid #ffffff1c;box-shadow:0 14px 34px #000a;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  transform:translateY(-140%);opacity:0;transition:transform .55s cubic-bezier(.2,1.3,.4,1),opacity .3s;cursor:pointer}
.phone-push.show{transform:none;opacity:1}
.push-icon{width:30px;height:30px;border-radius:9px;background:radial-gradient(circle at 50% 50%,#33ff66 0 4px,transparent 5px),linear-gradient(145deg,#0b3b2a,#062016);border:1px solid #33ff6655}
.phone-push[data-tone="alert"] .push-icon{background:radial-gradient(circle at 50% 50%,#ff8a5d 0 4px,transparent 5px),linear-gradient(145deg,#4a1a12,#240b08);border-color:#ff8a5d88}
.phone-push[data-tone="alert"]{border-color:#ff8a5d66}
.push-app{display:flex;justify-content:space-between;font-size:9px;letter-spacing:.3px;color:#a8c3dc;text-transform:uppercase}
.push-app small{text-transform:none;font-size:9px;color:#7f9bb5}
.phone-push strong{display:block;margin-top:2px;font-size:12px;color:#fff}
.phone-push p{margin:1px 0 0;font-size:10.5px;line-height:1.35;color:#c7dcef}

/* Live speed on the phone's map. */
.phone-hud{position:absolute;z-index:4;top:9px;right:10px;display:flex;align-items:baseline;gap:3px;padding:5px 9px;border-radius:9px;background:#03142ddd;border:1px solid #33ff6640;
  font-family:Manrope,sans-serif;color:#fff;transition:opacity .3s}
.phone-hud b{font-size:15px;font-variant-numeric:tabular-nums}
.phone-hud span{font-size:8px;color:#8fb7cf}
.phone-hud.stopped b{color:#8fb7cf}
.alert-mode .phone-hud,.history-mode .phone-hud,.fleet-mode .phone-hud{opacity:0}

/* The first map can be touched. */
#hero-slot{cursor:pointer}
.destination{transition:opacity .4s}
.destination-pulse{transform-box:fill-box;transform-origin:center;animation:fx-breathe 1.8s ease-in-out infinite}
.map-hint{position:absolute;z-index:5;left:50%;top:58px;transform:translateX(-50%);display:flex;align-items:center;gap:9px;padding:8px 14px;border-radius:99px;white-space:nowrap;
  background:#03142de6;border:1px solid #33ff6655;font-size:11px;font-weight:600;color:#dff7e7;pointer-events:none;box-shadow:0 10px 30px #0008;transition:opacity .5s,transform .5s}
.map-hint-dot{width:8px;height:8px;border-radius:50%;background:#33ff66;box-shadow:0 0 0 0 #33ff6688;animation:hint-dot 1.6s ease-out infinite}
.map-hint.used{opacity:.55;transform:translateX(-50%) scale(.94)}
@keyframes hint-dot{from{box-shadow:0 0 0 0 #33ff6699}to{box-shadow:0 0 0 12px #33ff6600}}

/* The plan that covers what was tried. */
.plan-match{display:grid;grid-template-columns:1.1fr 1fr;gap:40px;align-items:center;margin:70px auto 0;max-width:1180px;padding:38px 44px;border-radius:18px;
  background:linear-gradient(135deg,#0a2240,#051630 70%);border:1px solid #33ff6633;box-shadow:0 30px 80px #0006}
.plan-match .eyebrow{margin-bottom:14px}
.plan-match-title{font-size:clamp(26px,2.4vw,38px);line-height:1.15;letter-spacing:-1.2px;margin:0}
.plan-match-title em{font-style:normal;color:var(--green)}
.plan-match-reason{margin:14px 0 0;color:var(--muted);line-height:1.6;max-width:46ch}
.plan-match-side{display:flex;flex-direction:column;align-items:flex-start;gap:16px}
.plan-match-tried{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
.plan-match-tried li{padding:6px 11px;border-radius:99px;font-size:12px;border:1px solid #2a5275;color:#cfe6f7;background:#071a34;animation:chip-in .4s cubic-bezier(.2,1.4,.4,1)}
.plan-match-tried li[data-tier="1"]{border-color:#33ff6655}
.plan-match-tried li[data-tier="2"]{border-color:#00b7ff77}
.plan-match-note{color:#7f9bb5;font-size:12px;line-height:1.5}
@keyframes chip-in{from{opacity:0;transform:scale(.7)}}
@media(max-width:760px){.plan-match{grid-template-columns:1fr;gap:22px;margin-top:40px;padding:26px 22px}.map-hint{top:52px;font-size:10px;padding:7px 12px}}

@media(prefers-reduced-motion:reduce){
  .car-fx circle,.destination-pulse,.map-hint-dot,.alert-mode .phone-map-area,.plan-match-tried li{animation:none!important}
  .phone-push{transition:none}
}
