/* Layout concept: the page follows one ride. A live trip screen opens it,
   then the ride in four steps, then what watches over it, then the captains
   who drive it. The app's own tokens (app/lib/core/theme/app_tokens.dart). */
:root {
  --rose: #e6197d;
  --rose-soft: #ff5fa8;
  --rose-deep: #c2185b;
  --ink: #2a1218;
  --ink-muted: #6b4a54;
  --paper: #ffffff;
  --blush: #fff5f9;
  --blush-2: #fde8f1;
  --line: #f3d9e4;
  --safe: #1fa97a;
  --sos: #d92d20;
  --map-street: #ffffff;
  --map-block: #fbe3ee;
  --shadow: 0 30px 60px -28px rgba(194, 24, 91, 0.45);

  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Poppins", "Segoe UI", system-ui, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.55rem, 1.3rem + 1.2vw, 2.2rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.6vw, 3.4rem);
  --step-4: clamp(3rem, 2rem + 6vw, 6.4rem);

  --radius: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #fdf7f9;
    --ink-muted: #b9a3ab;
    --paper: #241419;
    --blush: #170d10;
    --blush-2: #2b161d;
    --line: #3d2831;
    --safe: #35c795;
    --sos: #f0685d;
    --map-street: #3a222b;
    --map-block: #2b161d;
    --shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #fdf7f9;
  --ink-muted: #b9a3ab;
  --paper: #241419;
  --blush: #170d10;
  --blush-2: #2b161d;
  --line: #3d2831;
  --safe: #35c795;
  --sos: #f0685d;
  --map-street: #3a222b;
  --map-block: #2b161d;
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--blush);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: var(--step-0);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { font-family: var(--font-en); line-height: 1.65; }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--rose-soft); outline-offset: 3px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Header ───────────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--blush) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.brand svg { width: 34px; height: 34px; }
.brand small { font-family: var(--font-en); font-weight: 600; color: var(--ink-muted); font-size: 0.85rem; }
html[lang="en"] .brand small { display: none; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; font-size: var(--step--1); font-weight: 600; }
.nav a { text-decoration: none; color: var(--ink-muted); }
.nav a:hover { color: var(--rose); }
.lang { font-size: var(--step--1); font-weight: 700; text-decoration: none; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; }
.lang:hover { border-color: var(--rose); color: var(--rose); }
@media (max-width: 760px) { .nav { display: none; } .lang { margin-inline-start: auto; } }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { position: relative; padding-block: clamp(36px, 7vw, 88px) clamp(48px, 8vw, 104px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { min-width: 0; display: grid; gap: 22px; }
.eyebrow {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--step--1); font-weight: 700; color: var(--rose-deep);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 4px color-mix(in srgb, var(--safe) 22%, transparent); }
.hero h1 { font-size: var(--step-4); font-weight: 1000; letter-spacing: -0.01em; line-height: 1.05; }
html[lang="en"] .hero h1 { font-weight: 700; letter-spacing: -0.035em; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--rose), var(--rose-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: var(--step-1); color: var(--ink-muted); max-width: 34ch; line-height: 1.7; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--blush); text-decoration: none;
  border-radius: 14px; padding: 10px 20px 10px 18px; min-height: 56px;
}
.store svg { width: 24px; height: 24px; flex: none; }
.store span { display: grid; line-height: 1.2; }
.store small { font-size: 0.72rem; opacity: 0.75; }
.store b { font-size: 1.05rem; font-family: var(--font-en); font-weight: 600; }
.store[aria-disabled="true"] { cursor: default; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; min-height: 56px;
  padding-inline: 22px; border-radius: 14px; font-weight: 700; text-decoration: none;
  border: 1.5px solid var(--line); background: var(--paper);
}
.btn-ghost:hover { border-color: var(--rose); color: var(--rose); }
.btn-ghost .arr { transition: transform .2s; }
html[dir="rtl"] .btn-ghost .arr { transform: scaleX(-1); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 4px 0 0; font-size: var(--step--1); font-weight: 600; color: var(--ink-muted); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts svg { width: 18px; height: 18px; color: var(--rose); flex: none; }

.bloom { position: absolute; inset-inline-end: -12vw; top: -8vw; width: 64vw; max-width: 820px; opacity: 0.09; pointer-events: none; }

/* Phone */
.phone-stage { position: relative; display: grid; justify-items: center; min-width: 0; }
.phone {
  position: relative; width: min(330px, 100%);
  aspect-ratio: 330 / 680; max-width: 100%;
  background: var(--paper); border-radius: 46px; padding: 12px;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--map-block); display: grid; grid-template-rows: auto 1fr auto; }
.status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px 10px; font-size: 0.78rem; font-weight: 700; background: var(--paper);
}
.status .eta { color: var(--rose-deep); }
.map { position: relative; min-height: 0; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sos {
  position: absolute; inset-inline-start: 14px; bottom: 14px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--sos); color: #fff; font-weight: 800; font-size: 0.72rem;
  display: grid; place-items: center; box-shadow: 0 8px 20px -6px var(--sos);
}
.sos::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--sos); opacity: .35; animation: ping 2.4s ease-out infinite; }
.share-pill {
  position: absolute; inset-inline-end: 14px; top: 14px;
  background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: 0.72rem; font-weight: 700;
  display: flex; gap: 6px; align-items: center; box-shadow: 0 6px 16px -8px rgba(0,0,0,.3);
}
.share-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--safe); }
.sheet { background: var(--paper); border-radius: 26px 26px 0 0; padding: 16px 16px 18px; display: grid; gap: 12px; margin-top: -22px; position: relative; }
.captain { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--rose), var(--rose-soft)); }
.captain > span:nth-child(2) { min-width: 0; }
.captain b, .captain small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.captain b { font-size: 0.9rem; }
.captain small { color: var(--ink-muted); font-size: 0.72rem; }
.plate { border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 8px; font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.pin { display: flex; justify-content: space-between; align-items: center; background: var(--blush-2); border-radius: 14px; padding: 10px 14px; }
.pin small { font-size: 0.74rem; color: var(--ink-muted); font-weight: 600; }
.pin .digits { display: flex; gap: 6px; direction: ltr; }
.pin .digits span { width: 30px; height: 36px; display: grid; place-items: center; background: var(--paper); border-radius: 8px; font-weight: 800; font-size: 1.1rem; font-family: var(--font-en); }
.fare { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 700; }
.fare span:last-child { color: var(--ink-muted); }

@keyframes ping { 0% { transform: scale(.85); opacity: .5; } 80%, 100% { transform: scale(1.35); opacity: 0; } }

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phone { width: min(300px, 100%); }
}

/* ── Sections ─────────────────────────────────────────────────────── */
section { padding-block: clamp(56px, 9vw, 112px); }
.kicker { font-size: var(--step--1); font-weight: 800; color: var(--rose); letter-spacing: 0.02em; }
html[lang="en"] .kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; }
.head { display: grid; gap: 12px; max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.head h2 { font-size: var(--step-3); font-weight: 900; }
html[lang="en"] .head h2 { font-weight: 700; letter-spacing: -0.02em; }
.head p { color: var(--ink-muted); font-size: var(--step-1); max-width: 40ch; }

/* The ride, in order */
.ride { background: var(--paper); border-block: 1px solid var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; position: relative; }
.steps li { position: relative; display: grid; gap: 10px; align-content: start; padding-inline-end: clamp(16px, 2.5vw, 32px); }
.steps .n {
  counter-increment: step;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-en); font-weight: 700; color: var(--rose); font-size: 0.9rem;
}
.steps .n::before {
  content: counter(step);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--rose); color: #fff; font-size: 1rem; flex: none;
}
.steps .n::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }
.steps li:last-child .n::after { background: none; }
.steps h3 { font-size: var(--step-1); font-weight: 800; }
.steps p { color: var(--ink-muted); font-size: var(--step--1); line-height: 1.8; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps .n::after { display: none; }
}

/* Safety */
.safety-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.safety-grid article { background: var(--blush); padding: clamp(22px, 3vw, 32px); display: grid; gap: 10px; align-content: start; min-width: 0; }
.safety-grid article.lead { background: var(--ink); color: var(--blush); grid-row: span 3; align-content: space-between; gap: 28px; }
.safety-grid article.lead p { color: color-mix(in srgb, var(--blush) 75%, transparent); }
.safety-grid h3 { font-size: var(--step-1); font-weight: 800; }
.safety-grid p { color: var(--ink-muted); font-size: var(--step--1); line-height: 1.85; }
.ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--blush-2); color: var(--rose); }
.ico svg { width: 22px; height: 22px; }
.lead .sos-big {
  width: 92px; height: 92px; border-radius: 50%; background: var(--sos); color: #fff;
  display: grid; place-items: center; font-weight: 900; font-size: 1.05rem; position: relative;
}
.lead .sos-big::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--sos); opacity: .4; animation: ping 2.4s ease-out infinite; }
.lead h3 { font-size: var(--step-2); }
.police { font-size: var(--step--1); border-top: 1px solid color-mix(in srgb, var(--blush) 20%, transparent); padding-top: 14px; }
.police b { font-family: var(--font-en); font-size: 1.2rem; color: var(--rose-soft); }
@media (max-width: 960px) { .safety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .safety-grid article.lead { grid-row: auto; grid-column: 1 / -1; } }
@media (max-width: 620px) { .safety-grid { grid-template-columns: 1fr; } .safety-grid article.lead { grid-row: auto; } }

/* Price */
.price .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.price .head { margin: 0; }
.bid { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); display: grid; gap: 16px; box-shadow: var(--shadow); min-width: 0; }
.bid-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bid-row small { color: var(--ink-muted); font-weight: 600; font-size: var(--step--1); }
.bid-row b { font-size: var(--step-2); font-weight: 900; font-family: var(--font-en); }
.bid-row b sub { font-size: 0.45em; font-family: var(--font-ar); vertical-align: baseline; margin-inline-start: 4px; color: var(--ink-muted); }
.bar { height: 10px; border-radius: 999px; background: var(--blush-2); position: relative; overflow: hidden; }
.bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 62%; border-radius: inherit; background: linear-gradient(90deg, var(--rose), var(--rose-soft)); }
html[dir="rtl"] .bar i { background: linear-gradient(270deg, var(--rose), var(--rose-soft)); }
.counter { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: var(--blush); border-radius: 16px; padding: 12px 14px; }
.counter .avatar { width: 38px; height: 38px; font-size: 0.85rem; }
.counter p { font-size: var(--step--1); }
.counter p b { color: var(--rose-deep); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 6px 14px; border: 1.5px solid var(--line); }
.chip.on { background: var(--ink); color: var(--blush); border-color: var(--ink); }
@media (max-width: 860px) { .price .wrap { grid-template-columns: 1fr; } }

/* Captains */
.captains { background: linear-gradient(160deg, var(--rose-deep), var(--rose) 55%, var(--rose-soft)); color: #fff; }
.captains .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.captains .kicker { color: #ffd6e8; }
.captains .head p { color: rgba(255,255,255,.85); }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.perks li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.perks li > span:first-child { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; margin-top: 2px; }
.perks svg { width: 16px; height: 16px; }
.perks b { display: block; font-size: var(--step-0); }
.perks small { color: rgba(255,255,255,.82); font-size: var(--step--1); line-height: 1.8; display: block; }
.docs { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); display: grid; gap: 14px; }
.docs h3 { font-size: var(--step-1); }
.docs ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 6px; font-size: var(--step--1); }
.docs .btn-light { justify-self: start; display: inline-flex; align-items: center; min-height: 52px; padding-inline: 22px; border-radius: 14px; background: #fff; color: var(--rose-deep); font-weight: 800; text-decoration: none; }
@media (max-width: 860px) { .captains .wrap { grid-template-columns: 1fr; } }

/* Delivery + city */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 40px); display: grid; gap: 12px; align-content: start; min-width: 0; }
.panel h3 { font-size: var(--step-2); font-weight: 900; }
html[lang="en"] .panel h3 { font-weight: 700; }
.panel p { color: var(--ink-muted); }
.city-name { font-size: var(--step-3); font-weight: 1000; color: var(--rose); line-height: 1.1; }
html[lang="en"] .city-name { font-weight: 700; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 52rem; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 14px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-en); font-size: 1.4rem; color: var(--rose); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-muted); padding-bottom: 16px; font-size: var(--step--1); line-height: 1.9; }

/* Final CTA + footer */
.final { text-align: center; }
.final .wrap { display: grid; justify-items: center; gap: 22px; }
.final svg.mark { width: 72px; height: 72px; }
.final h2 { font-size: var(--step-3); font-weight: 1000; }
html[lang="en"] .final h2 { font-weight: 700; }
footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: var(--step--1); color: var(--ink-muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer nav { display: flex; gap: 20px; margin-inline-start: auto; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--rose); }

/* Legal pages */
.legal { padding-block: clamp(32px, 6vw, 64px); }
.legal article { max-width: 46rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); }
.legal h1 { font-size: var(--step-3); font-weight: 900; margin-bottom: 8px; }
.legal h2 { font-size: var(--step-1); margin-top: 28px; margin-bottom: 8px; }
.legal p { color: var(--ink-muted); margin-bottom: 12px; white-space: pre-line; }

/* Load-in: from a visible resting state, never hidden. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .06s; }
  .hero-copy > *:nth-child(3) { animation-delay: .12s; }
  .hero-copy > *:nth-child(4) { animation-delay: .18s; }
  .hero-copy > *:nth-child(5) { animation-delay: .24s; }
  .phone { animation: float 7s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .sos::before, .lead .sos-big::before { animation: none; }
  html { scroll-behavior: auto; }
}
@keyframes rise { from { transform: translateY(14px); opacity: .001; } to { transform: none; opacity: 1; } }
@keyframes float { 50% { transform: translateY(-10px); } }
