/* ─────────────────────────────────────────────────────────────────────────────────────────────────────
   QiMAP website — design tokens + layout.
   Palette and rationale: QiMap-Docs design/brand-palette-2026-09-22.md (Discord study → QiMAP ramp).
   Rule of thumb: the electric blue lives in the CANVAS (gradients, glows), gold is the BRAND ACCENT
   (never gold text on white), text on the canvas is white / tinted white, cards are glass.
   ───────────────────────────────────────────────────────────────────────────────────────────────────── */

@font-face { font-family: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/cairo-latin.woff2?v=7f3af9c") 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: "Cairo"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("../fonts/cairo-arabic.woff2?v=7f3af9c") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }

:root {
  /* canvas — the console's night navies (base.html tokens), hue 216–222° */
  --q-canvas: #0a1220;
  --q-navy-900: #0b1220;      /* --hx-bg night */
  --q-navy-800: #0f1a2b;      /* --sidebar-bg night */
  --q-card: #121a2c;          /* --hx-card */
  --q-card-2: #172238;        /* --hx-card-2 */
  --q-card-3: #1d2b47;        /* --hx-card-3 */
  /* blue — two jobs, like Carbon's link-primary / link-inverse and Apple's light / dark system blue:
     #2563eb / #1d4ed8 are for LIGHT surfaces and for gradient stops; anything blue that sits ON the dark
     canvas (text, lines, icons, secondary fills) uses #60a5fa (7.4:1 on #0a1220) with navy ink. */
  --q-blue-700: #1d4ed8;      /* --hx-blue-2 day — gradient hot stop */
  --q-blue: #2563eb;          /* --hx-blue day — fills on light surfaces only */
  --q-blue-500: #3b82f6;      /* --hx-blue-2 night */
  --q-blue-400: #60a5fa;      /* --hx-blue night — THE blue on dark: links, rings, secondary fills */
  --q-blue-300: #93c5fd;      /* --hx-link-hover night — hover of the above */
  --q-sky: #bfdbfe;           /* --hx-blue-text night — tinted labels */
  --q-blue-ink: #0b1220;      /* text on a #60a5fa fill (7.4:1) */
  /* brand accent */
  --q-gold: #f5c518;
  --q-gold-2: #ffd84d;
  --q-gold-ink: #0b1220;
  /* neutrals */
  --q-ink: #111e2e;
  --q-white: #ffffff;
  --q-text: #f3f6fb;          /* --hx-ink night */
  --q-text-2: #a7b3c9;        /* --hx-ink-2 night */
  --q-text-3: #8b98b0;        /* muted, still 4.5:1 on the hot stop */
  /* glass */
  --q-glass: rgba(255, 255, 255, .06);
  --q-glass-2: rgba(255, 255, 255, .10);
  --q-glass-line: rgba(148, 163, 184, .22);   /* --hx-line-2 night family */
  /* type */
  --q-font: "Cairo", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Arabic", Arial, sans-serif;
  --q-radius-xl: 40px;
  --q-radius-lg: 28px;
  --q-radius: 12px;
  --q-container: 1240px;
  --q-nav-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--q-font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--q-text);
  background: var(--q-canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The page canvas: Discord's dark → deep → hot → deep → dark arc, but in the console's own navies with the
   console blue (#2563eb) as the hot stop — CSS gradients only, no texture images. */
.canvas { position: relative; isolation: isolate; }
.canvas::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% 12%, rgba(37, 99, 235, .45), transparent 62%),
    radial-gradient(900px 600px at 8% 45%, rgba(29, 78, 216, .5), transparent 60%),
    radial-gradient(1000px 700px at 90% 78%, rgba(29, 43, 71, .9), transparent 62%),
    linear-gradient(180deg, var(--q-canvas) 0%, var(--q-navy-800) 12%, var(--q-card-3) 30%, var(--q-blue-700) 50%, var(--q-card-3) 70%, var(--q-navy-800) 88%, var(--q-canvas) 100%);
}
/* sparkles — tiny white dots, static (no motion) */
.canvas::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 8%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 32% 22%, #fff 60%, transparent 61%),
    radial-gradient(2px 2px at 71% 6%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 88% 30%, #fff 60%, transparent 61%),
    radial-gradient(1.5px 1.5px at 56% 41%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 18% 63%, #fff 60%, transparent 61%),
    radial-gradient(2px 2px at 44% 77%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 80% 58%, #fff 60%, transparent 61%),
    radial-gradient(1.5px 1.5px at 93% 91%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 6% 94%, #fff 60%, transparent 61%);
  background-size: 1100px 1100px;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--q-gold); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; max-width: 100%; }
.container { width: min(var(--q-container), 100% - 48px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.notfound { min-height: 100svh; }
.notfound .mark { margin: 0 auto 24px; }
.skip-link { position: absolute; top: -100px; inset-inline-start: 16px; z-index: 100; background: var(--q-gold); color: var(--q-gold-ink); padding: 12px 20px; border-radius: var(--q-radius); font-weight: 600; }
.skip-link:focus { top: 16px; }

/* ── Display type: Cairo 800/900 (the mini-app's family — SuperQi's Arabic UI font), tight leading, uppercase in Latin (Arabic has no case) ── */
.display { font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: .92; margin: 0; }
html[lang="ar"] .display { text-transform: none; letter-spacing: 0; line-height: 1.15; font-weight: 800; }
.display-1 { font-size: clamp(38px, 5.4vw, 72px); }
.display-2 { font-size: clamp(30px, 3.1vw, 44px); }
.display-3 { font-size: clamp(28px, 2.8vw, 40px); }
.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.45; color: var(--q-text-2); margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--q-gold); margin-bottom: 14px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 3px; background: var(--q-gold); border-radius: 2px; }

/* ── Buttons — 12px radius, 16–18px text; gold primary with navy ink (console rule), blue secondary ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 14px 26px; border-radius: var(--q-radius); font: inherit; font-size: 18px; font-weight: 500; line-height: 1.2; cursor: pointer; border: 0; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--q-gold); color: var(--q-gold-ink); font-weight: 600; box-shadow: 0 10px 30px -14px rgba(245, 197, 24, .6); }
.btn-gold:hover { background: var(--q-gold-2); color: var(--q-gold-ink); }
.btn-blue { background: var(--q-blue-400); color: var(--q-blue-ink); font-weight: 600; }
.btn-blue:hover { background: var(--q-blue-300); color: var(--q-blue-ink); }
.btn-ghost { background: var(--q-glass); color: var(--q-text); border: 1px solid var(--q-glass-line); }
.btn-ghost:hover { background: var(--q-glass-2); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 16px; border-radius: 16px; }
.btn .ico { width: 20px; height: 20px; flex: none; }

/* ── Nav: transparent over the hero, 80px ── */
.nav { position: absolute; top: 0; inset-inline: 0; height: var(--q-nav-h); z-index: 20; display: flex; align-items: center; }
.nav .container { display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.brand img, .brand svg { width: 36px; height: 36px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: 16px; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { display: inline-block; padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 16px; color: var(--q-text); }
.nav-links a:hover { background: var(--q-glass); text-decoration: underline; text-underline-offset: 4px; }
.nav-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--q-glass-line); border-radius: 16px; overflow: hidden; background: var(--q-glass); }
.lang button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 12px; border: 0; background: transparent; color: var(--q-text-2); cursor: pointer; min-width: 44px; }
.lang button[aria-pressed="true"] { background: var(--q-gold); color: var(--q-gold-ink); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--q-glass-line); background: var(--q-glass); color: var(--q-text); cursor: pointer; align-items: center; justify-content: center; }

/* ── Hero ── */
.hero { position: relative; padding: calc(var(--q-nav-h) + 56px) 0 72px; min-height: 100svh; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-copy { max-width: 620px; }
.hero-copy .lede { margin-top: 22px; max-width: 540px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--q-text-3); }
.hero-art { position: relative; min-height: 520px; }

/* ── Feature cards: glass, r=40, alternating media/copy ── */
.features { padding: 20px 0 40px; display: grid; gap: 40px; }
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px; border-radius: var(--q-radius-xl); background: var(--q-glass); border: 1px solid var(--q-glass-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .6); }
.feature.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.feature.reverse .media { order: 2; }
.feature .copy { padding: 16px 24px; }
.feature .copy p { margin: 16px 0 0; font-size: 19px; line-height: 1.45; color: var(--q-text-2); }
.feature .copy .display-2 { text-wrap: balance; }
.media { position: relative; min-height: 420px; border-radius: 32px; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 28px; }
/* media panels: navy → console blue at different depths; one gold panel for the brand section */
.media-blue { background: linear-gradient(160deg, #0a1220 0%, #1d2b47 50%, #2563eb 100%); }
.media-blue-2 { background: linear-gradient(160deg, #0a1220 0%, #172238 45%, #1d4ed8 100%); }
.media-sky { background: linear-gradient(160deg, #0f1a2b 0%, #1d2b47 40%, #3b82f6 100%); }
.media-gold { background: linear-gradient(160deg, #0a1220 0%, #1d2b47 45%, #f5c518 100%); }
.media-navy { background: linear-gradient(160deg, #0a1220 0%, #121a2c 55%, #26365a 100%); }
.media-deep { background: linear-gradient(200deg, #1d4ed8 0%, #172238 45%, #0a1220 100%); }

/* product mocks (pure CSS/SVG, no real data) — night console cards: #121a2c / #172238 / #1d2b47 */
.mock { background: var(--q-card); color: var(--q-text); border: 1px solid var(--q-glass-line); border-radius: 18px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8); overflow: hidden; }
.mock-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--q-glass-line); font-size: 13px; font-weight: 600; color: var(--q-text-2); }
.mock-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--q-card-3); }
.mock-head .dot.on { background: var(--q-gold); }
.mock-search { width: min(360px, 100%); }
.mock-search .field { margin: 14px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--q-card-2); border: 1px solid var(--q-glass-line); font-size: 15px; color: var(--q-text-2); }
.mock-search .field b { color: var(--q-text); }
.mock-list { list-style: none; margin: 0; padding: 0 14px 14px; display: grid; gap: 8px; }
.mock-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--q-card-2); font-size: 14px; }
.mock-list .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(96, 165, 250, .16); color: var(--q-blue-400); font-weight: 800; }
.mock-list .name { font-weight: 600; color: var(--q-text); }
.mock-list .sub { display: block; font-size: 12px; color: var(--q-text-2); font-weight: 400; }
.mock-list .dist { font-size: 12px; color: var(--q-text-2); font-variant-numeric: tabular-nums; }
.mock-route { width: min(380px, 100%); }
.mock-route .modes { display: flex; gap: 8px; padding: 14px 14px 0; }
.mock-route .mode { flex: 1; padding: 10px; border-radius: 12px; text-align: center; font-size: 13px; font-weight: 600; background: var(--q-card-2); color: var(--q-text-2); }
.mock-route .mode.on { background: var(--q-gold); color: var(--q-gold-ink); }
.mock-route .route-steps { list-style: none; margin: 0; padding: 14px; display: grid; gap: 10px; font-size: 14px; }
.mock-route .route-steps li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; }
.mock-route .route-steps .n { width: 26px; height: 26px; border-radius: 50%; background: var(--q-blue-400); color: var(--q-blue-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.mock-route .route-steps .n.end { background: var(--q-gold); color: var(--q-gold-ink); }
.mock-route .eta { margin: 0 14px 14px; padding: 12px 14px; border-radius: 12px; background: rgba(96, 165, 250, .14); color: var(--q-sky); font-weight: 700; display: flex; justify-content: space-between; font-size: 15px; }
.mock-share { width: min(340px, 100%); }
.mock-share .place { display: flex; gap: 12px; padding: 14px; align-items: center; }
.mock-share .thumb { width: 56px; height: 56px; border-radius: 14px; background: var(--q-navy-900); border: 1px solid var(--q-glass-line); display: grid; place-items: center; }
.mock-share .place b { display: block; font-size: 15px; }
.mock-share .place span { font-size: 13px; color: var(--q-text-2); }
.mock-share .link { margin: 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--q-navy-900); border: 1px solid var(--q-glass-line); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--q-sky); direction: ltr; text-align: left; }
.mock-share .apps { display: flex; gap: 10px; padding: 14px; }
.mock-share .apps span { flex: 1; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.mock-share .apps .app-wa { background: #25d366; color: var(--q-blue-ink); } .mock-share .apps .app-tg { background: var(--q-blue-400); color: var(--q-blue-ink); } .mock-share .apps .app-copy { background: var(--q-card-3); }
.mock-community { width: min(400px, 100%); }
.mock-community .review { padding: 14px; display: grid; gap: 10px; border-bottom: 1px solid var(--q-glass-line); }
.mock-community .who { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.mock-community .who b { display: block; font-size: 14px; }
.mock-community .who span:not(.avatar) { display: block; font-size: 12px; color: var(--q-text-2); }
.mock-community .avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--q-blue-400); color: var(--q-blue-ink); font-weight: 800; flex: none; }
.mock-community .stars { color: var(--q-gold); letter-spacing: 2px; font-size: 16px; }
.mock-community .review p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--q-text); }
.mock-community .points { justify-self: start; padding: 4px 10px; border-radius: 999px; background: var(--q-gold); color: var(--q-gold-ink); font-size: 12px; font-weight: 700; }
.mock-community .reports { list-style: none; margin: 0; padding: 10px 14px 14px; display: grid; gap: 8px; }
.mock-community .reports li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--q-card-2); font-size: 13px; }
.mock-community .reports .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.mock-community .reports .ic.warn { background: rgba(251, 191, 36, .18); color: #fde68a; }
.mock-community .reports .ic.new { background: rgba(96, 165, 250, .18); color: var(--q-blue-400); }
.mock-community .reports .votes { font-size: 12px; color: var(--q-text-2); }
.mock-code { width: min(400px, 100%); max-width: 100%; box-sizing: border-box; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; background: var(--q-navy-900); color: var(--q-sky); border: 1px solid var(--q-glass-line); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.7; padding: 18px 20px; border-radius: 18px; direction: ltr; text-align: left; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8); }
.mock-code .k { color: var(--q-gold); } .mock-code .c { color: var(--q-text-3); } .mock-code .s { color: var(--q-blue-300); }
.chips { display: flex; flex-direction: column; gap: 12px; width: min(360px, 100%); }
.chip { background: var(--q-card); color: var(--q-text); border: 1px solid var(--q-glass-line); border-radius: 16px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .8); }
.chip small { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--q-text-2); text-transform: uppercase; }

/* ── Marquee band ── */
.marquee { padding: 36px 0; margin: 40px 0; background: rgba(10, 18, 32, .6); border-block: 1px solid var(--q-glass-line); overflow: hidden; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; font-weight: 900; font-size: clamp(28px, 3.4vw, 48px); text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
html[lang="ar"] .marquee-track span { text-transform: none; font-weight: 800; }
.marquee-track svg { width: 40px; height: 40px; flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html[dir="rtl"] .marquee-track { animation-direction: reverse; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ── Closing CTA ── */
.cta { text-align: center; padding: 60px 0 40px; }
.cta .display-1 { font-size: clamp(32px, 4.4vw, 60px); text-wrap: balance; }
.cta .lede { margin: 20px auto 0; max-width: 620px; }
.cta .btn { margin-top: 30px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 44px auto 0; max-width: 980px; text-align: start; }
.step { padding: 22px 24px; border-radius: var(--q-radius-lg); background: var(--q-glass); border: 1px solid var(--q-glass-line); }
.step b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--q-gold); color: var(--q-gold-ink); font-weight: 800; margin-bottom: 12px; }
.step p { margin: 0; color: var(--q-text-2); font-size: 16px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.cta-stores { margin: 18px 0 0; color: var(--q-text-2); font-size: 16px; }
.cta-stores a { color: var(--q-blue-400); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.cta-stores a:hover { color: var(--q-blue-300); }

/* ── "Open QiMAP in SuperQi" dialog: store links + how to find QiMAP inside SuperQi ──
   data-os (site.js, from the UA) puts the visitor's own store first and paints it gold; the other stays glass. */
.get { border: 0; padding: 0; background: transparent; color: var(--q-text); width: min(760px, 100% - 32px); max-height: calc(100dvh - 32px); margin: auto; overflow: visible; }
.get::backdrop { background: rgba(10, 18, 32, .8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.get[open] { animation: get-in .4s cubic-bezier(.2, .8, .2, 1); }
.get[open]::backdrop { animation: get-fade .3s ease; }
@keyframes get-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes get-fade { from { opacity: 0; } }
html.has-dialog { overflow: hidden; }
.get-card { position: relative; padding: 36px 36px 28px; border-radius: var(--q-radius-lg); background: var(--q-card); border: 1px solid var(--q-glass-line); box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06); max-height: calc(100dvh - 32px); overflow: auto; }
.get-close { position: absolute; top: 16px; inset-inline-end: 16px; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--q-glass-line); background: var(--q-glass); color: var(--q-text); cursor: pointer; display: grid; place-items: center; }
.get-close:hover { background: var(--q-glass-2); }
.get-close svg { width: 20px; height: 20px; }
.get-head { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; padding-inline-end: 52px; }
.get-head img { width: 56px; height: 56px; }
.get-head .eyebrow { margin-bottom: 8px; }
.get-head .display-3 { font-size: clamp(24px, 2.6vw, 34px); }
.get-lede { margin: 12px 0 0; color: var(--q-text-2); font-size: 17px; line-height: 1.5; }
.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.store { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 18px; border-radius: 18px; background: var(--q-glass); border: 1px solid var(--q-glass-line); color: var(--q-text); text-decoration: none; transition: transform .15s ease, background-color .15s ease; }
.store:hover { transform: translateY(-1px); background: var(--q-glass-2); text-decoration: none; }
.store svg { width: 28px; height: 28px; flex: none; color: var(--q-blue-400); }
.store span { display: grid; line-height: 1.2; }
.store small { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--q-text-2); }
html[lang="ar"] .store small { letter-spacing: 0; }
.store b { font-size: 17px; font-weight: 700; }
.get[data-os="android"] .store-android, .get[data-os="ios"] .store-ios { background: var(--q-gold); border-color: var(--q-gold); color: var(--q-gold-ink); order: -1; }
.get[data-os="android"] .store-android:hover, .get[data-os="ios"] .store-ios:hover { background: var(--q-gold-2); }
.get[data-os="android"] .store-android svg, .get[data-os="ios"] .store-ios svg, .get[data-os="android"] .store-android small, .get[data-os="ios"] .store-ios small { color: var(--q-gold-ink); }
.get-desktop { display: none; margin: 14px 0 0; color: var(--q-text-3); font-size: 15px; }
.get[data-os="any"] .get-desktop { display: block; }
.get-guide { display: grid; grid-template-columns: 1fr 200px; gap: 24px; align-items: center; margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--q-glass-line); }
.guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.guide li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; }
.guide li > b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--q-gold); color: var(--q-gold-ink); font-weight: 800; font-size: 15px; }
.guide h3 { margin: 4px 0 4px; font-size: 17px; }
.guide p { margin: 0; color: var(--q-text-2); font-size: 15px; line-height: 1.5; }
.guide p b { color: var(--q-text); }
/* a SuperQi home screen in miniature: the Mini apps grid with QiMAP ringed */
.guide-mock { position: relative; padding: 14px 14px 30px; border-radius: 22px; background: var(--q-card-2); border: 1px solid var(--q-glass-line); }
.gm-bar { display: flex; justify-content: space-between; margin-bottom: 14px; }
.gm-bar span { height: 8px; border-radius: 4px; background: var(--q-card-3); }
.gm-bar span:first-child { width: 42%; } .gm-bar span:last-child { width: 18%; }
.gm-title { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: var(--q-text-2); }
.gm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gm-tile { aspect-ratio: 1; border-radius: 12px; background: var(--q-card-3); }
.gm-qimap { position: relative; display: grid; place-items: center; background: var(--q-navy-900); outline: 3px solid var(--q-gold); outline-offset: 2px; }
.gm-qimap img { width: 60%; height: 60%; }
.gm-qimap i { position: absolute; top: calc(100% + 5px); font-style: normal; font-size: 9px; font-weight: 700; color: var(--q-text); }
.gm-hint { position: absolute; bottom: 8px; inset-inline: 0; margin: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--q-gold); }
.get-note { margin: 22px 0 0; text-align: center; color: var(--q-text-3); font-size: 14px; }

/* ── Footer: the canvas navy, columns, giant wordmark ── */
.footer { background: var(--q-canvas); padding: 72px 0 0; margin-top: 60px; position: relative; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer h3 { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--q-blue-400); margin: 0 0 14px; }
html[lang="ar"] .footer h3 { letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer li a { color: var(--q-text-2); font-size: 16px; }
.footer li a:hover { color: var(--q-text); text-decoration: underline; text-underline-offset: 4px; }
.footer .brand { font-size: 24px; }
.footer .tag { margin: 16px 0 0; color: var(--q-text-3); font-size: 15px; max-width: 320px; }
.footer .lang { margin-top: 18px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--q-glass-line); color: var(--q-text-3); font-size: 14px; }
.wordmark { margin-top: 24px; display: block; width: 100%; height: auto; }

/* ── Illustration bits (hero) ── */
.phone { position: absolute; inset-inline-end: 6%; top: 0; width: min(300px, 46%); aspect-ratio: 9 / 19; border-radius: 40px; background: var(--q-navy-900); padding: 12px; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), inset 0 0 0 2px rgba(148, 163, 184, .26); transform: rotate(-4deg); }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: var(--q-card-2); container-type: inline-size; }
.phone .screen svg.map { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ── The phone demo: one looping scene driven by data-phase (site.js), drawn by CSS ──
   0 idle → 1 typing → 2 results → 3 place card + pin → 4 route drawn + ETA → 5/6 mode switch → back to 0 */
.ui-search { position: absolute; top: 4.2%; inset-inline: 6%; height: 8%; display: flex; align-items: center; gap: 3.5cqw; padding: 0 4.5cqw; border-radius: 5cqw; background: var(--q-card); border: 1px solid var(--q-glass-line); color: var(--q-text-2); font-size: 4.6cqw; font-weight: 500; }
.ui-search svg { width: 5.6cqw; height: 5.6cqw; flex: none; }
.ui-search .typed { color: var(--q-text); white-space: nowrap; overflow: hidden; }
.ui-search .caret { width: 2px; height: 4.8cqw; background: var(--q-gold); border-radius: 1px; opacity: 0; animation: caret 1s steps(2) infinite; }
.scene[data-phase="1"] .ui-search .caret { opacity: 1; }
@keyframes caret { to { visibility: hidden; } }
.ui-results { position: absolute; top: 14%; inset-inline: 6%; margin: 0; padding: 0; list-style: none; display: grid; gap: 2cqw; opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.ui-results li { display: grid; grid-template-columns: 9cqw 1fr auto; gap: 3cqw; align-items: center; padding: 2.6cqw 3.2cqw; border-radius: 4cqw; background: rgba(18, 26, 44, .94); border: 1px solid var(--q-glass-line); font-size: 3.9cqw; opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease, background-color .3s; }
.ui-results li:nth-child(2) { transition-delay: .08s; } .ui-results li:nth-child(3) { transition-delay: .16s; }
.ui-results .ic { width: 9cqw; height: 9cqw; border-radius: 2.6cqw; display: grid; place-items: center; background: rgba(96, 165, 250, .16); color: var(--q-blue-400); font-weight: 800; font-size: 3.4cqw; }
.ui-results b { display: block; font-size: 3.9cqw; color: var(--q-text); }
.ui-results small { display: block; font-size: 3.1cqw; color: var(--q-text-2); }
.ui-results em { font-style: normal; font-size: 3.2cqw; color: var(--q-text-2); font-variant-numeric: tabular-nums; }
.scene[data-phase="2"] .ui-results { opacity: 1; transform: none; }
.scene[data-phase="2"] .ui-results li { opacity: 1; transform: none; }
.scene[data-phase="2"] .ui-results li.hit { background: rgba(96, 165, 250, .22); border-color: rgba(96, 165, 250, .5); }
.ui-card { position: absolute; inset-inline: 0; bottom: 0; padding: 5cqw 6cqw 6cqw; border-radius: 9cqw 9cqw 0 0; background: var(--q-card); box-shadow: 0 -20px 50px -30px rgba(0, 0, 0, .8); transform: translateY(105%); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.ui-card b { display: block; font-size: 5.2cqw; color: var(--q-text); }
.ui-card small { display: block; margin-top: 1.4cqw; font-size: 3.5cqw; color: var(--q-text-2); }
.ui-actions { display: flex; gap: 3cqw; margin-top: 4.5cqw; }
.ui-actions span { flex: 1; text-align: center; padding: 3.4cqw 0; border-radius: 3.6cqw; font-size: 3.9cqw; font-weight: 700; }
.ui-actions .a-gold { background: var(--q-gold); color: var(--q-gold-ink); }
.ui-actions .a-blue { background: var(--q-blue-400); color: var(--q-blue-ink); }
.scene[data-phase="3"] .ui-card, .scene[data-phase="4"] .ui-card, .scene[data-phase="5"] .ui-card, .scene[data-phase="6"] .ui-card { transform: none; }
.scene[data-phase="4"] .ui-actions .a-gold, .scene[data-phase="5"] .ui-actions .a-gold, .scene[data-phase="6"] .ui-actions .a-gold { box-shadow: 0 0 0 3px rgba(245, 197, 24, .35); }
/* routes: one <g class="route" data-r=car|moto|walk> per real engine route (scripts/build-hero-map.mjs). Hidden until phase 4;
   the group matching data-mode fades in and its line draws itself along the streets (pathLength=1000 = fixed dash budget),
   so a mode switch fades the old line and draws the new one. Walk is a dashed line revealed through a mask drawn the same way. */
.route { opacity: 0; transition: opacity .25s ease; }
.route-line, .route-reveal { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 1.4s ease-in-out; }
.route-dots { stroke-dasharray: 0 1000; transition: stroke-dasharray .2s 1.3s; }
.route-walk { stroke-dasharray: .1 13; }
.scene:is([data-phase="4"], [data-phase="5"], [data-phase="6"]) :is([data-mode="car"] .route[data-r="car"], [data-mode="moto"] .route[data-r="moto"], [data-mode="walk"] .route[data-r="walk"]) { opacity: 1; }
.scene:is([data-phase="4"], [data-phase="5"], [data-phase="6"]) :is([data-mode="car"] .route[data-r="car"], [data-mode="moto"] .route[data-r="moto"], [data-mode="walk"] .route[data-r="walk"]) :is(.route-line, .route-reveal) { stroke-dashoffset: 0; }
.scene:is([data-phase="4"], [data-phase="5"], [data-phase="6"]) :is([data-mode="car"] .route[data-r="car"], [data-mode="moto"] .route[data-r="moto"]) .route-dots { stroke-dasharray: 1 14; }
/* "me" and the pin sit inside <g transform="translate(…)"> anchors, so these transforms are relative to their own point */
.me-ring { transform-origin: 0 0; animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
.pin { transform-origin: 0 0; transform: translateY(-40px) scale(.6); opacity: 0; transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), opacity .25s; }
.scene[data-phase="3"] .pin, .scene[data-phase="4"] .pin, .scene[data-phase="5"] .pin, .scene[data-phase="6"] .pin { transform: none; opacity: 1; }
.float-card { position: absolute; background: var(--q-card); color: var(--q-text); border: 1px solid var(--q-glass-line); border-radius: 18px; padding: 14px 16px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9); font-size: 14px; opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1); }
.float-card.show { opacity: 1; transform: none; animation: floaty 6s ease-in-out infinite; }
.float-b.show { animation-delay: -3s; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.float-card b { display: block; font-size: 16px; }
.float-card .row { display: flex; gap: 8px; align-items: center; margin-top: 8px; color: var(--q-text-2); font-size: 13px; }
.float-card .pill { background: var(--q-gold); color: var(--q-gold-ink); padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.float-a { inset-inline-start: 2%; top: 56px; width: 250px; }
.float-b { inset-inline-start: 12%; bottom: 20px; width: 260px; }
.float-b .modes { display: flex; gap: 6px; margin-top: 10px; }
.float-b .modes button { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; border: 0; background: var(--q-card-2); font: inherit; font-size: 12px; font-weight: 600; color: var(--q-text-2); cursor: pointer; transition: background-color .2s, color .2s; }
.float-b .modes button.on { background: var(--q-blue-400); color: var(--q-blue-ink); }
.eta-title, .eta-via { transition: opacity .2s; }
.float-b.swap .eta-title, .float-b.swap .eta-via { opacity: 0; }

/* ── Scroll reveals (only when JS runs: html.js) ── */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .feature .media .mock, html.js .feature .media .chips, html.js .feature .media .mock-code { transform: translateY(18px) scale(.98); opacity: 0; transition: transform .8s .15s cubic-bezier(.2, .7, .2, 1), opacity .6s .15s ease; }
html.js .feature.in .media .mock, html.js .feature.in .media .chips, html.js .feature.in .media .mock-code { transform: none; opacity: 1; }

/* ── Mock micro-interactions ── */
.mock-search .field .q b { font-weight: 600; }
.mock-search .field .caret { width: 2px; height: 16px; margin-inline-start: 2px; background: var(--q-gold); border-radius: 1px; animation: caret 1s steps(2) infinite; }
.mock-list li { transition: opacity .35s ease, transform .35s ease; }
.mock-list.typing li { opacity: .4; }
.mock-list.swap li { opacity: 0; transform: translateY(8px); transition: none; }
.mock-list li:nth-child(2) { transition-delay: .07s; } .mock-list li:nth-child(3) { transition-delay: .14s; }
.mock-route .mode { border: 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s, transform .15s; }
.mock-route .mode:hover { transform: translateY(-1px); }
.mock-route .route-steps li, .mock-route .eta { transition: opacity .3s ease, transform .3s ease; }
.mock-route.swap .route-steps li, .mock-route.swap .eta { opacity: 0; transform: translateY(6px); }
.mock-route .route-steps li:nth-child(2) { transition-delay: .06s; } .mock-route .route-steps li:nth-child(3) { transition-delay: .12s; } .mock-route .route-steps li:nth-child(4) { transition-delay: .18s; }
.mock-share .link { position: relative; overflow: hidden; }
.mock-share .link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(147, 197, 253, .18) 50%, transparent 70%); transform: translateX(-120%); animation: sheen 5s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 90%, 100% { transform: translateX(120%); } }
.mock-share .apps button { border: 0; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background-color .2s, color .2s, transform .15s; }
.mock-share .apps button.done { background: var(--q-gold); color: var(--q-gold-ink); }
.mock-share .apps button:active { transform: scale(.97); }
.mock-community .stars i { display: inline-block; font-style: normal; opacity: .25; transform: scale(.7); transition: opacity .3s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.mock-community .stars.lit i { opacity: 1; transform: none; }
.mock-community .stars.lit i:nth-child(2) { transition-delay: .1s; } .mock-community .stars.lit i:nth-child(3) { transition-delay: .2s; } .mock-community .stars.lit i:nth-child(4) { transition-delay: .3s; } .mock-community .stars.lit i:nth-child(5) { transition-delay: .4s; }
.mock-community .points { font-variant-numeric: tabular-nums; }
.mock-community button.votes { border: 0; background: var(--q-card-3); color: var(--q-text-2); font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; transition: background-color .2s, color .2s, transform .15s; }
.mock-community button.votes:hover { color: var(--q-text); }
.mock-community button.votes.bump { transform: scale(1.08); background: rgba(74, 222, 128, .18); color: #86efac; }
.mock-code .ln { display: block; min-height: 1.7em; }
html.js .mock-code .ln { opacity: 0; transform: translateX(-6px); transition: opacity .35s ease, transform .35s ease; }
html.js .mock-code.in .ln { opacity: 1; transform: none; }
html.js .mock-code.in .ln:nth-child(1) { transition-delay: .05s; } html.js .mock-code.in .ln:nth-child(2) { transition-delay: .15s; } html.js .mock-code.in .ln:nth-child(3) { transition-delay: .3s; } html.js .mock-code.in .ln:nth-child(4) { transition-delay: .45s; }
html.js .mock-code.in .ln:nth-child(5) { transition-delay: .95s; } html.js .mock-code.in .ln:nth-child(6) { transition-delay: 1.05s; } html.js .mock-code.in .ln:nth-child(7) { transition-delay: 1.15s; } html.js .mock-code.in .ln:nth-child(8) { transition-delay: 1.25s; }
html.js .mock-code.in .ln:nth-child(9) { transition-delay: 1.35s; } html.js .mock-code.in .ln:nth-child(10) { transition-delay: 1.45s; } html.js .mock-code.in .ln:nth-child(11) { transition-delay: 1.55s; } html.js .mock-code.in .ln:nth-child(12) { transition-delay: 1.65s; }
html.js .mock-code.in .ln:nth-child(13) { transition-delay: 1.9s; } html.js .mock-code.in .ln:nth-child(14) { transition-delay: 2.0s; } html.js .mock-code.in .ln:nth-child(15) { transition-delay: 2.1s; }
.mock-code .status { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(74, 222, 128, .16); color: #86efac; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }

/* ── Canvas glow follows the pointer (desktop; --gx/--gy set by site.js through the CSSOM) ── */
.canvas::before { transform: translate(var(--gx, 0px), var(--gy, 0px)) scale(1.04); transition: transform .6s cubic-bezier(.2, .7, .2, 1); will-change: transform; }

/* ── Motion off: final states, no loops ── */
@media (prefers-reduced-motion: reduce) {
  .me-ring, .ui-search .caret, .mock-search .field .caret, .mock-share .link::after, .float-card.show, .get[open], .get[open]::backdrop { animation: none; }
  .route, .route-line, .route-reveal, .route-dots, .pin, .ui-card, .ui-results, .ui-results li, .float-card, .mock-list li, .mock-route .route-steps li, .mock-route .eta, .mock-community .stars i, .mock-code .ln, .canvas::before, html.js .reveal, html.js .feature .media .mock, html.js .feature .media .chips, html.js .feature .media .mock-code { transition: none !important; }
  .scene .route-line, .scene .route-reveal { stroke-dashoffset: 0; } .scene .route-dots { stroke-dasharray: 1 14; } .scene .pin { transform: none; opacity: 1; }
  .scene .ui-card { transform: none; } .scene .ui-results { display: none; } .float-card { opacity: 1; transform: none; }
  .mock-community .stars i { opacity: 1; transform: none; }
  html.js .reveal, html.js .feature .media .mock, html.js .feature .media .chips, html.js .feature .media .mock-code, html.js .mock-code .ln { opacity: 1; transform: none; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links { display: grid; position: absolute; top: var(--q-nav-h); inset-inline: 24px; padding: 12px; gap: 4px; background: rgba(10, 18, 32, .97); border: 1px solid var(--q-glass-line); border-radius: 20px; margin: 0; }
  .nav.open .nav-links a { display: block; padding: 12px 16px; font-size: 18px; }
  .hero-grid, .feature, .feature.reverse { grid-template-columns: 1fr; }
  .feature.reverse .media { order: 0; }
  .hero { min-height: 0; padding-bottom: 40px; }
  .hero-art { min-height: 560px; margin-top: 8px; }
  .phone { inset-inline-end: 50%; transform: translateX(50%) rotate(-4deg); width: min(280px, 60%); }
  html[dir="rtl"] .phone { transform: translateX(-50%) rotate(-4deg); }
  .float-a { inset-inline-start: 0; top: 30px; }
  .float-b { inset-inline-start: auto; inset-inline-end: 0; bottom: 20px; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .container { width: calc(100% - 32px); }
  .feature { padding: 16px; gap: 8px; border-radius: 28px; }
  .feature .copy { padding: 12px 8px 8px; }
  .media { min-height: 360px; padding: 18px; border-radius: 22px; }
  .hero-art { min-height: 520px; }
  .float-a, .float-b { width: 210px; }
  .btn { width: 100%; }
  .hero-ctas .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-end .lang { display: none; }
  .get { width: 100%; max-height: 100dvh; margin: auto 0 0; }
  .get-card { border-radius: 28px 28px 0 0; padding: 28px 20px 24px; max-height: 92dvh; }
  .get-head { grid-template-columns: 44px 1fr; gap: 14px; padding-inline-end: 44px; }
  .get-head img { width: 44px; height: 44px; }
  .stores { grid-template-columns: 1fr; }
  .get-guide { grid-template-columns: 1fr; }
  .guide-mock { display: none; }
}
