/* Visual language of the karavanapp.kg landing: ink background, Manrope, gold accent, blue glow. */
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/tracking/fonts/manrope-cyrillic.woff2) format("woff2"); unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/tracking/fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope Fallback"; src: local(Arial); ascent-override: 103.31%; descent-override: 29.07%; line-gap-override: 0%; size-adjust: 103.19%; }

:root {
  color-scheme: dark;
  --page: #020611; --card: #121620; --surface: #11151f; --raised: #161a24;
  --gold: #d9a878; --gold-light: #f3e3cc; --gold-dark: #c58c5c;
  --glow: #2060c7; --verified: #4dab1d;
  --line: rgb(255 255 255 / .08); --muted: rgb(255 255 255 / .6); --soft: rgb(255 255 255 / .75);
  --ease: cubic-bezier(.22, 1, .36, 1);
  font-family: Manrope, "Manrope Fallback", "Helvetica Neue", Arial, sans-serif;
  color: #fff; background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background:
  radial-gradient(55% 45% at 78% 0%, rgb(32 96 199 / .32), transparent 72%),
  radial-gradient(40% 30% at 0% 80%, rgb(217 168 120 / .07), transparent 70%), var(--page);
  -webkit-font-smoothing: antialiased; }
a { color: var(--gold); }
.rail { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: 16px; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: #020611cc; border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; border-radius: 8px; }
.logo img:first-child { height: 28px; width: auto; }
.logo img:last-child { height: 15px; width: auto; }
.header-pill { margin-right: auto; padding: 8px 14px; border-radius: 999px; background: rgb(255 255 255 / .04);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--soft); font-size: 13px; font-weight: 500; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px;
  border-radius: 999px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .2s var(--ease); }
.button:active { transform: scale(.98); }
.button-gold { background: var(--gold); color: var(--page); box-shadow: 0 10px 30px -12px rgb(217 168 120 / .7); }
.button-gold:hover { background: #e2b88e; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 20px; padding-block: 20px; align-items: start; }
.map-card { position: relative; min-width: 0; overflow: hidden; border-radius: 28px; background: var(--surface);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 40px 80px -40px rgb(0 0 0 / .9); }
#map { width: 100%; height: max(560px, calc(100dvh - 104px)); background: #111620; opacity: 0; transition: opacity .3s ease; }
#map.ready { opacity: 1; }
.map-badge { position: absolute; top: 16px; right: 16px; z-index: 2; padding: 8px 14px; border-radius: 999px;
  background: #020611d9; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); backdrop-filter: blur(12px);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.panel { display: flex; flex-direction: column; gap: 20px; min-width: 0; position: sticky; top: 84px; }
.card { position: relative; overflow: hidden; padding: 24px; border-radius: 24px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); }
.eyebrow { margin: 0; color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.display { margin: 14px 0 0; font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; line-height: 1.08; letter-spacing: -.02em;
  text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }

/* Stops */
.stops { position: relative; margin: 22px 0 0; padding: 0; list-style: none; }
.stops::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 14px; width: 2px;
  background: linear-gradient(var(--gold), #55a8f7); border-radius: 2px; }
.stop { position: relative; padding: 4px 0 4px 28px; min-width: 0; }
.stop + .stop { margin-top: 10px; }
.stop::before { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%; background: var(--card); border: 3px solid var(--gold); }
.stop-destination::before { border-color: #55a8f7; }
.stop small { display: block; color: var(--muted); font-size: 12px; }
.stop strong { display: block; margin-top: 2px; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }

/* Status */
.state { display: inline-flex; align-items: center; gap: 10px; margin: 22px 0 0; padding: 8px 14px; border-radius: 999px;
  background: rgb(77 171 29 / .12); box-shadow: inset 0 0 0 1px rgb(77 171 29 / .3); color: #a6e08a; font-size: 13px; font-weight: 600; line-height: 1.35; }
.state .dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.state:not(.warning):not(.error) .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: currentColor; animation: pulse-ring 2.4s ease-out infinite; }
.state.warning { background: rgb(217 168 120 / .12); box-shadow: inset 0 0 0 1px rgb(217 168 120 / .3); color: var(--gold-light); }
.state.error { background: rgb(243 166 170 / .1); box-shadow: inset 0 0 0 1px rgb(243 166 170 / .3); color: #f3a6aa; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }

/* Details */
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0 0; }
.details > div { min-width: 0; padding: 14px; border-radius: 16px; background: rgb(255 255 255 / .03); box-shadow: inset 0 0 0 1px var(--line); }
.details dt { color: var(--muted); font-size: 12px; }
.details dd { margin: 6px 0 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.note { margin: 18px 0 0; padding: 14px 16px; border-radius: 16px; background: rgb(32 96 199 / .1);
  box-shadow: inset 3px 0 0 var(--gold); color: var(--soft); font-size: 13px; line-height: 1.55; }

/* Download */
.download-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 60% at 100% 0%, rgb(32 96 199 / .35), transparent 70%); }
.download > * { position: relative; }
.download h2 { margin: 12px 0 0; font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.download-text { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.store-badge { display: inline-flex; flex: 1 1 150px; align-items: center; gap: 10px; min-height: 52px; padding: 8px 16px;
  border-radius: 14px; background: #000; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); color: #fff; text-decoration: none;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.store-badge:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.store-badge:active { transform: scale(.98); }
.store-badge small { display: block; font-size: 10px; line-height: 1.1; color: rgb(255 255 255 / .8); }
.store-badge strong { display: block; font-size: 17px; font-weight: 700; line-height: 1.15; }
.store-logo { flex: none; width: 24px; height: 24px; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 4px 28px;
  color: rgb(255 255 255 / .45); font-size: 12px; line-height: 1.5; }
.footer p { margin: 0; max-width: 720px; }
.footer a { color: rgb(255 255 255 / .6); text-decoration: none; }
.footer a:hover { color: var(--gold); }

/* Map widgets */
.maplibregl-map { font-family: inherit; }
.maplibregl-ctrl-group { background: #020611d9 !important; border-radius: 14px !important; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 36px !important; height: 36px !important; border-color: rgb(255 255 255 / .1) !important; filter: invert(1); }
.maplibregl-ctrl-top-left { top: 8px; left: 8px; }
.route-pin { width: 32px; height: 55px; object-fit: contain; }
.truck-halo { position: relative; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; background: #d9a87838; }
.truck-halo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #d9a87830; animation: pulse-ring 2.4s ease-out infinite; }
.truck-body { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 2px solid #fff; border-radius: 50%; background: var(--gold); box-shadow: 0 2px 8px #0008; }
.truck-body img { width: 18px; height: 18px; filter: invert(1); }
.truck-direction { position: absolute; inset: 0; transform-origin: center; }
.truck-direction::before { content: ""; position: absolute; top: -2px; left: 18px; border-right: 7px solid transparent; border-bottom: 8px solid var(--gold); border-left: 7px solid transparent; }
.truck-map-marker.stale .truck-halo { background: transparent; }
.truck-map-marker.stale .truck-halo::after { display: none; }
.truck-map-marker.stale .truck-body { background: #1b2432; border-color: #756958; }
.truck-map-marker.stale .truck-direction::before { border-bottom-color: #756958; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (min-width: 640px) { .rail { padding-inline: 24px; } }
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .map-card { border-radius: 0; box-shadow: none; }
  #map { height: 58dvh; min-height: 340px; }
  .panel { position: relative; top: auto; z-index: 5; margin: -36px 12px 0; gap: 12px; }
  .summary { box-shadow: inset 0 0 0 1px var(--line), 0 -16px 40px -8px rgb(0 0 0 / .7); }
  .card { padding: 20px; border-radius: 22px; }
  .footer { padding: 20px 16px 32px; }
  .map-badge { top: 12px; right: 12px; }
}
@media (max-width: 560px) {
  .header-pill { display: none; }
  .logo { margin-right: auto; }
  .header-cta { height: 36px; padding: 0 14px; font-size: 13px; }
}
@media (max-width: 360px) { .logo img:last-child { display: none; } }
