/* Homepage only: three distinct views of the same operation. */
.homeHero {
  max-width: 1440px;
  margin: 48px auto 64px;
  padding: 0 48px;
}

.homeHeroLayout {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  align-items: center;
  gap: 24px;
  min-height: 540px;
}

.homeHeroCopy {
  position: relative;
  z-index: 1;
  padding: 30px 0;
}

.homeHeroCopy .eyebrow {
  display: block;
  text-align: left;
  margin-bottom: 24px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 1.4px;
}

.homeHeroCopy h1 {
  color: var(--Base-600);
  font: 600 clamp(48px, 4.8vw, 72px)/1.06 Gilroy, sans-serif;
  letter-spacing: -2.4px;
}

.homeHeroCopy h1 strong {
  color: var(--Accent-600);
  font-weight: inherit;
}

.homeHeroCopy p {
  max-width: 440px;
  margin: 28px 0;
  color: var(--Base-400);
  font-size: 18px;
  line-height: 1.65;
}

.homeHeroCopy .heroCTA {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
}

.homeHeroStage {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  aspect-ratio: 1.24;
  overflow: hidden;
}

.homeHeroStage::before {
  content: "";
  position: absolute;
  inset: 2% 0;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #a7dfc549, transparent 70%);
  transition: background 850ms ease;
}

.homeHero[data-feature="driver"] .homeHeroStage::before {
  background: radial-gradient(ellipse at 64% 44%, #ded9fbad, transparent 70%);
}

.homeHero[data-feature="customer"] .homeHeroStage::before {
  background: radial-gradient(ellipse at center, #b8e4ce99, transparent 70%);
}

.homeHeroBoard {
  position: absolute;
  top: 14%;
  left: 2%;
  width: 112%;
  overflow: hidden;
  border: 1px solid #354139;
  border-radius: 12px;
  background: #090b0d;
  box-shadow: 0 22px 36px #173d2824;
  transition: opacity 850ms ease, transform 1s ease, filter 850ms ease;
}

.homeHeroBoard img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.78;
  object-fit: cover;
  object-position: top;
}

.homeHero:not([data-feature="dispatch"]) .homeHeroBoard {
  opacity: .22;
  transform: translateX(-4%) scale(.93);
}

.homeHeroLayer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity 850ms ease, transform 1s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.homeHeroLayer.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.homeHeroPhone {
  position: absolute;
  top: 2%;
  left: 46%;
  width: 48%;
  height: 86%;
  overflow: hidden;
  border: 6px solid #22292c;
  border-radius: 32px;
  background: #080a09;
  box-shadow: 0 22px 34px #22213e2e, 0 0 0 1px #42494d;
}

.homeHeroPhone img {
  display: block;
  width: 100%;
  height: auto;
}

.homeHeroNextStop {
  position: absolute;
  top: 32%;
  left: 3%;
  width: 52%;
  padding: 4.2cqw;
  border: 1px solid #e6e4ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px #24213b1c;
  color: #101824;
}

.homeHeroStopIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6.4cqw;
  height: 6.4cqw;
  margin-bottom: 3cqw;
  border-radius: 12px;
  background: #f0edfc;
  color: #7360bb;
}

.homeHeroStopIcon svg { width: 52%; height: 52%; }
.homeHeroSmallLabel { display: block; color: #66746e; font-size: clamp(9px, 1.8cqw, 12px); line-height: 1.4; letter-spacing: .04em; }
.homeHeroNextStop > strong { display: block; margin: 1.3cqw 0; font-size: clamp(14px, 3.1cqw, 22px); line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
.homeHeroStopDetail { display: block; color: #65706d; font-size: clamp(10px, 2.1cqw, 14px); line-height: 1.5; }
.homeHeroStopReady { display: block; margin-top: 3.5cqw; padding-top: 2.5cqw; border-top: 1px solid #edf0ed; color: #35694f; font-size: clamp(10px, 2cqw, 13px); line-height: 1.5; }

.homeHeroTracker {
  position: absolute;
  top: 10%;
  left: 6%;
  width: 90%;
  overflow: hidden;
  border: 1px solid #d8e6de;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 45px #154b2f24;
}

.homeHeroTrackerTop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3.5cqw 4.5cqw; border-bottom: 1px solid #edf2ee; }
.homeHeroTrackerTop img { width: 15cqw; height: auto; }
.homeHeroTrackerTop > span { color: #63776c; font-size: clamp(9px, 1.8cqw, 12px); line-height: 1.4; }
.homeHeroArrival { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4.5cqw; }
.homeHeroArrival strong { display: block; margin-top: .7cqw; color: #143b2c; font: 600 11cqw/1.05 Gilroy, sans-serif; letter-spacing: -.045em; }
.homeHeroArrival strong > span { font-size: .48em; letter-spacing: -.03em; }
.homeHeroTrackingStatus { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 1cqw; padding: 1.2cqw 1.8cqw; border-radius: 20px; background: #e8f5ed; color: #157349; font-size: clamp(9px, 2cqw, 13px); white-space: nowrap; }
.homeHeroTrackingStatus::before, .homeHeroLiveLocation::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #14835b; }
.homeHeroTrackingMap { position: relative; border-top: 1px solid #e4ebe5; }
.homeHeroTrackingMap > svg { display: block; width: 100%; height: auto; }
.homeHeroDestination { position: absolute; top: 6%; left: 70%; padding: .7cqw 1cqw; border-radius: 6px; background: #fff; color: #244936; box-shadow: 0 2px 8px #164b2a12; font-size: clamp(8px, 1.6cqw, 11px); white-space: nowrap; }
.homeHeroLiveLocation { position: absolute; bottom: 7%; right: 4%; display: flex; align-items: center; gap: 6px; padding: 1.5cqw 2cqw; border-radius: 8px; background: #fff; color: #426c54; font-size: clamp(9px, 1.8cqw, 12px); box-shadow: 0 2px 8px #164b2a12; }

.homeHeroCaption {
  position: absolute;
  left: 4%;
  bottom: 4%;
  max-width: 92%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border: 1px solid #e0eae4;
  border-radius: 10px;
  background: var(--Base-100);
  box-shadow: 0 8px 24px #183c2420;
  color: var(--Base-500);
  font-size: 14px;
  line-height: 1.5;
}

.homeHeroCaption::before { content: ""; flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--Accent-500); }

@media (min-width: 901px) and (max-width: 1150px) {
  .homeHero { padding: 0 32px; }
  .homeHeroLayout { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); gap: 16px; }
  .homeHeroCopy h1 { font-size: 52px; }
  .homeHeroCopy p { font-size: 17px; }
}

@media (max-width: 900px) {
  .homeHero { margin: 24px auto 40px; padding: 0 24px; }
  .homeHeroLayout { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; }
  .homeHeroCopy { max-width: 640px; padding: 24px 0; }
  .homeHeroCopy h1 { font-size: clamp(40px, 7.4vw, 64px); }
  .homeHeroCopy p { max-width: 520px; margin: 22px 0; }
  .homeHeroStage { width: 100%; max-width: 680px; justify-self: center; }
}

@media (max-width: 480px) {
  .homeHero { padding: 0 20px; }
  .homeHeroCopy .eyebrow { font-size: 10px; margin-bottom: 18px; }
  .homeHeroCopy h1 { font-size: 42px; letter-spacing: -1.6px; }
  .homeHeroCopy p { font-size: 16px; }
  .homeHeroCopy .heroCTA { width: auto; flex-direction: row; align-items: stretch; }
  .homeHeroCopy .heroCTA a { width: auto; padding: 11px 14px; font-size: 13px; }
  .homeHeroStage { aspect-ratio: 1.03; }
  .homeHeroBoard { top: 18%; width: 143%; left: 0; }
  .homeHeroPhone { top: 5%; width: 55%; left: 42%; height: 81%; border-width: 4px; border-radius: 23px; }
  .homeHeroNextStop { top: 34%; left: 0; width: 57%; border-radius: 12px; }
  .homeHeroStopReady { display: none; }
  .homeHeroTracker { top: 16%; width: 98%; left: 1%; border-radius: 15px; }
  .homeHeroCaption { bottom: 3%; left: 2%; padding: 11px 12px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .homeHeroBoard, .homeHeroLayer { transition: none; }
}

/* RouteIQ's diagonal route field keeps motion on the product side of the hero. */
.homeHero--route {
  position: relative;
  isolation: isolate;
  max-width: none;
  margin: 0;
  padding: 96px max(6vw, calc((100vw - 1340px) / 2)) 132px;
  overflow: hidden;
}

.homeHero--route .homeHeroLayout {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(30px, 4vw, 70px);
  max-width: 1340px;
  min-height: 0;
  margin: auto;
}

.homeHeroField {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  clip-path: polygon(56% 0, 100% 0, 100% 100%, 37% 100%);
  background: linear-gradient(130deg, #d9fbe8 3%, #9be8cb 38%, #62cbd1 72%, #d6f0e7 100%);
}

.homeHeroField::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, .28), transparent 55%);
}

.homeHeroField .routeField { left: 52%; opacity: .66; }

.homeHeroGlow {
  position: absolute;
  inset: -20%;
  filter: blur(70px);
  opacity: .65;
}

.homeHeroGlow i {
  position: absolute;
  display: block;
  border-radius: 50%;
  animation: homeRouteDrift 24s ease-in-out infinite alternate;
}

.homeHeroGlow i:nth-child(1) { top: 3%; left: 29%; width: 38%; height: 70%; background: #e0ffe1; }
.homeHeroGlow i:nth-child(2) { top: 26%; right: -3%; width: 42%; height: 68%; background: #8be9dd; animation-delay: -9s; }
.homeHeroGlow i:nth-child(3) { bottom: -18%; left: 48%; width: 34%; height: 55%; background: #c8e5ff; animation-delay: -16s; }

@keyframes homeRouteDrift { to { transform: translate3d(12%, -9%, 0) scale(1.08); } }

.homeHero--route .homeHeroCopy { padding: 0; }
.homeHero--route .homeHeroCopy h1 {
  max-width: 660px;
  font-size: clamp(54px, 5.1vw, 76px);
  line-height: 1.04;
  letter-spacing: -2.6px;
}
.homeHero--route .homeHeroCopy p { max-width: 500px; margin: 26px 0 32px; color: var(--Base-500); line-height: 1.55; }

@media (min-width: 1001px) {
  html[lang^="pt"] .homeHero--route .homeHeroCopy h1 { font-size: clamp(54px, 4.7vw, 70px); }
}

.homeHero--route .homeHeroStage {
  width: calc(100% + 48px);
  aspect-ratio: 1.24;
  overflow: visible;
  transform: translate(-48px, 28px);
}
.homeHero--route .homeHeroStage::before { display: none; }
.homeHero--route .homeHeroBoard {
  top: 8%;
  left: 0;
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 42px 86px -35px rgba(9, 44, 41, .48), 0 14px 28px -16px rgba(9, 44, 41, .3);
}

.homeHero--route [data-hero-layer="dispatch"] .homeHeroCaption {
  top: 72%;
  bottom: auto;
}

@media (max-width: 1000px) {
  .homeHero--route { padding: 76px 6vw 100px; }
  .homeHero--route .homeHeroLayout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .homeHero--route .homeHeroCopy { max-width: 760px; }
  .homeHero--route .homeHeroStage {
    width: 100%;
    max-width: 850px;
    margin-top: 64px;
    justify-self: center;
    transform: none;
  }
  .homeHeroField { top: 38%; clip-path: polygon(0 23%, 100% 0, 100% 100%, 0 100%); }
  .homeHeroField .routeField { left: 0; top: 28%; }
}

@media (max-width: 767px) {
  .homeHero--route { padding: 52px 24px 72px; }
  .homeHero--route .homeHeroCopy .eyebrow { margin-bottom: 20px; font-size: 12px; }
  .homeHero--route .homeHeroCopy h1 { font-size: clamp(42px, 10.5vw, 58px); line-height: 1.05; letter-spacing: -1.8px; }
  .homeHero--route .homeHeroCopy p { margin: 24px 0 30px; font-size: 17px; line-height: 1.52; }
  .homeHero--route .homeHeroStage { margin-top: 62px; }
  .homeHeroField { top: 61%; }
  .homeHeroField .routeField { top: 36%; }
}

@media (prefers-reduced-motion: reduce) {
  .homeHeroGlow i { animation: none; }
}
