html { scroll-behavior: smooth; }
[x-cloak] { display: none !important; }

body { -webkit-font-smoothing: antialiased; }

/* ============================================
   Hero entry animation
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
section > div > * { animation: fadeUp 0.7s ease both; }

input, select, textarea {
  transition: border-color .15s ease, box-shadow .15s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  section > div > * { animation: none; }
}

/* ============================================
   Truck tracker — right rail journey indicator
   Visible only on wide screens (won't overlap content)
   ============================================ */
#truck-tracker {
  position: fixed;
  top: 96px;
  right: 12px;
  bottom: 28px;
  width: 84px;
  z-index: 30;
  pointer-events: none;
  display: none;
}
@media (min-width: 1480px) {
  #truck-tracker { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  #truck-tracker { display: none !important; }
}

.tracker-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Origin & destination pins (top & bottom of the rail) */
.tracker-pin {
  position: absolute;
  right: 38px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0a2540;
  color: #f4b400;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(50%, 0);
  box-shadow: 0 6px 14px -4px rgba(10,37,64,0.35);
  z-index: 2;
}
.tracker-pin--start { top: -14px; }
.tracker-pin--end   { bottom: -14px; transform: translate(50%, 0); background: #f4b400; color: #0a2540; }

/* Rail */
.rail {
  position: absolute;
  right: 50px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    #c2d1e7 0 6px,
    transparent 6px 12px
  );
  border-radius: 2px;
}
.rail-fill {
  position: absolute;
  right: 50px;
  top: 14px;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, #f4b400 0%, #d99c00 100%);
  border-radius: 2px;
  transition: height 0.18s ease-out;
  z-index: 1;
}

/* Stops list */
.stops {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.stop {
  position: absolute;
  right: 50px;
  top: 0;
  transform: translate(50%, -50%);
  pointer-events: auto;
}
.stop .dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #c2d1e7;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 0 rgba(244,180,0,0);
}
.stop.active .dot {
  background: #f4b400;
  border-color: #0a2540;
  width: 14px;
  height: 14px;
  box-shadow: 0 0 0 6px rgba(244,180,0,0.18);
}

/* Stop label (only visible when stop is active) */
.stop .label {
  position: absolute;
  right: 20px;
  top: 50%;
  white-space: nowrap;
  background: #0a2540;
  color: #ffffff;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translate(-6px, -50%);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.stop .label::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #0a2540;
  transform: translateY(-50%) rotate(45deg);
}
.stop.active .label {
  opacity: 1;
  transform: translate(0, -50%);
}

/* The truck */
#truck {
  position: absolute;
  right: 50px;
  top: 0;
  width: 48px;
  transform: translate(50%, -50%) rotate(0deg);
  transition: transform 0.55s cubic-bezier(.6,.04,.32,1);
  filter: drop-shadow(0 8px 14px rgba(10,37,64,0.28));
  z-index: 3;
}
#truck.reverse {
  transform: translate(50%, -50%) rotate(180deg);
}
#truck svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Wheel spin while scrolling */
#truck .wheels circle {
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes wheelSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
#truck.moving .wheels circle {
  animation: wheelSpin 0.5s linear infinite;
}

/* Tiny exhaust puff while moving */
#truck.moving::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transform: translateX(-50%);
  animation: puff 0.7s ease-out infinite;
}
#truck.reverse.moving::before {
  top: auto;
  bottom: -6px;
}
@keyframes puff {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
  40%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-150%, -10px) scale(1.4); }
}
