/* AT GPS — "Daylight" edition: a light, editorial counterpart to the Night map.
   Paper ground · navy ink · one azure accent · instrument-grade numerals.
   Brand: navy-950 #0f1b2d · blue-500 #338eb6 · sky-300 #8fc3de · red-500 #e31e24 */

:root {
  --paper: #f3f7fa;
  --paper-2: #e8f0f7;
  --card: #ffffff;
  --ink: #1c2f47;
  --ink-2: #46607a;
  --ink-3: #7591ab;
  --line: rgba(15, 27, 45, 0.13);
  --line-soft: rgba(15, 27, 45, 0.08);
  --accent: #1e73ae;
  --accent-deep: #155a87;
  --accent-wash: rgba(30, 115, 174, 0.09);
  --sky-300: #8fc3de;
  --red: #d13438; /* brand red-500, alerts + live dot only */
  --font-sans: "Plus Jakarta Sans", "Cairo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 0 var(--line-soft), 0 18px 40px -28px rgba(20, 36, 58, 0.35);
  --wrap: 1180px;
}

html[lang="ar"] { --font-sans: "Cairo", "Plus Jakarta Sans", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(rgba(15, 27, 45, 0.03) 1px, transparent 1px) 0 -0.5px / 100% 44px,
    var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(51, 142, 182, 0.25); }
:where(a, button):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; }

/* ---------- Arabic typography — Cairo needs more air, and tracking breaks letter joining ---------- */
html[lang="ar"] body { line-height: 1.78; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.5; letter-spacing: 0; }
html[lang="ar"] .display { line-height: 1.3; letter-spacing: 0; }
html[lang="ar"] .overline { letter-spacing: 0.02em; }
p { margin: 0; }
a { color: inherit; }

section { scroll-margin-top: 96px; }

.wrap, .bento, .how, .why, .privacy-inner, .cta {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ---------- chrome ---------- */

/* floating liquid-glass capsule, Apple style: the map shows through it at the top */
.topbar {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--wrap), calc(100% - 28px));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 9px 24px;
  border-radius: 999px;
  background: linear-gradient(rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.28));
  backdrop-filter: blur(26px) saturate(1.9);
  -webkit-backdrop-filter: blur(26px) saturate(1.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.25),
    0 14px 34px -16px rgba(15, 27, 45, 0.35);
}
.brand { display: inline-flex; flex: none; }
.brand img { display: block; }
.topnav { display: flex; gap: 26px; margin-inline: auto; }
.topnav a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.15s;
}
.topnav a:hover { color: var(--accent-deep); }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex: none; }

.lang {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  padding: 6px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lang:hover { color: var(--accent-deep); border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 24px; /* base padding — .btn-sm/.btn-lg override */
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-sm { font-size: 14px; padding: 8px 16px; }
.btn-lg { font-size: 16px; padding: 14px 28px; }
.btn-primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20, 36, 58, 0.06); }
.btn-ghost:hover { background: #ffffff; border-color: var(--accent); color: var(--accent-deep); }

/* ---------- hero: the paper map is the ground — one route, one vehicle, one chip ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(120px, 16vh, 170px) clamp(64px, 10vh, 104px);
}
.hero-map { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-map .map { width: 100%; height: 100%; display: block; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 18% 45%, rgba(243, 247, 250, 0.92) 0%, rgba(243, 247, 250, 0.6) 45%, rgba(243, 247, 250, 0.05) 80%),
    linear-gradient(rgba(243, 247, 250, 0.5), rgba(243, 247, 250, 0.08) 30%, rgba(243, 247, 250, 0.7) 92%);
}
html[dir="rtl"] .hero-scrim { transform: scaleX(-1); }

.hero-inner {
  max-width: 700px;
  margin-inline-start: max(clamp(20px, 5vw, 48px), calc((100% - var(--wrap)) / 2 + clamp(20px, 5vw, 48px)));
  padding-inline-end: clamp(20px, 5vw, 48px);
}

.overline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 20px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(209, 52, 56, 0.45); } 70% { box-shadow: 0 0 0 9px rgba(209, 52, 56, 0); } 100% { box-shadow: 0 0 0 0 rgba(209, 52, 56, 0); } }

.display {
  font-size: clamp(40px, 5.2vw, 62px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: balance;
  margin: 0 0 24px;
}
.display .accent { color: var(--accent-deep); }
.display span { display: block; }

.lead {
  font-size: clamp(17px, 1.6vw, 19.5px);
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 36px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: "\2713"; color: var(--accent); font-weight: 800; }

/* the scene: cool frost map — maps read cooler, the paper stays warm */
.m-ground { fill: #e6edf3; }
.m-block { fill: rgba(51, 142, 182, 0.07); }
.m-road { fill: none; }
.m-road-minor { stroke: rgba(255, 255, 255, 0.9); stroke-width: 7; }
.m-road-major { stroke: #ffffff; stroke-width: 11; }
.m-route {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  animation: draw-route 1.8s ease-out 0.3s forwards;
}
.m-start { fill: #1e73ae; }
.m-stop circle { fill: #ffffff; stroke: #1e73ae; stroke-width: 2; }
.m-stop text { fill: #1e73ae; font-size: 13px; font-weight: 700; text-anchor: middle; font-family: var(--font-sans); }
.m-pin-pulse {
  fill: rgba(209, 52, 56, 0.28);
  transform-box: fill-box;
  transform-origin: center;
  animation: pin-pulse 2.4s ease-out infinite;
}
.m-pin-dot { fill: var(--red); }
.m-pin-core { fill: #fff; }
.m-veh-halo { fill: rgba(30, 115, 174, 0.25); animation: veh-pulse 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.m-veh-dot { fill: #fff; stroke: #1e73ae; stroke-width: 3.5; }
@keyframes draw-route { to { stroke-dashoffset: 0; } }
@keyframes pin-pulse { 0% { transform: scale(1); opacity: 0.85; } 70% { transform: scale(2.3); opacity: 0; } 100% { transform: scale(2.3); opacity: 0; } }
@keyframes veh-pulse { 0% { transform: scale(1); opacity: 0.55; } 75% { transform: scale(2); opacity: 0; } 100% { transform: scale(2); opacity: 0; } }

.float-chip {
  position: absolute;
  top: 24%;
  inset-inline-end: 13%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 26px -14px rgba(20, 36, 58, 0.4);
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- stats strip/* ---------- mobile navigation (hidden ≥861px) ---------- */

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
}
.menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.mobile-nav {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--wrap), calc(100% - 28px));
  z-index: 39;
  display: none;
  flex-direction: column;
  padding: 10px;
  border-radius: var(--r-lg);
  background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.62));
  backdrop-filter: blur(26px) saturate(1.9);
  -webkit-backdrop-filter: blur(26px) saturate(1.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 24px 48px -20px rgba(15, 27, 45, 0.4);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  padding: 13px 16px;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
.mobile-nav a:hover { background: var(--accent-wash); color: var(--accent-deep); }
.mobile-nav .mobile-cta {
  color: var(--accent-deep);
  font-weight: 700;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav .mobile-login {
  margin-top: 6px;
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  color: var(--accent-deep);
}

/* ---------- stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
  margin-block: 8px 0;
}
.stat {
  background: var(--paper);
  padding: 26px clamp(20px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.stat-v { font-size: clamp(26px, 3vw, 36px); font-weight: 600; color: var(--ink); }
.stat-l { font-size: 13.5px; color: var(--ink-3); font-weight: 600; }

/* ---------- bento ---------- */

.bento { padding-block: clamp(56px, 10vh, 110px) 0; }
.h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.025em; max-width: 22ch; }

.grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile h3 { font-size: 19px; font-weight: 700; }
.tile p { color: var(--ink-2); font-size: 15px; }
.tile-wide { grid-column: span 2; }

/* mini report table — show, don't tell */
.mini-report {
  margin-top: auto;
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.mini-report th, .mini-report td { text-align: start; padding: 8px 12px; }
.mini-report th { font-family: var(--font-sans); font-weight: 700; color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--line); }
.mini-report td { border-bottom: 1px solid var(--line-soft); }
.mini-report tr:last-child td { border-bottom: 0; }

/* instant-addresses demo */
.addr-demo {
  margin-top: auto;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
}
.addr-coord { color: var(--ink-3); }
.addr-arrow { color: var(--accent); }
.addr-result { color: var(--ink); font-weight: 600; min-height: 1.3em; border-inline-end: 2px solid var(--accent); padding-inline-end: 4px; }

/* notification pills: the original's tri-colour alert language */
.alert-pills { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.alert-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pill-dot.red { background: var(--red); }
.pill-dot.amber { background: #e8a13c; }
.pill-dot.blue { background: var(--accent); }

/* how it works: three steps, top hairlines, mono numbers */
.how { padding-block: clamp(56px, 10vh, 110px) 0; }
.how-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
}
.how-step { border-top: 1px solid var(--line); padding-top: 18px; text-align: center; }
.how-no { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent-deep); letter-spacing: 0.1em; }
.how-step h3 { font-size: 17px; margin: 8px 0 8px; }
.how-step p { font-size: 14.5px; color: var(--ink-2); }

.plate {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 6px 12px;
  margin-top: auto;
  background: var(--card);
}

/* ---------- why switch (market reality) ---------- */

.why { padding-block: clamp(56px, 10vh, 110px) 0; }
.why-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.why-card {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 22px;
}
.why-card h3 { font-size: 16px; margin-bottom: 12px; }
.why-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.why-card li {
  font-size: 14px;
  color: var(--ink-2);
  padding-inline-start: 22px;
  position: relative;
}
.why-card li::before { content: "×"; position: absolute; inset-inline-start: 0; color: var(--red); font-weight: 800; }

.ledger {
  margin-top: 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ledger-head,
.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 18px;
  padding: 14px 20px;
}
.ledger-head {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ledger-row { border-top: 1px solid var(--line-soft); font-size: 14.5px; }
.ledger-row .pain { color: var(--ink-3); }
.ledger-row .fix { font-weight: 700; }
.ledger-row .fix::before { content: "✓ "; color: var(--accent); }

/* ---------- privacy band ---------- */

.privacy {
  position: relative;
  isolation: isolate;
  margin-top: clamp(56px, 10vh, 110px);
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(56px, 9vh, 96px);
}
.privacy-img {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(assets/frankfurt.jpg) center 55% / cover no-repeat;
  filter: grayscale(1) contrast(1.08) brightness(0.85);
  opacity: 0.36;
}
.privacy-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(20, 36, 58, 0.96) 0%, rgba(20, 36, 58, 0.82) 55%, rgba(20, 36, 58, 0.45) 100%);
}
html[dir="rtl"] .privacy-scrim { transform: scaleX(-1); }
.privacy-inner {
  position: relative;
  z-index: 1;
  color: var(--paper);
  padding-block: clamp(56px, 9vh, 96px);
}
.privacy .overline { color: var(--sky-300, #8fc3de); }
.privacy .dot { background: #8fc3de; animation: none; }
.privacy .h2 { color: var(--paper); }
.priv-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
}
.priv-item { border-top: 1px solid rgba(246, 244, 238, 0.22); padding-top: 18px; }
.priv-item h3 { font-size: 17px; margin-bottom: 8px; }
.priv-item p { font-size: 14.5px; color: rgba(246, 244, 238, 0.72); }

/* ---------- cta + footer ---------- */

.cta { text-align: center; padding-block: clamp(64px, 11vh, 120px); position: relative; isolation: isolate; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(assets/map-texture.jpg) center / cover no-repeat;
  opacity: 0.16;
  filter: saturate(0.7);
}
.cta .h2 { margin-inline: auto; }
.cta p { color: var(--ink-2); margin: 14px 0 30px; }
.cta .hero-actions { justify-content: center; }

.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 28px;
  padding-inline: max(clamp(20px, 5vw, 48px), calc((100% - var(--wrap)) / 2 + clamp(20px, 5vw, 48px)));
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
}
.footer p { margin: 0; }
/* center the copyright in the space between logo (start) and links (end) — direction-proof:
   the old margin-inline-start:auto on .foot-links collapsed in RTL (start/end flip) */
.footer .num { margin-inline: auto; }
.foot-links { display: flex; align-items: center; gap: 18px; }
.foot-links a { text-decoration: none; color: var(--ink-2); font-weight: 600; }
.foot-links a:hover { color: var(--accent-deep); }
.lang-foot { padding: 4px 12px; font-size: 13px; }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .m-route, .m-veh-halo, .chip-dot, .dot { animation: none; stroke-dashoffset: 0; }
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-wide { grid-column: span 2; }
  .priv-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topnav { display: none; }
  .menu-btn { display: inline-flex; }
  .btn-login { display: none; }
  .mobile-nav { display: flex; visibility: hidden; opacity: 0; transform: translateX(-50%) translateY(-8px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s; }
  .mobile-nav.open { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
  .hero { padding-block: 120px 64px; }
  .float-chip { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; gap: 28px; }
  .ledger-head, .ledger-row { grid-template-columns: 1fr; gap: 4px; }
  .ledger-head span:last-child { display: none; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .tile-wide { grid-column: span 1; }
  .topbar { gap: 8px; padding-inline: 14px; }
  .topbar-actions { margin-inline-start: auto; gap: 6px; }
  .brand img { width: 112px; height: auto; }
  .lang { padding: 6px 10px; font-size: 13px; }
  .topbar .btn-primary { display: none; } /* the CTA lives in the sheet + hero */
  .btn-sm { padding: 8px 14px; font-size: 13.5px; }
}

/* ---------- rtl ---------- */

html[dir="rtl"] .topnav { margin-inline: auto; }
html[dir="rtl"] .trust li::before { transform: scaleX(-1); }
html[dir="rtl"] .addr-arrow { transform: scaleX(-1); }
