/* Autonavio landing page. Plain CSS, no build step. The hero animation's styles are at the end. */
:root {
  --ink: #131c2b;
  --ink-soft: #44506a;
  --muted: #6b7a94;
  --line: #e3e9f3;
  --blue: #0a58d6;
  --sky: #1aa0ff;
  --paper: #f7f9fd;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.landing {
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(60rem 34rem at 88% -6%, rgba(26, 160, 255, 0.16), transparent 62%),
    radial-gradient(44rem 30rem at -8% 22%, rgba(10, 88, 214, 0.09), transparent 60%),
    var(--paper);
}

.nav,
.hero,
.steps,
.download,
.sellers,
.footer {
  width: min(100% - 40px, 1200px);
  margin-inline: auto;
}

/* ---------- Top bar ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: calc(16px + env(safe-area-inset-top, 0px)) 16px;
}
.brand img {
  height: 34px;
  width: auto;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
}
.lang svg {
  position: absolute;
  inset-inline-start: 12px;
  pointer-events: none;
}
.lang select {
  appearance: none;
  height: 42px;
  padding-inline: 38px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.lang select:hover { border-color: #c5d0e2; }
.lang select:focus-visible {
  outline: 3px solid rgba(26, 160, 255, 0.55);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn,
.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 16px;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:active,
.play-btn:active { transform: scale(0.97); }
.btn:focus-visible,
.play-btn:focus-visible {
  outline: 3px solid rgba(26, 160, 255, 0.55);
  outline-offset: 3px;
}
.btn-sm { min-height: 42px; padding: 0 18px; border-radius: 12px; font-size: 0.92rem; }
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue) 70%);
  box-shadow: 0 10px 24px rgba(10, 88, 214, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10, 88, 214, 0.38); }
.btn-ghost {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: #c5d0e2; background: #fbfcfe; }

/* Store button: dark, two lines of text, the platform's colours in the icon. */
.play-btn {
  gap: 12px;
  padding: 0 24px 0 18px;
  color: #ffffff;
  background: #0f1724;
  box-shadow: 0 12px 28px rgba(15, 23, 36, 0.28);
}
.play-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(15, 23, 36, 0.36); }
.play-text {
  display: grid;
  text-align: start;
  line-height: 1.1;
}
.play-text small {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}
.play-text b { font-size: 1.22rem; font-weight: 700; }
[dir='rtl'] .play-text small { letter-spacing: 0; font-size: 0.78rem; }
.play-btn-light {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(24px, 5vw, 64px) clamp(48px, 7vw, 96px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(10, 88, 214, 0.08);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 700;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 4px rgba(26, 160, 255, 0.22);
}
h1,
h2,
h3 {
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  text-wrap: balance;
}
h1 {
  margin-block: 20px 22px;
  font-size: clamp(2.3rem, 4.3vw, 3.7rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
h1 span { display: block; }
h1 em {
  display: block;
  font-style: normal;
  color: var(--blue);
  background: linear-gradient(100deg, var(--blue), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-block-end: 0.12em; /* keeps descenders inside the clipped gradient */
}
/* Arabic script: no negative tracking, taller lines. */
[dir='rtl'] h1,
[dir='rtl'] h2 {
  letter-spacing: 0;
  line-height: 1.3;
}
.lead {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.65;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 30px 26px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-weight: 600;
}
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { color: #12b76a; flex: none; }

/* ---------- Steps ---------- */
.steps {
  padding-block: clamp(16px, 4vw, 48px) clamp(48px, 7vw, 96px);
  scroll-margin-top: 16px;
}
.kicker {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
[dir='rtl'] .kicker { letter-spacing: 0; font-size: 0.95rem; }
h2 {
  max-width: 22ch;
  margin-block: 12px 0;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-block-start: clamp(28px, 4vw, 44px);
  list-style: none;
}
.step {
  position: relative;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 30, 70, 0.04), 0 18px 40px -24px rgba(15, 30, 70, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(15, 30, 70, 0.04), 0 26px 50px -24px rgba(10, 88, 214, 0.35);
}
.step-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: var(--blue);
  background: linear-gradient(135deg, rgba(26, 160, 255, 0.18), rgba(10, 88, 214, 0.08));
}
.step-no {
  position: absolute;
  inset-block-start: 26px;
  inset-inline-end: 28px;
  color: #c3cddd;
  font: 500 0.95rem 'JetBrains Mono', ui-monospace, monospace;
}
.step h3 {
  margin-block: 22px 8px;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.step p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.6; }

/* ---------- Download (the Android app) ---------- */
.download {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 64px);
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(30rem 22rem at 90% 110%, rgba(255, 255, 255, 0.16), transparent 65%),
    linear-gradient(135deg, #1aa0ff, #0a58d6 55%, #0a3f9e);
  box-shadow: 0 30px 70px -30px rgba(10, 88, 214, 0.65);
  scroll-margin-top: 16px;
}
.download .kicker { color: #cfe8ff; }
.download-text {
  max-width: 34rem;
  margin-block: 16px 22px;
  color: #e3f0ff;
  font-size: 1.08rem;
  line-height: 1.6;
}
.download-points {
  display: grid;
  gap: 10px;
  margin-block-end: 30px;
  list-style: none;
  font-weight: 600;
}
.download-points li { display: flex; align-items: center; gap: 12px; }
.download-points .bullet { background: rgba(255, 255, 255, 0.2); }
.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
}
.qr {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 15rem;
  color: #e3f0ff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}
.qr img {
  flex: none;
  padding: 8px;
  border-radius: 12px;
  background: #ffffff;
}

/* Phone illustration */
.phone {
  justify-self: center;
  width: min(100%, 290px);
  padding: 11px;
  border-radius: 42px;
  background: #0f1724;
  box-shadow: 0 40px 70px -25px rgba(5, 20, 50, 0.7), inset 0 0 0 2px #2b3648;
  rotate: -4deg;
  animation: float 6s ease-in-out infinite;
}
[dir='rtl'] .phone { rotate: 4deg; }
@keyframes float {
  50% { translate: 0 -10px; }
}
.phone-screen {
  display: grid;
  gap: 10px;
  padding: 12px 12px 14px;
  border-radius: 32px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
}
.ph-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 10px 4px;
  font-weight: 700;
  font-size: 11px;
}
.ph-status i {
  width: 22px;
  height: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ink) 70%, transparent 70%) padding-box;
}
.ph-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-weight: 600;
}
.ph-search span { color: var(--ink); }
.ph-part {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
}
.ph-part-img {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e8eef7;
}
.ph-part-name { display: grid; }
.ph-part-name b { font-size: 13px; }
.ph-part-name small,
.ph-shop small { color: var(--muted); font-size: 11px; }
.ph-shop small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
}
.ph-row.is-on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 88, 214, 0.1); }
.ph-shop { display: grid; gap: 2px; min-width: 0; }
.ph-shop b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-badge {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(10, 88, 214, 0.1);
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
}
.ph-badge-green { background: rgba(18, 183, 106, 0.12); color: #0b8a50; }
.ph-price { font-weight: 800; font-size: 13px; white-space: nowrap; }
.ph-price small { color: var(--muted); font-size: 10px; font-weight: 600; }
.ph-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #c5d0e2;
  color: var(--blue);
  font-weight: 700;
}
.is-on .ph-check { border: 0; background: var(--blue); color: #ffffff; }
.ph-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block-start: 6px;
  padding: 8px 8px 8px 12px;
  border-radius: 14px;
  background: var(--ink);
  color: #c3d0e6;
  font-size: 11px;
  font-weight: 600;
}
.ph-bar b {
  padding: 7px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: #ffffff;
  white-space: nowrap;
}

/* ---------- Sellers ---------- */
.sellers {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  margin-block-start: clamp(48px, 7vw, 96px);
  padding: clamp(28px, 5vw, 60px);
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(32rem 20rem at 100% 0%, rgba(26, 160, 255, 0.34), transparent 65%),
    linear-gradient(140deg, #131c2b, #0d2a5c);
}
.sellers .kicker { color: #7cc4ff; }
.sellers h2 { max-width: 20ch; }
.sellers-text {
  max-width: 32rem;
  margin-block: 16px 28px;
  color: #c3d0e6;
  font-size: 1.05rem;
  line-height: 1.6;
}
.sellers-list { display: grid; gap: 12px; list-style: none; }
.sellers-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
  line-height: 1.4;
}
.bullet {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: #ffffff;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding-block: 36px calc(36px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.92rem;
}
.footer img { height: 26px; width: auto; }
.footer small { margin-inline-start: auto; font-size: 0.86rem; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .hero,
  .step-grid,
  .download,
  .sellers { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { margin-inline: -8px; }
  .phone { width: min(100%, 270px); }
}
@media (max-width: 560px) {
  .brand img { height: 28px; }
  .btn { white-space: normal; text-align: center; padding-block: 12px; }
  .nav-actions .btn { display: none; } /* the hero's store button is right below */
  .cta-row > * { flex: 1 1 100%; }
  .qr { display: none; } /* already on a phone */
  .download-actions .play-btn { flex: 1 1 100%; }
  .footer small { margin-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .play-btn,
  .step { transition: none; }
  .phone { animation: none; }
}

/* ======================================================================
   Hero animation: a car assembles itself, one part is missing, three shops
   are tried and the part arrives by the shortest route. CSS only; main.js
   just restarts it after each run.
   ====================================================================== */
/*
 * Every element's plain style is its final, assembled state. Animations only describe where
 * an element comes from, so "prefers-reduced-motion" (animation: none) shows the finished car.
 */
.scene {
  position: relative;
  container-type: inline-size;
  animation: scene-out 0.5s ease 14.6s forwards;
}

.stage {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  direction: ltr;
  filter: drop-shadow(0 30px 50px rgba(10, 60, 150, 0.16));
}

/* ---------- Map ---------- */
.roads,
.ground,
.lane {
  fill: none;
  stroke: #ffffff;
}
.roads { stroke-width: 12; }
.ground { stroke-width: 46; }
.lane { stroke: #f5f8fc; stroke-width: 3; stroke-dasharray: 16 14; }

/* ---------- Shared motion ---------- */
.p,
.bit,
.pin,
.tag,
.miss,
.miss-ring,
.miss-halo,
.jack,
.ping,
.mover-disc {
  transform-box: fill-box;
  transform-origin: center;
}

.p {
  animation: fly var(--t, 0.75s) cubic-bezier(0.2, 0.85, 0.25, 1.06) var(--d, 0s) both;
}
.roll {
  animation-timing-function: cubic-bezier(0.25, 0.7, 0.3, 1);
}
@keyframes fly {
  0% {
    opacity: 0;
    transform: translate(var(--x, 0px), var(--y, 0px)) rotate(var(--r, 0deg)) scale(var(--s, 1));
  }
  30% { opacity: 1; }
}

.bit {
  opacity: 0;
  animation: bit 1.15s cubic-bezier(0.5, 0, 0.3, 1) var(--d, 0s) both;
}
@keyframes bit {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(260deg) scale(1.7); }
  18%, 82% { opacity: 1; }
  100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.4); }
}

.fade,
.beam {
  animation: fade-in 0.5s ease var(--d, 0s) both;
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes scene-out { to { opacity: 0; } }

/* ---------- Car ---------- */
.car {
  animation: settle 0.55s ease-out 10.8s both;
}
@keyframes settle {
  0% { transform: translateY(-3px); }
  55% { transform: translateY(2px); }
  100% { transform: none; }
}

.panel {
  fill: url(#ln-chrome);
  stroke: #1c2534;
  stroke-width: 2;
  stroke-linejoin: round;
}
.glass {
  fill: url(#ln-glass);
  fill-opacity: 0.78;
  stroke: #1c2534;
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.lamp {
  fill: #ffe9a3;
  stroke: #1c2534;
  stroke-width: 1.5;
  stroke-linejoin: round;
  animation: lamp-on 0.4s ease 11s both;
}
@keyframes lamp-on { from { fill: #c9d2e0; } }
.beam { --d: 11s; }

.jack {
  opacity: 0;
  fill: none;
  stroke: #56627a;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: ghost 9.7s linear 1.1s both;
}

/* The slot of the part the driver is looking for */
.miss {
  opacity: 0;
  animation: ghost 5.3s linear 4.4s both;
}
.miss-ring {
  fill: none;
  stroke: #ff6a1a;
  stroke-width: 3;
  stroke-dasharray: 7 5.1;
  stroke-linecap: round;
  animation: spin 7s linear infinite;
}
.miss-halo {
  fill: #ff6a1a;
  fill-opacity: 0.18;
  animation: throb 0.9s ease-in-out infinite alternate;
}
@keyframes ghost {
  0% { opacity: 0; transform: scale(0.5); }
  6%, 95% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes throb { from { transform: scale(0.82); } }

/* ---------- Routes ---------- */
.rt {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
}
.rt-try {
  stroke: #8b97ab;
  stroke-width: 5;
  animation: draw var(--t) linear var(--d) both;
}
.rt-try.lose {
  animation: draw var(--t) linear var(--d) both, dim 0.5s ease 7s forwards;
}
.rt-glow,
.rt-win {
  animation: draw 0.6s cubic-bezier(0.5, 0, 0.3, 1) 7s both;
}
.rt-glow { stroke: #1aa0ff; stroke-opacity: 0.28; stroke-width: 16; }
.rt-win { stroke: #0a62e6; stroke-width: 7; }
/* The path runs shop -> car, so a negative offset draws it outwards from the car. */
@keyframes draw { from { stroke-dashoffset: -1; } }
@keyframes dim { to { opacity: 0.3; } }

/* ---------- Shops ---------- */
.pin {
  transform-origin: 50% 100%;
  animation: drop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) var(--d) both;
}
.pin.lose {
  fill: #8b97ab;
  animation: drop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) var(--d) both, dim 0.5s ease 7s forwards;
}
.pin.win { fill: #0a58d6; }
@keyframes drop { from { opacity: 0; transform: translateY(-40px) scale(0.4); } }

.ping {
  opacity: 0;
  fill: none;
  stroke: #1aa0ff;
  stroke-width: 3;
  animation: ping 1.3s ease-out 7.1s 4;
}
@keyframes ping {
  from { opacity: 0.85; transform: scale(1); }
  to { opacity: 0; transform: scale(3.2); }
}

.tag {
  animation: pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1) var(--d) both;
}
.tag.lose {
  animation: pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1) var(--d) both, dim 0.5s ease 7s forwards;
}
.tag rect { fill: #ffffff; stroke: #cfd8e6; }
.tag text {
  fill: #44506a;
  font: 700 13px 'Plus Jakarta Sans', system-ui, sans-serif;
  text-anchor: middle;
}
.tag.win rect { fill: #0a58d6; stroke: #0a58d6; }
.tag.win text { fill: #ffffff; }
@keyframes pop { from { opacity: 0; transform: scale(0.3); } }

/* ---------- The part on its way: pin head, down to the street, along it, into the hub ---------- */
.mover {
  animation: travel 1.9s linear 7.7s both;
}
@keyframes travel {
  0% { opacity: 0; transform: translate(112px, -296px); }
  6% { opacity: 1; transform: translate(112px, -270px); }
  34% { opacity: 1; transform: translate(0, -270px); }
  100% { opacity: 1; transform: none; }
}
.mover-disc {
  animation: turn 1.9s linear 7.7s both;
}
@keyframes turn {
  0% { transform: rotate(-620deg) scale(0.5); }
  8% { transform: rotate(-570deg) scale(1.3); }
  90% { transform: rotate(-60deg) scale(1.3); }
  100% { transform: none; }
}
.mover-glow {
  opacity: 0;
  fill: #1aa0ff;
  fill-opacity: 0.3;
  animation: glow-out 0.45s ease 9.5s both;
}
@keyframes glow-out { from { opacity: 1; } }

/* ---------- Floating chips (HTML, so they translate and read right-to-left) ---------- */
.chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.72em 1.05em;
  border-radius: 1.1em;
  background: #ffffff;
  border: 1px solid #e3e9f3;
  box-shadow: 0 12px 30px rgba(15, 30, 70, 0.14);
  color: #131c2b;
  font-size: clamp(11px, 2.5cqw, 15px);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  animation: chip 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) var(--d) both;
}
@keyframes chip { from { opacity: 0; transform: translateY(14px) scale(0.9); } }

.chip-search { top: 3.5%; left: 3%; color: #0a58d6; }
.chip-search span { color: #131c2b; }
.chip-found { bottom: -4%; right: 3%; }

.caret {
  width: 2px;
  height: 1.2em;
  margin-inline-start: -0.3em;
  background: #0a58d6;
  animation: blink 1s steps(2, jump-none) infinite;
}
@keyframes blink { to { opacity: 0; } }

.tick {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  background: #12b76a;
  color: #ffffff;
}
.chip-lines { display: grid; }
.chip-lines small { color: #6b7a94; font-size: 0.86em; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .scene,
  .scene * {
    animation: none !important;
  }
  .lose { opacity: 0.3; }
}
