/* MeroRide web: landing, trip sharing and operations dashboard */
:root {
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-700: #3730a3;
  --brand-50: #eef2ff;
  --violet: #7c3aed;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #e11d48;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(30, 27, 75, 0.18);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
.container { width: min(1120px, 92vw); margin: 0 auto; }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 12px 20px; border-radius: 999px; font-weight: 650; font-size: 15px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, .35); }
.btn-primary:hover { background: var(--brand-600); }
.btn-light { background: #fff; color: var(--brand-700); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 650; background: var(--brand-50); color: var(--brand-700);
}
.chip.green { background: #d1fae5; color: #065f46; }
.chip.amber { background: #fef3c7; color: #92400e; }
.chip.red { background: #ffe4e6; color: #9f1239; }
.chip.gray { background: #f1f5f9; color: #475569; }

/* ---------- nav ---------- */
.nav { position: absolute; inset: 0 0 auto 0; z-index: 10; padding: 18px 0; }
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span b { color: #a5b4fc; font-weight: 800; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: rgba(255,255,255,.85); font-weight: 600; font-size: 15px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 130px 0 90px;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(124, 58, 237, .55), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(99, 102, 241, .45), transparent 60%),
    linear-gradient(160deg, #1e1b4b 0%, #312e81 55%, #3b0764 100%);
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5.6vw, 66px); line-height: 1.02; letter-spacing: -.035em; margin: 18px 0; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: rgba(255,255,255,.8); max-width: 520px; margin: 0 0 30px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .badge { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.hero .badge i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; }
.hero-stats b { display: block; font-size: 26px; letter-spacing: -.02em; }
.hero-stats span { color: rgba(255,255,255,.65); font-size: 14px; }
.phone {
  width: min(340px, 80vw); margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 42px; padding: 12px;
  background: #0b0a1f; box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.06);
  position: relative; transform: rotate(-3deg);
}
.phone .screen { width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: #eef1f6; position: relative; }
.phone .sheet {
  position: absolute; left: 10px; right: 10px; bottom: 10px; background: #fff; border-radius: 22px;
  padding: 14px; box-shadow: 0 -6px 24px rgba(15,23,42,.12); color: var(--ink);
}
.sheet .row { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 14px; }
.sheet .row.sel { background: var(--brand-50); outline: 2px solid var(--brand); }
.sheet .row .l { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.sheet .row .l small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.sheet .row b { font-size: 14px; }
.sheet .cta { margin-top: 8px; background: var(--brand); color: #fff; text-align: center; padding: 11px; border-radius: 14px; font-weight: 700; font-size: 14px; }
.veh-ico { width: 34px; height: 34px; border-radius: 10px; background: #f1f5f9; display: grid; place-items: center; font-size: 18px; }

/* ---------- sections ---------- */
section { padding: 90px 0; }
.eyebrow { color: var(--brand); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
h2.title { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 14px; }
p.sub { color: var(--muted); font-size: 17px; max-width: 620px; margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.vehicle-card .price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 2px; }
.vehicle-card .meta { color: var(--muted); font-size: 14px; }
.vehicle-card .icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--brand-50); }
.vehicle-card ul { padding-left: 18px; color: var(--ink-2); margin: 16px 0 0; font-size: 14px; }
.feature .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--brand-50); margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.step { position: relative; padding-top: 54px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); }
.drive { background: linear-gradient(135deg, #111827, #1e1b4b); color: #fff; border-radius: 28px; padding: 54px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; }
.drive p { color: rgba(255,255,255,.75); }
.drive ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.drive li::before { content: "✓"; color: #34d399; font-weight: 900; margin-right: 10px; }
.earn { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 24px; }
.earn b { font-size: 40px; letter-spacing: -.03em; display: block; }
.earn .bars { display: flex; gap: 8px; align-items: flex-end; height: 90px; margin-top: 18px; }
.earn .bars i { flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #a5b4fc, #6366f1); }
footer { padding: 40px 0 60px; color: var(--muted); font-size: 14px; }
footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; }
footer .brand { color: var(--ink); font-size: 17px; }
footer .brand img { width: 28px; height: 28px; }
.demo-banner { background: #fef3c7; color: #92400e; text-align: center; font-size: 13px; padding: 7px; font-weight: 600; }

/* ---------- map pages ---------- */
.map-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.map-page #map { flex: 1; }
.leaflet-container { font: inherit; background: #e5e9f0; }
.mr-pin { display: grid; place-items: center; }
.mr-pin .dot { width: 18px; height: 18px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.mr-pin.pickup .dot { background: var(--success); }
.mr-pin.dropoff .dot { background: var(--danger); border-radius: 6px; }
.mr-vehicle { display: grid; place-items: center; }
.mr-vehicle .v { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(15,23,42,.25); font-size: 18px; border: 2px solid var(--brand); }
.mr-vehicle.busy .v { border-color: var(--warn); }
.mr-vehicle.bot .v { border-style: dashed; }
.sos-pin .v { background: var(--danger); color: #fff; border-color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(225,29,72,.6); } 100% { box-shadow: 0 0 0 18px rgba(225,29,72,0); } }

.track-card {
  position: absolute; z-index: 500; left: 50%; transform: translateX(-50%); bottom: 18px; width: min(460px, 94vw);
  background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); padding: 20px 22px;
}
.track-card .status { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.track-card .muted { color: var(--muted); font-size: 14px; }
.track-card .driver { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--violet)); flex: none; }
.plate { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; background: #fff7ed; border: 2px solid #fdba74; color: #9a3412; padding: 4px 10px; border-radius: 10px; font-size: 13px; }
.track-top { position: absolute; z-index: 500; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.track-top .brand { background: #fff; color: var(--ink); padding: 8px 14px 8px 8px; border-radius: 999px; box-shadow: var(--shadow); font-size: 16px; pointer-events: auto; }
.track-top .brand img { width: 28px; height: 28px; }
.track-top .brand span b { color: var(--brand); }
.route-steps { display: grid; gap: 6px; margin-top: 12px; font-size: 14px; }
.route-steps div { display: flex; gap: 10px; align-items: baseline; }
.route-steps i { width: 10px; height: 10px; border-radius: 50%; flex: none; transform: translateY(1px); }

/* ---------- ops ---------- */
.ops { display: grid; grid-template-columns: 1fr 400px; height: 100vh; height: 100dvh; }
.ops-main { display: flex; flex-direction: column; min-width: 0; }
.ops-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.ops-head .brand { font-size: 18px; }
.ops-head .brand img { width: 30px; height: 30px; }
.ops-head .brand span b { color: var(--brand); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.kpi { padding: 10px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.kpi b { font-size: 22px; letter-spacing: -.02em; }
.kpi small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.ops #map { flex: 1; }
.ops-side { background: #fff; border-left: 1px solid var(--line); overflow-y: auto; }
.ops-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; padding: 18px 18px 8px; display: flex; justify-content: space-between; }
.list { padding: 0 10px 10px; display: grid; gap: 8px; }
.item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: 14px; cursor: default; }
.item .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.item .addr { color: var(--ink-2); margin-top: 6px; font-size: 13px; }
.item .addr span { color: var(--muted); }
.item.sos { border-color: #fda4af; background: #fff1f2; }
.item .actions { display: flex; gap: 6px; margin-top: 10px; }
.empty { color: var(--muted); font-size: 14px; padding: 6px 10px 12px; }
.legend { position: absolute; z-index: 500; left: 14px; bottom: 14px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 10px 14px; font-size: 13px; display: flex; gap: 14px; }

/* ---------- 404 ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 30px; }
.center-page h1 { font-size: 64px; margin: 0; letter-spacing: -.04em; }

@media (max-width: 900px) {
  .hero .container, .drive { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; }
  .phone { display: none; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .drive { padding: 30px; }
  .ops { grid-template-columns: 1fr; height: auto; }
  .ops-main { height: 75vh; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
}

/* Privacy, terms and account deletion pages */
.legal-header { background: var(--ink, #0f172a); padding: 18px 0; }
.legal-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legal-header .brand { color: #fff; }
.legal-header nav { display: flex; gap: 18px; }
.legal-header nav a { color: rgba(255,255,255,.85); font-weight: 600; font-size: 14px; }
.legal { max-width: 760px; padding: 40px 0 24px; }
.legal h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 4px; }
.legal h2 { font-size: 20px; margin: 32px 0 10px; }
.legal p, .legal li { color: #334155; margin-bottom: 10px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal a { color: var(--brand); text-decoration: underline; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 14.5px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line, #e2e8f0); }
.legal th { background: #f8fafc; }
@media (max-width: 600px) { .legal table, .legal tbody, .legal tr, .legal td, .legal th { display: block; } .legal tr:first-child { display: none; } .legal td:first-child { font-weight: 700; border-bottom: 0; padding-bottom: 0; } .legal td:nth-child(2) { border-bottom: 0; padding-bottom: 0; } .legal td:nth-child(2)::before { content: "Who: "; font-weight: 600; } .legal td:nth-child(3)::before { content: "Why: "; font-weight: 600; } }
