/* Hero phone mockup: a request card slides in, matches the rules and is accepted. */
.phone {
  --cycle: 8s;
  position: relative;
  width: min(300px, 82vw);
  aspect-ratio: 300 / 540;
  padding: 12px 12px 0;
  border-radius: 46px 46px 0 0;
  background: linear-gradient(160deg, #1d3b35, #0b1714);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.12),
    0 -10px 60px rgba(110, 231, 197, 0.18);
}
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 34px 34px 0 0;
  background: #e9efe9;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.status {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px;
  font-weight: 700;
  direction: ltr;
}
.bars { width: 34px; height: 10px; border-radius: 3px; background: currentColor; opacity: 0.75; }

/* Stylised map. */
.map {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 70%, #d6e9d9 0 18%, transparent 19%),
    radial-gradient(circle at 80% 25%, #d6e9d9 0 14%, transparent 15%),
    #eef3ee;
}
.road { position: absolute; background: #fff; box-shadow: 0 0 0 1px #dfe7e0; border-radius: 6px; }
.r1 { width: 14px; height: 140%; left: 38%; top: -20%; transform: rotate(18deg); }
.r2 { height: 12px; width: 140%; left: -20%; top: 34%; transform: rotate(-8deg); }
.r3 { height: 10px; width: 120%; left: -10%; top: 58%; transform: rotate(24deg); }
.pin, .me { position: absolute; border-radius: 50%; }
.pin {
  width: 18px; height: 18px; left: 58%; top: 26%;
  background: var(--accent);
  box-shadow: 0 0 0 5px #fff, 0 4px 10px rgba(0, 0, 0, 0.2);
}
.me {
  width: 16px; height: 16px; left: 32%; top: 44%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(15, 92, 77, 0.25), 0 0 0 2px #fff inset;
}

/* Request card. */
.card {
  position: absolute;
  z-index: 1;
  inset: auto 10px 12px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 -6px 30px rgba(6, 44, 37, 0.18);
  animation: card-in var(--cycle) ease-in-out infinite both;
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.badge {
  padding: 2px 10px;
  border-radius: 999px;
  background: #e5f2ee;
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
}
.fare { font-size: 24px; font-weight: 700; line-height: 1; }
.fare small { font-size: 13px; color: var(--muted); }
.route { list-style: none; margin: 0 0 10px; padding: 0; color: var(--muted); }
.route li { display: flex; align-items: center; gap: 8px; }
.route li::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid var(--brand);
}
.route li + li::before { background: var(--brand); }
.rules { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.rules > span {
  padding: 2px 8px;
  border-radius: 8px;
  background: #eaf7f1;
  color: #0b6b4f;
  font-size: 12px;
  font-weight: 700;
  animation: rule-ok var(--cycle) ease-out infinite both;
}
.rules > span::before { content: "✓ "; }
.accept {
  display: grid;
  place-items: center;
  height: 44px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  animation: tap var(--cycle) ease-out infinite both;
}

/* "Accepted" toast. */
.toast {
  position: absolute;
  z-index: 3;
  top: 44px;
  inset-inline: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--brand-900);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(6, 44, 37, 0.35);
  animation: toast-in var(--cycle) ease-out infinite both;
}
.toast .ico { color: var(--mint); }

@keyframes card-in {
  0%, 6% { transform: translateY(115%); }
  14%, 86% { transform: translateY(0); }
  94%, 100% { transform: translateY(115%); }
}
@keyframes rule-ok {
  0%, 18% { opacity: 0.35; }
  24%, 100% { opacity: 1; }
}
@keyframes tap {
  0%, 30% { transform: scale(1); background: var(--brand); }
  33% { transform: scale(0.94); background: var(--brand-900); }
  37%, 100% { transform: scale(1); background: #12805f; }
}
@keyframes toast-in {
  0%, 36% { opacity: 0; transform: translateY(-140%); }
  42%, 84% { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0; transform: translateY(-140%); }
}

@media (prefers-reduced-motion: reduce) {
  .card, .rules > span, .accept, .toast { animation: none; }
}
