/*
 * Public site styling. Pure CSS — no build step, no framework.
 *
 * ⚠ Colours are the mobile apps' tokens from
 * `mobile_app/packages/shared/lib/shared/constants/colors.dart`, and the same
 * variables as common/style.css, so the apps, the site and the dashboard
 * cannot drift apart.
 *
 * ⚠ Layout uses LOGICAL properties (margin-inline, padding-inline, inset-inline,
 * text-align: start) rather than left/right. The page runs RTL in Arabic, and
 * physical properties would mirror the text while leaving the layout the wrong
 * way round.
 *
 * ⚠ Every animation is wrapped in `@media (prefers-reduced-motion: no-preference)`
 * and reveal elements are VISIBLE by default. Motion is opt-in, and — more
 * importantly — if JavaScript never runs, the content is still on screen rather
 * than stuck at opacity 0. A scroll-reveal that hides content permanently when
 * a script fails is a blank page to both users and crawlers.
 */

:root {
  --primary: #1D4ED8;
  --primary-soft: #E8EFFD;
  --secondary: #1E3A8A;
  --secondary-soft: #DEE9FB;
  --on-primary: #FFFFFF;
  --ink: #151C2C;
  --muted: #667085;
  --border: #E4E7EE;
  --surface: #FFFFFF;
  --background: #F6F8FC;
  --success: #0E7490;
  --warning: #A85408;
  --warning-soft: #FCEEDD;
  --alert: #D93B30;

  --r-card: 16px;
  --r-control: 14px;
  --r-pill: 999px;
  --content: 1140px;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--background);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }
h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -.022em; }

/* Keyboard focus must stay obvious — the brand ring, never `outline: none`. */
:focus-visible {
  outline: 3px solid var(--primary-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Screen-reader-only, but focusable (used by the skip link). */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; inset-inline-start: 16px; top: 16px;
  width: auto; height: auto; clip: auto; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 18px; border-radius: var(--r-control); font-weight: 600;
}

.section { max-width: var(--content); margin-inline: auto; padding: 80px 20px; }
.section-narrow { max-width: 760px; }

.eyebrow {
  margin: 0;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--primary);
}
.h2 { font-size: 32px; font-weight: 800; margin-top: 10px; }
.lead { color: var(--muted); font-size: 17px; margin: 12px 0 0; }
.copy { margin: 0; }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
/* Class toggled by a scroll listener — the header only asserts itself once the
   page has moved, so it stays weightless at the top. */
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 20px rgba(21, 28, 44, .06);
}
.site-header .bar {
  max-width: var(--content); margin-inline: auto;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 16px;
}
/* The wordmark image IS the brand lockup — no text beside it, or the name
   appears twice. */
.brand img { height: 40px; width: auto; object-fit: contain; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.site-nav a {
  position: relative;
  color: var(--muted); font-size: 14.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.site-nav a:hover { color: var(--primary); background: var(--primary-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-pill);
  padding: 7px 15px;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--primary); cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.lang-toggle:hover { background: var(--primary-soft); border-color: var(--primary); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-control); padding: 8px 10px;
  cursor: pointer; color: var(--ink);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn-primary, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-control);
  padding: 14px 28px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease),
              box-shadow .2s var(--ease);
}
.btn-primary {
  background: var(--primary); color: var(--on-primary);
  box-shadow: 0 6px 20px rgba(29, 78, 216, .22);
}
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border); }

@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover, .btn-outline:hover { transform: translateY(-2px); }
}
.btn-primary:hover { background: var(--secondary); color: var(--on-primary); box-shadow: 0 10px 28px rgba(29, 78, 216, .3); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero-wrap {
  position: relative;
  overflow: hidden;
  /* Soft brand wash behind the fold — two offset radial tints, no image. */
  background:
    radial-gradient(80ch 46ch at 78% -8%, var(--primary-soft) 0%, transparent 60%),
    radial-gradient(60ch 40ch at 8% 4%, var(--secondary-soft) 0%, transparent 55%);
}
.hero { display: grid; gap: 52px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 52px); font-weight: 800; margin-top: 12px; }
.hero .lead { max-width: 34em; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 28px;
  margin-top: 44px; padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-stats .stat .num { font-size: 26px; font-weight: 800; color: var(--secondary); }
.hero-stats .stat .lbl { font-size: 13px; color: var(--muted); }

/* Brand panel standing in for a product shot. A fabricated phone mockup would
   misrepresent an app nobody can download yet. */
.hero-panel {
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 28px;
  padding: 56px 36px;
  text-align: center;
  color: var(--on-primary);
  box-shadow: 0 30px 60px -20px rgba(30, 58, 138, .45);
}
.hero-panel img {
  width: min(300px, 100%);
  margin-inline: auto;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 18px 22px;
}
.hero-panel .tag { font-size: 14px; opacity: .8; margin: 22px 0 0; }

/* Two slow orbs drifting behind the panel. Decorative only. */
.orb { position: absolute; border-radius: 50%; filter: blur(42px); opacity: .55; pointer-events: none; }
.orb-a { width: 190px; height: 190px; background: #60A5FA; inset-block-start: -50px; inset-inline-end: -40px; }
.orb-b { width: 150px; height: 150px; background: #A5B4FC; inset-block-end: -40px; inset-inline-start: -30px; }

@media (prefers-reduced-motion: no-preference) {
  .orb-a { animation: drift 13s ease-in-out infinite; }
  .orb-b { animation: drift 17s ease-in-out infinite reverse; }
  @keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(-16px, 20px, 0) scale(1.1); }
  }
}

/* ── Bands ─────────────────────────────────────────────────────────────── */
.band { background: var(--surface); border-block: 1px solid var(--border); }
.band-top { background: var(--surface); border-top: 1px solid var(--border); }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.grid-3, .grid-2 { display: grid; gap: 20px; margin-top: 44px; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card h3 { font-size: 18.5px; font-weight: 700; margin-top: 18px; }
.card p { color: var(--muted); margin: 8px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-4px); }
}
.card:hover { border-color: #C7D6F5; box-shadow: 0 18px 40px -24px rgba(21, 28, 44, .35); }

.chip {
  width: 46px; height: 46px; border-radius: var(--r-control);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease);
}
.card:hover .chip { transform: scale(1.08) rotate(-4deg); }
.chip-primary { background: var(--primary-soft); color: var(--primary); }
.chip-warning { background: var(--warning-soft); color: var(--warning); }
.chip-secondary { background: var(--secondary-soft); color: var(--secondary); }

.step-num {
  width: 38px; height: 38px; border-radius: var(--r-pill);
  background: var(--primary); color: var(--on-primary);
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(29, 78, 216, .28);
}
ol.grid-3 { list-style: none; padding: 0; margin-inline: 0; }

/* ── Coverage ──────────────────────────────────────────────────────────── */
.coverage {
  margin-top: 52px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px;
}
.coverage h3 {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.city {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-pill); padding: 9px 18px;
  font-size: 14px; font-weight: 600; color: var(--secondary);
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.city:hover { background: var(--primary-soft); border-color: var(--primary); transform: translateY(-2px); }

/* ── Drivers ───────────────────────────────────────────────────────────── */
.split { display: grid; gap: 36px; align-items: center; }
.perks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.perks li { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 500; }
.perks .tick {
  width: 24px; height: 24px; flex: none; border-radius: var(--r-pill);
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
/* The driver app isn't a public download — this explains why, next to the CTA. */
.note {
  margin-top: 22px; padding: 14px 16px;
  background: var(--warning-soft); color: var(--warning);
  border-radius: var(--r-control);
  font-size: 13.5px; line-height: 1.55;
}

/* ── Store buttons ─────────────────────────────────────────────────────── */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.store {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border-radius: var(--r-control); padding: 11px 22px;
  border: 1px solid transparent; min-width: 158px;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.store .small { font-size: 11.5px; opacity: .72; }
.store .name { font-weight: 700; font-size: 15px; }
.store-live { background: var(--ink); color: var(--on-primary); }
.store-live:hover { background: var(--secondary); color: var(--on-primary); }
@media (prefers-reduced-motion: no-preference) {
  .store-live:hover { transform: translateY(-2px); }
}
/* Unavailable renders as an inert chip, never an anchor — see site_config.php. */
.store-soon {
  background: var(--background); border-color: var(--border);
  color: var(--muted); cursor: not-allowed;
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.faq { margin-top: 40px; display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 4px 20px;
  transition: border-color .2s var(--ease);
}
.faq details[open] { border-color: #C7D6F5; }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 0; font-weight: 600; font-size: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .sign {
  flex: none; width: 26px; height: 26px; border-radius: var(--r-pill);
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.faq details[open] summary .sign {
  transform: rotate(45deg);
  background: var(--primary); color: var(--on-primary);
}
.faq .answer { color: var(--muted); padding: 0 0 20px; margin: 0; }

/* ── Contact ───────────────────────────────────────────────────────────── */
.contact-list {
  list-style: none; margin: 34px 0 0; padding: 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.contact-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 0; border-bottom: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .label { font-size: 14px; color: var(--muted); }
.contact-list .value { font-weight: 600; color: var(--ink); }
.contact-list .value.empty { font-weight: 400; font-style: italic; color: var(--muted); font-size: 14px; }

.socials { display: flex; gap: 10px; margin-top: 26px; }
.socials a {
  width: 42px; height: 42px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background .2s var(--ease), transform .2s var(--ease);
}
.socials a:hover {
  color: var(--primary); border-color: var(--primary);
  background: var(--primary-soft); transform: translateY(-2px);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .inner {
  max-width: var(--content); margin-inline: auto;
  padding: 48px 20px 22px;
  display: grid; gap: 32px;
}
.site-footer img { height: 38px; width: auto; }
.site-footer .tagline { color: var(--muted); font-size: 14px; margin: 14px 0 0; max-width: 34em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.site-footer .bottom {
  max-width: var(--content); margin-inline: auto;
  padding: 18px 20px 30px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 13.5px;
}
.site-footer .bottom a { color: var(--muted); }
.site-footer .bottom a:hover { color: var(--primary); }

/* ── Scroll reveal ─────────────────────────────────────────────────────── */
/*
 * ⚠ VISIBLE by default. The `.reveal` class is added by JS only after it has
 * confirmed IntersectionObserver support, and removed as each element enters
 * view. If the script never runs, nothing is hidden — the page renders fully
 * for users and crawlers alike.
 */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); }
  .revealed {
    opacity: 1; transform: none;
    transition: opacity .7s var(--ease), transform .7s var(--ease);
  }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr .95fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1.15fr .85fr; }
  .section { padding: 104px 20px; }
  .site-footer .inner { grid-template-columns: 1.4fr 1fr; align-items: start; }
}

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-inline-start: auto; }
  .site-header .bar { position: relative; }
  .site-nav {
    display: none;
    position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
    box-shadow: 0 16px 30px -18px rgba(21, 28, 44, .3);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--border); border-radius: 0; }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a:hover { background: transparent; }
  .hero-panel { padding: 40px 24px; }
}
