/* carwan.app — the app's own palette and type (docs/design/tokens.json). */
@font-face { font-family: Alexandria; src: url(fonts/Alexandria-Variable.ttf) format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Readex; src: url(fonts/ReadexPro-Variable.ttf) format("truetype"); font-weight: 160 700; font-display: swap; }

:root {
  --lail: #1F1D57;
  --ink: #16153F;
  --saffron: #F6A823;
  --haze: #F3F1F7;
  --sand: #EBD9B8;
  --dune: #E2C79A;
  --mute: #5E5C80;
  --paper: #FFFFFF;
  --line: #E4E1EE;
  --bg: var(--haze);
  --text: var(--ink);
  --card: var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14133A; --text: #F3F1F7; --mute: #A9A6C8; --card: #1F1D57; --line: #2E2B6B; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Readex, system-ui, sans-serif; font-size: 18px; line-height: 1.65; }
a { color: inherit; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 8px; }

/* Language: Arabic first; English on request. Each page carries both. */
[lang="en"] .ar, [lang="ar"] .en { display: none !important; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 980px; margin: 0 auto; padding: 20px 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: Alexandria; font-weight: 700; font-size: 22px; }
.mark { width: 40px; height: 40px; border-radius: 10px; display: block; }
.lang { font: inherit; font-size: 15px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; cursor: pointer; }

/* The landing page is one drive: Riyadh at dusk, the saffron road down the
   page, a stop for each thing Carwan does, arrival at night. */
.horizon { position: relative; overflow: hidden; background: linear-gradient(180deg, #1F1D57 0%, #3B2A6B 40%, #B5577A 68%, #F2A35B 86%, #F8C26E 100%); color: #fff; text-align: center; }
.horizon .copy { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; padding: 64px 16px 0; }
.horizon h1 { font-family: Alexandria; font-weight: 800; font-size: clamp(42px, 8.4vw, 96px); line-height: 1.12; margin: 0 auto; max-width: 11ch; }
[lang="en"] .horizon h1 { letter-spacing: -0.025em; line-height: 1.02; max-width: 12ch; }
.horizon p { font-size: clamp(18px, 2.3vw, 22px); color: rgba(255,255,255,.84); max-width: 32ch; margin: 18px auto 0; }
.badge { display: inline-block; margin-top: 28px; padding: 13px 0; line-height: 0; }
.badge img { height: 53px; width: auto; }
.badge + .badge { margin-inline-start: 12px; }
.soon { margin: 10px 0 0; font-size: 14px; opacity: .72; }
.store { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; background: var(--saffron); color: var(--ink); font-weight: 600; border-radius: 999px; padding: 14px 26px; text-decoration: none; }
.land { display: block; width: 100%; height: clamp(200px, 30vw, 330px); margin-top: 20px; }

/* The trip: the road runs down the middle (down the start edge on phones),
   the convoy rides it as you scroll, and the light goes from day to night. */
.trip { position: relative; background: linear-gradient(180deg, #EBD9B8 0%, #F1E6D2 18%, #F1E6D2 52%, #E9B98A 66%, #B5577A 74%, #3B2A6B 80%, #1F1D57 86%, #16153F 100%); color: var(--ink); --road-x: 50%; padding-bottom: 40px; }
.legs { position: relative; }
.road { position: absolute; inset-block: 0 -40px; inset-inline-start: var(--road-x); width: 0; }
.road::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: -11px; width: 22px; border-radius: 11px; background: rgba(246,168,35,.3); }
.road::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: -3.5px; width: 7px; border-radius: 4px; background: var(--saffron); }
.convoy { position: sticky; top: calc(50vh - 120px); z-index: 3; width: 72px; margin-inline-start: -36px; display: flex; flex-direction: column; align-items: center; }
.convoy img { width: 72px; height: auto; margin-top: -26px; filter: drop-shadow(0 8px 8px rgba(22,21,63,.28)); }
.convoy img:first-child { margin-top: 0; }
[dir="rtl"] .convoy { margin-inline-start: 0; margin-inline-end: 0; transform: translateX(50%); }
[dir="ltr"] .convoy { margin-inline-start: 0; transform: translateX(-50%); }

.leg { position: relative; max-width: 1140px; margin: 0 auto; padding: 72px 24px; display: grid; grid-template-columns: 1fr 220px 1fr; grid-template-areas: "words marker phone"; align-items: center; }
.leg.flip { grid-template-areas: "phone marker words"; }
.leg .words { grid-area: words; max-width: 30ch; justify-self: end; }
.leg.flip .words { justify-self: start; }
.leg .phone { grid-area: phone; justify-self: start; }
.leg.flip .phone { justify-self: end; }
.leg h2 { font-family: Alexandria; font-weight: 800; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.18; margin: 0 0 14px; }
[lang="en"] .leg h2 { letter-spacing: -0.015em; line-height: 1.1; }
.leg p { margin: 0; font-size: 18px; color: #4A4660; }
.night, .night p { color: #F3F1F7; }
.leg.night p { color: rgba(243,241,247,.78); }

.marker { grid-area: marker; position: relative; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pin { width: 22px; height: 22px; border-radius: 50%; background: var(--lail); border: 5px solid var(--saffron); box-shadow: 0 0 0 6px rgba(246,168,35,.25); position: relative; z-index: 2; }
.place { margin-top: 12px; background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 16px -6px rgba(31,29,87,.35); position: relative; z-index: 2; display: flex; gap: 8px; }
.km { color: #7C778F; font-weight: 500; }

.phone { margin: 0; width: min(290px, 72vw); border-radius: 46px; padding: 9px; background: #16153F; box-shadow: 0 2px 0 1px rgba(255,255,255,.08) inset, 0 40px 60px -28px rgba(31,29,87,.55); }
.phone img { display: block; width: 100%; height: auto; border-radius: 37px; }

.arrival { position: relative; z-index: 2; text-align: center; padding: 40px 24px 48px; max-width: 760px; margin: 0 auto; }
.flag { display: flex; justify-content: center; margin-bottom: 28px; position: relative; }
.flag .pin { width: 34px; height: 34px; border-width: 8px; }
.promises { list-style: none; margin: 0; padding: 0; font-family: Alexandria; font-weight: 700; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.35; }
.promises li { margin: 0 0 10px; }
.where { color: rgba(243,241,247,.7); margin: 22px 0 0; }

/* Stars over the last stretch. */
.trip::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 18%; pointer-events: none;
  background-image: radial-gradient(1.5px 1.5px at 12% 30%, #fff8, transparent 60%), radial-gradient(1px 1px at 28% 62%, #fff6, transparent 60%), radial-gradient(1.5px 1.5px at 44% 18%, #fff7, transparent 60%), radial-gradient(1px 1px at 63% 44%, #fff6, transparent 60%), radial-gradient(1.5px 1.5px at 81% 24%, #fff8, transparent 60%), radial-gradient(1px 1px at 90% 70%, #fff5, transparent 60%), radial-gradient(1px 1px at 6% 80%, #fff5, transparent 60%); }

/* Phones: the road moves to the start edge, each stop stacks beside it. */
@media (max-width: 760px) {
  .trip { --road-x: 30px; }
  .convoy img { width: 52px; margin-top: -19px; }
  .convoy { top: calc(50vh - 90px); }
  .leg, .leg.flip { grid-template-columns: 48px 1fr; grid-template-areas: "marker words" "marker phone"; padding: 48px 16px 48px 12px; row-gap: 22px; align-items: start; }
  [dir="rtl"] .leg, [dir="rtl"] .leg.flip { padding: 48px 12px 48px 16px; }
  .leg .words, .leg.flip .words, .leg .phone, .leg.flip .phone { justify-self: start; }
  .marker { justify-content: flex-start; align-items: flex-start; padding-top: 6px; }
  .marker .pin { margin-inline-start: 7px; }
  .place { position: absolute; top: 0; inset-inline-start: 70px; margin: 0; }
  .leg .words { padding-top: 48px; }
  .land .way { display: none; }
  .arrival { padding-inline-start: 60px; text-align: start; }
  .flag { justify-content: flex-start; margin-inline-start: -46px; }
}

@media (prefers-reduced-motion: reduce) { .convoy { position: static; } }

main { max-width: 980px; margin: 0 auto; padding: 48px 16px 24px; }

/* The home page sits in the evening: the header on the sky, the footer at night. */
body:has(> .horizon) { background: #16153F; }
body:has(> .horizon) .bar { background: #1F1D57; max-width: none; padding-inline: max(16px, calc((100% - 980px) / 2 + 16px)); color: #fff; }
body:has(> .horizon) .lang { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.22); }
body:has(> .horizon) footer, body:has(> .horizon) footer a { color: rgba(243,241,247,.6); }

/* Long pages: privacy, support. */
.doc { max-width: 720px; }
.doc h1, .doc h2.title { font-family: Alexandria; font-weight: 800; font-size: clamp(36px, 6vw, 52px); line-height: 1.2; margin: 8px 0 8px; }
.doc h2 { font-family: Alexandria; font-weight: 700; font-size: 24px; margin: 40px 0 8px; }
.doc .meta { color: var(--mute); margin: 0 0 24px; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 16px; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; }

@media (max-width: 600px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc tr:first-child { display: none; }
  .doc tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .doc td { border: 0; padding: 2px 0; }
  .doc td:first-child { font-weight: 600; }
  .doc td:last-child { color: var(--mute); }
}

/* Invite landing. */
.plate { display: inline-flex; align-items: stretch; border: 4px solid var(--lail); border-radius: 18px; overflow: hidden; background: #fff; color: var(--ink); margin: 24px 0; direction: ltr; }
.plate .k { background: var(--lail); color: var(--saffron); font-family: Alexandria; font-weight: 700; font-size: 28px; padding: 14px 12px; display: grid; place-items: center; }
.plate .c { font-family: Alexandria; font-weight: 800; font-size: clamp(40px, 10vw, 64px); letter-spacing: .16em; padding: 6px 22px; }

footer { max-width: 980px; margin: 0 auto; padding: 32px 16px 48px; color: var(--mute); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--mute); }

/* comparison table at phone width: each stacked cell says which app it is */
.doc td.row { font-weight: 700; }
@media (max-width: 640px) {
  .doc td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--mute); margin-bottom: 2px; }
  .doc td[data-label] { padding-top: 6px; padding-bottom: 6px; border-bottom: 0; }
  .doc tr { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .doc tr:first-child { display: none; }
}
