.vehicle-transition {
  --vehicle-bg: #2a1d17;
  --vehicle-line: #c88654;
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  align-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 48%, #ffffff15, transparent 65%), var(--vehicle-bg);
  animation: vehicle-overlay .16s ease-out both;
}
.vehicle-transition[data-vehicle="boat"] {
  --vehicle-bg: #073744;
  --vehicle-line: #a0f0df;
  background: radial-gradient(ellipse at center, #126d83, transparent 72%), var(--vehicle-bg);
}
.vehicle-heading {
  justify-self: center;
  display: grid;
  gap: .45rem;
  margin-bottom: 1.3rem;
  color: #fff4e8;
  text-align: center;
  font: 650 clamp(.77rem, 2.8vw, 1rem)/1.25 system-ui, sans-serif;
  letter-spacing: .08em;
}
.vehicle-heading strong {
  color: var(--vehicle-line);
  font: 750 clamp(2.4rem, 9vw, 4.5rem)/1 ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.vehicle-route { position: relative; height: 100px; }
.vehicle-progress {
  justify-self: center;
  appearance: none;
  width: min(69vw, 320px);
  height: 5px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  color: var(--vehicle-line);
  background: #ffffff25;
}
.vehicle-progress::-webkit-progress-bar { background: #ffffff25; }
.vehicle-progress::-webkit-progress-value { background: var(--vehicle-line); }
.vehicle-progress::-moz-progress-bar { background: var(--vehicle-line); }
.vehicle-track {
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  border-top: 2px dashed var(--vehicle-line);
  opacity: .64;
}
.vehicle-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(100px, 14vw, 142px);
  animation: vehicle-cross var(--vehicle-duration, 2s) linear both;
}
.vehicle-icon svg { display: block; width: 100%; }
[data-vehicle="truck"] .vehicle-icon svg { animation: truck-bump .16s linear infinite alternate; }
[data-vehicle="boat"] .vehicle-route {
  display: grid;
  place-items: center;
  height: auto;
  margin: 0 0 1.4rem;
}
[data-vehicle="boat"] .vehicle-track { display: none; }
[data-vehicle="boat"] .vehicle-icon {
  position: relative;
  width: min(74vw, 46vh, 390px);
  animation: boat-drift var(--vehicle-duration) linear both;
}
[data-vehicle="boat"] .vehicle-icon img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 15px #001c2670);
  animation: boat-rock .8s ease-in-out infinite alternate;
}
@keyframes vehicle-overlay { from { opacity: 0; } to { opacity: 1; } }
@keyframes vehicle-cross { from { transform: translateX(-105%); } to { transform: translateX(calc(100vw + 12px)); } }
@keyframes truck-bump { from { transform: translateY(1px); } to { transform: translateY(-2px); } }
@keyframes boat-drift { from { transform: translateX(-8vw); } to { transform: translateX(8vw); } }
@keyframes boat-rock { from { transform: translateY(3px) rotate(-2deg); } to { transform: translateY(-3px) rotate(2deg); } }
